vibora 1.6.0 → 1.8.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/bin/vibora.js +11 -8
- package/dist/assets/index-BxOt05pH.css +1 -0
- package/dist/assets/index-DDBvX7Ij.css +1 -0
- package/dist/assets/index-DP-OAlLv.js +116 -0
- package/dist/assets/index-DS5B_viR.js +116 -0
- package/dist/index.html +2 -2
- package/drizzle/0004_dear_beyonder.sql +9 -0
- package/drizzle/0005_zippy_professor_monster.sql +1 -0
- package/drizzle/meta/0004_snapshot.json +464 -0
- package/drizzle/meta/0005_snapshot.json +472 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +1 -1
- package/server/index.js +577 -20
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function TW(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Tg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var M1={exports:{}},Jf={};var c5;function kW(){if(c5)return Jf;c5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var a in i)a!=="key"&&(s[a]=i[a])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Jf.Fragment=t,Jf.jsx=n,Jf.jsxs=n,Jf}var u5;function OW(){return u5||(u5=1,M1.exports=kW()),M1.exports}var w=OW(),L1={exports:{}},yt={};var d5;function RW(){if(d5)return yt;d5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,g={};function b(j,B,V){this.props=j,this.context=B,this.refs=g,this.updater=V||S}b.prototype.isReactComponent={},b.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,B,"setState")},b.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function y(){}y.prototype=b.prototype;function _(j,B,V){this.props=j,this.context=B,this.refs=g,this.updater=V||S}var T=_.prototype=new y;T.constructor=_,x(T,b.prototype),T.isPureReactComponent=!0;var E=Array.isArray;function k(){}var A={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function L(j,B,V){var X=V.ref;return{$$typeof:e,type:j,key:B,ref:X!==void 0?X:null,props:V}}function z(j,B){return L(j.type,B,j.props)}function D(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function $(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return B[V]})}var N=/\/+/g;function F(j,B){return typeof j=="object"&&j!==null&&j.key!=null?$(""+j.key):B.toString(36)}function U(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(k,k):(j.status="pending",j.then(function(B){j.status==="pending"&&(j.status="fulfilled",j.value=B)},function(B){j.status==="pending"&&(j.status="rejected",j.reason=B)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function H(j,B,V,X,re){var ie=typeof j;(ie==="undefined"||ie==="boolean")&&(j=null);var Q=!1;if(j===null)Q=!0;else switch(ie){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(j.$$typeof){case e:case t:Q=!0;break;case h:return Q=j._init,H(Q(j._payload),B,V,X,re)}}if(Q)return re=re(j),Q=X===""?"."+F(j,0):X,E(re)?(V="",Q!=null&&(V=Q.replace(N,"$&/")+"/"),H(re,B,V,"",function(ee){return ee})):re!=null&&(D(re)&&(re=z(re,V+(re.key==null||j&&j.key===re.key?"":(""+re.key).replace(N,"$&/")+"/")+Q)),B.push(re)),1;Q=0;var Y=X===""?".":X+":";if(E(j))for(var J=0;J<j.length;J++)X=j[J],ie=Y+F(X,J),Q+=H(X,B,V,ie,re);else if(J=v(j),typeof J=="function")for(j=J.call(j),J=0;!(X=j.next()).done;)X=X.value,ie=Y+F(X,J++),Q+=H(X,B,V,ie,re);else if(ie==="object"){if(typeof j.then=="function")return H(U(j),B,V,X,re);throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Q}function K(j,B,V){if(j==null)return j;var X=[],re=0;return H(j,X,"","",function(ie){return B.call(V,ie,re++)}),X}function W(j){if(j._status===-1){var B=j._result;B=B(),B.then(function(V){(j._status===0||j._status===-1)&&(j._status=1,j._result=V)},function(V){(j._status===0||j._status===-1)&&(j._status=2,j._result=V)}),j._status===-1&&(j._status=0,j._result=B)}if(j._status===1)return j._result.default;throw j._result}var I=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},G={map:K,forEach:function(j,B,V){K(j,function(){B.apply(this,arguments)},V)},count:function(j){var B=0;return K(j,function(){B++}),B},toArray:function(j){return K(j,function(B){return B})||[]},only:function(j){if(!D(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return yt.Activity=f,yt.Children=G,yt.Component=b,yt.Fragment=n,yt.Profiler=i,yt.PureComponent=_,yt.StrictMode=r,yt.Suspense=c,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,yt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return A.H.useMemoCache(j)}},yt.cache=function(j){return function(){return j.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(j,B,V){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var X=x({},j.props),re=j.key;if(B!=null)for(ie in B.key!==void 0&&(re=""+B.key),B)!R.call(B,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&B.ref===void 0||(X[ie]=B[ie]);var ie=arguments.length-2;if(ie===1)X.children=V;else if(1<ie){for(var Q=Array(ie),Y=0;Y<ie;Y++)Q[Y]=arguments[Y+2];X.children=Q}return L(j.type,re,X)},yt.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:s,_context:j},j},yt.createElement=function(j,B,V){var X,re={},ie=null;if(B!=null)for(X in B.key!==void 0&&(ie=""+B.key),B)R.call(B,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(re[X]=B[X]);var Q=arguments.length-2;if(Q===1)re.children=V;else if(1<Q){for(var Y=Array(Q),J=0;J<Q;J++)Y[J]=arguments[J+2];re.children=Y}if(j&&j.defaultProps)for(X in Q=j.defaultProps,Q)re[X]===void 0&&(re[X]=Q[X]);return L(j,ie,re)},yt.createRef=function(){return{current:null}},yt.forwardRef=function(j){return{$$typeof:a,render:j}},yt.isValidElement=D,yt.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:W}},yt.memo=function(j,B){return{$$typeof:u,type:j,compare:B===void 0?null:B}},yt.startTransition=function(j){var B=A.T,V={};A.T=V;try{var X=j(),re=A.S;re!==null&&re(V,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(k,I)}catch(ie){I(ie)}finally{B!==null&&V.types!==null&&(B.types=V.types),A.T=B}},yt.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},yt.use=function(j){return A.H.use(j)},yt.useActionState=function(j,B,V){return A.H.useActionState(j,B,V)},yt.useCallback=function(j,B){return A.H.useCallback(j,B)},yt.useContext=function(j){return A.H.useContext(j)},yt.useDebugValue=function(){},yt.useDeferredValue=function(j,B){return A.H.useDeferredValue(j,B)},yt.useEffect=function(j,B){return A.H.useEffect(j,B)},yt.useEffectEvent=function(j){return A.H.useEffectEvent(j)},yt.useId=function(){return A.H.useId()},yt.useImperativeHandle=function(j,B,V){return A.H.useImperativeHandle(j,B,V)},yt.useInsertionEffect=function(j,B){return A.H.useInsertionEffect(j,B)},yt.useLayoutEffect=function(j,B){return A.H.useLayoutEffect(j,B)},yt.useMemo=function(j,B){return A.H.useMemo(j,B)},yt.useOptimistic=function(j,B){return A.H.useOptimistic(j,B)},yt.useReducer=function(j,B,V){return A.H.useReducer(j,B,V)},yt.useRef=function(j){return A.H.useRef(j)},yt.useState=function(j){return A.H.useState(j)},yt.useSyncExternalStore=function(j,B,V){return A.H.useSyncExternalStore(j,B,V)},yt.useTransition=function(){return A.H.useTransition()},yt.version="19.2.3",yt}var f5;function $p(){return f5||(f5=1,L1.exports=RW()),L1.exports}var O=$p();const oe=sn(O),fb=TW({__proto__:null,default:oe},[O]);var j1={exports:{}},eh={},D1={exports:{}},I1={};var h5;function AW(){return h5||(h5=1,(function(e){function t(H,K){var W=H.length;H.push(K);e:for(;0<W;){var I=W-1>>>1,G=H[I];if(0<i(G,K))H[I]=K,H[W]=G,W=I;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var K=H[0],W=H.pop();if(W!==K){H[0]=W;e:for(var I=0,G=H.length,j=G>>>1;I<j;){var B=2*(I+1)-1,V=H[B],X=B+1,re=H[X];if(0>i(V,W))X<G&&0>i(re,V)?(H[I]=re,H[X]=W,I=X):(H[I]=V,H[B]=W,I=B);else if(X<G&&0>i(re,W))H[I]=re,H[X]=W,I=X;else break e}}return K}function i(H,K){var W=H.sortIndex-K.sortIndex;return W!==0?W:H.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var c=[],u=[],h=1,f=null,p=3,v=!1,S=!1,x=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function T(H){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=H)r(u),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(u)}}function E(H){if(x=!1,T(H),!S)if(n(c)!==null)S=!0,k||(k=!0,$());else{var K=n(u);K!==null&&U(E,K.startTime-H)}}var k=!1,A=-1,R=5,L=-1;function z(){return g?!0:!(e.unstable_now()-L<R)}function D(){if(g=!1,k){var H=e.unstable_now();L=H;var K=!0;try{e:{S=!1,x&&(x=!1,y(A),A=-1),v=!0;var W=p;try{t:{for(T(H),f=n(c);f!==null&&!(f.expirationTime>H&&z());){var I=f.callback;if(typeof I=="function"){f.callback=null,p=f.priorityLevel;var G=I(f.expirationTime<=H);if(H=e.unstable_now(),typeof G=="function"){f.callback=G,T(H),K=!0;break t}f===n(c)&&r(c),T(H)}else r(c);f=n(c)}if(f!==null)K=!0;else{var j=n(u);j!==null&&U(E,j.startTime-H),K=!1}}break e}finally{f=null,p=W,v=!1}K=void 0}}finally{K?$():k=!1}}}var $;if(typeof _=="function")$=function(){_(D)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,F=N.port2;N.port1.onmessage=D,$=function(){F.postMessage(null)}}else $=function(){b(D,0)};function U(H,K){A=b(function(){H(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(H){switch(p){case 1:case 2:case 3:var K=3;break;default:K=p}var W=p;p=K;try{return H()}finally{p=W}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(H,K){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var W=p;p=H;try{return K()}finally{p=W}},e.unstable_scheduleCallback=function(H,K,W){var I=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?I+W:I):W=I,H){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=W+G,H={id:h++,callback:K,priorityLevel:H,startTime:W,expirationTime:G,sortIndex:-1},W>I?(H.sortIndex=W,t(u,H),n(c)===null&&H===n(u)&&(x?(y(A),A=-1):x=!0,U(E,W-I))):(H.sortIndex=G,t(c,H),S||v||(S=!0,k||(k=!0,$()))),H},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(H){var K=p;return function(){var W=p;p=K;try{return H.apply(this,arguments)}finally{p=W}}}})(I1)),I1}var p5;function PW(){return p5||(p5=1,D1.exports=AW()),D1.exports}var N1={exports:{}},Tr={};var m5;function MW(){if(m5)return Tr;m5=1;var e=$p();function t(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(c,u,h){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:f==null?null:""+f,children:c,containerInfo:u,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Tr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Tr.createPortal=function(c,u){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return s(c,u,null,h)},Tr.flushSync=function(c){var u=l.T,h=r.p;try{if(l.T=null,r.p=2,c)return c()}finally{l.T=u,r.p=h,r.d.f()}},Tr.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,r.d.C(c,u))},Tr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Tr.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var h=u.as,f=a(h,u.crossOrigin),p=typeof u.integrity=="string"?u.integrity:void 0,v=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;h==="style"?r.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:f,integrity:p,fetchPriority:v,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Tr.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var h=a(u.as,u.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&r.d.M(c)},Tr.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var h=u.as,f=a(h,u.crossOrigin);r.d.L(c,h,{crossOrigin:f,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Tr.preloadModule=function(c,u){if(typeof c=="string")if(u){var h=a(u.as,u.crossOrigin);r.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else r.d.m(c)},Tr.requestFormReset=function(c){r.d.r(c)},Tr.unstable_batchedUpdates=function(c,u){return c(u)},Tr.useFormState=function(c,u,h){return l.H.useFormState(c,u,h)},Tr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Tr.version="19.2.3",Tr}var g5;function Z8(){if(g5)return N1.exports;g5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),N1.exports=MW(),N1.exports}var v5;function LW(){if(v5)return eh;v5=1;var e=PW(),t=$p(),n=Z8();function r(o){var d="https://react.dev/errors/"+o;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+o+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var d=o,m=o;if(o.alternate)for(;d.return;)d=d.return;else{o=d;do d=o,(d.flags&4098)!==0&&(m=d.return),o=d.return;while(o)}return d.tag===3?m:null}function l(o){if(o.tag===13){var d=o.memoizedState;if(d===null&&(o=o.alternate,o!==null&&(d=o.memoizedState)),d!==null)return d.dehydrated}return null}function a(o){if(o.tag===31){var d=o.memoizedState;if(d===null&&(o=o.alternate,o!==null&&(d=o.memoizedState)),d!==null)return d.dehydrated}return null}function c(o){if(s(o)!==o)throw Error(r(188))}function u(o){var d=o.alternate;if(!d){if(d=s(o),d===null)throw Error(r(188));return d!==o?null:o}for(var m=o,C=d;;){var P=m.return;if(P===null)break;var M=P.alternate;if(M===null){if(C=P.return,C!==null){m=C;continue}break}if(P.child===M.child){for(M=P.child;M;){if(M===m)return c(P),o;if(M===C)return c(P),d;M=M.sibling}throw Error(r(188))}if(m.return!==C.return)m=P,C=M;else{for(var q=!1,Z=P.child;Z;){if(Z===m){q=!0,m=P,C=M;break}if(Z===C){q=!0,C=P,m=M;break}Z=Z.sibling}if(!q){for(Z=M.child;Z;){if(Z===m){q=!0,m=M,C=P;break}if(Z===C){q=!0,C=M,m=P;break}Z=Z.sibling}if(!q)throw Error(r(189))}}if(m.alternate!==C)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?o:d}function h(o){var d=o.tag;if(d===5||d===26||d===27||d===6)return o;for(o=o.child;o!==null;){if(d=h(o),d!==null)return d;o=o.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function $(o){return o===null||typeof o!="object"?null:(o=D&&o[D]||o["@@iterator"],typeof o=="function"?o:null)}var N=Symbol.for("react.client.reference");function F(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===N?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case b:return"Profiler";case g:return"StrictMode";case E:return"Suspense";case k:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case S:return"Portal";case _:return o.displayName||"Context";case y:return(o._context.displayName||"Context")+".Consumer";case T:var d=o.render;return o=o.displayName,o||(o=d.displayName||d.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case A:return d=o.displayName||null,d!==null?d:F(o.type)||"Memo";case R:d=o._payload,o=o._init;try{return F(o(d))}catch{}}return null}var U=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},I=[],G=-1;function j(o){return{current:o}}function B(o){0>G||(o.current=I[G],I[G]=null,G--)}function V(o,d){G++,I[G]=o.current,o.current=d}var X=j(null),re=j(null),ie=j(null),Q=j(null);function Y(o,d){switch(V(ie,d),V(re,o),V(X,null),d.nodeType){case 9:case 11:o=(o=d.documentElement)&&(o=o.namespaceURI)?MM(o):0;break;default:if(o=d.tagName,d=d.namespaceURI)d=MM(d),o=LM(d,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}B(X),V(X,o)}function J(){B(X),B(re),B(ie)}function ee(o){o.memoizedState!==null&&V(Q,o);var d=X.current,m=LM(d,o.type);d!==m&&(V(re,o),V(X,m))}function ne(o){re.current===o&&(B(X),B(re)),Q.current===o&&(B(Q),Yf._currentValue=W)}var te,le;function fe(o){if(te===void 0)try{throw Error()}catch(m){var d=m.stack.trim().match(/\n( *(at )?)/);te=d&&d[1]||"",le=-1<m.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<m.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+te+o+le}var pe=!1;function de(o,d){if(!o||pe)return"";pe=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var C={DetermineComponentFrameRoot:function(){try{if(d){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(Se){var ye=Se}Reflect.construct(o,[],je)}else{try{je.call()}catch(Se){ye=Se}o.call(je.prototype)}}else{try{throw Error()}catch(Se){ye=Se}(je=o())&&typeof je.catch=="function"&&je.catch(function(){})}}catch(Se){if(Se&&ye&&typeof Se.stack=="string")return[Se.stack,ye.stack]}return[null,null]}};C.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(C.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(C.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var M=C.DetermineComponentFrameRoot(),q=M[0],Z=M[1];if(q&&Z){var ae=q.split(`
|
|
5
|
+
`),ve=Z.split(`
|
|
6
|
+
`);for(P=C=0;C<ae.length&&!ae[C].includes("DetermineComponentFrameRoot");)C++;for(;P<ve.length&&!ve[P].includes("DetermineComponentFrameRoot");)P++;if(C===ae.length||P===ve.length)for(C=ae.length-1,P=ve.length-1;1<=C&&0<=P&&ae[C]!==ve[P];)P--;for(;1<=C&&0<=P;C--,P--)if(ae[C]!==ve[P]){if(C!==1||P!==1)do if(C--,P--,0>P||ae[C]!==ve[P]){var ke=`
|
|
7
|
+
`+ae[C].replace(" at new "," at ");return o.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",o.displayName)),ke}while(1<=C&&0<=P);break}}}finally{pe=!1,Error.prepareStackTrace=m}return(m=o?o.displayName||o.name:"")?fe(m):""}function ue(o,d){switch(o.tag){case 26:case 27:case 5:return fe(o.type);case 16:return fe("Lazy");case 13:return o.child!==d&&d!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return de(o.type,!1);case 11:return de(o.type.render,!1);case 1:return de(o.type,!0);case 31:return fe("Activity");default:return""}}function Ie(o){try{var d="",m=null;do d+=ue(o,m),m=o,o=o.return;while(o);return d}catch(C){return`
|
|
8
|
+
Error generating stack: `+C.message+`
|
|
9
|
+
`+C.stack}}var Le=Object.prototype.hasOwnProperty,we=e.unstable_scheduleCallback,_e=e.unstable_cancelCallback,Pe=e.unstable_shouldYield,me=e.unstable_requestPaint,Ae=e.unstable_now,Te=e.unstable_getCurrentPriorityLevel,We=e.unstable_ImmediatePriority,rt=e.unstable_UserBlockingPriority,Ue=e.unstable_NormalPriority,ot=e.unstable_LowPriority,tt=e.unstable_IdlePriority,mt=e.log,Ee=e.unstable_setDisableYieldValue,xe=null,Ce=null;function it(o){if(typeof mt=="function"&&Ee(o),Ce&&typeof Ce.setStrictMode=="function")try{Ce.setStrictMode(xe,o)}catch{}}var dt=Math.clz32?Math.clz32:Ot,Ze=Math.log,at=Math.LN2;function Ot(o){return o>>>=0,o===0?32:31-(Ze(o)/at|0)|0}var ft=256,_n=262144,Lt=4194304;function xt(o){var d=o&42;if(d!==0)return d;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function nt(o,d,m){var C=o.pendingLanes;if(C===0)return 0;var P=0,M=o.suspendedLanes,q=o.pingedLanes;o=o.warmLanes;var Z=C&134217727;return Z!==0?(C=Z&~M,C!==0?P=xt(C):(q&=Z,q!==0?P=xt(q):m||(m=Z&~o,m!==0&&(P=xt(m))))):(Z=C&~M,Z!==0?P=xt(Z):q!==0?P=xt(q):m||(m=C&~o,m!==0&&(P=xt(m)))),P===0?0:d!==0&&d!==P&&(d&M)===0&&(M=P&-P,m=d&-d,M>=m||M===32&&(m&4194048)!==0)?d:P}function zt(o,d){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&d)===0}function qt(o,d){switch(o){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 ct(){var o=Lt;return Lt<<=1,(Lt&62914560)===0&&(Lt=4194304),o}function Rt(o){for(var d=[],m=0;31>m;m++)d.push(o);return d}function Et(o,d){o.pendingLanes|=d,d!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Tt(o,d,m,C,P,M){var q=o.pendingLanes;o.pendingLanes=m,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=m,o.entangledLanes&=m,o.errorRecoveryDisabledLanes&=m,o.shellSuspendCounter=0;var Z=o.entanglements,ae=o.expirationTimes,ve=o.hiddenUpdates;for(m=q&~m;0<m;){var ke=31-dt(m),je=1<<ke;Z[ke]=0,ae[ke]=-1;var ye=ve[ke];if(ye!==null)for(ve[ke]=null,ke=0;ke<ye.length;ke++){var Se=ye[ke];Se!==null&&(Se.lane&=-536870913)}m&=~je}C!==0&&Je(o,C,0),M!==0&&P===0&&o.tag!==0&&(o.suspendedLanes|=M&~(q&~d))}function Je(o,d,m){o.pendingLanes|=d,o.suspendedLanes&=~d;var C=31-dt(d);o.entangledLanes|=d,o.entanglements[C]=o.entanglements[C]|1073741824|m&261930}function Zt(o,d){var m=o.entangledLanes|=d;for(o=o.entanglements;m;){var C=31-dt(m),P=1<<C;P&d|o[C]&d&&(o[C]|=d),m&=~P}}function Yn(o,d){var m=d&-d;return m=(m&42)!==0?1:Er(m),(m&(o.suspendedLanes|d))!==0?0:m}function Er(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function mr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ks(){var o=K.p;return o!==0?o:(o=window.event,o===void 0?32:n5(o.type))}function Vc(o,d){var m=K.p;try{return K.p=o,d()}finally{K.p=m}}var ai=Math.random().toString(36).slice(2),Ln="__reactFiber$"+ai,jn="__reactProps$"+ai,Os="__reactContainer$"+ai,li="__reactEvents$"+ai,io="__reactListeners$"+ai,T0="__reactHandles$"+ai,af="__reactResources$"+ai,ul="__reactMarker$"+ai;function dl(o){delete o[Ln],delete o[jn],delete o[li],delete o[io],delete o[T0]}function so(o){var d=o[Ln];if(d)return d;for(var m=o.parentNode;m;){if(d=m[Os]||m[Ln]){if(m=d.alternate,d.child!==null||m!==null&&m.child!==null)for(o=HM(o);o!==null;){if(m=o[Ln])return m;o=HM(o)}return d}o=m,m=o.parentNode}return null}function Rs(o){if(o=o[Ln]||o[Os]){var d=o.tag;if(d===5||d===6||d===13||d===31||d===26||d===27||d===3)return o}return null}function fl(o){var d=o.tag;if(d===5||d===26||d===27||d===6)return o.stateNode;throw Error(r(33))}function os(o){var d=o[af];return d||(d=o[af]={hoistableStyles:new Map,hoistableScripts:new Map}),d}function Dn(o){o[ul]=!0}var Nr=new Set,Br={};function ci(o,d){as(o,d),as(o+"Capture",d)}function as(o,d){for(Br[o]=d,o=0;o<d.length;o++)Nr.add(d[o])}var k0=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]*$"),qc={},Wc={};function O0(o){return Le.call(Wc,o)?!0:Le.call(qc,o)?!1:k0.test(o)?Wc[o]=!0:(qc[o]=!0,!1)}function oo(o,d,m){if(O0(d))if(m===null)o.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":o.removeAttribute(d);return;case"boolean":var C=d.toLowerCase().slice(0,5);if(C!=="data-"&&C!=="aria-"){o.removeAttribute(d);return}}o.setAttribute(d,""+m)}}function Zo(o,d,m){if(m===null)o.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttribute(d,""+m)}}function ui(o,d,m,C){if(C===null)o.removeAttribute(m);else{switch(typeof C){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(m);return}o.setAttributeNS(d,m,""+C)}}function qr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function pm(o){var d=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function R0(o,d,m){var C=Object.getOwnPropertyDescriptor(o.constructor.prototype,d);if(!o.hasOwnProperty(d)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var P=C.get,M=C.set;return Object.defineProperty(o,d,{configurable:!0,get:function(){return P.call(this)},set:function(q){m=""+q,M.call(this,q)}}),Object.defineProperty(o,d,{enumerable:C.enumerable}),{getValue:function(){return m},setValue:function(q){m=""+q},stopTracking:function(){o._valueTracker=null,delete o[d]}}}}function lf(o){if(!o._valueTracker){var d=pm(o)?"checked":"value";o._valueTracker=R0(o,d,""+o[d])}}function Gc(o){if(!o)return!1;var d=o._valueTracker;if(!d)return!0;var m=d.getValue(),C="";return o&&(C=pm(o)?o.checked?"true":"false":o.value),o=C,o!==m?(d.setValue(o),!0):!1}function Jo(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var cf=/[\n"\\]/g;function Wr(o){return o.replace(cf,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function uf(o,d,m,C,P,M,q,Z){o.name="",q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?o.type=q:o.removeAttribute("type"),d!=null?q==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+qr(d)):o.value!==""+qr(d)&&(o.value=""+qr(d)):q!=="submit"&&q!=="reset"||o.removeAttribute("value"),d!=null?df(o,q,qr(d)):m!=null?df(o,q,qr(m)):C!=null&&o.removeAttribute("value"),P==null&&M!=null&&(o.defaultChecked=!!M),P!=null&&(o.checked=P&&typeof P!="function"&&typeof P!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?o.name=""+qr(Z):o.removeAttribute("name")}function mm(o,d,m,C,P,M,q,Z){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(o.type=M),d!=null||m!=null){if(!(M!=="submit"&&M!=="reset"||d!=null)){lf(o);return}m=m!=null?""+qr(m):"",d=d!=null?""+qr(d):m,Z||d===o.value||(o.value=d),o.defaultValue=d}C=C??P,C=typeof C!="function"&&typeof C!="symbol"&&!!C,o.checked=Z?o.checked:!!C,o.defaultChecked=!!C,q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"&&(o.name=q),lf(o)}function df(o,d,m){d==="number"&&Jo(o.ownerDocument)===o||o.defaultValue===""+m||(o.defaultValue=""+m)}function ea(o,d,m,C){if(o=o.options,d){d={};for(var P=0;P<m.length;P++)d["$"+m[P]]=!0;for(m=0;m<o.length;m++)P=d.hasOwnProperty("$"+o[m].value),o[m].selected!==P&&(o[m].selected=P),P&&C&&(o[m].defaultSelected=!0)}else{for(m=""+qr(m),d=null,P=0;P<o.length;P++){if(o[P].value===m){o[P].selected=!0,C&&(o[P].defaultSelected=!0);return}d!==null||o[P].disabled||(d=o[P])}d!==null&&(d.selected=!0)}}function gm(o,d,m){if(d!=null&&(d=""+qr(d),d!==o.value&&(o.value=d),m==null)){o.defaultValue!==d&&(o.defaultValue=d);return}o.defaultValue=m!=null?""+qr(m):""}function Ve(o,d,m,C){if(d==null){if(C!=null){if(m!=null)throw Error(r(92));if(U(C)){if(1<C.length)throw Error(r(93));C=C[0]}m=C}m==null&&(m=""),d=m}m=qr(d),o.defaultValue=m,C=o.textContent,C===m&&C!==""&&C!==null&&(o.value=C),lf(o)}function st(o,d){if(d){var m=o.firstChild;if(m&&m===o.lastChild&&m.nodeType===3){m.nodeValue=d;return}}o.textContent=d}var bt=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 cn(o,d,m){var C=d.indexOf("--")===0;m==null||typeof m=="boolean"||m===""?C?o.setProperty(d,""):d==="float"?o.cssFloat="":o[d]="":C?o.setProperty(d,m):typeof m!="number"||m===0||bt.has(d)?d==="float"?o.cssFloat=m:o[d]=(""+m).trim():o[d]=m+"px"}function xn(o,d,m){if(d!=null&&typeof d!="object")throw Error(r(62));if(o=o.style,m!=null){for(var C in m)!m.hasOwnProperty(C)||d!=null&&d.hasOwnProperty(C)||(C.indexOf("--")===0?o.setProperty(C,""):C==="float"?o.cssFloat="":o[C]="");for(var P in d)C=d[P],d.hasOwnProperty(P)&&m[P]!==C&&cn(o,P,C)}else for(var M in d)d.hasOwnProperty(M)&&cn(o,M,d[M])}function In(o){if(o.indexOf("-")===-1)return!1;switch(o){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 ao=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),lo=/^[\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 co(o){return lo.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ls(){}var vm=null;function A0(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Kc=null,Yc=null;function PR(o){var d=Rs(o);if(d&&(o=d.stateNode)){var m=o[jn]||null;e:switch(o=d.stateNode,d.type){case"input":if(uf(o,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name),d=m.name,m.type==="radio"&&d!=null){for(m=o;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll('input[name="'+Wr(""+d)+'"][type="radio"]'),d=0;d<m.length;d++){var C=m[d];if(C!==o&&C.form===o.form){var P=C[jn]||null;if(!P)throw Error(r(90));uf(C,P.value,P.defaultValue,P.defaultValue,P.checked,P.defaultChecked,P.type,P.name)}}for(d=0;d<m.length;d++)C=m[d],C.form===o.form&&Gc(C)}break e;case"textarea":gm(o,m.value,m.defaultValue);break e;case"select":d=m.value,d!=null&&ea(o,!!m.multiple,d,!1)}}}var P0=!1;function MR(o,d,m){if(P0)return o(d,m);P0=!0;try{var C=o(d);return C}finally{if(P0=!1,(Kc!==null||Yc!==null)&&(ig(),Kc&&(d=Kc,o=Yc,Yc=Kc=null,PR(d),o)))for(d=0;d<o.length;d++)PR(o[d])}}function ff(o,d){var m=o.stateNode;if(m===null)return null;var C=m[jn]||null;if(C===null)return null;m=C[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(C=!C.disabled)||(o=o.type,C=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!C;break e;default:o=!1}if(o)return null;if(m&&typeof m!="function")throw Error(r(231,d,typeof m));return m}var uo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),M0=!1;if(uo)try{var hf={};Object.defineProperty(hf,"passive",{get:function(){M0=!0}}),window.addEventListener("test",hf,hf),window.removeEventListener("test",hf,hf)}catch{M0=!1}var ta=null,L0=null,ym=null;function LR(){if(ym)return ym;var o,d=L0,m=d.length,C,P="value"in ta?ta.value:ta.textContent,M=P.length;for(o=0;o<m&&d[o]===P[o];o++);var q=m-o;for(C=1;C<=q&&d[m-C]===P[M-C];C++);return ym=P.slice(o,1<C?1-C:void 0)}function bm(o){var d=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&d===13&&(o=13)):o=d,o===10&&(o=13),32<=o||o===13?o:0}function _m(){return!0}function jR(){return!1}function Gr(o){function d(m,C,P,M,q){this._reactName=m,this._targetInst=P,this.type=C,this.nativeEvent=M,this.target=q,this.currentTarget=null;for(var Z in o)o.hasOwnProperty(Z)&&(m=o[Z],this[Z]=m?m(M):M[Z]);return this.isDefaultPrevented=(M.defaultPrevented!=null?M.defaultPrevented:M.returnValue===!1)?_m:jR,this.isPropagationStopped=jR,this}return f(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=_m)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=_m)},persist:function(){},isPersistent:_m}),d}var hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xm=Gr(hl),pf=f({},hl,{view:0,detail:0}),CV=Gr(pf),j0,D0,mf,Sm=f({},pf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:N0,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==mf&&(mf&&o.type==="mousemove"?(j0=o.screenX-mf.screenX,D0=o.screenY-mf.screenY):D0=j0=0,mf=o),j0)},movementY:function(o){return"movementY"in o?o.movementY:D0}}),DR=Gr(Sm),EV=f({},Sm,{dataTransfer:0}),TV=Gr(EV),kV=f({},pf,{relatedTarget:0}),I0=Gr(kV),OV=f({},hl,{animationName:0,elapsedTime:0,pseudoElement:0}),RV=Gr(OV),AV=f({},hl,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),PV=Gr(AV),MV=f({},hl,{data:0}),IR=Gr(MV),LV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jV={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"},DV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IV(o){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(o):(o=DV[o])?!!d[o]:!1}function N0(){return IV}var NV=f({},pf,{key:function(o){if(o.key){var d=LV[o.key]||o.key;if(d!=="Unidentified")return d}return o.type==="keypress"?(o=bm(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?jV[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:N0,charCode:function(o){return o.type==="keypress"?bm(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?bm(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),BV=Gr(NV),zV=f({},Sm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),NR=Gr(zV),HV=f({},pf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:N0}),$V=Gr(HV),FV=f({},hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),UV=Gr(FV),VV=f({},Sm,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),qV=Gr(VV),WV=f({},hl,{newState:0,oldState:0}),GV=Gr(WV),KV=[9,13,27,32],B0=uo&&"CompositionEvent"in window,gf=null;uo&&"documentMode"in document&&(gf=document.documentMode);var YV=uo&&"TextEvent"in window&&!gf,BR=uo&&(!B0||gf&&8<gf&&11>=gf),zR=" ",HR=!1;function $R(o,d){switch(o){case"keyup":return KV.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FR(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Xc=!1;function XV(o,d){switch(o){case"compositionend":return FR(d);case"keypress":return d.which!==32?null:(HR=!0,zR);case"textInput":return o=d.data,o===zR&&HR?null:o;default:return null}}function QV(o,d){if(Xc)return o==="compositionend"||!B0&&$R(o,d)?(o=LR(),ym=L0=ta=null,Xc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return BR&&d.locale!=="ko"?null:d.data;default:return null}}var ZV={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 UR(o){var d=o&&o.nodeName&&o.nodeName.toLowerCase();return d==="input"?!!ZV[o.type]:d==="textarea"}function VR(o,d,m,C){Kc?Yc?Yc.push(C):Yc=[C]:Kc=C,d=dg(d,"onChange"),0<d.length&&(m=new xm("onChange","change",null,m,C),o.push({event:m,listeners:d}))}var vf=null,yf=null;function JV(o){TM(o,0)}function wm(o){var d=fl(o);if(Gc(d))return o}function qR(o,d){if(o==="change")return d}var WR=!1;if(uo){var z0;if(uo){var H0="oninput"in document;if(!H0){var GR=document.createElement("div");GR.setAttribute("oninput","return;"),H0=typeof GR.oninput=="function"}z0=H0}else z0=!1;WR=z0&&(!document.documentMode||9<document.documentMode)}function KR(){vf&&(vf.detachEvent("onpropertychange",YR),yf=vf=null)}function YR(o){if(o.propertyName==="value"&&wm(yf)){var d=[];VR(d,yf,o,A0(o)),MR(JV,d)}}function eq(o,d,m){o==="focusin"?(KR(),vf=d,yf=m,vf.attachEvent("onpropertychange",YR)):o==="focusout"&&KR()}function tq(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return wm(yf)}function nq(o,d){if(o==="click")return wm(d)}function rq(o,d){if(o==="input"||o==="change")return wm(d)}function iq(o,d){return o===d&&(o!==0||1/o===1/d)||o!==o&&d!==d}var di=typeof Object.is=="function"?Object.is:iq;function bf(o,d){if(di(o,d))return!0;if(typeof o!="object"||o===null||typeof d!="object"||d===null)return!1;var m=Object.keys(o),C=Object.keys(d);if(m.length!==C.length)return!1;for(C=0;C<m.length;C++){var P=m[C];if(!Le.call(d,P)||!di(o[P],d[P]))return!1}return!0}function XR(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function QR(o,d){var m=XR(o);o=0;for(var C;m;){if(m.nodeType===3){if(C=o+m.textContent.length,o<=d&&C>=d)return{node:m,offset:d-o};o=C}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=XR(m)}}function ZR(o,d){return o&&d?o===d?!0:o&&o.nodeType===3?!1:d&&d.nodeType===3?ZR(o,d.parentNode):"contains"in o?o.contains(d):o.compareDocumentPosition?!!(o.compareDocumentPosition(d)&16):!1:!1}function JR(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var d=Jo(o.document);d instanceof o.HTMLIFrameElement;){try{var m=typeof d.contentWindow.location.href=="string"}catch{m=!1}if(m)o=d.contentWindow;else break;d=Jo(o.document)}return d}function $0(o){var d=o&&o.nodeName&&o.nodeName.toLowerCase();return d&&(d==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||d==="textarea"||o.contentEditable==="true")}var sq=uo&&"documentMode"in document&&11>=document.documentMode,Qc=null,F0=null,_f=null,U0=!1;function eA(o,d,m){var C=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;U0||Qc==null||Qc!==Jo(C)||(C=Qc,"selectionStart"in C&&$0(C)?C={start:C.selectionStart,end:C.selectionEnd}:(C=(C.ownerDocument&&C.ownerDocument.defaultView||window).getSelection(),C={anchorNode:C.anchorNode,anchorOffset:C.anchorOffset,focusNode:C.focusNode,focusOffset:C.focusOffset}),_f&&bf(_f,C)||(_f=C,C=dg(F0,"onSelect"),0<C.length&&(d=new xm("onSelect","select",null,d,m),o.push({event:d,listeners:C}),d.target=Qc)))}function pl(o,d){var m={};return m[o.toLowerCase()]=d.toLowerCase(),m["Webkit"+o]="webkit"+d,m["Moz"+o]="moz"+d,m}var Zc={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},V0={},tA={};uo&&(tA=document.createElement("div").style,"AnimationEvent"in window||(delete Zc.animationend.animation,delete Zc.animationiteration.animation,delete Zc.animationstart.animation),"TransitionEvent"in window||delete Zc.transitionend.transition);function ml(o){if(V0[o])return V0[o];if(!Zc[o])return o;var d=Zc[o],m;for(m in d)if(d.hasOwnProperty(m)&&m in tA)return V0[o]=d[m];return o}var nA=ml("animationend"),rA=ml("animationiteration"),iA=ml("animationstart"),oq=ml("transitionrun"),aq=ml("transitionstart"),lq=ml("transitioncancel"),sA=ml("transitionend"),oA=new Map,q0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");q0.push("scrollEnd");function cs(o,d){oA.set(o,d),ci(d,[o])}var Cm=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Ai=[],Jc=0,W0=0;function Em(){for(var o=Jc,d=W0=Jc=0;d<o;){var m=Ai[d];Ai[d++]=null;var C=Ai[d];Ai[d++]=null;var P=Ai[d];Ai[d++]=null;var M=Ai[d];if(Ai[d++]=null,C!==null&&P!==null){var q=C.pending;q===null?P.next=P:(P.next=q.next,q.next=P),C.pending=P}M!==0&&aA(m,P,M)}}function Tm(o,d,m,C){Ai[Jc++]=o,Ai[Jc++]=d,Ai[Jc++]=m,Ai[Jc++]=C,W0|=C,o.lanes|=C,o=o.alternate,o!==null&&(o.lanes|=C)}function G0(o,d,m,C){return Tm(o,d,m,C),km(o)}function gl(o,d){return Tm(o,null,null,d),km(o)}function aA(o,d,m){o.lanes|=m;var C=o.alternate;C!==null&&(C.lanes|=m);for(var P=!1,M=o.return;M!==null;)M.childLanes|=m,C=M.alternate,C!==null&&(C.childLanes|=m),M.tag===22&&(o=M.stateNode,o===null||o._visibility&1||(P=!0)),o=M,M=M.return;return o.tag===3?(M=o.stateNode,P&&d!==null&&(P=31-dt(m),o=M.hiddenUpdates,C=o[P],C===null?o[P]=[d]:C.push(d),d.lane=m|536870912),M):null}function km(o){if(50<Ff)throw Ff=0,n1=null,Error(r(185));for(var d=o.return;d!==null;)o=d,d=o.return;return o.tag===3?o.stateNode:null}var eu={};function cq(o,d,m,C){this.tag=o,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=C,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fi(o,d,m,C){return new cq(o,d,m,C)}function K0(o){return o=o.prototype,!(!o||!o.isReactComponent)}function fo(o,d){var m=o.alternate;return m===null?(m=fi(o.tag,d,o.key,o.mode),m.elementType=o.elementType,m.type=o.type,m.stateNode=o.stateNode,m.alternate=o,o.alternate=m):(m.pendingProps=d,m.type=o.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=o.flags&65011712,m.childLanes=o.childLanes,m.lanes=o.lanes,m.child=o.child,m.memoizedProps=o.memoizedProps,m.memoizedState=o.memoizedState,m.updateQueue=o.updateQueue,d=o.dependencies,m.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},m.sibling=o.sibling,m.index=o.index,m.ref=o.ref,m.refCleanup=o.refCleanup,m}function lA(o,d){o.flags&=65011714;var m=o.alternate;return m===null?(o.childLanes=0,o.lanes=d,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=m.childLanes,o.lanes=m.lanes,o.child=m.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=m.memoizedProps,o.memoizedState=m.memoizedState,o.updateQueue=m.updateQueue,o.type=m.type,d=m.dependencies,o.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),o}function Om(o,d,m,C,P,M){var q=0;if(C=o,typeof o=="function")K0(o)&&(q=1);else if(typeof o=="string")q=pW(o,m,X.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case L:return o=fi(31,m,d,P),o.elementType=L,o.lanes=M,o;case x:return vl(m.children,P,M,d);case g:q=8,P|=24;break;case b:return o=fi(12,m,d,P|2),o.elementType=b,o.lanes=M,o;case E:return o=fi(13,m,d,P),o.elementType=E,o.lanes=M,o;case k:return o=fi(19,m,d,P),o.elementType=k,o.lanes=M,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case _:q=10;break e;case y:q=9;break e;case T:q=11;break e;case A:q=14;break e;case R:q=16,C=null;break e}q=29,m=Error(r(130,o===null?"null":typeof o,"")),C=null}return d=fi(q,m,d,P),d.elementType=o,d.type=C,d.lanes=M,d}function vl(o,d,m,C){return o=fi(7,o,C,d),o.lanes=m,o}function Y0(o,d,m){return o=fi(6,o,null,d),o.lanes=m,o}function cA(o){var d=fi(18,null,null,0);return d.stateNode=o,d}function X0(o,d,m){return d=fi(4,o.children!==null?o.children:[],o.key,d),d.lanes=m,d.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},d}var uA=new WeakMap;function Pi(o,d){if(typeof o=="object"&&o!==null){var m=uA.get(o);return m!==void 0?m:(d={value:o,source:d,stack:Ie(d)},uA.set(o,d),d)}return{value:o,source:d,stack:Ie(d)}}var tu=[],nu=0,Rm=null,xf=0,Mi=[],Li=0,na=null,As=1,Ps="";function ho(o,d){tu[nu++]=xf,tu[nu++]=Rm,Rm=o,xf=d}function dA(o,d,m){Mi[Li++]=As,Mi[Li++]=Ps,Mi[Li++]=na,na=o;var C=As;o=Ps;var P=32-dt(C)-1;C&=~(1<<P),m+=1;var M=32-dt(d)+P;if(30<M){var q=P-P%5;M=(C&(1<<q)-1).toString(32),C>>=q,P-=q,As=1<<32-dt(d)+P|m<<P|C,Ps=M+o}else As=1<<M|m<<P|C,Ps=o}function Q0(o){o.return!==null&&(ho(o,1),dA(o,1,0))}function Z0(o){for(;o===Rm;)Rm=tu[--nu],tu[nu]=null,xf=tu[--nu],tu[nu]=null;for(;o===na;)na=Mi[--Li],Mi[Li]=null,Ps=Mi[--Li],Mi[Li]=null,As=Mi[--Li],Mi[Li]=null}function fA(o,d){Mi[Li++]=As,Mi[Li++]=Ps,Mi[Li++]=na,As=d.id,Ps=d.overflow,na=o}var gr=null,fn=null,Nt=!1,ra=null,ji=!1,J0=Error(r(519));function ia(o){var d=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sf(Pi(d,o)),J0}function hA(o){var d=o.stateNode,m=o.type,C=o.memoizedProps;switch(d[Ln]=o,d[jn]=C,m){case"dialog":Pt("cancel",d),Pt("close",d);break;case"iframe":case"object":case"embed":Pt("load",d);break;case"video":case"audio":for(m=0;m<Vf.length;m++)Pt(Vf[m],d);break;case"source":Pt("error",d);break;case"img":case"image":case"link":Pt("error",d),Pt("load",d);break;case"details":Pt("toggle",d);break;case"input":Pt("invalid",d),mm(d,C.value,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name,!0);break;case"select":Pt("invalid",d);break;case"textarea":Pt("invalid",d),Ve(d,C.value,C.defaultValue,C.children)}m=C.children,typeof m!="string"&&typeof m!="number"&&typeof m!="bigint"||d.textContent===""+m||C.suppressHydrationWarning===!0||AM(d.textContent,m)?(C.popover!=null&&(Pt("beforetoggle",d),Pt("toggle",d)),C.onScroll!=null&&Pt("scroll",d),C.onScrollEnd!=null&&Pt("scrollend",d),C.onClick!=null&&(d.onclick=ls),d=!0):d=!1,d||ia(o,!0)}function pA(o){for(gr=o.return;gr;)switch(gr.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:gr=gr.return}}function ru(o){if(o!==gr)return!1;if(!Nt)return pA(o),Nt=!0,!1;var d=o.tag,m;if((m=d!==3&&d!==27)&&((m=d===5)&&(m=o.type,m=!(m!=="form"&&m!=="button")||v1(o.type,o.memoizedProps)),m=!m),m&&fn&&ia(o),pA(o),d===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));fn=zM(o)}else if(d===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));fn=zM(o)}else d===27?(d=fn,ya(o.type)?(o=S1,S1=null,fn=o):fn=d):fn=gr?Ii(o.stateNode.nextSibling):null;return!0}function yl(){fn=gr=null,Nt=!1}function e_(){var o=ra;return o!==null&&(Qr===null?Qr=o:Qr.push.apply(Qr,o),ra=null),o}function Sf(o){ra===null?ra=[o]:ra.push(o)}var t_=j(null),bl=null,po=null;function sa(o,d,m){V(t_,d._currentValue),d._currentValue=m}function mo(o){o._currentValue=t_.current,B(t_)}function n_(o,d,m){for(;o!==null;){var C=o.alternate;if((o.childLanes&d)!==d?(o.childLanes|=d,C!==null&&(C.childLanes|=d)):C!==null&&(C.childLanes&d)!==d&&(C.childLanes|=d),o===m)break;o=o.return}}function r_(o,d,m,C){var P=o.child;for(P!==null&&(P.return=o);P!==null;){var M=P.dependencies;if(M!==null){var q=P.child;M=M.firstContext;e:for(;M!==null;){var Z=M;M=P;for(var ae=0;ae<d.length;ae++)if(Z.context===d[ae]){M.lanes|=m,Z=M.alternate,Z!==null&&(Z.lanes|=m),n_(M.return,m,o),C||(q=null);break e}M=Z.next}}else if(P.tag===18){if(q=P.return,q===null)throw Error(r(341));q.lanes|=m,M=q.alternate,M!==null&&(M.lanes|=m),n_(q,m,o),q=null}else q=P.child;if(q!==null)q.return=P;else for(q=P;q!==null;){if(q===o){q=null;break}if(P=q.sibling,P!==null){P.return=q.return,q=P;break}q=q.return}P=q}}function iu(o,d,m,C){o=null;for(var P=d,M=!1;P!==null;){if(!M){if((P.flags&524288)!==0)M=!0;else if((P.flags&262144)!==0)break}if(P.tag===10){var q=P.alternate;if(q===null)throw Error(r(387));if(q=q.memoizedProps,q!==null){var Z=P.type;di(P.pendingProps.value,q.value)||(o!==null?o.push(Z):o=[Z])}}else if(P===Q.current){if(q=P.alternate,q===null)throw Error(r(387));q.memoizedState.memoizedState!==P.memoizedState.memoizedState&&(o!==null?o.push(Yf):o=[Yf])}P=P.return}o!==null&&r_(d,o,m,C),d.flags|=262144}function Am(o){for(o=o.firstContext;o!==null;){if(!di(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function _l(o){bl=o,po=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function vr(o){return mA(bl,o)}function Pm(o,d){return bl===null&&_l(o),mA(o,d)}function mA(o,d){var m=d._currentValue;if(d={context:d,memoizedValue:m,next:null},po===null){if(o===null)throw Error(r(308));po=d,o.dependencies={lanes:0,firstContext:d},o.flags|=524288}else po=po.next=d;return m}var uq=typeof AbortController<"u"?AbortController:function(){var o=[],d=this.signal={aborted:!1,addEventListener:function(m,C){o.push(C)}};this.abort=function(){d.aborted=!0,o.forEach(function(m){return m()})}},dq=e.unstable_scheduleCallback,fq=e.unstable_NormalPriority,Nn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function i_(){return{controller:new uq,data:new Map,refCount:0}}function wf(o){o.refCount--,o.refCount===0&&dq(fq,function(){o.controller.abort()})}var Cf=null,s_=0,su=0,ou=null;function hq(o,d){if(Cf===null){var m=Cf=[];s_=0,su=l1(),ou={status:"pending",value:void 0,then:function(C){m.push(C)}}}return s_++,d.then(gA,gA),d}function gA(){if(--s_===0&&Cf!==null){ou!==null&&(ou.status="fulfilled");var o=Cf;Cf=null,su=0,ou=null;for(var d=0;d<o.length;d++)(0,o[d])()}}function pq(o,d){var m=[],C={status:"pending",value:null,reason:null,then:function(P){m.push(P)}};return o.then(function(){C.status="fulfilled",C.value=d;for(var P=0;P<m.length;P++)(0,m[P])(d)},function(P){for(C.status="rejected",C.reason=P,P=0;P<m.length;P++)(0,m[P])(void 0)}),C}var vA=H.S;H.S=function(o,d){eM=Ae(),typeof d=="object"&&d!==null&&typeof d.then=="function"&&hq(o,d),vA!==null&&vA(o,d)};var xl=j(null);function o_(){var o=xl.current;return o!==null?o:on.pooledCache}function Mm(o,d){d===null?V(xl,xl.current):V(xl,d.pool)}function yA(){var o=o_();return o===null?null:{parent:Nn._currentValue,pool:o}}var au=Error(r(460)),a_=Error(r(474)),Lm=Error(r(542)),jm={then:function(){}};function bA(o){return o=o.status,o==="fulfilled"||o==="rejected"}function _A(o,d,m){switch(m=o[m],m===void 0?o.push(d):m!==d&&(d.then(ls,ls),d=m),d.status){case"fulfilled":return d.value;case"rejected":throw o=d.reason,SA(o),o;default:if(typeof d.status=="string")d.then(ls,ls);else{if(o=on,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=d,o.status="pending",o.then(function(C){if(d.status==="pending"){var P=d;P.status="fulfilled",P.value=C}},function(C){if(d.status==="pending"){var P=d;P.status="rejected",P.reason=C}})}switch(d.status){case"fulfilled":return d.value;case"rejected":throw o=d.reason,SA(o),o}throw wl=d,au}}function Sl(o){try{var d=o._init;return d(o._payload)}catch(m){throw m!==null&&typeof m=="object"&&typeof m.then=="function"?(wl=m,au):m}}var wl=null;function xA(){if(wl===null)throw Error(r(459));var o=wl;return wl=null,o}function SA(o){if(o===au||o===Lm)throw Error(r(483))}var lu=null,Ef=0;function Dm(o){var d=Ef;return Ef+=1,lu===null&&(lu=[]),_A(lu,o,d)}function Tf(o,d){d=d.props.ref,o.ref=d!==void 0?d:null}function Im(o,d){throw d.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(d),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":o)))}function wA(o){function d(he,ce){if(o){var ge=he.deletions;ge===null?(he.deletions=[ce],he.flags|=16):ge.push(ce)}}function m(he,ce){if(!o)return null;for(;ce!==null;)d(he,ce),ce=ce.sibling;return null}function C(he){for(var ce=new Map;he!==null;)he.key!==null?ce.set(he.key,he):ce.set(he.index,he),he=he.sibling;return ce}function P(he,ce){return he=fo(he,ce),he.index=0,he.sibling=null,he}function M(he,ce,ge){return he.index=ge,o?(ge=he.alternate,ge!==null?(ge=ge.index,ge<ce?(he.flags|=67108866,ce):ge):(he.flags|=67108866,ce)):(he.flags|=1048576,ce)}function q(he){return o&&he.alternate===null&&(he.flags|=67108866),he}function Z(he,ce,ge,Me){return ce===null||ce.tag!==6?(ce=Y0(ge,he.mode,Me),ce.return=he,ce):(ce=P(ce,ge),ce.return=he,ce)}function ae(he,ce,ge,Me){var lt=ge.type;return lt===x?ke(he,ce,ge.props.children,Me,ge.key):ce!==null&&(ce.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===R&&Sl(lt)===ce.type)?(ce=P(ce,ge.props),Tf(ce,ge),ce.return=he,ce):(ce=Om(ge.type,ge.key,ge.props,null,he.mode,Me),Tf(ce,ge),ce.return=he,ce)}function ve(he,ce,ge,Me){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==ge.containerInfo||ce.stateNode.implementation!==ge.implementation?(ce=X0(ge,he.mode,Me),ce.return=he,ce):(ce=P(ce,ge.children||[]),ce.return=he,ce)}function ke(he,ce,ge,Me,lt){return ce===null||ce.tag!==7?(ce=vl(ge,he.mode,Me,lt),ce.return=he,ce):(ce=P(ce,ge),ce.return=he,ce)}function je(he,ce,ge){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return ce=Y0(""+ce,he.mode,ge),ce.return=he,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case v:return ge=Om(ce.type,ce.key,ce.props,null,he.mode,ge),Tf(ge,ce),ge.return=he,ge;case S:return ce=X0(ce,he.mode,ge),ce.return=he,ce;case R:return ce=Sl(ce),je(he,ce,ge)}if(U(ce)||$(ce))return ce=vl(ce,he.mode,ge,null),ce.return=he,ce;if(typeof ce.then=="function")return je(he,Dm(ce),ge);if(ce.$$typeof===_)return je(he,Pm(he,ce),ge);Im(he,ce)}return null}function ye(he,ce,ge,Me){var lt=ce!==null?ce.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return lt!==null?null:Z(he,ce,""+ge,Me);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:return ge.key===lt?ae(he,ce,ge,Me):null;case S:return ge.key===lt?ve(he,ce,ge,Me):null;case R:return ge=Sl(ge),ye(he,ce,ge,Me)}if(U(ge)||$(ge))return lt!==null?null:ke(he,ce,ge,Me,null);if(typeof ge.then=="function")return ye(he,ce,Dm(ge),Me);if(ge.$$typeof===_)return ye(he,ce,Pm(he,ge),Me);Im(he,ge)}return null}function Se(he,ce,ge,Me,lt){if(typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint")return he=he.get(ge)||null,Z(ce,he,""+Me,lt);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case v:return he=he.get(Me.key===null?ge:Me.key)||null,ae(ce,he,Me,lt);case S:return he=he.get(Me.key===null?ge:Me.key)||null,ve(ce,he,Me,lt);case R:return Me=Sl(Me),Se(he,ce,ge,Me,lt)}if(U(Me)||$(Me))return he=he.get(ge)||null,ke(ce,he,Me,lt,null);if(typeof Me.then=="function")return Se(he,ce,ge,Dm(Me),lt);if(Me.$$typeof===_)return Se(he,ce,ge,Pm(ce,Me),lt);Im(ce,Me)}return null}function Ye(he,ce,ge,Me){for(var lt=null,Ht=null,et=ce,St=ce=0,Dt=null;et!==null&&St<ge.length;St++){et.index>St?(Dt=et,et=null):Dt=et.sibling;var $t=ye(he,et,ge[St],Me);if($t===null){et===null&&(et=Dt);break}o&&et&&$t.alternate===null&&d(he,et),ce=M($t,ce,St),Ht===null?lt=$t:Ht.sibling=$t,Ht=$t,et=Dt}if(St===ge.length)return m(he,et),Nt&&ho(he,St),lt;if(et===null){for(;St<ge.length;St++)et=je(he,ge[St],Me),et!==null&&(ce=M(et,ce,St),Ht===null?lt=et:Ht.sibling=et,Ht=et);return Nt&&ho(he,St),lt}for(et=C(et);St<ge.length;St++)Dt=Se(et,he,St,ge[St],Me),Dt!==null&&(o&&Dt.alternate!==null&&et.delete(Dt.key===null?St:Dt.key),ce=M(Dt,ce,St),Ht===null?lt=Dt:Ht.sibling=Dt,Ht=Dt);return o&&et.forEach(function(wa){return d(he,wa)}),Nt&&ho(he,St),lt}function ht(he,ce,ge,Me){if(ge==null)throw Error(r(151));for(var lt=null,Ht=null,et=ce,St=ce=0,Dt=null,$t=ge.next();et!==null&&!$t.done;St++,$t=ge.next()){et.index>St?(Dt=et,et=null):Dt=et.sibling;var wa=ye(he,et,$t.value,Me);if(wa===null){et===null&&(et=Dt);break}o&&et&&wa.alternate===null&&d(he,et),ce=M(wa,ce,St),Ht===null?lt=wa:Ht.sibling=wa,Ht=wa,et=Dt}if($t.done)return m(he,et),Nt&&ho(he,St),lt;if(et===null){for(;!$t.done;St++,$t=ge.next())$t=je(he,$t.value,Me),$t!==null&&(ce=M($t,ce,St),Ht===null?lt=$t:Ht.sibling=$t,Ht=$t);return Nt&&ho(he,St),lt}for(et=C(et);!$t.done;St++,$t=ge.next())$t=Se(et,he,St,$t.value,Me),$t!==null&&(o&&$t.alternate!==null&&et.delete($t.key===null?St:$t.key),ce=M($t,ce,St),Ht===null?lt=$t:Ht.sibling=$t,Ht=$t);return o&&et.forEach(function(EW){return d(he,EW)}),Nt&&ho(he,St),lt}function tn(he,ce,ge,Me){if(typeof ge=="object"&&ge!==null&&ge.type===x&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:e:{for(var lt=ge.key;ce!==null;){if(ce.key===lt){if(lt=ge.type,lt===x){if(ce.tag===7){m(he,ce.sibling),Me=P(ce,ge.props.children),Me.return=he,he=Me;break e}}else if(ce.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===R&&Sl(lt)===ce.type){m(he,ce.sibling),Me=P(ce,ge.props),Tf(Me,ge),Me.return=he,he=Me;break e}m(he,ce);break}else d(he,ce);ce=ce.sibling}ge.type===x?(Me=vl(ge.props.children,he.mode,Me,ge.key),Me.return=he,he=Me):(Me=Om(ge.type,ge.key,ge.props,null,he.mode,Me),Tf(Me,ge),Me.return=he,he=Me)}return q(he);case S:e:{for(lt=ge.key;ce!==null;){if(ce.key===lt)if(ce.tag===4&&ce.stateNode.containerInfo===ge.containerInfo&&ce.stateNode.implementation===ge.implementation){m(he,ce.sibling),Me=P(ce,ge.children||[]),Me.return=he,he=Me;break e}else{m(he,ce);break}else d(he,ce);ce=ce.sibling}Me=X0(ge,he.mode,Me),Me.return=he,he=Me}return q(he);case R:return ge=Sl(ge),tn(he,ce,ge,Me)}if(U(ge))return Ye(he,ce,ge,Me);if($(ge)){if(lt=$(ge),typeof lt!="function")throw Error(r(150));return ge=lt.call(ge),ht(he,ce,ge,Me)}if(typeof ge.then=="function")return tn(he,ce,Dm(ge),Me);if(ge.$$typeof===_)return tn(he,ce,Pm(he,ge),Me);Im(he,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,ce!==null&&ce.tag===6?(m(he,ce.sibling),Me=P(ce,ge),Me.return=he,he=Me):(m(he,ce),Me=Y0(ge,he.mode,Me),Me.return=he,he=Me),q(he)):m(he,ce)}return function(he,ce,ge,Me){try{Ef=0;var lt=tn(he,ce,ge,Me);return lu=null,lt}catch(et){if(et===au||et===Lm)throw et;var Ht=fi(29,et,null,he.mode);return Ht.lanes=Me,Ht.return=he,Ht}}}var Cl=wA(!0),CA=wA(!1),oa=!1;function l_(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function c_(o,d){o=o.updateQueue,d.updateQueue===o&&(d.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function aa(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function la(o,d,m){var C=o.updateQueue;if(C===null)return null;if(C=C.shared,(Vt&2)!==0){var P=C.pending;return P===null?d.next=d:(d.next=P.next,P.next=d),C.pending=d,d=km(o),aA(o,null,m),d}return Tm(o,C,d,m),km(o)}function kf(o,d,m){if(d=d.updateQueue,d!==null&&(d=d.shared,(m&4194048)!==0)){var C=d.lanes;C&=o.pendingLanes,m|=C,d.lanes=m,Zt(o,m)}}function u_(o,d){var m=o.updateQueue,C=o.alternate;if(C!==null&&(C=C.updateQueue,m===C)){var P=null,M=null;if(m=m.firstBaseUpdate,m!==null){do{var q={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};M===null?P=M=q:M=M.next=q,m=m.next}while(m!==null);M===null?P=M=d:M=M.next=d}else P=M=d;m={baseState:C.baseState,firstBaseUpdate:P,lastBaseUpdate:M,shared:C.shared,callbacks:C.callbacks},o.updateQueue=m;return}o=m.lastBaseUpdate,o===null?m.firstBaseUpdate=d:o.next=d,m.lastBaseUpdate=d}var d_=!1;function Of(){if(d_){var o=ou;if(o!==null)throw o}}function Rf(o,d,m,C){d_=!1;var P=o.updateQueue;oa=!1;var M=P.firstBaseUpdate,q=P.lastBaseUpdate,Z=P.shared.pending;if(Z!==null){P.shared.pending=null;var ae=Z,ve=ae.next;ae.next=null,q===null?M=ve:q.next=ve,q=ae;var ke=o.alternate;ke!==null&&(ke=ke.updateQueue,Z=ke.lastBaseUpdate,Z!==q&&(Z===null?ke.firstBaseUpdate=ve:Z.next=ve,ke.lastBaseUpdate=ae))}if(M!==null){var je=P.baseState;q=0,ke=ve=ae=null,Z=M;do{var ye=Z.lane&-536870913,Se=ye!==Z.lane;if(Se?(jt&ye)===ye:(C&ye)===ye){ye!==0&&ye===su&&(d_=!0),ke!==null&&(ke=ke.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var Ye=o,ht=Z;ye=d;var tn=m;switch(ht.tag){case 1:if(Ye=ht.payload,typeof Ye=="function"){je=Ye.call(tn,je,ye);break e}je=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=ht.payload,ye=typeof Ye=="function"?Ye.call(tn,je,ye):Ye,ye==null)break e;je=f({},je,ye);break e;case 2:oa=!0}}ye=Z.callback,ye!==null&&(o.flags|=64,Se&&(o.flags|=8192),Se=P.callbacks,Se===null?P.callbacks=[ye]:Se.push(ye))}else Se={lane:ye,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},ke===null?(ve=ke=Se,ae=je):ke=ke.next=Se,q|=ye;if(Z=Z.next,Z===null){if(Z=P.shared.pending,Z===null)break;Se=Z,Z=Se.next,Se.next=null,P.lastBaseUpdate=Se,P.shared.pending=null}}while(!0);ke===null&&(ae=je),P.baseState=ae,P.firstBaseUpdate=ve,P.lastBaseUpdate=ke,M===null&&(P.shared.lanes=0),ha|=q,o.lanes=q,o.memoizedState=je}}function EA(o,d){if(typeof o!="function")throw Error(r(191,o));o.call(d)}function TA(o,d){var m=o.callbacks;if(m!==null)for(o.callbacks=null,o=0;o<m.length;o++)EA(m[o],d)}var cu=j(null),Nm=j(0);function kA(o,d){o=Co,V(Nm,o),V(cu,d),Co=o|d.baseLanes}function f_(){V(Nm,Co),V(cu,cu.current)}function h_(){Co=Nm.current,B(cu),B(Nm)}var hi=j(null),Di=null;function ca(o){var d=o.alternate;V(On,On.current&1),V(hi,o),Di===null&&(d===null||cu.current!==null||d.memoizedState!==null)&&(Di=o)}function p_(o){V(On,On.current),V(hi,o),Di===null&&(Di=o)}function OA(o){o.tag===22?(V(On,On.current),V(hi,o),Di===null&&(Di=o)):ua()}function ua(){V(On,On.current),V(hi,hi.current)}function pi(o){B(hi),Di===o&&(Di=null),B(On)}var On=j(0);function Bm(o){for(var d=o;d!==null;){if(d.tag===13){var m=d.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||_1(m)||x1(m)))return d}else if(d.tag===19&&(d.memoizedProps.revealOrder==="forwards"||d.memoizedProps.revealOrder==="backwards"||d.memoizedProps.revealOrder==="unstable_legacy-backwards"||d.memoizedProps.revealOrder==="together")){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var go=0,_t=null,Jt=null,Bn=null,zm=!1,uu=!1,El=!1,Hm=0,Af=0,du=null,mq=0;function En(){throw Error(r(321))}function m_(o,d){if(d===null)return!1;for(var m=0;m<d.length&&m<o.length;m++)if(!di(o[m],d[m]))return!1;return!0}function g_(o,d,m,C,P,M){return go=M,_t=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,H.H=o===null||o.memoizedState===null?dP:P_,El=!1,M=m(C,P),El=!1,uu&&(M=AA(d,m,C,P)),RA(o),M}function RA(o){H.H=Lf;var d=Jt!==null&&Jt.next!==null;if(go=0,Bn=Jt=_t=null,zm=!1,Af=0,du=null,d)throw Error(r(300));o===null||zn||(o=o.dependencies,o!==null&&Am(o)&&(zn=!0))}function AA(o,d,m,C){_t=o;var P=0;do{if(uu&&(du=null),Af=0,uu=!1,25<=P)throw Error(r(301));if(P+=1,Bn=Jt=null,o.updateQueue!=null){var M=o.updateQueue;M.lastEffect=null,M.events=null,M.stores=null,M.memoCache!=null&&(M.memoCache.index=0)}H.H=fP,M=d(m,C)}while(uu);return M}function gq(){var o=H.H,d=o.useState()[0];return d=typeof d.then=="function"?Pf(d):d,o=o.useState()[0],(Jt!==null?Jt.memoizedState:null)!==o&&(_t.flags|=1024),d}function v_(){var o=Hm!==0;return Hm=0,o}function y_(o,d,m){d.updateQueue=o.updateQueue,d.flags&=-2053,o.lanes&=~m}function b_(o){if(zm){for(o=o.memoizedState;o!==null;){var d=o.queue;d!==null&&(d.pending=null),o=o.next}zm=!1}go=0,Bn=Jt=_t=null,uu=!1,Af=Hm=0,du=null}function zr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bn===null?_t.memoizedState=Bn=o:Bn=Bn.next=o,Bn}function Rn(){if(Jt===null){var o=_t.alternate;o=o!==null?o.memoizedState:null}else o=Jt.next;var d=Bn===null?_t.memoizedState:Bn.next;if(d!==null)Bn=d,Jt=o;else{if(o===null)throw _t.alternate===null?Error(r(467)):Error(r(310));Jt=o,o={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},Bn===null?_t.memoizedState=Bn=o:Bn=Bn.next=o}return Bn}function $m(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pf(o){var d=Af;return Af+=1,du===null&&(du=[]),o=_A(du,o,d),d=_t,(Bn===null?d.memoizedState:Bn.next)===null&&(d=d.alternate,H.H=d===null||d.memoizedState===null?dP:P_),o}function Fm(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Pf(o);if(o.$$typeof===_)return vr(o)}throw Error(r(438,String(o)))}function __(o){var d=null,m=_t.updateQueue;if(m!==null&&(d=m.memoCache),d==null){var C=_t.alternate;C!==null&&(C=C.updateQueue,C!==null&&(C=C.memoCache,C!=null&&(d={data:C.data.map(function(P){return P.slice()}),index:0})))}if(d==null&&(d={data:[],index:0}),m===null&&(m=$m(),_t.updateQueue=m),m.memoCache=d,m=d.data[d.index],m===void 0)for(m=d.data[d.index]=Array(o),C=0;C<o;C++)m[C]=z;return d.index++,m}function vo(o,d){return typeof d=="function"?d(o):d}function Um(o){var d=Rn();return x_(d,Jt,o)}function x_(o,d,m){var C=o.queue;if(C===null)throw Error(r(311));C.lastRenderedReducer=m;var P=o.baseQueue,M=C.pending;if(M!==null){if(P!==null){var q=P.next;P.next=M.next,M.next=q}d.baseQueue=P=M,C.pending=null}if(M=o.baseState,P===null)o.memoizedState=M;else{d=P.next;var Z=q=null,ae=null,ve=d,ke=!1;do{var je=ve.lane&-536870913;if(je!==ve.lane?(jt&je)===je:(go&je)===je){var ye=ve.revertLane;if(ye===0)ae!==null&&(ae=ae.next={lane:0,revertLane:0,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),je===su&&(ke=!0);else if((go&ye)===ye){ve=ve.next,ye===su&&(ke=!0);continue}else je={lane:0,revertLane:ve.revertLane,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},ae===null?(Z=ae=je,q=M):ae=ae.next=je,_t.lanes|=ye,ha|=ye;je=ve.action,El&&m(M,je),M=ve.hasEagerState?ve.eagerState:m(M,je)}else ye={lane:je,revertLane:ve.revertLane,gesture:ve.gesture,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},ae===null?(Z=ae=ye,q=M):ae=ae.next=ye,_t.lanes|=je,ha|=je;ve=ve.next}while(ve!==null&&ve!==d);if(ae===null?q=M:ae.next=Z,!di(M,o.memoizedState)&&(zn=!0,ke&&(m=ou,m!==null)))throw m;o.memoizedState=M,o.baseState=q,o.baseQueue=ae,C.lastRenderedState=M}return P===null&&(C.lanes=0),[o.memoizedState,C.dispatch]}function S_(o){var d=Rn(),m=d.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=o;var C=m.dispatch,P=m.pending,M=d.memoizedState;if(P!==null){m.pending=null;var q=P=P.next;do M=o(M,q.action),q=q.next;while(q!==P);di(M,d.memoizedState)||(zn=!0),d.memoizedState=M,d.baseQueue===null&&(d.baseState=M),m.lastRenderedState=M}return[M,C]}function PA(o,d,m){var C=_t,P=Rn(),M=Nt;if(M){if(m===void 0)throw Error(r(407));m=m()}else m=d();var q=!di((Jt||P).memoizedState,m);if(q&&(P.memoizedState=m,zn=!0),P=P.queue,E_(jA.bind(null,C,P,o),[o]),P.getSnapshot!==d||q||Bn!==null&&Bn.memoizedState.tag&1){if(C.flags|=2048,fu(9,{destroy:void 0},LA.bind(null,C,P,m,d),null),on===null)throw Error(r(349));M||(go&127)!==0||MA(C,d,m)}return m}function MA(o,d,m){o.flags|=16384,o={getSnapshot:d,value:m},d=_t.updateQueue,d===null?(d=$m(),_t.updateQueue=d,d.stores=[o]):(m=d.stores,m===null?d.stores=[o]:m.push(o))}function LA(o,d,m,C){d.value=m,d.getSnapshot=C,DA(d)&&IA(o)}function jA(o,d,m){return m(function(){DA(d)&&IA(o)})}function DA(o){var d=o.getSnapshot;o=o.value;try{var m=d();return!di(o,m)}catch{return!0}}function IA(o){var d=gl(o,2);d!==null&&Zr(d,o,2)}function w_(o){var d=zr();if(typeof o=="function"){var m=o;if(o=m(),El){it(!0);try{m()}finally{it(!1)}}}return d.memoizedState=d.baseState=o,d.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vo,lastRenderedState:o},d}function NA(o,d,m,C){return o.baseState=m,x_(o,Jt,typeof C=="function"?C:vo)}function vq(o,d,m,C,P){if(Wm(o))throw Error(r(485));if(o=d.action,o!==null){var M={payload:P,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(q){M.listeners.push(q)}};H.T!==null?m(!0):M.isTransition=!1,C(M),m=d.pending,m===null?(M.next=d.pending=M,BA(d,M)):(M.next=m.next,d.pending=m.next=M)}}function BA(o,d){var m=d.action,C=d.payload,P=o.state;if(d.isTransition){var M=H.T,q={};H.T=q;try{var Z=m(P,C),ae=H.S;ae!==null&&ae(q,Z),zA(o,d,Z)}catch(ve){C_(o,d,ve)}finally{M!==null&&q.types!==null&&(M.types=q.types),H.T=M}}else try{M=m(P,C),zA(o,d,M)}catch(ve){C_(o,d,ve)}}function zA(o,d,m){m!==null&&typeof m=="object"&&typeof m.then=="function"?m.then(function(C){HA(o,d,C)},function(C){return C_(o,d,C)}):HA(o,d,m)}function HA(o,d,m){d.status="fulfilled",d.value=m,$A(d),o.state=m,d=o.pending,d!==null&&(m=d.next,m===d?o.pending=null:(m=m.next,d.next=m,BA(o,m)))}function C_(o,d,m){var C=o.pending;if(o.pending=null,C!==null){C=C.next;do d.status="rejected",d.reason=m,$A(d),d=d.next;while(d!==C)}o.action=null}function $A(o){o=o.listeners;for(var d=0;d<o.length;d++)(0,o[d])()}function FA(o,d){return d}function UA(o,d){if(Nt){var m=on.formState;if(m!==null){e:{var C=_t;if(Nt){if(fn){t:{for(var P=fn,M=ji;P.nodeType!==8;){if(!M){P=null;break t}if(P=Ii(P.nextSibling),P===null){P=null;break t}}M=P.data,P=M==="F!"||M==="F"?P:null}if(P){fn=Ii(P.nextSibling),C=P.data==="F!";break e}}ia(C)}C=!1}C&&(d=m[0])}}return m=zr(),m.memoizedState=m.baseState=d,C={pending:null,lanes:0,dispatch:null,lastRenderedReducer:FA,lastRenderedState:d},m.queue=C,m=lP.bind(null,_t,C),C.dispatch=m,C=w_(!1),M=A_.bind(null,_t,!1,C.queue),C=zr(),P={state:d,dispatch:null,action:o,pending:null},C.queue=P,m=vq.bind(null,_t,P,M,m),P.dispatch=m,C.memoizedState=o,[d,m,!1]}function VA(o){var d=Rn();return qA(d,Jt,o)}function qA(o,d,m){if(d=x_(o,d,FA)[0],o=Um(vo)[0],typeof d=="object"&&d!==null&&typeof d.then=="function")try{var C=Pf(d)}catch(q){throw q===au?Lm:q}else C=d;d=Rn();var P=d.queue,M=P.dispatch;return m!==d.memoizedState&&(_t.flags|=2048,fu(9,{destroy:void 0},yq.bind(null,P,m),null)),[C,M,o]}function yq(o,d){o.action=d}function WA(o){var d=Rn(),m=Jt;if(m!==null)return qA(d,m,o);Rn(),d=d.memoizedState,m=Rn();var C=m.queue.dispatch;return m.memoizedState=o,[d,C,!1]}function fu(o,d,m,C){return o={tag:o,create:m,deps:C,inst:d,next:null},d=_t.updateQueue,d===null&&(d=$m(),_t.updateQueue=d),m=d.lastEffect,m===null?d.lastEffect=o.next=o:(C=m.next,m.next=o,o.next=C,d.lastEffect=o),o}function GA(){return Rn().memoizedState}function Vm(o,d,m,C){var P=zr();_t.flags|=o,P.memoizedState=fu(1|d,{destroy:void 0},m,C===void 0?null:C)}function qm(o,d,m,C){var P=Rn();C=C===void 0?null:C;var M=P.memoizedState.inst;Jt!==null&&C!==null&&m_(C,Jt.memoizedState.deps)?P.memoizedState=fu(d,M,m,C):(_t.flags|=o,P.memoizedState=fu(1|d,M,m,C))}function KA(o,d){Vm(8390656,8,o,d)}function E_(o,d){qm(2048,8,o,d)}function bq(o){_t.flags|=4;var d=_t.updateQueue;if(d===null)d=$m(),_t.updateQueue=d,d.events=[o];else{var m=d.events;m===null?d.events=[o]:m.push(o)}}function YA(o){var d=Rn().memoizedState;return bq({ref:d,nextImpl:o}),function(){if((Vt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}function XA(o,d){return qm(4,2,o,d)}function QA(o,d){return qm(4,4,o,d)}function ZA(o,d){if(typeof d=="function"){o=o();var m=d(o);return function(){typeof m=="function"?m():d(null)}}if(d!=null)return o=o(),d.current=o,function(){d.current=null}}function JA(o,d,m){m=m!=null?m.concat([o]):null,qm(4,4,ZA.bind(null,d,o),m)}function T_(){}function eP(o,d){var m=Rn();d=d===void 0?null:d;var C=m.memoizedState;return d!==null&&m_(d,C[1])?C[0]:(m.memoizedState=[o,d],o)}function tP(o,d){var m=Rn();d=d===void 0?null:d;var C=m.memoizedState;if(d!==null&&m_(d,C[1]))return C[0];if(C=o(),El){it(!0);try{o()}finally{it(!1)}}return m.memoizedState=[C,d],C}function k_(o,d,m){return m===void 0||(go&1073741824)!==0&&(jt&261930)===0?o.memoizedState=d:(o.memoizedState=m,o=nM(),_t.lanes|=o,ha|=o,m)}function nP(o,d,m,C){return di(m,d)?m:cu.current!==null?(o=k_(o,m,C),di(o,d)||(zn=!0),o):(go&42)===0||(go&1073741824)!==0&&(jt&261930)===0?(zn=!0,o.memoizedState=m):(o=nM(),_t.lanes|=o,ha|=o,d)}function rP(o,d,m,C,P){var M=K.p;K.p=M!==0&&8>M?M:8;var q=H.T,Z={};H.T=Z,A_(o,!1,d,m);try{var ae=P(),ve=H.S;if(ve!==null&&ve(Z,ae),ae!==null&&typeof ae=="object"&&typeof ae.then=="function"){var ke=pq(ae,C);Mf(o,d,ke,vi(o))}else Mf(o,d,C,vi(o))}catch(je){Mf(o,d,{then:function(){},status:"rejected",reason:je},vi())}finally{K.p=M,q!==null&&Z.types!==null&&(q.types=Z.types),H.T=q}}function _q(){}function O_(o,d,m,C){if(o.tag!==5)throw Error(r(476));var P=iP(o).queue;rP(o,P,d,W,m===null?_q:function(){return sP(o),m(C)})}function iP(o){var d=o.memoizedState;if(d!==null)return d;d={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vo,lastRenderedState:W},next:null};var m={};return d.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vo,lastRenderedState:m},next:null},o.memoizedState=d,o=o.alternate,o!==null&&(o.memoizedState=d),d}function sP(o){var d=iP(o);d.next===null&&(d=o.alternate.memoizedState),Mf(o,d.next.queue,{},vi())}function R_(){return vr(Yf)}function oP(){return Rn().memoizedState}function aP(){return Rn().memoizedState}function xq(o){for(var d=o.return;d!==null;){switch(d.tag){case 24:case 3:var m=vi();o=aa(m);var C=la(d,o,m);C!==null&&(Zr(C,d,m),kf(C,d,m)),d={cache:i_()},o.payload=d;return}d=d.return}}function Sq(o,d,m){var C=vi();m={lane:C,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Wm(o)?cP(d,m):(m=G0(o,d,m,C),m!==null&&(Zr(m,o,C),uP(m,d,C)))}function lP(o,d,m){var C=vi();Mf(o,d,m,C)}function Mf(o,d,m,C){var P={lane:C,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Wm(o))cP(d,P);else{var M=o.alternate;if(o.lanes===0&&(M===null||M.lanes===0)&&(M=d.lastRenderedReducer,M!==null))try{var q=d.lastRenderedState,Z=M(q,m);if(P.hasEagerState=!0,P.eagerState=Z,di(Z,q))return Tm(o,d,P,0),on===null&&Em(),!1}catch{}if(m=G0(o,d,P,C),m!==null)return Zr(m,o,C),uP(m,d,C),!0}return!1}function A_(o,d,m,C){if(C={lane:2,revertLane:l1(),gesture:null,action:C,hasEagerState:!1,eagerState:null,next:null},Wm(o)){if(d)throw Error(r(479))}else d=G0(o,m,C,2),d!==null&&Zr(d,o,2)}function Wm(o){var d=o.alternate;return o===_t||d!==null&&d===_t}function cP(o,d){uu=zm=!0;var m=o.pending;m===null?d.next=d:(d.next=m.next,m.next=d),o.pending=d}function uP(o,d,m){if((m&4194048)!==0){var C=d.lanes;C&=o.pendingLanes,m|=C,d.lanes=m,Zt(o,m)}}var Lf={readContext:vr,use:Fm,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useLayoutEffect:En,useInsertionEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useSyncExternalStore:En,useId:En,useHostTransitionStatus:En,useFormState:En,useActionState:En,useOptimistic:En,useMemoCache:En,useCacheRefresh:En};Lf.useEffectEvent=En;var dP={readContext:vr,use:Fm,useCallback:function(o,d){return zr().memoizedState=[o,d===void 0?null:d],o},useContext:vr,useEffect:KA,useImperativeHandle:function(o,d,m){m=m!=null?m.concat([o]):null,Vm(4194308,4,ZA.bind(null,d,o),m)},useLayoutEffect:function(o,d){return Vm(4194308,4,o,d)},useInsertionEffect:function(o,d){Vm(4,2,o,d)},useMemo:function(o,d){var m=zr();d=d===void 0?null:d;var C=o();if(El){it(!0);try{o()}finally{it(!1)}}return m.memoizedState=[C,d],C},useReducer:function(o,d,m){var C=zr();if(m!==void 0){var P=m(d);if(El){it(!0);try{m(d)}finally{it(!1)}}}else P=d;return C.memoizedState=C.baseState=P,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:P},C.queue=o,o=o.dispatch=Sq.bind(null,_t,o),[C.memoizedState,o]},useRef:function(o){var d=zr();return o={current:o},d.memoizedState=o},useState:function(o){o=w_(o);var d=o.queue,m=lP.bind(null,_t,d);return d.dispatch=m,[o.memoizedState,m]},useDebugValue:T_,useDeferredValue:function(o,d){var m=zr();return k_(m,o,d)},useTransition:function(){var o=w_(!1);return o=rP.bind(null,_t,o.queue,!0,!1),zr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,d,m){var C=_t,P=zr();if(Nt){if(m===void 0)throw Error(r(407));m=m()}else{if(m=d(),on===null)throw Error(r(349));(jt&127)!==0||MA(C,d,m)}P.memoizedState=m;var M={value:m,getSnapshot:d};return P.queue=M,KA(jA.bind(null,C,M,o),[o]),C.flags|=2048,fu(9,{destroy:void 0},LA.bind(null,C,M,m,d),null),m},useId:function(){var o=zr(),d=on.identifierPrefix;if(Nt){var m=Ps,C=As;m=(C&~(1<<32-dt(C)-1)).toString(32)+m,d="_"+d+"R_"+m,m=Hm++,0<m&&(d+="H"+m.toString(32)),d+="_"}else m=mq++,d="_"+d+"r_"+m.toString(32)+"_";return o.memoizedState=d},useHostTransitionStatus:R_,useFormState:UA,useActionState:UA,useOptimistic:function(o){var d=zr();d.memoizedState=d.baseState=o;var m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return d.queue=m,d=A_.bind(null,_t,!0,m),m.dispatch=d,[o,d]},useMemoCache:__,useCacheRefresh:function(){return zr().memoizedState=xq.bind(null,_t)},useEffectEvent:function(o){var d=zr(),m={impl:o};return d.memoizedState=m,function(){if((Vt&2)!==0)throw Error(r(440));return m.impl.apply(void 0,arguments)}}},P_={readContext:vr,use:Fm,useCallback:eP,useContext:vr,useEffect:E_,useImperativeHandle:JA,useInsertionEffect:XA,useLayoutEffect:QA,useMemo:tP,useReducer:Um,useRef:GA,useState:function(){return Um(vo)},useDebugValue:T_,useDeferredValue:function(o,d){var m=Rn();return nP(m,Jt.memoizedState,o,d)},useTransition:function(){var o=Um(vo)[0],d=Rn().memoizedState;return[typeof o=="boolean"?o:Pf(o),d]},useSyncExternalStore:PA,useId:oP,useHostTransitionStatus:R_,useFormState:VA,useActionState:VA,useOptimistic:function(o,d){var m=Rn();return NA(m,Jt,o,d)},useMemoCache:__,useCacheRefresh:aP};P_.useEffectEvent=YA;var fP={readContext:vr,use:Fm,useCallback:eP,useContext:vr,useEffect:E_,useImperativeHandle:JA,useInsertionEffect:XA,useLayoutEffect:QA,useMemo:tP,useReducer:S_,useRef:GA,useState:function(){return S_(vo)},useDebugValue:T_,useDeferredValue:function(o,d){var m=Rn();return Jt===null?k_(m,o,d):nP(m,Jt.memoizedState,o,d)},useTransition:function(){var o=S_(vo)[0],d=Rn().memoizedState;return[typeof o=="boolean"?o:Pf(o),d]},useSyncExternalStore:PA,useId:oP,useHostTransitionStatus:R_,useFormState:WA,useActionState:WA,useOptimistic:function(o,d){var m=Rn();return Jt!==null?NA(m,Jt,o,d):(m.baseState=o,[o,m.queue.dispatch])},useMemoCache:__,useCacheRefresh:aP};fP.useEffectEvent=YA;function M_(o,d,m,C){d=o.memoizedState,m=m(C,d),m=m==null?d:f({},d,m),o.memoizedState=m,o.lanes===0&&(o.updateQueue.baseState=m)}var L_={enqueueSetState:function(o,d,m){o=o._reactInternals;var C=vi(),P=aa(C);P.payload=d,m!=null&&(P.callback=m),d=la(o,P,C),d!==null&&(Zr(d,o,C),kf(d,o,C))},enqueueReplaceState:function(o,d,m){o=o._reactInternals;var C=vi(),P=aa(C);P.tag=1,P.payload=d,m!=null&&(P.callback=m),d=la(o,P,C),d!==null&&(Zr(d,o,C),kf(d,o,C))},enqueueForceUpdate:function(o,d){o=o._reactInternals;var m=vi(),C=aa(m);C.tag=2,d!=null&&(C.callback=d),d=la(o,C,m),d!==null&&(Zr(d,o,m),kf(d,o,m))}};function hP(o,d,m,C,P,M,q){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(C,M,q):d.prototype&&d.prototype.isPureReactComponent?!bf(m,C)||!bf(P,M):!0}function pP(o,d,m,C){o=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(m,C),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(m,C),d.state!==o&&L_.enqueueReplaceState(d,d.state,null)}function Tl(o,d){var m=d;if("ref"in d){m={};for(var C in d)C!=="ref"&&(m[C]=d[C])}if(o=o.defaultProps){m===d&&(m=f({},m));for(var P in o)m[P]===void 0&&(m[P]=o[P])}return m}function mP(o){Cm(o)}function gP(o){console.error(o)}function vP(o){Cm(o)}function Gm(o,d){try{var m=o.onUncaughtError;m(d.value,{componentStack:d.stack})}catch(C){setTimeout(function(){throw C})}}function yP(o,d,m){try{var C=o.onCaughtError;C(m.value,{componentStack:m.stack,errorBoundary:d.tag===1?d.stateNode:null})}catch(P){setTimeout(function(){throw P})}}function j_(o,d,m){return m=aa(m),m.tag=3,m.payload={element:null},m.callback=function(){Gm(o,d)},m}function bP(o){return o=aa(o),o.tag=3,o}function _P(o,d,m,C){var P=m.type.getDerivedStateFromError;if(typeof P=="function"){var M=C.value;o.payload=function(){return P(M)},o.callback=function(){yP(d,m,C)}}var q=m.stateNode;q!==null&&typeof q.componentDidCatch=="function"&&(o.callback=function(){yP(d,m,C),typeof P!="function"&&(pa===null?pa=new Set([this]):pa.add(this));var Z=C.stack;this.componentDidCatch(C.value,{componentStack:Z!==null?Z:""})})}function wq(o,d,m,C,P){if(m.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){if(d=m.alternate,d!==null&&iu(d,m,P,!0),m=hi.current,m!==null){switch(m.tag){case 31:case 13:return Di===null?sg():m.alternate===null&&Tn===0&&(Tn=3),m.flags&=-257,m.flags|=65536,m.lanes=P,C===jm?m.flags|=16384:(d=m.updateQueue,d===null?m.updateQueue=new Set([C]):d.add(C),s1(o,C,P)),!1;case 22:return m.flags|=65536,C===jm?m.flags|=16384:(d=m.updateQueue,d===null?(d={transitions:null,markerInstances:null,retryQueue:new Set([C])},m.updateQueue=d):(m=d.retryQueue,m===null?d.retryQueue=new Set([C]):m.add(C)),s1(o,C,P)),!1}throw Error(r(435,m.tag))}return s1(o,C,P),sg(),!1}if(Nt)return d=hi.current,d!==null?((d.flags&65536)===0&&(d.flags|=256),d.flags|=65536,d.lanes=P,C!==J0&&(o=Error(r(422),{cause:C}),Sf(Pi(o,m)))):(C!==J0&&(d=Error(r(423),{cause:C}),Sf(Pi(d,m))),o=o.current.alternate,o.flags|=65536,P&=-P,o.lanes|=P,C=Pi(C,m),P=j_(o.stateNode,C,P),u_(o,P),Tn!==4&&(Tn=2)),!1;var M=Error(r(520),{cause:C});if(M=Pi(M,m),$f===null?$f=[M]:$f.push(M),Tn!==4&&(Tn=2),d===null)return!0;C=Pi(C,m),m=d;do{switch(m.tag){case 3:return m.flags|=65536,o=P&-P,m.lanes|=o,o=j_(m.stateNode,C,o),u_(m,o),!1;case 1:if(d=m.type,M=m.stateNode,(m.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(pa===null||!pa.has(M))))return m.flags|=65536,P&=-P,m.lanes|=P,P=bP(P),_P(P,o,m,C),u_(m,P),!1}m=m.return}while(m!==null);return!1}var D_=Error(r(461)),zn=!1;function yr(o,d,m,C){d.child=o===null?CA(d,null,m,C):Cl(d,o.child,m,C)}function xP(o,d,m,C,P){m=m.render;var M=d.ref;if("ref"in C){var q={};for(var Z in C)Z!=="ref"&&(q[Z]=C[Z])}else q=C;return _l(d),C=g_(o,d,m,q,M,P),Z=v_(),o!==null&&!zn?(y_(o,d,P),yo(o,d,P)):(Nt&&Z&&Q0(d),d.flags|=1,yr(o,d,C,P),d.child)}function SP(o,d,m,C,P){if(o===null){var M=m.type;return typeof M=="function"&&!K0(M)&&M.defaultProps===void 0&&m.compare===null?(d.tag=15,d.type=M,wP(o,d,M,C,P)):(o=Om(m.type,null,C,d,d.mode,P),o.ref=d.ref,o.return=d,d.child=o)}if(M=o.child,!U_(o,P)){var q=M.memoizedProps;if(m=m.compare,m=m!==null?m:bf,m(q,C)&&o.ref===d.ref)return yo(o,d,P)}return d.flags|=1,o=fo(M,C),o.ref=d.ref,o.return=d,d.child=o}function wP(o,d,m,C,P){if(o!==null){var M=o.memoizedProps;if(bf(M,C)&&o.ref===d.ref)if(zn=!1,d.pendingProps=C=M,U_(o,P))(o.flags&131072)!==0&&(zn=!0);else return d.lanes=o.lanes,yo(o,d,P)}return I_(o,d,m,C,P)}function CP(o,d,m,C){var P=C.children,M=o!==null?o.memoizedState:null;if(o===null&&d.stateNode===null&&(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),C.mode==="hidden"){if((d.flags&128)!==0){if(M=M!==null?M.baseLanes|m:m,o!==null){for(C=d.child=o.child,P=0;C!==null;)P=P|C.lanes|C.childLanes,C=C.sibling;C=P&~M}else C=0,d.child=null;return EP(o,d,M,m,C)}if((m&536870912)!==0)d.memoizedState={baseLanes:0,cachePool:null},o!==null&&Mm(d,M!==null?M.cachePool:null),M!==null?kA(d,M):f_(),OA(d);else return C=d.lanes=536870912,EP(o,d,M!==null?M.baseLanes|m:m,m,C)}else M!==null?(Mm(d,M.cachePool),kA(d,M),ua(),d.memoizedState=null):(o!==null&&Mm(d,null),f_(),ua());return yr(o,d,P,m),d.child}function jf(o,d){return o!==null&&o.tag===22||d.stateNode!==null||(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.sibling}function EP(o,d,m,C,P){var M=o_();return M=M===null?null:{parent:Nn._currentValue,pool:M},d.memoizedState={baseLanes:m,cachePool:M},o!==null&&Mm(d,null),f_(),OA(d),o!==null&&iu(o,d,C,!0),d.childLanes=P,null}function Km(o,d){return d=Xm({mode:d.mode,children:d.children},o.mode),d.ref=o.ref,o.child=d,d.return=o,d}function TP(o,d,m){return Cl(d,o.child,null,m),o=Km(d,d.pendingProps),o.flags|=2,pi(d),d.memoizedState=null,o}function Cq(o,d,m){var C=d.pendingProps,P=(d.flags&128)!==0;if(d.flags&=-129,o===null){if(Nt){if(C.mode==="hidden")return o=Km(d,C),d.lanes=536870912,jf(null,o);if(p_(d),(o=fn)?(o=BM(o,ji),o=o!==null&&o.data==="&"?o:null,o!==null&&(d.memoizedState={dehydrated:o,treeContext:na!==null?{id:As,overflow:Ps}:null,retryLane:536870912,hydrationErrors:null},m=cA(o),m.return=d,d.child=m,gr=d,fn=null)):o=null,o===null)throw ia(d);return d.lanes=536870912,null}return Km(d,C)}var M=o.memoizedState;if(M!==null){var q=M.dehydrated;if(p_(d),P)if(d.flags&256)d.flags&=-257,d=TP(o,d,m);else if(d.memoizedState!==null)d.child=o.child,d.flags|=128,d=null;else throw Error(r(558));else if(zn||iu(o,d,m,!1),P=(m&o.childLanes)!==0,zn||P){if(C=on,C!==null&&(q=Yn(C,m),q!==0&&q!==M.retryLane))throw M.retryLane=q,gl(o,q),Zr(C,o,q),D_;sg(),d=TP(o,d,m)}else o=M.treeContext,fn=Ii(q.nextSibling),gr=d,Nt=!0,ra=null,ji=!1,o!==null&&fA(d,o),d=Km(d,C),d.flags|=4096;return d}return o=fo(o.child,{mode:C.mode,children:C.children}),o.ref=d.ref,d.child=o,o.return=d,o}function Ym(o,d){var m=d.ref;if(m===null)o!==null&&o.ref!==null&&(d.flags|=4194816);else{if(typeof m!="function"&&typeof m!="object")throw Error(r(284));(o===null||o.ref!==m)&&(d.flags|=4194816)}}function I_(o,d,m,C,P){return _l(d),m=g_(o,d,m,C,void 0,P),C=v_(),o!==null&&!zn?(y_(o,d,P),yo(o,d,P)):(Nt&&C&&Q0(d),d.flags|=1,yr(o,d,m,P),d.child)}function kP(o,d,m,C,P,M){return _l(d),d.updateQueue=null,m=AA(d,C,m,P),RA(o),C=v_(),o!==null&&!zn?(y_(o,d,M),yo(o,d,M)):(Nt&&C&&Q0(d),d.flags|=1,yr(o,d,m,M),d.child)}function OP(o,d,m,C,P){if(_l(d),d.stateNode===null){var M=eu,q=m.contextType;typeof q=="object"&&q!==null&&(M=vr(q)),M=new m(C,M),d.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,M.updater=L_,d.stateNode=M,M._reactInternals=d,M=d.stateNode,M.props=C,M.state=d.memoizedState,M.refs={},l_(d),q=m.contextType,M.context=typeof q=="object"&&q!==null?vr(q):eu,M.state=d.memoizedState,q=m.getDerivedStateFromProps,typeof q=="function"&&(M_(d,m,q,C),M.state=d.memoizedState),typeof m.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(q=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),q!==M.state&&L_.enqueueReplaceState(M,M.state,null),Rf(d,C,M,P),Of(),M.state=d.memoizedState),typeof M.componentDidMount=="function"&&(d.flags|=4194308),C=!0}else if(o===null){M=d.stateNode;var Z=d.memoizedProps,ae=Tl(m,Z);M.props=ae;var ve=M.context,ke=m.contextType;q=eu,typeof ke=="object"&&ke!==null&&(q=vr(ke));var je=m.getDerivedStateFromProps;ke=typeof je=="function"||typeof M.getSnapshotBeforeUpdate=="function",Z=d.pendingProps!==Z,ke||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(Z||ve!==q)&&pP(d,M,C,q),oa=!1;var ye=d.memoizedState;M.state=ye,Rf(d,C,M,P),Of(),ve=d.memoizedState,Z||ye!==ve||oa?(typeof je=="function"&&(M_(d,m,je,C),ve=d.memoizedState),(ae=oa||hP(d,m,ae,C,ye,ve,q))?(ke||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(d.flags|=4194308)):(typeof M.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=C,d.memoizedState=ve),M.props=C,M.state=ve,M.context=q,C=ae):(typeof M.componentDidMount=="function"&&(d.flags|=4194308),C=!1)}else{M=d.stateNode,c_(o,d),q=d.memoizedProps,ke=Tl(m,q),M.props=ke,je=d.pendingProps,ye=M.context,ve=m.contextType,ae=eu,typeof ve=="object"&&ve!==null&&(ae=vr(ve)),Z=m.getDerivedStateFromProps,(ve=typeof Z=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(q!==je||ye!==ae)&&pP(d,M,C,ae),oa=!1,ye=d.memoizedState,M.state=ye,Rf(d,C,M,P),Of();var Se=d.memoizedState;q!==je||ye!==Se||oa||o!==null&&o.dependencies!==null&&Am(o.dependencies)?(typeof Z=="function"&&(M_(d,m,Z,C),Se=d.memoizedState),(ke=oa||hP(d,m,ke,C,ye,Se,ae)||o!==null&&o.dependencies!==null&&Am(o.dependencies))?(ve||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(C,Se,ae),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(C,Se,ae)),typeof M.componentDidUpdate=="function"&&(d.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof M.componentDidUpdate!="function"||q===o.memoizedProps&&ye===o.memoizedState||(d.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||q===o.memoizedProps&&ye===o.memoizedState||(d.flags|=1024),d.memoizedProps=C,d.memoizedState=Se),M.props=C,M.state=Se,M.context=ae,C=ke):(typeof M.componentDidUpdate!="function"||q===o.memoizedProps&&ye===o.memoizedState||(d.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||q===o.memoizedProps&&ye===o.memoizedState||(d.flags|=1024),C=!1)}return M=C,Ym(o,d),C=(d.flags&128)!==0,M||C?(M=d.stateNode,m=C&&typeof m.getDerivedStateFromError!="function"?null:M.render(),d.flags|=1,o!==null&&C?(d.child=Cl(d,o.child,null,P),d.child=Cl(d,null,m,P)):yr(o,d,m,P),d.memoizedState=M.state,o=d.child):o=yo(o,d,P),o}function RP(o,d,m,C){return yl(),d.flags|=256,yr(o,d,m,C),d.child}var N_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function B_(o){return{baseLanes:o,cachePool:yA()}}function z_(o,d,m){return o=o!==null?o.childLanes&~m:0,d&&(o|=gi),o}function AP(o,d,m){var C=d.pendingProps,P=!1,M=(d.flags&128)!==0,q;if((q=M)||(q=o!==null&&o.memoizedState===null?!1:(On.current&2)!==0),q&&(P=!0,d.flags&=-129),q=(d.flags&32)!==0,d.flags&=-33,o===null){if(Nt){if(P?ca(d):ua(),(o=fn)?(o=BM(o,ji),o=o!==null&&o.data!=="&"?o:null,o!==null&&(d.memoizedState={dehydrated:o,treeContext:na!==null?{id:As,overflow:Ps}:null,retryLane:536870912,hydrationErrors:null},m=cA(o),m.return=d,d.child=m,gr=d,fn=null)):o=null,o===null)throw ia(d);return x1(o)?d.lanes=32:d.lanes=536870912,null}var Z=C.children;return C=C.fallback,P?(ua(),P=d.mode,Z=Xm({mode:"hidden",children:Z},P),C=vl(C,P,m,null),Z.return=d,C.return=d,Z.sibling=C,d.child=Z,C=d.child,C.memoizedState=B_(m),C.childLanes=z_(o,q,m),d.memoizedState=N_,jf(null,C)):(ca(d),H_(d,Z))}var ae=o.memoizedState;if(ae!==null&&(Z=ae.dehydrated,Z!==null)){if(M)d.flags&256?(ca(d),d.flags&=-257,d=$_(o,d,m)):d.memoizedState!==null?(ua(),d.child=o.child,d.flags|=128,d=null):(ua(),Z=C.fallback,P=d.mode,C=Xm({mode:"visible",children:C.children},P),Z=vl(Z,P,m,null),Z.flags|=2,C.return=d,Z.return=d,C.sibling=Z,d.child=C,Cl(d,o.child,null,m),C=d.child,C.memoizedState=B_(m),C.childLanes=z_(o,q,m),d.memoizedState=N_,d=jf(null,C));else if(ca(d),x1(Z)){if(q=Z.nextSibling&&Z.nextSibling.dataset,q)var ve=q.dgst;q=ve,C=Error(r(419)),C.stack="",C.digest=q,Sf({value:C,source:null,stack:null}),d=$_(o,d,m)}else if(zn||iu(o,d,m,!1),q=(m&o.childLanes)!==0,zn||q){if(q=on,q!==null&&(C=Yn(q,m),C!==0&&C!==ae.retryLane))throw ae.retryLane=C,gl(o,C),Zr(q,o,C),D_;_1(Z)||sg(),d=$_(o,d,m)}else _1(Z)?(d.flags|=192,d.child=o.child,d=null):(o=ae.treeContext,fn=Ii(Z.nextSibling),gr=d,Nt=!0,ra=null,ji=!1,o!==null&&fA(d,o),d=H_(d,C.children),d.flags|=4096);return d}return P?(ua(),Z=C.fallback,P=d.mode,ae=o.child,ve=ae.sibling,C=fo(ae,{mode:"hidden",children:C.children}),C.subtreeFlags=ae.subtreeFlags&65011712,ve!==null?Z=fo(ve,Z):(Z=vl(Z,P,m,null),Z.flags|=2),Z.return=d,C.return=d,C.sibling=Z,d.child=C,jf(null,C),C=d.child,Z=o.child.memoizedState,Z===null?Z=B_(m):(P=Z.cachePool,P!==null?(ae=Nn._currentValue,P=P.parent!==ae?{parent:ae,pool:ae}:P):P=yA(),Z={baseLanes:Z.baseLanes|m,cachePool:P}),C.memoizedState=Z,C.childLanes=z_(o,q,m),d.memoizedState=N_,jf(o.child,C)):(ca(d),m=o.child,o=m.sibling,m=fo(m,{mode:"visible",children:C.children}),m.return=d,m.sibling=null,o!==null&&(q=d.deletions,q===null?(d.deletions=[o],d.flags|=16):q.push(o)),d.child=m,d.memoizedState=null,m)}function H_(o,d){return d=Xm({mode:"visible",children:d},o.mode),d.return=o,o.child=d}function Xm(o,d){return o=fi(22,o,null,d),o.lanes=0,o}function $_(o,d,m){return Cl(d,o.child,null,m),o=H_(d,d.pendingProps.children),o.flags|=2,d.memoizedState=null,o}function PP(o,d,m){o.lanes|=d;var C=o.alternate;C!==null&&(C.lanes|=d),n_(o.return,d,m)}function F_(o,d,m,C,P,M){var q=o.memoizedState;q===null?o.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:C,tail:m,tailMode:P,treeForkCount:M}:(q.isBackwards=d,q.rendering=null,q.renderingStartTime=0,q.last=C,q.tail=m,q.tailMode=P,q.treeForkCount=M)}function MP(o,d,m){var C=d.pendingProps,P=C.revealOrder,M=C.tail;C=C.children;var q=On.current,Z=(q&2)!==0;if(Z?(q=q&1|2,d.flags|=128):q&=1,V(On,q),yr(o,d,C,m),C=Nt?xf:0,!Z&&o!==null&&(o.flags&128)!==0)e:for(o=d.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&PP(o,m,d);else if(o.tag===19)PP(o,m,d);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===d)break e;for(;o.sibling===null;){if(o.return===null||o.return===d)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(P){case"forwards":for(m=d.child,P=null;m!==null;)o=m.alternate,o!==null&&Bm(o)===null&&(P=m),m=m.sibling;m=P,m===null?(P=d.child,d.child=null):(P=m.sibling,m.sibling=null),F_(d,!1,P,m,M,C);break;case"backwards":case"unstable_legacy-backwards":for(m=null,P=d.child,d.child=null;P!==null;){if(o=P.alternate,o!==null&&Bm(o)===null){d.child=P;break}o=P.sibling,P.sibling=m,m=P,P=o}F_(d,!0,m,null,M,C);break;case"together":F_(d,!1,null,null,void 0,C);break;default:d.memoizedState=null}return d.child}function yo(o,d,m){if(o!==null&&(d.dependencies=o.dependencies),ha|=d.lanes,(m&d.childLanes)===0)if(o!==null){if(iu(o,d,m,!1),(m&d.childLanes)===0)return null}else return null;if(o!==null&&d.child!==o.child)throw Error(r(153));if(d.child!==null){for(o=d.child,m=fo(o,o.pendingProps),d.child=m,m.return=d;o.sibling!==null;)o=o.sibling,m=m.sibling=fo(o,o.pendingProps),m.return=d;m.sibling=null}return d.child}function U_(o,d){return(o.lanes&d)!==0?!0:(o=o.dependencies,!!(o!==null&&Am(o)))}function Eq(o,d,m){switch(d.tag){case 3:Y(d,d.stateNode.containerInfo),sa(d,Nn,o.memoizedState.cache),yl();break;case 27:case 5:ee(d);break;case 4:Y(d,d.stateNode.containerInfo);break;case 10:sa(d,d.type,d.memoizedProps.value);break;case 31:if(d.memoizedState!==null)return d.flags|=128,p_(d),null;break;case 13:var C=d.memoizedState;if(C!==null)return C.dehydrated!==null?(ca(d),d.flags|=128,null):(m&d.child.childLanes)!==0?AP(o,d,m):(ca(d),o=yo(o,d,m),o!==null?o.sibling:null);ca(d);break;case 19:var P=(o.flags&128)!==0;if(C=(m&d.childLanes)!==0,C||(iu(o,d,m,!1),C=(m&d.childLanes)!==0),P){if(C)return MP(o,d,m);d.flags|=128}if(P=d.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),V(On,On.current),C)break;return null;case 22:return d.lanes=0,CP(o,d,m,d.pendingProps);case 24:sa(d,Nn,o.memoizedState.cache)}return yo(o,d,m)}function LP(o,d,m){if(o!==null)if(o.memoizedProps!==d.pendingProps)zn=!0;else{if(!U_(o,m)&&(d.flags&128)===0)return zn=!1,Eq(o,d,m);zn=(o.flags&131072)!==0}else zn=!1,Nt&&(d.flags&1048576)!==0&&dA(d,xf,d.index);switch(d.lanes=0,d.tag){case 16:e:{var C=d.pendingProps;if(o=Sl(d.elementType),d.type=o,typeof o=="function")K0(o)?(C=Tl(o,C),d.tag=1,d=OP(null,d,o,C,m)):(d.tag=0,d=I_(null,d,o,C,m));else{if(o!=null){var P=o.$$typeof;if(P===T){d.tag=11,d=xP(null,d,o,C,m);break e}else if(P===A){d.tag=14,d=SP(null,d,o,C,m);break e}}throw d=F(o)||o,Error(r(306,d,""))}}return d;case 0:return I_(o,d,d.type,d.pendingProps,m);case 1:return C=d.type,P=Tl(C,d.pendingProps),OP(o,d,C,P,m);case 3:e:{if(Y(d,d.stateNode.containerInfo),o===null)throw Error(r(387));C=d.pendingProps;var M=d.memoizedState;P=M.element,c_(o,d),Rf(d,C,null,m);var q=d.memoizedState;if(C=q.cache,sa(d,Nn,C),C!==M.cache&&r_(d,[Nn],m,!0),Of(),C=q.element,M.isDehydrated)if(M={element:C,isDehydrated:!1,cache:q.cache},d.updateQueue.baseState=M,d.memoizedState=M,d.flags&256){d=RP(o,d,C,m);break e}else if(C!==P){P=Pi(Error(r(424)),d),Sf(P),d=RP(o,d,C,m);break e}else for(o=d.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,fn=Ii(o.firstChild),gr=d,Nt=!0,ra=null,ji=!0,m=CA(d,null,C,m),d.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(yl(),C===P){d=yo(o,d,m);break e}yr(o,d,C,m)}d=d.child}return d;case 26:return Ym(o,d),o===null?(m=VM(d.type,null,d.pendingProps,null))?d.memoizedState=m:Nt||(m=d.type,o=d.pendingProps,C=fg(ie.current).createElement(m),C[Ln]=d,C[jn]=o,br(C,m,o),Dn(C),d.stateNode=C):d.memoizedState=VM(d.type,o.memoizedProps,d.pendingProps,o.memoizedState),null;case 27:return ee(d),o===null&&Nt&&(C=d.stateNode=$M(d.type,d.pendingProps,ie.current),gr=d,ji=!0,P=fn,ya(d.type)?(S1=P,fn=Ii(C.firstChild)):fn=P),yr(o,d,d.pendingProps.children,m),Ym(o,d),o===null&&(d.flags|=4194304),d.child;case 5:return o===null&&Nt&&((P=C=fn)&&(C=tW(C,d.type,d.pendingProps,ji),C!==null?(d.stateNode=C,gr=d,fn=Ii(C.firstChild),ji=!1,P=!0):P=!1),P||ia(d)),ee(d),P=d.type,M=d.pendingProps,q=o!==null?o.memoizedProps:null,C=M.children,v1(P,M)?C=null:q!==null&&v1(P,q)&&(d.flags|=32),d.memoizedState!==null&&(P=g_(o,d,gq,null,null,m),Yf._currentValue=P),Ym(o,d),yr(o,d,C,m),d.child;case 6:return o===null&&Nt&&((o=m=fn)&&(m=nW(m,d.pendingProps,ji),m!==null?(d.stateNode=m,gr=d,fn=null,o=!0):o=!1),o||ia(d)),null;case 13:return AP(o,d,m);case 4:return Y(d,d.stateNode.containerInfo),C=d.pendingProps,o===null?d.child=Cl(d,null,C,m):yr(o,d,C,m),d.child;case 11:return xP(o,d,d.type,d.pendingProps,m);case 7:return yr(o,d,d.pendingProps,m),d.child;case 8:return yr(o,d,d.pendingProps.children,m),d.child;case 12:return yr(o,d,d.pendingProps.children,m),d.child;case 10:return C=d.pendingProps,sa(d,d.type,C.value),yr(o,d,C.children,m),d.child;case 9:return P=d.type._context,C=d.pendingProps.children,_l(d),P=vr(P),C=C(P),d.flags|=1,yr(o,d,C,m),d.child;case 14:return SP(o,d,d.type,d.pendingProps,m);case 15:return wP(o,d,d.type,d.pendingProps,m);case 19:return MP(o,d,m);case 31:return Cq(o,d,m);case 22:return CP(o,d,m,d.pendingProps);case 24:return _l(d),C=vr(Nn),o===null?(P=o_(),P===null&&(P=on,M=i_(),P.pooledCache=M,M.refCount++,M!==null&&(P.pooledCacheLanes|=m),P=M),d.memoizedState={parent:C,cache:P},l_(d),sa(d,Nn,P)):((o.lanes&m)!==0&&(c_(o,d),Rf(d,null,null,m),Of()),P=o.memoizedState,M=d.memoizedState,P.parent!==C?(P={parent:C,cache:C},d.memoizedState=P,d.lanes===0&&(d.memoizedState=d.updateQueue.baseState=P),sa(d,Nn,C)):(C=M.cache,sa(d,Nn,C),C!==P.cache&&r_(d,[Nn],m,!0))),yr(o,d,d.pendingProps.children,m),d.child;case 29:throw d.pendingProps}throw Error(r(156,d.tag))}function bo(o){o.flags|=4}function V_(o,d,m,C,P){if((d=(o.mode&32)!==0)&&(d=!1),d){if(o.flags|=16777216,(P&335544128)===P)if(o.stateNode.complete)o.flags|=8192;else if(oM())o.flags|=8192;else throw wl=jm,a_}else o.flags&=-16777217}function jP(o,d){if(d.type!=="stylesheet"||(d.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!YM(d))if(oM())o.flags|=8192;else throw wl=jm,a_}function Qm(o,d){d!==null&&(o.flags|=4),o.flags&16384&&(d=o.tag!==22?ct():536870912,o.lanes|=d,gu|=d)}function Df(o,d){if(!Nt)switch(o.tailMode){case"hidden":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?o.tail=null:m.sibling=null;break;case"collapsed":m=o.tail;for(var C=null;m!==null;)m.alternate!==null&&(C=m),m=m.sibling;C===null?d||o.tail===null?o.tail=null:o.tail.sibling=null:C.sibling=null}}function hn(o){var d=o.alternate!==null&&o.alternate.child===o.child,m=0,C=0;if(d)for(var P=o.child;P!==null;)m|=P.lanes|P.childLanes,C|=P.subtreeFlags&65011712,C|=P.flags&65011712,P.return=o,P=P.sibling;else for(P=o.child;P!==null;)m|=P.lanes|P.childLanes,C|=P.subtreeFlags,C|=P.flags,P.return=o,P=P.sibling;return o.subtreeFlags|=C,o.childLanes=m,d}function Tq(o,d,m){var C=d.pendingProps;switch(Z0(d),d.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(d),null;case 1:return hn(d),null;case 3:return m=d.stateNode,C=null,o!==null&&(C=o.memoizedState.cache),d.memoizedState.cache!==C&&(d.flags|=2048),mo(Nn),J(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(ru(d)?bo(d):o===null||o.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,e_())),hn(d),null;case 26:var P=d.type,M=d.memoizedState;return o===null?(bo(d),M!==null?(hn(d),jP(d,M)):(hn(d),V_(d,P,null,C,m))):M?M!==o.memoizedState?(bo(d),hn(d),jP(d,M)):(hn(d),d.flags&=-16777217):(o=o.memoizedProps,o!==C&&bo(d),hn(d),V_(d,P,o,C,m)),null;case 27:if(ne(d),m=ie.current,P=d.type,o!==null&&d.stateNode!=null)o.memoizedProps!==C&&bo(d);else{if(!C){if(d.stateNode===null)throw Error(r(166));return hn(d),null}o=X.current,ru(d)?hA(d):(o=$M(P,C,m),d.stateNode=o,bo(d))}return hn(d),null;case 5:if(ne(d),P=d.type,o!==null&&d.stateNode!=null)o.memoizedProps!==C&&bo(d);else{if(!C){if(d.stateNode===null)throw Error(r(166));return hn(d),null}if(M=X.current,ru(d))hA(d);else{var q=fg(ie.current);switch(M){case 1:M=q.createElementNS("http://www.w3.org/2000/svg",P);break;case 2:M=q.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;default:switch(P){case"svg":M=q.createElementNS("http://www.w3.org/2000/svg",P);break;case"math":M=q.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;case"script":M=q.createElement("div"),M.innerHTML="<script><\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof C.is=="string"?q.createElement("select",{is:C.is}):q.createElement("select"),C.multiple?M.multiple=!0:C.size&&(M.size=C.size);break;default:M=typeof C.is=="string"?q.createElement(P,{is:C.is}):q.createElement(P)}}M[Ln]=d,M[jn]=C;e:for(q=d.child;q!==null;){if(q.tag===5||q.tag===6)M.appendChild(q.stateNode);else if(q.tag!==4&&q.tag!==27&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===d)break e;for(;q.sibling===null;){if(q.return===null||q.return===d)break e;q=q.return}q.sibling.return=q.return,q=q.sibling}d.stateNode=M;e:switch(br(M,P,C),P){case"button":case"input":case"select":case"textarea":C=!!C.autoFocus;break e;case"img":C=!0;break e;default:C=!1}C&&bo(d)}}return hn(d),V_(d,d.type,o===null?null:o.memoizedProps,d.pendingProps,m),null;case 6:if(o&&d.stateNode!=null)o.memoizedProps!==C&&bo(d);else{if(typeof C!="string"&&d.stateNode===null)throw Error(r(166));if(o=ie.current,ru(d)){if(o=d.stateNode,m=d.memoizedProps,C=null,P=gr,P!==null)switch(P.tag){case 27:case 5:C=P.memoizedProps}o[Ln]=d,o=!!(o.nodeValue===m||C!==null&&C.suppressHydrationWarning===!0||AM(o.nodeValue,m)),o||ia(d,!0)}else o=fg(o).createTextNode(C),o[Ln]=d,d.stateNode=o}return hn(d),null;case 31:if(m=d.memoizedState,o===null||o.memoizedState!==null){if(C=ru(d),m!==null){if(o===null){if(!C)throw Error(r(318));if(o=d.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Ln]=d}else yl(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hn(d),o=!1}else m=e_(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=m),o=!0;if(!o)return d.flags&256?(pi(d),d):(pi(d),null);if((d.flags&128)!==0)throw Error(r(558))}return hn(d),null;case 13:if(C=d.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(P=ru(d),C!==null&&C.dehydrated!==null){if(o===null){if(!P)throw Error(r(318));if(P=d.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(r(317));P[Ln]=d}else yl(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hn(d),P=!1}else P=e_(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=P),P=!0;if(!P)return d.flags&256?(pi(d),d):(pi(d),null)}return pi(d),(d.flags&128)!==0?(d.lanes=m,d):(m=C!==null,o=o!==null&&o.memoizedState!==null,m&&(C=d.child,P=null,C.alternate!==null&&C.alternate.memoizedState!==null&&C.alternate.memoizedState.cachePool!==null&&(P=C.alternate.memoizedState.cachePool.pool),M=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(M=C.memoizedState.cachePool.pool),M!==P&&(C.flags|=2048)),m!==o&&m&&(d.child.flags|=8192),Qm(d,d.updateQueue),hn(d),null);case 4:return J(),o===null&&f1(d.stateNode.containerInfo),hn(d),null;case 10:return mo(d.type),hn(d),null;case 19:if(B(On),C=d.memoizedState,C===null)return hn(d),null;if(P=(d.flags&128)!==0,M=C.rendering,M===null)if(P)Df(C,!1);else{if(Tn!==0||o!==null&&(o.flags&128)!==0)for(o=d.child;o!==null;){if(M=Bm(o),M!==null){for(d.flags|=128,Df(C,!1),o=M.updateQueue,d.updateQueue=o,Qm(d,o),d.subtreeFlags=0,o=m,m=d.child;m!==null;)lA(m,o),m=m.sibling;return V(On,On.current&1|2),Nt&&ho(d,C.treeForkCount),d.child}o=o.sibling}C.tail!==null&&Ae()>ng&&(d.flags|=128,P=!0,Df(C,!1),d.lanes=4194304)}else{if(!P)if(o=Bm(M),o!==null){if(d.flags|=128,P=!0,o=o.updateQueue,d.updateQueue=o,Qm(d,o),Df(C,!0),C.tail===null&&C.tailMode==="hidden"&&!M.alternate&&!Nt)return hn(d),null}else 2*Ae()-C.renderingStartTime>ng&&m!==536870912&&(d.flags|=128,P=!0,Df(C,!1),d.lanes=4194304);C.isBackwards?(M.sibling=d.child,d.child=M):(o=C.last,o!==null?o.sibling=M:d.child=M,C.last=M)}return C.tail!==null?(o=C.tail,C.rendering=o,C.tail=o.sibling,C.renderingStartTime=Ae(),o.sibling=null,m=On.current,V(On,P?m&1|2:m&1),Nt&&ho(d,C.treeForkCount),o):(hn(d),null);case 22:case 23:return pi(d),h_(),C=d.memoizedState!==null,o!==null?o.memoizedState!==null!==C&&(d.flags|=8192):C&&(d.flags|=8192),C?(m&536870912)!==0&&(d.flags&128)===0&&(hn(d),d.subtreeFlags&6&&(d.flags|=8192)):hn(d),m=d.updateQueue,m!==null&&Qm(d,m.retryQueue),m=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),C=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(C=d.memoizedState.cachePool.pool),C!==m&&(d.flags|=2048),o!==null&&B(xl),null;case 24:return m=null,o!==null&&(m=o.memoizedState.cache),d.memoizedState.cache!==m&&(d.flags|=2048),mo(Nn),hn(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function kq(o,d){switch(Z0(d),d.tag){case 1:return o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 3:return mo(Nn),J(),o=d.flags,(o&65536)!==0&&(o&128)===0?(d.flags=o&-65537|128,d):null;case 26:case 27:case 5:return ne(d),null;case 31:if(d.memoizedState!==null){if(pi(d),d.alternate===null)throw Error(r(340));yl()}return o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 13:if(pi(d),o=d.memoizedState,o!==null&&o.dehydrated!==null){if(d.alternate===null)throw Error(r(340));yl()}return o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 19:return B(On),null;case 4:return J(),null;case 10:return mo(d.type),null;case 22:case 23:return pi(d),h_(),o!==null&&B(xl),o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 24:return mo(Nn),null;case 25:return null;default:return null}}function DP(o,d){switch(Z0(d),d.tag){case 3:mo(Nn),J();break;case 26:case 27:case 5:ne(d);break;case 4:J();break;case 31:d.memoizedState!==null&&pi(d);break;case 13:pi(d);break;case 19:B(On);break;case 10:mo(d.type);break;case 22:case 23:pi(d),h_(),o!==null&&B(xl);break;case 24:mo(Nn)}}function If(o,d){try{var m=d.updateQueue,C=m!==null?m.lastEffect:null;if(C!==null){var P=C.next;m=P;do{if((m.tag&o)===o){C=void 0;var M=m.create,q=m.inst;C=M(),q.destroy=C}m=m.next}while(m!==P)}}catch(Z){Xt(d,d.return,Z)}}function da(o,d,m){try{var C=d.updateQueue,P=C!==null?C.lastEffect:null;if(P!==null){var M=P.next;C=M;do{if((C.tag&o)===o){var q=C.inst,Z=q.destroy;if(Z!==void 0){q.destroy=void 0,P=d;var ae=m,ve=Z;try{ve()}catch(ke){Xt(P,ae,ke)}}}C=C.next}while(C!==M)}}catch(ke){Xt(d,d.return,ke)}}function IP(o){var d=o.updateQueue;if(d!==null){var m=o.stateNode;try{TA(d,m)}catch(C){Xt(o,o.return,C)}}}function NP(o,d,m){m.props=Tl(o.type,o.memoizedProps),m.state=o.memoizedState;try{m.componentWillUnmount()}catch(C){Xt(o,d,C)}}function Nf(o,d){try{var m=o.ref;if(m!==null){switch(o.tag){case 26:case 27:case 5:var C=o.stateNode;break;case 30:C=o.stateNode;break;default:C=o.stateNode}typeof m=="function"?o.refCleanup=m(C):m.current=C}}catch(P){Xt(o,d,P)}}function Ms(o,d){var m=o.ref,C=o.refCleanup;if(m!==null)if(typeof C=="function")try{C()}catch(P){Xt(o,d,P)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(P){Xt(o,d,P)}else m.current=null}function BP(o){var d=o.type,m=o.memoizedProps,C=o.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":m.autoFocus&&C.focus();break e;case"img":m.src?C.src=m.src:m.srcSet&&(C.srcset=m.srcSet)}}catch(P){Xt(o,o.return,P)}}function q_(o,d,m){try{var C=o.stateNode;Yq(C,o.type,m,d),C[jn]=d}catch(P){Xt(o,o.return,P)}}function zP(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ya(o.type)||o.tag===4}function W_(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||zP(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ya(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function G_(o,d,m){var C=o.tag;if(C===5||C===6)o=o.stateNode,d?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(o,d):(d=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,d.appendChild(o),m=m._reactRootContainer,m!=null||d.onclick!==null||(d.onclick=ls));else if(C!==4&&(C===27&&ya(o.type)&&(m=o.stateNode,d=null),o=o.child,o!==null))for(G_(o,d,m),o=o.sibling;o!==null;)G_(o,d,m),o=o.sibling}function Zm(o,d,m){var C=o.tag;if(C===5||C===6)o=o.stateNode,d?m.insertBefore(o,d):m.appendChild(o);else if(C!==4&&(C===27&&ya(o.type)&&(m=o.stateNode),o=o.child,o!==null))for(Zm(o,d,m),o=o.sibling;o!==null;)Zm(o,d,m),o=o.sibling}function HP(o){var d=o.stateNode,m=o.memoizedProps;try{for(var C=o.type,P=d.attributes;P.length;)d.removeAttributeNode(P[0]);br(d,C,m),d[Ln]=o,d[jn]=m}catch(M){Xt(o,o.return,M)}}var _o=!1,Hn=!1,K_=!1,$P=typeof WeakSet=="function"?WeakSet:Set,ur=null;function Oq(o,d){if(o=o.containerInfo,m1=bg,o=JR(o),$0(o)){if("selectionStart"in o)var m={start:o.selectionStart,end:o.selectionEnd};else e:{m=(m=o.ownerDocument)&&m.defaultView||window;var C=m.getSelection&&m.getSelection();if(C&&C.rangeCount!==0){m=C.anchorNode;var P=C.anchorOffset,M=C.focusNode;C=C.focusOffset;try{m.nodeType,M.nodeType}catch{m=null;break e}var q=0,Z=-1,ae=-1,ve=0,ke=0,je=o,ye=null;t:for(;;){for(var Se;je!==m||P!==0&&je.nodeType!==3||(Z=q+P),je!==M||C!==0&&je.nodeType!==3||(ae=q+C),je.nodeType===3&&(q+=je.nodeValue.length),(Se=je.firstChild)!==null;)ye=je,je=Se;for(;;){if(je===o)break t;if(ye===m&&++ve===P&&(Z=q),ye===M&&++ke===C&&(ae=q),(Se=je.nextSibling)!==null)break;je=ye,ye=je.parentNode}je=Se}m=Z===-1||ae===-1?null:{start:Z,end:ae}}else m=null}m=m||{start:0,end:0}}else m=null;for(g1={focusedElem:o,selectionRange:m},bg=!1,ur=d;ur!==null;)if(d=ur,o=d.child,(d.subtreeFlags&1028)!==0&&o!==null)o.return=d,ur=o;else for(;ur!==null;){switch(d=ur,M=d.alternate,o=d.flags,d.tag){case 0:if((o&4)!==0&&(o=d.updateQueue,o=o!==null?o.events:null,o!==null))for(m=0;m<o.length;m++)P=o[m],P.ref.impl=P.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&M!==null){o=void 0,m=d,P=M.memoizedProps,M=M.memoizedState,C=m.stateNode;try{var Ye=Tl(m.type,P);o=C.getSnapshotBeforeUpdate(Ye,M),C.__reactInternalSnapshotBeforeUpdate=o}catch(ht){Xt(m,m.return,ht)}}break;case 3:if((o&1024)!==0){if(o=d.stateNode.containerInfo,m=o.nodeType,m===9)b1(o);else if(m===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":b1(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=d.sibling,o!==null){o.return=d.return,ur=o;break}ur=d.return}}function FP(o,d,m){var C=m.flags;switch(m.tag){case 0:case 11:case 15:So(o,m),C&4&&If(5,m);break;case 1:if(So(o,m),C&4)if(o=m.stateNode,d===null)try{o.componentDidMount()}catch(q){Xt(m,m.return,q)}else{var P=Tl(m.type,d.memoizedProps);d=d.memoizedState;try{o.componentDidUpdate(P,d,o.__reactInternalSnapshotBeforeUpdate)}catch(q){Xt(m,m.return,q)}}C&64&&IP(m),C&512&&Nf(m,m.return);break;case 3:if(So(o,m),C&64&&(o=m.updateQueue,o!==null)){if(d=null,m.child!==null)switch(m.child.tag){case 27:case 5:d=m.child.stateNode;break;case 1:d=m.child.stateNode}try{TA(o,d)}catch(q){Xt(m,m.return,q)}}break;case 27:d===null&&C&4&&HP(m);case 26:case 5:So(o,m),d===null&&C&4&&BP(m),C&512&&Nf(m,m.return);break;case 12:So(o,m);break;case 31:So(o,m),C&4&&qP(o,m);break;case 13:So(o,m),C&4&&WP(o,m),C&64&&(o=m.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(m=Nq.bind(null,m),rW(o,m))));break;case 22:if(C=m.memoizedState!==null||_o,!C){d=d!==null&&d.memoizedState!==null||Hn,P=_o;var M=Hn;_o=C,(Hn=d)&&!M?wo(o,m,(m.subtreeFlags&8772)!==0):So(o,m),_o=P,Hn=M}break;case 30:break;default:So(o,m)}}function UP(o){var d=o.alternate;d!==null&&(o.alternate=null,UP(d)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(d=o.stateNode,d!==null&&dl(d)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var gn=null,Kr=!1;function xo(o,d,m){for(m=m.child;m!==null;)VP(o,d,m),m=m.sibling}function VP(o,d,m){if(Ce&&typeof Ce.onCommitFiberUnmount=="function")try{Ce.onCommitFiberUnmount(xe,m)}catch{}switch(m.tag){case 26:Hn||Ms(m,d),xo(o,d,m),m.memoizedState?m.memoizedState.count--:m.stateNode&&(m=m.stateNode,m.parentNode.removeChild(m));break;case 27:Hn||Ms(m,d);var C=gn,P=Kr;ya(m.type)&&(gn=m.stateNode,Kr=!1),xo(o,d,m),Wf(m.stateNode),gn=C,Kr=P;break;case 5:Hn||Ms(m,d);case 6:if(C=gn,P=Kr,gn=null,xo(o,d,m),gn=C,Kr=P,gn!==null)if(Kr)try{(gn.nodeType===9?gn.body:gn.nodeName==="HTML"?gn.ownerDocument.body:gn).removeChild(m.stateNode)}catch(M){Xt(m,d,M)}else try{gn.removeChild(m.stateNode)}catch(M){Xt(m,d,M)}break;case 18:gn!==null&&(Kr?(o=gn,IM(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,m.stateNode),Cu(o)):IM(gn,m.stateNode));break;case 4:C=gn,P=Kr,gn=m.stateNode.containerInfo,Kr=!0,xo(o,d,m),gn=C,Kr=P;break;case 0:case 11:case 14:case 15:da(2,m,d),Hn||da(4,m,d),xo(o,d,m);break;case 1:Hn||(Ms(m,d),C=m.stateNode,typeof C.componentWillUnmount=="function"&&NP(m,d,C)),xo(o,d,m);break;case 21:xo(o,d,m);break;case 22:Hn=(C=Hn)||m.memoizedState!==null,xo(o,d,m),Hn=C;break;default:xo(o,d,m)}}function qP(o,d){if(d.memoizedState===null&&(o=d.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Cu(o)}catch(m){Xt(d,d.return,m)}}}function WP(o,d){if(d.memoizedState===null&&(o=d.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Cu(o)}catch(m){Xt(d,d.return,m)}}function Rq(o){switch(o.tag){case 31:case 13:case 19:var d=o.stateNode;return d===null&&(d=o.stateNode=new $P),d;case 22:return o=o.stateNode,d=o._retryCache,d===null&&(d=o._retryCache=new $P),d;default:throw Error(r(435,o.tag))}}function Jm(o,d){var m=Rq(o);d.forEach(function(C){if(!m.has(C)){m.add(C);var P=Bq.bind(null,o,C);C.then(P,P)}})}function Yr(o,d){var m=d.deletions;if(m!==null)for(var C=0;C<m.length;C++){var P=m[C],M=o,q=d,Z=q;e:for(;Z!==null;){switch(Z.tag){case 27:if(ya(Z.type)){gn=Z.stateNode,Kr=!1;break e}break;case 5:gn=Z.stateNode,Kr=!1;break e;case 3:case 4:gn=Z.stateNode.containerInfo,Kr=!0;break e}Z=Z.return}if(gn===null)throw Error(r(160));VP(M,q,P),gn=null,Kr=!1,M=P.alternate,M!==null&&(M.return=null),P.return=null}if(d.subtreeFlags&13886)for(d=d.child;d!==null;)GP(d,o),d=d.sibling}var us=null;function GP(o,d){var m=o.alternate,C=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Yr(d,o),Xr(o),C&4&&(da(3,o,o.return),If(3,o),da(5,o,o.return));break;case 1:Yr(d,o),Xr(o),C&512&&(Hn||m===null||Ms(m,m.return)),C&64&&_o&&(o=o.updateQueue,o!==null&&(C=o.callbacks,C!==null&&(m=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=m===null?C:m.concat(C))));break;case 26:var P=us;if(Yr(d,o),Xr(o),C&512&&(Hn||m===null||Ms(m,m.return)),C&4){var M=m!==null?m.memoizedState:null;if(C=o.memoizedState,m===null)if(C===null)if(o.stateNode===null){e:{C=o.type,m=o.memoizedProps,P=P.ownerDocument||P;t:switch(C){case"title":M=P.getElementsByTagName("title")[0],(!M||M[ul]||M[Ln]||M.namespaceURI==="http://www.w3.org/2000/svg"||M.hasAttribute("itemprop"))&&(M=P.createElement(C),P.head.insertBefore(M,P.querySelector("head > title"))),br(M,C,m),M[Ln]=o,Dn(M),C=M;break e;case"link":var q=GM("link","href",P).get(C+(m.href||""));if(q){for(var Z=0;Z<q.length;Z++)if(M=q[Z],M.getAttribute("href")===(m.href==null||m.href===""?null:m.href)&&M.getAttribute("rel")===(m.rel==null?null:m.rel)&&M.getAttribute("title")===(m.title==null?null:m.title)&&M.getAttribute("crossorigin")===(m.crossOrigin==null?null:m.crossOrigin)){q.splice(Z,1);break t}}M=P.createElement(C),br(M,C,m),P.head.appendChild(M);break;case"meta":if(q=GM("meta","content",P).get(C+(m.content||""))){for(Z=0;Z<q.length;Z++)if(M=q[Z],M.getAttribute("content")===(m.content==null?null:""+m.content)&&M.getAttribute("name")===(m.name==null?null:m.name)&&M.getAttribute("property")===(m.property==null?null:m.property)&&M.getAttribute("http-equiv")===(m.httpEquiv==null?null:m.httpEquiv)&&M.getAttribute("charset")===(m.charSet==null?null:m.charSet)){q.splice(Z,1);break t}}M=P.createElement(C),br(M,C,m),P.head.appendChild(M);break;default:throw Error(r(468,C))}M[Ln]=o,Dn(M),C=M}o.stateNode=C}else KM(P,o.type,o.stateNode);else o.stateNode=WM(P,C,o.memoizedProps);else M!==C?(M===null?m.stateNode!==null&&(m=m.stateNode,m.parentNode.removeChild(m)):M.count--,C===null?KM(P,o.type,o.stateNode):WM(P,C,o.memoizedProps)):C===null&&o.stateNode!==null&&q_(o,o.memoizedProps,m.memoizedProps)}break;case 27:Yr(d,o),Xr(o),C&512&&(Hn||m===null||Ms(m,m.return)),m!==null&&C&4&&q_(o,o.memoizedProps,m.memoizedProps);break;case 5:if(Yr(d,o),Xr(o),C&512&&(Hn||m===null||Ms(m,m.return)),o.flags&32){P=o.stateNode;try{st(P,"")}catch(Ye){Xt(o,o.return,Ye)}}C&4&&o.stateNode!=null&&(P=o.memoizedProps,q_(o,P,m!==null?m.memoizedProps:P)),C&1024&&(K_=!0);break;case 6:if(Yr(d,o),Xr(o),C&4){if(o.stateNode===null)throw Error(r(162));C=o.memoizedProps,m=o.stateNode;try{m.nodeValue=C}catch(Ye){Xt(o,o.return,Ye)}}break;case 3:if(mg=null,P=us,us=hg(d.containerInfo),Yr(d,o),us=P,Xr(o),C&4&&m!==null&&m.memoizedState.isDehydrated)try{Cu(d.containerInfo)}catch(Ye){Xt(o,o.return,Ye)}K_&&(K_=!1,KP(o));break;case 4:C=us,us=hg(o.stateNode.containerInfo),Yr(d,o),Xr(o),us=C;break;case 12:Yr(d,o),Xr(o);break;case 31:Yr(d,o),Xr(o),C&4&&(C=o.updateQueue,C!==null&&(o.updateQueue=null,Jm(o,C)));break;case 13:Yr(d,o),Xr(o),o.child.flags&8192&&o.memoizedState!==null!=(m!==null&&m.memoizedState!==null)&&(tg=Ae()),C&4&&(C=o.updateQueue,C!==null&&(o.updateQueue=null,Jm(o,C)));break;case 22:P=o.memoizedState!==null;var ae=m!==null&&m.memoizedState!==null,ve=_o,ke=Hn;if(_o=ve||P,Hn=ke||ae,Yr(d,o),Hn=ke,_o=ve,Xr(o),C&8192)e:for(d=o.stateNode,d._visibility=P?d._visibility&-2:d._visibility|1,P&&(m===null||ae||_o||Hn||kl(o)),m=null,d=o;;){if(d.tag===5||d.tag===26){if(m===null){ae=m=d;try{if(M=ae.stateNode,P)q=M.style,typeof q.setProperty=="function"?q.setProperty("display","none","important"):q.display="none";else{Z=ae.stateNode;var je=ae.memoizedProps.style,ye=je!=null&&je.hasOwnProperty("display")?je.display:null;Z.style.display=ye==null||typeof ye=="boolean"?"":(""+ye).trim()}}catch(Ye){Xt(ae,ae.return,Ye)}}}else if(d.tag===6){if(m===null){ae=d;try{ae.stateNode.nodeValue=P?"":ae.memoizedProps}catch(Ye){Xt(ae,ae.return,Ye)}}}else if(d.tag===18){if(m===null){ae=d;try{var Se=ae.stateNode;P?NM(Se,!0):NM(ae.stateNode,!1)}catch(Ye){Xt(ae,ae.return,Ye)}}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===o)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===o)break e;for(;d.sibling===null;){if(d.return===null||d.return===o)break e;m===d&&(m=null),d=d.return}m===d&&(m=null),d.sibling.return=d.return,d=d.sibling}C&4&&(C=o.updateQueue,C!==null&&(m=C.retryQueue,m!==null&&(C.retryQueue=null,Jm(o,m))));break;case 19:Yr(d,o),Xr(o),C&4&&(C=o.updateQueue,C!==null&&(o.updateQueue=null,Jm(o,C)));break;case 30:break;case 21:break;default:Yr(d,o),Xr(o)}}function Xr(o){var d=o.flags;if(d&2){try{for(var m,C=o.return;C!==null;){if(zP(C)){m=C;break}C=C.return}if(m==null)throw Error(r(160));switch(m.tag){case 27:var P=m.stateNode,M=W_(o);Zm(o,M,P);break;case 5:var q=m.stateNode;m.flags&32&&(st(q,""),m.flags&=-33);var Z=W_(o);Zm(o,Z,q);break;case 3:case 4:var ae=m.stateNode.containerInfo,ve=W_(o);G_(o,ve,ae);break;default:throw Error(r(161))}}catch(ke){Xt(o,o.return,ke)}o.flags&=-3}d&4096&&(o.flags&=-4097)}function KP(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var d=o;KP(d),d.tag===5&&d.flags&1024&&d.stateNode.reset(),o=o.sibling}}function So(o,d){if(d.subtreeFlags&8772)for(d=d.child;d!==null;)FP(o,d.alternate,d),d=d.sibling}function kl(o){for(o=o.child;o!==null;){var d=o;switch(d.tag){case 0:case 11:case 14:case 15:da(4,d,d.return),kl(d);break;case 1:Ms(d,d.return);var m=d.stateNode;typeof m.componentWillUnmount=="function"&&NP(d,d.return,m),kl(d);break;case 27:Wf(d.stateNode);case 26:case 5:Ms(d,d.return),kl(d);break;case 22:d.memoizedState===null&&kl(d);break;case 30:kl(d);break;default:kl(d)}o=o.sibling}}function wo(o,d,m){for(m=m&&(d.subtreeFlags&8772)!==0,d=d.child;d!==null;){var C=d.alternate,P=o,M=d,q=M.flags;switch(M.tag){case 0:case 11:case 15:wo(P,M,m),If(4,M);break;case 1:if(wo(P,M,m),C=M,P=C.stateNode,typeof P.componentDidMount=="function")try{P.componentDidMount()}catch(ve){Xt(C,C.return,ve)}if(C=M,P=C.updateQueue,P!==null){var Z=C.stateNode;try{var ae=P.shared.hiddenCallbacks;if(ae!==null)for(P.shared.hiddenCallbacks=null,P=0;P<ae.length;P++)EA(ae[P],Z)}catch(ve){Xt(C,C.return,ve)}}m&&q&64&&IP(M),Nf(M,M.return);break;case 27:HP(M);case 26:case 5:wo(P,M,m),m&&C===null&&q&4&&BP(M),Nf(M,M.return);break;case 12:wo(P,M,m);break;case 31:wo(P,M,m),m&&q&4&&qP(P,M);break;case 13:wo(P,M,m),m&&q&4&&WP(P,M);break;case 22:M.memoizedState===null&&wo(P,M,m),Nf(M,M.return);break;case 30:break;default:wo(P,M,m)}d=d.sibling}}function Y_(o,d){var m=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),o=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(o=d.memoizedState.cachePool.pool),o!==m&&(o!=null&&o.refCount++,m!=null&&wf(m))}function X_(o,d){o=null,d.alternate!==null&&(o=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==o&&(d.refCount++,o!=null&&wf(o))}function ds(o,d,m,C){if(d.subtreeFlags&10256)for(d=d.child;d!==null;)YP(o,d,m,C),d=d.sibling}function YP(o,d,m,C){var P=d.flags;switch(d.tag){case 0:case 11:case 15:ds(o,d,m,C),P&2048&&If(9,d);break;case 1:ds(o,d,m,C);break;case 3:ds(o,d,m,C),P&2048&&(o=null,d.alternate!==null&&(o=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==o&&(d.refCount++,o!=null&&wf(o)));break;case 12:if(P&2048){ds(o,d,m,C),o=d.stateNode;try{var M=d.memoizedProps,q=M.id,Z=M.onPostCommit;typeof Z=="function"&&Z(q,d.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(ae){Xt(d,d.return,ae)}}else ds(o,d,m,C);break;case 31:ds(o,d,m,C);break;case 13:ds(o,d,m,C);break;case 23:break;case 22:M=d.stateNode,q=d.alternate,d.memoizedState!==null?M._visibility&2?ds(o,d,m,C):Bf(o,d):M._visibility&2?ds(o,d,m,C):(M._visibility|=2,hu(o,d,m,C,(d.subtreeFlags&10256)!==0||!1)),P&2048&&Y_(q,d);break;case 24:ds(o,d,m,C),P&2048&&X_(d.alternate,d);break;default:ds(o,d,m,C)}}function hu(o,d,m,C,P){for(P=P&&((d.subtreeFlags&10256)!==0||!1),d=d.child;d!==null;){var M=o,q=d,Z=m,ae=C,ve=q.flags;switch(q.tag){case 0:case 11:case 15:hu(M,q,Z,ae,P),If(8,q);break;case 23:break;case 22:var ke=q.stateNode;q.memoizedState!==null?ke._visibility&2?hu(M,q,Z,ae,P):Bf(M,q):(ke._visibility|=2,hu(M,q,Z,ae,P)),P&&ve&2048&&Y_(q.alternate,q);break;case 24:hu(M,q,Z,ae,P),P&&ve&2048&&X_(q.alternate,q);break;default:hu(M,q,Z,ae,P)}d=d.sibling}}function Bf(o,d){if(d.subtreeFlags&10256)for(d=d.child;d!==null;){var m=o,C=d,P=C.flags;switch(C.tag){case 22:Bf(m,C),P&2048&&Y_(C.alternate,C);break;case 24:Bf(m,C),P&2048&&X_(C.alternate,C);break;default:Bf(m,C)}d=d.sibling}}var zf=8192;function pu(o,d,m){if(o.subtreeFlags&zf)for(o=o.child;o!==null;)XP(o,d,m),o=o.sibling}function XP(o,d,m){switch(o.tag){case 26:pu(o,d,m),o.flags&zf&&o.memoizedState!==null&&mW(m,us,o.memoizedState,o.memoizedProps);break;case 5:pu(o,d,m);break;case 3:case 4:var C=us;us=hg(o.stateNode.containerInfo),pu(o,d,m),us=C;break;case 22:o.memoizedState===null&&(C=o.alternate,C!==null&&C.memoizedState!==null?(C=zf,zf=16777216,pu(o,d,m),zf=C):pu(o,d,m));break;default:pu(o,d,m)}}function QP(o){var d=o.alternate;if(d!==null&&(o=d.child,o!==null)){d.child=null;do d=o.sibling,o.sibling=null,o=d;while(o!==null)}}function Hf(o){var d=o.deletions;if((o.flags&16)!==0){if(d!==null)for(var m=0;m<d.length;m++){var C=d[m];ur=C,JP(C,o)}QP(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ZP(o),o=o.sibling}function ZP(o){switch(o.tag){case 0:case 11:case 15:Hf(o),o.flags&2048&&da(9,o,o.return);break;case 3:Hf(o);break;case 12:Hf(o);break;case 22:var d=o.stateNode;o.memoizedState!==null&&d._visibility&2&&(o.return===null||o.return.tag!==13)?(d._visibility&=-3,eg(o)):Hf(o);break;default:Hf(o)}}function eg(o){var d=o.deletions;if((o.flags&16)!==0){if(d!==null)for(var m=0;m<d.length;m++){var C=d[m];ur=C,JP(C,o)}QP(o)}for(o=o.child;o!==null;){switch(d=o,d.tag){case 0:case 11:case 15:da(8,d,d.return),eg(d);break;case 22:m=d.stateNode,m._visibility&2&&(m._visibility&=-3,eg(d));break;default:eg(d)}o=o.sibling}}function JP(o,d){for(;ur!==null;){var m=ur;switch(m.tag){case 0:case 11:case 15:da(8,m,d);break;case 23:case 22:if(m.memoizedState!==null&&m.memoizedState.cachePool!==null){var C=m.memoizedState.cachePool.pool;C!=null&&C.refCount++}break;case 24:wf(m.memoizedState.cache)}if(C=m.child,C!==null)C.return=m,ur=C;else e:for(m=o;ur!==null;){C=ur;var P=C.sibling,M=C.return;if(UP(C),C===m){ur=null;break e}if(P!==null){P.return=M,ur=P;break e}ur=M}}}var Aq={getCacheForType:function(o){var d=vr(Nn),m=d.data.get(o);return m===void 0&&(m=o(),d.data.set(o,m)),m},cacheSignal:function(){return vr(Nn).controller.signal}},Pq=typeof WeakMap=="function"?WeakMap:Map,Vt=0,on=null,At=null,jt=0,Yt=0,mi=null,fa=!1,mu=!1,Q_=!1,Co=0,Tn=0,ha=0,Ol=0,Z_=0,gi=0,gu=0,$f=null,Qr=null,J_=!1,tg=0,eM=0,ng=1/0,rg=null,pa=null,Xn=0,ma=null,vu=null,Eo=0,e1=0,t1=null,tM=null,Ff=0,n1=null;function vi(){return(Vt&2)!==0&&jt!==0?jt&-jt:H.T!==null?l1():ks()}function nM(){if(gi===0)if((jt&536870912)===0||Nt){var o=_n;_n<<=1,(_n&3932160)===0&&(_n=262144),gi=o}else gi=536870912;return o=hi.current,o!==null&&(o.flags|=32),gi}function Zr(o,d,m){(o===on&&(Yt===2||Yt===9)||o.cancelPendingCommit!==null)&&(yu(o,0),ga(o,jt,gi,!1)),Et(o,m),((Vt&2)===0||o!==on)&&(o===on&&((Vt&2)===0&&(Ol|=m),Tn===4&&ga(o,jt,gi,!1)),Ls(o))}function rM(o,d,m){if((Vt&6)!==0)throw Error(r(327));var C=!m&&(d&127)===0&&(d&o.expiredLanes)===0||zt(o,d),P=C?jq(o,d):i1(o,d,!0),M=C;do{if(P===0){mu&&!C&&ga(o,d,0,!1);break}else{if(m=o.current.alternate,M&&!Mq(m)){P=i1(o,d,!1),M=!1;continue}if(P===2){if(M=d,o.errorRecoveryDisabledLanes&M)var q=0;else q=o.pendingLanes&-536870913,q=q!==0?q:q&536870912?536870912:0;if(q!==0){d=q;e:{var Z=o;P=$f;var ae=Z.current.memoizedState.isDehydrated;if(ae&&(yu(Z,q).flags|=256),q=i1(Z,q,!1),q!==2){if(Q_&&!ae){Z.errorRecoveryDisabledLanes|=M,Ol|=M,P=4;break e}M=Qr,Qr=P,M!==null&&(Qr===null?Qr=M:Qr.push.apply(Qr,M))}P=q}if(M=!1,P!==2)continue}}if(P===1){yu(o,0),ga(o,d,0,!0);break}e:{switch(C=o,M=P,M){case 0:case 1:throw Error(r(345));case 4:if((d&4194048)!==d)break;case 6:ga(C,d,gi,!fa);break e;case 2:Qr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((d&62914560)===d&&(P=tg+300-Ae(),10<P)){if(ga(C,d,gi,!fa),nt(C,0,!0)!==0)break e;Eo=d,C.timeoutHandle=jM(iM.bind(null,C,m,Qr,rg,J_,d,gi,Ol,gu,fa,M,"Throttled",-0,0),P);break e}iM(C,m,Qr,rg,J_,d,gi,Ol,gu,fa,M,null,-0,0)}}break}while(!0);Ls(o)}function iM(o,d,m,C,P,M,q,Z,ae,ve,ke,je,ye,Se){if(o.timeoutHandle=-1,je=d.subtreeFlags,je&8192||(je&16785408)===16785408){je={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ls},XP(d,M,je);var Ye=(M&62914560)===M?tg-Ae():(M&4194048)===M?eM-Ae():0;if(Ye=gW(je,Ye),Ye!==null){Eo=M,o.cancelPendingCommit=Ye(fM.bind(null,o,d,M,m,C,P,q,Z,ae,ke,je,null,ye,Se)),ga(o,M,q,!ve);return}}fM(o,d,M,m,C,P,q,Z,ae)}function Mq(o){for(var d=o;;){var m=d.tag;if((m===0||m===11||m===15)&&d.flags&16384&&(m=d.updateQueue,m!==null&&(m=m.stores,m!==null)))for(var C=0;C<m.length;C++){var P=m[C],M=P.getSnapshot;P=P.value;try{if(!di(M(),P))return!1}catch{return!1}}if(m=d.child,d.subtreeFlags&16384&&m!==null)m.return=d,d=m;else{if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function ga(o,d,m,C){d&=~Z_,d&=~Ol,o.suspendedLanes|=d,o.pingedLanes&=~d,C&&(o.warmLanes|=d),C=o.expirationTimes;for(var P=d;0<P;){var M=31-dt(P),q=1<<M;C[M]=-1,P&=~q}m!==0&&Je(o,m,d)}function ig(){return(Vt&6)===0?(Uf(0),!1):!0}function r1(){if(At!==null){if(Yt===0)var o=At.return;else o=At,po=bl=null,b_(o),lu=null,Ef=0,o=At;for(;o!==null;)DP(o.alternate,o),o=o.return;At=null}}function yu(o,d){var m=o.timeoutHandle;m!==-1&&(o.timeoutHandle=-1,Zq(m)),m=o.cancelPendingCommit,m!==null&&(o.cancelPendingCommit=null,m()),Eo=0,r1(),on=o,At=m=fo(o.current,null),jt=d,Yt=0,mi=null,fa=!1,mu=zt(o,d),Q_=!1,gu=gi=Z_=Ol=ha=Tn=0,Qr=$f=null,J_=!1,(d&8)!==0&&(d|=d&32);var C=o.entangledLanes;if(C!==0)for(o=o.entanglements,C&=d;0<C;){var P=31-dt(C),M=1<<P;d|=o[P],C&=~M}return Co=d,Em(),m}function sM(o,d){_t=null,H.H=Lf,d===au||d===Lm?(d=xA(),Yt=3):d===a_?(d=xA(),Yt=4):Yt=d===D_?8:d!==null&&typeof d=="object"&&typeof d.then=="function"?6:1,mi=d,At===null&&(Tn=1,Gm(o,Pi(d,o.current)))}function oM(){var o=hi.current;return o===null?!0:(jt&4194048)===jt?Di===null:(jt&62914560)===jt||(jt&536870912)!==0?o===Di:!1}function aM(){var o=H.H;return H.H=Lf,o===null?Lf:o}function lM(){var o=H.A;return H.A=Aq,o}function sg(){Tn=4,fa||(jt&4194048)!==jt&&hi.current!==null||(mu=!0),(ha&134217727)===0&&(Ol&134217727)===0||on===null||ga(on,jt,gi,!1)}function i1(o,d,m){var C=Vt;Vt|=2;var P=aM(),M=lM();(on!==o||jt!==d)&&(rg=null,yu(o,d)),d=!1;var q=Tn;e:do try{if(Yt!==0&&At!==null){var Z=At,ae=mi;switch(Yt){case 8:r1(),q=6;break e;case 3:case 2:case 9:case 6:hi.current===null&&(d=!0);var ve=Yt;if(Yt=0,mi=null,bu(o,Z,ae,ve),m&&mu){q=0;break e}break;default:ve=Yt,Yt=0,mi=null,bu(o,Z,ae,ve)}}Lq(),q=Tn;break}catch(ke){sM(o,ke)}while(!0);return d&&o.shellSuspendCounter++,po=bl=null,Vt=C,H.H=P,H.A=M,At===null&&(on=null,jt=0,Em()),q}function Lq(){for(;At!==null;)cM(At)}function jq(o,d){var m=Vt;Vt|=2;var C=aM(),P=lM();on!==o||jt!==d?(rg=null,ng=Ae()+500,yu(o,d)):mu=zt(o,d);e:do try{if(Yt!==0&&At!==null){d=At;var M=mi;t:switch(Yt){case 1:Yt=0,mi=null,bu(o,d,M,1);break;case 2:case 9:if(bA(M)){Yt=0,mi=null,uM(d);break}d=function(){Yt!==2&&Yt!==9||on!==o||(Yt=7),Ls(o)},M.then(d,d);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:bA(M)?(Yt=0,mi=null,uM(d)):(Yt=0,mi=null,bu(o,d,M,7));break;case 5:var q=null;switch(At.tag){case 26:q=At.memoizedState;case 5:case 27:var Z=At;if(q?YM(q):Z.stateNode.complete){Yt=0,mi=null;var ae=Z.sibling;if(ae!==null)At=ae;else{var ve=Z.return;ve!==null?(At=ve,og(ve)):At=null}break t}}Yt=0,mi=null,bu(o,d,M,5);break;case 6:Yt=0,mi=null,bu(o,d,M,6);break;case 8:r1(),Tn=6;break e;default:throw Error(r(462))}}Dq();break}catch(ke){sM(o,ke)}while(!0);return po=bl=null,H.H=C,H.A=P,Vt=m,At!==null?0:(on=null,jt=0,Em(),Tn)}function Dq(){for(;At!==null&&!Pe();)cM(At)}function cM(o){var d=LP(o.alternate,o,Co);o.memoizedProps=o.pendingProps,d===null?og(o):At=d}function uM(o){var d=o,m=d.alternate;switch(d.tag){case 15:case 0:d=kP(m,d,d.pendingProps,d.type,void 0,jt);break;case 11:d=kP(m,d,d.pendingProps,d.type.render,d.ref,jt);break;case 5:b_(d);default:DP(m,d),d=At=lA(d,Co),d=LP(m,d,Co)}o.memoizedProps=o.pendingProps,d===null?og(o):At=d}function bu(o,d,m,C){po=bl=null,b_(d),lu=null,Ef=0;var P=d.return;try{if(wq(o,P,d,m,jt)){Tn=1,Gm(o,Pi(m,o.current)),At=null;return}}catch(M){if(P!==null)throw At=P,M;Tn=1,Gm(o,Pi(m,o.current)),At=null;return}d.flags&32768?(Nt||C===1?o=!0:mu||(jt&536870912)!==0?o=!1:(fa=o=!0,(C===2||C===9||C===3||C===6)&&(C=hi.current,C!==null&&C.tag===13&&(C.flags|=16384))),dM(d,o)):og(d)}function og(o){var d=o;do{if((d.flags&32768)!==0){dM(d,fa);return}o=d.return;var m=Tq(d.alternate,d,Co);if(m!==null){At=m;return}if(d=d.sibling,d!==null){At=d;return}At=d=o}while(d!==null);Tn===0&&(Tn=5)}function dM(o,d){do{var m=kq(o.alternate,o);if(m!==null){m.flags&=32767,At=m;return}if(m=o.return,m!==null&&(m.flags|=32768,m.subtreeFlags=0,m.deletions=null),!d&&(o=o.sibling,o!==null)){At=o;return}At=o=m}while(o!==null);Tn=6,At=null}function fM(o,d,m,C,P,M,q,Z,ae){o.cancelPendingCommit=null;do ag();while(Xn!==0);if((Vt&6)!==0)throw Error(r(327));if(d!==null){if(d===o.current)throw Error(r(177));if(M=d.lanes|d.childLanes,M|=W0,Tt(o,m,M,q,Z,ae),o===on&&(At=on=null,jt=0),vu=d,ma=o,Eo=m,e1=M,t1=P,tM=C,(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,zq(Ue,function(){return vM(),null})):(o.callbackNode=null,o.callbackPriority=0),C=(d.flags&13878)!==0,(d.subtreeFlags&13878)!==0||C){C=H.T,H.T=null,P=K.p,K.p=2,q=Vt,Vt|=4;try{Oq(o,d,m)}finally{Vt=q,K.p=P,H.T=C}}Xn=1,hM(),pM(),mM()}}function hM(){if(Xn===1){Xn=0;var o=ma,d=vu,m=(d.flags&13878)!==0;if((d.subtreeFlags&13878)!==0||m){m=H.T,H.T=null;var C=K.p;K.p=2;var P=Vt;Vt|=4;try{GP(d,o);var M=g1,q=JR(o.containerInfo),Z=M.focusedElem,ae=M.selectionRange;if(q!==Z&&Z&&Z.ownerDocument&&ZR(Z.ownerDocument.documentElement,Z)){if(ae!==null&&$0(Z)){var ve=ae.start,ke=ae.end;if(ke===void 0&&(ke=ve),"selectionStart"in Z)Z.selectionStart=ve,Z.selectionEnd=Math.min(ke,Z.value.length);else{var je=Z.ownerDocument||document,ye=je&&je.defaultView||window;if(ye.getSelection){var Se=ye.getSelection(),Ye=Z.textContent.length,ht=Math.min(ae.start,Ye),tn=ae.end===void 0?ht:Math.min(ae.end,Ye);!Se.extend&&ht>tn&&(q=tn,tn=ht,ht=q);var he=QR(Z,ht),ce=QR(Z,tn);if(he&&ce&&(Se.rangeCount!==1||Se.anchorNode!==he.node||Se.anchorOffset!==he.offset||Se.focusNode!==ce.node||Se.focusOffset!==ce.offset)){var ge=je.createRange();ge.setStart(he.node,he.offset),Se.removeAllRanges(),ht>tn?(Se.addRange(ge),Se.extend(ce.node,ce.offset)):(ge.setEnd(ce.node,ce.offset),Se.addRange(ge))}}}}for(je=[],Se=Z;Se=Se.parentNode;)Se.nodeType===1&&je.push({element:Se,left:Se.scrollLeft,top:Se.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<je.length;Z++){var Me=je[Z];Me.element.scrollLeft=Me.left,Me.element.scrollTop=Me.top}}bg=!!m1,g1=m1=null}finally{Vt=P,K.p=C,H.T=m}}o.current=d,Xn=2}}function pM(){if(Xn===2){Xn=0;var o=ma,d=vu,m=(d.flags&8772)!==0;if((d.subtreeFlags&8772)!==0||m){m=H.T,H.T=null;var C=K.p;K.p=2;var P=Vt;Vt|=4;try{FP(o,d.alternate,d)}finally{Vt=P,K.p=C,H.T=m}}Xn=3}}function mM(){if(Xn===4||Xn===3){Xn=0,me();var o=ma,d=vu,m=Eo,C=tM;(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?Xn=5:(Xn=0,vu=ma=null,gM(o,o.pendingLanes));var P=o.pendingLanes;if(P===0&&(pa=null),mr(m),d=d.stateNode,Ce&&typeof Ce.onCommitFiberRoot=="function")try{Ce.onCommitFiberRoot(xe,d,void 0,(d.current.flags&128)===128)}catch{}if(C!==null){d=H.T,P=K.p,K.p=2,H.T=null;try{for(var M=o.onRecoverableError,q=0;q<C.length;q++){var Z=C[q];M(Z.value,{componentStack:Z.stack})}}finally{H.T=d,K.p=P}}(Eo&3)!==0&&ag(),Ls(o),P=o.pendingLanes,(m&261930)!==0&&(P&42)!==0?o===n1?Ff++:(Ff=0,n1=o):Ff=0,Uf(0)}}function gM(o,d){(o.pooledCacheLanes&=d)===0&&(d=o.pooledCache,d!=null&&(o.pooledCache=null,wf(d)))}function ag(){return hM(),pM(),mM(),vM()}function vM(){if(Xn!==5)return!1;var o=ma,d=e1;e1=0;var m=mr(Eo),C=H.T,P=K.p;try{K.p=32>m?32:m,H.T=null,m=t1,t1=null;var M=ma,q=Eo;if(Xn=0,vu=ma=null,Eo=0,(Vt&6)!==0)throw Error(r(331));var Z=Vt;if(Vt|=4,ZP(M.current),YP(M,M.current,q,m),Vt=Z,Uf(0,!1),Ce&&typeof Ce.onPostCommitFiberRoot=="function")try{Ce.onPostCommitFiberRoot(xe,M)}catch{}return!0}finally{K.p=P,H.T=C,gM(o,d)}}function yM(o,d,m){d=Pi(m,d),d=j_(o.stateNode,d,2),o=la(o,d,2),o!==null&&(Et(o,2),Ls(o))}function Xt(o,d,m){if(o.tag===3)yM(o,o,m);else for(;d!==null;){if(d.tag===3){yM(d,o,m);break}else if(d.tag===1){var C=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof C.componentDidCatch=="function"&&(pa===null||!pa.has(C))){o=Pi(m,o),m=bP(2),C=la(d,m,2),C!==null&&(_P(m,C,d,o),Et(C,2),Ls(C));break}}d=d.return}}function s1(o,d,m){var C=o.pingCache;if(C===null){C=o.pingCache=new Pq;var P=new Set;C.set(d,P)}else P=C.get(d),P===void 0&&(P=new Set,C.set(d,P));P.has(m)||(Q_=!0,P.add(m),o=Iq.bind(null,o,d,m),d.then(o,o))}function Iq(o,d,m){var C=o.pingCache;C!==null&&C.delete(d),o.pingedLanes|=o.suspendedLanes&m,o.warmLanes&=~m,on===o&&(jt&m)===m&&(Tn===4||Tn===3&&(jt&62914560)===jt&&300>Ae()-tg?(Vt&2)===0&&yu(o,0):Z_|=m,gu===jt&&(gu=0)),Ls(o)}function bM(o,d){d===0&&(d=ct()),o=gl(o,d),o!==null&&(Et(o,d),Ls(o))}function Nq(o){var d=o.memoizedState,m=0;d!==null&&(m=d.retryLane),bM(o,m)}function Bq(o,d){var m=0;switch(o.tag){case 31:case 13:var C=o.stateNode,P=o.memoizedState;P!==null&&(m=P.retryLane);break;case 19:C=o.stateNode;break;case 22:C=o.stateNode._retryCache;break;default:throw Error(r(314))}C!==null&&C.delete(d),bM(o,m)}function zq(o,d){return we(o,d)}var lg=null,_u=null,o1=!1,cg=!1,a1=!1,va=0;function Ls(o){o!==_u&&o.next===null&&(_u===null?lg=_u=o:_u=_u.next=o),cg=!0,o1||(o1=!0,$q())}function Uf(o,d){if(!a1&&cg){a1=!0;do for(var m=!1,C=lg;C!==null;){if(o!==0){var P=C.pendingLanes;if(P===0)var M=0;else{var q=C.suspendedLanes,Z=C.pingedLanes;M=(1<<31-dt(42|o)+1)-1,M&=P&~(q&~Z),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(m=!0,wM(C,M))}else M=jt,M=nt(C,C===on?M:0,C.cancelPendingCommit!==null||C.timeoutHandle!==-1),(M&3)===0||zt(C,M)||(m=!0,wM(C,M));C=C.next}while(m);a1=!1}}function Hq(){_M()}function _M(){cg=o1=!1;var o=0;va!==0&&Qq()&&(o=va);for(var d=Ae(),m=null,C=lg;C!==null;){var P=C.next,M=xM(C,d);M===0?(C.next=null,m===null?lg=P:m.next=P,P===null&&(_u=m)):(m=C,(o!==0||(M&3)!==0)&&(cg=!0)),C=P}Xn!==0&&Xn!==5||Uf(o),va!==0&&(va=0)}function xM(o,d){for(var m=o.suspendedLanes,C=o.pingedLanes,P=o.expirationTimes,M=o.pendingLanes&-62914561;0<M;){var q=31-dt(M),Z=1<<q,ae=P[q];ae===-1?((Z&m)===0||(Z&C)!==0)&&(P[q]=qt(Z,d)):ae<=d&&(o.expiredLanes|=Z),M&=~Z}if(d=on,m=jt,m=nt(o,o===d?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),C=o.callbackNode,m===0||o===d&&(Yt===2||Yt===9)||o.cancelPendingCommit!==null)return C!==null&&C!==null&&_e(C),o.callbackNode=null,o.callbackPriority=0;if((m&3)===0||zt(o,m)){if(d=m&-m,d===o.callbackPriority)return d;switch(C!==null&&_e(C),mr(m)){case 2:case 8:m=rt;break;case 32:m=Ue;break;case 268435456:m=tt;break;default:m=Ue}return C=SM.bind(null,o),m=we(m,C),o.callbackPriority=d,o.callbackNode=m,d}return C!==null&&C!==null&&_e(C),o.callbackPriority=2,o.callbackNode=null,2}function SM(o,d){if(Xn!==0&&Xn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var m=o.callbackNode;if(ag()&&o.callbackNode!==m)return null;var C=jt;return C=nt(o,o===on?C:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),C===0?null:(rM(o,C,d),xM(o,Ae()),o.callbackNode!=null&&o.callbackNode===m?SM.bind(null,o):null)}function wM(o,d){if(ag())return null;rM(o,d,!0)}function $q(){Jq(function(){(Vt&6)!==0?we(We,Hq):_M()})}function l1(){if(va===0){var o=su;o===0&&(o=ft,ft<<=1,(ft&261888)===0&&(ft=256)),va=o}return va}function CM(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:co(""+o)}function EM(o,d){var m=d.ownerDocument.createElement("input");return m.name=d.name,m.value=d.value,o.id&&m.setAttribute("form",o.id),d.parentNode.insertBefore(m,d),o=new FormData(o),m.parentNode.removeChild(m),o}function Fq(o,d,m,C,P){if(d==="submit"&&m&&m.stateNode===P){var M=CM((P[jn]||null).action),q=C.submitter;q&&(d=(d=q[jn]||null)?CM(d.formAction):q.getAttribute("formAction"),d!==null&&(M=d,q=null));var Z=new xm("action","action",null,C,P);o.push({event:Z,listeners:[{instance:null,listener:function(){if(C.defaultPrevented){if(va!==0){var ae=q?EM(P,q):new FormData(P);O_(m,{pending:!0,data:ae,method:P.method,action:M},null,ae)}}else typeof M=="function"&&(Z.preventDefault(),ae=q?EM(P,q):new FormData(P),O_(m,{pending:!0,data:ae,method:P.method,action:M},M,ae))},currentTarget:P}]})}}for(var c1=0;c1<q0.length;c1++){var u1=q0[c1],Uq=u1.toLowerCase(),Vq=u1[0].toUpperCase()+u1.slice(1);cs(Uq,"on"+Vq)}cs(nA,"onAnimationEnd"),cs(rA,"onAnimationIteration"),cs(iA,"onAnimationStart"),cs("dblclick","onDoubleClick"),cs("focusin","onFocus"),cs("focusout","onBlur"),cs(oq,"onTransitionRun"),cs(aq,"onTransitionStart"),cs(lq,"onTransitionCancel"),cs(sA,"onTransitionEnd"),as("onMouseEnter",["mouseout","mouseover"]),as("onMouseLeave",["mouseout","mouseover"]),as("onPointerEnter",["pointerout","pointerover"]),as("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vf="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(" "),qq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vf));function TM(o,d){d=(d&4)!==0;for(var m=0;m<o.length;m++){var C=o[m],P=C.event;C=C.listeners;e:{var M=void 0;if(d)for(var q=C.length-1;0<=q;q--){var Z=C[q],ae=Z.instance,ve=Z.currentTarget;if(Z=Z.listener,ae!==M&&P.isPropagationStopped())break e;M=Z,P.currentTarget=ve;try{M(P)}catch(ke){Cm(ke)}P.currentTarget=null,M=ae}else for(q=0;q<C.length;q++){if(Z=C[q],ae=Z.instance,ve=Z.currentTarget,Z=Z.listener,ae!==M&&P.isPropagationStopped())break e;M=Z,P.currentTarget=ve;try{M(P)}catch(ke){Cm(ke)}P.currentTarget=null,M=ae}}}}function Pt(o,d){var m=d[li];m===void 0&&(m=d[li]=new Set);var C=o+"__bubble";m.has(C)||(kM(d,o,2,!1),m.add(C))}function d1(o,d,m){var C=0;d&&(C|=4),kM(m,o,C,d)}var ug="_reactListening"+Math.random().toString(36).slice(2);function f1(o){if(!o[ug]){o[ug]=!0,Nr.forEach(function(m){m!=="selectionchange"&&(qq.has(m)||d1(m,!1,o),d1(m,!0,o))});var d=o.nodeType===9?o:o.ownerDocument;d===null||d[ug]||(d[ug]=!0,d1("selectionchange",!1,d))}}function kM(o,d,m,C){switch(n5(d)){case 2:var P=bW;break;case 8:P=_W;break;default:P=k1}m=P.bind(null,d,m,o),P=void 0,!M0||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(P=!0),C?P!==void 0?o.addEventListener(d,m,{capture:!0,passive:P}):o.addEventListener(d,m,!0):P!==void 0?o.addEventListener(d,m,{passive:P}):o.addEventListener(d,m,!1)}function h1(o,d,m,C,P){var M=C;if((d&1)===0&&(d&2)===0&&C!==null)e:for(;;){if(C===null)return;var q=C.tag;if(q===3||q===4){var Z=C.stateNode.containerInfo;if(Z===P)break;if(q===4)for(q=C.return;q!==null;){var ae=q.tag;if((ae===3||ae===4)&&q.stateNode.containerInfo===P)return;q=q.return}for(;Z!==null;){if(q=so(Z),q===null)return;if(ae=q.tag,ae===5||ae===6||ae===26||ae===27){C=M=q;continue e}Z=Z.parentNode}}C=C.return}MR(function(){var ve=M,ke=A0(m),je=[];e:{var ye=oA.get(o);if(ye!==void 0){var Se=xm,Ye=o;switch(o){case"keypress":if(bm(m)===0)break e;case"keydown":case"keyup":Se=BV;break;case"focusin":Ye="focus",Se=I0;break;case"focusout":Ye="blur",Se=I0;break;case"beforeblur":case"afterblur":Se=I0;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=DR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=TV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=$V;break;case nA:case rA:case iA:Se=RV;break;case sA:Se=UV;break;case"scroll":case"scrollend":Se=CV;break;case"wheel":Se=qV;break;case"copy":case"cut":case"paste":Se=PV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=NR;break;case"toggle":case"beforetoggle":Se=GV}var ht=(d&4)!==0,tn=!ht&&(o==="scroll"||o==="scrollend"),he=ht?ye!==null?ye+"Capture":null:ye;ht=[];for(var ce=ve,ge;ce!==null;){var Me=ce;if(ge=Me.stateNode,Me=Me.tag,Me!==5&&Me!==26&&Me!==27||ge===null||he===null||(Me=ff(ce,he),Me!=null&&ht.push(qf(ce,Me,ge))),tn)break;ce=ce.return}0<ht.length&&(ye=new Se(ye,Ye,null,m,ke),je.push({event:ye,listeners:ht}))}}if((d&7)===0){e:{if(ye=o==="mouseover"||o==="pointerover",Se=o==="mouseout"||o==="pointerout",ye&&m!==vm&&(Ye=m.relatedTarget||m.fromElement)&&(so(Ye)||Ye[Os]))break e;if((Se||ye)&&(ye=ke.window===ke?ke:(ye=ke.ownerDocument)?ye.defaultView||ye.parentWindow:window,Se?(Ye=m.relatedTarget||m.toElement,Se=ve,Ye=Ye?so(Ye):null,Ye!==null&&(tn=s(Ye),ht=Ye.tag,Ye!==tn||ht!==5&&ht!==27&&ht!==6)&&(Ye=null)):(Se=null,Ye=ve),Se!==Ye)){if(ht=DR,Me="onMouseLeave",he="onMouseEnter",ce="mouse",(o==="pointerout"||o==="pointerover")&&(ht=NR,Me="onPointerLeave",he="onPointerEnter",ce="pointer"),tn=Se==null?ye:fl(Se),ge=Ye==null?ye:fl(Ye),ye=new ht(Me,ce+"leave",Se,m,ke),ye.target=tn,ye.relatedTarget=ge,Me=null,so(ke)===ve&&(ht=new ht(he,ce+"enter",Ye,m,ke),ht.target=ge,ht.relatedTarget=tn,Me=ht),tn=Me,Se&&Ye)t:{for(ht=Wq,he=Se,ce=Ye,ge=0,Me=he;Me;Me=ht(Me))ge++;Me=0;for(var lt=ce;lt;lt=ht(lt))Me++;for(;0<ge-Me;)he=ht(he),ge--;for(;0<Me-ge;)ce=ht(ce),Me--;for(;ge--;){if(he===ce||ce!==null&&he===ce.alternate){ht=he;break t}he=ht(he),ce=ht(ce)}ht=null}else ht=null;Se!==null&&OM(je,ye,Se,ht,!1),Ye!==null&&tn!==null&&OM(je,tn,Ye,ht,!0)}}e:{if(ye=ve?fl(ve):window,Se=ye.nodeName&&ye.nodeName.toLowerCase(),Se==="select"||Se==="input"&&ye.type==="file")var Ht=qR;else if(UR(ye))if(WR)Ht=rq;else{Ht=tq;var et=eq}else Se=ye.nodeName,!Se||Se.toLowerCase()!=="input"||ye.type!=="checkbox"&&ye.type!=="radio"?ve&&In(ve.elementType)&&(Ht=qR):Ht=nq;if(Ht&&(Ht=Ht(o,ve))){VR(je,Ht,m,ke);break e}et&&et(o,ye,ve),o==="focusout"&&ve&&ye.type==="number"&&ve.memoizedProps.value!=null&&df(ye,"number",ye.value)}switch(et=ve?fl(ve):window,o){case"focusin":(UR(et)||et.contentEditable==="true")&&(Qc=et,F0=ve,_f=null);break;case"focusout":_f=F0=Qc=null;break;case"mousedown":U0=!0;break;case"contextmenu":case"mouseup":case"dragend":U0=!1,eA(je,m,ke);break;case"selectionchange":if(sq)break;case"keydown":case"keyup":eA(je,m,ke)}var St;if(B0)e:{switch(o){case"compositionstart":var Dt="onCompositionStart";break e;case"compositionend":Dt="onCompositionEnd";break e;case"compositionupdate":Dt="onCompositionUpdate";break e}Dt=void 0}else Xc?$R(o,m)&&(Dt="onCompositionEnd"):o==="keydown"&&m.keyCode===229&&(Dt="onCompositionStart");Dt&&(BR&&m.locale!=="ko"&&(Xc||Dt!=="onCompositionStart"?Dt==="onCompositionEnd"&&Xc&&(St=LR()):(ta=ke,L0="value"in ta?ta.value:ta.textContent,Xc=!0)),et=dg(ve,Dt),0<et.length&&(Dt=new IR(Dt,o,null,m,ke),je.push({event:Dt,listeners:et}),St?Dt.data=St:(St=FR(m),St!==null&&(Dt.data=St)))),(St=YV?XV(o,m):QV(o,m))&&(Dt=dg(ve,"onBeforeInput"),0<Dt.length&&(et=new IR("onBeforeInput","beforeinput",null,m,ke),je.push({event:et,listeners:Dt}),et.data=St)),Fq(je,o,ve,m,ke)}TM(je,d)})}function qf(o,d,m){return{instance:o,listener:d,currentTarget:m}}function dg(o,d){for(var m=d+"Capture",C=[];o!==null;){var P=o,M=P.stateNode;if(P=P.tag,P!==5&&P!==26&&P!==27||M===null||(P=ff(o,m),P!=null&&C.unshift(qf(o,P,M)),P=ff(o,d),P!=null&&C.push(qf(o,P,M))),o.tag===3)return C;o=o.return}return[]}function Wq(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function OM(o,d,m,C,P){for(var M=d._reactName,q=[];m!==null&&m!==C;){var Z=m,ae=Z.alternate,ve=Z.stateNode;if(Z=Z.tag,ae!==null&&ae===C)break;Z!==5&&Z!==26&&Z!==27||ve===null||(ae=ve,P?(ve=ff(m,M),ve!=null&&q.unshift(qf(m,ve,ae))):P||(ve=ff(m,M),ve!=null&&q.push(qf(m,ve,ae)))),m=m.return}q.length!==0&&o.push({event:d,listeners:q})}var Gq=/\r\n?/g,Kq=/\u0000|\uFFFD/g;function RM(o){return(typeof o=="string"?o:""+o).replace(Gq,`
|
|
10
|
+
`).replace(Kq,"")}function AM(o,d){return d=RM(d),RM(o)===d}function en(o,d,m,C,P,M){switch(m){case"children":typeof C=="string"?d==="body"||d==="textarea"&&C===""||st(o,C):(typeof C=="number"||typeof C=="bigint")&&d!=="body"&&st(o,""+C);break;case"className":Zo(o,"class",C);break;case"tabIndex":Zo(o,"tabindex",C);break;case"dir":case"role":case"viewBox":case"width":case"height":Zo(o,m,C);break;case"style":xn(o,C,M);break;case"data":if(d!=="object"){Zo(o,"data",C);break}case"src":case"href":if(C===""&&(d!=="a"||m!=="href")){o.removeAttribute(m);break}if(C==null||typeof C=="function"||typeof C=="symbol"||typeof C=="boolean"){o.removeAttribute(m);break}C=co(""+C),o.setAttribute(m,C);break;case"action":case"formAction":if(typeof C=="function"){o.setAttribute(m,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof M=="function"&&(m==="formAction"?(d!=="input"&&en(o,d,"name",P.name,P,null),en(o,d,"formEncType",P.formEncType,P,null),en(o,d,"formMethod",P.formMethod,P,null),en(o,d,"formTarget",P.formTarget,P,null)):(en(o,d,"encType",P.encType,P,null),en(o,d,"method",P.method,P,null),en(o,d,"target",P.target,P,null)));if(C==null||typeof C=="symbol"||typeof C=="boolean"){o.removeAttribute(m);break}C=co(""+C),o.setAttribute(m,C);break;case"onClick":C!=null&&(o.onclick=ls);break;case"onScroll":C!=null&&Pt("scroll",o);break;case"onScrollEnd":C!=null&&Pt("scrollend",o);break;case"dangerouslySetInnerHTML":if(C!=null){if(typeof C!="object"||!("__html"in C))throw Error(r(61));if(m=C.__html,m!=null){if(P.children!=null)throw Error(r(60));o.innerHTML=m}}break;case"multiple":o.multiple=C&&typeof C!="function"&&typeof C!="symbol";break;case"muted":o.muted=C&&typeof C!="function"&&typeof C!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(C==null||typeof C=="function"||typeof C=="boolean"||typeof C=="symbol"){o.removeAttribute("xlink:href");break}m=co(""+C),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",m);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":C!=null&&typeof C!="function"&&typeof C!="symbol"?o.setAttribute(m,""+C):o.removeAttribute(m);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":C&&typeof C!="function"&&typeof C!="symbol"?o.setAttribute(m,""):o.removeAttribute(m);break;case"capture":case"download":C===!0?o.setAttribute(m,""):C!==!1&&C!=null&&typeof C!="function"&&typeof C!="symbol"?o.setAttribute(m,C):o.removeAttribute(m);break;case"cols":case"rows":case"size":case"span":C!=null&&typeof C!="function"&&typeof C!="symbol"&&!isNaN(C)&&1<=C?o.setAttribute(m,C):o.removeAttribute(m);break;case"rowSpan":case"start":C==null||typeof C=="function"||typeof C=="symbol"||isNaN(C)?o.removeAttribute(m):o.setAttribute(m,C);break;case"popover":Pt("beforetoggle",o),Pt("toggle",o),oo(o,"popover",C);break;case"xlinkActuate":ui(o,"http://www.w3.org/1999/xlink","xlink:actuate",C);break;case"xlinkArcrole":ui(o,"http://www.w3.org/1999/xlink","xlink:arcrole",C);break;case"xlinkRole":ui(o,"http://www.w3.org/1999/xlink","xlink:role",C);break;case"xlinkShow":ui(o,"http://www.w3.org/1999/xlink","xlink:show",C);break;case"xlinkTitle":ui(o,"http://www.w3.org/1999/xlink","xlink:title",C);break;case"xlinkType":ui(o,"http://www.w3.org/1999/xlink","xlink:type",C);break;case"xmlBase":ui(o,"http://www.w3.org/XML/1998/namespace","xml:base",C);break;case"xmlLang":ui(o,"http://www.w3.org/XML/1998/namespace","xml:lang",C);break;case"xmlSpace":ui(o,"http://www.w3.org/XML/1998/namespace","xml:space",C);break;case"is":oo(o,"is",C);break;case"innerText":case"textContent":break;default:(!(2<m.length)||m[0]!=="o"&&m[0]!=="O"||m[1]!=="n"&&m[1]!=="N")&&(m=ao.get(m)||m,oo(o,m,C))}}function p1(o,d,m,C,P,M){switch(m){case"style":xn(o,C,M);break;case"dangerouslySetInnerHTML":if(C!=null){if(typeof C!="object"||!("__html"in C))throw Error(r(61));if(m=C.__html,m!=null){if(P.children!=null)throw Error(r(60));o.innerHTML=m}}break;case"children":typeof C=="string"?st(o,C):(typeof C=="number"||typeof C=="bigint")&&st(o,""+C);break;case"onScroll":C!=null&&Pt("scroll",o);break;case"onScrollEnd":C!=null&&Pt("scrollend",o);break;case"onClick":C!=null&&(o.onclick=ls);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Br.hasOwnProperty(m))e:{if(m[0]==="o"&&m[1]==="n"&&(P=m.endsWith("Capture"),d=m.slice(2,P?m.length-7:void 0),M=o[jn]||null,M=M!=null?M[m]:null,typeof M=="function"&&o.removeEventListener(d,M,P),typeof C=="function")){typeof M!="function"&&M!==null&&(m in o?o[m]=null:o.hasAttribute(m)&&o.removeAttribute(m)),o.addEventListener(d,C,P);break e}m in o?o[m]=C:C===!0?o.setAttribute(m,""):oo(o,m,C)}}}function br(o,d,m){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pt("error",o),Pt("load",o);var C=!1,P=!1,M;for(M in m)if(m.hasOwnProperty(M)){var q=m[M];if(q!=null)switch(M){case"src":C=!0;break;case"srcSet":P=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:en(o,d,M,q,m,null)}}P&&en(o,d,"srcSet",m.srcSet,m,null),C&&en(o,d,"src",m.src,m,null);return;case"input":Pt("invalid",o);var Z=M=q=P=null,ae=null,ve=null;for(C in m)if(m.hasOwnProperty(C)){var ke=m[C];if(ke!=null)switch(C){case"name":P=ke;break;case"type":q=ke;break;case"checked":ae=ke;break;case"defaultChecked":ve=ke;break;case"value":M=ke;break;case"defaultValue":Z=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,d));break;default:en(o,d,C,ke,m,null)}}mm(o,M,Z,ae,ve,q,P,!1);return;case"select":Pt("invalid",o),C=q=M=null;for(P in m)if(m.hasOwnProperty(P)&&(Z=m[P],Z!=null))switch(P){case"value":M=Z;break;case"defaultValue":q=Z;break;case"multiple":C=Z;default:en(o,d,P,Z,m,null)}d=M,m=q,o.multiple=!!C,d!=null?ea(o,!!C,d,!1):m!=null&&ea(o,!!C,m,!0);return;case"textarea":Pt("invalid",o),M=P=C=null;for(q in m)if(m.hasOwnProperty(q)&&(Z=m[q],Z!=null))switch(q){case"value":C=Z;break;case"defaultValue":P=Z;break;case"children":M=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:en(o,d,q,Z,m,null)}Ve(o,C,P,M);return;case"option":for(ae in m)m.hasOwnProperty(ae)&&(C=m[ae],C!=null)&&(ae==="selected"?o.selected=C&&typeof C!="function"&&typeof C!="symbol":en(o,d,ae,C,m,null));return;case"dialog":Pt("beforetoggle",o),Pt("toggle",o),Pt("cancel",o),Pt("close",o);break;case"iframe":case"object":Pt("load",o);break;case"video":case"audio":for(C=0;C<Vf.length;C++)Pt(Vf[C],o);break;case"image":Pt("error",o),Pt("load",o);break;case"details":Pt("toggle",o);break;case"embed":case"source":case"link":Pt("error",o),Pt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in m)if(m.hasOwnProperty(ve)&&(C=m[ve],C!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:en(o,d,ve,C,m,null)}return;default:if(In(d)){for(ke in m)m.hasOwnProperty(ke)&&(C=m[ke],C!==void 0&&p1(o,d,ke,C,m,void 0));return}}for(Z in m)m.hasOwnProperty(Z)&&(C=m[Z],C!=null&&en(o,d,Z,C,m,null))}function Yq(o,d,m,C){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var P=null,M=null,q=null,Z=null,ae=null,ve=null,ke=null;for(Se in m){var je=m[Se];if(m.hasOwnProperty(Se)&&je!=null)switch(Se){case"checked":break;case"value":break;case"defaultValue":ae=je;default:C.hasOwnProperty(Se)||en(o,d,Se,null,C,je)}}for(var ye in C){var Se=C[ye];if(je=m[ye],C.hasOwnProperty(ye)&&(Se!=null||je!=null))switch(ye){case"type":M=Se;break;case"name":P=Se;break;case"checked":ve=Se;break;case"defaultChecked":ke=Se;break;case"value":q=Se;break;case"defaultValue":Z=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(r(137,d));break;default:Se!==je&&en(o,d,ye,Se,C,je)}}uf(o,q,Z,ae,ve,ke,M,P);return;case"select":Se=q=Z=ye=null;for(M in m)if(ae=m[M],m.hasOwnProperty(M)&&ae!=null)switch(M){case"value":break;case"multiple":Se=ae;default:C.hasOwnProperty(M)||en(o,d,M,null,C,ae)}for(P in C)if(M=C[P],ae=m[P],C.hasOwnProperty(P)&&(M!=null||ae!=null))switch(P){case"value":ye=M;break;case"defaultValue":Z=M;break;case"multiple":q=M;default:M!==ae&&en(o,d,P,M,C,ae)}d=Z,m=q,C=Se,ye!=null?ea(o,!!m,ye,!1):!!C!=!!m&&(d!=null?ea(o,!!m,d,!0):ea(o,!!m,m?[]:"",!1));return;case"textarea":Se=ye=null;for(Z in m)if(P=m[Z],m.hasOwnProperty(Z)&&P!=null&&!C.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:en(o,d,Z,null,C,P)}for(q in C)if(P=C[q],M=m[q],C.hasOwnProperty(q)&&(P!=null||M!=null))switch(q){case"value":ye=P;break;case"defaultValue":Se=P;break;case"children":break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:P!==M&&en(o,d,q,P,C,M)}gm(o,ye,Se);return;case"option":for(var Ye in m)ye=m[Ye],m.hasOwnProperty(Ye)&&ye!=null&&!C.hasOwnProperty(Ye)&&(Ye==="selected"?o.selected=!1:en(o,d,Ye,null,C,ye));for(ae in C)ye=C[ae],Se=m[ae],C.hasOwnProperty(ae)&&ye!==Se&&(ye!=null||Se!=null)&&(ae==="selected"?o.selected=ye&&typeof ye!="function"&&typeof ye!="symbol":en(o,d,ae,ye,C,Se));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 ht in m)ye=m[ht],m.hasOwnProperty(ht)&&ye!=null&&!C.hasOwnProperty(ht)&&en(o,d,ht,null,C,ye);for(ve in C)if(ye=C[ve],Se=m[ve],C.hasOwnProperty(ve)&&ye!==Se&&(ye!=null||Se!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,d));break;default:en(o,d,ve,ye,C,Se)}return;default:if(In(d)){for(var tn in m)ye=m[tn],m.hasOwnProperty(tn)&&ye!==void 0&&!C.hasOwnProperty(tn)&&p1(o,d,tn,void 0,C,ye);for(ke in C)ye=C[ke],Se=m[ke],!C.hasOwnProperty(ke)||ye===Se||ye===void 0&&Se===void 0||p1(o,d,ke,ye,C,Se);return}}for(var he in m)ye=m[he],m.hasOwnProperty(he)&&ye!=null&&!C.hasOwnProperty(he)&&en(o,d,he,null,C,ye);for(je in C)ye=C[je],Se=m[je],!C.hasOwnProperty(je)||ye===Se||ye==null&&Se==null||en(o,d,je,ye,C,Se)}function PM(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xq(){if(typeof performance.getEntriesByType=="function"){for(var o=0,d=0,m=performance.getEntriesByType("resource"),C=0;C<m.length;C++){var P=m[C],M=P.transferSize,q=P.initiatorType,Z=P.duration;if(M&&Z&&PM(q)){for(q=0,Z=P.responseEnd,C+=1;C<m.length;C++){var ae=m[C],ve=ae.startTime;if(ve>Z)break;var ke=ae.transferSize,je=ae.initiatorType;ke&&PM(je)&&(ae=ae.responseEnd,q+=ke*(ae<Z?1:(Z-ve)/(ae-ve)))}if(--C,d+=8*(M+q)/(P.duration/1e3),o++,10<o)break}}if(0<o)return d/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var m1=null,g1=null;function fg(o){return o.nodeType===9?o:o.ownerDocument}function MM(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function LM(o,d){if(o===0)switch(d){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&d==="foreignObject"?0:o}function v1(o,d){return o==="textarea"||o==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.children=="bigint"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var y1=null;function Qq(){var o=window.event;return o&&o.type==="popstate"?o===y1?!1:(y1=o,!0):(y1=null,!1)}var jM=typeof setTimeout=="function"?setTimeout:void 0,Zq=typeof clearTimeout=="function"?clearTimeout:void 0,DM=typeof Promise=="function"?Promise:void 0,Jq=typeof queueMicrotask=="function"?queueMicrotask:typeof DM<"u"?function(o){return DM.resolve(null).then(o).catch(eW)}:jM;function eW(o){setTimeout(function(){throw o})}function ya(o){return o==="head"}function IM(o,d){var m=d,C=0;do{var P=m.nextSibling;if(o.removeChild(m),P&&P.nodeType===8)if(m=P.data,m==="/$"||m==="/&"){if(C===0){o.removeChild(P),Cu(d);return}C--}else if(m==="$"||m==="$?"||m==="$~"||m==="$!"||m==="&")C++;else if(m==="html")Wf(o.ownerDocument.documentElement);else if(m==="head"){m=o.ownerDocument.head,Wf(m);for(var M=m.firstChild;M;){var q=M.nextSibling,Z=M.nodeName;M[ul]||Z==="SCRIPT"||Z==="STYLE"||Z==="LINK"&&M.rel.toLowerCase()==="stylesheet"||m.removeChild(M),M=q}}else m==="body"&&Wf(o.ownerDocument.body);m=P}while(m);Cu(d)}function NM(o,d){var m=o;o=0;do{var C=m.nextSibling;if(m.nodeType===1?d?(m._stashedDisplay=m.style.display,m.style.display="none"):(m.style.display=m._stashedDisplay||"",m.getAttribute("style")===""&&m.removeAttribute("style")):m.nodeType===3&&(d?(m._stashedText=m.nodeValue,m.nodeValue=""):m.nodeValue=m._stashedText||""),C&&C.nodeType===8)if(m=C.data,m==="/$"){if(o===0)break;o--}else m!=="$"&&m!=="$?"&&m!=="$~"&&m!=="$!"||o++;m=C}while(m)}function b1(o){var d=o.firstChild;for(d&&d.nodeType===10&&(d=d.nextSibling);d;){var m=d;switch(d=d.nextSibling,m.nodeName){case"HTML":case"HEAD":case"BODY":b1(m),dl(m);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(m.rel.toLowerCase()==="stylesheet")continue}o.removeChild(m)}}function tW(o,d,m,C){for(;o.nodeType===1;){var P=m;if(o.nodeName.toLowerCase()!==d.toLowerCase()){if(!C&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(C){if(!o[ul])switch(d){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(M=o.getAttribute("rel"),M==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(M!==P.rel||o.getAttribute("href")!==(P.href==null||P.href===""?null:P.href)||o.getAttribute("crossorigin")!==(P.crossOrigin==null?null:P.crossOrigin)||o.getAttribute("title")!==(P.title==null?null:P.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(M=o.getAttribute("src"),(M!==(P.src==null?null:P.src)||o.getAttribute("type")!==(P.type==null?null:P.type)||o.getAttribute("crossorigin")!==(P.crossOrigin==null?null:P.crossOrigin))&&M&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(d==="input"&&o.type==="hidden"){var M=P.name==null?null:""+P.name;if(P.type==="hidden"&&o.getAttribute("name")===M)return o}else return o;if(o=Ii(o.nextSibling),o===null)break}return null}function nW(o,d,m){if(d==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!m||(o=Ii(o.nextSibling),o===null))return null;return o}function BM(o,d){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=Ii(o.nextSibling),o===null))return null;return o}function _1(o){return o.data==="$?"||o.data==="$~"}function x1(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function rW(o,d){var m=o.ownerDocument;if(o.data==="$~")o._reactRetry=d;else if(o.data!=="$?"||m.readyState!=="loading")d();else{var C=function(){d(),m.removeEventListener("DOMContentLoaded",C)};m.addEventListener("DOMContentLoaded",C),o._reactRetry=C}}function Ii(o){for(;o!=null;o=o.nextSibling){var d=o.nodeType;if(d===1||d===3)break;if(d===8){if(d=o.data,d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"||d==="F!"||d==="F")break;if(d==="/$"||d==="/&")return null}}return o}var S1=null;function zM(o){o=o.nextSibling;for(var d=0;o;){if(o.nodeType===8){var m=o.data;if(m==="/$"||m==="/&"){if(d===0)return Ii(o.nextSibling);d--}else m!=="$"&&m!=="$!"&&m!=="$?"&&m!=="$~"&&m!=="&"||d++}o=o.nextSibling}return null}function HM(o){o=o.previousSibling;for(var d=0;o;){if(o.nodeType===8){var m=o.data;if(m==="$"||m==="$!"||m==="$?"||m==="$~"||m==="&"){if(d===0)return o;d--}else m!=="/$"&&m!=="/&"||d++}o=o.previousSibling}return null}function $M(o,d,m){switch(d=fg(m),o){case"html":if(o=d.documentElement,!o)throw Error(r(452));return o;case"head":if(o=d.head,!o)throw Error(r(453));return o;case"body":if(o=d.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Wf(o){for(var d=o.attributes;d.length;)o.removeAttributeNode(d[0]);dl(o)}var Ni=new Map,FM=new Set;function hg(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var To=K.d;K.d={f:iW,r:sW,D:oW,C:aW,L:lW,m:cW,X:dW,S:uW,M:fW};function iW(){var o=To.f(),d=ig();return o||d}function sW(o){var d=Rs(o);d!==null&&d.tag===5&&d.type==="form"?sP(d):To.r(o)}var xu=typeof document>"u"?null:document;function UM(o,d,m){var C=xu;if(C&&typeof d=="string"&&d){var P=Wr(d);P='link[rel="'+o+'"][href="'+P+'"]',typeof m=="string"&&(P+='[crossorigin="'+m+'"]'),FM.has(P)||(FM.add(P),o={rel:o,crossOrigin:m,href:d},C.querySelector(P)===null&&(d=C.createElement("link"),br(d,"link",o),Dn(d),C.head.appendChild(d)))}}function oW(o){To.D(o),UM("dns-prefetch",o,null)}function aW(o,d){To.C(o,d),UM("preconnect",o,d)}function lW(o,d,m){To.L(o,d,m);var C=xu;if(C&&o&&d){var P='link[rel="preload"][as="'+Wr(d)+'"]';d==="image"&&m&&m.imageSrcSet?(P+='[imagesrcset="'+Wr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(P+='[imagesizes="'+Wr(m.imageSizes)+'"]')):P+='[href="'+Wr(o)+'"]';var M=P;switch(d){case"style":M=Su(o);break;case"script":M=wu(o)}Ni.has(M)||(o=f({rel:"preload",href:d==="image"&&m&&m.imageSrcSet?void 0:o,as:d},m),Ni.set(M,o),C.querySelector(P)!==null||d==="style"&&C.querySelector(Gf(M))||d==="script"&&C.querySelector(Kf(M))||(d=C.createElement("link"),br(d,"link",o),Dn(d),C.head.appendChild(d)))}}function cW(o,d){To.m(o,d);var m=xu;if(m&&o){var C=d&&typeof d.as=="string"?d.as:"script",P='link[rel="modulepreload"][as="'+Wr(C)+'"][href="'+Wr(o)+'"]',M=P;switch(C){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=wu(o)}if(!Ni.has(M)&&(o=f({rel:"modulepreload",href:o},d),Ni.set(M,o),m.querySelector(P)===null)){switch(C){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Kf(M)))return}C=m.createElement("link"),br(C,"link",o),Dn(C),m.head.appendChild(C)}}}function uW(o,d,m){To.S(o,d,m);var C=xu;if(C&&o){var P=os(C).hoistableStyles,M=Su(o);d=d||"default";var q=P.get(M);if(!q){var Z={loading:0,preload:null};if(q=C.querySelector(Gf(M)))Z.loading=5;else{o=f({rel:"stylesheet",href:o,"data-precedence":d},m),(m=Ni.get(M))&&w1(o,m);var ae=q=C.createElement("link");Dn(ae),br(ae,"link",o),ae._p=new Promise(function(ve,ke){ae.onload=ve,ae.onerror=ke}),ae.addEventListener("load",function(){Z.loading|=1}),ae.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,pg(q,d,C)}q={type:"stylesheet",instance:q,count:1,state:Z},P.set(M,q)}}}function dW(o,d){To.X(o,d);var m=xu;if(m&&o){var C=os(m).hoistableScripts,P=wu(o),M=C.get(P);M||(M=m.querySelector(Kf(P)),M||(o=f({src:o,async:!0},d),(d=Ni.get(P))&&C1(o,d),M=m.createElement("script"),Dn(M),br(M,"link",o),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},C.set(P,M))}}function fW(o,d){To.M(o,d);var m=xu;if(m&&o){var C=os(m).hoistableScripts,P=wu(o),M=C.get(P);M||(M=m.querySelector(Kf(P)),M||(o=f({src:o,async:!0,type:"module"},d),(d=Ni.get(P))&&C1(o,d),M=m.createElement("script"),Dn(M),br(M,"link",o),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},C.set(P,M))}}function VM(o,d,m,C){var P=(P=ie.current)?hg(P):null;if(!P)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(d=Su(m.href),m=os(P).hoistableStyles,C=m.get(d),C||(C={type:"style",instance:null,count:0,state:null},m.set(d,C)),C):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){o=Su(m.href);var M=os(P).hoistableStyles,q=M.get(o);if(q||(P=P.ownerDocument||P,q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(o,q),(M=P.querySelector(Gf(o)))&&!M._p&&(q.instance=M,q.state.loading=5),Ni.has(o)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},Ni.set(o,m),M||hW(P,o,m,q.state))),d&&C===null)throw Error(r(528,""));return q}if(d&&C!==null)throw Error(r(529,""));return null;case"script":return d=m.async,m=m.src,typeof m=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=wu(m),m=os(P).hoistableScripts,C=m.get(d),C||(C={type:"script",instance:null,count:0,state:null},m.set(d,C)),C):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Su(o){return'href="'+Wr(o)+'"'}function Gf(o){return'link[rel="stylesheet"]['+o+"]"}function qM(o){return f({},o,{"data-precedence":o.precedence,precedence:null})}function hW(o,d,m,C){o.querySelector('link[rel="preload"][as="style"]['+d+"]")?C.loading=1:(d=o.createElement("link"),C.preload=d,d.addEventListener("load",function(){return C.loading|=1}),d.addEventListener("error",function(){return C.loading|=2}),br(d,"link",m),Dn(d),o.head.appendChild(d))}function wu(o){return'[src="'+Wr(o)+'"]'}function Kf(o){return"script[async]"+o}function WM(o,d,m){if(d.count++,d.instance===null)switch(d.type){case"style":var C=o.querySelector('style[data-href~="'+Wr(m.href)+'"]');if(C)return d.instance=C,Dn(C),C;var P=f({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return C=(o.ownerDocument||o).createElement("style"),Dn(C),br(C,"style",P),pg(C,m.precedence,o),d.instance=C;case"stylesheet":P=Su(m.href);var M=o.querySelector(Gf(P));if(M)return d.state.loading|=4,d.instance=M,Dn(M),M;C=qM(m),(P=Ni.get(P))&&w1(C,P),M=(o.ownerDocument||o).createElement("link"),Dn(M);var q=M;return q._p=new Promise(function(Z,ae){q.onload=Z,q.onerror=ae}),br(M,"link",C),d.state.loading|=4,pg(M,m.precedence,o),d.instance=M;case"script":return M=wu(m.src),(P=o.querySelector(Kf(M)))?(d.instance=P,Dn(P),P):(C=m,(P=Ni.get(M))&&(C=f({},m),C1(C,P)),o=o.ownerDocument||o,P=o.createElement("script"),Dn(P),br(P,"link",C),o.head.appendChild(P),d.instance=P);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(C=d.instance,d.state.loading|=4,pg(C,m.precedence,o));return d.instance}function pg(o,d,m){for(var C=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),P=C.length?C[C.length-1]:null,M=P,q=0;q<C.length;q++){var Z=C[q];if(Z.dataset.precedence===d)M=Z;else if(M!==P)break}M?M.parentNode.insertBefore(o,M.nextSibling):(d=m.nodeType===9?m.head:m,d.insertBefore(o,d.firstChild))}function w1(o,d){o.crossOrigin==null&&(o.crossOrigin=d.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=d.referrerPolicy),o.title==null&&(o.title=d.title)}function C1(o,d){o.crossOrigin==null&&(o.crossOrigin=d.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=d.referrerPolicy),o.integrity==null&&(o.integrity=d.integrity)}var mg=null;function GM(o,d,m){if(mg===null){var C=new Map,P=mg=new Map;P.set(m,C)}else P=mg,C=P.get(m),C||(C=new Map,P.set(m,C));if(C.has(o))return C;for(C.set(o,null),m=m.getElementsByTagName(o),P=0;P<m.length;P++){var M=m[P];if(!(M[ul]||M[Ln]||o==="link"&&M.getAttribute("rel")==="stylesheet")&&M.namespaceURI!=="http://www.w3.org/2000/svg"){var q=M.getAttribute(d)||"";q=o+q;var Z=C.get(q);Z?Z.push(M):C.set(q,[M])}}return C}function KM(o,d,m){o=o.ownerDocument||o,o.head.insertBefore(m,d==="title"?o.querySelector("head > title"):null)}function pW(o,d,m){if(m===1||d.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;return d.rel==="stylesheet"?(o=d.disabled,typeof d.precedence=="string"&&o==null):!0;case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function YM(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function mW(o,d,m,C){if(m.type==="stylesheet"&&(typeof C.media!="string"||matchMedia(C.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var P=Su(C.href),M=d.querySelector(Gf(P));if(M){d=M._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(o.count++,o=gg.bind(o),d.then(o,o)),m.state.loading|=4,m.instance=M,Dn(M);return}M=d.ownerDocument||d,C=qM(C),(P=Ni.get(P))&&w1(C,P),M=M.createElement("link"),Dn(M);var q=M;q._p=new Promise(function(Z,ae){q.onload=Z,q.onerror=ae}),br(M,"link",C),m.instance=M}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(m,d),(d=m.state.preload)&&(m.state.loading&3)===0&&(o.count++,m=gg.bind(o),d.addEventListener("load",m),d.addEventListener("error",m))}}var E1=0;function gW(o,d){return o.stylesheets&&o.count===0&&yg(o,o.stylesheets),0<o.count||0<o.imgCount?function(m){var C=setTimeout(function(){if(o.stylesheets&&yg(o,o.stylesheets),o.unsuspend){var M=o.unsuspend;o.unsuspend=null,M()}},6e4+d);0<o.imgBytes&&E1===0&&(E1=62500*Xq());var P=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&yg(o,o.stylesheets),o.unsuspend)){var M=o.unsuspend;o.unsuspend=null,M()}},(o.imgBytes>E1?50:800)+d);return o.unsuspend=m,function(){o.unsuspend=null,clearTimeout(C),clearTimeout(P)}}:null}function gg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yg(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var vg=null;function yg(o,d){o.stylesheets=null,o.unsuspend!==null&&(o.count++,vg=new Map,d.forEach(vW,o),vg=null,gg.call(o))}function vW(o,d){if(!(d.state.loading&4)){var m=vg.get(o);if(m)var C=m.get(null);else{m=new Map,vg.set(o,m);for(var P=o.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M<P.length;M++){var q=P[M];(q.nodeName==="LINK"||q.getAttribute("media")!=="not all")&&(m.set(q.dataset.precedence,q),C=q)}C&&m.set(null,C)}P=d.instance,q=P.getAttribute("data-precedence"),M=m.get(q)||C,M===C&&m.set(null,P),m.set(q,P),this.count++,C=gg.bind(this),P.addEventListener("load",C),P.addEventListener("error",C),M?M.parentNode.insertBefore(P,M.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(P,o.firstChild)),d.state.loading|=4}}var Yf={$$typeof:_,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function yW(o,d,m,C,P,M,q,Z,ae){this.tag=1,this.containerInfo=o,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=C,this.onUncaughtError=P,this.onCaughtError=M,this.onRecoverableError=q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ae,this.incompleteTransitions=new Map}function XM(o,d,m,C,P,M,q,Z,ae,ve,ke,je){return o=new yW(o,d,m,q,ae,ve,ke,je,Z),d=1,M===!0&&(d|=24),M=fi(3,null,null,d),o.current=M,M.stateNode=o,d=i_(),d.refCount++,o.pooledCache=d,d.refCount++,M.memoizedState={element:C,isDehydrated:m,cache:d},l_(M),o}function QM(o){return o?(o=eu,o):eu}function ZM(o,d,m,C,P,M){P=QM(P),C.context===null?C.context=P:C.pendingContext=P,C=aa(d),C.payload={element:m},M=M===void 0?null:M,M!==null&&(C.callback=M),m=la(o,C,d),m!==null&&(Zr(m,o,d),kf(m,o,d))}function JM(o,d){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var m=o.retryLane;o.retryLane=m!==0&&m<d?m:d}}function T1(o,d){JM(o,d),(o=o.alternate)&&JM(o,d)}function e5(o){if(o.tag===13||o.tag===31){var d=gl(o,67108864);d!==null&&Zr(d,o,67108864),T1(o,67108864)}}function t5(o){if(o.tag===13||o.tag===31){var d=vi();d=Er(d);var m=gl(o,d);m!==null&&Zr(m,o,d),T1(o,d)}}var bg=!0;function bW(o,d,m,C){var P=H.T;H.T=null;var M=K.p;try{K.p=2,k1(o,d,m,C)}finally{K.p=M,H.T=P}}function _W(o,d,m,C){var P=H.T;H.T=null;var M=K.p;try{K.p=8,k1(o,d,m,C)}finally{K.p=M,H.T=P}}function k1(o,d,m,C){if(bg){var P=O1(C);if(P===null)h1(o,d,C,_g,m),r5(o,C);else if(SW(P,o,d,m,C))C.stopPropagation();else if(r5(o,C),d&4&&-1<xW.indexOf(o)){for(;P!==null;){var M=Rs(P);if(M!==null)switch(M.tag){case 3:if(M=M.stateNode,M.current.memoizedState.isDehydrated){var q=xt(M.pendingLanes);if(q!==0){var Z=M;for(Z.pendingLanes|=2,Z.entangledLanes|=2;q;){var ae=1<<31-dt(q);Z.entanglements[1]|=ae,q&=~ae}Ls(M),(Vt&6)===0&&(ng=Ae()+500,Uf(0))}}break;case 31:case 13:Z=gl(M,2),Z!==null&&Zr(Z,M,2),ig(),T1(M,2)}if(M=O1(C),M===null&&h1(o,d,C,_g,m),M===P)break;P=M}P!==null&&C.stopPropagation()}else h1(o,d,C,null,m)}}function O1(o){return o=A0(o),R1(o)}var _g=null;function R1(o){if(_g=null,o=so(o),o!==null){var d=s(o);if(d===null)o=null;else{var m=d.tag;if(m===13){if(o=l(d),o!==null)return o;o=null}else if(m===31){if(o=a(d),o!==null)return o;o=null}else if(m===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;o=null}else d!==o&&(o=null)}}return _g=o,null}function n5(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case We:return 2;case rt:return 8;case Ue:case ot:return 32;case tt:return 268435456;default:return 32}default:return 32}}var A1=!1,ba=null,_a=null,xa=null,Xf=new Map,Qf=new Map,Sa=[],xW="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 r5(o,d){switch(o){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Xf.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qf.delete(d.pointerId)}}function Zf(o,d,m,C,P,M){return o===null||o.nativeEvent!==M?(o={blockedOn:d,domEventName:m,eventSystemFlags:C,nativeEvent:M,targetContainers:[P]},d!==null&&(d=Rs(d),d!==null&&e5(d)),o):(o.eventSystemFlags|=C,d=o.targetContainers,P!==null&&d.indexOf(P)===-1&&d.push(P),o)}function SW(o,d,m,C,P){switch(d){case"focusin":return ba=Zf(ba,o,d,m,C,P),!0;case"dragenter":return _a=Zf(_a,o,d,m,C,P),!0;case"mouseover":return xa=Zf(xa,o,d,m,C,P),!0;case"pointerover":var M=P.pointerId;return Xf.set(M,Zf(Xf.get(M)||null,o,d,m,C,P)),!0;case"gotpointercapture":return M=P.pointerId,Qf.set(M,Zf(Qf.get(M)||null,o,d,m,C,P)),!0}return!1}function i5(o){var d=so(o.target);if(d!==null){var m=s(d);if(m!==null){if(d=m.tag,d===13){if(d=l(m),d!==null){o.blockedOn=d,Vc(o.priority,function(){t5(m)});return}}else if(d===31){if(d=a(m),d!==null){o.blockedOn=d,Vc(o.priority,function(){t5(m)});return}}else if(d===3&&m.stateNode.current.memoizedState.isDehydrated){o.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}o.blockedOn=null}function xg(o){if(o.blockedOn!==null)return!1;for(var d=o.targetContainers;0<d.length;){var m=O1(o.nativeEvent);if(m===null){m=o.nativeEvent;var C=new m.constructor(m.type,m);vm=C,m.target.dispatchEvent(C),vm=null}else return d=Rs(m),d!==null&&e5(d),o.blockedOn=m,!1;d.shift()}return!0}function s5(o,d,m){xg(o)&&m.delete(d)}function wW(){A1=!1,ba!==null&&xg(ba)&&(ba=null),_a!==null&&xg(_a)&&(_a=null),xa!==null&&xg(xa)&&(xa=null),Xf.forEach(s5),Qf.forEach(s5)}function Sg(o,d){o.blockedOn===d&&(o.blockedOn=null,A1||(A1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,wW)))}var wg=null;function o5(o){wg!==o&&(wg=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){wg===o&&(wg=null);for(var d=0;d<o.length;d+=3){var m=o[d],C=o[d+1],P=o[d+2];if(typeof C!="function"){if(R1(C||m)===null)continue;break}var M=Rs(m);M!==null&&(o.splice(d,3),d-=3,O_(M,{pending:!0,data:P,method:m.method,action:C},C,P))}}))}function Cu(o){function d(ae){return Sg(ae,o)}ba!==null&&Sg(ba,o),_a!==null&&Sg(_a,o),xa!==null&&Sg(xa,o),Xf.forEach(d),Qf.forEach(d);for(var m=0;m<Sa.length;m++){var C=Sa[m];C.blockedOn===o&&(C.blockedOn=null)}for(;0<Sa.length&&(m=Sa[0],m.blockedOn===null);)i5(m),m.blockedOn===null&&Sa.shift();if(m=(o.ownerDocument||o).$$reactFormReplay,m!=null)for(C=0;C<m.length;C+=3){var P=m[C],M=m[C+1],q=P[jn]||null;if(typeof M=="function")q||o5(m);else if(q){var Z=null;if(M&&M.hasAttribute("formAction")){if(P=M,q=M[jn]||null)Z=q.formAction;else if(R1(P)!==null)continue}else Z=q.action;typeof Z=="function"?m[C+1]=Z:(m.splice(C,3),C-=3),o5(m)}}}function a5(){function o(M){M.canIntercept&&M.info==="react-transition"&&M.intercept({handler:function(){return new Promise(function(q){return P=q})},focusReset:"manual",scroll:"manual"})}function d(){P!==null&&(P(),P=null),C||setTimeout(m,20)}function m(){if(!C&&!navigation.transition){var M=navigation.currentEntry;M&&M.url!=null&&navigation.navigate(M.url,{state:M.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var C=!1,P=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",d),navigation.addEventListener("navigateerror",d),setTimeout(m,100),function(){C=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",d),navigation.removeEventListener("navigateerror",d),P!==null&&(P(),P=null)}}}function P1(o){this._internalRoot=o}Cg.prototype.render=P1.prototype.render=function(o){var d=this._internalRoot;if(d===null)throw Error(r(409));var m=d.current,C=vi();ZM(m,C,o,d,null,null)},Cg.prototype.unmount=P1.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var d=o.containerInfo;ZM(o.current,2,null,o,null,null),ig(),d[Os]=null}};function Cg(o){this._internalRoot=o}Cg.prototype.unstable_scheduleHydration=function(o){if(o){var d=ks();o={blockedOn:null,target:o,priority:d};for(var m=0;m<Sa.length&&d!==0&&d<Sa[m].priority;m++);Sa.splice(m,0,o),m===0&&i5(o)}};var l5=t.version;if(l5!=="19.2.3")throw Error(r(527,l5,"19.2.3"));K.findDOMNode=function(o){var d=o._reactInternals;if(d===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=u(d),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var CW={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eg.isDisabled&&Eg.supportsFiber)try{xe=Eg.inject(CW),Ce=Eg}catch{}}return eh.createRoot=function(o,d){if(!i(o))throw Error(r(299));var m=!1,C="",P=mP,M=gP,q=vP;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(C=d.identifierPrefix),d.onUncaughtError!==void 0&&(P=d.onUncaughtError),d.onCaughtError!==void 0&&(M=d.onCaughtError),d.onRecoverableError!==void 0&&(q=d.onRecoverableError)),d=XM(o,1,!1,null,null,m,C,null,P,M,q,a5),o[Os]=d.current,f1(o),new P1(d)},eh.hydrateRoot=function(o,d,m){if(!i(o))throw Error(r(299));var C=!1,P="",M=mP,q=gP,Z=vP,ae=null;return m!=null&&(m.unstable_strictMode===!0&&(C=!0),m.identifierPrefix!==void 0&&(P=m.identifierPrefix),m.onUncaughtError!==void 0&&(M=m.onUncaughtError),m.onCaughtError!==void 0&&(q=m.onCaughtError),m.onRecoverableError!==void 0&&(Z=m.onRecoverableError),m.formState!==void 0&&(ae=m.formState)),d=XM(o,1,!0,d,m??null,C,P,ae,M,q,Z,a5),d.context=QM(null),m=d.current,C=vi(),C=Er(C),P=aa(C),P.callback=null,la(m,P,C),m=C,d.current.lanes=m,Et(d,m),Ls(d),o[Os]=d.current,f1(o),new Cg(d)},eh.version="19.2.3",eh}var y5;function jW(){if(y5)return j1.exports;y5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),j1.exports=LW(),j1.exports}var DW=jW();const AE=new WeakMap,IW=new WeakMap,Rv={current:[]};let B1=!1,kh=0;const _h=new Set,kg=new Map;function J8(e){for(const t of e){if(Rv.current.includes(t))continue;Rv.current.push(t),t.recompute();const n=IW.get(t);if(n)for(const r of n){const i=AE.get(r);i?.length&&J8(i)}}}function NW(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function BW(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function e9(e){if(kh>0&&!kg.has(e)&&kg.set(e,e.prevState),_h.add(e),!(kh>0)&&!B1)try{for(B1=!0;_h.size>0;){const t=Array.from(_h);_h.clear();for(const n of t){const r=kg.get(n)??n.prevState;n.prevState=r,NW(n)}for(const n of t){const r=AE.get(n);r&&(Rv.current.push(n),J8(r))}for(const n of t){const r=AE.get(n);if(r)for(const i of r)BW(i)}}}finally{B1=!1,Rv.current=[],kg.clear()}}function Oh(e){kh++;try{e()}finally{if(kh--,kh===0){const t=_h.values().next().value;t&&e9(t)}}}function zW(e){return typeof e=="function"}let HW=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,s;this.listeners.add(r);const l=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):zW(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),e9(this)}};const Na="__TSR_index",b5="popstate",_5="beforeunload";function $W(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},s=async({task:l,navigateOpts:a,...c})=>{if(a?.ignoreBlocker??!1){l();return}const h=e.getBlockers?.()??[],f=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&h.length&&f)for(const p of h){const v=Av(c.path,c.state);if(await p.blockerFn({currentLocation:t,nextLocation:v,action:c.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,a,c)=>{const u=t.state[Na];a=x5(u+1,a),s({task:()=>{e.pushState(l,a),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:l,state:a})},replace:(l,a,c)=>{const u=t.state[Na];a=x5(u,a),s({task:()=>{e.replaceState(l,a),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:l,state:a})},go:(l,a)=>{s({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:a,type:"GO"})},back:l=>{s({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{s({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Na]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,l]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function x5(e,t){t||(t={});const n=VT();return{...t,key:n,__TSR_key:n,[Na]:e}}function FW(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,l=R=>i=R,a=(R=>R),c=(()=>Av(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=VT();t.history.replaceState({[Na]:0,key:R,__TSR_key:R},"")}let u=c(),h,f=!1,p=!1,v=!1,S=!1;const x=()=>u;let g,b;const y=()=>{g&&(A._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,"",g.href),A._ignoreSubscribers=!1,g=void 0,b=void 0,h=void 0)},_=(R,L,z)=>{const D=a(L);b||(h=u),u=Av(L,z),g={href:D,state:z,isPush:g?.isPush||R==="push"},b||(b=Promise.resolve().then(()=>y()))},T=R=>{u=c(),A.notify({type:R})},E=async()=>{if(p){p=!1;return}const R=c(),L=R.state[Na]-u.state[Na],z=L===1,D=L===-1,$=!z&&!D||f;f=!1;const N=$?"GO":D?"BACK":"FORWARD",F=$?{type:"GO",index:L}:{type:D?"BACK":"FORWARD"};if(v)v=!1;else{const U=s();if(typeof document<"u"&&U.length){for(const H of U)if(await H.blockerFn({currentLocation:u,nextLocation:R,action:N})){p=!0,t.history.go(1),A.notify(F);return}}}u=c(),A.notify(F)},k=R=>{if(S){S=!1;return}let L=!1;const z=s();if(typeof document<"u"&&z.length)for(const D of z){const $=D.enableBeforeUnload??!0;if($===!0){L=!0;break}if(typeof $=="function"&&$()===!0){L=!0;break}}if(L)return R.preventDefault(),R.returnValue=""},A=$W({getLocation:x,getLength:()=>t.history.length,pushState:(R,L)=>_("push",R,L),replaceState:(R,L)=>_("replace",R,L),back:R=>(R&&(v=!0),S=!0,t.history.back()),forward:R=>{R&&(v=!0),S=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>a(R),flush:y,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(_5,k,{capture:!0}),t.removeEventListener(b5,E)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:s,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(_5,k,{capture:!0}),t.addEventListener(b5,E),t.history.pushState=function(...R){const L=n.apply(t.history,R);return A._ignoreSubscribers||T("PUSH"),L},t.history.replaceState=function(...R){const L=r.apply(t.history,R);return A._ignoreSubscribers||T("REPLACE"),L},A}function Av(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),i=VT();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Na]:0,key:i,__TSR_key:i}}}function VT(){return(Math.random()+1).toString(36).substring(7)}function Pv(e){return e[e.length-1]}function UW(e){return typeof e=="function"}function Aa(e,t){return UW(e)?e(t):e}const VW=Object.prototype.hasOwnProperty;function Ui(e,t){if(e===t)return e;const n=t,r=C5(e)&&C5(n);if(!r&&!(Mv(e)&&Mv(n)))return n;const i=r?e:S5(e);if(!i)return n;const s=r?n:S5(n);if(!s)return n;const l=i.length,a=s.length,c=r?new Array(a):{};let u=0;for(let h=0;h<a;h++){const f=r?h:s[h],p=e[f],v=n[f];if(p===v){c[f]=p,(r?h<l:VW.call(e,f))&&u++;continue}if(p===null||v===null||typeof p!="object"||typeof v!="object"){c[f]=v;continue}const S=Ui(p,v);c[f]=S,S===p&&u++}return l===a&&u===l?e:c}function S5(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const r=Object.getOwnPropertySymbols(e);for(const i of r){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function Mv(e){if(!w5(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!w5(n)||!n.hasOwnProperty("isPrototypeOf"))}function w5(e){return Object.prototype.toString.call(e)==="[object Object]"}function C5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nc(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!nc(e[r],t[r],n))return!1;return!0}if(Mv(e)&&Mv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!nc(e[l],t[l],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&i++;let s=0;for(const l in t)if((!r||t[l]!==void 0)&&(s++,s>i||!nc(e[l],t[l],n)))return!1;return i===s}return!1}function Yu(e){let t,n;const r=new Promise((i,s)=>{t=i,n=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function Ba(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function E5(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function T5(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",s;for(;(s=n.exec(e))!==null;)i+=E5(e.slice(r,s.index))+s[0],r=n.lastIndex;return i+E5(r?e.slice(r):e)}var qW="Invariant failed";function Dr(e,t){if(!e)throw new Error(qW)}function Lv(e){const t=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const l=t.get(s);if(l)return i(l),l.value},set(s,l){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const a=t.get(s);if(a)a.value=l,i(a);else{const c={key:s,value:l,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(s,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const Xu=0,vc=1,yc=2,zh=3,WW=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,GW=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,KW=/^([^{]*)\{\$\}([^}]*)$/;function qT(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,s=e.substring(t,i);if(!s||!s.includes("$"))return n[0]=Xu,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(s==="$"){const u=e.length;return n[0]=yc,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(s.charCodeAt(0)===36)return n[0]=vc,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=s.match(KW);if(l){const h=l[1].length;return n[0]=yc,n[1]=t+h,n[2]=t+h+1,n[3]=t+h+2,n[4]=t+h+3,n[5]=e.length,n}const a=s.match(GW);if(a){const u=a[1],h=a[2],f=a[3],p=u.length;return n[0]=zh,n[1]=t+p,n[2]=t+p+3,n[3]=t+p+3+h.length,n[4]=i-f.length,n[5]=i,n}const c=s.match(WW);if(c){const u=c[1],h=c[2],f=c[3],p=u.length;return n[0]=vc,n[1]=t+p,n[2]=t+p+2,n[3]=t+p+2+h.length,n[4]=i-f.length,n[5]=i,n}return n[0]=Xu,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function hb(e,t,n,r,i,s,l){l?.(n);let a=r;{const c=n.fullPath??n.from,u=c.length,h=n.options?.caseSensitive??e;for(;a<u;){const f=qT(c,a,t);let p;const v=a,S=f[5];switch(a=S+1,s++,f[0]){case Xu:{const g=c.substring(f[2],f[3]);if(h){const b=i.static?.get(g);if(b)p=b;else{i.static??=new Map;const y=Hh(n.fullPath??n.from);y.parent=i,y.depth=s,p=y,i.static.set(g,y)}}else{const b=g.toLowerCase(),y=i.staticInsensitive?.get(b);if(y)p=y;else{i.staticInsensitive??=new Map;const _=Hh(n.fullPath??n.from);_.parent=i,_.depth=s,p=_,i.staticInsensitive.set(b,_)}}break}case vc:{const g=c.substring(v,f[1]),b=c.substring(f[4],S),y=h&&!!(g||b),_=g?y?g:g.toLowerCase():void 0,T=b?y?b:b.toLowerCase():void 0,E=i.dynamic?.find(k=>k.caseSensitive===y&&k.prefix===_&&k.suffix===T);if(E)p=E;else{const k=H1(vc,n.fullPath??n.from,y,_,T);p=k,k.depth=s,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case zh:{const g=c.substring(v,f[1]),b=c.substring(f[4],S),y=h&&!!(g||b),_=g?y?g:g.toLowerCase():void 0,T=b?y?b:b.toLowerCase():void 0,E=i.optional?.find(k=>k.caseSensitive===y&&k.prefix===_&&k.suffix===T);if(E)p=E;else{const k=H1(zh,n.fullPath??n.from,y,_,T);p=k,k.parent=i,k.depth=s,i.optional??=[],i.optional.push(k)}break}case yc:{const g=c.substring(v,f[1]),b=c.substring(f[4],S),y=h&&!!(g||b),_=g?y?g:g.toLowerCase():void 0,T=b?y?b:b.toLowerCase():void 0,E=H1(yc,n.fullPath??n.from,y,_,T);p=E,E.parent=i,E.depth=s,i.wildcard??=[],i.wildcard.push(E)}}i=p}if((n.path||!n.children)&&!n.isRoot){const f=c.endsWith("/");f||(i.notFound=n),(!i.route||!i.isIndex&&f)&&(i.route=n,i.fullPath=n.fullPath??n.from),i.isIndex||=f}}if(n.children)for(const c of n.children)hb(e,t,c,a,i,s,l)}function z1(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function zl(e){if(e.static)for(const t of e.static.values())zl(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())zl(t);if(e.dynamic?.length){e.dynamic.sort(z1);for(const t of e.dynamic)zl(t)}if(e.optional?.length){e.optional.sort(z1);for(const t of e.optional)zl(t)}if(e.wildcard?.length){e.wildcard.sort(z1);for(const t of e.wildcard)zl(t)}}function Hh(e){return{kind:Xu,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function H1(e,t,n,r,i){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:i}}function YW(e,t){const n=Hh("/"),r=new Uint16Array(6);for(const i of e)hb(!1,r,i,1,n,0);zl(n),t.masksTree=n,t.flatCache=Lv(1e3)}function XW(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=WT(e,t.masksTree);return t.flatCache.set(e,r),r}function QW(e,t,n,r,i){e||="/",r||="/";const s=t?`case\0${e}`:e;let l=i.singleCache.get(s);if(!l){l=Hh("/");const a=new Uint16Array(6);hb(t,a,{from:e},1,l,0),i.singleCache.set(s,l)}return WT(r,l,n)}function ZW(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";const s=WT(e,t.segmentTree,n);return s&&(s.branch=nG(s.route)),t.matchCache.set(r,s),s}function JW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function eG(e,t=!1,n){const r=Hh(e.fullPath),i=new Uint16Array(6),s={},l={};let a=0;return hb(t,i,e,1,r,0,u=>{if(n?.(u,a),Dr(!(u.id in s),`Duplicate routes found with id: ${String(u.id)}`),s[u.id]=u,a!==0&&u.path){const h=JW(u.fullPath);(!l[h]||u.fullPath.endsWith("/"))&&(l[h]=u)}a++}),zl(r),{processedTree:{segmentTree:r,singleCache:Lv(1e3),matchCache:Lv(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:l}}function WT(e,t,n=!1){const r=e.split("/"),i=iG(e,r,t,n);if(!i)return null;const s=tG(e,r,i),l="**"in i;return l&&(s["**"]=i["**"]),{route:l?i.node.notFound??i.node.route:i.node.route,params:s}}function tG(e,t,n){const r=rG(n.node);let i=null;const s={};for(let l=0,a=0,c=0;a<r.length;l++,a++,c++){const u=r[a],h=t[l],f=c;if(h&&(c+=h.length),u.kind===vc){i??=n.node.fullPath.split("/");const p=i[a],v=u.prefix?.length??0;if(p.charCodeAt(v)===123){const x=u.suffix?.length??0,g=p.substring(v+2,p.length-x-1),b=h.substring(v,h.length-x);s[g]=decodeURIComponent(b)}else{const x=p.substring(1);s[x]=decodeURIComponent(h)}}else if(u.kind===zh){if(n.skipped&1<<a){l--;continue}i??=n.node.fullPath.split("/");const p=i[a],v=u.prefix?.length??0,S=u.suffix?.length??0,x=p.substring(v+3,p.length-S-1),g=u.suffix||u.prefix?h.substring(v,h.length-S):h;g&&(s[x]=decodeURIComponent(g))}else if(u.kind===yc){const p=u,v=e.substring(f+(p.prefix?.length??0),e.length-(p.suffix?.length??0)),S=decodeURIComponent(v);s["*"]=S,s._splat=S;break}}return s}function nG(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function rG(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function iG(e,t,n,r){const i=!Pv(t),s=i&&e!=="/",l=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,h=null;for(;a.length;){const f=a.pop();let{node:p,index:v,skipped:S,depth:x,statics:g,dynamics:b,optionals:y}=f;r&&p.notFound&&Og(u,f)&&(u=f);const _=v===l;if(_){if(p.route&&(!s||p.isIndex)&&(Og(h,f)&&(h=f),g===l&&p.isIndex))return h;if(!p.optional&&!p.wildcard)continue}const T=_?void 0:t[v];let E;if(p.wildcard&&Og(c,f))for(const k of p.wildcard){const{prefix:A,suffix:R}=k;if(!(A&&(_||!(k.caseSensitive?T:E??=T.toLowerCase()).startsWith(A)))){if(R){if(_)continue;const L=t.slice(v).join("/").slice(-R.length);if((k.caseSensitive?L:L.toLowerCase())!==R)continue}c={node:k,index:v,skipped:S,depth:x,statics:g,dynamics:b,optionals:y};break}}if(p.optional){const k=S|1<<x,A=x+1;for(let R=p.optional.length-1;R>=0;R--){const L=p.optional[R];a.push({node:L,index:v,skipped:k,depth:A,statics:g,dynamics:b,optionals:y})}if(!_)for(let R=p.optional.length-1;R>=0;R--){const L=p.optional[R],{prefix:z,suffix:D}=L;if(z||D){const $=L.caseSensitive?T:E??=T.toLowerCase();if(z&&!$.startsWith(z)||D&&!$.endsWith(D))continue}a.push({node:L,index:v+1,skipped:S,depth:A,statics:g,dynamics:b,optionals:y+1})}}if(!_&&p.dynamic&&T)for(let k=p.dynamic.length-1;k>=0;k--){const A=p.dynamic[k],{prefix:R,suffix:L}=A;if(R||L){const z=A.caseSensitive?T:E??=T.toLowerCase();if(R&&!z.startsWith(R)||L&&!z.endsWith(L))continue}a.push({node:A,index:v+1,skipped:S,depth:x+1,statics:g,dynamics:b+1,optionals:y})}if(!_&&p.staticInsensitive){const k=p.staticInsensitive.get(E??=T.toLowerCase());k&&a.push({node:k,index:v+1,skipped:S,depth:x+1,statics:g+1,dynamics:b,optionals:y})}if(!_&&p.static){const k=p.static.get(T);k&&a.push({node:k,index:v+1,skipped:S,depth:x+1,statics:g+1,dynamics:b,optionals:y})}}if(h&&c)return Og(c,h)?h:c;if(h)return h;if(c)return c;if(r&&u){let f=u.index;for(let v=0;v<u.index;v++)f+=t[v].length;const p=f===e.length?"/":e.slice(f);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(p)}}return null}function Og(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function xv(e){return GT(e.filter(t=>t!==void 0).join("/"))}function GT(e){return e.replace(/\/{2,}/g,"/")}function t9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function rc(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function n9(e){return rc(t9(e))}function jv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function sG(e,t,n){return jv(e,n)===jv(t,n)}function oG({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),s=!i&&t===".";let l;if(r){l=i?t:s?e:e+"\0"+t;const f=r.get(l);if(f)return f}let a;if(s)a=e.split("/");else if(i)a=t.split("/");else{for(a=e.split("/");a.length>1&&Pv(a)==="";)a.pop();const f=t.split("/");for(let p=0,v=f.length;p<v;p++){const S=f[p];S===""?p?p===v-1&&a.push(S):a=[S]:S===".."?a.pop():S==="."||a.push(S)}}a.length>1&&(Pv(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let c,u="";for(let f=0;f<a.length;f++){f>0&&(u+="/");const p=a[f];if(!p)continue;c=qT(p,0,c);const v=c[0];if(v===Xu){u+=p;continue}const S=c[5],x=p.substring(0,c[1]),g=p.substring(c[4],S),b=p.substring(c[2],c[3]);v===vc?u+=x||g?`${x}{$${b}}${g}`:`$${b}`:v===yc?u+=x||g?`${x}{$}${g}`:"$":u+=`${x}{-$${b}}${g}`}u=GT(u);const h=u||"/";return l&&r&&r.set(l,h),h}function $1(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):aG(r,n)}function F1({path:e,params:t,decodeCharMap:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const s=e.length;let l=0,a,c="";for(;l<s;){const h=l;a=qT(e,h,a);const f=a[5];if(l=f+1,h===f)continue;const p=a[0];if(p===Xu){c+="/"+e.substring(h,f);continue}if(p===yc){const v=t._splat;i._splat=v,i["*"]=v;const S=e.substring(h,a[1]),x=e.substring(a[4],f);if(!v){r=!0,(S||x)&&(c+="/"+S+x);continue}const g=$1("_splat",t,n);c+="/"+S+g+x;continue}if(p===vc){const v=e.substring(a[2],a[3]);!r&&!(v in t)&&(r=!0),i[v]=t[v];const S=e.substring(h,a[1]),x=e.substring(a[4],f),g=$1(v,t,n)??"undefined";c+="/"+S+g+x;continue}if(p===zh){const v=e.substring(a[2],a[3]),S=t[v];if(S==null)continue;i[v]=S;const x=e.substring(h,a[1]),g=e.substring(a[4],f),b=$1(v,t,n)??"";c+="/"+x+b+g;continue}}return e.endsWith("/")&&(c+="/"),{usedParams:i,interpolatedPath:c||"/",isMissingParams:r}}function aG(e,t){let n=encodeURIComponent(e);if(t)for(const[r,i]of t)n=n.replaceAll(r,i);return n}function Xi(e){return!!e?.isNotFound}function lG(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Dv="tsr-scroll-restoration-v1_3",cG=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function uG(){const e=lG();if(!e)return null;const t=e.getItem(Dv);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Aa(r,n)||n,e.setItem(Dv,JSON.stringify(n)))}}const Rg=uG(),PE=e=>e.state.__TSR_key||e.href;function dG(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Iv=!1;function r9({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:s}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const a=t||window.history.state?.__TSR_key,c=l[a];Iv=!0;e:{if(r&&c&&Object.keys(c).length>0){for(const f in c){const p=c[f];if(f==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(f){const v=document.querySelector(f);v&&(v.scrollLeft=p.scrollX,v.scrollTop=p.scrollY)}}break e}const u=(s??window.location).hash.split("#",2)[1];if(u){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const p=document.getElementById(u);p&&p.scrollIntoView(f)}break e}const h={top:0,left:0,behavior:n};if(window.scrollTo(h),i)for(const f of i){if(f==="window")continue;const p=typeof f=="function"?f():document.querySelector(f);p&&p.scrollTo(h)}}Iv=!1}function fG(e,t){if(!Rg&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Rg))return;e.isScrollRestorationSetup=!0,Iv=!1;const r=e.options.getScrollRestorationKey||PE;window.history.scrollRestoration="manual";const i=s=>{if(Iv||!e.isScrollRestoring)return;let l="";if(s.target===document||s.target===window)l="window";else{const c=s.target.getAttribute("data-scroll-restoration-id");c?l=`[data-scroll-restoration-id="${c}"]`:l=dG(s.target)}const a=r(e.state.location);Rg.set(c=>{const u=c[a]||={},h=u[l]||={};if(l==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(l){const f=document.querySelector(l);f&&(h.scrollX=f.scrollLeft||0,h.scrollY=f.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",cG(i,100),!0),e.subscribe("onRendered",s=>{const l=r(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(r9({storageKey:Dv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Rg.set(a=>(a[l]||={},a)))})}function hG(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function pG(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function U1(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function mG(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const s=n[r];s==null?n[r]=U1(i):Array.isArray(s)?s.push(U1(i)):n[r]=[s,U1(i)]}return n}const gG=yG(JSON.parse),vG=bG(JSON.stringify,JSON.parse);function yG(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=mG(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function bG(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const s=pG(i,r);return s?`?${s}`:""}}const xi="__root__";function i9(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ys(e){return e instanceof Response&&!!e.options}const Sv=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},pb=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),KT=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let s=0;s<=i;s++){const l=e.matches[s];if(!l)continue;const a=e.router.getMatch(l.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},s9=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Dr(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);Dr(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,s9(e,t))},Pa=(e,t,n)=>{if(!(!ys(n)&&!Xi(n))){if(ys(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ys(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,isFetching:!1,error:n})),Xi(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ys(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(s9(e,n),n)}},o9=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},th=(e,t,n,r)=>{const{id:i,routeId:s}=e.matches[t],l=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Pa(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(a){n=a,Pa(e,e.router.getMatch(i),n)}e.updateMatch(i,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},_G=(e,t,n,r)=>{const i=e.router.getMatch(t),s=e.matches[n-1]?.id,l=s?e.router.getMatch(s):void 0;if(e.router.isShell()){i.ssr=r.id===xi;return}if(l?.ssr===!1){i.ssr=!1;return}const a=v=>v===!0&&l?.ssr==="data-only"?"data-only":v,c=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=a(c);return}if(typeof r.options.ssr!="function"){i.ssr=a(r.options.ssr);return}const{search:u,params:h}=i,f={search:Ag(u,i.searchError),params:Ag(h,i.paramsError),location:e.location,matches:e.matches.map(v=>({index:v.index,pathname:v.pathname,fullPath:v.fullPath,staticData:v.staticData,id:v.id,routeId:v.routeId,search:Ag(v.search,v.searchError),params:Ag(v.params,v.paramsError),ssr:v.ssr}))},p=r.options.ssr(f);if(Ba(p))return p.then(v=>{i.ssr=a(v??c)});i.ssr=a(p??c)},a9=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!pb(e,t)&&(n.options.loader||n.options.beforeLoad||u9(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Sv(e)},i);r._nonReactive.pendingTimeout=l}},xG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;a9(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Pa(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},SG=(e,t,n,r)=>{const i=e.router.getMatch(t),s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Yu(()=>{s?.resolve()});const{paramsError:l,searchError:a}=i;l&&th(e,n,l,"PARSE_PARAMS"),a&&th(e,n,a,"VALIDATE_SEARCH"),a9(e,t,r,i);const c=new AbortController,u=e.matches[n-1]?.id;(u?e.router.getMatch(u):void 0)?.context??e.router.options.context;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:c})))},v=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){Oh(()=>{p(),v()});return}i._nonReactive.beforeLoadPromise=Yu();const S={...KT(e,n,!1),...i.__routeContext},{search:x,params:g,cause:b}=i,y=pb(e,t),_={search:x,abortController:c,params:g,preload:y,context:S,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":b,matches:e.matches,...e.router.options.additionalContext},T=k=>{if(k===void 0){Oh(()=>{p(),v()});return}(ys(k)||Xi(k))&&(p(),th(e,n,k,"BEFORE_LOAD")),Oh(()=>{p(),e.updateMatch(t,A=>({...A,__beforeLoadContext:k})),v()})};let E;try{if(E=r.options.beforeLoad(_),Ba(E))return p(),E.catch(k=>{th(e,n,k,"BEFORE_LOAD")}).then(T)}catch(k){p(),th(e,n,k,"BEFORE_LOAD")}T(E)},wG=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>{if(e.router.isServer){const c=_G(e,n,t,i);if(Ba(c))return c.then(a)}return a()},l=()=>SG(e,n,t,i),a=()=>{if(o9(e,n))return;const c=xG(e,n,i);return Ba(c)?c.then(l):l()};return s()},Rh=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([s,l,a])=>{const c=s?.meta,u=s?.links,h=s?.scripts,f=s?.styles;return{meta:c,links:u,headScripts:h,headers:a,scripts:l,styles:f}})},l9=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:s,loaderDeps:l,abortController:a,cause:c}=e.router.getMatch(t),u=KT(e,n),h=pb(e,t);return{params:s,deps:l,preload:!!h,parentMatchPromise:i,abortController:a,context:u,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:h?"preload":c,route:r,...e.router.options.additionalContext}},k5=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&c9(r);const s=r.options.loader?.(l9(e,t,n,r)),l=r.options.loader&&Ba(s);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,f=>({...f,isFetching:"loader"})),r.options.loader){const f=l?await s:s;Pa(e,e.router.getMatch(t),f),f!==void 0&&e.updateMatch(t,p=>({...p,loaderData:f}))}r._lazyPromise&&await r._lazyPromise;const c=Rh(e,t,r),u=c?await c:void 0,h=i._nonReactive.minPendingPromise;h&&await h,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,f=>({...f,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...u}))}catch(s){let l=s;const a=i._nonReactive.minPendingPromise;a&&await a,Xi(s)&&await r.options.notFoundComponent?.preload?.(),Pa(e,e.router.getMatch(t),s);try{r.options.onError?.(s)}catch(h){l=h,Pa(e,e.router.getMatch(t),h)}const c=Rh(e,t,r),u=c?await c:void 0;e.updateMatch(t,h=>({...h,error:l,status:"error",isFetching:!1,...u}))}}catch(i){const s=e.router.getMatch(t);if(s){const l=Rh(e,t,r);if(l){const a=await l;e.updateMatch(t,c=>({...c,...a}))}s._nonReactive.loaderPromise=void 0}Pa(e,s,i)}},CG=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,s=!1;const l=e.router.looseRoutesById[r],a=()=>{e.updateMatch(n,h=>({...h,context:KT(e,t)}))};if(o9(e,n)){if(e.router.isServer){const h=Rh(e,n,l);if(h){const f=await h;e.updateMatch(n,p=>({...p,...f}))}return e.router.getMatch(n)}}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const f=e.router.getMatch(n),p=f._nonReactive.error||f.error;p&&Pa(e,f,p)}else{const f=Date.now()-h.updatedAt,p=pb(e,n),v=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,S=l.options.shouldReload,x=typeof S=="function"?S(l9(e,n,t,l)):S,g=!!p&&!e.router.state.matches.some(T=>T.id===n),b=e.router.getMatch(n);b._nonReactive.loaderPromise=Yu(),g!==b.preload&&e.updateMatch(n,T=>({...T,preload:g}));const{status:y,invalid:_}=b;if(i=y==="success"&&(_||(x??f>v)),!(p&&l.options.preload===!1))if(i&&!e.sync)s=!0,(async()=>{try{await k5(e,n,t,l),a();const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){ys(T)&&await e.router.navigate(T.options)}})();else if(y!=="success"||i&&e.sync)await k5(e,n,t,l);else{const T=Rh(e,n,l);if(T){const E=await T;e.updateMatch(n,k=>({...k,...E}))}}}}const c=e.router.getMatch(n);s||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,s||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0,s||a();const u=s?c.isFetching:!1;return u!==c.isFetching||c.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:u,invalid:!1})),e.router.getMatch(n)):c};async function O5(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Sv(t);try{for(let i=0;i<t.matches.length;i++){const s=wG(t,i);Ba(s)&&await s}const n=t.firstBadMatchIndex??t.matches.length;for(let i=0;i<n;i++)t.matchPromises.push(CG(t,i));await Promise.all(t.matchPromises);const r=Sv(t);Ba(r)&&await r}catch(n){if(Xi(n)&&!t.preload){const r=Sv(t);throw Ba(r)&&await r,n}if(ys(n))throw n}return t.matches}async function c9(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of d9){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Ag(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function u9(e){for(const t of d9)if(e.options[t]?.preload)return!0;return!1}const d9=["component","errorComponent","pendingComponent","notFoundComponent"];function EG(e){return{input:({url:t})=>{for(const n of e)t=f9(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=h9(e[n],t);return t}}}function TG(e){const t=n9(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const a=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return a===i?l.pathname="/":a.startsWith(s)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=xv(["/",t,l.pathname]),l)}}function f9(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function h9(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function ic(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,s=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:s}}class kG{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",s=this.basepath===void 0,l=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(p=>[encodeURIComponent(p),p])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=FW())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new HW(RG(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(p=>!["redirected"].includes(p.status))}}}),fG(this));let a=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==c||l!==u){this.basepath=c;const p=[];n9(c)!==""&&p.push(TG({basepath:c})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:EG(p),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:i}=eG(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});this.options.routeMasks&&YW(this.options.routeMasks,i),this.routesById=n,this.routesByPath=r,this.processedTree=i;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:c,state:u})=>{const h=new URL(c,this.origin),f=f9(this.rewrite,h),p=this.options.parseSearch(f.search),v=this.options.stringifySearch(p);return f.search=v,{href:f.href.replace(f.origin,""),publicHref:c,url:f,pathname:T5(f.pathname),searchStr:v,search:Ui(r?.search,p),hash:f.hash.split("#").reverse()[0]??"",state:Ui(r?.state,u)}},s=i(n),{__tempLocation:l,__tempKey:a}=s.state;if(l&&(!a||a===this.tempLocationKey)){const c=i(l);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathCache=Lv(1e3),this.resolvePathWithBase=(n,r)=>oG({base:n,to:GT(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>AG({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(s=>s.status==="pending"),r=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const r=(s={})=>{const l=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutes(l,{_buildLocation:!0}),c=Pv(a);s.from;const u=s.unsafeRelative==="path"?l.pathname:s.from??c.fullPath,h=this.resolvePathWithBase(u,"."),f=c.search,p={...c.params},v=s.to?this.resolvePathWithBase(h,`${s.to}`):this.resolvePathWithBase(h,"."),S=s.params===!1||s.params===null?{}:(s.params??!0)===!0?p:Object.assign(p,Aa(s.params,p)),x=F1({path:v,params:S}).interpolatedPath,g=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(z=>this.looseRoutesById[z.routeId]);if(Object.keys(S).length>0)for(const z of g){const D=z.options.params?.stringify??z.options.stringifyParams;D&&Object.assign(S,D(S))}const b=n.leaveParams?v:T5(F1({path:v,params:S,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let y=f;if(n._includeValidateSearch&&this.options.search?.strict){const z={};g.forEach(D=>{if(D.options.validateSearch)try{Object.assign(z,ME(D.options.validateSearch,{...z,...y}))}catch{}}),y=z}y=PG({search:y,dest:s,destRoutes:g,_includeValidateSearch:n._includeValidateSearch}),y=Ui(f,y);const _=this.options.stringifySearch(y),T=s.hash===!0?l.hash:s.hash?Aa(s.hash,l.hash):void 0,E=T?`#${T}`:"";let k=s.state===!0?l.state:s.state?Aa(s.state,l.state):{};k=Ui(l.state,k);const A=`${b}${_}${E}`,R=new URL(A,this.origin),L=h9(this.rewrite,R);return{publicHref:L.pathname+L.search+L.hash,href:A,url:L,pathname:b,search:y,searchStr:_,state:k,hash:T??"",unmaskOnReload:s.unmaskOnReload}},i=(s={},l)=>{const a=r(s);let c=l?r(l):void 0;if(!c){const u={};if(this.options.routeMasks){const h=XW(a.pathname,this.processedTree);if(h){Object.assign(u,h.params);const{from:f,params:p,...v}=h.route,S=p===!1||p===null?{}:(p??!0)===!0?u:Object.assign(u,Aa(p,u));l={from:n.from,...v,params:S},c=r(l)}}}return c&&(a.maskedLocation=c),a};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const u=nc(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),u},l=rc(this.latestLocation.href)===rc(i.href),a=this.commitLocationPromise;if(this.commitLocationPromise=Yu(()=>{a?.resolve()}),l&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,url:h,...f}=i;c&&(f={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:l,href:a,...c}={})=>{if(a){const f=this.history.location.state.__TSR_index,p=Av(a,{__TSR_index:n?f:f+1});c.to=p.pathname,c.search=this.options.parseSearch(p.search),c.hash=p.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const h=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,...s})=>{if(!r&&i)try{new URL(`${i}`),r=!0}catch{}if(r){if(i||(i=this.buildLocation({to:n,...s}).url.href),!s.ignoreBlocker){const a=this.history.getBlockers?.()??[];for(const c of a)if(c?.blockerFn&&await c.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return s.replace?window.location.replace(i):window.location.href=i,Promise.resolve()}return this.buildAndCommitLocation({...s,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref||r.url.origin!==this.origin){const i=this.getParsedLocationHref(r);throw i9({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(s=>s.id===i.id))}))},this.load=async n=>{let r,i,s;for(s=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ic({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...ic({resolvedLocation:u,location:c})}),await O5({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=[],f=[],p=[];Oh(()=>{this.__store.setState(v=>{const S=v.matches,x=v.pendingMatches||v.matches;return h=S.filter(g=>!x.some(b=>b.id===g.id)),f=x.filter(g=>!S.some(b=>b.id===g.id)),p=x.filter(g=>S.some(b=>b.id===g.id)),{...v,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...h.filter(g=>g.status!=="error"&&g.status!=="notFound")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[f,"onEnter"],[p,"onStay"]].forEach(([v,S])=>{v.forEach(x=>{this.looseRoutesById[x.routeId].options[S]?.(x)})})})})}})}catch(c){ys(c)?(r=c,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Xi(c)&&(i=c),this.__store.setState(u=>({...u,statusCode:r?r.status:i?404:u.matches.some(h=>h.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(a=>a.status==="error")&&(l=500),l!==void 0&&this.__store.setState(a=>({...a,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,l=this.state.resolvedLocation,a=typeof r.types=="function"?r.types(ic({resolvedLocation:l,location:s})):r.types;if(a===!1){n();return}i={update:n,types:a}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(s=>s.id===n)?"pendingMatches":this.state.matches.some(s=>s.id===n)?"matches":this.state.cachedMatches.some(s=>s.id===n)?"cachedMatches":"";i&&this.__store.setState(s=>({...s,[i]:s[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let r=n.url.href;return this.origin&&n.url.origin===this.origin&&(r=r.replace(this.origin,"")||"/"),r},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options),i=this.getParsedLocationHref(r);n.options.href=r.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(s=>!r(s))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const s=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=c9,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),l=new Set([...s,...this.state.cachedMatches.map(a=>a.id)]);Oh(()=>{i.forEach(a=>{l.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return i=await O5({router:this,matches:i,location:r,preload:!0,updateMatch:(a,c)=>{s.has(a)?i=i.map(u=>u.id===a?c(u):u):this.updateMatch(a,c)}}),i}catch(a){if(ys(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:r});Xi(a)||console.error(a);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const a=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=QW(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!c||n.params&&!nc(c.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?nc(a.search,s.search,{partial:!0})?c.params:!1:c.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??vG,parseSearch:t.parseSearch??gG}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:s}=r;let{matchedRoutes:l}=r,a=!1;(i?i.path!=="/"&&s["**"]:rc(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:a=!0);const c=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let f=l.length-1;f>=0;f--){const p=l[f];if(p.children)return p.id}return xi}})(),u=[],h=f=>f?.id?f.context??this.options.context??void 0:this.options.context??void 0;return l.forEach((f,p)=>{const v=u[p-1],[S,x,g]=(()=>{const N=v?.search??t.search,F=v?._strictSearch??void 0;try{const U=ME(f.options.validateSearch,{...N})??void 0;return[{...N,...U},{...F,...U},void 0]}catch(U){let H=U;if(U instanceof Nv||(H=new Nv(U.message,{cause:U})),n?.throwOnError)throw H;return[N,{},H]}})(),b=f.options.loaderDeps?.({search:S})??"",y=b?JSON.stringify(b):"",{interpolatedPath:_,usedParams:T}=F1({path:f.fullPath,params:s,decodeCharMap:this.pathParamsDecodeCharMap}),E=f.id+_+y,k=this.getMatch(E),A=this.state.matches.find(N=>N.routeId===f.id),R=k?._strictParams??T;let L;if(!k){const N=f.options.params?.parse??f.options.parseParams;if(N)try{Object.assign(R,N(R))}catch(F){if(Xi(F)||ys(F)?L=F:L=new OG(F.message,{cause:F}),n?.throwOnError)throw L}}Object.assign(s,R);const z=A?"stay":"enter";let D;if(k)D={...k,cause:z,params:A?Ui(A.params,s):s,_strictParams:R,search:Ui(A?A.search:k.search,S),_strictSearch:x};else{const N=f.options.loader||f.options.beforeLoad||f.lazyFn||u9(f)?"pending":"success";D={id:E,ssr:this.isServer?void 0:f.options.ssr,index:p,routeId:f.id,params:A?Ui(A.params,s):s,_strictParams:R,pathname:_,updatedAt:Date.now(),search:A?Ui(A.search,S):S,_strictSearch:x,searchError:void 0,status:N,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Yu()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:z,loaderDeps:A?Ui(A.loaderDeps,b):b,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:f.options.staticData||{},fullPath:f.fullPath}}n?.preload||(D.globalNotFound=c===f.id),D.searchError=g;const $=h(v);D.context={...$,...D.__routeContext,...D.__beforeLoadContext},u.push(D)}),u.forEach((f,p)=>{const v=this.looseRoutesById[f.routeId];if(!this.getMatch(f.id)&&n?._buildLocation!==!0){const x=u[p-1],g=h(x);if(v.options.context){const b={deps:f.loaderDeps,params:f.params,context:g??{},location:t,navigate:y=>this.navigate({...y,_fromLocation:t}),buildLocation:this.buildLocation,cause:f.cause,abortController:f.abortController,preload:!!f.preload,matches:u};f.__routeContext=v.options.context(b)??void 0}f.context={...g,...f.__routeContext,...f.__beforeLoadContext}}}),u}}class Nv extends Error{}class OG extends Error{}function RG(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function ME(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Nv("Async validation not supported");if(n.issues)throw new Nv(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function AG({pathname:e,routesById:t,processedTree:n}){const r={},i=rc(e);let s;const l=ZW(i,n,!0);return l&&(s=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[xi]],routeParams:r,foundRoute:s}}function PG({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const i=n.reduce((a,c)=>{const u=[];if("search"in c.options)c.options.search?.middlewares&&u.push(...c.options.search.middlewares);else if(c.options.preSearchFilters||c.options.postSearchFilters){const h=({search:f,next:p})=>{let v=f;"preSearchFilters"in c.options&&c.options.preSearchFilters&&(v=c.options.preSearchFilters.reduce((x,g)=>g(x),f));const S=p(v);return"postSearchFilters"in c.options&&c.options.postSearchFilters?c.options.postSearchFilters.reduce((x,g)=>g(x),S):S};u.push(h)}if(r&&c.options.validateSearch){const h=({search:f,next:p})=>{const v=p(f);try{return{...v,...ME(c.options.validateSearch,v)??void 0}}catch{return v}};u.push(h)}return a.concat(u)},[])??[],s=({search:a})=>t.search?t.search===!0?a:Aa(t.search,a):{};i.push(s);const l=(a,c)=>{if(a>=i.length)return c;const u=i[a];return u({search:c,next:f=>l(a+1,f)})};return l(0,e)}const MG="Error preloading route! ☝️";class p9{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=xi:this.parentRoute||Dr(!1);let s=i?xi:r?.path;s&&s!=="/"&&(s=t9(s));const l=r?.id||s;let a=i?xi:xv([this.parentRoute.id===xi?"":this.parentRoute.id,l]);s===xi&&(s="/"),a!==xi&&(a=xv(["/",a]));const c=a===xi?"/":xv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=c,this._to=c},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class LG extends p9{constructor(t){super(t)}}function YT(e){const t=e.errorComponent??mb;return w.jsx(jG,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?O.createElement(t,{error:n,reset:r}):e.children})}class jG extends O.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function mb({error:e}){const[t,n]=O.useState(!1);return w.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[w.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),w.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),w.jsx("div",{style:{height:".25rem"}}),t?w.jsx("div",{children:w.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?w.jsx("code",{children:e.message}):null})}):null]})}function DG({children:e,fallback:t=null}){return IG()?w.jsx(oe.Fragment,{children:e}):w.jsx(oe.Fragment,{children:t})}function IG(){return oe.useSyncExternalStore(NG,()=>!0,()=>!1)}function NG(){return()=>{}}var V1={exports:{}},q1={},W1={exports:{}},G1={};var R5;function BG(){if(R5)return G1;R5=1;var e=$p();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function a(f,p){var v=p(),S=r({inst:{value:v,getSnapshot:p}}),x=S[0].inst,g=S[1];return s(function(){x.value=v,x.getSnapshot=p,c(x)&&g({inst:x})},[f,v,p]),i(function(){return c(x)&&g({inst:x}),f(function(){c(x)&&g({inst:x})})},[f]),l(v),v}function c(f){var p=f.getSnapshot;f=f.value;try{var v=p();return!n(f,v)}catch{return!0}}function u(f,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return G1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,G1}var A5;function m9(){return A5||(A5=1,W1.exports=BG()),W1.exports}var P5;function zG(){if(P5)return q1;P5=1;var e=$p(),t=m9();function n(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,a=e.useMemo,c=e.useDebugValue;return q1.useSyncExternalStoreWithSelector=function(u,h,f,p,v){var S=s(null);if(S.current===null){var x={hasValue:!1,value:null};S.current=x}else x=S.current;S=a(function(){function b(k){if(!y){if(y=!0,_=k,k=p(k),v!==void 0&&x.hasValue){var A=x.value;if(v(A,k))return T=A}return T=k}if(A=T,r(_,k))return A;var R=p(k);return v!==void 0&&v(A,R)?(_=k,A):(_=k,T=R)}var y=!1,_,T,E=f===void 0?null:f;return[function(){return b(h())},E===null?void 0:function(){return b(E())}]},[h,f,p,v]);var g=i(u,S[0],S[1]);return l(function(){x.hasValue=!0,x.value=g},[g]),c(g),g},q1}var M5;function HG(){return M5||(M5=1,V1.exports=zG()),V1.exports}var g9=HG();function $G(e,t=r=>r,n={}){const r=n.equal??FG;return g9.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function FG(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=L5(e);if(n.length!==L5(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function L5(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const K1=O.createContext(null);function v9(){return typeof document>"u"?K1:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=K1,K1)}function Oi(e){const t=O.useContext(v9());return e?.warn,t}function jr(e){const t=Oi({warn:e?.router===void 0}),n=e?.router||t,r=O.useRef(void 0);return $G(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=Ui(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}const gb=O.createContext(void 0),UG=O.createContext(void 0);function Ys(e){const t=O.useContext(e.from?UG:gb);return jr({select:r=>{const i=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Dr(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function XT(e){return Ys({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function QT(e){const{select:t,...n}=e;return Ys({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function ZT(e){return Ys({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function JT(e){return Ys({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Pg=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Y1(e){const t=O.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function VG(e,t,n={},r={}){O.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([s])=>{t(s)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function qG(e){const t=O.useRef(null);return O.useImperativeHandle(e,()=>t.current,[]),t}function Qa(e){const t=Oi();return O.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Ir=Z8();const WG=sn(Ir);function GG(e,t){const n=Oi(),[r,i]=O.useState(!1),s=O.useRef(!1),l=qG(t),{activeProps:a,inactiveProps:c,activeOptions:u,to:h,preload:f,preloadDelay:p,hashScrollIntoView:v,replace:S,startTransition:x,resetScroll:g,viewTransition:b,children:y,target:_,disabled:T,style:E,className:k,onClick:A,onFocus:R,onMouseEnter:L,onMouseLeave:z,onTouchStart:D,ignoreBlocker:$,params:N,search:F,hash:U,state:H,mask:K,reloadDocument:W,unsafeRelative:I,from:G,_fromLocation:j,...B}=e,V=jr({select:me=>me.location.search,structuralSharing:!0}),X=e.from,re=O.useMemo(()=>({...e,from:X}),[n,V,X,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=O.useMemo(()=>n.buildLocation({...re}),[n,re]),Q=O.useMemo(()=>{if(T)return;let me=ie.maskedLocation?ie.maskedLocation.url.href:ie.url.href,Ae=!1;return n.origin&&(me.startsWith(n.origin)?me=n.history.createHref(me.replace(n.origin,""))||"/":Ae=!0),{href:me,external:Ae}},[T,ie.maskedLocation,ie.url,n.origin,n.history]),Y=O.useMemo(()=>{if(Q?.external)return Q.href;try{return new URL(h),h}catch{}},[h,Q]),J=e.reloadDocument||Y?!1:f??n.options.defaultPreload,ee=p??n.options.defaultPreloadDelay??0,ne=jr({select:me=>{if(Y)return!1;if(u?.exact){if(!sG(me.location.pathname,ie.pathname,n.basepath))return!1}else{const Ae=jv(me.location.pathname,n.basepath),Te=jv(ie.pathname,n.basepath);if(!(Ae.startsWith(Te)&&(Ae.length===Te.length||Ae[Te.length]==="/")))return!1}return(u?.includeSearch??!0)&&!nc(me.location.search,ie.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?me.location.hash===ie.hash:!0}}),te=O.useCallback(()=>{n.preloadRoute({...re}).catch(me=>{console.warn(me),console.warn(MG)})},[n,re]),le=O.useCallback(me=>{me?.isIntersecting&&te()},[te]);VG(l,le,ZG,{disabled:!!T||J!=="viewport"}),O.useEffect(()=>{s.current||!T&&J==="render"&&(te(),s.current=!0)},[T,te,J]);const fe=me=>{const Ae=me.currentTarget.getAttribute("target"),Te=_!==void 0?_:Ae;if(!T&&!JG(me)&&!me.defaultPrevented&&(!Te||Te==="_self")&&me.button===0){me.preventDefault(),Ir.flushSync(()=>{i(!0)});const We=n.subscribe("onResolved",()=>{We(),i(!1)});n.navigate({...re,replace:S,resetScroll:g,hashScrollIntoView:v,startTransition:x,viewTransition:b,ignoreBlocker:$})}};if(Y)return{...B,ref:l,href:Y,...y&&{children:y},..._&&{target:_},...T&&{disabled:T},...E&&{style:E},...k&&{className:k},...A&&{onClick:A},...R&&{onFocus:R},...L&&{onMouseEnter:L},...z&&{onMouseLeave:z},...D&&{onTouchStart:D}};const pe=me=>{T||J&&te()},de=pe,ue=me=>{if(!(T||!J))if(!ee)te();else{const Ae=me.target;if(nh.has(Ae))return;const Te=setTimeout(()=>{nh.delete(Ae),te()},ee);nh.set(Ae,Te)}},Ie=me=>{if(T||!J||!ee)return;const Ae=me.target,Te=nh.get(Ae);Te&&(clearTimeout(Te),nh.delete(Ae))},Le=ne?Aa(a,{})??KG:X1,we=ne?X1:Aa(c,{})??X1,_e=[k,Le.className,we.className].filter(Boolean).join(" "),Pe=(E||Le.style||we.style)&&{...E,...Le.style,...we.style};return{...B,...Le,...we,href:Q?.href,ref:l,onClick:rh([A,fe]),onFocus:rh([R,pe]),onMouseEnter:rh([L,ue]),onMouseLeave:rh([z,Ie]),onTouchStart:rh([D,de]),disabled:!!T,target:_,...Pe&&{style:Pe},..._e&&{className:_e},...T&&YG,...ne&&XG,...r&&QG}}const X1={},KG={className:"active"},YG={role:"link","aria-disabled":!0},XG={"data-status":"active","aria-current":"page"},QG={"data-transitioning":"transitioning"},nh=new WeakMap,ZG={rootMargin:"100px"},rh=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},er=O.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,ref:s,...l}=GG(r,t),a=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,O.createElement(n||"a",{...l,ref:s},a)});function JG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let eK=class extends p9{constructor(t){super(t),this.useMatch=n=>Ys({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ys({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>JT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ZT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>QT({...n,from:this.id}),this.useLoaderData=n=>XT({...n,from:this.id}),this.useNavigate=()=>Qa({from:this.fullPath}),this.Link=oe.forwardRef((n,r)=>w.jsx(er,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function tK(e){return new eK(e)}class nK extends LG{constructor(t){super(t),this.useMatch=n=>Ys({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ys({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>JT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ZT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>QT({...n,from:this.id}),this.useLoaderData=n=>XT({...n,from:this.id}),this.useNavigate=()=>Qa({from:this.fullPath}),this.Link=oe.forwardRef((n,r)=>w.jsx(er,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function rK(e){return new nK(e)}function ts(e){return typeof e=="object"?new j5(e,{silent:!0}).createRoute(e):new j5(e,{silent:!0}).createRoute}class j5{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=tK(r);return i.isRoot=!1,i},this.silent=n?.silent}}class D5{constructor(t){this.useMatch=n=>Ys({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ys({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>JT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>ZT({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>QT({...n,from:this.options.id}),this.useLoaderData=n=>XT({...n,from:this.options.id}),this.useNavigate=()=>{const n=Oi();return Qa({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function I5(e){return typeof e=="object"?new D5(e):t=>new D5({id:e,...t})}function iK(){const e=Oi(),t=O.useRef({router:e,mounted:!1}),[n,r]=O.useState(!1),{hasPendingMatches:i,isLoading:s}=jr({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),l=Y1(s),a=s||n||i,c=Y1(a),u=s||i,h=Y1(u);return e.startTransition=f=>{r(!0),O.startTransition(()=>{f(),r(!1)})},O.useEffect(()=>{const f=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return rc(e.latestLocation.href)!==rc(p.href)&&e.commitLocation({...p,replace:!0}),()=>{f()}},[e,e.history]),Pg(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),Pg(()=>{l&&!s&&e.emit({type:"onLoad",...ic(e.state)})},[l,e,s]),Pg(()=>{h&&!u&&e.emit({type:"onBeforeRouteMount",...ic(e.state)})},[u,h,e]),Pg(()=>{if(c&&!a){const f=ic(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),f.hrefChanged&&hG(e)}},[a,c,e]),null}function sK(e){const t=jr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return w.jsx(YT,{getResetKey:()=>t,onCatch:(n,r)=>{if(Xi(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Xi(n))return e.fallback?.(n);throw n},children:e.children})}function oK(){return w.jsx("p",{children:"Not Found"})}function Au(e){return w.jsx(w.Fragment,{children:e.children})}function y9(e,t,n){return t.options.notFoundComponent?w.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?w.jsx(e.options.defaultNotFoundComponent,{...n}):w.jsx(oK,{})}function aK({children:e}){const t=Oi();return t.isServer?w.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function lK(){const e=Oi();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||PE)(e.latestLocation),r=n!==PE(e.latestLocation)?n:void 0,i={storageKey:Dv,shouldScrollRestoration:!0};return r&&(i.key=r),w.jsx(aK,{children:`(${r9.toString()})(${JSON.stringify(i)})`})}const b9=O.memo(function({matchId:t}){const n=Oi(),r=jr({select:b=>{const y=b.matches.find(_=>_.id===t);return Dr(y),{routeId:y.routeId,ssr:y.ssr,_displayPending:y._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],s=i.options.pendingComponent??n.options.defaultPendingComponent,l=s?w.jsx(s,{}):null,a=i.options.errorComponent??n.options.defaultErrorComponent,c=i.options.onCatch??n.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",f=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??s??(i.options.errorComponent?.preload||h))?O.Suspense:Au,p=a?YT:Au,v=u?sK:Au,S=jr({select:b=>b.loadedAt}),x=jr({select:b=>{const y=b.matches.findIndex(_=>_.id===t);return b.matches[y-1]?.routeId}}),g=i.isRoot?i.options.shellComponent??Au:Au;return w.jsxs(g,{children:[w.jsx(gb.Provider,{value:t,children:w.jsx(f,{fallback:l,children:w.jsx(p,{getResetKey:()=>S,errorComponent:a||mb,onCatch:(b,y)=>{if(Xi(b))throw b;c?.(b,y)},children:w.jsx(v,{fallback:b=>{if(!u||b.routeId&&b.routeId!==r.routeId||!b.routeId&&!i.isRoot)throw b;return O.createElement(u,b)},children:h||r._displayPending?w.jsx(DG,{fallback:l,children:w.jsx(N5,{matchId:t})}):w.jsx(N5,{matchId:t})})})})}),x===xi&&n.options.scrollRestoration?w.jsxs(w.Fragment,{children:[w.jsx(cK,{}),w.jsx(lK,{})]}):null]})});function cK(){const e=Oi(),t=O.useRef(void 0);return w.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ic(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const N5=O.memo(function({matchId:t}){const n=Oi(),{match:r,key:i,routeId:s}=jr({select:c=>{const u=c.matches.find(S=>S.id===t),h=u.routeId,p=(n.routesById[h].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:h,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:h,match:{id:u.id,status:u.status,error:u.error,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),l=n.routesById[s],a=O.useMemo(()=>{const c=l.options.component??n.options.defaultComponent;return c?w.jsx(c,{},i):w.jsx(_9,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const c=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise&&!n.isServer){const h=Yu();u._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Dr(Xi(r.error)),y9(n,l,r.error);if(r.status==="redirected")throw Dr(ys(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const c=(l.options.errorComponent??n.options.defaultErrorComponent)||mb;return w.jsx(c,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return a}),_9=O.memo(function(){const t=Oi(),n=O.useContext(gb),r=jr({select:u=>u.matches.find(h=>h.id===n)?.routeId}),i=t.routesById[r],s=jr({select:u=>{const f=u.matches.find(p=>p.id===n);return Dr(f),f.globalNotFound}}),l=jr({select:u=>{const h=u.matches,f=h.findIndex(p=>p.id===n);return h[f+1]?.id}}),a=t.options.defaultPendingComponent?w.jsx(t.options.defaultPendingComponent,{}):null;if(s)return y9(t,i,void 0);if(!l)return null;const c=w.jsx(b9,{matchId:l});return r===xi?w.jsx(O.Suspense,{fallback:a,children:c}):c});function uK(){const e=Oi(),n=e.routesById[xi].options.pendingComponent??e.options.defaultPendingComponent,r=n?w.jsx(n,{}):null,i=e.isServer||typeof document<"u"&&e.ssr?Au:O.Suspense,s=w.jsxs(i,{fallback:r,children:[!e.isServer&&w.jsx(iK,{}),w.jsx(dK,{})]});return e.options.InnerWrap?w.jsx(e.options.InnerWrap,{children:s}):s}function dK(){const e=Oi(),t=jr({select:i=>i.matches[0]?.id}),n=jr({select:i=>i.loadedAt}),r=t?w.jsx(b9,{matchId:t}):null;return w.jsx(gb.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:w.jsx(YT,{getResetKey:()=>n,errorComponent:mb,onCatch:i=>{i.message||i.toString()},children:r})})}const fK=e=>new hK(e);class hK extends kG{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=ts,globalThis.createLazyFileRoute=I5):typeof window<"u"&&(window.createFileRoute=ts,window.createLazyFileRoute=I5);function pK({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=v9(),i=w.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?w.jsx(e.options.Wrap,{children:i}):i}function mK({router:e,...t}){return w.jsx(pK,{router:e,...t,children:w.jsx(uK,{})})}function gK(e){return jr({select:t=>t.location})}var Rd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vK={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yK=class{#e=vK;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ul=new yK;function bK(e){setTimeout(e,0)}var bc=typeof window>"u"||"Deno"in globalThis;function Hr(){}function _K(e,t){return typeof e=="function"?e(t):e}function LE(e){return typeof e=="number"&&e>=0&&e!==1/0}function x9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function za(e,t){return typeof e=="function"?e(t):e}function qi(e,t){return typeof e=="function"?e(t):e}function B5(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:a}=e;if(l){if(r){if(t.queryHash!==ek(l,t.options))return!1}else if(!$h(t.queryKey,l))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function z5(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(_c(t.options.mutationKey)!==_c(s))return!1}else if(!$h(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ek(e,t){return(t?.queryKeyHashFn||_c)(e)}function _c(e){return JSON.stringify(e,(t,n)=>jE(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function $h(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>$h(e[n],t[n])):!1}var xK=Object.prototype.hasOwnProperty;function S9(e,t){if(e===t)return e;const n=H5(e)&&H5(t);if(!n&&!(jE(e)&&jE(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),l=s.length,a=n?new Array(l):{};let c=0;for(let u=0;u<l;u++){const h=n?u:s[u],f=e[h],p=t[h];if(f===p){a[h]=f,(n?u<i:xK.call(e,h))&&c++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){a[h]=p;continue}const v=S9(f,p);a[h]=v,v===f&&c++}return i===l&&c===i?e:a}function Bv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function H5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jE(e){if(!$5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $5(e){return Object.prototype.toString.call(e)==="[object Object]"}function SK(e){return new Promise(t=>{Ul.setTimeout(t,e)})}function DE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?S9(e,t):t}function wK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function CK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tk=Symbol();function w9(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===tk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function C9(e,t){return typeof e=="function"?e(...t):!!e}var EK=class extends Rd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!bc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nk=new EK;function IE(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var TK=bK;function kK(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=TK;const s=a=>{t?e.push(a):i(()=>{n(a)})},l=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||l()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ir=kK(),OK=class extends Rd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!bc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},zv=new OK;function RK(e){return Math.min(1e3*2**e,3e4)}function E9(e){return(e??"online")==="online"?zv.isOnline():!0}var NE=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function T9(e){let t=!1,n=0,r;const i=IE(),s=()=>i.status!=="pending",l=x=>{if(!s()){const g=new NE(x);p(g),e.onCancel?.(g)}},a=()=>{t=!0},c=()=>{t=!1},u=()=>nk.isFocused()&&(e.networkMode==="always"||zv.isOnline())&&e.canRun(),h=()=>E9(e.networkMode)&&e.canRun(),f=x=>{s()||(r?.(),i.resolve(x))},p=x=>{s()||(r?.(),i.reject(x))},v=()=>new Promise(x=>{r=g=>{(s()||u())&&x(g)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),S=()=>{if(s())return;let x;const g=n===0?e.initialPromise:void 0;try{x=g??e.fn()}catch(b){x=Promise.reject(b)}Promise.resolve(x).then(f).catch(b=>{if(s())return;const y=e.retry??(bc?0:3),_=e.retryDelay??RK,T=typeof _=="function"?_(n,b):_,E=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,b);if(t||!E){p(b);return}n++,e.onFail?.(n,b),SK(T).then(()=>u()?void 0:v()).then(()=>{t?p(b):S()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:a,continueRetry:c,canStart:h,start:()=>(h()?S():v().then(S),i)}}var k9=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),LE(this.gcTime)&&(this.#e=Ul.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bc?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ul.clearTimeout(this.#e),this.#e=void 0)}},AK=class extends k9{#e;#t;#n;#i;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=U5(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=U5(this.options);t.data!==void 0&&(this.setState(F5(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=DE(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Hr).catch(Hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>qi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tk||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>za(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!x9(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const a=w9(this.options,t),u=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},l=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(a),a})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#s({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=T9({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:a=>{a instanceof NE&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,c)=>{this.#s({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof NE){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#s({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...O9(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...F5(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),ir.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function O9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:E9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function F5(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function U5(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var PK=class extends Rd{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=IE(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#o;#a;#s;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),V5(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return BE(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return BE(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#x(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qi(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Bv(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&q5(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||qi(this.options.enabled,this.#t)!==qi(t.enabled,this.#t)||za(this.options.staleTime,this.#t)!==za(t.staleTime,this.#t))&&this.#g();const i=this.#v();r&&(this.#t!==n||qi(this.options.enabled,this.#t)!==qi(t.enabled,this.#t)||i!==this.#l)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return LK(this,n)&&(this.#i=n,this.#o=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Hr)),t}#g(){this.#_();const e=za(this.options.staleTime,this.#t);if(bc||this.#i.isStale||!LE(e))return;const n=x9(this.#i.dataUpdatedAt,e)+1;this.#c=Ul.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#x(),this.#l=e,!(bc||qi(this.options.enabled,this.#t)===!1||!LE(this.#l)||this.#l===0)&&(this.#u=Ul.setInterval(()=>{(this.options.refetchIntervalInBackground||nk.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#_(){this.#c&&(Ul.clearTimeout(this.#c),this.#c=void 0)}#x(){this.#u&&(Ul.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,s=this.#r,l=this.#o,c=e!==n?e.state:this.#n,{state:u}=e;let h={...u},f=!1,p;if(t._optimisticResults){const R=this.hasListeners(),L=!R&&V5(e,t),z=R&&q5(e,n,t,r);(L||z)&&(h={...h,...O9(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:S,status:x}=h;p=h.data;let g=!1;if(t.placeholderData!==void 0&&p===void 0&&x==="pending"){let R;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(R=i.data,g=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,R!==void 0&&(x="success",p=DE(i?.data,R,t),f=!0)}if(t.select&&p!==void 0&&!g)if(i&&p===s?.data&&t.select===this.#m)p=this.#f;else try{this.#m=t.select,p=t.select(p),p=DE(i?.data,p,t),this.#f=p,this.#s=null}catch(R){this.#s=R}this.#s&&(v=this.#s,p=this.#f,S=Date.now(),x="error");const b=h.fetchStatus==="fetching",y=x==="pending",_=x==="error",T=y&&b,E=p!==void 0,A={status:x,fetchStatus:h.fetchStatus,isPending:y,isSuccess:x==="success",isError:_,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:S,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:_&&!E,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&E,isStale:rk(e,t),refetch:this.refetch,promise:this.#a,isEnabled:qi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=D=>{A.status==="error"?D.reject(A.error):A.data!==void 0&&D.resolve(A.data)},L=()=>{const D=this.#a=A.promise=IE();R(D)},z=this.#a;switch(z.status){case"pending":e.queryHash===n.queryHash&&R(z);break;case"fulfilled":(A.status==="error"||A.data!==z.value)&&L();break;case"rejected":(A.status!=="error"||A.error!==z.reason)&&L();break}}return A}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Bv(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const s=new Set(i??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(l=>{const a=l;return this.#i[a]!==e[a]&&s.has(a)})};this.#w({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(e){ir.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function MK(e,t){return qi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function V5(e,t){return MK(e,t)||e.state.data!==void 0&&BE(e,t,t.refetchOnMount)}function BE(e,t,n){if(qi(t.enabled,e)!==!1&&za(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&rk(e,t)}return!1}function q5(e,t,n,r){return(e!==t||qi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rk(e,n)}function rk(e,t){return qi(t.enabled,e)!==!1&&e.isStaleByTime(za(t.staleTime,e))}function LK(e,t){return!Bv(e.getCurrentResult(),t)}function W5(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const f=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},p=w9(t.options,t.fetchOptions),v=async(S,x,g)=>{if(h)return Promise.reject();if(x==null&&S.pages.length)return Promise.resolve(S);const y=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:x,direction:g?"backward":"forward",meta:t.options.meta};return f(k),k})(),_=await p(y),{maxPages:T}=t.options,E=g?CK:wK;return{pages:E(S.pages,_,T),pageParams:E(S.pageParams,x,T)}};if(i&&s.length){const S=i==="backward",x=S?jK:G5,g={pages:s,pageParams:l},b=x(r,g);a=await v(g,b,S)}else{const S=e??s.length;do{const x=c===0?l[0]??r.initialPageParam:G5(r,a);if(c>0&&x==null)break;a=await v(a,x),c++}while(c<S)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function G5(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jK(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var DK=class extends k9{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||R9(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=T9({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#r({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:i})}const s=await this.#i.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{throw await this.#n.config.onError?.(s,e,this.state.context,this,n),await this.options.onError?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,s,e,this.state.context,n),s}finally{this.#r({type:"error",error:s})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ir.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function R9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var IK=class extends Rd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new DK({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Mg(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Mg(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Mg(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Mg(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ir.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>z5(t,n))}findAll(e={}){return this.getAll().filter(t=>z5(e,t))}notify(e){ir.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ir.batch(()=>Promise.all(e.map(t=>t.continue().catch(Hr))))}};function Mg(e){return e.options.scope?.id}var NK=class extends Rd{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Bv(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&_c(n.mutationKey)!==_c(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??R9();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){ir.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,r,i),this.#i.onSettled?.(t.data,null,n,r,i)):t?.type==="error"&&(this.#i.onError?.(t.error,n,r,i),this.#i.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}},BK=class extends Rd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??ek(r,t);let s=this.get(i);return s||(s=new AK({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ir.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>B5(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>B5(e,n)):t}notify(e){ir.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ir.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ir.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zK=class{#e;#t;#n;#i;#r;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new BK,this.#t=e.mutationCache||new IK,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=nk.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=zv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(za(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,l=_K(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ir.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ir.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return ir.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ir.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Hr).catch(Hr)}invalidateQueries(e,t={}){return ir.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ir.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Hr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(za(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Hr).catch(Hr)}fetchInfiniteQuery(e){return e.behavior=W5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Hr).catch(Hr)}ensureInfiniteQueryData(e){return e.behavior=W5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(_c(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{$h(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(_c(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{$h(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ek(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===tk&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},A9=O.createContext(void 0),hr=e=>{const t=O.useContext(A9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},HK=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(A9.Provider,{value:e,children:t})),P9=O.createContext(!1),$K=()=>O.useContext(P9);P9.Provider;function FK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var UK=O.createContext(FK()),VK=()=>O.useContext(UK),qK=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},WK=e=>{O.useEffect(()=>{e.clearReset()},[e])},GK=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||C9(n,[e.error,r])),KK=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YK=(e,t)=>e.isLoading&&e.isFetching&&!t,XK=(e,t)=>e?.suspense&&t.isPending,K5=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function QK(e,t,n){const r=$K(),i=VK(),s=hr(),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",KK(l),qK(l,i),WK(i);const a=!s.getQueryCache().get(l.queryHash),[c]=O.useState(()=>new t(s,l)),u=c.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(f=>{const p=h?c.subscribe(ir.batchCalls(f)):Hr;return c.updateResult(),p},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),O.useEffect(()=>{c.setOptions(l)},[l,c]),XK(l,u))throw K5(l,c,i);if(GK({result:u,errorResetBoundary:i,throwOnError:l.throwOnError,query:s.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw u.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,u),l.experimental_prefetchInRender&&!bc&&YK(u,r)&&(a?K5(l,c,i):s.getQueryCache().get(l.queryHash)?.promise)?.catch(Hr).finally(()=>{c.updateResult()}),l.notifyOnChangeProps?u:c.trackResult(u)}function ar(e,t){return QK(e,PK)}function Kn(e,t){const n=hr(),[r]=O.useState(()=>new NK(n,e));O.useEffect(()=>{r.setOptions(e)},[r,e]);const i=O.useSyncExternalStore(O.useCallback(l=>r.subscribe(ir.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=O.useCallback((l,a)=>{r.mutate(l,a).catch(Hr)},[r]);if(i.error&&C9(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function vb(){return typeof window<"u"}function Za(e){return ik(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Js(e){var t;return(t=(ik(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ik(e){return vb()?e instanceof Node||e instanceof Wn(e).Node:!1}function Kt(e){return vb()?e instanceof Element||e instanceof Wn(e).Element:!1}function vn(e){return vb()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function zE(e){return!vb()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}const ZK=new Set(["inline","contents"]);function Rc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ti(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ZK.has(i)}const JK=new Set(["table","td","th"]);function eY(e){return JK.has(Za(e))}const tY=[":popover-open",":modal"];function yb(e){return tY.some(t=>{try{return e.matches(t)}catch{return!1}})}const nY=["transform","translate","scale","rotate","perspective"],rY=["transform","translate","scale","rotate","perspective","filter"],iY=["paint","layout","strict","content"];function sk(e){const t=bb(),n=Kt(e)?Ti(e):e;return nY.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rY.some(r=>(n.willChange||"").includes(r))||iY.some(r=>(n.contain||"").includes(r))}function sY(e){let t=Xs(e);for(;vn(t)&&!qs(t);){if(sk(t))return t;if(yb(t))return null;t=Xs(t)}return null}function bb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const oY=new Set(["html","body","#document"]);function qs(e){return oY.has(Za(e))}function Ti(e){return Wn(e).getComputedStyle(e)}function _b(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xs(e){if(Za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zE(e)&&e.host||Js(e);return zE(t)?t.host:t}function M9(e){const t=Xs(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:vn(t)&&Rc(t)?t:M9(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M9(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),l=Wn(i);if(s){const a=HE(l);return t.concat(l,l.visualViewport||[],Rc(i)?i:[],a&&n?Ha(a):[])}return t.concat(i,Ha(i,[],n))}function HE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Y5={};function Cr(e,t){const n=O.useRef(Y5);return n.current===Y5&&(n.current=e(t)),n}const Q1=fb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],aY=Q1&&Q1!==O.useLayoutEffect?Q1:e=>e();function Ne(e){const t=Cr(lY).current;return t.next=e,aY(t.effect),t.trampoline}function lY(){const e={next:void 0,callback:cY,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function cY(){}const uY=()=>{},Fe=typeof document<"u"?O.useLayoutEffect:uY;function $E(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ah={};function Qs(e,t,n,r,i){let s={...FE(e,Ah)};return t&&(s=xh(s,t)),n&&(s=xh(s,n)),r&&(s=xh(s,r)),i&&(s=xh(s,i)),s}function dY(e){if(e.length===0)return Ah;if(e.length===1)return FE(e[0],Ah);let t={...FE(e[0],Ah)};for(let n=1;n<e.length;n+=1)t=xh(t,e[n]);return t}function xh(e,t){return L9(t)?t(e):fY(e,t)}function fY(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=$E(e.style,r);break}case"className":{e[n]=j9(e.className,r);break}default:hY(n,r)?e[n]=pY(e[n],r):e[n]=r}}return e}function hY(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function L9(e){return typeof e=="function"}function FE(e,t){return L9(e)?e(t):e??Ah}function pY(e,t){return t?e?n=>{if(mY(n)){const i=n;UE(i);const s=t(i);return i.baseUIHandlerPrevented||e?.(i),s}const r=t(n);return e?.(n),r}:t:e}function UE(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function j9(e,t){return t?e?t+" "+e:t:e}function mY(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ut(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const D9=O.createContext(void 0);function ok(e=!1){const t=O.useContext(D9);if(t===void 0&&!e)throw new Error(Ut(16));return t}function gY(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:s}=e,l=r&&t!==!1,a=r&&t===!1;return{props:O.useMemo(()=>{const u={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(u.tabIndex=i,!s&&n&&(u.tabIndex=t?i:-1)),(s&&(t||l)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||a)&&(u.disabled=n),u},[r,n,t,l,a,s,i])}}function ii(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,s=O.useRef(null),l=ok(!0)!==void 0,a=Ne(()=>{const p=s.current;return!!(p?.tagName==="A"&&p?.href)}),{props:c}=gY({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),u=O.useCallback(()=>{const p=s.current;vY(p)&&l&&t&&c.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,c.disabled,l]);Fe(u,[u]);const h=O.useCallback((p={})=>{const{onClick:v,onMouseDown:S,onKeyUp:x,onKeyDown:g,onPointerDown:b,...y}=p;return Qs({type:i?"button":void 0,onClick(T){if(t){T.preventDefault();return}v?.(T)},onMouseDown(T){t||S?.(T)},onKeyDown(T){if(t||(UE(T),g?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!i&&!a()&&!t,k=T.key==="Enter",A=T.key===" ";E&&((A||k)&&T.preventDefault(),k&&v?.(T))},onKeyUp(T){t||(UE(T),x?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!i&&!t&&T.key===" "&&v?.(T)},onPointerDown(T){if(t){T.preventDefault();return}b?.(T)}},i?void 0:{role:"button"},c,y)},[t,c,i,a]),f=Ne(p=>{s.current=p,u()});return{getButtonProps:h,buttonRef:f}}function vY(e){return vn(e)&&e.tagName==="BUTTON"}function ns(e,t,n,r){const i=Cr(I9).current;return bY(i,e,t,n,r)&&N9(i,[e,t,n,r]),i.callback}function yY(e){const t=Cr(I9).current;return _Y(t,e)&&N9(t,e),t.callback}function I9(){return{callback:null,cleanup:null,refs:[]}}function bY(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function _Y(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function N9(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const s=t[i];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[i]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const s=t[i];if(s!=null)switch(typeof s){case"function":{const l=r[i];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const xY=parseInt(O.version,10);function ak(e){return xY>=e}function X5(e){if(!O.isValidElement(e))return null;const t=e,n=t.props;return(ak(19)?n?.ref:t.ref)??null}function SY(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const s=t[r](i);s!=null&&Object.assign(n,s);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function wY(e,t){return typeof e=="function"?e(t):e}function CY(e,t){return typeof e=="function"?e(t):e}function wn(){}const ti=Object.freeze([]),yn=Object.freeze({}),EY=500,TY=500,kY={style:{transition:"none"}},B9="data-base-ui-click-trigger",lk={fallbackAxisSide:"none"},OY={fallbackAxisSide:"end"},RY={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function ut(e,t,n={}){const r=t.render,i=AY(t,n);if(n.enabled===!1)return null;const s=n.state??yn;return PY(e,r,i,s)}function AY(e,t={}){const{className:n,style:r,render:i}=e,{state:s=yn,ref:l,props:a,stateAttributesMapping:c,enabled:u=!0}=t,h=u?wY(n,s):void 0,f=u?CY(r,s):void 0,p=u?SY(s,c):yn,v=u?$E(p,Array.isArray(a)?dY(a):a)??yn:yn;return typeof document<"u"&&(u?Array.isArray(l)?v.ref=yY([v.ref,X5(i),...l]):v.ref=ns(v.ref,X5(i),l):ns(null,null)),u?(h!==void 0&&(v.className=j9(v.className,h)),f!==void 0&&(v.style=$E(v.style,f)),v):yn}function PY(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Qs(n,t.props);return i.ref=n.ref,O.cloneElement(t,i)}if(e&&typeof e=="string")return MY(e,n);throw new Error(Ut(8))}function MY(e,t){return e==="button"?O.createElement("button",{type:"button",...t,key:t.key}):e==="img"?O.createElement("img",{alt:"",...t,key:t.key}):O.createElement(e,t)}const LY=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,focusableWhenDisabled:l=!1,nativeButton:a=!0,...c}=t,u=!!s,{getButtonProps:h,buttonRef:f}=ii({disabled:u,focusableWhenDisabled:l,native:a}),p=O.useMemo(()=>({disabled:u}),[u]);return ut("button",t,{state:p,ref:[n,f],props:[c,h]})});function z9(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=z9(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=z9(e))&&(r&&(r+=" "),r+=t);return r}const Q5=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Z5=Bt,Ac=(e,t)=>n=>{var r;if(t?.variants==null)return Z5(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,l=Object.keys(i).map(u=>{const h=n?.[u],f=s?.[u];if(h===null)return null;const p=Q5(h)||Q5(f);return i[u][p]}),a=n&&Object.entries(n).reduce((u,h)=>{let[f,p]=h;return p===void 0||(u[f]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,h)=>{let{class:f,className:p,...v}=h;return Object.entries(v).every(S=>{let[x,g]=S;return Array.isArray(g)?g.includes({...s,...a}[x]):{...s,...a}[x]===g})?[...u,f,p]:u},[]);return Z5(e,l,c,n?.class,n?.className)},jY=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},DY=(e,t)=>({classGroupId:e,validator:t}),H9=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hv="-",J5=[],IY="arbitrary..",NY=e=>{const t=zY(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return BY(l);const a=l.split(Hv),c=a[0]===""&&a.length>1?1:0;return $9(a,c,t)},getConflictingClassGroupIds:(l,a)=>{if(a){const c=r[l],u=n[l];return c?u?jY(u,c):c:u||J5}return n[l]||J5}}},$9=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const u=$9(e,t+1,s);if(u)return u}const l=n.validators;if(l===null)return;const a=t===0?e.join(Hv):e.slice(t).join(Hv),c=l.length;for(let u=0;u<c;u++){const h=l[u];if(h.validator(a))return h.classGroupId}},BY=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?IY+r:void 0})(),zY=e=>{const{theme:t,classGroups:n}=e;return HY(n,t)},HY=(e,t)=>{const n=H9();for(const r in e){const i=e[r];ck(i,n,r,t)}return n},ck=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const l=e[s];$Y(l,t,n,r)}},$Y=(e,t,n,r)=>{if(typeof e=="string"){FY(e,t,n);return}if(typeof e=="function"){UY(e,t,n,r);return}VY(e,t,n,r)},FY=(e,t,n)=>{const r=e===""?t:F9(t,e);r.classGroupId=n},UY=(e,t,n,r)=>{if(qY(e)){ck(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(DY(n,e))},VY=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let l=0;l<s;l++){const[a,c]=i[l];ck(c,F9(t,a),n,r)}},F9=(e,t)=>{let n=e;const r=t.split(Hv),i=r.length;for(let s=0;s<i;s++){const l=r[s];let a=n.nextPart.get(l);a||(a=H9(),n.nextPart.set(l,a)),n=a}return n},qY=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,WY=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return i(s,l),l},set(s,l){s in n?n[s]=l:i(s,l)}}},VE="!",eL=":",GY=[],tL=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),KY=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let l=0,a=0,c=0,u;const h=i.length;for(let x=0;x<h;x++){const g=i[x];if(l===0&&a===0){if(g===eL){s.push(i.slice(c,x)),c=x+1;continue}if(g==="/"){u=x;continue}}g==="["?l++:g==="]"?l--:g==="("?a++:g===")"&&a--}const f=s.length===0?i:i.slice(c);let p=f,v=!1;f.endsWith(VE)?(p=f.slice(0,-1),v=!0):f.startsWith(VE)&&(p=f.slice(1),v=!0);const S=u&&u>c?u-c:void 0;return tL(s,v,p,S)};if(t){const i=t+eL,s=r;r=l=>l.startsWith(i)?s(l.slice(i.length)):tL(GY,!1,l,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},YY=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const l=n[s],a=l[0]==="[",c=t.has(l);a||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},XY=e=>({cache:WY(e.cacheSize),parseClassName:KY(e),sortModifiers:YY(e),...NY(e)}),QY=/\s+/,ZY=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,l=[],a=e.trim().split(QY);let c="";for(let u=a.length-1;u>=0;u-=1){const h=a[u],{isExternal:f,modifiers:p,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:x}=n(h);if(f){c=h+(c.length>0?" "+c:c);continue}let g=!!x,b=r(g?S.substring(0,x):S);if(!b){if(!g){c=h+(c.length>0?" "+c:c);continue}if(b=r(S),!b){c=h+(c.length>0?" "+c:c);continue}g=!1}const y=p.length===0?"":p.length===1?p[0]:s(p).join(":"),_=v?y+VE:y,T=_+b;if(l.indexOf(T)>-1)continue;l.push(T);const E=i(b,g);for(let k=0;k<E.length;++k){const A=E[k];l.push(_+A)}c=h+(c.length>0?" "+c:c)}return c},JY=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=U9(n))&&(i&&(i+=" "),i+=r);return i},U9=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=U9(e[r]))&&(n&&(n+=" "),n+=t);return n},eX=(e,...t)=>{let n,r,i,s;const l=c=>{const u=t.reduce((h,f)=>f(h),e());return n=XY(u),r=n.cache.get,i=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const h=ZY(c,n);return i(c,h),h};return s=l,(...c)=>s(JY(...c))},tX=[],Qn=e=>{const t=n=>n[e]||tX;return t.isThemeGetter=!0,t},V9=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q9=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nX=/^\d+\/\d+$/,rX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iX=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Eu=e=>nX.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),Z1=e=>e.endsWith("%")&&kt(e.slice(0,-1)),ko=e=>rX.test(e),lX=()=>!0,cX=e=>iX.test(e)&&!sX.test(e),W9=()=>!1,uX=e=>oX.test(e),dX=e=>aX.test(e),fX=e=>!Xe(e)&&!Qe(e),hX=e=>Ad(e,Y9,W9),Xe=e=>V9.test(e),Rl=e=>Ad(e,X9,cX),J1=e=>Ad(e,yX,kt),nL=e=>Ad(e,G9,W9),pX=e=>Ad(e,K9,dX),Lg=e=>Ad(e,Q9,uX),Qe=e=>q9.test(e),ih=e=>Pd(e,X9),mX=e=>Pd(e,bX),rL=e=>Pd(e,G9),gX=e=>Pd(e,Y9),vX=e=>Pd(e,K9),jg=e=>Pd(e,Q9,!0),Ad=(e,t,n)=>{const r=V9.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Pd=(e,t,n=!1)=>{const r=q9.exec(e);return r?r[1]?t(r[1]):n:!1},G9=e=>e==="position"||e==="percentage",K9=e=>e==="image"||e==="url",Y9=e=>e==="length"||e==="size"||e==="bg-size",X9=e=>e==="length",yX=e=>e==="number",bX=e=>e==="family-name",Q9=e=>e==="shadow",_X=()=>{const e=Qn("color"),t=Qn("font"),n=Qn("text"),r=Qn("font-weight"),i=Qn("tracking"),s=Qn("leading"),l=Qn("breakpoint"),a=Qn("container"),c=Qn("spacing"),u=Qn("radius"),h=Qn("shadow"),f=Qn("inset-shadow"),p=Qn("text-shadow"),v=Qn("drop-shadow"),S=Qn("blur"),x=Qn("perspective"),g=Qn("aspect"),b=Qn("ease"),y=Qn("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Qe,Xe],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],R=()=>[Qe,Xe,c],L=()=>[Eu,"full","auto",...R()],z=()=>[Ca,"none","subgrid",Qe,Xe],D=()=>["auto",{span:["full",Ca,Qe,Xe]},Ca,Qe,Xe],$=()=>[Ca,"auto",Qe,Xe],N=()=>["auto","min","max","fr",Qe,Xe],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...R()],K=()=>[Eu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],W=()=>[e,Qe,Xe],I=()=>[...T(),rL,nL,{position:[Qe,Xe]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",gX,hX,{size:[Qe,Xe]}],B=()=>[Z1,ih,Rl],V=()=>["","none","full",u,Qe,Xe],X=()=>["",kt,ih,Rl],re=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[kt,Z1,rL,nL],Y=()=>["","none",S,Qe,Xe],J=()=>["none",kt,Qe,Xe],ee=()=>["none",kt,Qe,Xe],ne=()=>[kt,Qe,Xe],te=()=>[Eu,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ko],breakpoint:[ko],color:[lX],container:[ko],"drop-shadow":[ko],ease:["in","out","in-out"],font:[fX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ko],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ko],shadow:[ko],spacing:["px",kt],text:[ko],"text-shadow":[ko],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Eu,Xe,Qe,g]}],container:["container"],columns:[{columns:[kt,Xe,Qe,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",Qe,Xe]}],basis:[{basis:[Eu,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,Eu,"auto","initial","none",Xe]}],grow:[{grow:["",kt,Qe,Xe]}],shrink:[{shrink:["",kt,Qe,Xe]}],order:[{order:[Ca,"first","last","none",Qe,Xe]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[a,"screen",...K()]}],"min-w":[{"min-w":[a,"screen","none",...K()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[l]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,ih,Rl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qe,J1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Z1,Xe]}],"font-family":[{font:[mX,Xe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Qe,Xe]}],"line-clamp":[{"line-clamp":[kt,"none",Qe,J1]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",Qe,Xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Qe,Xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Qe,Rl]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[kt,"auto",Qe,Xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe,Xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe,Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,Qe,Xe],radial:["",Qe,Xe],conic:[Ca,Qe,Xe]},vX,pX]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Qe,Xe]}],"outline-w":[{outline:["",kt,ih,Rl]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",h,jg,Lg]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",f,jg,Lg]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[kt,Rl]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,jg,Lg]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[kt,Qe,Xe]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Qe,Xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Qe,Xe]}],filter:[{filter:["","none",Qe,Xe]}],blur:[{blur:Y()}],brightness:[{brightness:[kt,Qe,Xe]}],contrast:[{contrast:[kt,Qe,Xe]}],"drop-shadow":[{"drop-shadow":["","none",v,jg,Lg]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",kt,Qe,Xe]}],"hue-rotate":[{"hue-rotate":[kt,Qe,Xe]}],invert:[{invert:["",kt,Qe,Xe]}],saturate:[{saturate:[kt,Qe,Xe]}],sepia:[{sepia:["",kt,Qe,Xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Qe,Xe]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Qe,Xe]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Qe,Xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Qe,Xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Qe,Xe]}],"backdrop-invert":[{"backdrop-invert":["",kt,Qe,Xe]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Qe,Xe]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Qe,Xe]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Qe,Xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Qe,Xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Qe,Xe]}],ease:[{ease:["linear","initial",b,Qe,Xe]}],delay:[{delay:[kt,Qe,Xe]}],animate:[{animate:["none",y,Qe,Xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Qe,Xe]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:ee()}],"scale-x":[{"scale-x":ee()}],"scale-y":[{"scale-y":ee()}],"scale-z":[{"scale-z":ee()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[Qe,Xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qe,Xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qe,Xe]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[kt,ih,Rl,J1]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xX=eX(_X);function Be(...e){return xX(Bt(e))}const SX=Ac("cursor-pointer focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function ze({className:e,variant:t="default",size:n="default",...r}){return w.jsx(LY,{"data-slot":"button",className:Be(SX({variant:t,size:n,className:e})),...r})}const wX={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},be=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i="",altIcon:s,showAlt:l=!1,icon:a,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:h=!1,...f},p)=>{const v=n!==void 0?r?Number(n)*24/Number(t):n:void 0,S=v!==void 0?{strokeWidth:v,stroke:"currentColor"}:{},x={ref:p,...wX,width:t,height:t,color:c||e,className:i,...S,...f},b=[...l&&s?s:a].sort(([,y],[,_])=>{const T=y.opacity!==void 0;return _.opacity!==void 0?1:T?-1:0}).map(([y,_])=>{const T=_.opacity!==void 0,E=T&&!h?_.opacity:void 0,k=u?{..._.stroke!==void 0?{stroke:T?u:c||e}:{fill:T?u:c||e}}:{};return O.createElement(y,{..._,...S,...k,opacity:E,key:_.key})});return O.createElement("svg",x,b)});be.displayName="HugeiconsIcon";const Md=[["path",{d:"M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 9V13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 16.9922V17.0022",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",key:"2"}]],xb=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],qE=[["path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16V4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M16 12C16 12 13.054 16 12 16C10.9459 16 8 12 8 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Z9=[["path",{d:"M17.9997 12.5C17.9997 12.5 13.5807 18.5 11.9996 18.5C10.4185 18.5 5.99966 12.5 5.99966 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.9997 5.50005C17.9997 5.50005 13.5807 11.5 11.9996 11.5C10.4185 11.5 5.99966 5.5 5.99966 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],J9=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],iL=[["path",{d:"M5.5 12.002H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M10.9999 18.002C10.9999 18.002 4.99998 13.583 4.99997 12.0019C4.99996 10.4208 11 6.00195 11 6.00195",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Sb=[["path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],uk=[["path",{d:"M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],WE=[["path",{d:"M18 4L5.99997 4",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 8V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15.9999 12C15.9999 12 13.054 8.00001 11.9999 8C10.9458 7.99999 7.99994 12 7.99994 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],GE=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 9H21.5",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.99981 6H7.00879",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}],["path",{d:"M10.9998 6H11.0088",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"3"}]],CX=[["path",{d:"M16 2V6M8 2V6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 10H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M11.9955 14H12.0045M11.9955 18H12.0045M15.991 14H16M8 14H8.00897M8 18H8.00897",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"3"}]],Cs=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],EX=[["path",{d:"M21 21H10C6.70017 21 5.05025 21 4.02513 19.9749C3 18.9497 3 17.2998 3 14V3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 20C5.43938 16.8438 7.67642 8.7643 10.4282 8.7643C12.3301 8.7643 12.8226 12.6353 14.6864 12.6353C17.8931 12.6353 17.4282 4 21 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],TX=[["path",{d:"M11 6L21 6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 12L21 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M11 18L21 18",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M3 7.39286C3 7.39286 4 8.04466 4.5 9C4.5 9 6 5.25 8 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3 18.3929C3 18.3929 4 19.0447 4.5 20C4.5 20 6 16.25 8 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],kX=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L10.5 15L16 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],OX=[["path",{d:"M21 3L13 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.44573 11.0854C6.96539 12.0368 4.98269 11.8736 3 11.0885C3.50059 17.531 6.50414 20.0089 10.5089 21C10.5089 21 13.5261 18.8664 13.961 13.8074C14.0081 13.2595 14.0317 12.9856 13.9178 12.6769C13.8038 12.3682 13.5802 12.1468 13.1329 11.704C12.3973 10.9757 12.0295 10.6116 11.5929 10.5204C11.1564 10.4293 10.5862 10.648 9.44573 11.0854Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M4.5 16.4464C4.5 16.4464 7 16.9286 9.5 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M8.5 7.25C8.5 7.94036 7.94036 8.5 7.25 8.5C6.55964 8.5 6 7.94036 6 7.25C6 6.55964 6.55964 6 7.25 6C7.94036 6 8.5 6.55964 8.5 7.25Z",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["path",{d:"M11 4V4.1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"4"}]],sL=[["path",{d:"M7.99994 12H8.00891M11.9955 12H12.0044M15.991 12H15.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"0"}],["path",{d:"M18 21C19.2322 21 20.231 19.8487 20.231 18.4286C20.231 16.1808 20.1312 14.6864 21.6733 12.9091C22.1089 12.407 22.1089 11.5929 21.6733 11.0908C20.1312 9.31353 20.231 7.81914 20.231 5.57141C20.231 4.15125 19.2322 2.99998 18 2.99998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6 21C4.76784 21 3.76897 19.8487 3.76897 18.4286C3.76897 16.1808 3.86877 14.6864 2.32673 12.9091C1.89109 12.407 1.89109 11.5929 2.32673 11.0908C3.83496 9.35249 3.76897 7.8399 3.76897 5.57141C3.76897 4.15125 4.76784 2.99998 6 2.99998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],dk=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 9H21.5",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.99981 6H7.00879",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}],["path",{d:"M10.9998 6H11.0088",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"3"}],["path",{d:"M16 13L17.2265 14.0572C17.7422 14.5016 18 14.7239 18 15C18 15.2761 17.7422 15.4984 17.2265 15.9428L16 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M8 13L6.77346 14.0572C6.25782 14.5016 6 14.7239 6 15C6 15.2761 6.25782 15.4984 6.77346 15.9428L8 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M13 12L11 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}]],RX=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],e7=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 12H21.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 7L17 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["circle",{cx:"8.25",cy:"7",r:"1.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["circle",{cx:"8.25",cy:"17",r:"1.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M13 17L17 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],Fp=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],AX=[["path",{d:"M18 16L19.8398 17.5858C20.6133 18.2525 21 18.5858 21 19C21 19.4142 20.6133 19.7475 19.8398 20.4142L18 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14 16L12.1602 17.5858C11.3867 18.2525 11 18.5858 11 19C11 19.4142 11.3867 19.7475 12.1602 20.4142L14 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M20 13.0032L20 7.8199C20 6.12616 20 5.27929 19.732 4.60291C19.3013 3.51555 18.3902 2.65784 17.2352 2.25228C16.5168 2 15.6173 2 13.8182 2C10.6698 2 9.09563 2 7.83836 2.44148C5.81714 3.15122 4.22281 4.6522 3.46894 6.55509C3 7.73875 3 9.22077 3 12.1848L3 14.731C3 17.8013 3 19.3364 3.8477 20.4025C4.09058 20.708 4.37862 20.9792 4.70307 21.2078C5.61506 21.8506 6.85019 21.9757 9 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M3 12C3 10.159 4.49238 8.66667 6.33333 8.66667C6.99912 8.66667 7.78404 8.78333 8.43137 8.60988C9.00652 8.45576 9.45576 8.00652 9.60988 7.43136C9.78333 6.78404 9.66667 5.99912 9.66667 5.33333C9.66667 3.49238 11.1591 2 13 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],PX=[["path",{d:"M8 7L16 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 11L12 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],t7=[["path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Qi=[["path",{d:"M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],KE=[["path",{d:"M2.5 20V8.87695C2.5 7.58945 2.5 6.9457 2.78533 6.47048C2.9541 6.18939 3.18939 5.9541 3.47048 5.78533C3.9457 5.5 4.59449 5.5 5.89206 5.5C6.52339 5.5 6.83906 5.5 7.12612 5.58819C7.31759 5.64702 7.49914 5.73428 7.66469 5.84705C7.91289 6.01611 8.10859 6.26074 8.5 6.75C8.89141 7.23926 9.08711 7.48389 9.33531 7.65295C9.50086 7.76572 9.68241 7.85298 9.87388 7.91181C10.1609 8 10.4742 8 11.1008 8H15C16.4045 8 17.1067 8 17.6111 8.33706C17.8295 8.48298 18.017 8.67048 18.1629 8.88886C18.5 9.39331 18.5 10.0955 18.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4.42028 14.0144L3.63368 16.0144C2.65618 18.4998 2.16743 19.7425 2.7524 20.6213C3.33737 21.5 4.65337 21.5 7.28537 21.5H15.1903C16.4249 21.5 17.0422 21.5 17.5295 21.1795C18.0169 20.859 18.2702 20.2865 18.7769 19.1415L19.6618 17.1415C20.7866 14.5992 21.349 13.3281 20.7679 12.4141C20.1868 11.5 18.8163 11.5 16.0752 11.5H8.07196C6.78232 11.5 6.1375 11.5 5.63811 11.8439C5.13872 12.1877 4.89924 12.7966 4.42028 14.0144Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M11.5 4.51456C12.4151 3.28409 13.6662 2.55594 15.5125 2.50161C16.1155 2.48386 16.7152 2.61395 17.2682 2.85544C18.5748 3.42601 19.4185 4.15644 20 5.5L21.5 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],n7=[["path",{d:"M12 21C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C21.9796 9.05942 21.9992 10.0588 22 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 15L14 17C14.2426 15.3039 15.7368 14 17.5 14C18.6894 14 19.7402 14.5933 20.3726 15.5M22 20L21 18C20.7574 19.6961 19.2632 21 17.5 21C16.3106 21 15.2598 20.4067 14.6273 19.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],YE=[["path",{d:"M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 7L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"5",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"5",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],fk=[["path",{d:"M6 8L6 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 16V12C18 9.17156 18 7.75735 17.1213 6.87867C16.2426 5.99999 14.8284 5.99999 12 5.99999L11 5.99999M11 5.99999C11 5.29976 12.9943 3.99152 13.5 3.49999M11 5.99999C11 6.70022 12.9943 8.00846 13.5 8.49999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"6",cy:"18",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"6",cy:"6",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"18",cy:"18",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],$v=[["path",{d:"M3.88884 9.66294C4.39329 10 5.09552 10 6.49998 10C7.90445 10 8.60668 10 9.11113 9.66294C9.32951 9.51702 9.51701 9.32952 9.66292 9.11114C9.99998 8.60669 9.99998 7.90446 9.99998 6.5C9.99998 5.09554 9.99998 4.39331 9.66292 3.88886C9.51701 3.67048 9.32951 3.48298 9.11113 3.33706C8.60668 3 7.90445 3 6.49998 3C5.09552 3 4.39329 3 3.88884 3.33706C3.67046 3.48298 3.48296 3.67048 3.33705 3.88886C2.99998 4.39331 2.99998 5.09554 2.99998 6.5C2.99998 7.90446 2.99998 8.60669 3.33705 9.11114C3.48296 9.32952 3.67046 9.51702 3.88884 9.66294Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.8888 9.66294C15.3933 10 16.0955 10 17.5 10C18.9044 10 19.6067 10 20.1111 9.66294C20.3295 9.51702 20.517 9.32952 20.6629 9.11114C21 8.60669 21 7.90446 21 6.5C21 5.09554 21 4.39331 20.6629 3.88886C20.517 3.67048 20.3295 3.48298 20.1111 3.33706C19.6067 3 18.9044 3 17.5 3C16.0955 3 15.3933 3 14.8888 3.33706C14.6705 3.48298 14.483 3.67048 14.337 3.88886C14 4.39331 14 5.09554 14 6.5C14 7.90446 14 8.60669 14.337 9.11114C14.483 9.32952 14.6705 9.51702 14.8888 9.66294Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3.88884 20.6629C4.39329 21 5.09552 21 6.49998 21C7.90445 21 8.60668 21 9.11113 20.6629C9.32951 20.517 9.51701 20.3295 9.66292 20.1111C9.99998 19.6067 9.99998 18.9045 9.99998 17.5C9.99998 16.0955 9.99998 15.3933 9.66292 14.8889C9.51701 14.6705 9.32951 14.483 9.11113 14.3371C8.60668 14 7.90445 14 6.49998 14C5.09552 14 4.39329 14 3.88884 14.3371C3.67046 14.483 3.48296 14.6705 3.33705 14.8889C2.99998 15.3933 2.99998 16.0955 2.99998 17.5C2.99998 18.9045 2.99998 19.6067 3.33705 20.1111C3.48296 20.3295 3.67046 20.517 3.88884 20.6629Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.8888 20.6629C15.3933 21 16.0955 21 17.5 21C18.9044 21 19.6067 21 20.1111 20.6629C20.3295 20.517 20.517 20.3295 20.6629 20.1111C21 19.6067 21 18.9045 21 17.5C21 16.0955 21 15.3933 20.6629 14.8889C20.517 14.6705 20.3295 14.483 20.1111 14.3371C19.6067 14 18.9044 14 17.5 14C16.0955 14 15.3933 14 14.8888 14.3371C14.6705 14.483 14.483 14.6705 14.337 14.8889C14 15.3933 14 16.0955 14 17.5C14 18.9045 14 19.6067 14.337 20.1111C14.483 20.3295 14.6705 20.517 14.8888 20.6629Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],MX=[["path",{d:"M20.7104 8.70122L21.9186 12.7288C21.9578 12.8592 21.9773 12.9244 21.9879 12.9914L21.9908 13.0118C22 13.079 22 13.147 22 13.2831C22 16.7797 22 18.528 20.9812 19.6669C20.8824 19.7774 20.7774 19.8824 20.6669 19.9812C19.528 21 17.7797 21 14.2831 21H9.71685C6.22026 21 4.47197 21 3.33311 19.9812C3.22259 19.8824 3.11765 19.7774 3.01877 19.6669C2 18.528 2 16.7797 2 13.2831C2 13.147 2 13.079 2.00915 13.0118L2.01215 12.9914C2.02269 12.9244 2.04225 12.8592 2.08136 12.7288L3.28963 8.70122C4.11355 5.95484 4.5255 4.58166 5.5884 3.79083C6.6513 3 8.08495 3 10.9522 3H13.0478C15.9151 3 17.3487 3 18.4116 3.79083C19.4745 4.58166 19.8865 5.95484 20.7104 8.70122Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M2 13H22",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M17.9888 17H18M13 17H13.0112",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}]],LX=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.0001 17H12.009",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",key:"2"}]],jX=[["path",{d:"M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.0002 17C14.2007 17.6224 13.1504 18 12.0002 18C10.8499 18 9.79971 17.6224 9.00018 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],DX=[["circle",{cx:"7.5",cy:"7.5",r:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],IX=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16V11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 8.01172V8.00172",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",key:"2"}]],NX=[["path",{d:"M15.5 14.5C18.8137 14.5 21.5 11.8137 21.5 8.5C21.5 5.18629 18.8137 2.5 15.5 2.5C12.1863 2.5 9.5 5.18629 9.5 8.5C9.5 9.38041 9.68962 10.2165 10.0303 10.9697L2.5 18.5V21.5H5.5V19.5H7.5V17.5H9.5L13.0303 13.9697C13.7835 14.3104 14.6196 14.5 15.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.5 6.5L16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],BX=[["path",{d:"M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],Fr=[["path",{d:"M12 3V6",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 18V21",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 12L18 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M6 12L3 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M18.3635 5.63672L16.2422 7.75804",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M7.75804 16.2422L5.63672 18.3635",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M18.3635 18.3635L16.2422 16.2422",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M7.75804 7.75804L5.63672 5.63672",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"7"}]],zX=[["path",{d:"M4 5L20 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 12L20 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M4 19L20 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],r7=[["path",{d:"M3 6H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 12H13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M3 18H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 8L19.8462 8.87652C17.9487 10.318 17 11.0388 17 12C17 12.9612 17.9487 13.682 19.8462 15.1235L21 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],HX=[["path",{d:"M15.5 8.5L12 12M12 12L8.5 15.5M12 12L15.5 15.5M12 12L8.5 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],XE=[["path",{d:"M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18.6461 4.52795C18.2489 4.89346 18 5.41766 18 6C18 7.10457 18.8954 8 20 8C20.3793 8 20.7339 7.89441 21.0361 7.71103C21.6139 7.36038 22 6.72527 22 6C22 4.89543 21.1046 4 20 4C19.4778 4 19.0023 4.20016 18.6461 4.52795ZM18.6461 4.52795C16.8794 2.95541 14.5513 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 11.6625 21.9833 11.3289 21.9506 11",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],Ld=[["path",{d:"M12 4V20M20 12H4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],$X=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Al=[["path",{d:"M20.0071 14.5662L19.3587 14.1731C18.7986 13.8508 18.3579 13.3564 18.102 12.7634L15.68 7.15102C15.5927 6.94865 15.4729 6.77988 15.328 6.64097C14.6876 6.02689 13.5808 6.28697 13.0432 6.99226C12.0506 8.29448 13.3839 9.52751 13.1022 10.6133L5.35908 6.26089C3.55799 5.28913 2.0024 7.87074 3.79277 9.06333L8.37607 11.6124C7.4934 12.765 5.25512 18.3551 8.12341 20.0599C8.28646 20.1568 8.4672 20.2213 8.64852 20.2773C8.76516 20.3134 8.88186 20.3496 8.99761 20.3857C9.8979 20.6667 11.6003 21.02 12.7668 20.9182C13.9811 20.8123 14.7421 21.4597 15.68 21.9995",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.36184 4.96447C9.75873 5.36011 11.4854 5.24597 12.1223 5.16653M9.36184 4.96447C8.96494 4.56883 8.95358 2.63679 9.03328 2.0019M9.36184 4.96447C10.3829 3.19624 14.4425 0.375691 18.4708 3.19624C20.4175 4.55924 20.6922 5.4182 21 5.99362",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],FX=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],i7=[["path",{d:"M21.3175 7.14139L20.8239 6.28479C20.4506 5.63696 20.264 5.31305 19.9464 5.18388C19.6288 5.05472 19.2696 5.15664 18.5513 5.36048L17.3311 5.70418C16.8725 5.80994 16.3913 5.74994 15.9726 5.53479L15.6357 5.34042C15.2766 5.11043 15.0004 4.77133 14.8475 4.37274L14.5136 3.37536C14.294 2.71534 14.1842 2.38533 13.9228 2.19657C13.6615 2.00781 13.3143 2.00781 12.6199 2.00781H11.5051C10.8108 2.00781 10.4636 2.00781 10.2022 2.19657C9.94085 2.38533 9.83106 2.71534 9.61149 3.37536L9.27753 4.37274C9.12465 4.77133 8.84845 5.11043 8.48937 5.34042L8.15249 5.53479C7.73374 5.74994 7.25259 5.80994 6.79398 5.70418L5.57375 5.36048C4.85541 5.15664 4.49625 5.05472 4.17867 5.18388C3.86109 5.31305 3.67445 5.63696 3.30115 6.28479L2.80757 7.14139C2.45766 7.74864 2.2827 8.05227 2.31666 8.37549C2.35061 8.69871 2.58483 8.95918 3.05326 9.48012L4.0843 10.6328C4.3363 10.9518 4.51521 11.5078 4.51521 12.0077C4.51521 12.5078 4.33636 13.0636 4.08433 13.3827L3.05326 14.5354C2.58483 15.0564 2.35062 15.3168 2.31666 15.6401C2.2827 15.9633 2.45766 16.2669 2.80757 16.8741L3.30114 17.7307C3.67443 18.3785 3.86109 18.7025 4.17867 18.8316C4.49625 18.9608 4.85542 18.8589 5.57377 18.655L6.79394 18.3113C7.25263 18.2055 7.73387 18.2656 8.15267 18.4808L8.4895 18.6752C8.84851 18.9052 9.12464 19.2442 9.2775 19.6428L9.61149 20.6403C9.83106 21.3003 9.94085 21.6303 10.2022 21.8191C10.4636 22.0078 10.8108 22.0078 11.5051 22.0078H12.6199C13.3143 22.0078 13.6615 22.0078 13.9228 21.8191C14.1842 21.6303 14.294 21.3003 14.5136 20.6403L14.8476 19.6428C15.0004 19.2442 15.2765 18.9052 15.6356 18.6752L15.9724 18.4808C16.3912 18.2656 16.8724 18.2055 17.3311 18.3113L18.5513 18.655C19.2696 18.8589 19.6288 18.9608 19.9464 18.8316C20.264 18.7025 20.4506 18.3785 20.8239 17.7307L21.3175 16.8741C21.6674 16.2669 21.8423 15.9633 21.8084 15.6401C21.7744 15.3168 21.5402 15.0564 21.0718 14.5354L20.0407 13.3827C19.7887 13.0636 19.6098 12.5078 19.6098 12.0077C19.6098 11.5078 19.7888 10.9518 20.0407 10.6328L21.0718 9.48012C21.5402 8.95918 21.7744 8.69871 21.8084 8.37549C21.8423 8.05227 21.6674 7.74864 21.3175 7.14139Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5195 12C15.5195 13.933 13.9525 15.5 12.0195 15.5C10.0865 15.5 8.51953 13.933 8.51953 12C8.51953 10.067 10.0865 8.5 12.0195 8.5C13.9525 8.5 15.5195 10.067 15.5195 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],s7=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8.5 10C7.67157 10 7 9.32843 7 8.5C7 7.67157 7.67157 7 8.5 7C9.32843 7 10 7.67157 10 8.5C10 9.32843 9.32843 10 8.5 10Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M15.5 17C16.3284 17 17 16.3284 17 15.5C17 14.6716 16.3284 14 15.5 14C14.6716 14 14 14.6716 14 15.5C14 16.3284 14.6716 17 15.5 17Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M10 8.5L17 8.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M14 15.5L7 15.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}]],hk=[["path",{d:"M14.4961 2.00027H9.49609C8.66767 2.00027 7.99609 2.67185 7.99609 3.50027C7.99609 4.3287 8.66767 5.00027 9.49609 5.00027H14.4961C15.3245 5.00027 15.9961 4.3287 15.9961 3.50027C15.9961 2.67185 15.3245 2.00027 14.4961 2.00027Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.99609 15.0003H11.4247M7.99609 11.0003H15.9961",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15.9961 3.50027C17.5496 3.54709 18.4761 3.72035 19.1174 4.36164C19.9961 5.24032 19.9961 6.65451 19.9961 9.4829L19.9961 15.9997C19.9961 18.8282 19.9961 20.2424 19.1174 21.1211C18.2387 21.9997 16.8245 21.9997 13.9961 21.9997L9.99609 21.9997C7.16767 21.9997 5.75346 21.9997 4.87478 21.1211C3.9961 20.2424 3.9961 18.8282 3.99609 15.9998L3.99611 9.48296C3.9961 6.65453 3.9961 5.24031 4.87478 4.36163C5.51606 3.72034 6.44261 3.54708 7.99599 3.50027",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],Dg=[["path",{d:"M14.5405 2V4.48622C14.5405 6.23417 14.5405 7.10814 14.7545 7.94715C14.9685 8.78616 15.3879 9.55654 16.2267 11.0973L17.3633 13.1852C19.5008 17.1115 20.5696 19.0747 19.6928 20.53L19.6792 20.5522C18.7896 22 16.5264 22 12 22C7.47357 22 5.21036 22 4.3208 20.5522L4.30725 20.53C3.43045 19.0747 4.49918 17.1115 6.63666 13.1852L7.7733 11.0973C8.61209 9.55654 9.03149 8.78616 9.24548 7.94715C9.45947 7.10814 9.45947 6.23417 9.45947 4.48622V2",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M9 16.002L9.00868 15.9996",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"1"}],["path",{d:"M15 18.002L15.0087 17.9996",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}],["path",{d:"M8 2L16 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M7.5 11.5563C8.5 10.4029 10.0994 11.2343 12 12.3182C14.5 13.7439 16 12.65 16.5 11.6152",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"4"}]],UX=[["path",{d:"M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.0588 8.83333 19 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],Pc=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],o7=[["path",{d:"M18 14C18 14 13.5811 19 12 19C10.4188 19 6 14 6 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 9.99996C18 9.99996 13.5811 5.00001 12 5C10.4188 4.99999 6 10 6 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],pk=[["path",{d:"M17.0158 16.5V21.282C17.0158 21.6025 16.8064 21.874 16.5174 21.9663M17.0158 16.5L10.8772 12M17.0158 16.5V7.5M7.74691 9.7053L4.25118 7.03035C3.85429 6.72665 3.29466 6.76425 2.94169 7.11833L2.2921 7.76997C1.89399 8.16933 1.90433 8.81995 2.31494 9.20638L5.28343 12M7.74691 9.7053L10.8772 12M7.74691 9.7053L15.8129 2.19186C15.9453 2.06854 16.1193 2 16.3 2C16.3758 2 16.4488 2.01181 16.5174 2.0337M10.8772 12L17.0158 7.5M17.0158 7.5V2.71803C17.0158 2.39749 16.8064 2.126 16.5174 2.0337M7.74691 14.2947L4.25118 16.9696C3.85429 17.2733 3.29466 17.2357 2.94169 16.8817L2.2921 16.23C1.89399 15.8307 1.90433 15.18 2.31494 14.7936L5.28343 12M7.74691 14.2947L15.8129 21.8081C15.9453 21.9315 16.1193 22 16.3 22C16.3758 22 16.4488 21.9882 16.5174 21.9663M7.74691 14.2947L5.28343 12M16.5174 2.0337L21.4111 4.23506C21.7695 4.39626 22.0001 4.75353 22.0001 5.14752V18.8525C22.0001 19.2465 21.7695 19.6037 21.4111 19.7649L16.5174 21.9663",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],mk=O.createContext(void 0);function qo(e){const t=O.useContext(mk);if(e===!1&&t===void 0)throw new Error(Ut(27));return t}let Fv=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const VX={[Fv.startingStyle]:""},qX={[Fv.endingStyle]:""},eo={transitionStatus(e){return e==="starting"?VX:e==="ending"?qX:null}};let Vl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fv.startingStyle]="startingStyle",e[e.endingStyle=Fv.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),QE=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const WX={[QE.popupOpen]:""},GX={[QE.popupOpen]:"",[QE.pressed]:""},KX={[Vl.open]:""},YX={[Vl.closed]:""},XX={[Vl.anchorHidden]:""},gk={open(e){return e?WX:null}},Fh={open(e){return e?GX:null}},Ja={open(e){return e?KX:YX},anchorHidden(e){return e?XX:null}},QX={...Ja,...eo},a7=O.forwardRef(function(t,n){const{render:r,className:i,forceRender:s=!1,...l}=t,{store:a}=qo(),c=a.useState("open"),u=a.useState("nested"),h=a.useState("mounted"),f=a.useState("transitionStatus"),p=O.useMemo(()=>({open:c,transitionStatus:f}),[c,f]);return ut("div",t,{state:p,ref:[a.context.backdropRef,n],stateAttributesMapping:QX,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:s||!u})}),rr="none",sc="trigger-press",wi="trigger-hover",Uv="trigger-focus",vk="outside-press",oc="item-press",ZX="close-press",oL="clear-press",ql="input-change",ka="input-clear",xc="focus-out",wb="escape-key",Ph="list-navigation",l7="cancel-open",Sh="sibling-open",c7="imperative-action",JX="window-resize";function qe(e,t,n,r){let i=!1,s=!1;const l=r??yn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){s=!0},get isCanceled(){return i},get isPropagationAllowed(){return s},trigger:n,...l}}function sh(e,t,n){const r=n??yn;return{reason:e,event:t??new Event("base-ui"),...r}}const Cb=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,...a}=t,{store:c}=qo(),u=c.useState("open");function h(S){u&&c.setOpen(!1,qe(ZX,S.nativeEvent))}const{getButtonProps:f,buttonRef:p}=ii({disabled:s,native:l}),v=O.useMemo(()=>({disabled:s}),[s]);return ut("button",t,{state:v,ref:[n,p],props:[{onClick:h},a,f]})}),eQ={...fb};let aL=0;function tQ(e,t="mui"){const[n,r]=O.useState(e),i=e||n;return O.useEffect(()=>{n==null&&(aL+=1,r(`${t}-${aL}`))},[n,t]),i}const lL=eQ.useId;function Mc(e,t){if(lL!==void 0){const n=lL();return e??(t?`${t}-${n}`:n)}return tQ(e,t)}function Vr(e){return Mc(e,"base-ui")}const u7=O.forwardRef(function(t,n){const{render:r,className:i,id:s,...l}=t,{store:a}=qo(),c=Vr(s);return a.useSyncedValueWithCleanup("descriptionElementId",c),ut("p",t,{ref:n,props:[{id:c},l]})}),nQ=[];function d7(e){O.useEffect(e,nQ)}const oh=0;class Sc{static create(){return new Sc}currentId=oh;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=oh,n()},t)}isStarted(){return this.currentId!==oh}clear=()=>{this.currentId!==oh&&(clearTimeout(this.currentId),this.currentId=oh)};disposeEffect=()=>this.clear}function mn(){const e=Cr(Sc.create).current;return d7(e.disposeEffect),e}function Mn(e){const t=Cr(rQ,e).current;return t.next=e,Fe(t.effect),t}function rQ(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Lc=typeof navigator<"u",ex=oQ(),f7=lQ(),yk=aQ(),bk=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),iQ=ex.platform==="MacIntel"&&ex.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(ex.platform),cL=Lc&&/firefox/i.test(yk),h7=Lc&&/apple/i.test(navigator.vendor),Vv=Lc&&/android/i.test(f7)||/android/i.test(yk),sQ=Lc&&f7.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,p7=yk.includes("jsdom/");function oQ(){if(!Lc)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function aQ(){if(!Lc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function lQ(){if(!Lc)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const ZE="data-base-ui-focusable",m7="active",g7="selected",v7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",$a="ArrowLeft",Fa="ArrowRight",_k="ArrowUp",Up="ArrowDown";function ms(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function gt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&zE(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fs(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function cQ(e){return e.matches("html,body")}function An(e){return e?.ownerDocument||document}function xk(e){return vn(e)&&e.matches(v7)}function JE(e){return e?e.getAttribute("role")==="combobox"&&xk(e):!1}function uQ(e){if(!e||p7)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Uh(e){return e?e.hasAttribute(ZE)?e:e.querySelector(`[${ZE}]`)||e:null}function ac(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...ac(e,i.id,n)])}function uL(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(s=>s.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function Pn(e){e.preventDefault(),e.stopPropagation()}function dQ(e){return"nativeEvent"in e}function y7(e){return e.mozInputSource===0&&e.isTrusted?!0:Vv&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function b7(e){return p7?!1:!Vv&&e.width===0&&e.height===0||Vv&&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 Qu(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function _7(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const fQ=["top","right","bottom","left"],Zu=Math.min,Si=Math.max,qv=Math.round,Pu=Math.floor,Ws=e=>({x:e,y:e}),hQ={left:"right",right:"left",bottom:"top",top:"bottom"},pQ={start:"end",end:"start"};function e2(e,t,n){return Si(e,Zu(t,n))}function Bo(e,t){return typeof e=="function"?e(t):e}function Ei(e){return e.split("-")[0]}function el(e){return e.split("-")[1]}function Sk(e){return e==="x"?"y":"x"}function wk(e){return e==="y"?"height":"width"}const mQ=new Set(["top","bottom"]);function Gi(e){return mQ.has(Ei(e))?"y":"x"}function Ck(e){return Sk(Gi(e))}function gQ(e,t,n){n===void 0&&(n=!1);const r=el(e),i=Ck(e),s=wk(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Wv(l)),[l,Wv(l)]}function vQ(e){const t=Wv(e);return[t2(e),t,t2(t)]}function t2(e){return e.replace(/start|end/g,t=>pQ[t])}const dL=["left","right"],fL=["right","left"],yQ=["top","bottom"],bQ=["bottom","top"];function _Q(e,t,n){switch(e){case"top":case"bottom":return n?t?fL:dL:t?dL:fL;case"left":case"right":return t?yQ:bQ;default:return[]}}function xQ(e,t,n,r){const i=el(e);let s=_Q(Ei(e),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(t2)))),s}function Wv(e){return e.replace(/left|right|bottom|top/g,t=>hQ[t])}function SQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function x7(e){return typeof e!="number"?SQ(e):{top:e,right:e,bottom:e,left:e}}function Gv(e){const{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 Ig(e,t,n){return Math.floor(e/t)!==n}function Nu(e,t){return t<0||t>=e.current.length}function wv(e,t){return xr(e,{disabledIndices:t})}function n2(e,t){return xr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let s=t;do s+=n?-i:i;while(s>=0&&s<=e.current.length-1&&Ua(e,s,r));return s}function S7(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:s,disabledIndices:l,minIndex:a,maxIndex:c,prevIndex:u,stopEvent:h=!1}){let f=u;const p=[],v={};let S=!1;{let b=null,y=-1;e.current.forEach((_,T)=>{if(_==null)return;const E=_.closest('[role="row"]');E&&(S=!0),(E!==b||y===-1)&&(b=E,y+=1,p[y]=[]),p[y].push(T),v[T]=y})}const x=S&&p.length>0&&p.some(b=>b.length!==s);function g(b){if(!x||u===-1)return;const y=v[u];if(y==null)return;const _=p[y].indexOf(u);let T=b==="up"?y-1:y+1;r&&(T<0?T=p.length-1:T>=p.length&&(T=0));const E=new Set;for(;T>=0&&T<p.length&&!E.has(T);){E.add(T);const k=p[T];if(k.length===0){T=b==="up"?T-1:T+1;continue}const A=Math.min(_,k.length-1);for(let R=A;R>=0;R-=1){const L=k[R];if(!Ua(e,L,l))return L}T=b==="up"?T-1:T+1,r&&(T<0?T=p.length-1:T>=p.length&&(T=0))}}if(t.key===_k){const b=g("up");if(b!==void 0)h&&Pn(t),f=b;else{if(h&&Pn(t),u===-1)f=c;else if(f=xr(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:l}),r&&(u-s<a||f<0)){const y=u%s,_=c%s,T=c-(_-y);_===y?f=c:f=_>y?T:T-s}Nu(e,f)&&(f=u)}}if(t.key===Up){const b=g("down");b!==void 0?(h&&Pn(t),f=b):(h&&Pn(t),u===-1?f=a:(f=xr(e,{startingIndex:u,amount:s,disabledIndices:l}),r&&u+s>c&&(f=xr(e,{startingIndex:u%s-s,amount:s,disabledIndices:l}))),Nu(e,f)&&(f=u))}if(n==="both"){const b=Pu(u/s);t.key===(i?$a:Fa)&&(h&&Pn(t),u%s!==s-1?(f=xr(e,{startingIndex:u,disabledIndices:l}),r&&Ig(f,s,b)&&(f=xr(e,{startingIndex:u-u%s-1,disabledIndices:l}))):r&&(f=xr(e,{startingIndex:u-u%s-1,disabledIndices:l})),Ig(f,s,b)&&(f=u)),t.key===(i?Fa:$a)&&(h&&Pn(t),u%s!==0?(f=xr(e,{startingIndex:u,decrement:!0,disabledIndices:l}),r&&Ig(f,s,b)&&(f=xr(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:l}))):r&&(f=xr(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:l})),Ig(f,s,b)&&(f=u));const y=Pu(c/s)===b;Nu(e,f)&&(r&&y?f=t.key===(i?Fa:$a)?c:xr(e,{startingIndex:u-u%s-1,disabledIndices:l}):f=u)}return f}function w7(e,t,n){const r=[];let i=0;return e.forEach(({width:s,height:l},a)=>{let c=!1;for(n&&(i=0);!c;){const u=[];for(let h=0;h<s;h+=1)for(let f=0;f<l;f+=1)u.push(i+h+f*t);i%t+s<=t&&u.every(h=>r[h]==null)?(u.forEach(h=>{r[h]=a}),c=!0):i+=1}}),[...r]}function C7(e,t,n,r,i){if(e===-1)return-1;const s=n.indexOf(e),l=t[e];switch(i){case"tl":return s;case"tr":return l?s+l.width-1:s;case"bl":return l?s+(l.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function E7(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ua(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var wQ=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Kv=wQ.join(","),T7=typeof Element>"u",Ju=T7?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yv=!T7&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Vh=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",l=s||n&&t&&Vh(t.parentNode);return l},CQ=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},k7=function(t,n,r){if(Vh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Kv));return n&&Ju.call(t,Kv)&&i.unshift(t),i=i.filter(r),i},Xv=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var l=s.shift();if(!Vh(l,!1))if(l.tagName==="SLOT"){var a=l.assignedElements(),c=a.length?a:l.children,u=Xv(c,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:l,candidates:u})}else{var h=Ju.call(l,Kv);h&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var f=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),p=!Vh(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(f&&p){var v=Xv(f===!0?l.children:f.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scopeParent:l,candidates:v})}else s.unshift.apply(s,l.children)}}return i},O7=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},R7=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||CQ(t))&&!O7(t)?0:t.tabIndex},EQ=function(t,n){var r=R7(t);return r<0&&n&&!O7(t)?0:r},TQ=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},A7=function(t){return t.tagName==="INPUT"},kQ=function(t){return A7(t)&&t.type==="hidden"},OQ=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},RQ=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},AQ=function(t){if(!t.name)return!0;var n=t.form||Yv(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=RQ(i,t.form);return!s||s===t},PQ=function(t){return A7(t)&&t.type==="radio"},MQ=function(t){return PQ(t)&&!AQ(t)},LQ=function(t){var n,r=t&&Yv(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var l,a,c;for(s=!!((l=i)!==null&&l!==void 0&&(a=l.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var u,h,f;r=Yv(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((h=i)!==null&&h!==void 0&&(f=h.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return s},hL=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},jQ=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Ju.call(t,"details>summary:first-of-type"),a=l?t.parentElement:t;if(Ju.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,h=Yv(t);if(u&&!u.shadowRoot&&i(u)===!0)return hL(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=c}if(LQ(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return hL(t);return!1},DQ=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Ju.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},r2=function(t,n){return!(n.disabled||Vh(n)||kQ(n)||jQ(n,t)||OQ(n)||DQ(n))},i2=function(t,n){return!(MQ(n)||R7(n)<0||!r2(t,n))},IQ=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},P7=function(t){var n=[],r=[];return t.forEach(function(i,s){var l=!!i.scopeParent,a=l?i.scopeParent:i,c=EQ(a,l),u=l?P7(i.candidates):a;c===0?l?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:l,content:u})}),r.sort(TQ).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Vp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xv([t],n.includeContainer,{filter:i2.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:IQ}):r=k7(t,n.includeContainer,i2.bind(null,n)),P7(r)},NQ=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Xv([t],n.includeContainer,{filter:r2.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=k7(t,n.includeContainer,r2.bind(null,n)),r},M7=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ju.call(t,Kv)===!1?!1:i2(n,t)};const jd=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function L7(e,t){const n=Vp(e,jd()),r=n.length;if(r===0)return;const i=ms(An(e)),s=n.indexOf(i),l=s===-1?t===1?0:r-1:s+t;return n[l]}function Ek(e){return L7(An(e).body,1)||e}function j7(e){return L7(An(e).body,-1)||e}function D7(e,t){if(!e)return null;const n=Vp(An(e).body,jd()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const s=(i+t+r)%r;return n[s]}function BQ(e){return D7(e,1)}function zQ(e){return D7(e,-1)}function Bu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function HQ(e){Vp(e,jd()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function pL(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function I7(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(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)}}}class Tk{nodesRef={current:[]};events=I7();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const N7=O.createContext(null),B7=O.createContext(null),Wo=()=>O.useContext(N7)?.id||null,tl=e=>{const t=O.useContext(B7);return e??t};function z7(e){const t=Mc(),n=tl(e),r=Wo();return Fe(()=>{if(!t)return;const i={id:t,parentId:r};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,r]),t}function $Q(e){const{children:t,id:n}=e,r=Wo();return w.jsx(N7.Provider,{value:O.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function FQ(e){const{children:t,externalTree:n}=e,r=Cr(()=>n??new Tk).current;return w.jsx(B7.Provider,{value:r,children:t})}function ed(e){return`data-base-ui-${e}`}function tx(e,t,n){if(n&&!Qu(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const Dd={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},Ng=null;class UQ{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Bg=new UQ;class Hs{static create(){return new Hs}static request(t){return Bg.request(t)}static cancel(t){return Bg.cancel(t)}currentId=Ng;request(t){this.cancel(),this.currentId=Bg.request(()=>{this.currentId=Ng,t()})}cancel=()=>{this.currentId!==Ng&&(Bg.cancel(this.currentId),this.currentId=Ng)};disposeEffect=()=>this.cancel}function qp(){const e=Cr(Hs.create).current;return d7(e.disposeEffect),e}function ri(e){return e?.ownerDocument||document}const td=O.forwardRef(function(t,n){const[r,i]=O.useState();Fe(()=>{h7&&i("button")},[]);const s={tabIndex:0,role:r};return w.jsx("span",{...t,ref:n,style:Dd,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});let mL=0;function Cv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(mL);const s=()=>e?.focus({preventScroll:n});i?s():mL=requestAnimationFrame(s)}const zu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function gL(e){return e==="inert"?zu.inert:e==="aria-hidden"?zu["aria-hidden"]:zu.none}let zg=new WeakSet,Hg={},nx=0;const H7=e=>e&&(e.host||H7(e.parentNode)),VQ=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=H7(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qQ(e,t,n,r){const i="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,l=VQ(t,e),a=new Set,c=new Set(l),u=[];Hg[i]||(Hg[i]=new WeakMap);const h=Hg[i];l.forEach(f),p(t),a.clear();function f(v){!v||a.has(v)||(a.add(v),v.parentNode&&f(v.parentNode))}function p(v){!v||c.has(v)||[].forEach.call(v.children,S=>{if(Za(S)!=="script")if(a.has(S))p(S);else{const x=s?S.getAttribute(s):null,g=x!==null&&x!=="false",b=gL(s),y=(b.get(S)||0)+1,_=(h.get(S)||0)+1;b.set(S,y),h.set(S,_),u.push(S),y===1&&g&&zg.add(S),_===1&&S.setAttribute(i,""),!g&&s&&S.setAttribute(s,s==="inert"?"":"true")}})}return nx+=1,()=>{u.forEach(v=>{const S=gL(s),g=(S.get(v)||0)-1,b=(h.get(v)||0)-1;S.set(v,g),h.set(v,b),g||(!zg.has(v)&&s&&v.removeAttribute(s),zg.delete(v)),b||v.removeAttribute(i)}),nx-=1,nx||(zu.inert=new WeakMap,zu["aria-hidden"]=new WeakMap,zu.none=new WeakMap,zg=new WeakSet,Hg={})}}function WQ(e,t=!1,n=!1){const r=An(e[0]).body;return qQ(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $7=O.createContext(null),F7=()=>O.useContext($7),GQ=ed("portal");function KQ(e={}){const{ref:t,container:n,componentProps:r=yn,elementProps:i,elementState:s}=e,l=Mc(),c=F7()?.portalNode,[u,h]=O.useState(null),[f,p]=O.useState(null),v=O.useRef(null);Fe(()=>{if(n===null){v.current&&(v.current=null,p(null),h(null));return}if(l==null)return;const g=(n&&(ik(n)?n:n.current))??c??document.body;if(g==null){v.current&&(v.current=null,p(null),h(null));return}v.current!==g&&(v.current=g,p(null),h(g))},[n,c,l]);const S=ut("div",r,{ref:[t,p],state:s,props:[{id:l,[GQ]:""},i]});return{portalNode:f,portalSubtree:u&&S?Ir.createPortal(S,u):null}}const Eb=O.forwardRef(function(t,n){const{children:r,container:i,className:s,render:l,renderGuards:a,...c}=t,{portalNode:u,portalSubtree:h}=KQ({container:i,ref:n,componentProps:t,elementProps:c}),f=O.useRef(null),p=O.useRef(null),v=O.useRef(null),S=O.useRef(null),[x,g]=O.useState(null),b=x?.modal,y=x?.open,_=typeof a=="boolean"?a:!!x&&!x.modal&&x.open&&!!u;O.useEffect(()=>{if(!u||b)return;function E(k){u&&Bu(k)&&(k.type==="focusin"?pL:HQ)(u)}return u.addEventListener("focusin",E,!0),u.addEventListener("focusout",E,!0),()=>{u.removeEventListener("focusin",E,!0),u.removeEventListener("focusout",E,!0)}},[u,b]),O.useEffect(()=>{!u||y||pL(u)},[y,u]);const T=O.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:v,afterInsideRef:S,portalNode:u,setFocusManagerState:g}),[u]);return w.jsxs(O.Fragment,{children:[h,w.jsxs($7.Provider,{value:T,children:[_&&u&&w.jsx(td,{"data-type":"outside",ref:f,onFocus:E=>{if(Bu(E,u))v.current?.focus();else{const k=x?x.domReference:null;j7(k)?.focus()}}}),_&&u&&w.jsx("span",{"aria-owns":u.id,style:RY}),u&&Ir.createPortal(r,u),_&&u&&w.jsx(td,{"data-type":"outside",ref:p,onFocus:E=>{if(Bu(E,u))S.current?.focus();else{const k=x?x.domReference:null;Ek(k)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qe(xc,E.nativeEvent))}}})]})]})});function Dl(e){return e==null?e:"current"in e?e.current:e}function YQ(e,t){const n=Wn(e.target);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"):""}const vL=20;let Ma=[];function kk(){Ma=Ma.filter(e=>e.isConnected)}function XQ(e){kk(),e&&Za(e)!=="body"&&(Ma.push(e),Ma.length>vL&&(Ma=Ma.slice(-vL)))}function rx(){return kk(),Ma[Ma.length-1]}function QQ(e){if(!e)return null;const t=jd();return M7(e,t)?e:Vp(e,t)[0]||e}function ZQ(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ti(e).display!=="none"}function yL(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=jd(),i=NQ(e,n).filter(l=>{const a=l.getAttribute("data-tabindex")||"";return M7(l,n)||l.hasAttribute("data-tabindex")&&!a.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Tb(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:s=!0,returnFocus:l=!0,restoreFocus:a=!1,modal:c=!0,closeOnFocusOut:u=!0,openInteractionType:h="",getInsideElements:f=()=>[],nextFocusableElement:p,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:x}=e,g="rootStore"in t?t.rootStore:t,b=g.useState("open"),y=g.useState("domReferenceElement"),_=g.useState("floatingElement"),{events:T,dataRef:E}=g.context,k=Ne(()=>E.current.floatingContext?.nodeId),A=Ne(f),R=s===!1,L=JE(y)&&R,z=Mn(i),D=Mn(s),$=Mn(l),N=Mn(h),F=tl(x),U=F7(),H=O.useRef(null),K=O.useRef(null),W=O.useRef(!1),I=O.useRef(!1),G=O.useRef(!1),j=O.useRef(-1),B=O.useRef(""),V=O.useRef(""),X=mn(),re=mn(),ie=qp(),Q=U!=null,Y=Uh(_),J=Ne((de=Y)=>de?Vp(de,jd()):[]),ee=Ne(de=>{const ue=J(de);return z.current.map(()=>ue).filter(Boolean).flat()});O.useEffect(()=>{if(r||!c)return;function de(Ie){Ie.key==="Tab"&>(Y,ms(An(Y)))&&J().length===0&&!L&&Pn(Ie)}const ue=An(Y);return ue.addEventListener("keydown",de),()=>{ue.removeEventListener("keydown",de)}},[r,y,Y,c,z,L,J,ee]),O.useEffect(()=>{if(r||!_)return;function de(ue){const Ie=sr(ue),we=J().indexOf(Ie);we!==-1&&(j.current=we)}return _.addEventListener("focusin",de),()=>{_.removeEventListener("focusin",de)}},[r,_,J]),O.useEffect(()=>{if(r||!b)return;const de=An(Y);function ue(){G.current=!1}function Ie(we){const _e=sr(we),Pe=gt(_,_e)||gt(y,_e)||gt(U?.portalNode,_e);G.current=!Pe,V.current=we.pointerType||"keyboard"}function Le(){V.current="keyboard"}return de.addEventListener("pointerdown",Ie,!0),de.addEventListener("pointerup",ue,!0),de.addEventListener("pointercancel",ue,!0),de.addEventListener("keydown",Le,!0),()=>{de.removeEventListener("pointerdown",Ie,!0),de.removeEventListener("pointerup",ue,!0),de.removeEventListener("pointercancel",ue,!0),de.removeEventListener("keydown",Le,!0)}},[r,_,y,Y,b,U]),O.useEffect(()=>{if(r||!u)return;function de(){I.current=!0,re.start(0,()=>{I.current=!1})}function ue(_e){const Pe=_e.relatedTarget,me=_e.currentTarget,Ae=sr(_e);queueMicrotask(()=>{const Te=k(),We=g.context.triggerElements,rt=!(gt(y,Pe)||gt(_,Pe)||gt(Pe,_)||gt(U?.portalNode,Pe)||Pe!=null&&We.hasElement(Pe)||We.hasMatchingElement(Ue=>gt(Ue,Pe))||Pe?.hasAttribute(ed("focus-guard"))||F&&(ac(F.nodesRef.current,Te).find(Ue=>gt(Ue.context?.elements.floating,Pe)||gt(Ue.context?.elements.domReference,Pe))||uL(F.nodesRef.current,Te).find(Ue=>[Ue.context?.elements.floating,Uh(Ue.context?.elements.floating)].includes(Pe)||Ue.context?.elements.domReference===Pe)));if(me===y&&Y&&yL(Y,z),a&&me!==y&&!ZQ(Ae)&&ms(An(Y))===An(Y).body){if(vn(Y)&&(Y.focus(),a==="popup")){ie.request(()=>{Y.focus()});return}const Ue=j.current,ot=J(),tt=ot[Ue]||ot[ot.length-1]||Y;vn(tt)&&tt.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(L||!c)&&Pe&&rt&&!I.current&&(L||Pe!==rx())&&(W.current=!0,g.setOpen(!1,qe(xc,_e)))})}function Ie(){G.current||(E.current.insideReactTree=!0,X.start(0,()=>{E.current.insideReactTree=!1}))}const Le=vn(y)?y:null,we=[];if(!(!_&&!Le))return Le&&(Le.addEventListener("focusout",ue),Le.addEventListener("pointerdown",de),we.push(()=>{Le.removeEventListener("focusout",ue),Le.removeEventListener("pointerdown",de)})),_&&(_.addEventListener("focusout",ue),U&&(_.addEventListener("focusout",Ie,!0),we.push(()=>{_.removeEventListener("focusout",Ie,!0)})),we.push(()=>{_.removeEventListener("focusout",ue)})),()=>{we.forEach(_e=>{_e()})}},[r,y,_,Y,c,F,U,g,u,a,J,L,k,z,E,X,re,ie]);const ne=O.useRef(null),te=O.useRef(null),le=ns(ne,S,U?.beforeInsideRef),fe=ns(te,U?.afterInsideRef);O.useEffect(()=>{if(r||!_||!b)return;const de=Array.from(U?.portalNode?.querySelectorAll(`[${ed("portal")}]`)||[]),Ie=(F?uL(F.nodesRef.current,k()):[]).find(_e=>JE(_e.context?.elements.domReference||null))?.context?.elements.domReference,Le=[_,Ie,...de,...A(),H.current,K.current,ne.current,te.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,Dl(v),Dl(p),L?y:null].filter(_e=>_e!=null),we=WQ(Le,c||L);return()=>{we()}},[b,r,y,_,c,z,U,L,F,k,A,p,v]),Fe(()=>{if(!b||r||!vn(Y))return;const de=An(Y),ue=ms(de);queueMicrotask(()=>{const Ie=ee(Y),Le=D.current,we=typeof Le=="function"?Le(N.current||""):Le;if(we===void 0||we===!1)return;let _e;we===!0||we===null?_e=Ie[0]||Y:_e=Dl(we),_e=_e||Ie[0]||Y,!gt(Y,ue)&&Cv(_e,{preventScroll:_e===Y})})},[r,b,Y,R,ee,D,N]),Fe(()=>{if(r||!Y)return;const de=An(Y),ue=ms(de);XQ(ue);function Ie(_e){if(_e.open||(B.current=YQ(_e.nativeEvent,V.current)),_e.reason===wi&&_e.nativeEvent.type==="mouseleave"&&(W.current=!0),_e.reason===vk)if(_e.nested)W.current=!1;else if(y7(_e.nativeEvent)||b7(_e.nativeEvent))W.current=!1;else{let Pe=!1;document.createElement("div").focus({get preventScroll(){return Pe=!0,!1}}),Pe?W.current=!1:W.current=!0}}T.on("openchange",Ie);const Le=de.createElement("span");Le.setAttribute("tabindex","-1"),Le.setAttribute("aria-hidden","true"),Object.assign(Le.style,Dd),Q&&y&&y.insertAdjacentElement("afterend",Le);function we(){const _e=$.current;let Pe=typeof _e=="function"?_e(B.current):_e;if(Pe===void 0||Pe===!1)return null;if(Pe===null&&(Pe=!0),typeof Pe=="boolean"){const Ae=y||rx();return Ae&&Ae.isConnected?Ae:Le}const me=y||rx()||Le;return Dl(Pe)||me}return()=>{T.off("openchange",Ie);const _e=ms(de),Pe=gt(_,_e)||F&&ac(F.nodesRef.current,k(),!1).some(Ae=>gt(Ae.context?.elements.floating,_e)),me=we();queueMicrotask(()=>{const Ae=QQ(me),Te=typeof $.current!="boolean";$.current&&!W.current&&vn(Ae)&&(!(!Te&&Ae!==_e&&_e!==de.body)||Pe)&&Ae.focus({preventScroll:!0}),Le.remove()})}},[r,_,Y,$,E,T,F,Q,y,k]),O.useEffect(()=>{queueMicrotask(()=>{W.current=!1})},[r]),O.useEffect(()=>{if(r||!b)return;function de(Ie){sr(Ie)?.closest(`[${B9}]`)&&(I.current=!0)}const ue=An(Y);return ue.addEventListener("pointerdown",de,!0),()=>{ue.removeEventListener("pointerdown",de,!0)}},[r,b,Y]),Fe(()=>{if(!r&&U)return U.setFocusManagerState({modal:c,closeOnFocusOut:u,open:b,onOpenChange:g.setOpen,domReference:y}),()=>{U.setFocusManagerState(null)}},[r,U,c,b,g,u,y]),Fe(()=>{if(!(r||!Y))return yL(Y,z),()=>{queueMicrotask(kk)}},[r,Y,z]);const pe=!r&&(c?!L:!0)&&(Q||c);return w.jsxs(O.Fragment,{children:[pe&&w.jsx(td,{"data-type":"inside",ref:le,onFocus:de=>{if(c){const ue=ee();Cv(ue[ue.length-1])}else U?.portalNode&&(W.current=!1,Bu(de,U.portalNode)?Ek(y)?.focus():Dl(v??U.beforeOutsideRef)?.focus())}}),n,pe&&w.jsx(td,{"data-type":"inside",ref:fe,onFocus:de=>{c?Cv(ee()[0]):U?.portalNode&&(u&&(W.current=!0),Bu(de,U.portalNode)?j7(y)?.focus():Dl(p??U.afterOutsideRef)?.focus())}})]})}function Wp(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:a=!1,stickIfOpen:c=!0,touchOpenDelay:u=0}=t,h=O.useRef(void 0),f=qp(),p=mn(),v=O.useMemo(()=>({onPointerDown(S){h.current=S.pointerType},onMouseDown(S){const x=h.current,g=S.nativeEvent,b=n.select("open");if(S.button!==0||s==="click"||Qu(x,!0)&&a)return;const y=r.current.openEvent,_=y?.type,T=n.select("domReferenceElement")!==S.currentTarget,E=b&&T||!(b&&l&&(!(y&&c)||_==="click"||_==="mousedown"));if(xk(g.target)){const A=qe(sc,g,g.target);E&&x==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,A)}):n.setOpen(E,A);return}const k=S.currentTarget;f.request(()=>{const A=qe(sc,g,k);E&&x==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,A)}):n.setOpen(E,A)})},onClick(S){if(s==="mousedown-only")return;const x=h.current;if(s==="mousedown"&&x){h.current=void 0;return}if(Qu(x,!0)&&a)return;const g=n.select("open"),b=r.current.openEvent,y=n.select("domReferenceElement")!==S.currentTarget,_=g&&y||!(g&&l&&(!(b&&c)||_7(b))),T=qe(sc,S.nativeEvent,S.currentTarget);_&&x==="touch"&&u>0?p.start(u,()=>{n.setOpen(!0,T)}):n.setOpen(_,T)},onKeyDown(){h.current=void 0}}),[r,s,a,n,c,l,f,p,u]);return O.useMemo(()=>i?{reference:v}:yn,[i,v])}function bL(e,t,n){let{reference:r,floating:i}=e;const s=Gi(t),l=Ck(t),a=wk(l),c=Ei(t),u=s==="y",h=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let v;switch(c){case"top":v={x:h,y:r.y-i.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-i.width,y:f};break;default:v={x:r.x,y:r.y}}switch(el(t)){case"start":v[l]-=p*(n&&u?-1:1);break;case"end":v[l]+=p*(n&&u?-1:1);break}return v}const JQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:f}=bL(u,r,c),p=r,v={},S=0;for(let x=0;x<a.length;x++){const{name:g,fn:b}=a[x],{x:y,y:_,data:T,reset:E}=await b({x:h,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:v,rects:u,platform:l,elements:{reference:e,floating:t}});h=y??h,f=_??f,v={...v,[g]:{...v[g],...T}},E&&S<=50&&(S++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:h,y:f}=bL(u,p,c)),x=-1)}return{x:h,y:f,placement:p,strategy:i,middlewareData:v}};async function qh(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:v=0}=Bo(t,e),S=x7(v),g=a[p?f==="floating"?"reference":"floating":f],b=Gv(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:h,strategy:c})),y=f==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},E=Gv(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:c}):y);return{top:(b.top-E.top+S.top)/T.y,bottom:(E.bottom-b.bottom+S.bottom)/T.y,left:(b.left-E.left+S.left)/T.x,right:(E.right-b.right+S.right)/T.x}}const eZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:x=!0,...g}=Bo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=Ei(i),y=Gi(a),_=Ei(a)===a,T=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=p||(_||!x?[Wv(a)]:vQ(a)),k=S!=="none";!p&&k&&E.push(...xQ(a,x,S,T));const A=[a,...E],R=await qh(t,g),L=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&L.push(R[b]),f){const F=gQ(i,l,T);L.push(R[F[0]],R[F[1]])}if(z=[...z,{placement:i,overflows:L}],!L.every(F=>F<=0)){var D,$;const F=(((D=s.flip)==null?void 0:D.index)||0)+1,U=A[F];if(U&&(!(f==="alignment"?y!==Gi(U):!1)||z.every(W=>Gi(W.placement)===y?W.overflows[0]>0:!0)))return{data:{index:F,overflows:z},reset:{placement:U}};let H=($=z.filter(K=>K.overflows[0]<=0).sort((K,W)=>K.overflows[1]-W.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(v){case"bestFit":{var N;const K=(N=z.filter(W=>{if(k){const I=Gi(W.placement);return I===y||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,G)=>I+G,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:N[0];K&&(H=K);break}case"initialPlacement":H=a;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function _L(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xL(e){return fQ.some(t=>e[t]>=0)}const tZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Bo(e,t);switch(r){case"referenceHidden":{const s=await qh(t,{...i,elementContext:"reference"}),l=_L(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:xL(l)}}}case"escaped":{const s=await qh(t,{...i,altBoundary:!0}),l=_L(s,n.floating);return{data:{escapedOffsets:l,escaped:xL(l)}}}default:return{}}}}},U7=new Set(["left","top"]);async function nZ(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Ei(n),a=el(n),c=Gi(n)==="y",u=U7.has(l)?-1:1,h=s&&c?-1:1,f=Bo(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:S}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof S=="number"&&(v=a==="end"?S*-1:S),c?{x:v*h,y:p*u}:{x:p*u,y:v*h}}const rZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:l,middlewareData:a}=t,c=await nZ(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:l}}}}},iZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:g=>{let{x:b,y}=g;return{x:b,y}}},...c}=Bo(e,t),u={x:n,y:r},h=await qh(t,c),f=Gi(Ei(i)),p=Sk(f);let v=u[p],S=u[f];if(s){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=v+h[g],_=v-h[b];v=e2(y,v,_)}if(l){const g=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=S+h[g],_=S-h[b];S=e2(y,S,_)}const x=a.fn({...t,[p]:v,[f]:S});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[f]:l}}}}}},sZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:l}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Bo(e,t),h={x:n,y:r},f=Gi(i),p=Sk(f);let v=h[p],S=h[f];const x=Bo(a,t),g=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const _=p==="y"?"height":"width",T=s.reference[p]-s.floating[_]+g.mainAxis,E=s.reference[p]+s.reference[_]-g.mainAxis;v<T?v=T:v>E&&(v=E)}if(u){var b,y;const _=p==="y"?"width":"height",T=U7.has(Ei(i)),E=s.reference[f]-s.floating[_]+(T&&((b=l.offset)==null?void 0:b[f])||0)+(T?0:g.crossAxis),k=s.reference[f]+s.reference[_]+(T?0:((y=l.offset)==null?void 0:y[f])||0)-(T?g.crossAxis:0);S<E?S=E:S>k&&(S=k)}return{[p]:v,[f]:S}}}},oZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:l,elements:a}=t,{apply:c=()=>{},...u}=Bo(e,t),h=await qh(t,u),f=Ei(i),p=el(i),v=Gi(i)==="y",{width:S,height:x}=s.floating;let g,b;f==="top"||f==="bottom"?(g=f,b=p===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,g=p==="end"?"top":"bottom");const y=x-h.top-h.bottom,_=S-h.left-h.right,T=Zu(x-h[g],y),E=Zu(S-h[b],_),k=!t.middlewareData.shift;let A=T,R=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),k&&!p){const z=Si(h.left,0),D=Si(h.right,0),$=Si(h.top,0),N=Si(h.bottom,0);v?R=S-2*(z!==0||D!==0?z+D:Si(h.left,h.right)):A=x-2*($!==0||N!==0?$+N:Si(h.top,h.bottom))}await c({...t,availableWidth:R,availableHeight:A});const L=await l.getDimensions(a.floating);return S!==L.width||x!==L.height?{reset:{rects:!0}}:{}}}};function V7(e){const t=Ti(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=vn(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=qv(n)!==s||qv(r)!==l;return a&&(n=s,r=l),{width:n,height:r,$:a}}function Ok(e){return Kt(e)?e:e.contextElement}function Hu(e){const t=Ok(e);if(!vn(t))return Ws(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=V7(t);let l=(s?qv(n.width):n.width)/r,a=(s?qv(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const aZ=Ws(0);function q7(e){const t=Wn(e);return!bb()||!t.visualViewport?aZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function wc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ok(e);let l=Ws(1);t&&(r?Kt(r)&&(l=Hu(r)):l=Hu(e));const a=lZ(s,n,r)?q7(s):Ws(0);let c=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,h=i.width/l.x,f=i.height/l.y;if(s){const p=Wn(s),v=r&&Kt(r)?Wn(r):r;let S=p,x=HE(S);for(;x&&r&&v!==S;){const g=Hu(x),b=x.getBoundingClientRect(),y=Ti(x),_=b.left+(x.clientLeft+parseFloat(y.paddingLeft))*g.x,T=b.top+(x.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,u*=g.y,h*=g.x,f*=g.y,c+=_,u+=T,S=Wn(x),x=HE(S)}}return Gv({width:h,height:f,x:c,y:u})}function kb(e,t){const n=_b(e).scrollLeft;return t?t.left+n:wc(Js(e)).left+n}function W7(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kb(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function cZ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",l=Js(r),a=t?yb(t.floating):!1;if(r===l||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Ws(1);const h=Ws(0),f=vn(r);if((f||!f&&!s)&&((Za(r)!=="body"||Rc(l))&&(c=_b(r)),vn(r))){const v=wc(r);u=Hu(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const p=l&&!f&&!s?W7(l,c):Ws(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+h.x+p.x,y:n.y*u.y-c.scrollTop*u.y+h.y+p.y}}function uZ(e){return Array.from(e.getClientRects())}function dZ(e){const t=Js(e),n=_b(e),r=e.ownerDocument.body,i=Si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+kb(e);const a=-n.scrollTop;return Ti(r).direction==="rtl"&&(l+=Si(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:l,y:a}}const SL=25;function fZ(e,t){const n=Wn(e),r=Js(e),i=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,a=0,c=0;if(i){s=i.width,l=i.height;const h=bb();(!h||h&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=kb(r);if(u<=0){const h=r.ownerDocument,f=h.body,p=getComputedStyle(f),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,S=Math.abs(r.clientWidth-f.clientWidth-v);S<=SL&&(s-=S)}else u<=SL&&(s+=u);return{width:s,height:l,x:a,y:c}}const hZ=new Set(["absolute","fixed"]);function pZ(e,t){const n=wc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=vn(e)?Hu(e):Ws(1),l=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:l,height:a,x:c,y:u}}function wL(e,t,n){let r;if(t==="viewport")r=fZ(e,n);else if(t==="document")r=dZ(Js(e));else if(Kt(t))r=pZ(t,n);else{const i=q7(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gv(r)}function G7(e,t){const n=Xs(e);return n===t||!Kt(n)||qs(n)?!1:Ti(n).position==="fixed"||G7(n,t)}function mZ(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(a=>Kt(a)&&Za(a)!=="body"),i=null;const s=Ti(e).position==="fixed";let l=s?Xs(e):e;for(;Kt(l)&&!qs(l);){const a=Ti(l),c=sk(l);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&hZ.has(i.position)||Rc(l)&&!c&&G7(e,l))?r=r.filter(h=>h!==l):i=a,l=Xs(l)}return t.set(e,r),r}function gZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?yb(t)?[]:mZ(t,this._c):[].concat(n),r],a=l[0],c=l.reduce((u,h)=>{const f=wL(t,h,i);return u.top=Si(f.top,u.top),u.right=Zu(f.right,u.right),u.bottom=Zu(f.bottom,u.bottom),u.left=Si(f.left,u.left),u},wL(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vZ(e){const{width:t,height:n}=V7(e);return{width:t,height:n}}function yZ(e,t,n){const r=vn(t),i=Js(t),s=n==="fixed",l=wc(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ws(0);function u(){c.x=kb(i)}if(r||!r&&!s)if((Za(t)!=="body"||Rc(i))&&(a=_b(t)),r){const v=wc(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&u();s&&!r&&i&&u();const h=i&&!r&&!s?W7(i,a):Ws(0),f=l.left+a.scrollLeft-c.x-h.x,p=l.top+a.scrollTop-c.y-h.y;return{x:f,y:p,width:l.width,height:l.height}}function ix(e){return Ti(e).position==="static"}function CL(e,t){if(!vn(e)||Ti(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Js(e)===n&&(n=n.ownerDocument.body),n}function K7(e,t){const n=Wn(e);if(yb(e))return n;if(!vn(e)){let i=Xs(e);for(;i&&!qs(i);){if(Kt(i)&&!ix(i))return i;i=Xs(i)}return n}let r=CL(e,t);for(;r&&eY(r)&&ix(r);)r=CL(r,t);return r&&qs(r)&&ix(r)&&!sk(r)?n:r||sY(e)||n}const bZ=async function(e){const t=this.getOffsetParent||K7,n=this.getDimensions,r=await n(e.floating);return{reference:yZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _Z(e){return Ti(e).direction==="rtl"}const xZ={convertOffsetParentRelativeRectToViewportRelativeRect:cZ,getDocumentElement:Js,getClippingRect:gZ,getOffsetParent:K7,getElementRects:bZ,getClientRects:uZ,getDimensions:vZ,getScale:Hu,isElement:Kt,isRTL:_Z};function Y7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function SZ(e,t){let n=null,r;const i=Js(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:h,top:f,width:p,height:v}=u;if(a||t(),!p||!v)return;const S=Pu(f),x=Pu(i.clientWidth-(h+p)),g=Pu(i.clientHeight-(f+v)),b=Pu(h),_={rootMargin:-S+"px "+-x+"px "+-g+"px "+-b+"px",threshold:Si(0,Zu(1,c))||1};let T=!0;function E(k){const A=k[0].intersectionRatio;if(A!==c){if(!T)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!Y7(u,e.getBoundingClientRect())&&l(),T=!1}try{n=new IntersectionObserver(E,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,_)}n.observe(e)}return l(!0),s}function EL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ok(e),h=i||s?[...u?Ha(u):[],...Ha(t)]:[];h.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=u&&a?SZ(u,n):null;let p=-1,v=null;l&&(v=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let S,x=c?wc(e):null;c&&g();function g(){const b=wc(e);x&&!Y7(x,b)&&n(),x=b,S=requestAnimationFrame(g)}return n(),()=>{var b;h.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(b=v)==null||b.disconnect(),v=null,c&&cancelAnimationFrame(S)}}const wZ=rZ,CZ=iZ,EZ=eZ,TZ=oZ,kZ=tZ,OZ=sZ,RZ=(e,t,n)=>{const r=new Map,i={platform:xZ,...n},s={...i.platform,_c:r};return JQ(e,t,{...i,platform:s})};var AZ=typeof document<"u",PZ=function(){},Ev=AZ?O.useLayoutEffect:PZ;function Qv(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(!Qv(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;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Qv(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function X7(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function TL(e,t){const n=X7(e);return Math.round(t*n)/n}function sx(e){const t=O.useRef(e);return Ev(()=>{t.current=e}),t}function MZ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[h,f]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=O.useState(r);Qv(p,r)||v(r);const[S,x]=O.useState(null),[g,b]=O.useState(null),y=O.useCallback(W=>{W!==k.current&&(k.current=W,x(W))},[]),_=O.useCallback(W=>{W!==A.current&&(A.current=W,b(W))},[]),T=s||S,E=l||g,k=O.useRef(null),A=O.useRef(null),R=O.useRef(h),L=c!=null,z=sx(c),D=sx(i),$=sx(u),N=O.useCallback(()=>{if(!k.current||!A.current)return;const W={placement:t,strategy:n,middleware:p};D.current&&(W.platform=D.current),RZ(k.current,A.current,W).then(I=>{const G={...I,isPositioned:$.current!==!1};F.current&&!Qv(R.current,G)&&(R.current=G,Ir.flushSync(()=>{f(G)}))})},[p,t,n,D,$]);Ev(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const F=O.useRef(!1);Ev(()=>(F.current=!0,()=>{F.current=!1}),[]),Ev(()=>{if(T&&(k.current=T),E&&(A.current=E),T&&E){if(z.current)return z.current(T,E,N);N()}},[T,E,N,z,L]);const U=O.useMemo(()=>({reference:k,floating:A,setReference:y,setFloating:_}),[y,_]),H=O.useMemo(()=>({reference:T,floating:E}),[T,E]),K=O.useMemo(()=>{const W={position:n,left:0,top:0};if(!H.floating)return W;const I=TL(H.floating,h.x),G=TL(H.floating,h.y);return a?{...W,transform:"translate("+I+"px, "+G+"px)",...X7(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:G}},[n,a,H.floating,h.x,h.y]);return O.useMemo(()=>({...h,update:N,refs:U,elements:H,floatingStyles:K}),[h,N,U,H,K])}const LZ=(e,t)=>({...wZ(e),options:[e,t]}),jZ=(e,t)=>({...CZ(e),options:[e,t]}),DZ=(e,t)=>({...OZ(e),options:[e,t]}),IZ=(e,t)=>({...EZ(e),options:[e,t]}),NZ=(e,t)=>({...TZ(e),options:[e,t]}),BZ=(e,t)=>({...kZ(e),options:[e,t]}),zZ={intentional:"onClick",sloppy:"onPointerDown"};function HZ(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Ob(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:a,dataRef:c}=n.context,{enabled:u=!0,escapeKey:h=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:v=!1,referencePressEvent:S="sloppy",ancestorScroll:x=!1,bubbles:g,externalTree:b}=t,y=tl(b),_=Ne(typeof f=="function"?f:()=>!1),T=typeof f=="function"?_:f,E=O.useRef(!1),{escapeKey:k,outsidePress:A}=HZ(g),R=O.useRef(null),L=mn(),z=mn(),D=Ne(()=>{z.clear(),c.current.insideReactTree=!1}),$=O.useRef(!1),N=O.useRef(""),F=Ne(ne=>{N.current=ne.pointerType}),U=Ne(()=>{const ne=N.current,te=ne==="pen"||!ne?"mouse":ne,le=typeof p=="function"?p():p;return typeof le=="string"?le:le[te]}),H=Ne(ne=>{if(!r||!u||!h||ne.key!=="Escape"||$.current)return;const te=c.current.floatingContext?.nodeId,le=y?ac(y.nodesRef.current,te):[];if(!k&&le.length>0){let de=!0;if(le.forEach(ue=>{ue.context?.open&&!ue.context.dataRef.current.__escapeKeyBubbles&&(de=!1)}),!de)return}const fe=dQ(ne)?ne.nativeEvent:ne,pe=qe(wb,fe);n.setOpen(!1,pe),!k&&!pe.isPropagationAllowed&&ne.stopPropagation()}),K=Ne(ne=>{const te=U();return te==="intentional"&&ne.type!=="click"||te==="sloppy"&&ne.type==="click"}),W=Ne(()=>{c.current.insideReactTree=!0,z.start(0,D)}),I=Ne((ne,te=!1)=>{if(K(ne)){D();return}if(c.current.insideReactTree){D();return}if(U()==="intentional"&&te||typeof T=="function"&&!T(ne))return;const le=sr(ne),fe=`[${ed("inert")}]`,pe=An(n.select("floatingElement")).querySelectorAll(fe),de=n.context.triggerElements;if(le&&(de.hasElement(le)||de.hasMatchingElement(_e=>gt(_e,le))))return;let ue=Kt(le)?le:null;for(;ue&&!qs(ue);){const _e=Xs(ue);if(qs(_e)||!Kt(_e))break;ue=_e}if(pe.length&&Kt(le)&&!cQ(le)&&!gt(le,n.select("floatingElement"))&&Array.from(pe).every(_e=>!gt(ue,_e)))return;if(vn(le)&&!("touches"in ne)){const _e=qs(le),Pe=Ti(le),me=/auto|scroll/,Ae=_e||me.test(Pe.overflowX),Te=_e||me.test(Pe.overflowY),We=Ae&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,rt=Te&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,Ue=Pe.direction==="rtl",ot=rt&&(Ue?ne.offsetX<=le.offsetWidth-le.clientWidth:ne.offsetX>le.clientWidth),tt=We&&ne.offsetY>le.clientHeight;if(ot||tt)return}const Ie=c.current.floatingContext?.nodeId,Le=y&&ac(y.nodesRef.current,Ie).some(_e=>fs(ne,_e.context?.elements.floating));if(fs(ne,n.select("floatingElement"))||fs(ne,n.select("domReferenceElement"))||Le)return;const we=y?ac(y.nodesRef.current,Ie):[];if(we.length>0){let _e=!0;if(we.forEach(Pe=>{Pe.context?.open&&!Pe.context.dataRef.current.__outsidePressBubbles&&(_e=!1)}),!_e)return}n.setOpen(!1,qe(vk,ne)),D()}),G=Ne(ne=>{U()!=="sloppy"||ne.pointerType==="touch"||!n.select("open")||!u||fs(ne,n.select("floatingElement"))||fs(ne,n.select("domReferenceElement"))||I(ne)}),j=Ne(ne=>{if(U()!=="sloppy"||!n.select("open")||!u||fs(ne,n.select("floatingElement"))||fs(ne,n.select("domReferenceElement")))return;const te=ne.touches[0];te&&(R.current={startTime:Date.now(),startX:te.clientX,startY:te.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},L.start(1e3,()=>{R.current&&(R.current.dismissOnTouchEnd=!1,R.current.dismissOnMouseDown=!1)}))}),B=Ne(ne=>{const te=sr(ne);function le(){j(ne),te?.removeEventListener(ne.type,le)}te?.addEventListener(ne.type,le)}),V=Ne(ne=>{const te=E.current;if(E.current=!1,L.clear(),ne.type==="mousedown"&&R.current&&!R.current.dismissOnMouseDown)return;const le=sr(ne);function fe(){ne.type==="pointerdown"?G(ne):I(ne,te),le?.removeEventListener(ne.type,fe)}le?.addEventListener(ne.type,fe)}),X=Ne(ne=>{if(U()!=="sloppy"||!R.current||fs(ne,n.select("floatingElement"))||fs(ne,n.select("domReferenceElement")))return;const te=ne.touches[0];if(!te)return;const le=Math.abs(te.clientX-R.current.startX),fe=Math.abs(te.clientY-R.current.startY),pe=Math.sqrt(le*le+fe*fe);pe>5&&(R.current.dismissOnTouchEnd=!0),pe>10&&(I(ne),L.clear(),R.current=null)}),re=Ne(ne=>{const te=sr(ne);function le(){X(ne),te?.removeEventListener(ne.type,le)}te?.addEventListener(ne.type,le)}),ie=Ne(ne=>{U()!=="sloppy"||!R.current||fs(ne,n.select("floatingElement"))||fs(ne,n.select("domReferenceElement"))||(R.current.dismissOnTouchEnd&&I(ne),L.clear(),R.current=null)}),Q=Ne(ne=>{const te=sr(ne);function le(){ie(ne),te?.removeEventListener(ne.type,le)}te?.addEventListener(ne.type,le)});O.useEffect(()=>{if(!r||!u)return;c.current.__escapeKeyBubbles=k,c.current.__outsidePressBubbles=A;const ne=new Sc;function te(ue){n.setOpen(!1,qe(rr,ue))}function le(){ne.clear(),$.current=!0}function fe(){ne.start(bb()?5:0,()=>{$.current=!1})}const pe=An(i);pe.addEventListener("pointerdown",F,!0),h&&(pe.addEventListener("keydown",H),pe.addEventListener("compositionstart",le),pe.addEventListener("compositionend",fe)),T&&(pe.addEventListener("click",V,!0),pe.addEventListener("pointerdown",V,!0),pe.addEventListener("touchstart",B,!0),pe.addEventListener("touchmove",re,!0),pe.addEventListener("touchend",Q,!0),pe.addEventListener("mousedown",V,!0));let de=[];return x&&(Kt(l)&&(de=Ha(l)),Kt(i)&&(de=de.concat(Ha(i))),!Kt(s)&&s&&s.contextElement&&(de=de.concat(Ha(s.contextElement)))),de=de.filter(ue=>ue!==pe.defaultView?.visualViewport),de.forEach(ue=>{ue.addEventListener("scroll",te,{passive:!0})}),()=>{pe.removeEventListener("pointerdown",F,!0),h&&(pe.removeEventListener("keydown",H),pe.removeEventListener("compositionstart",le),pe.removeEventListener("compositionend",fe)),T&&(pe.removeEventListener("click",V,!0),pe.removeEventListener("pointerdown",V,!0),pe.removeEventListener("touchstart",B,!0),pe.removeEventListener("touchmove",re,!0),pe.removeEventListener("touchend",Q,!0),pe.removeEventListener("mousedown",V,!0)),de.forEach(ue=>{ue.removeEventListener("scroll",te)}),ne.clear()}},[c,i,s,l,h,T,r,a,x,u,k,A,H,I,V,G,B,re,Q,F,n]),O.useEffect(D,[T,D]);const Y=O.useMemo(()=>({onKeyDown:H,...v&&{[zZ[S]]:ne=>{n.setOpen(!1,qe(sc,ne.nativeEvent))},...S!=="intentional"&&{onClick(ne){n.setOpen(!1,qe(sc,ne.nativeEvent))}}}}),[H,n,v,S]),J=Ne(ne=>{const te=sr(ne.nativeEvent);!gt(n.select("floatingElement"),te)||ne.button!==0||(E.current=!0)}),ee=O.useMemo(()=>({onKeyDown:H,onPointerDown:J,onMouseDown:J,onMouseUp:J,onClickCapture:W,onMouseDownCapture:W,onPointerDownCapture:W,onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[H,J,W]);return O.useMemo(()=>u?{reference:Y,floating:ee,trigger:Y}:{},[u,Y,ee])}var Zv=Symbol("NOT_FOUND");function $Z(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function FZ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function UZ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var kL=e=>Array.isArray(e)?e:[e];function VZ(e){const t=Array.isArray(e[0])?e[0]:e;return UZ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function qZ(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function WZ(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Zv},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function GZ(e,t){let n=[];function r(a){const c=n.findIndex(u=>t(a,u.key));if(c>-1){const u=n[c];return c>0&&(n.splice(c,1),n.unshift(u)),u.value}return Zv}function i(a,c){r(a)===Zv&&(n.unshift({key:a,value:c}),n.length>e&&n.pop())}function s(){return n}function l(){n=[]}return{get:r,put:i,getEntries:s,clear:l}}var KZ=(e,t)=>e===t;function YZ(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let s=0;s<i;s++)if(!e(n[s],r[s]))return!1;return!0}}function XZ(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=KZ,maxSize:i=1,resultEqualityCheck:s}=n,l=YZ(r);let a=0;const c=i<=1?WZ(l):GZ(i,l);function u(){let h=c.get(arguments);if(h===Zv){if(h=e.apply(null,arguments),a++,s){const p=c.getEntries().find(v=>s(v.value,h));p&&(h=p.value,a!==0&&a--)}c.put(arguments,h)}return h}return u.clearCache=()=>{c.clear(),u.resetResultsCount()},u.resultsCount=()=>a,u.resetResultsCount=()=>{a=0},u}var QZ=class{constructor(e){this.value=e}deref(){return this.value}},ZZ=typeof WeakRef<"u"?WeakRef:QZ,JZ=0,OL=1;function $g(){return{s:JZ,v:void 0,o:null,p:null}}function Q7(e,t={}){let n=$g();const{resultEqualityCheck:r}=t;let i,s=0;function l(){let a=n;const{length:c}=arguments;for(let f=0,p=c;f<p;f++){const v=arguments[f];if(typeof v=="function"||typeof v=="object"&&v!==null){let S=a.o;S===null&&(a.o=S=new WeakMap);const x=S.get(v);x===void 0?(a=$g(),S.set(v,a)):a=x}else{let S=a.p;S===null&&(a.p=S=new Map);const x=S.get(v);x===void 0?(a=$g(),S.set(v,a)):a=x}}const u=a;let h;if(a.s===OL)h=a.v;else if(h=e.apply(null,arguments),s++,r){const f=i?.deref?.()??i;f!=null&&r(f,h)&&(h=f,s!==0&&s--),i=typeof h=="object"&&h!==null||typeof h=="function"?new ZZ(h):h}return u.s=OL,u.v=h,h}return l.clearCache=()=>{n=$g(),l.resetResultsCount()},l.resultsCount=()=>s,l.resetResultsCount=()=>{s=0},l}function Z7(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let s=0,l=0,a,c={},u=i.pop();typeof u=="object"&&(c=u,u=i.pop()),$Z(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const h={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:v=Q7,argsMemoizeOptions:S=[]}=h,x=kL(p),g=kL(S),b=VZ(i),y=f(function(){return s++,u.apply(null,arguments)},...x),_=v(function(){l++;const E=qZ(b,arguments);return a=y.apply(null,E),a},...g);return Object.assign(_,{resultFunc:u,memoizedResultFunc:y,dependencies:b,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var eJ=Z7(Q7),tJ=Object.assign((e,t=eJ)=>{FZ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((l,a,c)=>(l[n[c]]=a,l),{}))},{withTypes:()=>tJ});Z7({memoize:XZ,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Re=(e,t,n,r,i,s,...l)=>{if(l.length>0)throw new Error(Ut(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var nJ=m9();const rJ=ak(19),iJ=rJ?sJ:oJ;function De(e,t,n,r,i){return iJ(e,t,n,r,i)}function sJ(e,t,n,r,i){const s=O.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return nJ.useSyncExternalStore(e.subscribe,s,s)}function oJ(e,t,n,r,i){return g9.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,i))}class lc{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){lc.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||lc.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};lc.prototype.setState.call(this,t)}}class Rk extends lc{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){O.useDebugValue(t),Fe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){Fe(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);Fe(()=>{this.update(t)},n)}useControlledProp(t,n,r){O.useDebugValue(t);const i=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),Fe(()=>{i&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,i])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const s=this.selectors[t];return s(this.state,n,r,i)};useState=(t,n,r,i)=>{O.useDebugValue(t);const s=this.selectors[t];return De(this,s,n,r,i)};useContextCallback(t,n){O.useDebugValue(t);const r=Ne(n??wn);this.context[t]=r}useStateSetter(t){const n=O.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(s=>{const l=r(s);if(!Object.is(i,l)){const a=i;i=l,n(l,a,this)}})}}const aJ={open:Re(e=>e.open),domReferenceElement:Re(e=>e.domReferenceElement),referenceElement:Re(e=>e.positionReference??e.referenceElement),floatingElement:Re(e=>e.floatingElement),floatingId:Re(e=>e.floatingId)};class Ak extends Rk{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:s,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:I7(),nested:n,noEmit:r,triggerElements:s},aJ)}setOpen=(t,n)=>{if((!t||!this.state.open||_7(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Go(e,t=!1,n=!1){const[r,i]=O.useState(e&&t?"idle":void 0),[s,l]=O.useState(e);return e&&!s&&(l(!0),i("starting")),!e&&s&&r!=="ending"&&!n&&i("ending"),!e&&!s&&r==="ending"&&i(void 0),Fe(()=>{if(!e&&s&&r!=="ending"&&n){const a=Hs.request(()=>{i("ending")});return()=>{Hs.cancel(a)}}},[e,s,r,n]),Fe(()=>{if(!e||t)return;const a=Hs.request(()=>{i(void 0)});return()=>{Hs.cancel(a)}},[t,e]),Fe(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&i("starting");const a=Hs.request(()=>{i("idle")});return()=>{Hs.cancel(a)}},[t,e,s,i,r]),O.useMemo(()=>({mounted:s,setMounted:l,transitionStatus:r}),[s,r])}function lJ(e,t=!1,n=!0){const r=qp();return Ne((i,s=null)=>{r.cancel();const l=Dl(e);l!=null&&(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?i():r.request(()=>{function a(){l&&Promise.all(l.getAnimations().map(c=>c.finished)).then(()=>{s!=null&&s.aborted||Ir.flushSync(i)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Ir.flushSync(i)}else l.getAnimations().length>0&&l.getAnimations().some(c=>c.pending||c.playState!=="finished")&&a()})}t?r.request(a):a()}))})}function Ri(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,s=Mn(n),l=Ne(i),a=lJ(r,n);O.useEffect(()=>{t&&a(()=>{n===s.current&&l()})},[t,n,l,a,s])}function cJ(e,t){const n=O.useRef(null);return O.useCallback(r=>{e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),r!==null&&(n.current=e,t.context.triggerElements.add(e,r)))},[t,e])}function J7(e,t,n,r){const i=n.useState("isMountedByTrigger",e),s=cJ(e,n),l=Ne(a=>{s(a),a!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return Fe(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function eB(e){const t=e.useState("open");Fe(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function tB(e,t,n){const{mounted:r,setMounted:i,transitionStatus:s}=Go(e);t.useSyncedValues({mounted:r,transitionStatus:s});const l=Ne(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return Ri({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:s}}class Rb{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function uJ(){return new Ak({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Rb,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function nB(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:uJ(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:yn,inactiveTriggerProps:yn,popupProps:yn}}const rB={open:Re(e=>e.open),mounted:Re(e=>e.mounted),transitionStatus:Re(e=>e.transitionStatus),floatingRootContext:Re(e=>e.floatingRootContext),preventUnmountingOnClose:Re(e=>e.preventUnmountingOnClose),payload:Re(e=>e.payload),activeTriggerId:Re(e=>e.activeTriggerId),activeTriggerElement:Re(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Re((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:Re((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:Re((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:Re((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Re(e=>e.popupProps),popupElement:Re(e=>e.popupElement),positionerElement:Re(e=>e.positionerElement)};function Pk(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Mc(),s=Wo()!=null,l=Cr(()=>new Ak({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new Rb,floatingId:i,nested:s,noEmit:e.noEmit||!1})).current;return Fe(()=>{const a={open:t,floatingId:i};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=Kt(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),l.update(a)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=s,l.context.noEmit=e.noEmit||!1,l}function dJ(e={}){const{nodeId:t,externalTree:n}=e,r=Pk(e),i=e.rootContext||r,s={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,a]=O.useState(null),c=O.useRef(null),u=tl(n);Fe(()=>{s.domReference&&(c.current=s.domReference)},[s.domReference]);const h=MZ({...e,elements:{...s,...l&&{reference:l}}}),f=O.useCallback(A=>{const R=Kt(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;a(R),h.refs.setReference(R)},[h.refs]),[p,v]=O.useState(null),[S,x]=O.useState(null);i.useSyncedValue("referenceElement",p),i.useSyncedValue("domReferenceElement",Kt(p)?p:null),i.useSyncedValue("floatingElement",S);const g=O.useCallback(A=>{(Kt(A)||A===null)&&(c.current=A,v(A)),(Kt(h.refs.reference.current)||h.refs.reference.current===null||A!==null&&!Kt(A))&&h.refs.setReference(A)},[h.refs,v]),b=O.useCallback(A=>{x(A),h.refs.setFloating(A)},[h.refs]),y=O.useMemo(()=>({...h.refs,setReference:g,setFloating:b,setPositionReference:f,domReference:c}),[h.refs,g,b,f]),_=O.useMemo(()=>({...h.elements,domReference:s.domReference}),[h.elements,s.domReference]),T=i.useState("open"),E=i.useState("floatingId"),k=O.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:E,refs:y,elements:_,nodeId:t,rootStore:i}),[h,y,_,t,i,T,E]);return Fe(()=>{i.context.dataRef.current.floatingContext=k;const A=u?.nodesRef.current.find(R=>R.id===t);A&&(A.context=k)}),O.useMemo(()=>({...h,context:k,refs:y,elements:_,rootStore:i}),[h,y,_,k,i])}function iB(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,s=Mc(),l=Wo()!=null,a=t.useState("open"),c=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,f=Cr(()=>new Ak({open:a,referenceElement:c,floatingElement:u,triggerElements:h,onOpenChange:i,floatingId:s,nested:l,noEmit:n})).current;return Fe(()=>{const p={open:a,floatingId:s,referenceElement:c,floatingElement:u};Kt(c)&&(p.domReferenceElement=c),f.update(p)},[a,s,c,u,f]),f.context.onOpenChange=i,f.context.nested=l,f.context.noEmit=n,f}const ox=sQ&&h7;function fJ(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:s=!0,visibleOnly:l=!0}=t,a=O.useRef(!1),c=mn(),u=O.useRef(!0);O.useEffect(()=>{const f=n.select("domReferenceElement");if(!s)return;const p=Wn(f);function v(){!n.select("open")&&vn(f)&&f===ms(An(f))&&(a.current=!0)}function S(){u.current=!0}function x(){u.current=!1}return p.addEventListener("blur",v),ox&&(p.addEventListener("keydown",S,!0),p.addEventListener("pointerdown",x,!0)),()=>{p.removeEventListener("blur",v),ox&&(p.removeEventListener("keydown",S,!0),p.removeEventListener("pointerdown",x,!0))}},[n,s]),O.useEffect(()=>{if(!s)return;function f(p){(p.reason===sc||p.reason===wb)&&(a.current=!0)}return r.on("openchange",f),()=>{r.off("openchange",f)}},[r,s]);const h=O.useMemo(()=>({onMouseLeave(){a.current=!1},onFocus(f){if(a.current)return;const p=sr(f.nativeEvent);if(l&&Kt(p)){if(ox&&!f.relatedTarget){if(!u.current&&!xk(p))return}else if(!uQ(p))return}n.setOpen(!0,qe(Uv,f.nativeEvent,f.currentTarget))},onBlur(f){a.current=!1;const p=f.relatedTarget,v=f.nativeEvent,S=Kt(p)&&p.hasAttribute(ed("focus-guard"))&&p.getAttribute("data-type")==="outside";c.start(0,()=>{const x=n.select("domReferenceElement"),g=ms(x?x.ownerDocument:document);!p&&g===x||gt(i.current.floatingContext?.refs.floating.current,g)||gt(x,g)||S||n.context.triggerElements.hasElement(f.relatedTarget)||n.setOpen(!1,qe(Uv,v))})}}),[i,n,l,c]);return O.useMemo(()=>s?{reference:h,trigger:h}:{},[s,h])}const s2=ed("safe-polygon"),hJ=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${v7}`;function pJ(e){return e?!!e.closest(hJ):!1}function sB(e){const t=O.useRef(void 0),n=O.useRef(!1),r=O.useRef(void 0),i=O.useRef(!0),s=O.useRef(!1),l=O.useRef(()=>{}),a=O.useRef(!1),c=mn(),u=mn(),h=O.useRef(void 0);return O.useMemo(()=>{const f=e.context.dataRef.current;return f.hoverInteractionState||(f.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:s,unbindMouseMoveRef:l,restTimeoutPendingRef:a,openChangeTimeout:c,restTimeout:u,handleCloseOptionsRef:h}),f.hoverInteractionState},[e,t,n,r,i,s,l,a,c,u,h])}const mJ=new Set(["click","mousedown"]);function gJ(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:a=!0,closeDelay:c=0,externalTree:u}=t,{pointerTypeRef:h,interactedInsideRef:f,handlerRef:p,performedPointerEventsMutationRef:v,unbindMouseMoveRef:S,restTimeoutPendingRef:x,openChangeTimeout:g,handleCloseOptionsRef:b}=sB(n),y=tl(u),_=Wo(),T=Ne(()=>f.current?!0:l.current.openEvent?mJ.has(l.current.openEvent.type):!1),E=Ne(()=>{const z=l.current.openEvent?.type;return z?.includes("mouse")&&z!=="mousedown"}),k=O.useCallback((z,D=!0)=>{const $=vJ(c,h.current);$&&!p.current?g.start($,()=>n.setOpen(!1,qe(wi,z))):D&&(g.clear(),n.setOpen(!1,qe(wi,z)))},[c,p,n,h,g]),A=Ne(()=>{S.current(),p.current=void 0}),R=Ne(()=>{if(v.current){const z=An(i).body;z.style.pointerEvents="",z.removeAttribute(s2),v.current=!1}}),L=Ne(z=>{const D=sr(z);if(!pJ(D)){f.current=!1;return}f.current=!0});Fe(()=>{r||(h.current=void 0,x.current=!1,f.current=!1,A(),R())},[r,h,x,f,A,R]),O.useEffect(()=>()=>{A()},[A]),O.useEffect(()=>R,[R]),Fe(()=>{if(a&&r&&b.current?.blockPointerEvents&&E()&&Kt(s)&&i){v.current=!0;const z=An(i).body;z.setAttribute(s2,"");const D=s,$=i,N=y?.nodesRef.current.find(F=>F.id===_)?.context?.elements.floating;return N&&(N.style.pointerEvents=""),z.style.pointerEvents="none",D.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{z.style.pointerEvents="",D.style.pointerEvents="",$.style.pointerEvents=""}}},[a,r,s,i,b,E,y,_,v]),O.useEffect(()=>{if(!a)return;function z(F){if(T()||!l.current.floatingContext||!n.select("open"))return;const U=n.context.triggerElements;F.relatedTarget&&U.hasElement(F.relatedTarget)||(R(),A(),T()||k(F))}function D(F){g.clear(),R(),p.current?.(F),A()}function $(F){T()||k(F,!1)}const N=i;return N&&(N.addEventListener("mouseleave",z),N.addEventListener("mouseenter",D),N.addEventListener("mouseleave",$),N.addEventListener("pointerdown",L,!0)),()=>{N&&(N.removeEventListener("mouseleave",z),N.removeEventListener("mouseenter",D),N.removeEventListener("mouseleave",$),N.removeEventListener("pointerdown",L,!0))}})}function vJ(e,t){return t&&!Qu(t)?0:typeof e=="function"?e():e}function ax(e){return typeof e=="function"?e():e}const yJ={current:null};function bJ(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:s=!0,delay:l=0,handleClose:a=null,mouseOnly:c=!1,restMs:u=0,move:h=!0,triggerElementRef:f=yJ,externalTree:p,isActiveTrigger:v=!0}=t,S=tl(p),{pointerTypeRef:x,interactedInsideRef:g,handlerRef:b,blockMouseMoveRef:y,performedPointerEventsMutationRef:_,unbindMouseMoveRef:T,restTimeoutPendingRef:E,openChangeTimeout:k,restTimeout:A,handleCloseOptionsRef:R}=sB(n),L=Mn(a),z=Mn(l),D=Mn(u);v&&(R.current=L.current?.__options);const $=Ne(()=>g.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),N=O.useCallback((K,W=!0)=>{const I=tx(z.current,"close",x.current);I&&!b.current?k.start(I,()=>n.setOpen(!1,qe(wi,K))):W&&(k.clear(),n.setOpen(!1,qe(wi,K)))},[z,b,n,x,k]),F=Ne(()=>{T.current(),b.current=void 0}),U=Ne(()=>{if(_.current){const K=An(n.select("domReferenceElement")).body;K.style.pointerEvents="",K.removeAttribute(s2),_.current=!1}});O.useEffect(()=>{if(!s)return;function K(W){W.open||(k.clear(),A.clear(),y.current=!0,E.current=!1)}return i.on("openchange",K),()=>{i.off("openchange",K)}},[s,i,k,A,y,E]);const H=Ne(K=>{if($()||!r.current.floatingContext)return;const W=n.context.triggerElements;if(K.relatedTarget&&W.hasElement(K.relatedTarget))return;const I=f.current;L.current?.({...r.current.floatingContext,tree:S,x:K.clientX,y:K.clientY,onClose(){U(),F(),!$()&&I===n.select("domReferenceElement")&&N(K)}})(K)});return O.useEffect(()=>{if(!s)return;const K=f.current??(v?n.select("domReferenceElement"):null);if(!Kt(K))return;function W(j){if(k.clear(),y.current=!1,c&&!Qu(x.current)||ax(D.current)>0&&!tx(z.current,"open"))return;const B=tx(z.current,"open",x.current),V=n.select("domReferenceElement"),X=n.context.triggerElements,re=(X.hasElement(j.target)||X.hasMatchingElement(Y=>gt(Y,j.target)))&&(!V||!gt(V,j.target)),ie=j.currentTarget??null,Q=!n.select("open")||re;B?k.start(B,()=>{Q&&n.setOpen(!0,qe(wi,j,ie))}):Q&&n.setOpen(!0,qe(wi,j,ie))}function I(j){if($()){U();return}T.current();const B=n.select("domReferenceElement"),V=An(B);A.clear(),E.current=!1;const X=n.context.triggerElements;if(j.relatedTarget&&X.hasElement(j.relatedTarget))return;if(L.current&&r.current.floatingContext){n.select("open")||k.clear();const ie=f.current;b.current=L.current({...r.current.floatingContext,tree:S,x:j.clientX,y:j.clientY,onClose(){U(),F(),!$()&&ie===n.select("domReferenceElement")&&N(j,!0)}});const Q=b.current;Q(j),V.addEventListener("mousemove",Q),T.current=()=>{V.removeEventListener("mousemove",Q)};return}(x.current!=="touch"||!gt(n.select("floatingElement"),j.relatedTarget))&&N(j)}function G(j){H(j)}return n.select("open")&&K.addEventListener("mouseleave",G),h&&K.addEventListener("mousemove",W,{once:!0}),K.addEventListener("mouseenter",W),K.addEventListener("mouseleave",I),()=>{K.removeEventListener("mouseleave",G),h&&K.removeEventListener("mousemove",W),K.removeEventListener("mouseenter",W),K.removeEventListener("mouseleave",I)}},[F,U,y,r,z,N,n,s,L,H,v,$,c,h,x,D,A,E,k,f,S,T,b]),O.useMemo(()=>{function K(W){x.current=W.pointerType}return{onPointerDown:K,onPointerEnter:K,onMouseMove(W){const{nativeEvent:I}=W,G=W.currentTarget,j=n.select("domReferenceElement"),B=n.context.triggerElements,V=n.select("open"),X=(B.hasElement(W.target)||B.hasMatchingElement(ie=>gt(ie,W.target)))&&(!j||!gt(j,W.target));if(c&&!Qu(x.current)||V&&!X||ax(D.current)===0||!X&&E.current&&W.movementX**2+W.movementY**2<2)return;A.clear();function re(){!y.current&&(!V||X)&&n.setOpen(!0,qe(wi,I,G))}x.current==="touch"?Ir.flushSync(()=>{re()}):X&&V?re():(E.current=!0,A.start(ax(D.current),re))}}},[y,c,n,x,D,A,E])}function Id(e=[]){const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=e.map(u=>u?.trigger),s=O.useCallback(u=>Fg(u,e,"reference"),t),l=O.useCallback(u=>Fg(u,e,"floating"),n),a=O.useCallback(u=>Fg(u,e,"item"),r),c=O.useCallback(u=>Fg(u,e,"trigger"),i);return O.useMemo(()=>({getReferenceProps:s,getFloatingProps:l,getItemProps:a,getTriggerProps:c}),[s,l,a,c])}function Fg(e,t,n){const r=new Map,i=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[ZE]="");for(const l in e)i&&e&&(l===m7||l===g7)||(s[l]=e[l]);for(let l=0;l<t.length;l+=1){let a;const c=t[l]?.[n];typeof c=="function"?a=e?c(e):null:a=c,a&&RL(s,a,i,r)}return RL(s,e,i,r),s}function RL(e,t,n,r){for(const i in t){const s=t[i];n&&(i===m7||i===g7)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof s=="function"&&(r.get(i)?.push(s),e[i]=(...l)=>r.get(i)?.map(a=>a(...l)).find(a=>a!==void 0))):e[i]=s)}}const _J="Escape";function Ab(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ug(e,t){return Ab(t,e===_k||e===Up,e===$a||e===Fa)}function lx(e,t,n){return Ab(t,e===Up,n?e===$a:e===Fa)||e==="Enter"||e===" "||e===""}function xJ(e,t,n){return Ab(t,n?e===$a:e===Fa,e===Up)}function SJ(e,t,n,r){const i=n?e===Fa:e===$a,s=e===_k;return t==="both"||t==="horizontal"&&r&&r>1?e===_J:Ab(t,i,s)}function Mk(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:a,activeIndex:c,onNavigate:u=()=>{},enabled:h=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:v=!1,nested:S=!1,rtl:x=!1,virtual:g=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:_=!0,disabledIndices:T=void 0,orientation:E="vertical",parentOrientation:k,cols:A=1,scrollItemIntoView:R=!0,itemSizes:L,dense:z=!1,id:D,resetOnPointerLeave:$=!0,externalTree:N}=t,F=Uh(i),U=Mn(F),H=Wo(),K=tl(N);Fe(()=>{l.current.orientation=E},[l,E]);const W=JE(s),I=O.useRef(b),G=O.useRef(f??-1),j=O.useRef(null),B=O.useRef(!0),V=Ne(me=>{u(G.current===-1?null:G.current,me)}),X=O.useRef(V),re=O.useRef(!!i),ie=O.useRef(r),Q=O.useRef(!1),Y=O.useRef(!1),J=Mn(T),ee=Mn(r),ne=Mn(R),te=Mn(f),le=Mn($),fe=Ne(()=>{function me(rt){g?K?.events.emit("virtualfocus",rt):Cv(rt,{sync:Q.current,preventScroll:!0})}const Ae=a.current[G.current],Te=Y.current;Ae&&me(Ae),(Q.current?rt=>rt():requestAnimationFrame)(()=>{const rt=a.current[G.current]||Ae;if(!rt)return;Ae||me(rt);const Ue=ne.current;Ue&&de&&(Te||!B.current)&&rt.scrollIntoView?.(typeof Ue=="boolean"?{block:"nearest",inline:"nearest"}:Ue)})});Fe(()=>{h&&(r&&i?(G.current=f??-1,I.current&&f!=null&&(Y.current=!0,V())):re.current&&(G.current=-1,X.current()))},[h,r,i,f,V]),Fe(()=>{if(h){if(!r){Q.current=!1;return}if(i)if(c==null){if(Q.current=!1,te.current!=null)return;if(re.current&&(G.current=-1,fe()),(!ie.current||!re.current)&&I.current&&(j.current!=null||I.current===!0&&j.current==null)){let me=0;const Ae=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(Ae),me+=1):(G.current=j.current==null||lx(j.current,E,x)||S?wv(a):n2(a),j.current=null,V())};Ae()}}else Nu(a,c)||(G.current=c,fe(),Y.current=!1)}},[h,r,i,c,te,S,a,E,x,V,fe,J]),Fe(()=>{if(!h||i||!K||g||!re.current)return;const me=K.nodesRef.current,Ae=me.find(rt=>rt.id===H)?.context?.elements.floating,Te=ms(An(i)),We=me.some(rt=>rt.context&>(rt.context.elements.floating,Te));Ae&&!We&&B.current&&Ae.focus({preventScroll:!0})},[h,i,K,H,g]),Fe(()=>{X.current=V,ie.current=r,re.current=!!i}),Fe(()=>{r||(j.current=null,I.current=b)},[r,b]);const pe=c!=null,de=O.useMemo(()=>{function me(Te){if(!ee.current)return;const We=a.current.indexOf(Te.currentTarget);We!==-1&&G.current!==We&&(G.current=We,V(Te))}return{onFocus(Te){Q.current=!0,me(Te)},onClick:({currentTarget:Te})=>Te.focus({preventScroll:!0}),onMouseMove(Te){Q.current=!0,Y.current=!1,y&&me(Te)},onPointerLeave(Te){if(!ee.current||!B.current||Te.pointerType==="touch")return;Q.current=!0;const We=Te.relatedTarget;!y||a.current.includes(We)||le.current&&(G.current=-1,V(Te),g||U.current?.focus({preventScroll:!0}))}}},[ee,U,y,a,V,le,g]),ue=O.useCallback(()=>k??K?.nodesRef.current.find(me=>me.id===H)?.context?.dataRef?.current.orientation,[H,K,k]),Ie=Ne(me=>{if(B.current=!1,Q.current=!0,me.which===229||!ee.current&&me.currentTarget===U.current)return;if(S&&SJ(me.key,E,x,A)){Ug(me.key,ue())||Pn(me),n.setOpen(!1,qe(Ph,me.nativeEvent)),vn(s)&&(g?K?.events.emit("virtualfocus",s):s.focus());return}const Ae=G.current,Te=wv(a,T),We=n2(a,T);if(W||(me.key==="Home"&&(Pn(me),G.current=Te,V(me)),me.key==="End"&&(Pn(me),G.current=We,V(me))),A>1){const rt=L||Array.from({length:a.current.length},()=>({width:1,height:1})),Ue=w7(rt,A,z),ot=Ue.findIndex(Ee=>Ee!=null&&!Ua(a,Ee,T)),tt=Ue.reduce((Ee,xe,Ce)=>xe!=null&&!Ua(a,xe,T)?Ce:Ee,-1),mt=Ue[S7({current:Ue.map(Ee=>Ee!=null?a.current[Ee]:null)},{event:me,orientation:E,loopFocus:v,rtl:x,cols:A,disabledIndices:E7([...(typeof T!="function"?T:null)||a.current.map((Ee,xe)=>Ua(a,xe,T)?xe:void 0),void 0],Ue),minIndex:ot,maxIndex:tt,prevIndex:C7(G.current>We?Te:G.current,rt,Ue,A,me.key===Up?"bl":me.key===(x?$a:Fa)?"tr":"tl"),stopEvent:!0})];if(mt!=null&&(G.current=mt,V(me)),E==="both")return}if(Ug(me.key,E)){if(Pn(me),r&&!g&&ms(me.currentTarget.ownerDocument)===me.currentTarget){G.current=lx(me.key,E,x)?Te:We,V(me);return}lx(me.key,E,x)?v?Ae>=We?p&&Ae!==a.current.length?G.current=-1:(Q.current=!1,G.current=Te):G.current=xr(a,{startingIndex:Ae,disabledIndices:T}):G.current=Math.min(We,xr(a,{startingIndex:Ae,disabledIndices:T})):v?Ae<=Te?p&&Ae!==-1?G.current=a.current.length:(Q.current=!1,G.current=We):G.current=xr(a,{startingIndex:Ae,decrement:!0,disabledIndices:T}):G.current=Math.max(Te,xr(a,{startingIndex:Ae,decrement:!0,disabledIndices:T})),Nu(a,G.current)&&(G.current=-1),V(me)}}),Le=O.useMemo(()=>g&&r&&pe&&{"aria-activedescendant":`${D}-${c}`},[g,r,pe,D,c]),we=O.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...W?{}:Le,onKeyDown(me){if(me.key==="Tab"&&me.shiftKey&&r&&!g){const Ae=sr(me.nativeEvent);if(Ae&&!gt(U.current,Ae))return;Pn(me),n.setOpen(!1,qe(xc,me.nativeEvent)),vn(s)&&s.focus();return}Ie(me)},onPointerMove(){B.current=!0}}),[Le,Ie,U,E,W,n,r,g,s]),_e=O.useMemo(()=>{function me(Te){b==="auto"&&y7(Te.nativeEvent)&&(I.current=!g)}function Ae(Te){I.current=b,b==="auto"&&b7(Te.nativeEvent)&&(I.current=!0)}return{onKeyDown(Te){const We=n.select("open");B.current=!1;const rt=Te.key.startsWith("Arrow"),Ue=xJ(Te.key,ue(),x),ot=Ug(Te.key,E),tt=(S?Ue:ot)||Te.key==="Enter"||Te.key.trim()==="";if(g&&We)return Ie(Te);if(!(!We&&!_&&rt)){if(tt){const mt=Ug(Te.key,ue());j.current=S&&mt?null:Te.key}if(S){Ue&&(Pn(Te),We?(G.current=wv(a,J.current),V(Te)):n.setOpen(!0,qe(Ph,Te.nativeEvent,Te.currentTarget)));return}ot&&(te.current!=null&&(G.current=te.current),Pn(Te),!We&&_?n.setOpen(!0,qe(Ph,Te.nativeEvent,Te.currentTarget)):Ie(Te),We&&V(Te))}},onFocus(Te){n.select("open")&&!g&&(G.current=-1,V(Te))},onPointerDown:Ae,onPointerEnter:Ae,onMouseDown:me,onClick:me}},[Ie,J,b,a,S,V,n,_,E,ue,x,te,g]),Pe=O.useMemo(()=>({...Le,..._e}),[Le,_e]);return O.useMemo(()=>h?{reference:Pe,floating:we,item:de,trigger:_e}:{},[h,Pe,we,_e,de])}const wJ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function oB(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),s=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:a=!0,role:c="dialog"}=t,u=Mc(),h=s?.id||u,f=O.useMemo(()=>Uh(l)?.id||i,[l,i]),p=wJ.get(c)??c,S=Wo()!=null,x=O.useMemo(()=>p==="tooltip"||c==="label"?yn:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&S&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,S,c]),g=O.useMemo(()=>p==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?f:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?f:void 0,...p==="menu"&&{id:h}},[p,f,r,h,c,x]),b=O.useMemo(()=>{const _={id:f,...p&&{role:p}};return p==="tooltip"||c==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":h}}},[p,f,h,c]),y=O.useCallback(({active:_,selected:T})=>{const E={role:"option",..._&&{id:`${f}-fui-option`}};switch(c){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[f,c]);return O.useMemo(()=>a?{reference:g,floating:b,item:y,trigger:x}:{},[a,g,b,x,y])}function Lk(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.context.dataRef,{listRef:s,activeIndex:l,onMatch:a,onTypingChange:c,enabled:u=!0,findMatch:h=null,resetMs:f=750,ignoreKeys:p=ti,selectedIndex:v=null}=t,S=mn(),x=O.useRef(""),g=O.useRef(v??l??-1),b=O.useRef(null);Fe(()=>{r&&(S.clear(),b.current=null,x.current="")},[r,S]),Fe(()=>{r&&x.current===""&&(g.current=v??l??-1)},[r,v,l]);const y=Ne(k=>{k?i.current.typing||(i.current.typing=k,c?.(k)):i.current.typing&&(i.current.typing=k,c?.(k))}),_=Ne(k=>{function A($,N,F){const U=h?h(N,F):N.find(H=>H?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return U?$.indexOf(U):-1}const R=s.current;if(x.current.length>0&&x.current[0]!==" "&&(A(R,R,x.current)===-1?y(!1):k.key===" "&&Pn(k)),R==null||p.includes(k.key)||k.key.length!==1||k.ctrlKey||k.metaKey||k.altKey)return;r&&k.key!==" "&&(Pn(k),y(!0)),R.every($=>$?$[0]?.toLocaleLowerCase()!==$[1]?.toLocaleLowerCase():!0)&&x.current===k.key&&(x.current="",g.current=b.current),x.current+=k.key,S.start(f,()=>{x.current="",g.current=b.current,y(!1)});const z=g.current,D=A(R,[...R.slice((z||0)+1),...R.slice(0,(z||0)+1)],x.current);D!==-1?(a?.(D),b.current=D):k.key!==" "&&(x.current="",y(!1))}),T=O.useMemo(()=>({onKeyDown:_}),[_]),E=O.useMemo(()=>({onKeyDown:_,onKeyUp(k){k.key===" "&&y(!1)}}),[_,y]);return O.useMemo(()=>u?{reference:T,floating:E}:{},[u,T,E])}function AL(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let l=0,a=s-1;l<s;a=l++){const[c,u]=t[l]||[0,0],[h,f]=t[a]||[0,0];u>=r!=f>=r&&n<=(h-c)*(r-u)/(f-u)+c&&(i=!i)}return i}function CJ(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function EJ(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Sc;let s=!1,l=null,a=null,c=typeof performance<"u"?performance.now():0;function u(f,p){const v=performance.now(),S=v-c;if(l===null||a===null||S===0)return l=f,a=p,c=v,null;const x=f-l,g=p-a,y=Math.sqrt(x*x+g*g)/S;return l=f,a=p,c=v,y}const h=({x:f,y:p,placement:v,elements:S,onClose:x,nodeId:g,tree:b})=>function(_){function T(){i.clear(),x()}if(i.clear(),!S.domReference||!S.floating||v==null||f==null||p==null)return;const{clientX:E,clientY:k}=_,A=[E,k],R=sr(_),L=_.type==="mouseleave",z=gt(S.floating,R),D=gt(S.domReference,R),$=S.domReference.getBoundingClientRect(),N=S.floating.getBoundingClientRect(),F=v.split("-")[0],U=f>N.right-N.width/2,H=p>N.bottom-N.height/2,K=CJ(A,$),W=N.width>$.width,I=N.height>$.height,G=(W?$:N).left,j=(W?$:N).right,B=(I?$:N).top,V=(I?$:N).bottom;if(z&&(s=!0,!L))return;if(D&&(s=!1),D&&!L){s=!0;return}if(L&&Kt(_.relatedTarget)&>(S.floating,_.relatedTarget)||b&&ac(b.nodesRef.current,g).some(({context:ie})=>ie?.open))return;if(F==="top"&&p>=$.bottom-1||F==="bottom"&&p<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return T();let X=[];switch(F){case"top":X=[[G,$.top+1],[G,N.bottom-1],[j,N.bottom-1],[j,$.top+1]];break;case"bottom":X=[[G,N.top+1],[G,$.bottom-1],[j,$.bottom-1],[j,N.top+1]];break;case"left":X=[[N.right-1,V],[N.right-1,B],[$.left+1,B],[$.left+1,V]];break;case"right":X=[[$.right-1,V],[$.right-1,B],[N.left+1,B],[N.left+1,V]];break}function re([ie,Q]){switch(F){case"top":{const Y=[W?ie+t/2:U?ie+t*4:ie-t*4,Q+t+1],J=[W?ie-t/2:U?ie+t*4:ie-t*4,Q+t+1],ee=[[N.left,U||W?N.bottom-t:N.top],[N.right,U?W?N.bottom-t:N.top:N.bottom-t]];return[Y,J,...ee]}case"bottom":{const Y=[W?ie+t/2:U?ie+t*4:ie-t*4,Q-t],J=[W?ie-t/2:U?ie+t*4:ie-t*4,Q-t],ee=[[N.left,U||W?N.top+t:N.bottom],[N.right,U?W?N.top+t:N.bottom:N.top+t]];return[Y,J,...ee]}case"left":{const Y=[ie+t+1,I?Q+t/2:H?Q+t*4:Q-t*4],J=[ie+t+1,I?Q-t/2:H?Q+t*4:Q-t*4];return[...[[H||I?N.right-t:N.left,N.top],[H?I?N.right-t:N.left:N.right-t,N.bottom]],Y,J]}case"right":{const Y=[ie-t,I?Q+t/2:H?Q+t*4:Q-t*4],J=[ie-t,I?Q-t/2:H?Q+t*4:Q-t*4],ee=[[H||I?N.left+t:N.right,N.top],[H?I?N.left+t:N.right:N.left+t,N.bottom]];return[Y,J,...ee]}default:return[]}}if(!AL([E,k],X)){if(s&&!K)return T();if(!L&&r){const ie=u(_.clientX,_.clientY);if(ie!==null&&ie<.1)return T()}AL([E,k],re([f,p]))?!s&&r&&i.start(40,T):T()}};return h.__options={blockPointerEvents:n},h}let TJ=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),kJ=(function(e){return e[e.open=Vl.open]="open",e[e.closed=Vl.closed]="closed",e[e.startingStyle=Vl.startingStyle]="startingStyle",e[e.endingStyle=Vl.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const aB=O.createContext(void 0);function OJ(){const e=O.useContext(aB);if(e===void 0)throw new Error(Ut(26));return e}const $u="ArrowUp",Wl="ArrowDown",Wh="ArrowLeft",Fu="ArrowRight",Gp="Home",Kp="End",lB=new Set([Wh,Fu]),RJ=new Set([Wh,Fu,Gp,Kp]),cB=new Set([$u,Wl]),AJ=new Set([$u,Wl,Gp,Kp]),uB=new Set([...lB,...cB]),PJ=new Set([...uB,Gp,Kp]),jk=new Set([$u,Wl,Wh,Fu,Gp,Kp]),MJ="Shift",LJ="Control",jJ="Alt",DJ="Meta",IJ=new Set([MJ,LJ,jJ,DJ]);function NJ(e){return vn(e)&&e.tagName==="INPUT"}function PL(e){return!!(NJ(e)&&e.selectionStart!=null||vn(e)&&e.tagName==="TEXTAREA")}function ML(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,s=e.scrollTop;const l=e.clientWidth<e.scrollWidth,a=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const c=LL(e,t,"left"),u=Vg(e),h=Vg(t);n==="ltr"&&(c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight?i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+u.scrollPaddingRight:c-h.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft&&(i=c-h.scrollMarginLeft-u.scrollPaddingLeft)),n==="rtl"&&(c-h.scrollMarginRight<e.scrollLeft+u.scrollPaddingLeft?i=c-h.scrollMarginLeft-u.scrollPaddingLeft:c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight&&(i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+u.scrollPaddingRight))}if(a&&r!=="horizontal"){const c=LL(e,t,"top"),u=Vg(e),h=Vg(t);c-h.scrollMarginTop<e.scrollTop+u.scrollPaddingTop?s=c-h.scrollMarginTop-u.scrollPaddingTop:c+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-u.scrollPaddingBottom&&(s=c+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+u.scrollPaddingBottom)}e.scrollTo({left:i,top:s,behavior:"auto"})}function LL(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Vg(e){const 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}}const BJ={...Ja,...eo,nestedDialogOpen(e){return e?{[kJ.nestedDialogOpen]:""}:null}},dB=O.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:s,render:l,...a}=t,{store:c}=qo(),u=c.useState("descriptionElementId"),h=c.useState("disablePointerDismissal"),f=c.useState("floatingRootContext"),p=c.useState("popupProps"),v=c.useState("modal"),S=c.useState("mounted"),x=c.useState("nested"),g=c.useState("nestedOpenDialogCount"),b=c.useState("open"),y=c.useState("openMethod"),_=c.useState("titleElementId"),T=c.useState("transitionStatus"),E=c.useState("role");OJ(),Ri({open:b,ref:c.context.popupRef,onComplete(){b&&c.context.onOpenChangeComplete?.(!0)}});function k(D){return D==="touch"?c.context.popupRef.current:!0}const A=s===void 0?k:s,R=g>0,L=O.useMemo(()=>({open:b,nested:x,transitionStatus:T,nestedDialogOpen:R}),[b,x,T,R]),z=ut("div",t,{state:L,props:[p,{"aria-labelledby":_??void 0,"aria-describedby":u??void 0,role:E,tabIndex:-1,hidden:!S,onKeyDown(D){jk.has(D.key)&&D.stopPropagation()},style:{[TJ.nestedDialogs]:g}},a],ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],stateAttributesMapping:BJ});return w.jsx(Tb,{context:f,openInteractionType:y,disabled:!S,closeOnFocusOut:!h,initialFocus:A,returnFocus:i,modal:v!==!1,restoreFocus:"popup",children:z})});function Pb(e){return ak(19)?e:e?"true":void 0}const Mb=O.forwardRef(function(t,n){const{cutout:r,...i}=t;let s;if(r){const l=r?.getBoundingClientRect();s=`polygon(
|
|
11
|
+
0% 0%,
|
|
12
|
+
100% 0%,
|
|
13
|
+
100% 100%,
|
|
14
|
+
0% 100%,
|
|
15
|
+
0% 0%,
|
|
16
|
+
${l.left}px ${l.top}px,
|
|
17
|
+
${l.left}px ${l.bottom}px,
|
|
18
|
+
${l.right}px ${l.bottom}px,
|
|
19
|
+
${l.right}px ${l.top}px,
|
|
20
|
+
${l.left}px ${l.top}px
|
|
21
|
+
)`}return w.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})}),fB=O.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:s}=qo(),l=s.useState("mounted"),a=s.useState("modal");return l||r?w.jsx(aB.Provider,{value:r,children:w.jsxs(Eb,{ref:n,...i,children:[l&&a===!0&&w.jsx(Mb,{ref:s.context.internalBackdropRef,inert:Pb(!open)}),t.children]})}):null});let jL={},DL={},IL="";function zJ(e){if(typeof document>"u")return!1;const t=ri(e);return Wn(t).innerWidth-t.documentElement.clientWidth>0}function HJ(e){const t=ri(e),n=t.documentElement,r=t.body,i=Rc(n)?n:r,s=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=s}}function $J(e){const t=ri(e),n=t.documentElement,r=t.body,i=Wn(n);let s=0,l=0;const a=Hs.create(),c=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(bk&&(i.visualViewport?.scale??1)!==1)return()=>{};function u(){const p=i.getComputedStyle(n),v=i.getComputedStyle(r),g=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,l=n.scrollLeft,jL={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},IL=n.style.scrollBehavior,DL={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};const b=n.scrollHeight>n.clientHeight,y=n.scrollWidth>n.clientWidth,_=p.overflowY==="scroll"||v.overflowY==="scroll",T=p.overflowX==="scroll"||v.overflowX==="scroll",E=Math.max(0,i.innerWidth-n.clientWidth),k=Math.max(0,i.innerHeight-n.clientHeight),A=parseFloat(v.marginTop)+parseFloat(v.marginBottom),R=parseFloat(v.marginLeft)+parseFloat(v.marginRight),L=Rc(n)?n:r;if(c){n.style.scrollbarGutter=g,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:g,overflowY:"hidden",overflowX:"hidden"}),(b||_)&&(n.style.overflowY="scroll"),(y||T)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||k?`calc(100dvh - ${A+k}px)`:"100dvh",width:R||E?`calc(100vw - ${R+E}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,jL),Object.assign(r.style,DL),c||(n.scrollTop=s,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=IL)}function f(){h(),a.request(u)}return u(),i.addEventListener("resize",f),()=>{a.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",f)}}class FJ{lockCount=0;restore=null;timeoutLock=Sc.create();timeoutUnlock=Sc.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=ri(t).documentElement,i=Wn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=wn;return}const s=iQ||!zJ(t);this.restore=s?HJ(t):$J(t)}}const UJ=new FJ;function Lb(e=!0,t=null){Fe(()=>{if(e)return UJ.acquire(t)},[e,t])}function VJ(e){const t=O.useRef(""),n=O.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:O.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function jb(e){const[t,n]=O.useState(null),r=Ne((a,c)=>{e||n(c)}),i=O.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:l}=VJ(r);return O.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:s,onPointerDown:l}}),[t,i,s,l])}function hB(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),s=t.useState("disablePointerDismissal"),l=t.useState("modal"),a=t.useState("popupElement"),{openMethod:c,triggerProps:u,reset:h}=jb(i);eB(t);const{forceUnmount:f}=tB(i,t,()=>{h()}),p=Ne(z=>{const D=qe(z);return D.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},D}),v=O.useCallback(()=>{t.setOpen(!1,p(c7))},[t,p]);O.useImperativeHandle(r,()=>({unmount:f,close:v}),[f,v]);const S=iB({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,g]=O.useState(0),b=x===0,y=oB(S),_=Ob(S,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(z){if("button"in z&&z.button!==0||"touches"in z&&z.touches.length!==1)return!1;const D=sr(z);if(b&&!s){const $=D;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===$||t.context.backdropRef.current===$||gt($,a)&&!$?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:b});Lb(i&&l===!0,a);const{getReferenceProps:T,getFloatingProps:E,getTriggerProps:k}=Id([y,_]);t.useContextCallback("onNestedDialogOpen",z=>{g(z+1)}),t.useContextCallback("onNestedDialogClose",()=>{g(0)}),O.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const A=O.useMemo(()=>T(u),[T,u]),R=O.useMemo(()=>k(u),[k,u]),L=O.useMemo(()=>E(),[E]);t.useSyncedValues({openMethod:c,activeTriggerProps:A,inactiveTriggerProps:R,popupProps:L,floatingRootContext:S,nestedOpenDialogCount:x})}const qJ={...rB,modal:Re(e=>e.modal),nested:Re(e=>e.nested),nestedOpenDialogCount:Re(e=>e.nestedOpenDialogCount),disablePointerDismissal:Re(e=>e.disablePointerDismissal),openMethod:Re(e=>e.openMethod),descriptionElementId:Re(e=>e.descriptionElementId),titleElementId:Re(e=>e.titleElementId),viewportElement:Re(e=>e.viewportElement),role:Re(e=>e.role)};class pB extends Rk{constructor(t){super(WJ(t),{popupRef:O.createRef(),backdropRef:O.createRef(),internalBackdropRef:O.createRef(),triggerElements:new Rb,onOpenChange:void 0,onOpenChangeComplete:void 0},qJ)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},s=n.trigger?.id??null;(s||t)&&(i.activeTriggerId=s,i.activeTriggerElement=n.trigger??null),this.update(i)}}function WJ(e={}){return{...nB(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function GJ(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,disablePointerDismissal:l=!1,modal:a=!0,actionsRef:c,handle:u,triggerId:h,defaultTriggerId:f=null}=e,p=qo(!0),v=!!p,S=Cr(()=>u?.store??new pB({open:n??r,activeTriggerId:h!==void 0?h:f,modal:a,disablePointerDismissal:l,nested:v})).current;S.useControlledProp("open",n,r),S.useControlledProp("activeTriggerId",h,f),S.useSyncedValues({disablePointerDismissal:l,nested:v,modal:a}),S.useContextCallback("onOpenChange",i),S.useContextCallback("onOpenChangeComplete",s);const x=S.useState("payload");hB({store:S,actionsRef:c,parentContext:p?.store.context});const g=O.useMemo(()=>({store:S}),[S]);return w.jsx(mk.Provider,{value:g,children:typeof t=="function"?t({payload:x}):t})}const mB=O.forwardRef(function(t,n){const{render:r,className:i,id:s,...l}=t,{store:a}=qo(),c=Vr(s);return a.useSyncedValueWithCleanup("titleElementId",c),ut("h2",t,{ref:n,props:[{id:c},l]})}),gB=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,id:a,payload:c,handle:u,...h}=t,f=qo(!0),p=u?.store??f?.store;if(!p)throw new Error(Ut(79));const v=Vr(a),S=p.useState("floatingRootContext"),x=p.useState("isOpenedByTrigger",v),g=O.useRef(null),{registerTrigger:b,isMountedByThisTrigger:y}=J7(v,g,p,{payload:c}),{getButtonProps:_,buttonRef:T}=ii({disabled:s,native:l}),E=Wp(S,{enabled:S!=null}),k=Id([E]),A=O.useMemo(()=>({disabled:s,open:x}),[s,x]),R=p.useState("triggerProps",y);return ut("button",t,{state:A,ref:[T,n,b,g],props:[k.getReferenceProps(),R,{[B9]:"",id:v},h,_],stateAttributesMapping:gk})});function bs({...e}){return w.jsx(GJ,{"data-slot":"dialog",...e})}function vB({...e}){return w.jsx(gB,{"data-slot":"dialog-trigger",...e})}function KJ({...e}){return w.jsx(fB,{"data-slot":"dialog-portal",...e})}function Dk({...e}){return w.jsx(Cb,{"data-slot":"dialog-close",...e})}function YJ({className:e,...t}){return w.jsx(a7,{"data-slot":"dialog-overlay",className:Be("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function _s({className:e,children:t,showCloseButton:n=!0,...r}){return w.jsxs(KJ,{children:[w.jsx(YJ,{}),w.jsxs(dB,{"data-slot":"dialog-content",className:Be("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r,children:[t,n&&w.jsxs(Cb,{"data-slot":"dialog-close",render:w.jsx(ze,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[w.jsx(be,{icon:Cs,strokeWidth:2}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function $s({className:e,...t}){return w.jsx("div",{"data-slot":"dialog-header",className:Be("gap-1 flex flex-col",e),...t})}function Va({className:e,showCloseButton:t=!1,children:n,...r}){return w.jsxs("div",{"data-slot":"dialog-footer",className:Be("gap-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&w.jsx(Cb,{render:w.jsx(ze,{variant:"outline"}),children:"Close"})]})}function Fs({className:e,...t}){return w.jsx(mB,{"data-slot":"dialog-title",className:Be("text-sm font-medium",e),...t})}function Gl({className:e,...t}){return w.jsx(u7,{"data-slot":"dialog-description",className:Be("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3",e),...t})}let NL=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const XJ={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jc={valid(e){return e===null?null:e?{[NL.valid]:""}:{[NL.invalid]:""}}},QJ=O.createContext({invalid:void 0,name:void 0,validityData:{state:XJ,errors:[],error:"",value:"",initialValue:null},setValidityData:wn,disabled:void 0,touched:!1,setTouched:wn,dirty:!1,setDirty:wn,filled:!1,setFilled:wn,focused:!1,setFocused:wn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=yn)=>e,getInputValidationProps:(e=yn)=>e,inputRef:{current:null},commit:async()=>{}}});function rs(e=!0){const t=O.useContext(QJ);if(t.setValidityData===wn&&!e)throw new Error(Ut(28));return t}const ZJ=O.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:wn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Yp(){return O.useContext(ZJ)}const JJ=O.createContext({controlId:void 0,setControlId:wn,labelId:void 0,setLabelId:wn,messageIds:[],setMessageIds:wn,getDescriptionProps:e=>e});function nl(){return O.useContext(JJ)}function eee(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Zi({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=O.useRef(e!==void 0),[s,l]=O.useState(t),a=i?e:s,c=O.useCallback(u=>{i||l(u)},[]);return[a,c]}function Db(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:s}=nl(),l=Vr(t);return Fe(()=>{if(!(!n&&!t||s===wn)){if(n){const a=r?.current;Kt(a)&&a.closest("label")!=null?s(t??null):s(i??l)}else t&&s(t);return()=>{t&&s(void 0)}}},[t,r,i,s,n,l]),i??l}function Xp(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:s,commit:l}=e,{formRef:a}=Yp(),{invalid:c,markedDirtyRef:u,validityData:h,setValidityData:f}=rs(),p=Ne(e.getValue);Fe(()=>{if(!t)return;let v=n;v===void 0&&(v=p()),h.initialValue===null&&v!==null&&f(S=>({...S,initialValue:v}))},[t,f,n,h.initialValue,p]),Fe(()=>{!t||!r||a.current.fields.set(r,{getValue:p,name:i,controlRef:s,validityData:eee(h,c),validate(){let v=n;v===void 0&&(v=p()),u.current=!0,Ir.flushSync(()=>l(v))}})},[l,s,t,a,p,r,c,u,i,h,n]),Fe(()=>{const v=a.current.fields;return()=>{r&&v.delete(r)}},[a,r])}const tee=O.forwardRef(function(t,n){const{render:r,className:i,id:s,name:l,value:a,disabled:c=!1,onValueChange:u,defaultValue:h,...f}=t,{state:p,name:v,disabled:S}=rs(),x=S||c,g=v??l,b=O.useMemo(()=>({...p,disabled:x}),[p,x]),{setTouched:y,setDirty:_,validityData:T,setFocused:E,setFilled:k,validationMode:A,validation:R}=rs(),{labelId:L}=nl(),z=Db({id:s});Fe(()=>{const H=a!=null;R.inputRef.current?.value||H&&a!==""?k(!0):H&&a===""&&k(!1)},[R.inputRef,k,a]);const[D,$]=Zi({controlled:a,default:h,name:"FieldControl",state:"value"}),N=a!==void 0,F=Ne((H,K)=>{u?.(H,K),!K.isCanceled&&$(H)});return Xp({id:z,name:g,commit:R.commit,value:D,getValue:()=>R.inputRef.current?.value,controlRef:R.inputRef}),ut("input",t,{ref:n,state:b,props:[{id:z,disabled:x,name:g,ref:R.inputRef,"aria-labelledby":L,...N?{value:D}:{defaultValue:h},onChange(H){const K=H.currentTarget.value;F(K,qe(rr,H.nativeEvent)),_(K!==T.initialValue),k(K!=="")},onFocus(){E(!0)},onBlur(H){y(!0),E(!1),A==="onBlur"&&R.commit(H.currentTarget.value)},onKeyDown(H){H.currentTarget.tagName==="INPUT"&&H.key==="Enter"&&(y(!0),R.commit(H.currentTarget.value))}},R.getInputValidationProps(),f],stateAttributesMapping:jc})}),nee=O.createContext({disabled:!1});function ree(){return O.useContext(nee)}const iee=O.createContext(void 0);function see(e=!0){const t=O.useContext(iee);if(t===void 0&&!e)throw new Error(Ut(3));return t}const oee=O.forwardRef(function(t,n){return w.jsx(tee,{ref:n,...t})});function nn({className:e,type:t,...n}){return w.jsx(oee,{type:t,"data-slot":"input",className:Be("bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 rounded-md border px-2 py-0.5 text-sm transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function Ik({className:e,...t}){return w.jsx("textarea",{"data-slot":"textarea",className:Be("border-input bg-input/20 dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 resize-none rounded-md border px-2 py-2 text-sm transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})}async function yB(e){const t=new FormData;t.append("file",e);const n=await fetch("/api/uploads",{method:"POST",body:t});if(!n.ok)throw new Error("Failed to upload image");return(await n.json()).path}function aee(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const lee=e=>{switch(e){case"success":return dee;case"info":return hee;case"warning":return fee;case"error":return pee;default:return null}},cee=Array(12).fill(0),uee=({visible:e,className:t})=>oe.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},oe.createElement("div",{className:"sonner-spinner"},cee.map((n,r)=>oe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dee=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),fee=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hee=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pee=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mee=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},oe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),oe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gee=()=>{const[e,t]=oe.useState(document.hidden);return oe.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let o2=1;class vee{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:o2++,l=this.toasts.find(c=>c.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:a,title:r}):c):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,l;const a=i.then(async u=>{if(l=["resolve",u],oe.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(bee(u)&&!u.ok){s=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,S=typeof f=="object"&&!oe.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...S})}else if(u instanceof Error){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,S=typeof f=="object"&&!oe.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...S})}else if(n.success!==void 0){s=!1;const f=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,S=typeof f=="object"&&!oe.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...S})}}).catch(async u=>{if(l=["reject",u],n.error!==void 0){s=!1;const h=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,v=typeof h=="object"&&!oe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:f,...v})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,h)=>a.then(()=>l[0]==="reject"?h(l[1]):u(l[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||o2++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Jr=new vee,yee=(e,t)=>{const n=t?.id||o2++;return Jr.addToast({title:e,...t,id:n}),n},bee=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_ee=yee,xee=()=>Jr.toasts,See=()=>Jr.getActiveToasts(),ei=Object.assign(_ee,{success:Jr.success,info:Jr.info,warning:Jr.warning,error:Jr.error,custom:Jr.custom,message:Jr.message,promise:Jr.promise,dismiss:Jr.dismiss,loading:Jr.loading},{getHistory:xee,getToasts:See});aee("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function qg(e){return e.label!==void 0}const wee=3,Cee="24px",Eee="16px",BL=4e3,Tee=356,kee=14,Oee=45,Ree=200;function js(...e){return e.filter(Boolean).join(" ")}function Aee(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Pee=e=>{var t,n,r,i,s,l,a,c,u;const{invert:h,toast:f,unstyled:p,interacting:v,setHeights:S,visibleToasts:x,heights:g,index:b,toasts:y,expanded:_,removeToast:T,defaultRichColors:E,closeButton:k,style:A,cancelButtonStyle:R,actionButtonStyle:L,className:z="",descriptionClassName:D="",duration:$,position:N,gap:F,expandByDefault:U,classNames:H,icons:K,closeButtonAriaLabel:W="Close toast"}=e,[I,G]=oe.useState(null),[j,B]=oe.useState(null),[V,X]=oe.useState(!1),[re,ie]=oe.useState(!1),[Q,Y]=oe.useState(!1),[J,ee]=oe.useState(!1),[ne,te]=oe.useState(!1),[le,fe]=oe.useState(0),[pe,de]=oe.useState(0),ue=oe.useRef(f.duration||$||BL),Ie=oe.useRef(null),Le=oe.useRef(null),we=b===0,_e=b+1<=x,Pe=f.type,me=f.dismissible!==!1,Ae=f.className||"",Te=f.descriptionClassName||"",We=oe.useMemo(()=>g.findIndex(nt=>nt.toastId===f.id)||0,[g,f.id]),rt=oe.useMemo(()=>{var nt;return(nt=f.closeButton)!=null?nt:k},[f.closeButton,k]),Ue=oe.useMemo(()=>f.duration||$||BL,[f.duration,$]),ot=oe.useRef(0),tt=oe.useRef(0),mt=oe.useRef(0),Ee=oe.useRef(null),[xe,Ce]=N.split("-"),it=oe.useMemo(()=>g.reduce((nt,zt,qt)=>qt>=We?nt:nt+zt.height,0),[g,We]),dt=gee(),Ze=f.invert||h,at=Pe==="loading";tt.current=oe.useMemo(()=>We*F+it,[We,it]),oe.useEffect(()=>{ue.current=Ue},[Ue]),oe.useEffect(()=>{X(!0)},[]),oe.useEffect(()=>{const nt=Le.current;if(nt){const zt=nt.getBoundingClientRect().height;return de(zt),S(qt=>[{toastId:f.id,height:zt,position:f.position},...qt]),()=>S(qt=>qt.filter(ct=>ct.toastId!==f.id))}},[S,f.id]),oe.useLayoutEffect(()=>{if(!V)return;const nt=Le.current,zt=nt.style.height;nt.style.height="auto";const qt=nt.getBoundingClientRect().height;nt.style.height=zt,de(qt),S(ct=>ct.find(Et=>Et.toastId===f.id)?ct.map(Et=>Et.toastId===f.id?{...Et,height:qt}:Et):[{toastId:f.id,height:qt,position:f.position},...ct])},[V,f.title,f.description,S,f.id,f.jsx,f.action,f.cancel]);const Ot=oe.useCallback(()=>{ie(!0),fe(tt.current),S(nt=>nt.filter(zt=>zt.toastId!==f.id)),setTimeout(()=>{T(f)},Ree)},[f,T,S,tt]);oe.useEffect(()=>{if(f.promise&&Pe==="loading"||f.duration===1/0||f.type==="loading")return;let nt;return _||v||dt?(()=>{if(mt.current<ot.current){const ct=new Date().getTime()-ot.current;ue.current=ue.current-ct}mt.current=new Date().getTime()})():ue.current!==1/0&&(ot.current=new Date().getTime(),nt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ot()},ue.current)),()=>clearTimeout(nt)},[_,v,f,Pe,dt,Ot]),oe.useEffect(()=>{f.delete&&(Ot(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ot,f.delete]);function ft(){var nt;if(K?.loading){var zt;return oe.createElement("div",{className:js(H?.loader,f==null||(zt=f.classNames)==null?void 0:zt.loader,"sonner-loader"),"data-visible":Pe==="loading"},K.loading)}return oe.createElement(uee,{className:js(H?.loader,f==null||(nt=f.classNames)==null?void 0:nt.loader),visible:Pe==="loading"})}const _n=f.icon||K?.[Pe]||lee(Pe);var Lt,xt;return oe.createElement("li",{tabIndex:0,ref:Le,className:js(z,Ae,H?.toast,f==null||(t=f.classNames)==null?void 0:t.toast,H?.default,H?.[Pe],f==null||(n=f.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(Lt=f.richColors)!=null?Lt:E,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":V,"data-promise":!!f.promise,"data-swiped":ne,"data-removed":re,"data-visible":_e,"data-y-position":xe,"data-x-position":Ce,"data-index":b,"data-front":we,"data-swiping":Q,"data-dismissible":me,"data-type":Pe,"data-invert":Ze,"data-swipe-out":J,"data-swipe-direction":j,"data-expanded":!!(_||U&&V),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${re?le:tt.current}px`,"--initial-height":U?"auto":`${pe}px`,...A,...f.style},onDragEnd:()=>{Y(!1),G(null),Ee.current=null},onPointerDown:nt=>{nt.button!==2&&(at||!me||(Ie.current=new Date,fe(tt.current),nt.target.setPointerCapture(nt.pointerId),nt.target.tagName!=="BUTTON"&&(Y(!0),Ee.current={x:nt.clientX,y:nt.clientY})))},onPointerUp:()=>{var nt,zt,qt;if(J||!me)return;Ee.current=null;const ct=Number(((nt=Le.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rt=Number(((zt=Le.current)==null?void 0:zt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Et=new Date().getTime()-((qt=Ie.current)==null?void 0:qt.getTime()),Tt=I==="x"?ct:Rt,Je=Math.abs(Tt)/Et;if(Math.abs(Tt)>=Oee||Je>.11){fe(tt.current),f.onDismiss==null||f.onDismiss.call(f,f),B(I==="x"?ct>0?"right":"left":Rt>0?"down":"up"),Ot(),ee(!0);return}else{var Zt,Yn;(Zt=Le.current)==null||Zt.style.setProperty("--swipe-amount-x","0px"),(Yn=Le.current)==null||Yn.style.setProperty("--swipe-amount-y","0px")}te(!1),Y(!1),G(null)},onPointerMove:nt=>{var zt,qt,ct;if(!Ee.current||!me||((zt=window.getSelection())==null?void 0:zt.toString().length)>0)return;const Et=nt.clientY-Ee.current.y,Tt=nt.clientX-Ee.current.x;var Je;const Zt=(Je=e.swipeDirections)!=null?Je:Aee(N);!I&&(Math.abs(Tt)>1||Math.abs(Et)>1)&&G(Math.abs(Tt)>Math.abs(Et)?"x":"y");let Yn={x:0,y:0};const Er=mr=>1/(1.5+Math.abs(mr)/20);if(I==="y"){if(Zt.includes("top")||Zt.includes("bottom"))if(Zt.includes("top")&&Et<0||Zt.includes("bottom")&&Et>0)Yn.y=Et;else{const mr=Et*Er(Et);Yn.y=Math.abs(mr)<Math.abs(Et)?mr:Et}}else if(I==="x"&&(Zt.includes("left")||Zt.includes("right")))if(Zt.includes("left")&&Tt<0||Zt.includes("right")&&Tt>0)Yn.x=Tt;else{const mr=Tt*Er(Tt);Yn.x=Math.abs(mr)<Math.abs(Tt)?mr:Tt}(Math.abs(Yn.x)>0||Math.abs(Yn.y)>0)&&te(!0),(qt=Le.current)==null||qt.style.setProperty("--swipe-amount-x",`${Yn.x}px`),(ct=Le.current)==null||ct.style.setProperty("--swipe-amount-y",`${Yn.y}px`)}},rt&&!f.jsx&&Pe!=="loading"?oe.createElement("button",{"aria-label":W,"data-disabled":at,"data-close-button":!0,onClick:at||!me?()=>{}:()=>{Ot(),f.onDismiss==null||f.onDismiss.call(f,f)},className:js(H?.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(xt=K?.close)!=null?xt:mee):null,(Pe||f.icon||f.promise)&&f.icon!==null&&(K?.[Pe]!==null||f.icon)?oe.createElement("div",{"data-icon":"",className:js(H?.icon,f==null||(i=f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ft():null,f.type!=="loading"?_n:null):null,oe.createElement("div",{"data-content":"",className:js(H?.content,f==null||(s=f.classNames)==null?void 0:s.content)},oe.createElement("div",{"data-title":"",className:js(H?.title,f==null||(l=f.classNames)==null?void 0:l.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?oe.createElement("div",{"data-description":"",className:js(D,Te,H?.description,f==null||(a=f.classNames)==null?void 0:a.description)},typeof f.description=="function"?f.description():f.description):null),oe.isValidElement(f.cancel)?f.cancel:f.cancel&&qg(f.cancel)?oe.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:nt=>{qg(f.cancel)&&me&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,nt),Ot())},className:js(H?.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,oe.isValidElement(f.action)?f.action:f.action&&qg(f.action)?oe.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||L,onClick:nt=>{qg(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,nt),!nt.defaultPrevented&&Ot())},className:js(H?.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function zL(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Mee(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",a=s?Eee:Cee;function c(u){["top","right","bottom","left"].forEach(h=>{n[`${l}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${l}-${u}`]=a:n[`${l}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),n}const Lee=oe.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:a,closeButton:c,className:u,offset:h,mobileOffset:f,theme:p="light",richColors:v,duration:S,style:x,visibleToasts:g=wee,toastOptions:b,dir:y=zL(),gap:_=kee,icons:T,containerAriaLabel:E="Notifications"}=t,[k,A]=oe.useState([]),R=oe.useMemo(()=>r?k.filter(V=>V.toasterId===r):k.filter(V=>!V.toasterId),[k,r]),L=oe.useMemo(()=>Array.from(new Set([s].concat(R.filter(V=>V.position).map(V=>V.position)))),[R,s]),[z,D]=oe.useState([]),[$,N]=oe.useState(!1),[F,U]=oe.useState(!1),[H,K]=oe.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=oe.useRef(null),I=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=oe.useRef(null),j=oe.useRef(!1),B=oe.useCallback(V=>{A(X=>{var re;return(re=X.find(ie=>ie.id===V.id))!=null&&re.delete||Jr.dismiss(V.id),X.filter(({id:ie})=>ie!==V.id)})},[]);return oe.useEffect(()=>Jr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{A(X=>X.map(re=>re.id===V.id?{...re,delete:!0}:re))});return}setTimeout(()=>{WG.flushSync(()=>{A(X=>{const re=X.findIndex(ie=>ie.id===V.id);return re!==-1?[...X.slice(0,re),{...X[re],...V},...X.slice(re+1)]:[V,...X]})})})}),[k]),oe.useEffect(()=>{if(p!=="system"){K(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:X})=>{K(X?"dark":"light")})}catch{V.addListener(({matches:re})=>{try{K(re?"dark":"light")}catch(ie){console.error(ie)}})}},[p]),oe.useEffect(()=>{k.length<=1&&N(!1)},[k]),oe.useEffect(()=>{const V=X=>{var re;if(l.every(Y=>X[Y]||X.code===Y)){var Q;N(!0),(Q=W.current)==null||Q.focus()}X.code==="Escape"&&(document.activeElement===W.current||(re=W.current)!=null&&re.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),oe.useEffect(()=>{if(W.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,j.current=!1)}},[W.current]),oe.createElement("section",{ref:n,"aria-label":`${E} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((V,X)=>{var re;const[ie,Q]=V.split("-");return R.length?oe.createElement("ol",{key:V,dir:y==="auto"?zL():y,tabIndex:-1,ref:W,className:u,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":ie,"data-x-position":Q,style:{"--front-toast-height":`${((re=z[0])==null?void 0:re.height)||0}px`,"--width":`${Tee}px`,"--gap":`${_}px`,...x,...Mee(h,f)},onBlur:Y=>{j.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(j.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||j.current||(j.current=!0,G.current=Y.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{F||N(!1)},onDragEnd:()=>N(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},R.filter(Y=>!Y.position&&X===0||Y.position===V).map((Y,J)=>{var ee,ne;return oe.createElement(Pee,{key:Y.id,icons:T,index:J,toast:Y,defaultRichColors:v,duration:(ee=b?.duration)!=null?ee:S,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:i,visibleToasts:g,closeButton:(ne=b?.closeButton)!=null?ne:c,interacting:F,position:V,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:B,toasts:R.filter(te=>te.position==Y.position),heights:z.filter(te=>te.position==Y.position),setHeights:D,expandByDefault:a,gap:_,expanded:$,swipeDirections:t.swipeDirections})})):null}))});function jee(e){const t=/\/[\w\-/.]+\.(png|jpg|jpeg|gif|webp|svg)/gi;return[...e.match(t)||[]]}function HL(e){return`/api/uploads/${e.split("/").pop()}`}function bB({value:e,onValueChange:t,className:n,disabled:r,...i}){const[s,l]=O.useState(!1),a=O.useRef(null),c=jee(e),u=async h=>{const f=h.clipboardData?.items;if(f){for(const p of f)if(p.type.startsWith("image/")){h.preventDefault();const v=p.getAsFile();if(!v)return;l(!0);try{const S=await yB(v),x=a.current;if(x){const g=x.selectionStart,b=x.selectionEnd,y=e.slice(0,g),_=e.slice(b),T=y&&!y.endsWith(`
|
|
22
|
+
`)?`
|
|
23
|
+
`:"",E=_&&!_.startsWith(`
|
|
24
|
+
`)?`
|
|
25
|
+
`:"",k=y+T+S+E+_;t(k)}else t(e+(e?`
|
|
26
|
+
`:"")+S)}catch(S){ei.error("Failed to upload image"),console.error("Upload error:",S)}finally{l(!1)}return}}};return w.jsxs("div",{className:"space-y-2",children:[w.jsxs("div",{className:"relative",children:[w.jsx(Ik,{ref:a,value:e,onChange:h=>t(h.target.value),onPaste:u,className:Be(s&&"opacity-50",n),disabled:s||r,...i}),s&&w.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 rounded-md",children:w.jsx("span",{className:"text-sm text-muted-foreground",children:"Uploading..."})})]}),c.length>0&&w.jsx("div",{className:"flex flex-wrap gap-2",children:c.map((h,f)=>w.jsx("a",{href:HL(h),target:"_blank",rel:"noopener noreferrer",className:"block",children:w.jsx("img",{src:HL(h),alt:`Attachment ${f+1}`,className:"h-16 w-auto rounded border object-cover hover:opacity-80 transition-opacity"})},f))})]})}function Dee({className:e,...t}){return w.jsx("label",{"data-slot":"label",className:Be("gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}const Iee=O.forwardRef(function(t,n){const{className:r,render:i,orientation:s="horizontal",...l}=t,a=O.useMemo(()=>({orientation:s}),[s]);return ut("div",t,{state:a,ref:n,props:[{role:"separator","aria-orientation":s},l]})});function Nee({className:e,orientation:t="horizontal",...n}){return w.jsx(Iee,{"data-slot":"separator",orientation:t,className:Be("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch",e),...n})}function Qp({className:e,...t}){return w.jsx("div",{"data-slot":"field-group",className:Be("gap-4 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col",e),...t})}const Bee=Ac("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Un({className:e,orientation:t="vertical",...n}){return w.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:Be(Bee({orientation:t}),e),...n})}function Vn({className:e,...t}){return w.jsx(Dee,{"data-slot":"field-label",className:Be("has-data-checked:bg-primary/5 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function La({className:e,...t}){return w.jsx("p",{"data-slot":"field-description",className:Be("text-muted-foreground text-left text-xs/relaxed [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function _B(e){const t=O.useRef(!0);t.current&&(t.current=!1,e())}const xB=O.createContext(null),SB=O.createContext(null);function to(){const e=O.useContext(xB);if(e===null)throw new Error(Ut(60));return e}function wB(){const e=O.useContext(SB);if(e===null)throw new Error(Ut(61));return e}const CB=(e,t)=>Object.is(e,t);function zo(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Kl(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:zo(r,t,n))}function nd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:zo(r,t,n))}function EB(e,t,n){return e.filter(r=>!zo(r,t,n))}function a2(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function TB(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function tr(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 a2(e)}function gs(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?a2(e.value):a2(e)}function zee(e,t,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 t[e]??tr(e,n);if(Array.isArray(t)){const r=TB(t)?t.flatMap(i=>i.items):t;if(e==null){const i=r.find(s=>s.value==null);return i&&i.label!=null?i.label:tr(e,n)}if(typeof e!="object"){const i=r.find(s=>s&&s.value===e);return i&&i.label!=null?i.label:tr(e,n)}if("value"in e){const i=r.find(s=>s&&s.value===e.value);if(i&&i.label!=null)return i.label}}return tr(e,n)}function Hee(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>tr(n,t)).join(", ")}const vt={id:Re(e=>e.id),modal:Re(e=>e.modal),multiple:Re(e=>e.multiple),items:Re(e=>e.items),itemToStringLabel:Re(e=>e.itemToStringLabel),itemToStringValue:Re(e=>e.itemToStringValue),isItemEqualToValue:Re(e=>e.isItemEqualToValue),value:Re(e=>e.value),open:Re(e=>e.open),mounted:Re(e=>e.mounted),forceMount:Re(e=>e.forceMount),transitionStatus:Re(e=>e.transitionStatus),openMethod:Re(e=>e.openMethod),activeIndex:Re(e=>e.activeIndex),selectedIndex:Re(e=>e.selectedIndex),isActive:Re((e,t)=>e.activeIndex===t),isSelected:Re((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(s=>zo(s,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:zo(i,n,r)}),isSelectedByFocus:Re((e,t)=>e.selectedIndex===t),popupProps:Re(e=>e.popupProps),triggerProps:Re(e=>e.triggerProps),triggerElement:Re(e=>e.triggerElement),positionerElement:Re(e=>e.positionerElement),listElement:Re(e=>e.listElement),scrollUpArrowVisible:Re(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Re(e=>e.scrollDownArrowVisible),hasScrollArrows:Re(e=>e.hasScrollArrows),serializedValue:Re(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":gs(n,r)})};function Yl(e,t){const n=O.useRef(e),r=Ne(t);Fe(()=>{n.current!==e&&r(n.current)},[e,r]),Fe(()=>{n.current=e},[e])}function $ee(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:s,defaultOpen:l=!1,onOpenChange:a,name:c,disabled:u=!1,readOnly:h=!1,required:f=!1,modal:p=!0,actionsRef:v,inputRef:S,onOpenChangeComplete:x,items:g,multiple:b=!1,itemToStringLabel:y,itemToStringValue:_,isItemEqualToValue:T=CB,highlightItemOnHover:E=!0,children:k}=e,{clearErrors:A}=Yp(),{setDirty:R,shouldValidateOnChange:L,validityData:z,setFilled:D,name:$,disabled:N,validation:F}=rs(),{controlId:U}=nl(),H=Db({id:t}),K=N||u,W=$??c,[I,G]=Zi({controlled:n,default:b?r??ti:r,name:"Select",state:"value"}),[j,B]=Zi({controlled:s,default:l,name:"Select",state:"open"}),V=O.useRef([]),X=O.useRef([]),re=O.useRef(null),ie=O.useRef(null),Q=O.useRef(0),Y=O.useRef(null),J=O.useRef([]),ee=O.useRef(!1),ne=O.useRef(!1),te=O.useRef(null),le=O.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),fe=O.useRef(!1),{mounted:pe,setMounted:de,transitionStatus:ue}=Go(j),{openMethod:Ie,triggerProps:Le,reset:we}=jb(j),_e=Cr(()=>new lc({id:H,modal:p,multiple:b,itemToStringLabel:y,itemToStringValue:_,isItemEqualToValue:T,value:I,open:j,mounted:pe,transitionStatus:ue,items:g,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Pe=De(_e,vt.activeIndex),me=De(_e,vt.selectedIndex),Ae=De(_e,vt.triggerElement),Te=De(_e,vt.positionerElement),We=O.useMemo(()=>b&&Array.isArray(I)&&I.length===0?"":gs(I,_),[b,I,_]),rt=O.useMemo(()=>b&&Array.isArray(I)?I.map(ct=>gs(ct,_)):gs(I,_),[b,I,_]),Ue=Mn(_e.state.triggerElement);Xp({id:H,commit:F.commit,value:I,controlRef:Ue,name:W,getValue:()=>rt});const ot=O.useRef(I);Fe(()=>{I!==ot.current&&_e.set("forceMount",!0)},[_e,I]),Fe(()=>{D(I!==null)},[I,D]),Fe(function(){if(j)return;const Rt=J.current;if(b){const Tt=Array.isArray(I)?I:[];if(Tt.length===0){_e.set("selectedIndex",null);return}const Je=Tt[Tt.length-1],Zt=nd(Rt,Je,T);_e.set("selectedIndex",Zt===-1?null:Zt);return}const Et=nd(Rt,I,T);_e.set("selectedIndex",Et===-1?null:Et)},[b,j,I,J,T,_e]),Yl(I,()=>{A(W),R(I!==z.initialValue),L()?F.commit(I):F.commit(I,!0)});const tt=Ne((ct,Rt)=>{if(a?.(ct,Rt),!Rt.isCanceled&&(B(ct),!ct&&_e.state.activeIndex!==null)){const Et=V.current[_e.state.activeIndex];queueMicrotask(()=>{Et?.setAttribute("tabindex","-1")})}}),mt=Ne(()=>{de(!1),_e.set("activeIndex",null),we(),x?.(!1)});Ri({enabled:!v,open:j,ref:re,onComplete(){j||mt()}}),O.useImperativeHandle(v,()=>({unmount:mt}),[mt]);const Ee=Ne((ct,Rt)=>{i?.(ct,Rt),!Rt.isCanceled&&G(ct)}),xe=Ne(()=>{const ct=_e.state.listElement||re.current;if(!ct)return;const Rt=ct.scrollTop,Et=ct.scrollTop+ct.clientHeight,Tt=Rt>1,Je=Et<ct.scrollHeight-1;_e.state.scrollUpArrowVisible!==Tt&&_e.set("scrollUpArrowVisible",Tt),_e.state.scrollDownArrowVisible!==Je&&_e.set("scrollDownArrowVisible",Je)}),Ce=Pk({open:j,onOpenChange:tt,elements:{reference:Ae,floating:Te}}),it=Wp(Ce,{enabled:!h&&!K,event:"mousedown"}),dt=Ob(Ce,{bubbles:!1}),Ze=Mk(Ce,{enabled:!h&&!K,listRef:V,activeIndex:Pe,selectedIndex:me,disabledIndices:ti,onNavigate(ct){ct===null&&!j||_e.set("activeIndex",ct)},focusItemOnHover:!1}),at=Lk(Ce,{enabled:!h&&!K&&(j||!b),listRef:X,activeIndex:Pe,selectedIndex:me,onMatch(ct){j?_e.set("activeIndex",ct):Ee(J.current[ct],qe("none"))},onTypingChange(ct){ee.current=ct}}),{getReferenceProps:Ot,getFloatingProps:ft,getItemProps:_n}=Id([it,dt,Ze,at]),Lt=O.useMemo(()=>Qs(Ot(),Le),[Ot,Le]);_B(()=>{_e.update({popupProps:ft(),triggerProps:Lt})}),Fe(()=>{_e.update({id:H,modal:p,multiple:b,value:I,open:j,mounted:pe,transitionStatus:ue,popupProps:ft(),triggerProps:Lt,items:g,itemToStringLabel:y,itemToStringValue:_,isItemEqualToValue:T,openMethod:Ie})},[_e,H,p,b,I,j,pe,ue,ft,Lt,g,y,_,T,Ie]);const xt=O.useMemo(()=>({store:_e,name:W,required:f,disabled:K,readOnly:h,multiple:b,itemToStringLabel:y,itemToStringValue:_,highlightItemOnHover:E,setValue:Ee,setOpen:tt,listRef:V,popupRef:re,scrollHandlerRef:ie,handleScrollArrowVisibility:xe,scrollArrowsMountedCountRef:Q,getItemProps:_n,events:Ce.context.events,valueRef:Y,valuesRef:J,labelsRef:X,typingRef:ee,selectionRef:le,selectedItemTextRef:te,validation:F,onOpenChangeComplete:x,keyboardActiveRef:ne,alignItemWithTriggerActiveRef:fe,initialValueRef:ot}),[_e,W,f,K,h,b,y,_,E,Ee,tt,_n,Ce.context.events,F,x,xe]),nt=ns(S,F.inputRef),zt=b&&Array.isArray(I)&&I.length>0,qt=O.useMemo(()=>!b||!Array.isArray(I)||!W?null:I.map(ct=>{const Rt=gs(ct,_);return w.jsx("input",{type:"hidden",name:W,value:Rt},Rt)}),[b,I,W,_]);return w.jsx(xB.Provider,{value:xt,children:w.jsxs(SB.Provider,{value:Ce,children:[k,w.jsx("input",{...F.getInputValidationProps({onFocus(){_e.state.triggerElement?.focus()},onChange(ct){if(ct.nativeEvent.defaultPrevented)return;const Rt=ct.target.value,Et=qe(rr,ct.nativeEvent);function Tt(){if(b)return;const Je=J.current.find(Zt=>gs(Zt,_).toLowerCase()===Rt.toLowerCase());Je!=null&&(R(Je!==z.initialValue),Ee(Je,Et),L()&&F.commit(Je))}_e.set("forceMount",!0),queueMicrotask(Tt)}}),id:t||U||void 0,name:b?void 0:W,value:We,disabled:K,required:f&&!zt,readOnly:h,ref:nt,style:Dd,tabIndex:-1,"aria-hidden":!0}),qt]})})}function Nk(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,l=parseFloat(n.height)||0,a=parseFloat(r.width)||0,c=parseFloat(r.height)||0,u=Math.max(t.width,s,a),h=Math.max(t.height,l,c),f=u-t.width,p=h-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-p/2,bottom:t.bottom+p/2}}const Wg=2,Fee={...Fh,...jc,value:()=>null},Uee=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,...a}=t,{setTouched:c,setFocused:u,validationMode:h,state:f,disabled:p}=rs(),{labelId:v}=nl(),{store:S,setOpen:x,selectionRef:g,validation:b,readOnly:y,alignItemWithTriggerActiveRef:_,disabled:T,keyboardActiveRef:E}=to(),k=p||T||s,A=De(S,vt.open),R=De(S,vt.value),L=De(S,vt.triggerProps),z=De(S,vt.positionerElement),D=De(S,vt.listElement),$=De(S,vt.serializedValue),N=Mn(z),F=O.useRef(null),U=mn(),H=mn(),{getButtonProps:K,buttonRef:W}=ii({disabled:k,native:l}),I=Ne(ie=>{S.set("triggerElement",ie)}),G=ns(n,F,W,I),j=mn(),B=mn();O.useEffect(()=>{if(A)return B.start(200,()=>{g.current.allowUnselectedMouseUp=!0,j.start(200,()=>{g.current.allowSelectedMouseUp=!0})}),()=>{j.clear(),B.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[A,g,H,j,B]);const V=O.useMemo(()=>D?.id??Uh(z)?.id,[D,z]),X=Qs(L,{role:"combobox","aria-expanded":A?"true":"false","aria-haspopup":"listbox","aria-controls":A?V:void 0,"aria-labelledby":v,"aria-readonly":y||void 0,tabIndex:k?-1:0,ref:G,onFocus(ie){u(!0),A&&_.current&&x(!1,qe(xc,ie.nativeEvent)),U.start(0,()=>{S.set("forceMount",!0)})},onBlur(){c(!0),u(!1),h==="onBlur"&&b.commit(R)},onPointerMove(){E.current=!1},onKeyDown(){E.current=!0},onMouseDown(ie){if(A)return;const Q=ri(ie.currentTarget);function Y(J){if(!F.current)return;const ee=J.target;if(gt(F.current,ee)||gt(N.current,ee)||ee===F.current)return;const ne=Nk(F.current);J.clientX>=ne.left-Wg&&J.clientX<=ne.right+Wg&&J.clientY>=ne.top-Wg&&J.clientY<=ne.bottom+Wg||x(!1,qe(l7,J))}H.start(0,()=>{Q.addEventListener("mouseup",Y,{once:!0})})}},b.getValidationProps,a,K);X.role="combobox";const re=O.useMemo(()=>({...f,open:A,disabled:k,value:R,readOnly:y,placeholder:!$}),[f,A,k,R,y,$]);return ut("button",t,{ref:[n,F],state:re,stateAttributesMapping:Fee,props:X})}),Vee={value:()=>null},qee=O.forwardRef(function(t,n){const{className:r,render:i,children:s,...l}=t,{store:a,valueRef:c}=to(),u=De(a,vt.value),h=De(a,vt.items),f=De(a,vt.itemToStringLabel),p=De(a,vt.serializedValue),v=O.useMemo(()=>({value:u,placeholder:!p}),[u,p]),S=typeof s=="function"?s(u):s??(Array.isArray(u)?Hee(u,f):zee(u,h,f));return ut("span",t,{state:v,ref:[n,c],props:[{children:S},l],stateAttributesMapping:Vee})}),Wee=O.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:l}=to(),a=De(l,vt.open),c=O.useMemo(()=>({open:a}),[a]);return ut("span",t,{state:c,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:gk})}),Gee=O.createContext(void 0),Kee=O.forwardRef(function(t,n){const{store:r}=to(),i=De(r,vt.mounted),s=De(r,vt.forceMount);return i||s?w.jsx(Gee.Provider,{value:!0,children:w.jsx(Eb,{ref:n,...t})}):null}),kB=O.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Yee(){return O.useContext(kB)}function Zp(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,s=Ne(i),l=O.useRef(0),a=Cr(Qee).current,c=Cr(Xee).current,[u,h]=O.useState(0),f=O.useRef(u),p=Ne((b,y)=>{c.set(b,y??null),f.current+=1,h(f.current)}),v=Ne(b=>{c.delete(b),f.current+=1,h(f.current)}),S=O.useMemo(()=>{const b=new Map;return Array.from(c.keys()).filter(_=>_.isConnected).sort(Zee).forEach((_,T)=>{const E=c.get(_)??{};b.set(_,{...E,index:T})}),b},[c,u]);Fe(()=>{if(typeof MutationObserver!="function"||S.size===0)return;const b=new MutationObserver(y=>{const _=new Set,T=E=>_.has(E)?_.delete(E):_.add(E);y.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),_.size===0&&(f.current+=1,h(f.current))});return S.forEach((y,_)=>{_.parentElement&&b.observe(_.parentElement,{childList:!0})}),()=>{b.disconnect()}},[S]),Fe(()=>{f.current===u&&(n.current.length!==S.size&&(n.current.length=S.size),r&&r.current.length!==S.size&&(r.current.length=S.size),l.current=S.size),s(S)},[s,S,n,r,u]),Fe(()=>()=>{n.current=[]},[n]),Fe(()=>()=>{r&&(r.current=[])},[r]);const x=Ne(b=>(a.add(b),()=>{a.delete(b)}));Fe(()=>{a.forEach(b=>b(S))},[a,S]);const g=O.useMemo(()=>({register:p,unregister:v,subscribeMapChange:x,elementsRef:n,labelsRef:r,nextIndexRef:l}),[p,v,x,n,r,l]);return w.jsx(kB.Provider,{value:g,children:t})}function Xee(){return new Map}function Qee(){return new Set}function Zee(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Jee=O.createContext(void 0);function Dc(){return O.useContext(Jee)?.direction??"ltr"}const ete=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:l,elements:a,middlewareData:c}=t,{element:u,padding:h=0,offsetParent:f="real"}=Bo(e,t)||{};if(u==null)return{};const p=x7(h),v={x:n,y:r},S=Ck(i),x=wk(S),g=await l.getDimensions(u),b=S==="y",y=b?"top":"left",_=b?"bottom":"right",T=b?"clientHeight":"clientWidth",E=s.reference[x]+s.reference[S]-v[S]-s.floating[x],k=v[S]-s.reference[S],A=f==="real"?await l.getOffsetParent?.(u):a.floating;let R=a.floating[T]||s.floating[x];(!R||!await l.isElement?.(A))&&(R=a.floating[T]||s.floating[x]);const L=E/2-k/2,z=R/2-g[x]/2-1,D=Math.min(p[y],z),$=Math.min(p[_],z),N=D,F=R-g[x]-$,U=R/2-g[x]/2+L,H=e2(N,U,F),K=!c.arrow&&el(i)!=null&&U!==H&&s.reference[x]/2-(U<N?D:$)-g[x]/2<0,W=K?U<N?U-N:U-F:0;return{[S]:v[S]+W,data:{[S]:H,centerOffset:U-H-W,...K&&{alignmentOffset:W}},reset:K}}}),tte=(e,t)=>({...ete(e),options:[e,t]}),nte={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,s=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await BZ().fn(e)).data?.referenceHidden||s}}}},rte={sideX:"left",sideY:"top"};function OB(e,t,n){const 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 $L(e,t,n){const{rects:r,placement:i}=e;return{side:OB(t,Ei(i),n),align:el(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Bk(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,collisionBoundary:a,collisionPadding:c=5,sticky:u=!1,arrowPadding:h=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:v,mounted:S,collisionAvoidance:x,shiftCrossAxis:g=!1,nodeId:b,adaptiveOrigin:y,lazyFlip:_=!1,externalTree:T}=e,[E,k]=O.useState(null);!S&&E!==null&&k(null);const A=x.side||"flip",R=x.align||"flip",L=x.fallbackAxisSide||"end",z=typeof t=="function"?t:void 0,D=Ne(z),$=z?D:t,N=Mn(t),U=Dc()==="rtl",H=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":U?"left":"right","inline-start":U?"right":"left"}[r],K=s==="center"?H:`${H}-${s}`;let W=c;const I=1,G=r==="bottom"?I:0,j=r==="top"?I:0,B=r==="right"?I:0,V=r==="left"?I:0;typeof W=="number"?W={top:W+G,right:W+V,bottom:W+j,left:W+B}:W&&(W={top:(W.top||0)+G,right:(W.right||0)+V,bottom:(W.bottom||0)+j,left:(W.left||0)+B});const X={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:W},re=O.useRef(null),ie=Mn(i),Q=Mn(l),ee=[LZ(Ze=>{const at=$L(Ze,r,U),Ot=typeof ie.current=="function"?ie.current(at):ie.current,ft=typeof Q.current=="function"?Q.current(at):Q.current;return{mainAxis:Ot,crossAxis:ft,alignmentAxis:ft}},[typeof i!="function"?i:0,typeof l!="function"?l:0,U,r])],ne=R==="none"&&A!=="shift",te=!ne&&(u||g||A==="shift"),le=A==="none"?null:IZ({...X,padding:{top:W.top+I,right:W.right+I,bottom:W.bottom+I,left:W.left+I},mainAxis:!g&&A==="flip",crossAxis:R==="flip"?"alignment":!1,fallbackAxisSideDirection:L}),fe=ne?null:jZ(Ze=>{const at=ri(Ze.elements.floating).documentElement;return{...X,rootBoundary:g?{x:0,y:0,width:at.clientWidth,height:at.clientHeight}:void 0,mainAxis:R!=="none",crossAxis:te,limiter:u||g?void 0:DZ(Ot=>{if(!re.current)return{};const{width:ft,height:_n}=re.current.getBoundingClientRect(),Lt=Gi(Ei(Ot.placement)),xt=Lt==="y"?ft:_n,nt=Lt==="y"?W.left+W.right:W.top+W.bottom;return{offset:xt/2+nt/2}})}},[X,u,g,W,R]);A==="shift"||R==="shift"||s==="center"?ee.push(fe,le):ee.push(le,fe),ee.push(NZ({...X,apply({elements:{floating:Ze},rects:{reference:at},availableWidth:Ot,availableHeight:ft}){Object.entries({"--available-width":`${Ot}px`,"--available-height":`${ft}px`,"--anchor-width":`${at.width}px`,"--anchor-height":`${at.height}px`}).forEach(([_n,Lt])=>{Ze.style.setProperty(_n,Lt)})}}),tte(()=>({element:re.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ze){const{elements:at,middlewareData:Ot,placement:ft,rects:_n,y:Lt}=Ze,xt=Ei(ft),nt=Gi(xt),zt=re.current,qt=Ot.arrow?.x||0,ct=Ot.arrow?.y||0,Rt=zt?.clientWidth||0,Et=zt?.clientHeight||0,Tt=qt+Rt/2,Je=ct+Et/2,Zt=Math.abs(Ot.shift?.y||0),Yn=_n.reference.height/2,Er=typeof i=="function"?i($L(Ze,r,U)):i,mr=Zt>Er,ks={top:`${Tt}px calc(100% + ${Er}px)`,bottom:`${Tt}px ${-Er}px`,left:`calc(100% + ${Er}px) ${Je}px`,right:`${-Er}px ${Je}px`}[xt],Vc=`${Tt}px ${_n.reference.y+Yn-Lt}px`;return at.floating.style.setProperty("--transform-origin",te&&nt==="y"&&mr?Vc:ks),{}}},nte,y),Fe(()=>{!S&&v&&v.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[S,v]);const pe=O.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:de,elements:ue,x:Ie,y:Le,middlewareData:we,update:_e,placement:Pe,context:me,isPositioned:Ae,floatingStyles:Te}=dJ({rootContext:v,placement:K,middleware:ee,strategy:n,whileElementsMounted:p?void 0:(...Ze)=>EL(...Ze,pe),nodeId:b,externalTree:T}),{sideX:We,sideY:rt}=we.adaptiveOrigin||rte,Ue=Ae?n:"fixed",ot=O.useMemo(()=>y?{position:Ue,[We]:Ie,[rt]:Le}:{position:Ue,...Te},[y,Ue,We,Ie,rt,Le,Te]),tt=O.useRef(null);Fe(()=>{if(!S)return;const Ze=N.current,at=typeof Ze=="function"?Ze():Ze,ft=(FL(at)?at.current:at)||null||null;ft!==tt.current&&(de.setPositionReference(ft),tt.current=ft)},[S,de,$,N]),O.useEffect(()=>{if(!S)return;const Ze=N.current;typeof Ze!="function"&&FL(Ze)&&Ze.current!==tt.current&&(de.setPositionReference(Ze.current),tt.current=Ze.current)},[S,de,$,N]),O.useEffect(()=>{if(p&&S&&ue.domReference&&ue.floating)return EL(ue.domReference,ue.floating,_e,pe)},[p,S,ue,_e,pe]);const mt=Ei(Pe),Ee=OB(r,mt,U),xe=el(Pe)||"center",Ce=!!we.hide?.referenceHidden;Fe(()=>{_&&S&&Ae&&k(mt)},[_,S,Ae,mt]);const it=O.useMemo(()=>({position:"absolute",top:we.arrow?.y,left:we.arrow?.x}),[we.arrow]),dt=we.arrow?.centerOffset!==0;return O.useMemo(()=>({positionerStyles:ot,arrowStyles:it,arrowRef:re,arrowUncentered:dt,side:Ee,align:xe,physicalSide:mt,anchorHidden:Ce,refs:de,context:me,isPositioned:Ae,update:_e}),[ot,it,re,dt,Ee,xe,mt,Ce,de,me,Ae,_e])}function FL(e){return e!=null&&"current"in e}const RB=O.createContext(void 0);function zk(){const e=O.useContext(RB);if(!e)throw new Error(Ut(59));return e}function Jv(e,t){e&&Object.assign(e.style,t)}const AB={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},ite={position:"fixed"},ste=O.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:s,render:l,side:a="bottom",align:c="center",sideOffset:u=0,alignOffset:h=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:x,alignItemWithTrigger:g=!0,collisionAvoidance:b=lk,...y}=t,{store:_,listRef:T,labelsRef:E,alignItemWithTriggerActiveRef:k,selectedItemTextRef:A,valuesRef:R,initialValueRef:L,popupRef:z,setValue:D}=to(),$=wB(),N=De(_,vt.open),F=De(_,vt.mounted),U=De(_,vt.modal),H=De(_,vt.value),K=De(_,vt.openMethod),W=De(_,vt.positionerElement),I=De(_,vt.triggerElement),G=De(_,vt.isItemEqualToValue),j=O.useRef(null),B=O.useRef(null),[V,X]=O.useState(g),re=F&&V&&K!=="touch";!F&&V!==g&&X(g),Fe(()=>{F||(vt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),vt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,F]),O.useImperativeHandle(k,()=>re),Lb((re||U)&&N&&K!=="touch",I);const ie=Bk({anchor:r,floatingRootContext:$,positionMethod:i,mounted:F,side:a,sideOffset:u,align:c,alignOffset:h,arrowPadding:v,collisionBoundary:f,collisionPadding:p,sticky:S,disableAnchorTracking:x??re,collisionAvoidance:b,keepMounted:!0}),Q=re?"none":ie.side,Y=re?ite:ie.positionerStyles,J=O.useMemo(()=>{const de={};return N||(de.pointerEvents="none"),{role:"presentation",hidden:!F,style:{...Y,...de}}},[N,F,Y]),ee=O.useMemo(()=>({open:N,side:Q,align:ie.align,anchorHidden:ie.anchorHidden}),[N,Q,ie.align,ie.anchorHidden]),ne=Ne(de=>{_.set("positionerElement",de)}),te=ut("div",t,{ref:[n,ne],state:ee,stateAttributesMapping:Ja,props:[J,y]}),le=O.useRef(0),fe=Ne(de=>{if(de.size===0&&le.current===0||R.current.length===0)return;const ue=le.current;if(le.current=de.size,de.size===ue)return;const Ie=qe(rr);if(ue!==0&&!_.state.multiple&&H!==null&&nd(R.current,H,G)===-1){const we=L.current,Pe=we!=null&&Kl(R.current,we,G)?we:null;D(Pe,Ie),Pe===null&&(_.set("selectedIndex",null),A.current=null)}if(ue!==0&&_.state.multiple&&Array.isArray(H)){const Le=H.filter(we=>Kl(R.current,we,G));(Le.length!==H.length||Le.some(we=>!Kl(H,we,G)))&&(D(Le,Ie),Le.length===0&&(_.set("selectedIndex",null),A.current=null))}if(N&&re){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Le={height:""};Jv(W,Le),Jv(z.current,Le)}}),pe=O.useMemo(()=>({...ie,side:Q,alignItemWithTriggerActive:re,setControlledAlignItemWithTrigger:X,scrollUpArrowRef:j,scrollDownArrowRef:B}),[ie,Q,re,X]);return w.jsx(Zp,{elementsRef:T,labelsRef:E,onMapChange:fe,children:w.jsxs(RB.Provider,{value:pe,children:[F&&U&&w.jsx(Mb,{inert:Pb(!N),cutout:I}),te]})})});function PB(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Gg="base-ui-disable-scrollbar",Gh={className:Gg,element:w.jsx("style",{href:Gg,precedence:"base-ui:low",children:`.${Gg}{scrollbar-width:none}.${Gg}::-webkit-scrollbar{display:none}`})},ote=O.createContext(void 0);function Hk(e){return O.useContext(ote)}function $k(e){return e==="starting"?kY:yn}const ate={...Ja,...eo},lte=O.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{store:l,popupRef:a,onOpenChangeComplete:c,setOpen:u,valueRef:h,selectedItemTextRef:f,keyboardActiveRef:p,multiple:v,handleScrollArrowVisibility:S,scrollHandlerRef:x}=to(),{side:g,align:b,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:_,scrollDownArrowRef:T,scrollUpArrowRef:E}=zk(),k=Hk()!=null,A=wB(),R=mn(),L=De(l,vt.id),z=De(l,vt.open),D=De(l,vt.mounted),$=De(l,vt.popupProps),N=De(l,vt.transitionStatus),F=De(l,vt.triggerElement),U=De(l,vt.positionerElement),H=De(l,vt.listElement),K=O.useRef(0),W=O.useRef(!1),I=O.useRef(0),G=O.useRef(!1),j=O.useRef({}),B=qp(),V=Ne(Q=>{if(!U||!a.current||!G.current)return;if(W.current||!y){S();return}const Y=U.style.top==="0px",J=U.style.bottom==="0px",ee=U.getBoundingClientRect().height,ne=ri(U),te=getComputedStyle(U),le=parseFloat(te.marginTop),fe=parseFloat(te.marginBottom),pe=ne.documentElement.clientHeight-le-fe,de=Q.scrollTop,ue=Q.scrollHeight,Ie=Q.clientHeight,Le=ue-Ie;let we=null,_e=null,Pe=!1;if(Y){const me=Le-de,Ae=ee+me,Te=Math.min(Ae,pe);we=Te,Te!==pe?_e=Le:Pe=!0}else if(J){const me=de-0,Ae=ee+me,Te=Math.min(Ae,pe),We=Ae-pe;we=Te,Te!==pe?_e=0:(Pe=!0,de<Le&&(_e=de-(me-We)))}we!=null&&(U.style.height=`${we}px`),_e!=null&&(Q.scrollTop=_e),Pe&&(W.current=!0),S()});O.useImperativeHandle(x,()=>V,[V]),Ri({open:z,ref:a,onComplete(){z&&c?.(!0)}});const X=O.useMemo(()=>({open:z,transitionStatus:N,side:g,align:b}),[z,N,g,b]);Fe(()=>{!U||!a.current||Object.keys(j.current).length||(j.current={top:U.style.top||"0",left:U.style.left||"0",right:U.style.right,height:U.style.height,bottom:U.style.bottom,minHeight:U.style.minHeight,maxHeight:U.style.maxHeight,marginTop:U.style.marginTop,marginBottom:U.style.marginBottom})},[a,U]),Fe(()=>{D||y||(G.current=!1,W.current=!1,K.current=0,I.current=0,Jv(U,j.current))},[D,y,U,a]),Fe(()=>{const Q=a.current;if(!(!D||!F||!U||!Q)){if(!y){G.current=!0,B.request(S);return}queueMicrotask(()=>{const Y=getComputedStyle(U),J=getComputedStyle(Q),ee=ri(F),ne=Wn(U),te=F.getBoundingClientRect(),le=U.getBoundingClientRect(),fe=te.left,pe=te.height,de=H||Q,ue=de.scrollHeight,Ie=parseFloat(J.borderBottomWidth),Le=parseFloat(Y.marginTop)||10,we=parseFloat(Y.marginBottom)||10,_e=parseFloat(Y.minHeight)||100,Pe=5,me=5,Ae=20,Te=ee.documentElement.clientHeight-Le-we,We=ee.documentElement.clientWidth,rt=Te-te.bottom+pe,Ue=f.current,ot=h.current;let tt=0,mt=0;if(Ue&&ot){const xt=ot.getBoundingClientRect(),nt=Ue.getBoundingClientRect(),zt=xt.left-fe,qt=nt.left-le.left,ct=xt.top-te.top+xt.height/2,Rt=nt.top-le.top+nt.height/2;tt=zt-qt,mt=Rt-ct}const Ee=rt+mt+we+Ie;let xe=Math.min(Te,Ee);const Ce=Te-Le-we,it=Ee-xe,dt=Math.max(Pe,fe+tt),Ze=We-me,at=Math.max(0,dt+le.width-Ze);U.style.left=`${dt-at}px`,U.style.height=`${xe}px`,U.style.maxHeight="auto",U.style.marginTop=`${Le}px`,U.style.marginBottom=`${we}px`,Q.style.height="100%";const Ot=de.scrollHeight-de.clientHeight,ft=it>=Ot;ft&&(xe=Math.min(Te,le.height)-(it-Ot));const _n=te.top<Ae||te.bottom>Te-Ae||xe<Math.min(ue,_e),Lt=(ne.visualViewport?.scale??1)!==1&&bk;if(_n||Lt){G.current=!0,Jv(U,j.current),Ir.flushSync(()=>_(!1));return}if(ft){const xt=Math.max(0,Te-Ee);U.style.top=le.height>=Ce?"0":`${xt}px`,U.style.height=`${xe}px`,de.scrollTop=de.scrollHeight-de.clientHeight,K.current=Math.max(_e,xe)}else U.style.bottom="0",K.current=Math.max(_e,xe),de.scrollTop=it;K.current===Te&&(W.current=!0),S(),setTimeout(()=>{G.current=!0})})}},[l,D,U,F,h,f,a,S,y,_,B,T,E,H]),O.useEffect(()=>{if(!y||!U||!D)return;const Q=Wn(U);function Y(J){u(!1,qe(JX,J))}return Q.addEventListener("resize",Y),()=>{Q.removeEventListener("resize",Y)}},[u,y,U,D]);const re={...H?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":v||void 0,id:`${L}-list`},onKeyDown(Q){p.current=!0,k&&jk.has(Q.key)&&Q.stopPropagation()},onMouseMove(){p.current=!1},onPointerLeave(Q){if(PB(Q)||Q.pointerType==="touch")return;const Y=Q.currentTarget;R.start(0,()=>{l.set("activeIndex",null),Y.focus({preventScroll:!0})})},onScroll(Q){H||x.current?.(Q.currentTarget)},...y&&{style:H?{height:"100%"}:AB}},ie=ut("div",t,{ref:[n,a],state:X,stateAttributesMapping:ate,props:[$,re,$k(N),{className:!H&&y?Gh.className:void 0},s]});return w.jsxs(O.Fragment,{children:[Gh.element,w.jsx(Tb,{context:A,modal:!1,disabled:!D,restoreFocus:!0,children:ie})]})}),cte=O.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:l,scrollHandlerRef:a}=to(),{alignItemWithTriggerActive:c}=zk(),u=De(l,vt.hasScrollArrows),h=De(l,vt.openMethod),f=De(l,vt.multiple),v={id:`${De(l,vt.id)}-list`,role:"listbox","aria-multiselectable":f||void 0,onScroll(x){a.current?.(x.currentTarget)},...c&&{style:AB},className:u&&h!=="touch"?Gh.className:void 0},S=Ne(x=>{l.set("listElement",x)});return ut("div",t,{ref:[n,S],props:[v,s]})});let Fk=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Nd(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:s}=e,{register:l,unregister:a,subscribeMapChange:c,elementsRef:u,labelsRef:h,nextIndexRef:f}=Yee(),p=O.useRef(-1),[v,S]=O.useState(s??(i===Fk.GuessFromOrder?()=>{if(p.current===-1){const b=f.current;f.current+=1,p.current=b}return p.current}:-1)),x=O.useRef(null),g=O.useCallback(b=>{if(x.current=b,v!==-1&&b!==null&&(u.current[v]=b,h)){const y=t!==void 0;h.current[v]=y?t:r?.current?.textContent??b.textContent}},[v,u,h,t,r]);return Fe(()=>{if(s!=null)return;const b=x.current;if(b)return l(b,n),()=>{a(b)}},[s,l,a,n]),Fe(()=>{if(s==null)return c(b=>{const y=x.current?b.get(x.current)?.index:null;y!=null&&S(y)})},[s,c,S]),O.useMemo(()=>({ref:g,index:v}),[v,g])}const MB=O.createContext(void 0);function Uk(){const e=O.useContext(MB);if(!e)throw new Error(Ut(57));return e}const ute=O.memo(O.forwardRef(function(t,n){const{render:r,className:i,value:s=null,label:l,disabled:a=!1,nativeButton:c=!1,...u}=t,h=O.useRef(null),f=Nd({label:l,textRef:h,indexGuessBehavior:Fk.GuessFromOrder}),{store:p,getItemProps:v,setOpen:S,setValue:x,selectionRef:g,typingRef:b,valuesRef:y,keyboardActiveRef:_,multiple:T,highlightItemOnHover:E}=to(),k=mn(),A=De(p,vt.isActive,f.index),R=De(p,vt.isSelected,f.index,s),L=De(p,vt.isSelectedByFocus,f.index),z=De(p,vt.isItemEqualToValue),D=f.index,$=D!==-1,N=O.useRef(null),F=Mn(D);Fe(()=>{if(!$)return;const ie=y.current;return ie[D]=s,()=>{delete ie[D]}},[$,D,s,y]),Fe(()=>{if(!$)return;const ie=p.state.value;let Q=ie;T&&Array.isArray(ie)&&ie.length>0&&(Q=ie[ie.length-1]),Q!==void 0&&zo(Q,s,z)&&p.set("selectedIndex",D)},[$,D,T,z,p,s]);const U=O.useMemo(()=>({disabled:a,selected:R,highlighted:A}),[a,R,A]),H=v({active:A,selected:R});H.onFocus=void 0,H.id=void 0;const K=O.useRef(null),W=O.useRef("mouse"),I=O.useRef(!1),{getButtonProps:G,buttonRef:j}=ii({disabled:a,focusableWhenDisabled:!0,native:c});function B(ie){const Q=p.state.value;if(T){const Y=Array.isArray(Q)?Q:[],J=R?EB(Y,s,z):[...Y,s];x(J,qe(oc,ie))}else x(s,qe(oc,ie)),S(!1,qe(oc,ie))}const V={role:"option","aria-selected":R,"aria-disabled":a||void 0,tabIndex:A?0:-1,onFocus(){p.set("activeIndex",D)},onMouseEnter(){!_.current&&p.state.selectedIndex===null&&p.set("activeIndex",D)},onMouseMove(){E&&p.set("activeIndex",D)},onMouseLeave(ie){!E||_.current||PB(ie)||k.start(0,()=>{p.state.activeIndex===D&&p.set("activeIndex",null)})},onTouchStart(){g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(ie){K.current=ie.key,p.set("activeIndex",D)},onClick(ie){I.current=!1,!(ie.type==="keydown"&&K.current===null)&&(a||K.current===" "&&b.current||W.current!=="touch"&&!A||(K.current=null,B(ie.nativeEvent)))},onPointerEnter(ie){W.current=ie.pointerType},onPointerDown(ie){W.current=ie.pointerType,I.current=!0},onMouseUp(ie){if(a)return;if(I.current){I.current=!1;return}const Q=!g.current.allowSelectedMouseUp&&R,Y=!g.current.allowUnselectedMouseUp&&!R;Q||Y||W.current!=="touch"&&!A||B(ie.nativeEvent)}},X=ut("div",t,{ref:[j,n,f.ref,N],state:U,props:[H,V,u,G]}),re=O.useMemo(()=>({selected:R,indexRef:F,textRef:h,selectedByFocus:L,hasRegistered:$}),[R,F,h,L,$]);return w.jsx(MB.Provider,{value:re,children:X})})),dte=O.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=Uk();return r||i?w.jsx(fte,{...t,ref:n}):null}),fte=O.memo(O.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...s}=e,{selected:l}=Uk(),a=O.useRef(null),{transitionStatus:c,setMounted:u}=Go(l),h=O.useMemo(()=>({selected:l,transitionStatus:c}),[l,c]),f=ut("span",e,{ref:[t,a],state:h,props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:eo});return Ri({open:l,ref:a,onComplete(){l||u(!1)}}),f})),hte=O.memo(O.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:s,hasRegistered:l}=Uk(),{selectedItemTextRef:a}=to(),{className:c,render:u,...h}=t,f=O.useCallback(v=>{if(!v||!l)return;const S=a.current===null||!a.current.isConnected;(s||S&&r.current===0)&&(a.current=v)},[a,r,s,l]);return ut("div",t,{ref:[f,n,i],props:h})})),LB=O.forwardRef(function(t,n){const{render:r,className:i,direction:s,keepMounted:l=!1,...a}=t,{store:c,popupRef:u,listRef:h,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=to(),{side:v,scrollDownArrowRef:S,scrollUpArrowRef:x}=zk(),g=s==="up"?vt.scrollUpArrowVisible:vt.scrollDownArrowVisible,b=De(c,g),y=De(c,vt.openMethod),_=b&&y!=="touch",T=mn(),E=s==="up"?x:S,{transitionStatus:k,setMounted:A}=Go(_);Fe(()=>(p.current+=1,c.state.hasScrollArrows||c.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&c.state.hasScrollArrows&&c.set("hasScrollArrows",!1)}),[c,p]),Ri({open:_,ref:E,onComplete(){_||A(!1)}});const R=O.useMemo(()=>({direction:s,visible:_,side:v,transitionStatus:k}),[s,_,v,k]),z=ut("div",t,{ref:[n,E],state:R,props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove($){if($.movementX===0&&$.movementY===0||T.isStarted())return;c.set("activeIndex",null);function N(){const F=c.state.listElement??u.current;if(!F)return;c.set("activeIndex",null),f();const U=F.scrollTop===0,H=Math.round(F.scrollTop+F.clientHeight)>=F.scrollHeight;if(h.current.length===0&&(s==="up"?c.set("scrollUpArrowVisible",!U):c.set("scrollDownArrowVisible",!H)),s==="up"&&U||s==="down"&&H){T.clear();return}if((c.state.listElement||u.current)&&h.current&&h.current.length>0){const W=h.current,I=E.current?.offsetHeight||0;if(s==="up"){let G=0;const j=F.scrollTop+I;for(let V=0;V<W.length;V+=1){const X=W[V];if(X&&X.offsetTop>=j){G=V;break}}const B=Math.max(0,G-1);if(B<G){const V=W[B];V&&(F.scrollTop=Math.max(0,V.offsetTop-I))}else F.scrollTop=0}else{let G=W.length-1;const j=F.scrollTop+F.clientHeight-I;for(let V=0;V<W.length;V+=1){const X=W[V];if(X&&X.offsetTop+X.offsetHeight>j){G=Math.max(0,V-1);break}}const B=Math.min(W.length-1,G+1);if(B>G){const V=W[B];V&&(F.scrollTop=V.offsetTop+V.offsetHeight-F.clientHeight+I)}else F.scrollTop=F.scrollHeight-F.clientHeight}}T.start(40,N)}T.start(40,N)},onMouseLeave(){T.clear()}},a]});return _||l?z:null}),pte=O.forwardRef(function(t,n){return w.jsx(LB,{...t,ref:n,direction:"down"})}),mte=O.forwardRef(function(t,n){return w.jsx(LB,{...t,ref:n,direction:"up"})}),cc=$ee;function uc({className:e,...t}){return w.jsx(qee,{"data-slot":"select-value",className:Be("flex flex-1 text-left",e),...t})}function dc({className:e,size:t="default",children:n,...r}){return w.jsxs(Uee,{"data-slot":"select-trigger","data-size":t,className:Be("border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[n,w.jsx(Wee,{render:w.jsx(be,{icon:o7,strokeWidth:2,className:"text-muted-foreground size-3.5 pointer-events-none"})})]})}function fc({className:e,children:t,side:n="bottom",sideOffset:r=4,align:i="center",alignOffset:s=0,alignItemWithTrigger:l=!0,...a}){return w.jsx(Kee,{children:w.jsx(ste,{side:n,sideOffset:r,align:i,alignOffset:s,alignItemWithTrigger:l,className:"isolate z-50",children:w.jsxs(lte,{"data-slot":"select-content",className:Be("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-32 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...a,children:[w.jsx(gte,{}),w.jsx(cte,{children:t}),w.jsx(vte,{})]})})})}function Rr({className:e,children:t,...n}){return w.jsxs(ute,{"data-slot":"select-item",className:Be("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[w.jsx(hte,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),w.jsx(dte,{render:w.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:w.jsx(be,{icon:Pc,strokeWidth:2,className:"pointer-events-none"})})]})}function gte({className:e,...t}){return w.jsx(mte,{"data-slot":"select-scroll-up-button",className:Be("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 top-0 w-full",e),...t,children:w.jsx(be,{icon:uk,strokeWidth:2})})}function vte({className:e,...t}){return w.jsx(pte,{"data-slot":"select-scroll-down-button",className:Be("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 bottom-0 w-full",e),...t,children:w.jsx(be,{icon:xb,strokeWidth:2})})}const jB=O.createContext(void 0);function Vk(){const e=O.useContext(jB);if(e===void 0)throw new Error(Ut(64));return e}let yte=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const qk={tabActivationDirection:e=>({[yte.activationDirection]:e})},bte=O.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:s,orientation:l="horizontal",render:a,value:c,...u}=t,h=Dc(),f=Object.hasOwn(t,"defaultValue"),p=O.useRef([]),[v,S]=O.useState(()=>new Map),[x,g]=Zi({controlled:c,default:i,name:"Tabs",state:"value"}),b=c!==void 0,[y,_]=O.useState(()=>new Map),[T,E]=O.useState("none"),k=Ne((K,W)=>{s?.(K,W),!W.isCanceled&&(g(K),E(W.activationDirection))}),A=Ne((K,W)=>{S(I=>{if(I.get(K)===W)return I;const G=new Map(I);return G.set(K,W),G})}),R=Ne((K,W)=>{S(I=>{if(!I.has(K)||I.get(K)!==W)return I;const G=new Map(I);return G.delete(K),G})}),L=O.useCallback(K=>v.get(K),[v]),z=O.useCallback(K=>{for(const W of y.values())if(K===W?.value)return W?.id},[y]),D=O.useCallback(K=>{if(K===void 0)return null;for(const[W,I]of y.entries())if(I!=null&&K===(I.value??I.index))return W;return null},[y]),$=O.useMemo(()=>({direction:h,getTabElementBySelectedValue:D,getTabIdByPanelValue:z,getTabPanelIdByValue:L,onValueChange:k,orientation:l,registerMountedTabPanel:A,setTabMap:_,unregisterMountedTabPanel:R,tabActivationDirection:T,value:x}),[h,D,z,L,k,l,A,_,R,T,x]),N=O.useMemo(()=>{for(const K of y.values())if(K!=null&&K.value===x)return K},[y,x]),F=O.useMemo(()=>{for(const K of y.values())if(K!=null&&!K.disabled)return K.value},[y]);Fe(()=>{if(b||y.size===0)return;const K=N?.disabled,W=N==null&&x!==null;if(f&&K&&x===i||!K&&!W)return;const G=F??null;x!==G&&(g(G),E("none"))},[i,F,f,b,N,E,g,y,x]);const H=ut("div",t,{state:{orientation:l,tabActivationDirection:T},ref:n,props:u,stateAttributesMapping:qk});return w.jsx(jB.Provider,{value:$,children:w.jsx(Zp,{elementsRef:p,children:H})})}),DB="data-composite-item-active";function IB(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=ok(),{ref:i,index:s}=Nd(e),l=n===s,a=O.useRef(null),c=ns(i,a);return{compositeProps:O.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(s)},onMouseMove(){const h=a.current;if(!t||!h)return;const f=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!f&&h.focus()}}),[l,r,s,t]),compositeRef:c,index:s}}const NB=O.createContext(void 0);function _te(){const e=O.useContext(NB);if(e===void 0)throw new Error(Ut(65));return e}const xte=O.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:s,value:l,id:a,nativeButton:c=!0,...u}=t,{value:h,getTabPanelIdByValue:f,orientation:p}=Vk(),{activateOnFocus:v,highlightedTabIndex:S,onTabActivation:x,setHighlightedTabIndex:g,tabsListElement:b}=_te(),y=Vr(a),_=O.useMemo(()=>({disabled:i,id:y,value:l}),[i,y,l]),{compositeProps:T,compositeRef:E,index:k}=IB({metadata:_}),A=l===h,R=O.useRef(!1);Fe(()=>{if(R.current){R.current=!1;return}if(!(A&&k>-1&&S!==k))return;const I=b;if(I!=null){const G=ms(ri(I));if(G&>(I,G))return}i||g(k)},[A,k,S,g,i,b]);const{getButtonProps:L,buttonRef:z}=ii({disabled:i,native:c,focusableWhenDisabled:!0}),D=f(l),$=O.useRef(!1),N=O.useRef(!1);function F(I){A||i||x(l,qe(rr,I.nativeEvent,void 0,{activationDirection:"none"}))}function U(I){A||(k>-1&&!i&&g(k),!i&&v&&(!$.current||$.current&&N.current)&&x(l,qe(rr,I.nativeEvent,void 0,{activationDirection:"none"})))}function H(I){if(A||i)return;$.current=!0;function G(){$.current=!1,N.current=!1}(!I.button||I.button===0)&&(N.current=!0,ri(I.currentTarget).addEventListener("pointerup",G,{once:!0}))}const K=O.useMemo(()=>({disabled:i,active:A,orientation:p}),[i,A,p]);return ut("button",t,{state:K,ref:[n,z,E],props:[T,{role:"tab","aria-controls":D,"aria-selected":A,id:y,onClick:F,onFocus:U,onPointerDown:H,[DB]:A?"":void 0,onKeyDownCapture(){R.current=!0}},u,L]})});let Ste=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const wte=O.forwardRef(function(t,n){const{className:r,value:i,render:s,keepMounted:l=!1,...a}=t,{value:c,getTabIdByPanelValue:u,orientation:h,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:v}=Vk(),S=Vr(),x=O.useMemo(()=>({id:S,value:i}),[S,i]),{ref:g,index:b}=Nd({metadata:x}),y=i!==c,_=u(i),T=O.useMemo(()=>({hidden:y,orientation:h,tabActivationDirection:f}),[y,h,f]),E=ut("div",t,{state:T,ref:[n,g],props:[{"aria-labelledby":_,hidden:y,id:S??void 0,role:"tabpanel",tabIndex:y?-1:0,[Ste.index]:b},a],stateAttributesMapping:qk});return Fe(()=>{if(!(y&&!l)&&S!=null)return p(i,S),()=>{v(i,S)}},[y,l,i,S,p,v]),!y||l?E:null});function Cte(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Ete=[];function Tte(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:s="both",direction:l,highlightedIndex:a,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:h=!1,stopEventPropagation:f=!1,disabledIndices:p,modifierKeys:v=Ete}=e,[S,x]=O.useState(0),g=n>1,b=O.useRef(null),y=ns(b,u),_=O.useRef([]),T=O.useRef(!1),E=a??S,k=Ne((L,z=!1)=>{if((c??x)(L),z){const D=_.current[L];ML(b.current,D,l,s)}}),A=Ne(L=>{if(L.size===0||T.current)return;T.current=!0;const z=Array.from(L.keys()),D=z.find(N=>N?.hasAttribute(DB))??null,$=D?z.indexOf(D):-1;$!==-1&&k($),ML(b.current,D,l,s)}),R=O.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,ref:y,onFocus(L){!b.current||!PL(L.target)||L.target.setSelectionRange(0,L.target.value.length??0)},onKeyDown(L){const z=h?PJ:uB;if(!z.has(L.key)||kte(L,v)||!b.current)return;const $=l==="rtl",N=$?Wh:Fu,F={horizontal:N,vertical:Wl,both:N}[s],U=$?Fu:Wh,H={horizontal:U,vertical:$u,both:U}[s];if(PL(L.target)&&!Cte(L.target)){const V=L.target.selectionStart,X=L.target.selectionEnd,re=L.target.value??"";if(V==null||L.shiftKey||V!==X||L.key!==H&&V<re.length||L.key!==F&&V>0)return}let K=E;const W=wv(_,p),I=n2(_,p);if(g){const V=t||Array.from({length:_.current.length},()=>({width:1,height:1})),X=w7(V,n,i),re=X.findIndex(Q=>Q!=null&&!Ua(_,Q,p)),ie=X.reduce((Q,Y,J)=>Y!=null&&!Ua(_,Y,p)?J:Q,-1);K=X[S7({current:X.map(Q=>Q?_.current[Q]:null)},{event:L,orientation:s,loopFocus:r,cols:n,disabledIndices:E7([...p||_.current.map((Q,Y)=>Ua(_,Y)?Y:void 0),void 0],X),minIndex:re,maxIndex:ie,prevIndex:C7(E>I?W:E,V,X,n,L.key===Wl?"bl":L.key===Fu?"tr":"tl"),rtl:$})]}const G={horizontal:[N],vertical:[Wl],both:[N,Wl]}[s],j={horizontal:[U],vertical:[$u],both:[U,$u]}[s],B=g?z:{horizontal:h?RJ:lB,vertical:h?AJ:cB,both:z}[s];h&&(L.key===Gp?K=W:L.key===Kp&&(K=I)),K===E&&(G.includes(L.key)||j.includes(L.key))&&(r&&K===I&&G.includes(L.key)?K=W:r&&K===W&&j.includes(L.key)?K=I:K=xr(_,{startingIndex:K,decrement:j.includes(L.key),disabledIndices:p})),K!==E&&!Nu(_,K)&&(f&&L.stopPropagation(),B.has(L.key)&&L.preventDefault(),k(K,!0),queueMicrotask(()=>{_.current[K]?.focus()}))}}),[n,i,l,p,_,h,E,g,t,r,y,v,k,s,f]);return O.useMemo(()=>({props:R,highlightedIndex:E,onHighlightedIndexChange:k,elementsRef:_,disabledIndices:p,onMapChange:A,relayKeyboardEvent:R.onKeyDown}),[R,E,k,_,p,A])}function kte(e,t){for(const n of IJ.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function BB(e){const{render:t,className:n,refs:r=ti,props:i=ti,state:s=yn,stateAttributesMapping:l,highlightedIndex:a,onHighlightedIndexChange:c,orientation:u,dense:h,itemSizes:f,loopFocus:p,cols:v,enableHomeAndEndKeys:S,onMapChange:x,stopEventPropagation:g=!0,rootRef:b,disabledIndices:y,modifierKeys:_,highlightItemOnHover:T=!1,tag:E="div",...k}=e,A=Dc(),{props:R,highlightedIndex:L,onHighlightedIndexChange:z,elementsRef:D,onMapChange:$,relayKeyboardEvent:N}=Tte({itemSizes:f,cols:v,loopFocus:p,dense:h,orientation:u,highlightedIndex:a,onHighlightedIndexChange:c,rootRef:b,stopEventPropagation:g,enableHomeAndEndKeys:S,direction:A,disabledIndices:y,modifierKeys:_}),F=ut(E,e,{state:s,ref:r,props:[R,...i,k],stateAttributesMapping:l}),U=O.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:z,highlightItemOnHover:T,relayKeyboardEvent:N}),[L,z,T,N]);return w.jsx(D9.Provider,{value:U,children:w.jsx(Zp,{elementsRef:D,onMapChange:H=>{x?.(H),$(H)},children:F})})}const Ote=O.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:s=!0,render:l,...a}=t,{getTabElementBySelectedValue:c,onValueChange:u,orientation:h,value:f,setTabMap:p,tabActivationDirection:v}=Vk(),[S,x]=O.useState(0),[g,b]=O.useState(null),y=Rte(f,h,g,c),_=Ne((A,R)=>{if(A!==f){const L=y(A);R.activationDirection=L,u(A,R)}}),T=O.useMemo(()=>({orientation:h,tabActivationDirection:v}),[h,v]),E={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},k=O.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:S,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:g,value:f}),[r,S,_,x,g,f]);return w.jsx(NB.Provider,{value:k,children:w.jsx(BB,{render:l,className:i,state:T,refs:[n,b],props:[E,a],stateAttributesMapping:qk,highlightedIndex:S,enableHomeAndEndKeys:!0,loopFocus:s,orientation:h,onHighlightedIndexChange:x,onMapChange:p,disabledIndices:ti})})});function UL(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:s}=t.getBoundingClientRect(),l=n-i,a=r-s;return{left:l,top:a}}function Rte(e,t,n,r){const[i,s]=O.useState(null);return Fe(()=>{if(e==null||n==null){s(null);return}const l=r(e);if(l==null){s(null);return}const{left:a,top:c}=UL(l,n);s(t==="horizontal"?a:c)},[t,r,n,e]),O.useCallback(l=>{if(l===e)return"none";if(l==null)return s(null),"none";if(l!=null&&n!=null){const a=r(l);if(a!=null){const{left:c,top:u}=UL(a,n);if(i==null)return s(t==="horizontal"?c:u),"none";if(t==="horizontal"){if(c<i)return s(c),"left";if(c>i)return s(c),"right"}else{if(u<i)return s(u),"up";if(u>i)return s(u),"down"}}}return"none"},[r,t,i,n,e])}function qa({className:e,orientation:t="horizontal",...n}){return w.jsx(bte,{"data-slot":"tabs","data-orientation":t,className:Be("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const Ate=Ac("rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Wa({className:e,variant:t="default",...n}){return w.jsx(Ote,{"data-slot":"tabs-list","data-variant":t,className:Be(Ate({variant:t}),e),...n})}function Sr({className:e,...t}){return w.jsx(xte,{"data-slot":"tabs-trigger",className:Be("gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-3.5 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function Ar({className:e,...t}){return w.jsx(wte,{"data-slot":"tabs-content",className:Be("text-xs/relaxed flex-1 min-h-0 outline-none",e),...t})}function Pte(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:s,actionsRef:l,handle:a,triggerId:c,defaultTriggerId:u=null}=e,h=qo(),f=!!h,p=Cr(()=>a?.store??new pB({open:n??r,activeTriggerId:c!==void 0?c:u,modal:!0,disablePointerDismissal:!0,nested:f,role:"alertdialog"})).current;p.useControlledProp("open",n,r),p.useControlledProp("activeTriggerId",c,u),p.useSyncedValue("nested",f),p.useContextCallback("onOpenChange",i),p.useContextCallback("onOpenChangeComplete",s);const v=p.useState("payload");hB({store:p,actionsRef:l,parentContext:h?.store.context});const S=O.useMemo(()=>({store:p}),[p]);return w.jsx(mk.Provider,{value:S,children:typeof t=="function"?t({payload:v}):t})}const zB=O.createContext(void 0),HB=O.createContext(void 0),$B=O.createContext(void 0),FB=O.createContext("");function Ko(){const e=O.useContext(zB);if(!e)throw new Error(Ut(22));return e}function Ib(){const e=O.useContext(HB);if(!e)throw new Error(Ut(23));return e}function Ic(){const e=O.useContext($B);if(!e)throw new Error(Ut(24));return e}function Wk(){return O.useContext(FB)}const Ge={id:Re(e=>e.id),query:Re(e=>e.query),items:Re(e=>e.items),selectedValue:Re(e=>e.selectedValue),open:Re(e=>e.open),mounted:Re(e=>e.mounted),forceMounted:Re(e=>e.forceMounted),inline:Re(e=>e.inline),activeIndex:Re(e=>e.activeIndex),selectedIndex:Re(e=>e.selectedIndex),isActive:Re((e,t)=>e.activeIndex===t),isSelected:Re((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(i=>zo(i,t,n)):zo(r,t,n)}),transitionStatus:Re(e=>e.transitionStatus),popupProps:Re(e=>e.popupProps),inputProps:Re(e=>e.inputProps),triggerProps:Re(e=>e.triggerProps),getItemProps:Re(e=>e.getItemProps),positionerElement:Re(e=>e.positionerElement),listElement:Re(e=>e.listElement),triggerElement:Re(e=>e.triggerElement),inputElement:Re(e=>e.inputElement),popupSide:Re(e=>e.popupSide),openMethod:Re(e=>e.openMethod),inputInsidePopup:Re(e=>e.inputInsidePopup),selectionMode:Re(e=>e.selectionMode),listRef:Re(e=>e.listRef),labelsRef:Re(e=>e.labelsRef),popupRef:Re(e=>e.popupRef),emptyRef:Re(e=>e.emptyRef),inputRef:Re(e=>e.inputRef),keyboardActiveRef:Re(e=>e.keyboardActiveRef),chipsContainerRef:Re(e=>e.chipsContainerRef),clearRef:Re(e=>e.clearRef),valuesRef:Re(e=>e.valuesRef),allValuesRef:Re(e=>e.allValuesRef),name:Re(e=>e.name),disabled:Re(e=>e.disabled),readOnly:Re(e=>e.readOnly),required:Re(e=>e.required),grid:Re(e=>e.grid),isGrouped:Re(e=>e.isGrouped),virtualized:Re(e=>e.virtualized),onOpenChangeComplete:Re(e=>e.onOpenChangeComplete),openOnInputClick:Re(e=>e.openOnInputClick),itemToStringLabel:Re(e=>e.itemToStringLabel),isItemEqualToValue:Re(e=>e.isItemEqualToValue),modal:Re(e=>e.modal),autoHighlight:Re(e=>e.autoHighlight),submitOnItemClick:Re(e=>e.submitOnItemClick)};function Mte(e,t){return(n,r)=>{if(n==null)return!1;const i=tr(n,t);return e.contains(i,r)}}function Lte(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;const s=tr(r,t),l=n!=null?tr(n,t):"";return l&&e.contains(l,i)&&l.length===i.length?!0:e.contains(s,i)}}const VL=new Map;function UB(e){return Array.isArray(e)?e.map(t=>UB(t)).join(","):e==null?"":String(e)}function jte(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${UB(e.locale)}|${JSON.stringify(t)}`,r=VL.get(n);if(r)return r;const i=new Intl.Collator(e.locale,t),s={contains(l,a,c){if(!a)return!0;const u=tr(l,c);for(let h=0;h<=u.length-a.length;h+=1)if(i.compare(u.slice(h,h+a.length),a)===0)return!0;return!1},startsWith(l,a,c){if(!a)return!0;const u=tr(l,c);return i.compare(u.slice(0,a.length),a)===0},endsWith(l,a,c){if(!a)return!0;const u=tr(l,c),h=a.length;return u.length>=h&&i.compare(u.slice(u.length-h),a)===0}};return VL.set(n,s),s}const Dte=jte,VB=Symbol("none"),Pl={value:VB,index:-1};function Ite(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:s,defaultInputValue:l,inputValue:a,selectionMode:c="none",onItemHighlighted:u,name:h,disabled:f=!1,readOnly:p=!1,required:v=!1,inputRef:S,grid:x=!1,items:g,filteredItems:b,filter:y,openOnInputClick:_=!0,autoHighlight:T=!1,keepHighlight:E=!1,highlightItemOnHover:k=!0,itemToStringLabel:A,itemToStringValue:R,isItemEqualToValue:L=CB,virtualized:z=!1,inline:D=!1,fillInputOnItemPress:$=!0,modal:N=!1,limit:F=-1,autoComplete:U="list",locale:H,submitOnItemClick:K=!1}=e,{clearErrors:W}=Yp(),{setDirty:I,validityData:G,shouldValidateOnChange:j,setFilled:B,name:V,disabled:X,validation:re}=rs(),ie=Db({id:t}),Q=Dte({locale:H}),[Y,J]=O.useState(!1),[ee,ne]=O.useState(null),te=O.useRef([]),le=O.useRef([]),fe=O.useRef(null),pe=O.useRef(null),de=O.useRef(null),ue=O.useRef(!0),Ie=O.useRef(!1),Le=O.useRef(null),we=O.useRef(null),_e=O.useRef(null),Pe=O.useRef(Pl),me=O.useRef(null),Ae=O.useRef([]),Te=O.useRef([]),We=X||f,rt=V??h,Ue=c==="multiple",ot=c==="single",tt=a!==void 0||l!==void 0,mt=g!==void 0,Ee=b!==void 0;let xe;T==="always"?xe="always":xe=T?"input-change":!1;const[Ce,it]=Zi({controlled:i,default:Ue?r??ti:r,name:"Combobox",state:"selectedValue"}),dt=O.useMemo(()=>y===null?()=>!0:y!==void 0?y:ot&&!Y?Lte(Q,A,Ce):Mte(Q,A),[y,ot,Ce,Y,Q,A]),Ze=Cr(()=>tt?l??"":ot?tr(Ce,A):"").current,[at,Ot]=Zi({controlled:a,default:Ze,name:"Combobox",state:"inputValue"}),[ft,_n]=Zi({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),Lt=TB(g),xt=ee??(at===""?"":String(at).trim()),nt=ot?tr(Ce,A):"",zt=ot&&!Y&&xt!==""&&nt!==""&&nt.length===xt.length&&Q.contains(nt,xt),qt=zt?"":xt,ct=mt&&Ee&&zt,Rt=O.useMemo(()=>g?Lt?g.flatMap(Ve=>Ve.items):g:ti,[g,Lt]),Et=O.useMemo(()=>{if(b&&!ct)return b;if(!g)return ti;if(Lt){const st=g,bt=[];let cn=0;for(const xn of st){if(F>-1&&cn>=F)break;const In=qt===""?xn.items:xn.items.filter(co=>dt(co,qt,A));if(In.length===0)continue;const ao=F>-1?F-cn:1/0,lo=In.slice(0,ao);if(lo.length>0){const co={...xn,items:lo};bt.push(co),cn+=lo.length}}return bt}if(qt==="")return F>-1?Rt.slice(0,F):Rt;const Ve=[];for(const st of Rt){if(F>-1&&Ve.length>=F)break;dt(st,qt,A)&&Ve.push(st)}return Ve},[b,ct,g,Lt,qt,F,dt,A,Rt]),Tt=O.useMemo(()=>Lt?Et.flatMap(st=>st.items):Et,[Et,Lt]),Je=Cr(()=>new lc({id:ie,selectedValue:Ce,open:ft,filter:dt,query:xt,items:g,selectionMode:c,listRef:te,labelsRef:le,popupRef:fe,emptyRef:de,inputRef:pe,keyboardActiveRef:ue,chipsContainerRef:Le,clearRef:we,valuesRef:Ae,allValuesRef:Te,selectionEventRef:_e,name:rt,disabled:We,readOnly:p,required:v,grid:x,isGrouped:Lt,virtualized:z,openOnInputClick:_,itemToStringLabel:A,isItemEqualToValue:L,modal:N,autoHighlight:xe,submitOnItemClick:K,hasInputValue:tt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:D,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||wn,setOpen:wn,setInputValue:wn,setSelectedValue:wn,setIndices:wn,onItemHighlighted:wn,handleSelection:wn,getItemProps:()=>yn,forceMount:wn,requestSubmit:wn})).current,Zt=c==="none"?at:Ce,Yn=O.useMemo(()=>c==="none"?Zt:Array.isArray(Ce)?Ce.map(Ve=>gs(Ve,R)):gs(Ce,R),[Zt,R,c,Ce]),Er=Ne(u),mr=Ne(n),ks=De(Je,Ge.activeIndex),Vc=De(Je,Ge.selectedIndex),ai=De(Je,Ge.positionerElement),Ln=De(Je,Ge.listElement),jn=De(Je,Ge.triggerElement),Os=De(Je,Ge.inputElement),li=De(Je,Ge.inline),io=De(Je,Ge.inputInsidePopup),T0=Mn(jn),{mounted:af,setMounted:ul,transitionStatus:dl}=Go(ft),{openMethod:so,triggerProps:Rs,reset:fl}=jb(ft);Xp({id:ie,name:rt,commit:re.commit,value:Zt,controlRef:io?T0:pe,getValue:()=>Yn});const os=Ne(()=>{g?le.current=Tt.map(Ve=>tr(Ve,A)):Je.set("forceMounted",!0)}),Dn=O.useRef(Ce);Fe(()=>{Ce!==Dn.current&&os()},[os,Ce]);const Nr=Ne(Ve=>{Je.update(Ve);const st=Ve.type||"none";if(Ve.activeIndex!==void 0)if(Ve.activeIndex===null)Pe.current!==Pl&&(Pe.current=Pl,Er(void 0,sh(st,void 0,{index:-1})));else{const bt=Ae.current[Ve.activeIndex];Pe.current={value:bt,index:Ve.activeIndex},Er(bt,sh(st,void 0,{index:Ve.activeIndex}))}}),Br=Ne((Ve,st)=>{if(Ie.current=st.reason===ka,e.onInputValueChange?.(Ve,st),!st.isCanceled){if(st.reason===ql){const bt=Ve.trim()!=="";bt&&J(!0),me.current={hasQuery:bt},bt&&xe&&Je.state.activeIndex==null&&Je.set("activeIndex",0)}Ot(Ve)}}),ci=Ne((Ve,st)=>{ft!==Ve&&(st.reason==="escape-key"&&mt&&Tt.length===0&&!Je.state.emptyRef.current&&st.allowPropagation(),e.onOpenChange?.(Ve,st),!st.isCanceled&&(!Ve&&Y&&(ot?(ne(xt),xt===""&&J(!1)):Ue&&(li||io?Nr({activeIndex:null}):ne(xt),Br("",qe(ka,st.event)))),_n(Ve)))}),as=Ne((Ve,st)=>{if(s?.(Ve,st),st.isCanceled)return;it(Ve),(c==="none"&&fe.current&&$||ot&&!Je.state.inputInsidePopup)&&Br(tr(Ve,A),qe(st.reason,st.event)),ot&&Ve!=null&&st.reason!==ql&&Y&&ne(xt)}),k0=Ne((Ve,st)=>{let bt=st;if(bt===void 0){if(ks===null)return;bt=Ae.current[ks]}const cn=sr(Ve),xn=_e.current??Ve;_e.current=null;const In=qe(oc,xn),ao=cn?.closest("a")?.getAttribute("href");if(ao){ao.startsWith("#")&&ci(!1,In);return}if(Ue){const lo=Array.isArray(Ce)?Ce:[],ls=Kl(lo,bt,Je.state.isItemEqualToValue)?EB(lo,bt,Je.state.isItemEqualToValue):[...lo,bt];if(as(ls,In),!(pe.current?pe.current.value.trim()!=="":!1))return;Je.state.inputInsidePopup?Br("",qe(ka,In.event)):ci(!1,In)}else as(bt,In),ci(!1,In)}),qc=Ne(()=>{if(!Je.state.submitOnItemClick)return;const Ve=Je.state.inputElement?.form;Ve&&typeof Ve.requestSubmit=="function"&&Ve.requestSubmit()}),Wc=Ne(()=>{if(ul(!1),mr?.(!1),J(!1),fl(),ne(null),Nr(c==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ue&&pe.current&&pe.current.value!==""&&!Ie.current&&Br("",qe(ka)),ot)if(Je.state.inputInsidePopup)pe.current&&pe.current.value!==""&&Br("",qe(ka));else{const Ve=tr(Ce,A);pe.current&&pe.current.value!==Ve&&Br(Ve,qe(Ve===""?ka:rr))}}),O0=O.useMemo(()=>li&&ai?{current:ai.closest('[role="dialog"]')}:fe,[li,ai]);Ri({enabled:!e.actionsRef,open:ft,ref:O0,onComplete(){ft||Wc()}}),O.useImperativeHandle(e.actionsRef,()=>({unmount:Wc}),[Wc]),Fe(function(){if(ft||c==="none")return;const st=g?Rt:Te.current;if(Ue){const bt=Array.isArray(Ce)?Ce:[],cn=bt[bt.length-1],xn=nd(st,cn,L);Nr({selectedIndex:xn===-1?null:xn})}else{const bt=nd(st,Ce,L);Nr({selectedIndex:bt===-1?null:bt})}},[ft,Ce,g,c,Rt,Ue,L,Nr]),Fe(()=>{g&&(Ae.current=Tt,te.current.length=Tt.length)},[g,Tt]),Fe(()=>{const Ve=me.current;if(Ve&&(Ve.hasQuery?xe&&Je.set("activeIndex",0):xe==="always"&&Je.set("activeIndex",0),me.current=null),!ft&&!li)return;const bt=mt||Ee?Tt:Ae.current,cn=Je.state.activeIndex;if(cn==null){if(xe==="always"&&bt.length>0){Je.set("activeIndex",0);return}Pe.current!==Pl&&(Pe.current=Pl,Je.state.onItemHighlighted(void 0,sh(rr,void 0,{index:-1})));return}if(cn>=bt.length){Pe.current!==Pl&&(Pe.current=Pl,Je.state.onItemHighlighted(void 0,sh(rr,void 0,{index:-1}))),Je.set("activeIndex",null);return}const xn=bt[cn],In=Pe.current.value,ao=In!==VB&&Je.state.isItemEqualToValue(xn,In);(Pe.current.index!==cn||!ao)&&(Pe.current={value:xn,index:cn},Je.state.onItemHighlighted(xn,sh(rr,void 0,{index:cn})))},[ks,xe,Ee,mt,Tt,li,ft,Je]),Fe(()=>{if(!g||c==="none")return;const Ve=Rt;if(Ue){const cn=Array.isArray(Ce)?Ce:ti,xn=cn.filter(In=>Kl(Ve,In,Je.state.isItemEqualToValue));xn.length!==cn.length&&it(xn);return}if(Ce==null?!0:Kl(Ve,Ce,Je.state.isItemEqualToValue))return;let bt=null;if(r!=null&&Kl(Ve,r,Je.state.isItemEqualToValue)&&(bt=r),it(bt),!Je.state.inputInsidePopup){const cn=tr(bt,A);pe.current&&pe.current.value!==cn&&Br(cn,qe(rr))}},[g,Rt,Ue,c,Ce,r,it,A,Je,Br]),Fe(()=>{if(c==="none"){B(String(at)!=="");return}B(Ue?Array.isArray(Ce)&&Ce.length>0:Ce!=null)},[B,c,at,Ce,Ue]),O.useEffect(()=>{mt&&xe&&Tt.length===0&&Nr({activeIndex:null})},[mt,xe,Tt.length,Nr]),Yl(xt,()=>{!ft||xt===""||xt===String(Ze)||J(!0)}),Yl(Ce,()=>{if(c!=="none"&&(W(rt),I(Ce!==G.initialValue),j()?re.commit(Ce):re.commit(Ce,!0),Ue&&Je.state.selectedIndex!==null&&(!Array.isArray(Ce)||Ce.length===0)&&Nr({activeIndex:null,selectedIndex:null}),ot&&!tt&&!io)){const Ve=tr(Ce,A);at!==Ve&&Br(Ve,qe(rr))}}),Yl(at,()=>{c==="none"&&(W(rt),I(at!==G.initialValue),j()?re.commit(at):re.commit(at,!0))}),Yl(g,()=>{if(!ot||tt||io||Y)return;const Ve=tr(Ce,A);at!==Ve&&Br(Ve,qe(rr))});const oo=Pk({open:li?!0:ft,onOpenChange:ci,elements:{reference:io?jn:Os,floating:ai}});let Zo,ui;li||(Zo=x?"grid":"listbox",ui=ft?"true":"false");const qr=O.useMemo(()=>{const Ve=Os?.tagName==="INPUT",st=Ve||ft,bt=Ve?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return st&&(bt.role="combobox",bt["aria-expanded"]=ui,bt["aria-haspopup"]=Zo,bt["aria-controls"]=ft?Ln?.id:void 0,bt["aria-autocomplete"]=U),{reference:bt,floating:{role:"presentation"}}},[Os,ft,ui,Zo,Ln?.id,U]),pm=Wp(oo,{enabled:!p&&!We&&_,event:"mousedown-only",toggle:!1,touchOpenDelay:io?0:50}),R0=Ob(oo,{enabled:!p&&!We&&!li,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:li?!0:void 0,outsidePress(Ve){const st=sr(Ve);return!gt(jn,st)&&!gt(we.current,st)&&!gt(Le.current,st)}}),lf=Mk(oo,{enabled:!p&&!We,id:ie,listRef:te,activeIndex:ks,selectedIndex:Vc,virtual:!0,loopFocus:!0,allowEscape:!xe,focusItemOnOpen:Y||c==="none"&&!xe?!1:"auto",focusItemOnHover:k,resetOnPointerLeave:!E,cols:x?2:1,orientation:x?"horizontal":void 0,disabledIndices:ti,onNavigate(Ve,st){!st&&!ft||dl==="ending"||Nr(st?{activeIndex:Ve,type:ue.current?"keyboard":"pointer"}:{activeIndex:Ve})}}),{getReferenceProps:Gc,getFloatingProps:Jo,getItemProps:cf}=Id([qr,pm,R0,lf]);_B(()=>{Je.update({inline:D,popupProps:Jo(),inputProps:Gc(),triggerProps:Rs,getItemProps:cf,setOpen:ci,setInputValue:Br,setSelectedValue:as,setIndices:Nr,onItemHighlighted:Er,handleSelection:k0,forceMount:os,requestSubmit:qc})}),Fe(()=>{Je.update({id:ie,selectedValue:Ce,open:ft,mounted:af,transitionStatus:dl,items:g,inline:D,popupProps:Jo(),inputProps:Gc(),triggerProps:Rs,openMethod:so,getItemProps:cf,selectionMode:c,name:rt,disabled:We,readOnly:p,required:v,grid:x,isGrouped:Lt,virtualized:z,onOpenChangeComplete:mr,openOnInputClick:_,itemToStringLabel:A,modal:N,autoHighlight:xe,isItemEqualToValue:L,submitOnItemClick:K,hasInputValue:tt,requestSubmit:qc})},[Je,ie,Ce,ft,af,dl,g,Jo,Gc,cf,so,Rs,c,rt,We,p,v,re,x,Lt,z,mr,_,A,N,L,K,tt,D,qc,xe]);const Wr=ns(S,re.inputRef),uf=O.useMemo(()=>({query:xt,filteredItems:Et,flatFilteredItems:Tt}),[xt,Et,Tt]),mm=O.useMemo(()=>Array.isArray(Zt)?"":gs(Zt,R),[Zt,R]),df=Ue&&Array.isArray(Ce)&&Ce.length>0,ea=O.useMemo(()=>!Ue||!Array.isArray(Ce)||!rt?null:Ce.map(Ve=>{const st=gs(Ve,R);return w.jsx("input",{type:"hidden",name:rt,value:st},st)}),[Ue,Ce,rt,R]),gm=w.jsxs(O.Fragment,{children:[e.children,w.jsx("input",{...re.getInputValidationProps({onFocus(){if(io){jn?.focus();return}(pe.current||jn)?.focus()},onChange(Ve){if(Ve.nativeEvent.defaultPrevented)return;const st=Ve.target.value,bt=qe(ql,Ve.nativeEvent);function cn(){if(Ue)return;if(c==="none"){I(st!==G.initialValue),Br(st,bt),j()&&re.commit(st);return}const xn=Ae.current.find(In=>gs(In,R).toLowerCase()===st.toLowerCase());xn!=null&&(I(xn!==G.initialValue),as?.(xn,bt),j()&&re.commit(xn))}g?cn():(os(),queueMicrotask(cn))}}),id:ie,name:Ue||c==="none"?void 0:rt,disabled:We,required:v&&!df,readOnly:p,value:mm,ref:Wr,style:Dd,tabIndex:-1,"aria-hidden":!0}),ea]});return w.jsx(zB.Provider,{value:Je,children:w.jsx(HB.Provider,{value:oo,children:w.jsx($B.Provider,{value:uf,children:w.jsx(FB.Provider,{value:at,children:gm})})})})}const Kg=2,Nte={...Fh,...jc},Bte=O.forwardRef(function(t,n){const{render:r,className:i,nativeButton:s=!0,disabled:l=!1,...a}=t,{state:c,disabled:u,setTouched:h,setFocused:f,validationMode:p,validation:v}=rs(),{labelId:S}=nl(),x=Ko(),g=De(x,Ge.selectionMode),b=De(x,Ge.disabled),y=De(x,Ge.readOnly),_=De(x,Ge.listElement),T=De(x,Ge.triggerProps),E=De(x,Ge.triggerElement),k=De(x,Ge.inputInsidePopup),A=De(x,Ge.open),R=De(x,Ge.selectedValue),L=De(x,Ge.activeIndex),z=De(x,Ge.selectedIndex),D=Ib(),$=Wk(),N=mn(),F=u||b||l,U=O.useRef("");function H(re){U.current=re.pointerType}const K=D.select("domReferenceElement");O.useEffect(()=>{k&&E&&E!==K&&D.set("domReferenceElement",E)},[E,K,D,k]);const{reference:W}=Lk(D,{enabled:!A&&!y&&!b&&g==="single",listRef:x.state.labelsRef,activeIndex:L,selectedIndex:z,onMatch(re){const ie=x.state.valuesRef.current[re];ie!==void 0&&x.state.setSelectedValue(ie,qe("none"))}}),{reference:I}=Wp(D,{enabled:!y&&!b,event:"mousedown"}),{buttonRef:G,getButtonProps:j}=ii({native:s,disabled:F}),B=O.useMemo(()=>({...c,open:A,disabled:F}),[c,A,F]),V=Ne(re=>{x.set("triggerElement",re)});return ut("button",t,{ref:[n,G,V],state:B,props:[T,I,W,{tabIndex:k?0:-1,disabled:F,role:k?"combobox":void 0,"aria-expanded":A?"true":"false","aria-haspopup":k?"dialog":"listbox","aria-controls":A?_?.id:void 0,"aria-readonly":y||void 0,"aria-labelledby":S,onPointerDown:H,onPointerEnter:H,onFocus(){f(!0),!(F||y)&&N.start(0,x.state.forceMount)},onBlur(){if(h(!0),f(!1),p==="onBlur"){const re=g==="none"?$:R;v.commit(re)}},onMouseDown(re){if(F||y||(k||D.set("domReferenceElement",re.currentTarget),x.state.forceMount(),U.current!=="touch"&&(x.state.inputRef.current?.focus(),k||re.preventDefault()),A))return;const ie=ri(re.currentTarget);function Q(Y){if(!E)return;const J=sr(Y),ee=x.state.positionerElement,ne=x.state.listElement;if(gt(E,J)||gt(ee,J)||gt(ne,J)||J===E)return;const te=Nk(E),le=Y.clientX>=te.left-Kg&&Y.clientX<=te.right+Kg,fe=Y.clientY>=te.top-Kg&&Y.clientY<=te.bottom+Kg;le&&fe||x.state.setOpen(!1,qe("cancel-open",Y))}k&&ie.addEventListener("mouseup",Q,{once:!0})},onKeyDown(re){F||y||(re.key==="ArrowDown"||re.key==="ArrowUp")&&(Pn(re),x.state.setOpen(!0,qe(Ph,re.nativeEvent)),x.state.inputRef.current?.focus())}},v?v.getValidationProps(a):a,j],stateAttributesMapping:Nte})}),zte=O.createContext(void 0);function Hte(){return O.useContext(zte)}const qB=O.createContext(void 0);function Gk(e){const t=O.useContext(qB);if(t===void 0&&!e)throw new Error(Ut(21));return t}const $te={...Fh,...jc,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},Fte=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,id:l,...a}=t,{state:c,disabled:u,setTouched:h,setFocused:f,validationMode:p,validation:v}=rs(),{labelId:S}=nl(),x=Hte(),b=!!Gk(!0),y=Ko(),{filteredItems:_}=Ic(),T=Wk(),E=Vr(l),k=Dc(),A=De(y,Ge.disabled),R=De(y,Ge.readOnly),L=De(y,Ge.name),z=De(y,Ge.selectionMode),D=De(y,Ge.autoHighlight),$=De(y,Ge.inputProps),N=De(y,Ge.triggerProps),F=De(y,Ge.open),U=De(y,Ge.mounted),H=De(y,Ge.selectedValue),K=De(y,Ge.popupSide),W=De(y,Ge.positionerElement),I=!!D,G=U&&W?K:null,j=u||A||s,B=_.length===0,[V,X]=O.useState(null),re=O.useRef(!1),ie=Ne(ee=>{const ne=b||y.state.inline;ne&&!y.state.hasInputValue&&y.state.setInputValue("",qe(rr)),y.update({inputElement:ee,inputInsidePopup:ne})}),Q=O.useMemo(()=>({...c,open:F,disabled:j,readOnly:R,popupSide:G,listEmpty:B}),[c,F,j,R,G,B]);function Y(ee){if(!x)return;let ne;const{highlightedChipIndex:te}=x;if(te!==void 0){if(ee.key==="ArrowLeft")ee.preventDefault(),te>0?ne=te-1:ne=void 0;else if(ee.key==="ArrowRight")ee.preventDefault(),te<H.length-1?ne=te+1:ne=void 0;else if(ee.key==="Backspace"||ee.key==="Delete"){ee.preventDefault();const le=te>=H.length-1?H.length-2:te;ne=le>=0?le:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return ne}return ee.key==="ArrowLeft"&&(ee.currentTarget.selectionStart??0)===0&&H.length>0?(ee.preventDefault(),ne=Math.max(H.length-1,0)):ee.key==="Backspace"&&ee.currentTarget.value===""&&H.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),ee.preventDefault()),ne}return ut("input",t,{state:Q,ref:[n,y.state.inputRef,ie],props:[$,N,{type:"text",value:t.value??V??T,"aria-readonly":R||void 0,"aria-labelledby":S,disabled:j,readOnly:R,...z==="none"&&L&&{name:L},id:E,onFocus(){f(!0)},onBlur(){if(h(!0),f(!1),p==="onBlur"){const ee=z==="none"?T:H;v.commit(ee)}},onCompositionStart(ee){Vv||(re.current=!0,X(ee.currentTarget.value))},onCompositionEnd(ee){re.current=!1;const ne=ee.currentTarget.value;X(null),y.state.setInputValue(ne,qe(ql,ee.nativeEvent))},onChange(ee){if(re.current){const fe=ee.currentTarget.value;X(fe),fe===""&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,qe(ka,ee.nativeEvent));const pe=fe.trim(),de=I&&pe!=="";!R&&!j&&pe!==""&&(y.state.setOpen(!0,qe(ql,ee.nativeEvent)),I||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),F&&y.state.activeIndex!==null&&!de&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"});return}y.state.setInputValue(ee.currentTarget.value,qe(ql,ee.nativeEvent));const ne=ee.currentTarget.value==="",te=qe(ka,ee.nativeEvent);ne&&!y.state.inputInsidePopup&&(z==="single"&&y.state.setSelectedValue(null,te),y.state.openOnInputClick||y.state.setOpen(!1,te));const le=ee.currentTarget.value.trim();!R&&!j&&le!==""&&(y.state.setOpen(!0,qe(ql,ee.nativeEvent)),I||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),F&&y.state.activeIndex!==null&&!I&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(ee){if(j||R||ee.ctrlKey||ee.shiftKey||ee.altKey||ee.metaKey)return;y.state.keyboardActiveRef.current=!0;const ne=ee.currentTarget,te=ne.scrollWidth-ne.clientWidth,le=k==="rtl";if(ee.key==="Home"){Pn(ee);const pe=cL&&le?ne.value.length:0;ne.setSelectionRange(pe,pe),ne.scrollLeft=0;return}if(ee.key==="End"){Pn(ee);const pe=cL&&le?0:ne.value.length;ne.setSelectionRange(pe,pe),ne.scrollLeft=le?-te:te;return}if(!U&&ee.key==="Escape"){const pe=z==="multiple"&&Array.isArray(H)?H.length===0:H===null,de=qe(wb,ee.nativeEvent),ue=z==="multiple"?[]:null;y.state.setInputValue("",de),y.state.setSelectedValue(ue,de),!pe&&!y.state.inline&&!de.isPropagationAllowed&&ee.stopPropagation();return}if(x&&ee.key==="Backspace"&&ne.value===""&&x.highlightedChipIndex===void 0&&Array.isArray(H)&&H.length>0){const pe=H.slice(0,-1);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"}),y.state.setSelectedValue(pe,qe(rr,ee.nativeEvent));return}const fe=Y(ee);if(x?.setHighlightedChipIndex(fe),fe!==void 0?x?.chipsRef.current[fe]?.focus():y.state.inputRef.current?.focus(),ee.which!==229&&ee.key==="Enter"&&F){const pe=y.state.activeIndex,de=ee.nativeEvent;if(pe===null){y.state.setOpen(!1,qe(rr,de));return}Pn(ee);const ue=y.state.listRef.current[pe];ue&&(y.state.selectionEventRef.current=de,ue.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},v?v.getValidationProps(a):a],stateAttributesMapping:$te})}),Ute={...eo,...gk},Vte=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,keepMounted:a=!1,...c}=t,{disabled:u}=rs(),h=Ko(),f=De(h,Ge.selectionMode),p=De(h,Ge.disabled),v=De(h,Ge.readOnly),S=De(h,Ge.open),x=De(h,Ge.selectedValue),g=Wk();let b=!1;f==="none"?b=g!=="":f==="single"?b=x!=null:b=Array.isArray(x)&&x.length>0;const y=u||p||s,{buttonRef:_,getButtonProps:T}=ii({native:l,disabled:y}),{mounted:E,transitionStatus:k,setMounted:A}=Go(b),R=O.useMemo(()=>({disabled:y,open:S,transitionStatus:k}),[y,S,k]);Ri({open:b,ref:h.state.clearRef,onComplete(){b||A(!1)}});const L=ut("button",t,{state:R,ref:[n,_,h.state.clearRef],props:[{tabIndex:-1,children:"x",disabled:y,"aria-readonly":v||void 0,onMouseDown(D){D.preventDefault()},onClick(D){if(y||v)return;const $=h.state.keyboardActiveRef;h.state.setInputValue("",qe(oL,D.nativeEvent)),f!=="none"?(h.state.setSelectedValue(Array.isArray(x)?[]:null,qe(oL,D.nativeEvent)),h.state.setIndices({activeIndex:null,selectedIndex:null,type:$.current?"keyboard":"pointer"})):h.state.setIndices({activeIndex:null,type:$.current?"keyboard":"pointer"}),h.state.inputRef.current?.focus()}},c,T],stateAttributesMapping:Ute});return a||E?L:null}),qte=O.createContext(null);function Wte(){return O.useContext(qte)}function Gte(e){const{children:t}=e,{filteredItems:n}=Ic(),r=Wte(),i=r?r.items:n;return i?w.jsx(O.Fragment,{children:i.map(t)}):null}const Kte=O.forwardRef(function(t,n){var r;const{render:i,className:s,children:l,...a}=t,c=Ko(),u=Ib(),h=!!Gk(!0),{filteredItems:f}=Ic(),p=De(c,Ge.items),v=De(c,Ge.labelsRef),S=De(c,Ge.listRef),x=De(c,Ge.selectionMode),g=De(c,Ge.grid),b=De(c,Ge.popupProps),y=De(c,Ge.disabled),_=De(c,Ge.readOnly),T=De(c,Ge.virtualized),E=x==="multiple",k=f.length===0,A=Ne(N=>{c.set("positionerElement",N)}),R=Ne(N=>{c.set("listElement",N)}),L=O.useMemo(()=>typeof l=="function"?r||(r=w.jsx(Gte,{children:l})):l,[l]),z=O.useMemo(()=>({empty:k}),[k]),D=u.useState("floatingId"),$=ut("div",t,{state:z,ref:[n,R,h?null:A],props:[b,{children:L,tabIndex:-1,id:D,role:g?"grid":"listbox","aria-multiselectable":E?"true":void 0,onKeyDown(N){if(!(y||_)&&N.key==="Enter"){const F=c.state.activeIndex;if(F==null)return;Pn(N);const U=N.nativeEvent,H=c.state.listRef.current[F];H&&(c.state.selectionEventRef.current=U,H.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},a]});return T?$:w.jsx(Zp,{elementsRef:S,labelsRef:p?void 0:v,children:$})}),WB=O.createContext(void 0);function Yte(){const e=O.useContext(WB);if(e===void 0)throw new Error(Ut(20));return e}const Xte=O.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,s=Ko(),l=De(s,Ge.mounted),a=De(s,Ge.forceMounted);return l||r||a?w.jsx(WB.Provider,{value:r,children:w.jsx(Eb,{ref:n,...i})}):null}),Qte=O.forwardRef(function(t,n){const{render:r,className:i,anchor:s,positionMethod:l="absolute",side:a="bottom",align:c="center",sideOffset:u=0,alignOffset:h=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:x=!1,collisionAvoidance:g=lk,...b}=t,y=Ko(),{filteredItems:_}=Ic(),T=Ib(),E=Yte(),k=De(y,Ge.modal),A=De(y,Ge.open),R=De(y,Ge.mounted),L=De(y,Ge.openMethod),z=De(y,Ge.triggerElement),D=De(y,Ge.inputElement),$=De(y,Ge.inputInsidePopup),N=_.length===0,U=Bk({anchor:s??($?z:D),floatingRootContext:T,positionMethod:l,mounted:R,side:a,sideOffset:u,align:c,alignOffset:h,arrowPadding:v,collisionBoundary:f,collisionPadding:p,sticky:S,disableAnchorTracking:x,keepMounted:E,collisionAvoidance:g,lazyFlip:!0});Lb(A&&k&&L!=="touch",z);const H=O.useMemo(()=>{const j={...U.positionerStyles};return A||(j.pointerEvents="none"),{role:"presentation",hidden:!R,style:j}},[A,R,U.positionerStyles]),K=O.useMemo(()=>({open:A,side:U.side,align:U.align,anchorHidden:U.anchorHidden,empty:N}),[A,U.side,U.align,U.anchorHidden,N]);Fe(()=>{y.set("popupSide",U.side)},[y,U.side]);const W=O.useMemo(()=>({side:U.side,align:U.align,arrowRef:U.arrowRef,arrowUncentered:U.arrowUncentered,arrowStyles:U.arrowStyles,anchorHidden:U.anchorHidden,isPositioned:U.isPositioned}),[U.side,U.align,U.arrowRef,U.arrowUncentered,U.arrowStyles,U.anchorHidden,U.isPositioned]),I=Ne(j=>{y.set("positionerElement",j)}),G=ut("div",t,{state:K,ref:[n,I],props:[H,b],stateAttributesMapping:Ja});return w.jsxs(qB.Provider,{value:W,children:[R&&k&&w.jsx(Mb,{inert:Pb(!A),cutout:D??z}),G]})}),Zte={...Ja,...eo},Jte=O.forwardRef(function(t,n){const{render:r,className:i,initialFocus:s,finalFocus:l,...a}=t,c=Ko(),u=Gk(),h=Ib(),{filteredItems:f}=Ic(),p=De(c,Ge.mounted),v=De(c,Ge.open),S=De(c,Ge.openMethod),x=De(c,Ge.transitionStatus),g=De(c,Ge.inputInsidePopup),b=De(c,Ge.inputElement),y=f.length===0;Ri({open:v,ref:c.state.popupRef,onComplete(){v&&c.state.onOpenChangeComplete(!0)}});const _=O.useMemo(()=>({open:v,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:x,empty:y}),[v,u.side,u.align,u.anchorHidden,x,y]),T=ut("div",t,{state:_,ref:[n,c.state.popupRef],props:[{role:g?"dialog":"presentation",tabIndex:-1,onFocus(R){const L=sr(R.nativeEvent);S!=="touch"&&(gt(c.state.listElement,L)||L===R.currentTarget)&&c.state.inputRef.current?.focus()}},$k(x),a],stateAttributesMapping:Zte}),k=s===void 0?g?R=>R==="touch"?c.state.popupRef.current:b:!1:s;let A;return l!=null?A=l:A=g?void 0:!1,w.jsx(Tb,{context:h,disabled:!p,modal:!g,openInteractionType:S,initialFocus:k,returnFocus:A,children:T})}),GB=O.createContext(void 0);function KB(){const e=O.useContext(GB);if(!e)throw new Error(Ut(19));return e}const ene=O.createContext(!1);function tne(){return O.useContext(ene)}const nne=O.memo(O.forwardRef(function(t,n){const{render:r,className:i,value:s=null,index:l,disabled:a=!1,nativeButton:c=!1,...u}=t,h=O.useRef(!1),f=O.useRef(null),p=Nd({index:l,textRef:f,indexGuessBehavior:Fk.GuessFromOrder}),v=Ko(),S=tne(),{flatFilteredItems:x}=Ic(),g=De(v,Ge.open),b=De(v,Ge.selectionMode),y=De(v,Ge.readOnly),_=De(v,Ge.virtualized),T=De(v,Ge.isItemEqualToValue),E=b!=="none",k=l??(_?nd(x,s,T):p.index),A=p.index!==-1,R=De(v,Ge.id),L=De(v,Ge.isActive,k),z=De(v,Ge.isSelected,s),D=De(v,Ge.items),$=De(v,Ge.getItemProps),N=O.useRef(null),F=R!=null&&A?`${R}-${k}`:void 0,U=z&&E;Fe(()=>{if(!(A&&(_||l!=null)))return;const re=v.state.listRef.current;return re[k]=N.current,()=>{delete re[k]}},[A,_,k,l,v]),Fe(()=>{if(!A||D)return;const X=v.state.valuesRef.current;return X[k]=s,b!=="none"&&v.state.allValuesRef.current.push(s),()=>{delete X[k]}},[A,D,k,s,v,b]),Fe(()=>{if(!g){h.current=!1;return}if(!A||D)return;const X=v.state.selectedValue,re=Array.isArray(X)?X[X.length-1]:X;zo(re,s,T)&&v.set("selectedIndex",k)},[A,D,g,v,k,s,T]);const H=O.useMemo(()=>({disabled:a,selected:U,highlighted:L}),[a,U,L]),K=$({active:L,selected:U});K.id=void 0,K.onFocus=void 0;const{getButtonProps:W,buttonRef:I}=ii({disabled:a,focusableWhenDisabled:!0,native:c});function G(X){function re(){v.state.handleSelection(X,s)}v.state.submitOnItemClick?(Ir.flushSync(re),v.state.requestSubmit()):re()}const j={id:F,role:S?"gridcell":"option","aria-disabled":a||void 0,"aria-selected":E?U:void 0,tabIndex:void 0,onPointerDownCapture(X){h.current=!0,X.preventDefault()},onClick(X){a||y||G(X.nativeEvent)},onMouseUp(X){const re=h.current;h.current=!1,!(a||y||X.button!==0||re||!L)&&G(X.nativeEvent)}},B=ut("div",t,{ref:[I,n,p.ref,N],state:H,props:[K,j,u,W]}),V=O.useMemo(()=>({selected:U,textRef:f}),[U,f]);return w.jsx(GB.Provider,{value:V,children:B})})),rne=O.forwardRef(function(t,n){const{render:r,className:i,children:s,...l}=t,{filteredItems:a}=Ic(),c=Ko(),u=a.length===0?s:null;return ut("div",t,{ref:[n,c.state.emptyRef],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},l]})});let qL=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function YB(e){return O.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[qL.checked]:""}:{[qL.unchecked]:""}},...jc}),[e.indeterminate])}const XB=O.createContext(void 0);function ine(){const e=O.useContext(XB);if(e===void 0)throw new Error(Ut(14));return e}const sne="data-parent",one=O.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:s=!1,disabled:l=!1,id:a,indeterminate:c=!1,inputRef:u,name:h,onCheckedChange:f,parent:p=!1,readOnly:v=!1,render:S,required:x=!1,uncheckedValue:g,value:b,nativeButton:y=!1,..._}=t,{clearErrors:T}=Yp(),{disabled:E,name:k,setDirty:A,setFilled:R,setFocused:L,setTouched:z,state:D,validationMode:$,validityData:N,shouldValidateOnChange:F,validation:U}=rs(),H=ree(),{labelId:K,controlId:W,setControlId:I,getDescriptionProps:G}=nl(),j=see(),B=j?.parent,V=B&&j.allValues,X=E||H.disabled||j?.disabled||l,re=k??h,ie=b??re,Q=Vr(),Y=Vr();let J=W;V?J=p?Y:`${B.id}-${ie}`:a&&(J=a);let ee={};V&&(p?ee=j.parent.getParentProps():ie&&(ee=j.parent.getChildProps(ie)));const ne=Ne(f),{checked:te=r,indeterminate:le=c,onCheckedChange:fe,...pe}=ee,de=j?.value,ue=j?.setValue,Ie=j?.defaultValue,Le=O.useRef(null),{getButtonProps:we,buttonRef:_e}=ii({disabled:X,native:y}),Pe=j?.validation??U,[me,Ae]=Zi({controlled:ie&&de&&!p?de.includes(ie):te,default:ie&&Ie&&!p?Ie.includes(ie):s,name:"Checkbox",state:"checked"});Fe(()=>{if(I!==wn)return I(J),()=>{I(void 0)}},[J,j,I,p]),Xp({enabled:!j,id:Q,commit:Pe.commit,value:me,controlRef:Le,name:re,getValue:()=>me});const Te=O.useRef(null),We=ns(u,Te,Pe.inputRef);Fe(()=>{Te.current&&(Te.current.indeterminate=le,me&&R(!0))},[me,le,R]),Yl(me,()=>{j&&!p||(T(re),R(me),A(me!==N.initialValue),F()?Pe.commit(me):Pe.commit(me,!0))});const rt=Qs({checked:me,disabled:X,name:p?void 0:re,id:J??void 0,required:x,ref:We,style:Dd,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(xe){if(xe.nativeEvent.defaultPrevented)return;const Ce=xe.target.checked,it=qe(rr,xe.nativeEvent);if(fe?.(Ce,it),ne(Ce,it),!it.isCanceled&&(Ae(Ce),ie&&de&&ue&&!p)){const dt=Ce?[...de,ie]:de.filter(Ze=>Ze!==ie);ue(dt,it)}},onFocus(){Le.current?.focus()}},b!==void 0?{value:(j?me&&b:b)||""}:yn,G,j?Pe.getValidationProps:Pe.getInputValidationProps),Ue=V?!!te:me,ot=V&&le||c;O.useEffect(()=>{B&&ie&&B.disabledStatesRef.current.set(ie,X)},[B,X,ie]);const tt=O.useMemo(()=>({...D,checked:Ue,disabled:X,readOnly:v,required:x,indeterminate:ot}),[D,Ue,X,v,x,ot]),mt=YB(tt),Ee=ut("span",t,{state:tt,ref:[_e,Le,n,j?.registerControlRef],props:[{id:Q,role:"checkbox","aria-checked":le?"mixed":me,"aria-readonly":v||void 0,"aria-required":x||void 0,"aria-labelledby":K,[sne]:p?"":void 0,onFocus(){L(!0)},onBlur(){const xe=Te.current;xe&&(z(!0),L(!1),$==="onBlur"&&Pe.commit(j?de:xe.checked))},onClick(xe){v||X||(xe.preventDefault(),Te.current?.click())}},G,Pe.getValidationProps,_,pe,we],stateAttributesMapping:mt});return w.jsxs(XB.Provider,{value:tt,children:[Ee,!me&&!j&&re&&!p&&g!==void 0&&w.jsx("input",{type:"hidden",name:re,value:g}),w.jsx("input",{...rt})]})}),ane=O.forwardRef(function(t,n){const{render:r,className:i,keepMounted:s=!1,...l}=t,a=ine(),c=a.checked||a.indeterminate,{transitionStatus:u,setMounted:h}=Go(c),f=O.useRef(null),p=O.useMemo(()=>({...a,transitionStatus:u}),[a,u]);Ri({open:c,ref:f,onComplete(){c||h(!1)}});const v=YB(a),S=O.useMemo(()=>({...v,...eo,...jc}),[v]),x=s||c,g=ut("span",t,{enabled:x,ref:[n,f],state:p,stateAttributesMapping:S,props:l});return x?g:null});function lne(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,...s}=e;return w.jsx(Ite,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i})}const cne=O.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=KB();return r||i?w.jsx(une,{...t,ref:n}):null}),une=O.memo(O.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...s}=e,{selected:l}=KB(),a=O.useRef(null),{transitionStatus:c,setMounted:u}=Go(l),h=O.useMemo(()=>({selected:l,transitionStatus:c}),[l,c]),f=ut("span",e,{ref:[t,a],state:h,props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:eo});return Ri({open:l,ref:a,onComplete(){l||u(!1)}}),f})),dne=O.createContext(void 0);function Nb(e=!0){const t=O.useContext(dne);if(t===void 0&&!e)throw new Error(Ut(25));return t}const QB=O.createContext(void 0);function Kk(e){const t=O.useContext(QB);if(t===void 0&&!e)throw new Error(Ut(33));return t}const ZB=O.createContext(void 0);function rl(e){const t=O.useContext(ZB);if(t===void 0&&!e)throw new Error(Ut(36));return t}const JB={type:"regular-item"};function ez(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:s,nativeButton:l,itemMetadata:a,nodeId:c}=e,u=O.useRef(null),h=Nb(!0),f=h!==void 0,{events:p}=s.useState("floatingTreeRoot"),{getButtonProps:v,buttonRef:S}=ii({disabled:n,focusableWhenDisabled:!0,native:l}),x=O.useCallback(b=>Qs({id:i,role:"menuitem",tabIndex:r?0:-1,onMouseMove(y){c&&p.emit("itemhover",{nodeId:c,target:y.currentTarget})},onMouseEnter(){a.type==="submenu-trigger"&&a.setActive()},onKeyUp(y){y.key===" "&&s.context.typingRef.current&&y.preventBaseUIHandler()},onClick(y){t&&p.emit("close",{domEvent:y,reason:oc})},onMouseUp(y){if(h){const _=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,f&&_&&Math.abs(y.clientX-_.x)<=1&&Math.abs(y.clientY-_.y)<=1)return}u.current&&s.context.allowMouseUpTriggerRef.current&&(!f||y.button===2)&&a.type==="regular-item"&&u.current.click()}},b,v),[i,r,v,t,p,s,f,h,a,c]),g=ns(u,S);return O.useMemo(()=>({getItemProps:x,itemRef:g}),[x,g])}let WL=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const tz={checked(e){return e?{[WL.checked]:""}:{[WL.unchecked]:""}},...eo},fne=O.forwardRef(function(t,n){const{render:r,className:i,id:s,label:l,nativeButton:a=!1,disabled:c=!1,closeOnClick:u=!0,...h}=t,f=Nd({label:l}),p=Kk(!0),v=Vr(s),{store:S}=rl(),x=S.useState("isActive",f.index),g=S.useState("itemProps"),{getItemProps:b,itemRef:y}=ez({closeOnClick:u,disabled:c,highlighted:x,id:v,store:S,nativeButton:a,nodeId:p?.nodeId,itemMetadata:JB}),_=O.useMemo(()=>({disabled:c,highlighted:x}),[c,x]);return ut("div",t,{state:_,props:[g,h,b],ref:[y,n,f.ref]})}),hne={...Ja,...eo},pne=O.forwardRef(function(t,n){const{render:r,className:i,finalFocus:s,...l}=t,{store:a}=rl(),{side:c,align:u}=Kk(),h=Hk()!=null,f=a.useState("open"),p=a.useState("transitionStatus"),v=a.useState("popupProps"),S=a.useState("mounted"),x=a.useState("instantType"),g=a.useState("activeTriggerElement"),b=a.useState("parent"),y=a.useState("lastOpenChangeReason"),_=a.useState("rootId"),T=a.useState("floatingRootContext"),E=a.useState("floatingTreeRoot"),k=a.useState("closeDelay"),A=a.useState("activeTriggerElement");Ri({open:f,ref:a.context.popupRef,onComplete(){f&&a.context.onOpenChangeComplete?.(!0)}}),O.useEffect(()=>{function N(F){a.setOpen(!1,qe(F.reason,F.domEvent))}return E.events.on("close",N),()=>{E.events.off("close",N)}},[E.events,a]);const R=a.useState("hoverEnabled"),L=a.useState("disabled");gJ(T,{enabled:R&&!L&&b.type!=="context-menu"&&b.type!=="menubar",closeDelay:k});const z=O.useMemo(()=>({transitionStatus:p,side:c,align:u,open:f,nested:b.type==="menu",instant:x}),[p,c,u,f,b.type,x]),D=ut("div",t,{state:z,ref:[n,a.context.popupRef],stateAttributesMapping:hne,props:[v,{onKeyDown(N){h&&jk.has(N.key)&&N.stopPropagation()}},$k(p),l,{"data-rootownerid":_}]});let $=b.type===void 0||b.type==="context-menu";return(g||b.type==="menubar"&&y!==vk)&&($=!0),w.jsx(Tb,{context:T,modal:!1,disabled:!S,returnFocus:s===void 0?$:s,initialFocus:b.type!=="menu",restoreFocus:!0,externalTree:b.type!=="menubar"?E:void 0,previousFocusableElement:A,nextFocusableElement:b.type===void 0?a.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:b.type===void 0?a.context.beforeContentFocusGuardRef:void 0,children:D})}),nz=O.createContext(void 0);function mne(){const e=O.useContext(nz);if(e===void 0)throw new Error(Ut(32));return e}const gne=O.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:s}=rl();return s.useState("mounted")||r?w.jsx(nz.Provider,{value:r,children:w.jsx(Eb,{ref:n,...i})}):null}),vne=O.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:s,render:l,side:a,align:c,sideOffset:u=0,alignOffset:h=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:x=!1,collisionAvoidance:g=lk,...b}=t,{store:y}=rl(),_=mne(),T=Nb(!0),E=y.useState("parent"),k=y.useState("floatingRootContext"),A=y.useState("floatingTreeRoot"),R=y.useState("mounted"),L=y.useState("open"),z=y.useState("modal"),D=y.useState("activeTriggerElement"),$=y.useState("lastOpenChangeReason"),N=y.useState("floatingNodeId"),F=y.useState("floatingParentNodeId");let U=r,H=u,K=h,W=c,I=g;E.type==="context-menu"&&(U=r??E.context?.anchor,W=W??"start",!a&&W!=="center"&&(K=t.alignOffset??2,H=t.sideOffset??-5));let G=a,j=W;E.type==="menu"?(G=G??"inline-end",j=j??"start",I=t.collisionAvoidance??OY):E.type==="menubar"&&(G=G??"bottom",j=j??"start");const B=E.type==="context-menu",V=Bk({anchor:U,floatingRootContext:k,positionMethod:T?"fixed":i,mounted:R,side:G,sideOffset:H,align:j,alignOffset:K,arrowPadding:B?0:v,collisionBoundary:f,collisionPadding:p,sticky:S,nodeId:N,keepMounted:_,disableAnchorTracking:x,collisionAvoidance:I,shiftCrossAxis:B,externalTree:A}),X=O.useMemo(()=>{const ee={};return L||(ee.pointerEvents="none"),{role:"presentation",hidden:!R,style:{...V.positionerStyles,...ee}}},[L,R,V.positionerStyles]);O.useEffect(()=>{function ee(ne){ne.open?(ne.parentNodeId===N&&y.set("hoverEnabled",!1),ne.nodeId!==N&&ne.parentNodeId===y.select("floatingParentNodeId")&&y.setOpen(!1,qe(Sh))):ne.parentNodeId===N&&ne.reason!==Sh&&y.set("hoverEnabled",!0)}return A.events.on("menuopenchange",ee),()=>{A.events.off("menuopenchange",ee)}},[y,A.events,N]),O.useEffect(()=>{if(y.select("floatingParentNodeId")==null)return;function ee(ne){if(ne.open||ne.nodeId!==y.select("floatingParentNodeId"))return;const te=ne.reason??Sh;y.setOpen(!1,qe(te))}return A.events.on("menuopenchange",ee),()=>{A.events.off("menuopenchange",ee)}},[A.events,y]),O.useEffect(()=>{function ee(ne){!L||ne.nodeId!==y.select("floatingParentNodeId")||ne.target&&D&&D!==ne.target&&y.setOpen(!1,qe(Sh))}return A.events.on("itemhover",ee),()=>{A.events.off("itemhover",ee)}},[A.events,L,D,y]),O.useEffect(()=>{const ee={open:L,nodeId:N,parentNodeId:F,reason:y.select("lastOpenChangeReason")};A.events.emit("menuopenchange",ee)},[A.events,L,y,N,F]);const re=O.useMemo(()=>({open:L,side:V.side,align:V.align,anchorHidden:V.anchorHidden,nested:E.type==="menu"}),[L,V.side,V.align,V.anchorHidden,E.type]),ie=O.useMemo(()=>({side:V.side,align:V.align,arrowRef:V.arrowRef,arrowUncentered:V.arrowUncentered,arrowStyles:V.arrowStyles,nodeId:V.context.nodeId}),[V.side,V.align,V.arrowRef,V.arrowUncentered,V.arrowStyles,V.context.nodeId]),Q=ut("div",t,{state:re,stateAttributesMapping:Ja,ref:[n,y.useStateSetter("positionerElement")],props:[X,b]}),Y=R&&E.type!=="menu"&&(E.type!=="menubar"&&z&&$!==wi||E.type==="menubar"&&E.context.modal);let J=null;return E.type==="menubar"?J=E.context.contentElement:E.type===void 0&&(J=D),w.jsxs(QB.Provider,{value:ie,children:[Y&&w.jsx(Mb,{ref:E.type==="context-menu"||E.type==="nested-context-menu"?E.context.internalBackdropRef:null,inert:Pb(!L),cutout:J}),w.jsx($Q,{id:N,children:w.jsx(Zp,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:Q})})]})}),rz=O.createContext(void 0);function yne(){const e=O.useContext(rz);if(e===void 0)throw new Error(Ut(34));return e}const bne=O.memo(O.forwardRef(function(t,n){const{render:r,className:i,value:s,defaultValue:l,onValueChange:a,disabled:c=!1,...u}=t,[h,f]=Zi({controlled:s,default:l,name:"MenuRadioGroup"}),p=Ne(a),v=Ne((b,y)=>{p?.(b,y),!y.isCanceled&&f(b)}),S=O.useMemo(()=>({disabled:c}),[c]),x=ut("div",t,{state:S,ref:n,props:{role:"group","aria-disabled":c||void 0,...u}}),g=O.useMemo(()=>({value:h,setValue:v,disabled:c}),[h,v,c]);return w.jsx(rz.Provider,{value:g,children:x})})),iz=O.createContext(void 0);function _ne(){const e=O.useContext(iz);if(e===void 0)throw new Error(Ut(35));return e}const xne=O.forwardRef(function(t,n){const{render:r,className:i,id:s,label:l,nativeButton:a=!1,disabled:c=!1,closeOnClick:u=!1,value:h,...f}=t,p=Nd({label:l}),v=Kk(!0),S=Vr(s),{store:x}=rl(),g=x.useState("isActive",p.index),b=x.useState("itemProps"),{value:y,setValue:_,disabled:T}=yne(),E=T||c,k=y===h,{getItemProps:A,itemRef:R}=ez({closeOnClick:u,disabled:E,highlighted:g,id:S,store:x,nativeButton:a,nodeId:v?.nodeId,itemMetadata:JB}),L=O.useMemo(()=>({disabled:E,highlighted:g,checked:k}),[E,g,k]),z=Ne($=>{const N={...qe(oc,$.nativeEvent),preventUnmountOnClose:()=>{}};_(h,N)}),D=ut("div",t,{state:L,stateAttributesMapping:tz,props:[b,{role:"menuitemradio","aria-checked":k,onClick:z},f,A],ref:[R,n,p.ref]});return w.jsx(iz.Provider,{value:L,children:D})}),Sne=O.forwardRef(function(t,n){const{render:r,className:i,keepMounted:s=!1,...l}=t,a=_ne(),c=O.useRef(null),{transitionStatus:u,setMounted:h}=Go(a.checked);Ri({open:a.checked,ref:c,onComplete(){a.checked||h(!1)}});const f=O.useMemo(()=>({checked:a.checked,disabled:a.disabled,highlighted:a.highlighted,transitionStatus:u}),[a.checked,a.disabled,a.highlighted,u]);return ut("span",t,{state:f,stateAttributesMapping:tz,ref:[n,c],props:{"aria-hidden":!0,...l},enabled:s||a.checked})}),wne=O.createContext(null);function sz(e){return O.useContext(wne)}const Cne={...rB,disabled:Re(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:Re(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:Re(e=>e.parent.type==="menu"?e.parent.store.select("allowMouseEnter"):e.allowMouseEnter),stickIfOpen:Re(e=>e.stickIfOpen),parent:Re(e=>e.parent),rootId:Re(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:Re(e=>e.activeIndex),isActive:Re((e,t)=>e.activeIndex===t),hoverEnabled:Re(e=>e.hoverEnabled),instantType:Re(e=>e.instantType),lastOpenChangeReason:Re(e=>e.openChangeReason),floatingTreeRoot:Re(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Re(e=>e.floatingNodeId),floatingParentNodeId:Re(e=>e.floatingParentNodeId),itemProps:Re(e=>e.itemProps),closeDelay:Re(e=>e.closeDelay),keyboardEventRelay:Re(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Yk extends Rk{constructor(t){super({...Ene(),...t},{positionerRef:O.createRef(),popupRef:O.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:O.createRef(),beforeContentFocusGuardRef:O.createRef(),onOpenChangeComplete:void 0,triggerElements:new Rb},Cne),this.observe(Re(n=>n.allowMouseEnter),(n,r)=>{this.state.parent.type==="menu"&&n!==r&&this.state.parent.store.set("allowMouseEnter",n)}),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){this.unsubscribeParentListener=n.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}static useStore(t,n){return Cr(()=>t??new Yk(n)).current}unsubscribeParentListener=null}function Ene(){return{...nB(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Tk,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:yn,keyboardEventRelay:void 0,closeDelay:0}}const Tne=O.createContext(void 0);function kne(){return O.useContext(Tne)}function One(e){const{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:s=!1,disabled:l=!1,modal:a,loopFocus:c=!0,orientation:u="vertical",actionsRef:h,closeParentOnEsc:f=!1,handle:p,triggerId:v,defaultTriggerId:S=null,highlightItemOnHover:x=!0}=e,g=Nb(!0),b=rl(!0),y=sz(),_=kne(),T=O.useMemo(()=>_&&b?{type:"menu",store:b.store}:y?{type:"menubar",context:y}:g&&!b?{type:"context-menu",context:g}:{type:void 0},[g,b,y,_]),E=Yk.useStore(p?.store,{parent:T}),k=E.useState("floatingTreeRoot"),A=z7(k),R=Wo();Fe(()=>{g&&!b?E.update({parent:{type:"context-menu",context:g},floatingNodeId:A,floatingParentNodeId:R}):b&&E.update({floatingNodeId:A,floatingParentNodeId:R})},[g,b,A,R,E]),E.useControlledProp("open",n,s),E.useControlledProp("activeTriggerId",v,S),E.useContextCallback("onOpenChangeComplete",i);const L=E.useState("open"),z=E.useState("activeTriggerElement"),D=E.useState("positionerElement"),$=E.useState("hoverEnabled"),N=E.useState("modal"),F=E.useState("disabled"),U=E.useState("lastOpenChangeReason"),H=E.useState("parent"),K=E.useState("activeIndex"),W=E.useState("payload"),I=E.useState("floatingParentNodeId"),G=O.useRef(null),j=I!=null;let B;E.useSyncedValues({disabled:l,modal:H.type===void 0?a:void 0,rootId:Mc()});const{openMethod:V,triggerProps:X,reset:re}=jb(L);eB(E);const{forceUnmount:ie}=tB(L,E,()=>{E.update({allowMouseEnter:!1,stickIfOpen:!0}),re()}),Q=O.useRef(H.type!=="context-menu"),Y=mn();O.useEffect(()=>{if(L||(G.current=null),H.type==="context-menu"){if(!L){Y.clear(),Q.current=!1;return}Y.start(500,()=>{Q.current=!0})}},[Y,L,H.type]),Lb(L&&N&&U!==wi&&V!=="touch",D),Fe(()=>{!L&&!$&&E.set("hoverEnabled",!0)},[L,$,E]);const J=O.useRef(!0),ee=mn(),ne=Ne((Ce,it)=>{const dt=it.reason;if(L===Ce&&it.trigger===z||(it.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},!Ce&&it.trigger==null&&(it.trigger=z??void 0),r?.(Ce,it),it.isCanceled))return;const Ze={open:Ce,nativeEvent:it.event,reason:it.reason,nested:j};B?.emit("openchange",Ze);const at=it.event;if(Ce===!1&&at?.type==="click"&&at.pointerType==="touch"&&!J.current)return;if(!Ce&&K!==null){const Lt=E.context.itemDomElements.current[K];queueMicrotask(()=>{Lt?.setAttribute("tabindex","-1")})}Ce&&dt===Uv?(J.current=!1,ee.start(300,()=>{J.current=!0})):(J.current=!0,ee.clear());const Ot=(dt===sc||dt===oc)&&at.detail===0&&at?.isTrusted,ft=!Ce&&(dt===wb||dt==null);function _n(){const Lt={open:Ce,openChangeReason:dt};G.current=it.event??null;const xt=it.trigger?.id??null;(xt||Ce)&&(Lt.activeTriggerId=xt,Lt.activeTriggerElement=it.trigger??null),E.update(Lt)}dt===wi?Ir.flushSync(_n):_n(),H.type==="menubar"&&(dt===Uv||dt===xc||dt===wi||dt===Ph||dt===Sh)?E.set("instantType","group"):Ot||ft?E.set("instantType",Ot?"click":"dismiss"):E.set("instantType",void 0)}),te=O.useCallback(Ce=>{const it=qe(Ce);return it.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},it},[E]),le=O.useCallback(()=>{E.setOpen(!1,te(c7))},[E,te]);O.useImperativeHandle(h,()=>({unmount:ie,close:le}),[ie,le]);let fe;H.type==="context-menu"&&(fe=H.context),O.useImperativeHandle(fe?.positionerRef,()=>D,[D]),O.useImperativeHandle(fe?.actionsRef,()=>({setOpen:ne}),[ne]);const pe=iB({popupStore:E,onOpenChange:ne});B=pe.context.events,O.useEffect(()=>{const Ce=({open:it,eventDetails:dt})=>ne(it,dt);return B.on("setOpen",Ce),()=>{B?.off("setOpen",Ce)}},[B,ne]);const de=Ob(pe,{enabled:!F,bubbles:f&&H.type==="menu",outsidePress(){return H.type!=="context-menu"||G.current?.type==="contextmenu"?!0:Q.current},externalTree:j?k:void 0}),ue=oB(pe,{role:"menu"}),Ie=Dc(),Le=O.useCallback(Ce=>{E.select("activeIndex")!==Ce&&E.set("activeIndex",Ce)},[E]),we=Mk(pe,{enabled:!F,listRef:E.context.itemDomElements,activeIndex:K,nested:H.type!==void 0,loopFocus:c,orientation:u,parentOrientation:H.type==="menubar"?H.context.orientation:void 0,rtl:Ie==="rtl",disabledIndices:ti,onNavigate:Le,openOnArrowKeyDown:H.type!=="context-menu",externalTree:j?k:void 0,focusItemOnHover:x}),_e=O.useCallback(Ce=>{E.context.typingRef.current=Ce},[E]),Pe=Lk(pe,{listRef:E.context.itemLabels,activeIndex:K,resetMs:EY,onMatch:Ce=>{L&&Ce!==K&&E.set("activeIndex",Ce)},onTypingChange:_e}),{getReferenceProps:me,getFloatingProps:Ae,getItemProps:Te,getTriggerProps:We}=Id([de,ue,we,Pe]),rt=O.useMemo(()=>{const Ce=Qs(me(),{onMouseEnter(){E.set("hoverEnabled",!0)},onMouseMove(){E.set("allowMouseEnter",!0)}},X);return delete Ce.role,Ce},[me,E,X]),Ue=O.useMemo(()=>{const Ce=We();if(!Ce)return Ce;const it=Qs(Ce,X);return delete it.role,delete it["aria-controls"],it},[We,X]),ot=qp(),tt=O.useMemo(()=>Ae({onMouseEnter(){H.type==="menu"&&ot.request(()=>E.set("hoverEnabled",!1))},onMouseMove(){E.set("allowMouseEnter",!0)},onClick(){E.select("hoverEnabled")&&E.set("hoverEnabled",!1)},onKeyDown(Ce){const it=E.select("keyboardEventRelay");it&&!Ce.isPropagationStopped()&&it(Ce)}}),[Ae,H.type,ot,E]),mt=O.useMemo(()=>Te(),[Te]);E.useSyncedValues({floatingRootContext:pe,activeTriggerProps:rt,inactiveTriggerProps:Ue,popupProps:tt,itemProps:mt});const Ee=O.useMemo(()=>({store:E,parent:T}),[E,T]),xe=w.jsx(ZB.Provider,{value:Ee,children:typeof t=="function"?t({payload:W}):t});return H.type===void 0||H.type==="context-menu"?w.jsx(FQ,{externalTree:k,children:xe}):xe}function oz(e){const{render:t,className:n,state:r=yn,props:i=ti,refs:s=ti,metadata:l,stateAttributesMapping:a,tag:c="div",...u}=e,{compositeProps:h,compositeRef:f}=IB({metadata:l});return ut(c,e,{state:r,ref:[...s,f],props:[h,...i,u],stateAttributesMapping:a})}function az(e){if(vn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!qs(e))return az(Xs(e))}function Rne(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=O.useRef(!1);return O.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,ri(s.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:s=>{i.current&&(i.current=!1,s.preventBaseUIHandler())}}:yn,[t,n,r])}const Yg=2,Ane=O.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,id:a,openOnHover:c,delay:u=100,closeDelay:h=0,handle:f,payload:p,...v}=t,S=rl(!0),x=f?.store??S?.store;if(!x)throw new Error(Ut(85));const g=Vr(a),b=x.useState("isTriggerActive",g),y=x.useState("floatingRootContext"),_=x.useState("isOpenedByTrigger",g),T=O.useRef(null),E=Mne(),k=ok(!0),A=tl(),R=O.useMemo(()=>A??new Tk,[A]),L=z7(R),z=Wo(),{registerTrigger:D,isMountedByThisTrigger:$}=J7(g,T,x,{payload:p,closeDelay:h,parent:E,floatingTreeRoot:R,floatingNodeId:L,floatingParentNodeId:z,keyboardEventRelay:k?.relayKeyboardEvent}),N=x.useState("disabled"),F=s||N||E.type==="menubar"&&E.context.disabled,{getButtonProps:U,buttonRef:H}=ii({disabled:F,native:l});O.useEffect(()=>{!_&&E.type===void 0&&(x.context.allowMouseUpTriggerRef.current=!1)},[x,_,E.type]);const K=O.useRef(null),W=mn(),I=Ne(ue=>{if(!K.current)return;W.clear(),x.context.allowMouseUpTriggerRef.current=!1;const Ie=ue.target;if(gt(K.current,Ie)||gt(x.select("positionerElement"),Ie)||Ie===K.current||Ie!=null&&az(Ie)===x.select("rootId"))return;const Le=Nk(K.current);ue.clientX>=Le.left-Yg&&ue.clientX<=Le.right+Yg&&ue.clientY>=Le.top-Yg&&ue.clientY<=Le.bottom+Yg||R.events.emit("close",{domEvent:ue,reason:l7})});O.useEffect(()=>{_&&x.select("lastOpenChangeReason")===wi&&ri(K.current).addEventListener("mouseup",I,{once:!0})},[_,I,x]);const G=E.type==="menubar"&&E.context.hasSubmenuOpen,B=bJ(y,{enabled:(c??G??!1)&&!F&&E.type!=="context-menu"&&(E.type!=="menubar"||G&&!$),handleClose:EJ({blockPointerEvents:E.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:E.type===void 0?u:void 0,delay:{close:h},triggerElementRef:T,externalTree:R,isActiveTrigger:b}),V=Pne(_,x.select("lastOpenChangeReason")),X=Wp(y,{enabled:!F&&E.type!=="context-menu",event:_&&E.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:E.type===void 0?V:!1}),re=fJ(y,{enabled:!F&&(E.type!=="menubar"&&_||G)}),ie=Rne({open:_,enabled:E.type==="menubar",mouseDownAction:"open"}),Q=Id([X,re]),Y=E.type==="menubar",J=O.useMemo(()=>({disabled:F,open:_}),[F,_]),ee=x.useState("triggerProps",$),ne=[K,n,H,D,T],te=[Q.getReferenceProps(),B??yn,ee,{"aria-haspopup":"menu",id:g,onMouseDown:ue=>{if(x.select("open"))return;W.start(200,()=>{x.context.allowMouseUpTriggerRef.current=!0}),ri(ue.currentTarget).addEventListener("mouseup",I,{once:!0})}},Y?{role:"menuitem"}:{},ie,v,U],le=O.useRef(null),fe=Ne(ue=>{Ir.flushSync(()=>{x.setOpen(!1,qe(xc,ue.nativeEvent,ue.currentTarget))}),zQ(le.current)?.focus()}),pe=Ne(ue=>{const Ie=x.select("positionerElement");if(Ie&&Bu(ue,Ie))x.context.beforeContentFocusGuardRef.current?.focus();else{Ir.flushSync(()=>{x.setOpen(!1,qe(xc,ue.nativeEvent,ue.currentTarget))});let Le=BQ(T.current);for(;Le!==null&>(Ie,Le)||Le?.hasAttribute("aria-hidden");){const we=Le;if(Le=Ek(Le),Le===we)break}Le?.focus()}}),de=ut("button",t,{enabled:!Y,stateAttributesMapping:Fh,state:J,ref:ne,props:te});return Y?w.jsx(oz,{tag:"button",render:r,className:i,state:J,refs:ne,props:te,stateAttributesMapping:Fh}):_?w.jsxs(O.Fragment,{children:[w.jsx(td,{ref:le,onFocus:fe},`${g}-pre-focus-guard`),w.jsx(O.Fragment,{children:de},g),w.jsx(td,{ref:x.context.triggerFocusTargetRef,onFocus:pe},`${g}-post-focus-guard`)]}):w.jsx(O.Fragment,{children:de},g)});function Pne(e,t){const n=mn(),[r,i]=O.useState(!1);return Fe(()=>{e&&t==="trigger-hover"?(i(!0),n.start(TY,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Mne(){const e=Nb(!0),t=rl(!0),n=sz();return O.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}function Oo(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const lz=O.createContext(void 0);function Bb(){const e=O.useContext(lz);if(e===void 0)throw new Error(Ut(53));return e}let ey=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const Xg=500,GL=16;function Ki(e,t,n){if(!e)return 0;const r=getComputedStyle(e),i=n==="x"?"Inline":"Block";return n==="x"&&t==="margin"?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}let Lne=(function(e){return e.orientation="data-orientation",e.hovering="data-hovering",e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({}),Tu=(function(e){return e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const Xk={hasOverflowX:e=>e?{[Tu.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[Tu.hasOverflowY]:""}:null,overflowXStart:e=>e?{[Tu.overflowXStart]:""}:null,overflowXEnd:e=>e?{[Tu.overflowXEnd]:""}:null,overflowYStart:e=>e?{[Tu.overflowYStart]:""}:null,overflowYEnd:e=>e?{[Tu.overflowYEnd]:""}:null,cornerHidden:()=>null},KL={width:0,height:0},jne={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Dne=O.forwardRef(function(t,n){const{render:r,className:i,overflowEdgeThreshold:s,...l}=t,[a,c]=O.useState(!1),[u,h]=O.useState(!1),[f,p]=O.useState(!1),[v,S]=O.useState(KL),[x,g]=O.useState(KL),[b,y]=O.useState(!1),[_,T]=O.useState(jne),E=Vr(),k=O.useRef(null),A=O.useRef(null),R=O.useRef(null),L=O.useRef(null),z=O.useRef(null),D=O.useRef(null),$=O.useRef(null),N=O.useRef(!1),F=O.useRef(0),U=O.useRef(0),H=O.useRef(0),K=O.useRef(0),W=O.useRef("vertical"),I=mn(),G=mn(),j=O.useRef({x:0,y:0}),[B,V]=O.useState({scrollbarYHidden:!1,scrollbarXHidden:!1,cornerHidden:!1}),X=Ine(s),re=Ne(fe=>{const pe=fe.x-j.current.x,de=fe.y-j.current.y;j.current=fe,de!==0&&(p(!0),I.start(Xg,()=>{p(!1)})),pe!==0&&(h(!0),G.start(Xg,()=>{h(!1)}))}),ie=Ne(fe=>{fe.button===0&&(N.current=!0,F.current=fe.clientY,U.current=fe.clientX,W.current=fe.currentTarget.getAttribute(Lne.orientation),A.current&&(H.current=A.current.scrollTop,K.current=A.current.scrollLeft),z.current&&W.current==="vertical"&&z.current.setPointerCapture(fe.pointerId),D.current&&W.current==="horizontal"&&D.current.setPointerCapture(fe.pointerId))}),Q=Ne(fe=>{if(!N.current)return;const pe=fe.clientY-F.current,de=fe.clientX-U.current;if(A.current){const ue=A.current.scrollHeight,Ie=A.current.clientHeight,Le=A.current.scrollWidth,we=A.current.clientWidth;if(z.current&&R.current&&W.current==="vertical"){const _e=Ki(R.current,"padding","y"),Pe=Ki(z.current,"margin","y"),me=z.current.offsetHeight,Ae=R.current.offsetHeight-me-_e-Pe,Te=pe/Ae;A.current.scrollTop=H.current+Te*(ue-Ie),fe.preventDefault(),p(!0),I.start(Xg,()=>{p(!1)})}if(D.current&&L.current&&W.current==="horizontal"){const _e=Ki(L.current,"padding","x"),Pe=Ki(D.current,"margin","x"),me=D.current.offsetWidth,Ae=L.current.offsetWidth-me-_e-Pe,Te=de/Ae;A.current.scrollLeft=K.current+Te*(Le-we),fe.preventDefault(),h(!0),G.start(Xg,()=>{h(!1)})}}}),Y=Ne(fe=>{N.current=!1,z.current&&W.current==="vertical"&&z.current.releasePointerCapture(fe.pointerId),D.current&&W.current==="horizontal"&&D.current.releasePointerCapture(fe.pointerId)});function J(fe){const pe=fe.pointerType==="touch";if(y(pe),!pe){const de=gt(k.current,fe.target);c(de)}}const ee=O.useMemo(()=>({hasOverflowX:!B.scrollbarXHidden,hasOverflowY:!B.scrollbarYHidden,overflowXStart:_.xStart,overflowXEnd:_.xEnd,overflowYStart:_.yStart,overflowYEnd:_.yEnd,cornerHidden:B.cornerHidden}),[B.scrollbarXHidden,B.scrollbarYHidden,B.cornerHidden,_]),ne={role:"presentation",onPointerEnter:J,onPointerMove:J,onPointerDown({pointerType:fe}){y(fe==="touch")},onPointerLeave(){c(!1)},style:{position:"relative",[ey.scrollAreaCornerHeight]:`${v.height}px`,[ey.scrollAreaCornerWidth]:`${v.width}px`}},te=ut("div",t,{state:ee,ref:[n,k],props:[ne,l],stateAttributesMapping:Xk}),le=O.useMemo(()=>({handlePointerDown:ie,handlePointerMove:Q,handlePointerUp:Y,handleScroll:re,cornerSize:v,setCornerSize:S,thumbSize:x,setThumbSize:g,touchModality:b,cornerRef:$,scrollingX:u,setScrollingX:h,scrollingY:f,setScrollingY:p,hovering:a,setHovering:c,viewportRef:A,rootRef:k,scrollbarYRef:R,scrollbarXRef:L,thumbYRef:z,thumbXRef:D,rootId:E,hiddenState:B,setHiddenState:V,overflowEdges:_,setOverflowEdges:T,viewportState:ee,overflowEdgeThreshold:X}),[ie,Q,Y,re,v,x,b,$,u,h,f,p,a,c,A,k,R,L,z,D,E,B,_,ee,X]);return w.jsxs(lz.Provider,{value:le,children:[Gh.element,te]})});function Ine(e){if(typeof e=="number"){const t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}const Nne=O.createContext(void 0);function Bne(e,t){if(typeof IntersectionObserver>"u")return()=>{};const n=new IntersectionObserver(r=>{r.forEach(i=>{i.intersectionRatio>0&&(t(),n.disconnect())})});return n.observe(e),()=>{n.disconnect()}}let ja=(function(e){return e.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",e.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",e.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",e.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",e})({}),YL=!1;function zne(){YL||bk||(typeof CSS<"u"&&"registerProperty"in CSS&&[ja.scrollAreaOverflowXStart,ja.scrollAreaOverflowXEnd,ja.scrollAreaOverflowYStart,ja.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),YL=!0)}const Hne=O.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{viewportRef:l,scrollbarYRef:a,scrollbarXRef:c,thumbYRef:u,thumbXRef:h,cornerRef:f,setCornerSize:p,setThumbSize:v,rootId:S,setHiddenState:x,hiddenState:g,handleScroll:b,setHovering:y,setOverflowEdges:_,overflowEdges:T,overflowEdgeThreshold:E}=Bb(),k=Dc(),A=O.useRef(!0),R=mn(),L=mn();function z(){const K=l.current,W=a.current,I=c.current,G=u.current,j=h.current,B=f.current;if(!K)return;const V=K.scrollHeight,X=K.scrollWidth,re=K.clientHeight,ie=K.clientWidth,Q=K.scrollTop,Y=K.scrollLeft;if(V===0||X===0)return;const J=re>=V,ee=ie>=X,ne=ie/X,te=re/V,le=Math.max(0,X-ie),fe=Math.max(0,V-re);let pe=0,de=0;ee||(k==="rtl"?pe=Oo(-Y,0,le):pe=Oo(Y,0,le),de=le-pe);const ue=J?0:Oo(Q,0,fe),Ie=J?0:fe-ue,Le=ee?0:ie,we=J?0:re,_e=Ki(I,"padding","x"),Pe=Ki(W,"padding","y"),me=Ki(j,"margin","x"),Ae=Ki(G,"margin","y"),Te=Le-_e-me,We=we-Pe-Ae,rt=I?Math.min(I.offsetWidth,Te):Te,Ue=W?Math.min(W.offsetHeight,We):We,ot=Math.max(GL,rt*ne),tt=Math.max(GL,Ue*te);if(v(Ze=>Ze.height===tt&&Ze.width===ot?Ze:{width:ot,height:tt}),W&&G){const Ze=W.offsetHeight-tt-Pe-Ae,at=V-re,Ot=at===0?0:Q/at,ft=Math.min(Ze,Math.max(0,Ot*Ze));G.style.transform=`translate3d(0,${ft}px,0)`}if(I&&j){const Ze=I.offsetWidth-ot-_e-me,at=X-ie,Ot=at===0?0:Y/at,ft=k==="rtl"?Oo(Ot*Ze,-Ze,0):Oo(Ot*Ze,0,Ze);j.style.transform=`translate3d(${ft}px,0,0)`}const mt=Oo(pe,0,le),Ee=Oo(de,0,le),xe=Oo(ue,0,fe),Ce=Oo(Ie,0,fe),it=[[ja.scrollAreaOverflowXStart,mt],[ja.scrollAreaOverflowXEnd,Ee],[ja.scrollAreaOverflowYStart,xe],[ja.scrollAreaOverflowYEnd,Ce]];for(const[Ze,at]of it)K.style.setProperty(Ze,`${at}px`);if(B){if(ee||J)p({width:0,height:0});else if(!ee&&!J){const Ze=W?.offsetWidth||0,at=I?.offsetHeight||0;p({width:Ze,height:at})}}x(Ze=>{const at=J||ee;return Ze.scrollbarYHidden===J&&Ze.scrollbarXHidden===ee&&Ze.cornerHidden===at?Ze:{scrollbarYHidden:J,scrollbarXHidden:ee,cornerHidden:at}});const dt={xStart:!ee&&mt>E.xStart,xEnd:!ee&&Ee>E.xEnd,yStart:!J&&xe>E.yStart,yEnd:!J&&Ce>E.yEnd};_(Ze=>Ze.xStart===dt.xStart&&Ze.xEnd===dt.xEnd&&Ze.yStart===dt.yStart&&Ze.yEnd===dt.yEnd?Ze:dt)}const D=Ne(()=>{Ir.flushSync(z)});Fe(()=>l.current?(zne(),Bne(l.current,D)):void 0,[D,l]),Fe(()=>{queueMicrotask(D)},[D,g,k]),Fe(()=>{l.current?.matches(":hover")&&y(!0)},[l,y]),O.useEffect(()=>{const K=l.current;if(typeof ResizeObserver>"u"||!K)return;const W=new ResizeObserver(D);return W.observe(K),L.start(0,()=>{Promise.all(K.getAnimations({subtree:!0}).map(I=>I.finished)).then(D).catch(()=>{})}),()=>{W.disconnect(),L.clear()}},[D,l,L]);function $(){A.current=!1}const N={role:"presentation",...S&&{"data-id":`${S}-viewport`},...(!g.scrollbarXHidden||!g.scrollbarYHidden)&&{tabIndex:0},className:Gh.className,style:{overflow:"scroll"},onScroll(){l.current&&(D(),A.current||b({x:l.current.scrollLeft,y:l.current.scrollTop}),R.start(100,()=>{A.current=!0}))},onWheel:$,onTouchMove:$,onPointerMove:$,onPointerEnter:$,onKeyDown:$},F=O.useMemo(()=>({hasOverflowX:!g.scrollbarXHidden,hasOverflowY:!g.scrollbarYHidden,overflowXStart:T.xStart,overflowXEnd:T.xEnd,overflowYStart:T.yStart,overflowYEnd:T.yEnd,cornerHidden:g.cornerHidden}),[g.scrollbarXHidden,g.scrollbarYHidden,g.cornerHidden,T]),U=ut("div",t,{ref:[n,l],state:F,props:[N,s],stateAttributesMapping:Xk}),H=O.useMemo(()=>({computeThumbPosition:D}),[D]);return w.jsx(Nne.Provider,{value:H,children:U})}),cz=O.createContext(void 0);function $ne(){const e=O.useContext(cz);if(e===void 0)throw new Error(Ut(54));return e}let ty=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const Fne=O.forwardRef(function(t,n){const{render:r,className:i,orientation:s="vertical",keepMounted:l=!1,...a}=t,{hovering:c,scrollingX:u,scrollingY:h,hiddenState:f,overflowEdges:p,scrollbarYRef:v,scrollbarXRef:S,viewportRef:x,thumbYRef:g,thumbXRef:b,handlePointerDown:y,handlePointerUp:_,rootId:T,thumbSize:E}=Bb(),k=O.useMemo(()=>({hovering:c,scrolling:{horizontal:u,vertical:h}[s],orientation:s,hasOverflowX:!f.scrollbarXHidden,hasOverflowY:!f.scrollbarYHidden,overflowXStart:p.xStart,overflowXEnd:p.xEnd,overflowYStart:p.yStart,overflowYEnd:p.yEnd,cornerHidden:f.cornerHidden}),[c,u,h,s,f,p]),A=Dc();O.useEffect(()=>{const N=x.current,F=s==="vertical"?v.current:S.current;if(!F)return;function U(H){if(!(!N||!F||H.ctrlKey)){if(H.preventDefault(),s==="vertical"){if(N.scrollTop===0&&H.deltaY<0)return}else if(N.scrollLeft===0&&H.deltaX<0)return;if(s==="vertical"){if(N.scrollTop===N.scrollHeight-N.clientHeight&&H.deltaY>0)return}else if(N.scrollLeft===N.scrollWidth-N.clientWidth&&H.deltaX>0)return;s==="vertical"?N.scrollTop+=H.deltaY:N.scrollLeft+=H.deltaX}}return F.addEventListener("wheel",U,{passive:!1}),()=>{F.removeEventListener("wheel",U)}},[s,S,v,x]);const R={...T&&{"data-id":`${T}-scrollbar`},onPointerDown(N){if(N.button===0&&N.currentTarget===N.target&&x.current){if(g.current&&v.current&&s==="vertical"){const F=Ki(g.current,"margin","y"),U=Ki(v.current,"padding","y"),H=g.current.offsetHeight,K=v.current.getBoundingClientRect(),W=N.clientY-K.top-H/2-U+F/2,I=x.current.scrollHeight,G=x.current.clientHeight,j=v.current.offsetHeight-H-U-F,V=W/j*(I-G);x.current.scrollTop=V}if(b.current&&S.current&&s==="horizontal"){const F=Ki(b.current,"margin","x"),U=Ki(S.current,"padding","x"),H=b.current.offsetWidth,K=S.current.getBoundingClientRect(),W=N.clientX-K.left-H/2-U+F/2,I=x.current.scrollWidth,G=x.current.clientWidth,j=S.current.offsetWidth-H-U-F,B=W/j;let V;A==="rtl"?(V=(1-B)*(I-G),x.current.scrollLeft<=0&&(V=-V)):V=B*(I-G),x.current.scrollLeft=V}y(N)}},onPointerUp:_,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",...s==="vertical"&&{top:0,bottom:`var(${ey.scrollAreaCornerHeight})`,insetInlineEnd:0,[ty.scrollAreaThumbHeight]:`${E.height}px`},...s==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${ey.scrollAreaCornerWidth})`,bottom:0,[ty.scrollAreaThumbWidth]:`${E.width}px`}}},L=ut("div",t,{ref:[n,s==="vertical"?v:S],state:k,props:[R,a],stateAttributesMapping:Xk}),z=O.useMemo(()=>({orientation:s}),[s]),D=s==="vertical"?f.scrollbarYHidden:f.scrollbarXHidden;return l||!D?w.jsx(cz.Provider,{value:z,children:L}):null}),Une=O.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{thumbYRef:l,thumbXRef:a,handlePointerDown:c,handlePointerMove:u,handlePointerUp:h,setScrollingX:f,setScrollingY:p}=Bb(),{orientation:v}=$ne(),S=O.useMemo(()=>({orientation:v}),[v]);return ut("div",t,{ref:[n,v==="vertical"?l:a],state:S,props:[{onPointerDown:c,onPointerMove:u,onPointerUp(g){v==="vertical"&&p(!1),v==="horizontal"&&f(!1),h(g)},style:{...v==="vertical"&&{height:`var(${ty.scrollAreaThumbHeight})`},...v==="horizontal"&&{width:`var(${ty.scrollAreaThumbWidth})`}}},s]})}),Vne=O.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{cornerRef:l,cornerSize:a,hiddenState:c}=Bb(),u=ut("div",t,{ref:[n,l],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:a.width,height:a.height}},s]});return c.cornerHidden?null:u}),uz=O.createContext(void 0);function qne(){const e=O.useContext(uz);if(e===void 0)throw new Error(Ut(63));return e}let XL=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const dz={...jc,checked(e){return e?{[XL.checked]:""}:{[XL.unchecked]:""}}},Wne=O.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:s,id:l,inputRef:a,name:c,nativeButton:u=!1,onCheckedChange:h,readOnly:f=!1,required:p=!1,disabled:v=!1,render:S,uncheckedValue:x,...g}=t,{clearErrors:b}=Yp(),{state:y,setTouched:_,setDirty:T,validityData:E,setFilled:k,setFocused:A,shouldValidateOnChange:R,validationMode:L,disabled:z,name:D,validation:$}=rs(),{labelId:N}=nl(),F=z||v,U=D??c,H=Ne(h),K=O.useRef(null),W=ns(K,a,$.inputRef),I=O.useRef(null),G=Vr(),j=Db({id:l,implicit:!1,controlRef:I}),[B,V]=Zi({controlled:r,default:!!s,name:"Switch",state:"checked"});Xp({id:G,commit:$.commit,value:B,controlRef:I,name:U,getValue:()=>B}),Fe(()=>{K.current&&k(K.current.checked)},[K,k]),Yl(B,()=>{b(U),T(B!==E.initialValue),k(B),R()?$.commit(B):$.commit(B,!0)});const{getButtonProps:X,buttonRef:re}=ii({disabled:F,native:u}),ie={id:G,role:"switch","aria-checked":B,"aria-readonly":f||void 0,"aria-labelledby":N,onFocus(){F||A(!0)},onBlur(){const ee=K.current;!ee||F||(_(!0),A(!1),L==="onBlur"&&$.commit(ee.checked))},onClick(ee){f||F||(ee.preventDefault(),K?.current?.click())}},Q=O.useMemo(()=>Qs({checked:B,disabled:F,id:j,name:U,required:p,style:Dd,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:W,onChange(ee){if(ee.nativeEvent.defaultPrevented)return;const ne=ee.target.checked,te=qe(rr,ee.nativeEvent);H?.(ne,te),!te.isCanceled&&V(ne)},onFocus(){I.current?.focus()}},$.getInputValidationProps),[B,F,W,j,U,H,p,V,$]),Y=O.useMemo(()=>({...y,checked:B,disabled:F,readOnly:f,required:p}),[y,B,F,f,p]),J=ut("span",t,{state:Y,ref:[n,I,re],props:[ie,$.getValidationProps,g,X],stateAttributesMapping:dz});return w.jsxs(uz.Provider,{value:Y,children:[J,!B&&U&&x!==void 0&&w.jsx("input",{type:"hidden",name:U,value:x}),w.jsx("input",{...Q})]})}),Gne=O.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{state:l}=rs(),a=qne(),c={...l,...a};return ut("span",t,{state:c,ref:n,stateAttributesMapping:dz,props:s})}),fz=O.createContext(void 0);function Kne(e=!0){const t=O.useContext(fz);if(t===void 0&&!e)throw new Error(Ut(7));return t}const Yne=O.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:s=!1,form:l,onPressedChange:a,pressed:c,render:u,type:h,value:f,nativeButton:p=!0,...v}=t,S=Vr(f||void 0),x=Kne(),g=x?.value??[],b=x?void 0:i,y=(s||x?.disabled)??!1,[_,T]=Zi({controlled:x?g?.indexOf(S)>-1:c,default:b,name:"Toggle",state:"pressed"}),E=Ne(($,N)=>{S&&x?.setGroupValue?.(S,$,N),a?.($,N)}),{getButtonProps:k,buttonRef:A}=ii({disabled:y,native:p}),R=O.useMemo(()=>({disabled:y,pressed:_}),[y,_]),L=[A,n],z=[{"aria-pressed":_,onClick($){const N=!_,F=qe(rr,$.nativeEvent);E(N,F),!F.isCanceled&&T(N)}},v,k],D=ut("button",t,{enabled:!x,state:R,ref:L,props:z});return x?w.jsx(oz,{tag:"button",render:u,className:r,state:R,refs:L,props:z}):D});let Xne=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const QL={multiple(e){return e?{[Xne.multiple]:""}:null}},Qne=O.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:s=!0,onValueChange:l,orientation:a="horizontal",multiple:c=!1,value:u,className:h,render:f,...p}=t,v=Hk(),S=O.useMemo(()=>{if(u===void 0)return r??[]},[u,r]),x=(v?.disabled??!1)||i,[g,b]=Zi({controlled:u,default:S,name:"ToggleGroup",state:"value"}),y=Ne((A,R,L)=>{let z;if(c?(z=g.slice(),R?z.push(A):z.splice(g.indexOf(A),1)):z=R?[A]:[],Array.isArray(z)){if(l?.(z,L),L.isCanceled)return;b(z)}}),_=O.useMemo(()=>({disabled:x,multiple:c,orientation:a}),[x,a,c]),T=O.useMemo(()=>({disabled:x,orientation:a,setGroupValue:y,value:g}),[x,a,y,g]),E={role:"group"},k=ut("div",t,{enabled:!!v,state:_,ref:n,props:[E,p],stateAttributesMapping:QL});return w.jsx(fz.Provider,{value:T,children:v?k:w.jsx(BB,{render:f,className:h,state:_,refs:[n],props:[E,p],stateAttributesMapping:QL,loopFocus:s})})});function Zne(e){return ut(e.defaultTagName??"div",e,e)}function Jne({className:e,...t}){return w.jsx("div",{"data-slot":"input-group",role:"group",className:Be("border-input bg-input/20 dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-7 rounded-md border transition-colors has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:ring-[2px] has-[[data-slot][aria-invalid=true]]:ring-[2px] has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const ere=Ac("text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-1 py-2 text-xs/relaxed font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem] order-last","block-start":"px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function tre({className:e,align:t="inline-start",...n}){return w.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Be(ere({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const nre=Ac("gap-2 rounded-md text-xs/relaxed shadow-none flex items-center",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function hz({className:e,type:t="button",variant:n="ghost",size:r="xs",...i}){return w.jsx(ze,{type:t,"data-size":r,variant:n,className:Be(nre({size:r}),e),...i})}function rre({className:e,...t}){return w.jsx(nn,{"data-slot":"input-group-control",className:Be("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1",e),...t})}const ire=lne;function sre({className:e,children:t,...n}){return w.jsxs(Bte,{"data-slot":"combobox-trigger",className:Be("[&_svg:not([class*='size-'])]:size-3.5",e),...n,children:[t,w.jsx(be,{icon:xb,strokeWidth:2,className:"text-muted-foreground size-3.5 pointer-events-none"})]})}function ore({className:e,...t}){return w.jsx(Vte,{"data-slot":"combobox-clear",render:w.jsx(hz,{variant:"ghost",size:"icon-xs"}),className:Be(e),...t,children:w.jsx(be,{icon:Cs,strokeWidth:2,className:"pointer-events-none"})})}function are({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:i=!1,...s}){return w.jsxs(Jne,{className:Be("w-auto",e),children:[w.jsx(Fte,{render:w.jsx(rre,{disabled:n}),...s}),w.jsxs(tre,{align:"inline-end",children:[r&&w.jsx(hz,{size:"icon-xs",variant:"ghost",render:w.jsx(sre,{}),"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:n}),i&&w.jsx(ore,{disabled:n})]}),t]})}function lre({className:e,side:t="bottom",sideOffset:n=6,align:r="start",alignOffset:i=0,anchor:s,...l}){return w.jsx(Xte,{children:w.jsx(Qte,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:s,className:"isolate z-50",children:w.jsx(Jte,{"data-slot":"combobox-content","data-chips":!!s,className:Be("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/20 dark:bg-popover max-h-72 min-w-32 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-7 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:shadow-none group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)",e),...l})})})}function cre({className:e,...t}){return w.jsx(Kte,{"data-slot":"combobox-list",className:Be("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overflow-y-auto overscroll-contain",e),...t})}function ure({className:e,children:t,...n}){return w.jsxs(nne,{"data-slot":"combobox-item",className:Be("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[t,w.jsx(cne,{render:w.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:w.jsx(be,{icon:Pc,strokeWidth:2,className:"pointer-events-none"})})]})}function dre({className:e,...t}){return w.jsx(rne,{"data-slot":"combobox-empty",className:Be("text-muted-foreground hidden w-full justify-center py-2 text-center text-xs/relaxed group-data-empty/combobox-content:flex",e),...t})}const fre=Ac("hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-md text-xs font-medium transition-all [&_svg:not([class*='size-'])]:size-3.5 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border-input hover:bg-muted border bg-transparent"},size:{default:"h-7 min-w-7 px-2",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-1.5 text-[0.625rem] [&_svg:not([class*='size-'])]:size-3",lg:"h-8 min-w-8 px-2"}},defaultVariants:{variant:"default",size:"default"}}),pz=O.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"});function hre({className:e,variant:t,size:n,spacing:r=0,orientation:i="horizontal",children:s,...l}){return w.jsx(Qne,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:Be("rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",e),...l,children:w.jsx(pz.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:s})})}function cx({className:e,children:t,variant:n="default",size:r="default",...i}){const s=O.useContext(pz);return w.jsx(Yne,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,"data-spacing":s.spacing,className:Be("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",fre({variant:s.variant||n,size:s.size||r}),e),...i,children:t})}function Hl({className:e,size:t="default",...n}){return w.jsx(Wne,{"data-slot":"switch","data-size":t,className:Be("data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:w.jsx(Gne,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}async function Qt(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t?.headers}});if(n.status===401)throw window.dispatchEvent(new CustomEvent("vibora:auth-required")),new Error("Authentication required");if(!n.ok){const r=await n.json().catch(()=>({error:"Request failed"}));throw new Error(r.error||"Request failed")}return n.json()}const Xa="";function Qk(){return ar({queryKey:["tasks"],queryFn:()=>Qt(`${Xa}/api/tasks`)})}function mz(e){return ar({queryKey:["tasks",e],queryFn:()=>Qt(`${Xa}/api/tasks/${e}`),enabled:!!e})}function pre(){const e=hr();return Kn({mutationFn:t=>Qt(`${Xa}/api/tasks`,{method:"POST",body:JSON.stringify({...t,status:"IN_PROGRESS"})}),onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]})}})}function mre(){const e=hr();return Kn({mutationFn:({taskId:t,status:n,position:r})=>Qt(`${Xa}/api/tasks/${t}/status`,{method:"PATCH",body:JSON.stringify({status:n,position:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]})}})}function Zk(){const e=hr();return Kn({mutationFn:({taskId:t,updates:n})=>Qt(`${Xa}/api/tasks/${t}`,{method:"PATCH",body:JSON.stringify(n)}),onSuccess:(t,{taskId:n})=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["tasks",n]})}})}function gre(){const e=hr();return Kn({mutationFn:({taskId:t,deleteLinkedWorktree:n})=>{const r=n?`${Xa}/api/tasks/${t}?deleteLinkedWorktree=true`:`${Xa}/api/tasks/${t}`;return Qt(r,{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["worktrees"]})}})}function vre(){const e=hr();return Kn({mutationFn:({ids:t,deleteLinkedWorktrees:n})=>Qt(`${Xa}/api/tasks/bulk`,{method:"DELETE",body:JSON.stringify({ids:t,deleteLinkedWorktrees:n})}),onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["worktrees"]})}})}const Bd="";function yre(e){return ar({queryKey:["fs","list",e],queryFn:()=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Qt(`${Bd}/api/fs/list${t}`)},enabled:e!==null})}function bre(e){return ar({queryKey:["git","branches",e],queryFn:()=>Qt(`${Bd}/api/git/branches?repo=${encodeURIComponent(e)}`),enabled:!!e})}function _re(e,t={}){const{staged:n=!1,ignoreWhitespace:r=!1,includeUntracked:i=!1}=t;return ar({queryKey:["git","diff",e,n,r,i],queryFn:()=>{const s=new URLSearchParams({path:e,...n&&{staged:"true"},...r&&{ignoreWhitespace:"true"},...i&&{includeUntracked:"true"}});return Qt(`${Bd}/api/git/diff?${s}`)},enabled:!!e,refetchInterval:5e3})}function xre(e){return ar({queryKey:["fs","tree",e],queryFn:()=>Qt(`${Bd}/api/fs/tree?root=${encodeURIComponent(e)}`),enabled:!!e,staleTime:1e4})}function Sre(e,t,n){return ar({queryKey:["fs","read",e,t,n?.maxLines],queryFn:()=>{const r=new URLSearchParams({path:t,root:e,...n?.maxLines});return Qt(`${Bd}/api/fs/read?${r}`)},enabled:!!e&&!!t})}async function wre(e){return Qt(`${Bd}/api/fs/is-git-repo?path=${encodeURIComponent(e)}`)}const zd="",Sn={PORT:"port",WORKTREE_BASE_PATH:"worktree_base_path",DEFAULT_GIT_REPOS_DIR:"default_git_repos_dir",TASK_CREATION_COMMAND:"task_creation_command",HOSTNAME:"hostname",SSH_PORT:"ssh_port",LINEAR_API_KEY:"linear_api_key",GITHUB_PAT:"github_pat"},Cre=3333,Ere="claude --dangerously-skip-permissions";function il(e){return ar({queryKey:["config",e],queryFn:()=>Qt(`${zd}/api/config/${e}`)})}function Tre(){const e=il(Sn.PORT);return{...e,data:e.data?.value??Cre,isDefault:e.data?.isDefault??!0}}function gz(){const e=il(Sn.WORKTREE_BASE_PATH);return{...e,data:e.data?.value??""}}function Jk(){const e=il(Sn.DEFAULT_GIT_REPOS_DIR);return{...e,data:e.data?.value??"",isDefault:e.data?.isDefault??!0}}function vz(){const e=il(Sn.TASK_CREATION_COMMAND);return{...e,data:e.data?.value??Ere,isDefault:e.data?.isDefault??!0}}function zb(){const e=il(Sn.HOSTNAME);return{...e,data:e.data?.value??"",isDefault:e.data?.isDefault??!0}}function Hb(){const e=il(Sn.SSH_PORT);return{...e,data:e.data?.value??22,isDefault:e.data?.isDefault??!0}}function kre(){const e=il(Sn.LINEAR_API_KEY);return{...e,data:e.data?.value??"",isDefault:e.data?.isDefault??!0}}function Ore(){const e=il(Sn.GITHUB_PAT);return{...e,data:e.data?.value??"",isDefault:e.data?.isDefault??!0}}function Rre(){const e=hr();return Kn({mutationFn:({key:t,value:n})=>Qt(`${zd}/api/config/${t}`,{method:"PUT",body:JSON.stringify({value:n})}),onSuccess:(t,{key:n})=>{e.invalidateQueries({queryKey:["config",n]}),n===Sn.GITHUB_PAT&&(e.invalidateQueries({queryKey:["github-user"]}),e.invalidateQueries({queryKey:["github-prs"]}),e.invalidateQueries({queryKey:["github-issues"]}),e.invalidateQueries({queryKey:["github-orgs"]}))}})}function Are(){const e=hr();return Kn({mutationFn:t=>Qt(`${zd}/api/config/${t}`,{method:"DELETE"}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:["config",n]})}})}function Pre(){return ar({queryKey:["config","notifications"],queryFn:()=>Qt(`${zd}/api/config/notifications`)})}function Mre(){const e=hr();return Kn({mutationFn:t=>Qt(`${zd}/api/config/notifications`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["config","notifications"]})}})}function Lre(){return Kn({mutationFn:e=>Qt(`${zd}/api/config/notifications/test/${e}`,{method:"POST"})})}const Jp="";function eO(){return ar({queryKey:["repositories"],queryFn:()=>Qt(`${Jp}/api/repositories`)})}function jre(e){return ar({queryKey:["repositories",e],queryFn:()=>Qt(`${Jp}/api/repositories/${e}`),enabled:!!e})}function yz(){const e=hr();return Kn({mutationFn:t=>Qt(`${Jp}/api/repositories`,{method:"POST",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["repositories"]})}})}function Dre(){const e=hr();return Kn({mutationFn:({id:t,updates:n})=>Qt(`${Jp}/api/repositories/${t}`,{method:"PATCH",body:JSON.stringify(n)}),onSuccess:(t,{id:n})=>{e.invalidateQueries({queryKey:["repositories"]}),e.invalidateQueries({queryKey:["repositories",n]})}})}function bz(){const e=hr();return Kn({mutationFn:t=>Qt(`${Jp}/api/repositories/${t}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["repositories"]})}})}function rd({className:e,children:t,...n}){return w.jsxs(Dne,{"data-slot":"scroll-area",className:Be("relative",e),...n,children:[w.jsx(Hne,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),w.jsx(Ire,{}),w.jsx(Vne,{})]})}function Ire({className:e,orientation:t="vertical",...n}){return w.jsx(Fne,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:Be("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none",e),...n,children:w.jsx(Une,{"data-slot":"scroll-area-thumb",className:"rounded-full bg-border relative flex-1"})})}function tO({open:e,onOpenChange:t,onSelect:n,initialPath:r}){const[i,s]=O.useState(r||null),[l,a]=O.useState(""),[c,u]=O.useState("");O.useEffect(()=>{e&&(s(r||null),a(""),u(""))},[e,r]);const{data:h,isLoading:f,error:p}=yre(e?i??"":null),v=_=>{h&&(s(h.path+"/"+_),u(""))},S=()=>{h?.parent&&h.parent!==h.path&&(s(h.parent),u(""))},x=()=>{s(null),u("")},g=()=>{l.trim()&&(s(l.trim()),u(""))},b=_=>{n(_),t(!1)},y=h?.entries.filter(_=>_.name.toLowerCase().includes(c.toLowerCase()));return w.jsx(bs,{open:e,onOpenChange:t,children:w.jsxs(_s,{className:"sm:max-w-lg",children:[w.jsxs($s,{children:[w.jsx(Fs,{children:"Select Git Repository"}),w.jsx(Gl,{children:"Choose an existing git repository"})]}),w.jsx("p",{className:"text-xs text-muted-foreground",children:"Click folder names to navigate • Use action buttons to select"}),w.jsx(Nee,{}),w.jsxs("div",{className:"space-y-1",children:[w.jsx("label",{className:"text-xs font-medium",children:"Enter path manually:"}),w.jsxs("div",{className:"flex gap-2",children:[w.jsx(nn,{value:l,onChange:_=>a(_.target.value),placeholder:"/path/to/your/project",onKeyDown:_=>_.key==="Enter"&&g(),className:"flex-1"}),w.jsx(ze,{variant:"outline",size:"sm",onClick:g,children:"Go"})]})]}),w.jsxs("div",{className:"space-y-1",children:[w.jsx("label",{className:"text-xs font-medium",children:"Search current directory:"}),w.jsxs("div",{className:"relative",children:[w.jsx(be,{icon:FX,size:14,strokeWidth:2,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),w.jsx(nn,{value:c,onChange:_=>u(_.target.value),placeholder:"Filter folders and files...",className:"pl-8"})]})]}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(ze,{variant:"outline",size:"icon-sm",onClick:x,title:"Home",children:w.jsx(be,{icon:jX,size:14,strokeWidth:2})}),w.jsx(ze,{variant:"outline",size:"icon-sm",onClick:S,disabled:!h||h.parent===h.path,title:"Parent directory",children:w.jsx(be,{icon:uk,size:14,strokeWidth:2})}),w.jsx("code",{className:"min-w-0 flex-1 text-xs bg-muted/50 px-2 py-1 rounded truncate",children:h?.path||"~"}),w.jsxs(ze,{variant:"outline",size:"sm",onClick:()=>h&&b(h.path),disabled:!h,className:"max-sm:px-2",title:"Select current directory",children:[w.jsx(be,{icon:KE,size:14,strokeWidth:2,className:"sm:hidden"}),w.jsx("span",{className:"max-sm:hidden",children:"Select Current"})]})]}),w.jsx(rd,{className:"h-64 border rounded-md",children:w.jsxs("div",{className:"p-1",children:[f&&w.jsx("div",{className:"text-muted-foreground text-xs p-3",children:"Loading..."}),p&&w.jsx("div",{className:"text-destructive text-xs p-3",children:p.message}),h&&y&&w.jsxs(w.Fragment,{children:[y.length===0&&w.jsx("div",{className:"text-muted-foreground text-xs p-3",children:c?"No matches found":"Empty directory"}),y.map(_=>w.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-muted group",children:_.type==="directory"?w.jsxs(w.Fragment,{children:[w.jsx(be,{icon:_.isGitRepo?KE:Qi,size:16,strokeWidth:2,className:_.isGitRepo?"text-emerald-500":"text-blue-500"}),w.jsx("button",{onClick:()=>v(_.name),className:"flex-1 text-left text-xs truncate hover:underline",children:_.name}),_.isGitRepo&&w.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded border border-emerald-500/50 text-emerald-500 font-medium shrink-0",children:[w.jsx("span",{className:"max-sm:hidden",children:"git repo"}),w.jsx("span",{className:"sm:hidden",children:"git"})]})]}):w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"w-4"}),w.jsx("span",{className:"flex-1 text-xs text-muted-foreground truncate",children:_.name})]})},_.name))]})]})}),w.jsxs(Va,{children:[w.jsx(Dk,{render:w.jsx(ze,{variant:"outline"}),children:"Cancel"}),w.jsx(ze,{onClick:()=>h&&b(h.path),disabled:!h,children:"Select Path"})]})]})})}function Nre(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Bre(e){const t=Nre(e);if(!t)return"";const n=Math.random().toString(36).substring(2,6);return`${t}-${n}`}function zre({open:e,onOpenChange:t}={}){const[n,r]=O.useState(!1),i=e??n,s=t??r,[l,a]=O.useState(!1),[c,u]=O.useState(""),[h,f]=O.useState(""),[p,v]=O.useState(""),[S,x]=O.useState(""),[g,b]=O.useState(""),[y,_]=O.useState(""),[T,E]=O.useState(!0),[k,A]=O.useState("none"),[R,L]=O.useState(null),[z,D]=O.useState("browse"),[$,N]=O.useState(""),[F,U]=O.useState(null),[H,K]=O.useState(!1),W=Qa(),I=pre(),G=yz(),{data:j}=gz(),{data:B}=Jk(),{data:V}=eO(),{data:X,isLoading:re}=bre(p||null),ie=R?V?.find(le=>le.id===R):null,Q=O.useMemo(()=>{if(!V)return[];if(!$.trim())return V;const le=$.toLowerCase();return V.filter(fe=>fe.displayName.toLowerCase().includes(le)||fe.path.toLowerCase().includes(le))},[V,$]);O.useEffect(()=>{V&&V.length>0?D("saved"):D("browse")},[V]),O.useEffect(()=>{x(X?X.current||X.branches[0]||"main":"")},[X,p]),O.useEffect(()=>{h.trim()&&k==="none"&&A("plan")},[h,k]);const Y=le=>{u(le),_(Bre(le))},J=async le=>{U(null),K(!0);try{if(!(await wre(le)).isGitRepo){U("Selected folder is not a git repository"),K(!1);return}if(v(le),L(null),!V?.find(de=>de.path===le)){const de=le.split("/").pop()||"Unknown";G.mutate({path:le,displayName:de})}}catch(fe){U(fe instanceof Error?fe.message:"Failed to validate repository")}finally{K(!1)}},ee=le=>{if(le.preventDefault(),!c.trim()||!p)return;const fe=p.split("/").pop()||"repo",pe=g.trim()||y,de=`${j}/${pe}`;I.mutate({title:c.trim(),description:h.trim(),repoPath:p,repoName:fe,baseBranch:S||"main",branch:pe,worktreePath:de,initializeVibora:T,copyFiles:ie?.copyFiles||void 0,startupScript:ie?.startupScript||void 0},{onSuccess:ue=>{const Ie=k!=="none"&&h.trim()?{aiMode:k,description:h.trim()}:void 0;s(!1),u(""),f(""),v(""),x(""),b(""),_(""),E(!0),A("none"),L(null),N(""),U(null),D(V&&V.length>0?"saved":"browse"),W({to:"/tasks/$taskId",params:{taskId:ue.id},state:Ie})}})},ne=g.trim()||y,te=ne?`${j}/${ne}`:"";return w.jsxs(w.Fragment,{children:[w.jsxs(bs,{open:i,onOpenChange:s,children:[w.jsxs(vB,{render:w.jsx(ze,{size:"sm"}),children:[w.jsx(be,{icon:Ld,size:16,strokeWidth:2,"data-slot":"icon"}),"New Task"]}),w.jsx(_s,{className:"sm:max-w-md max-h-[80dvh] flex flex-col overflow-hidden",children:w.jsxs("form",{onSubmit:ee,className:"flex flex-col min-h-0 flex-1",children:[w.jsxs($s,{className:"shrink-0",children:[w.jsx(Fs,{children:"Create New Task"}),w.jsx(Gl,{children:"Create a new task with a git worktree for isolated development."})]}),w.jsxs(Qp,{className:"mt-4 pb-4 overflow-y-auto min-h-0 flex-1",children:[w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"title",children:"Title"}),w.jsx(nn,{id:"title",value:c,onChange:le=>Y(le.target.value),placeholder:"Add user authentication",required:!0})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"description",children:"Description"}),w.jsx(bB,{id:"description",value:h,onValueChange:f,placeholder:"Implement OAuth2 login flow...",rows:2})]}),w.jsxs(Un,{children:[w.jsx(Vn,{children:"AI Mode"}),w.jsxs(hre,{value:[k],onValueChange:le=>{const fe=Array.isArray(le)?le[0]:le;fe&&A(fe)},className:"w-full",variant:"outline",children:[w.jsx(cx,{value:"none",className:"flex-1",children:"None"}),w.jsx(cx,{value:"plan",className:"flex-1",children:"Plan"}),w.jsx(cx,{value:"default",className:"flex-1",children:"Default"})]})]}),w.jsxs(Un,{children:[w.jsx(Vn,{children:"Repository"}),w.jsxs(qa,{value:z,onValueChange:le=>{D(le),U(null)},children:[w.jsxs(Wa,{children:[w.jsx(Sr,{value:"saved",disabled:!V?.length,children:"Saved"}),w.jsx(Sr,{value:"browse",children:"Browse"})]}),w.jsx(Ar,{value:"saved",className:"mt-2",children:w.jsxs(ire,{value:R||"",onValueChange:le=>{const fe=V?.find(pe=>pe.id===le);fe&&(L(le),v(fe.path),N(fe.displayName),U(null))},inputValue:$,onInputValueChange:le=>{N(le),ie&&le!==ie.displayName&&L(null)},itemToStringLabel:le=>V?.find(fe=>fe.id===le)?.displayName||"",children:[w.jsx(are,{placeholder:"Search repositories...",className:"w-full"}),w.jsx(lre,{children:w.jsxs(cre,{children:[w.jsx(dre,{children:"No repositories found"}),Q.map(le=>w.jsx(ure,{value:le.id,children:le.displayName},le.id))]})})]})}),w.jsx(Ar,{value:"browse",className:"mt-2",children:w.jsxs(ze,{type:"button",variant:"outline",className:"w-full justify-start font-normal",onClick:()=>a(!0),disabled:H,children:[w.jsx(be,{icon:Qi,size:14,strokeWidth:2,className:"mr-2"}),H?w.jsx("span",{className:"text-muted-foreground",children:"Validating..."}):p&&!R?w.jsx("span",{className:"truncate",children:p}):w.jsx("span",{className:"text-muted-foreground",children:"Select folder..."})]})})]}),F&&w.jsx("p",{className:"text-sm text-destructive",children:F}),p&&!F&&w.jsx(La,{className:"font-mono text-xs truncate",children:p})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"baseBranch",children:"Base Branch"}),w.jsxs(cc,{value:S,onValueChange:le=>x(le??""),disabled:!p||re,children:[w.jsx(dc,{className:"w-full",children:w.jsx(uc,{children:S||w.jsx("span",{className:"text-muted-foreground",children:p?re?"Loading branches...":"Select branch":"Select repository first"})})}),w.jsx(fc,{children:X?.branches.map(le=>w.jsxs(Rr,{value:le,children:[le,le===X.current&&w.jsx("span",{className:"text-muted-foreground ml-2",children:"(current)"})]},le))})]})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"branch",children:"Branch Name"}),w.jsx(nn,{id:"branch",value:g,onChange:le=>b(le.target.value),placeholder:y||"auto-generated-from-title"}),te&&w.jsxs(La,{children:["Worktree: ",te]}),!g.trim()&&y&&w.jsxs(La,{children:['Will use "',y,'" if left empty.']})]}),w.jsxs(Un,{className:"flex flex-row items-center justify-between",children:[w.jsxs("div",{children:[w.jsx(Vn,{htmlFor:"initializeVibora",className:"mb-0 cursor-pointer",children:"Initialize Vibora"}),w.jsx(La,{children:"Create or update CLAUDE.local.md with CLI instructions"})]}),w.jsx(Hl,{id:"initializeVibora",checked:T,onCheckedChange:le=>E(le)})]})]}),w.jsxs(Va,{className:"mt-4 shrink-0",children:[w.jsx(Dk,{render:w.jsx(ze,{variant:"outline",type:"button"}),children:"Cancel"}),w.jsx(ze,{type:"submit",disabled:I.isPending||!c.trim()||!p,children:I.isPending?"Creating...":"Create Task"})]})]})})]}),w.jsx(tO,{open:l,onOpenChange:a,onSelect:J,initialPath:B||void 0})]})}function Hre({onNewTaskRef:e,onOpenCommandPalette:t}){const{location:n}=jr(),r=n.pathname,[i,s]=O.useState(!1);return O.useEffect(()=>{e?.(()=>s(!0))},[e]),w.jsxs("header",{className:"sticky top-0 z-10 flex h-12 shrink-0 items-center justify-between border-b border-border bg-black px-4 max-sm:px-2",children:[w.jsxs("div",{className:"flex min-w-0 items-center gap-4 max-sm:gap-1",children:[w.jsx(er,{to:"/tasks",className:"hidden items-center sm:flex",children:w.jsx("img",{src:"/vibora-logo.jpeg",alt:"Vibora",className:"h-7"})}),w.jsxs("nav",{className:"flex items-center gap-1 max-sm:gap-0",children:[w.jsx(er,{to:"/tasks",children:w.jsxs(ze,{variant:r.startsWith("/tasks")?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:$v,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Tasks"})]})}),w.jsx(er,{to:"/terminals",children:w.jsxs(ze,{variant:r==="/terminals"?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:dk,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Terminals"})]})}),w.jsx(er,{to:"/worktrees",children:w.jsxs(ze,{variant:r.startsWith("/worktrees")?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:n7,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Worktrees"})]})}),w.jsx(er,{to:"/repositories",children:w.jsxs(ze,{variant:r.startsWith("/repositories")?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:e7,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Repositories"})]})}),w.jsx(er,{to:"/review",children:w.jsxs(ze,{variant:r.startsWith("/review")?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:fk,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Review"})]})}),w.jsx(er,{to:"/monitoring",children:w.jsxs(ze,{variant:r.startsWith("/monitoring")?"secondary":"ghost",size:"sm",className:"max-sm:px-2",children:[w.jsx(be,{icon:EX,size:16,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Monitoring"})]})})]})]}),w.jsxs("div",{className:"flex shrink-0 items-center gap-2 max-sm:gap-1",children:[w.jsx(zre,{open:i,onOpenChange:s}),w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:t,title:"Command Palette (⌘K)",children:w.jsx(be,{icon:GE,size:16,strokeWidth:2})}),w.jsx(er,{to:"/settings",children:w.jsx(ze,{variant:r==="/settings"?"secondary":"ghost",size:"icon-sm",children:w.jsx(be,{icon:i7,size:16,strokeWidth:2})})})]})]})}function $re(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`}const Fre=10,Ure=2e3;function Vre(){const e=hr(),t=O.useRef(null),n=O.useRef(void 0),r=O.useRef(0),i=O.useRef(void 0),s=O.useCallback(a=>{try{const c=JSON.parse(a.data);if(c.type==="task:updated")e.invalidateQueries({queryKey:["tasks"]});else if(c.type==="notification"&&"payload"in c){const{title:u,message:h,notificationType:f}=c.payload;switch(f){case"success":ei.success(u,{description:h});break;case"error":ei.error(u,{description:h});break;case"warning":ei.warning(u,{description:h});break;default:ei.info(u,{description:h});break}}}catch{}},[e]),l=O.useCallback(()=>{const a=t.current;if(a&&(a.readyState===WebSocket.CONNECTING||a.readyState===WebSocket.OPEN))return;const c=$re(),u=new WebSocket(c);t.current=u,u.onopen=()=>{r.current=0},u.onmessage=s,u.onclose=()=>{t.current===u&&(t.current=null),r.current<Fre&&(r.current++,n.current=setTimeout(()=>{i.current?.()},Ure))},u.onerror=()=>{}},[s]);i.current=l,O.useEffect(()=>(l(),()=>{n.current&&clearTimeout(n.current),t.current&&(t.current.close(),t.current=null)}),[l])}const _z=O.createContext(null);function qre({children:e}){const[t,n]=O.useState(!1),[r,i]=O.useState(!1),s=O.useCallback(u=>{n(u)},[]),l=O.useCallback(u=>{i(u)},[]),a=O.useMemo(()=>!t,[t]),c=O.useMemo(()=>({terminalFocused:t,setTerminalFocused:s,modalOpen:r,setModalOpen:l,shortcutsEnabled:a}),[t,s,r,l,a]);return w.jsx(_z.Provider,{value:c,children:e})}function nO(){const e=O.useContext(_z);if(!e)throw new Error("useKeyboardContext must be used within a KeyboardProvider");return e}function Wre(){return navigator.platform.toUpperCase().indexOf("MAC")>=0}function xz(e){const t=e.toLowerCase().split("+"),n=t.pop()||"";return{meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),key:n}}function Gre(e,t){const n=xz(t);if(n.meta!==e.metaKey||n.ctrl!==e.ctrlKey||n.alt!==e.altKey||n.shift!==e.shiftKey)return!1;const r=e.key.toLowerCase(),i=n.key.toLowerCase();return i==="escape"?r==="escape":i==="enter"?r==="enter":i==="space"?r===" ":i==="backspace"?r==="backspace":i==="delete"?r==="delete":i==="tab"?r==="tab":i==="arrowup"?r==="arrowup":i==="arrowdown"?r==="arrowdown":i==="arrowleft"?r==="arrowleft":i==="arrowright"?r==="arrowright":/^[0-9]$/.test(i)?r===i:i==="/"&&!n.shift?r==="/":i==="/"&&n.shift||i==="?"?r==="?":i===","?r===",":i==="\\"?r==="\\":r===i}function Sz(e){const t=xz(e),n=[],r=Wre();t.ctrl&&n.push("Ctrl"),t.alt&&n.push(r?"Option":"Alt"),t.shift&&n.push("Shift"),t.meta&&n.push(r?"Cmd":"Ctrl");let i=t.key.toUpperCase();return i==="ESCAPE"&&(i="Esc"),i==="ENTER"&&(i="Enter"),i==="SPACE"&&(i="Space"),i==="BACKSPACE"&&(i="Backspace"),i==="DELETE"&&(i="Delete"),i==="ARROWUP"&&(i="↑"),i==="ARROWDOWN"&&(i="↓"),i==="ARROWLEFT"&&(i="←"),i==="ARROWRIGHT"&&(i="→"),i===","&&(i=","),i==="/"&&(i="/"),i==="?"&&(i="?"),i==="\\"&&(i="\\"),n.push(i),n.join("+")}function Kre(e){if(!e||!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return!!(t==="input"||t==="textarea"||e.isContentEditable)}function Ro(e,t,n={}){const{shortcutsEnabled:r}=nO(),{ignoreContext:i=!1,allowInInput:s=!1,allowInTerminal:l=!1,deps:a=[],enabled:c=!0}=n,u=O.useRef(t);u.current=t;const h=Array.isArray(e)?e:[e],f=O.useCallback(p=>{!i&&!r&&!l||!c||!s&&Kre(p.target)&&!h.some(x=>x.toLowerCase()==="escape")||!h.some(S=>Gre(p,S))||(p.preventDefault(),p.stopPropagation(),u.current(p))},[r,i,s,l,c,...h,...a]);O.useEffect(()=>(document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}),[f])}function ZL(e,t){const n=e.toLowerCase(),r=t.toLowerCase();if(n===r)return 100;if(n.startsWith(r))return 80;if(n.includes(r))return 60;let i=0,s=0,l=0;for(;i<n.length&&s<r.length;)n[i]===r[s]&&(l+=1,s++),i++;return s===r.length?l:0}function Yre(e,t){return t.trim()?e.map(r=>{let i=ZL(r.label,t);if(r.keywords)for(const s of r.keywords){const l=ZL(s,t);l>i&&(i=l)}return{command:r,score:i}}).filter(({score:r})=>r>0).sort((r,i)=>i.score-r.score).map(({command:r})=>r):e}function Xre(e){const t=new Map;for(const n of e){const r=t.get(n.category)||[];r.push(n),t.set(n.category,r)}return t}const Qre={navigation:"Navigation",actions:"Actions"},Zre={activeTabId:null,focusedTerminals:{}};function wz(){const e=hr(),t=O.useRef(void 0),n=O.useRef({}),{data:r=Zre,isLoading:i}=ar({queryKey:["terminal-view-state"],queryFn:async()=>{const h=await fetch("/api/terminal-view-state");if(!h.ok)throw new Error("Failed to fetch terminal view state");return h.json()}}),s=Kn({mutationFn:async h=>{const f=await fetch("/api/terminal-view-state",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!f.ok)throw new Error("Failed to update terminal view state");return f.json()},onSuccess:h=>{e.setQueryData(["terminal-view-state"],h)}}),l=O.useCallback(h=>{const f=n.current;n.current={...f,...h,focusedTerminals:h.focusedTerminals||f.focusedTerminals?{...f.focusedTerminals,...h.focusedTerminals}:void 0};const p=n.current,v={activeTabId:p.activeTabId!==void 0?p.activeTabId:r.activeTabId,focusedTerminals:{...r.focusedTerminals,...p.focusedTerminals}};e.setQueryData(["terminal-view-state"],v),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{s.mutate(n.current),n.current={}},500)},[e,r,s]),a=O.useCallback(h=>{l({activeTabId:h})},[l]),c=O.useCallback((h,f)=>{if(f===null){const{[h]:p,...v}=r.focusedTerminals;l({focusedTerminals:v})}else l({focusedTerminals:{[h]:f}})},[l,r.focusedTerminals]),u=O.useCallback(h=>r.focusedTerminals[h]??null,[r.focusedTerminals]);return{viewState:r,isLoading:i,activeTabId:r.activeTabId,setActiveTab:a,getFocusedTerminal:u,setFocusedTerminal:c}}function Jre({open:e,onOpenChange:t,onNewTask:n,onShowShortcuts:r}){const[i,s]=O.useState(!1),l=e??i,a=t??s,[c,u]=O.useState(""),[h,f]=O.useState(0),p=O.useRef(null),v=O.useRef(null),S=Qa(),{setActiveTab:x}=wz(),g=O.useMemo(()=>[{id:"goto-tasks",label:"Go to Tasks",shortcut:"meta+1",keywords:["kanban","board","home"],category:"navigation",icon:w.jsx(be,{icon:$v,size:16,strokeWidth:2}),action:()=>{S({to:"/tasks"}),a(!1)}},{id:"goto-terminals",label:"Go to Terminals",shortcut:"meta+2",keywords:["shell","console","cli"],category:"navigation",icon:w.jsx(be,{icon:dk,size:16,strokeWidth:2}),action:()=>{S({to:"/terminals"}),a(!1)}},{id:"goto-task-terminals",label:"Go to Task Terminals",shortcut:"meta+i",keywords:["tasks","shell","console","cli"],category:"navigation",icon:w.jsx(be,{icon:$v,size:16,strokeWidth:2}),action:()=>{x("all-tasks"),S({to:"/terminals"}),a(!1)}},{id:"goto-worktrees",label:"Go to Worktrees",shortcut:"meta+3",keywords:["git","branches"],category:"navigation",icon:w.jsx(be,{icon:n7,size:16,strokeWidth:2}),action:()=>{S({to:"/worktrees"}),a(!1)}},{id:"goto-repositories",label:"Go to Repositories",shortcut:"meta+4",keywords:["repos","git","projects"],category:"navigation",icon:w.jsx(be,{icon:e7,size:16,strokeWidth:2}),action:()=>{S({to:"/repositories"}),a(!1)}},{id:"goto-settings",label:"Go to Settings",shortcut:"meta+,",keywords:["preferences","config","configuration"],category:"navigation",icon:w.jsx(be,{icon:i7,size:16,strokeWidth:2}),action:()=>{S({to:"/settings"}),a(!1)}},{id:"new-task",label:"New Task",shortcut:"meta+j",keywords:["create","add"],category:"actions",icon:w.jsx(be,{icon:Ld,size:16,strokeWidth:2}),action:()=>{a(!1),n?.()}},{id:"show-shortcuts",label:"Keyboard Shortcuts",shortcut:"meta+/",keywords:["help","hotkeys","keys"],category:"actions",icon:w.jsx(be,{icon:LX,size:16,strokeWidth:2}),action:()=>{a(!1),r?.()}}],[S,n,r,x,a]),b=O.useMemo(()=>Yre(g,c),[g,c]),y=O.useMemo(()=>Xre(b),[b]),_=O.useMemo(()=>{const k=[],A=["navigation","actions"];for(const R of A){const L=y.get(R);L&&k.push(...L)}return k},[y]);O.useEffect(()=>{f(0)},[c]),O.useEffect(()=>{if(!v.current)return;const k=v.current.querySelector('[data-selected="true"]');k&&k.scrollIntoView({block:"nearest"})},[h]),Ro("meta+k",()=>a(!0),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+1",()=>S({to:"/tasks"}),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+2",()=>S({to:"/terminals"}),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+i",()=>{x("all-tasks"),S({to:"/terminals"})},{allowInInput:!0,allowInTerminal:!0}),Ro("meta+3",()=>S({to:"/worktrees"}),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+4",()=>S({to:"/repositories"}),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+,",()=>S({to:"/settings"}),{allowInInput:!0,allowInTerminal:!0}),Ro("meta+j",()=>{n?.()},{allowInInput:!1,deps:[n]}),Ro("meta+/",()=>{r?.()},{allowInInput:!0,allowInTerminal:!0,deps:[r]});const T=O.useCallback(k=>{switch(k.key){case"ArrowDown":k.preventDefault(),f(A=>Math.min(A+1,_.length-1));break;case"ArrowUp":k.preventDefault(),f(A=>Math.max(A-1,0));break;case"Enter":k.preventDefault(),_[h]&&_[h].action();break;case"Escape":k.preventDefault(),a(!1);break}},[_,h,a]);O.useEffect(()=>{l&&(u(""),f(0),setTimeout(()=>p.current?.focus(),50))},[l]);let E=0;return w.jsx(bs,{open:l,onOpenChange:a,children:w.jsxs(_s,{className:"sm:max-w-lg p-0 gap-0 overflow-hidden",showCloseButton:!1,onKeyDown:T,children:[w.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[w.jsx("span",{className:"text-muted-foreground mr-2",children:">"}),w.jsx(nn,{ref:p,value:c,onChange:k=>u(k.target.value),placeholder:"Type a command or search...",className:"border-0 ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 px-0 h-12"}),w.jsx("kbd",{className:"pointer-events-none ml-2 inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:"Esc"})]}),w.jsx("div",{ref:v,className:"max-h-80 overflow-y-auto p-2",children:b.length===0?w.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No commands found."}):w.jsx(w.Fragment,{children:["navigation","actions"].map(k=>{const A=y.get(k);return!A||A.length===0?null:w.jsxs("div",{className:"mb-2 last:mb-0",children:[w.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:Qre[k]}),A.map(R=>{const L=E++,z=L===h;return w.jsxs("button",{"data-selected":z,onClick:()=>R.action(),onMouseEnter:()=>f(L),className:Be("flex w-full items-center gap-3 rounded-md px-2 py-2 text-sm",z?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[R.icon&&w.jsx("span",{className:"text-muted-foreground",children:R.icon}),w.jsx("span",{className:"flex-1 text-left",children:R.label}),R.shortcut&&w.jsx("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:Sz(R.shortcut)})]},R.id)})]},k)})})})]})})}const eie=[{title:"Navigation",items:[{label:"Go to Tasks",shortcut:"meta+1"},{label:"Go to Terminals",shortcut:"meta+2"},{label:"Go to Task Terminals",shortcut:"meta+i"},{label:"Go to Worktrees",shortcut:"meta+3"},{label:"Go to Repositories",shortcut:"meta+4"},{label:"Go to Settings",shortcut:"meta+,"}]},{title:"Actions",items:[{label:"Command Palette",shortcut:"meta+k"},{label:"New Task",shortcut:"meta+j"},{label:"Keyboard Shortcuts",shortcut:"meta+/"}]},{title:"General",items:[{label:"Close Modal",shortcut:"escape"}]}];function tie({open:e,onOpenChange:t}){return w.jsx(bs,{open:e,onOpenChange:t,children:w.jsxs(_s,{className:"sm:max-w-md",children:[w.jsx($s,{children:w.jsx(Fs,{children:"Keyboard Shortcuts"})}),w.jsx("div",{className:"space-y-4 mt-2",children:eie.map(n=>w.jsxs("div",{children:[w.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:n.title}),w.jsx("div",{className:"space-y-1",children:n.items.map(r=>w.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[w.jsx("span",{className:"text-sm",children:r.label}),w.jsx("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:Sz(r.shortcut)})]},r.shortcut))})]},n.title))})]})})}const nie=({...e})=>w.jsx(Lee,{theme:"dark",className:"toaster group",icons:{success:w.jsx(be,{icon:kX,strokeWidth:2,className:"size-4"}),info:w.jsx(be,{icon:IX,strokeWidth:2,className:"size-4"}),warning:w.jsx(be,{icon:Md,strokeWidth:2,className:"size-4"}),error:w.jsx(be,{icon:HX,strokeWidth:2,className:"size-4"}),loading:w.jsx(be,{icon:Fr,strokeWidth:2,className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e}),Es=rK({component:iie});function rie(){return Vre(),null}function iie(){const[e,t]=O.useState(null),[n,r]=O.useState(!1),[i,s]=O.useState(!1),l=O.useCallback(h=>{t(()=>h)},[]),a=O.useCallback(()=>{e?.()},[e]),c=O.useCallback(()=>{r(!0)},[]),u=O.useCallback(()=>{s(!0)},[]);return w.jsx(qre,{children:w.jsxs("div",{className:"flex h-screen flex-col overflow-x-hidden bg-background text-foreground",children:[w.jsx(rie,{}),w.jsx(Hre,{onNewTaskRef:l,onOpenCommandPalette:u}),w.jsx("main",{className:"isolate flex-1 overflow-hidden",children:w.jsx(_9,{})}),w.jsx(Jre,{open:i,onOpenChange:s,onNewTask:a,onShowShortcuts:c}),w.jsx(tie,{open:n,onOpenChange:r}),w.jsx(nie,{position:"bottom-right"})]})})}const sie=ts("/")({beforeLoad:()=>{throw i9({to:"/tasks"})}}),Cz="";function oie(){const[e,t]=O.useState(new Map),[n,r]=O.useState(null),[i,s]=O.useState(!0),[l,a]=O.useState(!1),[c,u]=O.useState(null),h=O.useRef(null),f=O.useRef(0),p=O.useCallback(()=>{h.current?.close(),s(!0),a(!1),u(null),t(new Map),r(null);const S=new EventSource(`${Cz}/api/worktrees`);h.current=S,S.addEventListener("worktree:basic",x=>{const g=JSON.parse(x.data);f.current=g.length,t(new Map(g.map(b=>[b.path,{...b,size:0,sizeFormatted:"...",branch:"..."}]))),s(!1),a(g.length>0)}),S.addEventListener("worktree:details",x=>{const g=JSON.parse(x.data);t(b=>{const y=new Map(b),_=y.get(g.path);return _&&y.set(g.path,{..._,size:g.size,sizeFormatted:g.sizeFormatted,branch:g.branch}),y}),f.current--,f.current<=0&&a(!1)}),S.addEventListener("worktree:complete",x=>{const g=JSON.parse(x.data);r(g),a(!1),S.close()}),S.addEventListener("worktree:error",x=>{const{path:g}=JSON.parse(x.data);console.error(`Error loading worktree details for ${g}`),f.current--,f.current<=0&&a(!1)}),S.onerror=()=>{u(new Error("Connection lost")),s(!1),a(!1),S.close()}},[]);return O.useEffect(()=>(p(),()=>{h.current?.close()}),[p]),{worktrees:O.useMemo(()=>Array.from(e.values()).sort((x,g)=>x.isOrphaned!==g.isOrphaned?x.isOrphaned?-1:1:new Date(g.lastModified).getTime()-new Date(x.lastModified).getTime()),[e]),summary:n,isLoading:i,isLoadingDetails:l,error:c,refetch:p}}function aie(){const e=hr();return Kn({mutationFn:({worktreePath:t,repoPath:n,deleteLinkedTask:r})=>Qt(`${Cz}/api/worktrees`,{method:"DELETE",body:JSON.stringify({worktreePath:t,repoPath:n,deleteLinkedTask:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["worktrees"]}),e.invalidateQueries({queryKey:["tasks"]})}})}const lie=Ac("h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-2.5! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-colors overflow-hidden group/badge",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function hc({className:e,variant:t="default",render:n,...r}){return Zne({defaultTagName:"span",props:Qs({className:Be(lie({className:e,variant:t}))},r),render:n,state:{slot:"badge",variant:t}})}function jo({className:e,size:t="default",...n}){return w.jsx("div",{"data-slot":"card","data-size":t,className:Be("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-lg py-4 text-xs/relaxed ring-1 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg group/card flex flex-col",e),...n})}function cie({className:e,...t}){return w.jsx("div",{"data-slot":"card-header",className:Be("gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...t})}function uie({className:e,...t}){return w.jsx("div",{"data-slot":"card-title",className:Be("text-sm font-medium",e),...t})}function em({className:e,...t}){return w.jsx("div",{"data-slot":"card-content",className:Be("px-4 group-data-[size=sm]/card:px-3",e),...t})}function Hd({...e}){return w.jsx(Pte,{"data-slot":"alert-dialog",...e})}function $d({...e}){return w.jsx(gB,{"data-slot":"alert-dialog-trigger",...e})}function die({...e}){return w.jsx(fB,{"data-slot":"alert-dialog-portal",...e})}function fie({className:e,...t}){return w.jsx(a7,{"data-slot":"alert-dialog-overlay",className:Be("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function Fd({className:e,size:t="default",...n}){return w.jsxs(die,{children:[w.jsx(fie,{}),w.jsx(dB,{"data-slot":"alert-dialog-content","data-size":t,className:Be("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-3 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...n})]})}function Ud({className:e,...t}){return w.jsx("div",{"data-slot":"alert-dialog-header",className:Be("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function Vd({className:e,...t}){return w.jsx("div",{"data-slot":"alert-dialog-footer",className:Be("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function qd({className:e,...t}){return w.jsx(mB,{"data-slot":"alert-dialog-title",className:Be("text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function Wd({className:e,...t}){return w.jsx(u7,{"data-slot":"alert-dialog-description",className:Be("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...t})}function Ez({className:e,...t}){return w.jsx(ze,{"data-slot":"alert-dialog-action",className:Be(e),...t})}function Gd({className:e,variant:t="outline",size:n="default",...r}){return w.jsx(Cb,{"data-slot":"alert-dialog-cancel",className:Be(e),render:w.jsx(ze,{variant:t,size:n}),...r})}const tm=O.forwardRef(({className:e,...t},n)=>w.jsx(one,{ref:n,className:Be("peer size-4 shrink-0 rounded border border-input ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-checked:bg-primary data-checked:border-primary data-checked:text-primary-foreground","flex items-center justify-center transition-colors",e),...t,children:w.jsx(ane,{className:"flex items-center justify-center",children:w.jsx(be,{icon:Pc,size:12,strokeWidth:3})})}));tm.displayName="Checkbox";const Tz={IN_PROGRESS:"In Progress",IN_REVIEW:"In Review",DONE:"Done",CANCELED:"Canceled",ORPHANED:"Orphaned"},l2={IN_PROGRESS:"bg-slate-400/20 text-slate-600 dark:text-slate-400",IN_REVIEW:"bg-violet-400/20 text-violet-600 dark:text-violet-400",DONE:"bg-emerald-400/20 text-emerald-600 dark:text-emerald-400",CANCELED:"bg-rose-400/20 text-rose-600 dark:text-rose-400",ORPHANED:"bg-destructive/20 text-destructive"},hie=ts("/worktrees/")({component:vie});function pie(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),l=Math.floor(s/60),a=Math.floor(l/24);return a>0?a===1?"1 day ago":`${a} days ago`:l>0?l===1?"1 hour ago":`${l} hours ago`:s>0?s===1?"1 minute ago":`${s} minutes ago`:"just now"}function JL({className:e}){return w.jsx("span",{className:`inline-block animate-pulse rounded bg-muted ${e}`})}function mie({worktree:e,onDelete:t}){const[n,r]=O.useState(!1),[i,s]=O.useState(!1),[l,a]=O.useState(!1),c=e.sizeFormatted==="..."||e.branch==="...",u=!e.isOrphaned&&e.taskId,h=async()=>{s(!0);try{await t(e,l),r(!1)}catch{}finally{s(!1)}},f=p=>{r(p),p||a(!1)};return w.jsx(jo,{className:"transition-colors hover:border-border/80",children:w.jsxs(em,{className:"flex items-start justify-between gap-4 py-4",children:[w.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"truncate font-medium",children:e.name}),e.isOrphaned?w.jsx(hc,{className:Be("shrink-0",l2.ORPHANED),children:"Orphaned"}):e.taskStatus?w.jsx(hc,{className:Be("shrink-0",l2[e.taskStatus]),children:Tz[e.taskStatus]}):null]}),w.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:Qi,size:12,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{className:"truncate font-mono",children:e.path})]}),w.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:YE,size:12,strokeWidth:2,className:"shrink-0"}),e.branch==="..."?w.jsx(JL,{className:"h-3 w-16"}):w.jsx("span",{className:"font-mono",children:e.branch})]}),w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:MX,size:12,strokeWidth:2,className:"shrink-0"}),e.sizeFormatted==="..."?w.jsx(JL,{className:"h-3 w-12"}):w.jsx("span",{children:e.sizeFormatted})]}),w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:CX,size:12,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{children:pie(e.lastModified)})]})]}),e.taskId&&e.taskTitle&&w.jsx("div",{className:"flex items-center gap-1.5 pt-1",children:w.jsxs(er,{to:"/tasks/$taskId",params:{taskId:e.taskId},className:"inline-flex items-center gap-1 text-foreground hover:underline",children:[w.jsx("span",{className:"truncate",children:e.taskTitle}),w.jsx(be,{icon:Sb,size:12,strokeWidth:2,className:"shrink-0"})]})})]})]}),w.jsxs(Hd,{open:n,onOpenChange:f,children:[w.jsx($d,{render:w.jsx(ze,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-muted-foreground hover:text-destructive",disabled:c}),children:w.jsx(be,{icon:Fp,size:14,strokeWidth:2})}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsx(qd,{children:"Delete Worktree"}),w.jsxs(Wd,{children:["This will permanently delete the worktree directory at"," ",w.jsx("span",{className:"font-mono",children:e.name}),".",l&&u&&w.jsxs(w.Fragment,{children:[" ","The linked task ",w.jsxs("span",{className:"font-medium",children:['"',e.taskTitle,'"']})," ","will also be deleted."]})," ","This action cannot be undone."]}),u&&w.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground",children:[w.jsx(tm,{checked:l,onCheckedChange:p=>a(p===!0),disabled:i}),'Also delete linked task "',e.taskTitle,'"']})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{disabled:i,children:"Cancel"}),w.jsxs(ze,{variant:"destructive",onClick:h,disabled:i,className:"gap-2",children:[i&&w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}),i?"Deleting...":"Delete"]})]})]})]})]})})}const gie=["IN_PROGRESS","IN_REVIEW","DONE","CANCELED","ORPHANED"];function vie(){const{worktrees:e,summary:t,isLoading:n,isLoadingDetails:r,error:i,refetch:s}=oie(),l=aie(),[a,c]=O.useState(new Set),[u,h]=O.useState(!1),[f,p]=O.useState(!1),[v,S]=O.useState(!1),x=k=>{c(A=>{const R=new Set(A);return R.has(k)?R.delete(k):R.add(k),R})},g=()=>{c(new Set)},b=O.useMemo(()=>a.size===0?e:e.filter(k=>!!(k.isOrphaned&&a.has("ORPHANED")||k.taskStatus&&a.has(k.taskStatus))),[e,a]),y=O.useMemo(()=>e.filter(k=>k.taskStatus==="DONE"||k.taskStatus==="CANCELED"),[e]),_=async()=>{if(y.length!==0){p(!0);try{for(const k of y)await l.mutateAsync({worktreePath:k.path,repoPath:k.repoPath,deleteLinkedTask:v});h(!1),s()}catch{}finally{p(!1)}}},T=k=>{h(k),k||S(!1)},E=async(k,A)=>{await l.mutateAsync({worktreePath:k.path,repoPath:k.repoPath,deleteLinkedTask:A}),s()};return w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsxs("div",{className:"flex shrink-0 flex-col gap-2 border-b border-border px-4 py-2",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{className:"flex items-center gap-4",children:[w.jsx("h1",{className:"text-sm font-medium",children:"Worktrees"}),(t||e.length>0)&&w.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[w.jsxs("span",{children:[t?.total??e.length," total"]}),(t?.orphaned??e.filter(k=>k.isOrphaned).length)>0&&w.jsxs("span",{className:"text-destructive",children:[t?.orphaned??e.filter(k=>k.isOrphaned).length," orphaned"]}),r?w.jsx("span",{className:"animate-pulse",children:"calculating..."}):t?w.jsx("span",{children:t.totalSizeFormatted}):null]})]}),w.jsxs("div",{className:"flex items-center gap-2",children:[y.length>0&&w.jsxs(Hd,{open:u,onOpenChange:T,children:[w.jsxs($d,{render:w.jsx(ze,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground hover:text-destructive",disabled:r}),children:[w.jsx(be,{icon:OX,size:12,strokeWidth:2}),"Clean up (",y.length,")"]}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsx(qd,{children:"Delete Completed Worktrees"}),w.jsxs(Wd,{children:["This will permanently delete ",y.length," worktree",y.length!==1?"s":"",".",v&&" Their linked tasks will also be deleted."]}),w.jsxs("div",{className:"space-y-3",children:[w.jsxs("p",{className:"text-sm text-muted-foreground",children:[y.filter(k=>k.taskStatus==="DONE").length>0&&w.jsxs("span",{className:"mr-3",children:[w.jsx("span",{className:"font-medium text-emerald-600",children:y.filter(k=>k.taskStatus==="DONE").length})," ","Done"]}),y.filter(k=>k.taskStatus==="CANCELED").length>0&&w.jsxs("span",{children:[w.jsx("span",{className:"font-medium text-rose-600",children:y.filter(k=>k.taskStatus==="CANCELED").length})," ","Canceled"]})]}),w.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground",children:[w.jsx(tm,{checked:v,onCheckedChange:k=>S(k===!0),disabled:f}),"Also delete linked tasks"]}),w.jsx("p",{className:"font-medium text-destructive text-xs",children:"This action cannot be undone."})]})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{disabled:f,children:"Cancel"}),w.jsxs(ze,{variant:"destructive",onClick:_,disabled:f,className:"gap-2",children:[f&&w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}),f?"Deleting...":`Delete ${y.length}`]})]})]})]}),a.size>0&&w.jsxs(ze,{variant:"ghost",size:"sm",onClick:g,className:"gap-1.5 text-xs",children:[w.jsx(be,{icon:Cs,size:12,strokeWidth:2}),"Clear filters"]})]})]}),w.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:gie.map(k=>{const A=a.has(k);return w.jsx("button",{onClick:()=>x(k),className:Be("rounded-full px-2.5 py-1 text-xs font-medium transition-colors",A?l2[k]:"bg-muted text-muted-foreground hover:bg-muted/80"),children:Tz[k]},k)})})]}),w.jsxs("div",{className:"pixel-grid flex-1 overflow-auto p-4",children:[n&&w.jsx("div",{className:"flex items-center justify-center py-12",children:w.jsx(be,{icon:Fr,size:24,strokeWidth:2,className:"animate-spin text-muted-foreground"})}),i&&w.jsxs("div",{className:"flex items-center gap-3 py-6 text-destructive",children:[w.jsx(be,{icon:Md,size:20,strokeWidth:2}),w.jsxs("span",{className:"text-sm",children:["Failed to load worktrees: ",i.message]})]}),!n&&!i&&b.length===0&&w.jsx("div",{className:"py-12 text-muted-foreground",children:w.jsx("p",{className:"text-sm",children:a.size>0?"No worktrees match the selected filters.":"No worktrees found. Worktrees are created when you create tasks."})}),!n&&w.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:b.map(k=>w.jsx(mie,{worktree:k,onDelete:E},k.path))})]})]})}function an(e,t="Assertion error"){if(!e)throw Error(t)}function id({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,i)=>(r+=t==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,r),0)}function c2(e,t){return t.sort(e==="horizontal"?yie:bie)}function yie(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function bie(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function kz(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function _ie({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let i,s=Number.MAX_VALUE;for(const l of t){const{x:a,y:c}=kz(r,l),u=e==="horizontal"?a:c;u<s&&(s=u,i=l)}return an(i,"No rect found"),i}function Oz(e){const{element:t,orientation:n,panels:r,separators:i}=e,s=c2(n,Array.from(t.children).filter(h=>h instanceof HTMLElement).map(h=>({element:h}))).map(({element:h})=>h),l=[];let a=!1,c,u=[];for(const h of s)if(h.hasAttribute("data-panel")){const f=r.find(p=>p.element===h);if(f){if(c){const p=c.element.getBoundingClientRect(),v=h.getBoundingClientRect();let S;if(a){const x=n==="horizontal"?new DOMRect(p.right,p.top,0,p.height):new DOMRect(p.left,p.bottom,p.width,0),g=n==="horizontal"?new DOMRect(v.left,v.top,0,v.height):new DOMRect(v.left,v.top,v.width,0);switch(u.length){case 0:{S=[x,g];break}case 1:{const b=u[0],y=_ie({orientation:n,rects:[p,v],targetRect:b.element.getBoundingClientRect()});S=[b,y===p?g:x];break}default:{S=u;break}}}else u.length?S=u:S=[n==="horizontal"?new DOMRect(p.right,v.top,v.left-p.right,v.height):new DOMRect(v.left,p.bottom,v.width,v.top-p.bottom)];for(const x of S)l.push({group:e,groupSize:id({group:e}),panels:[c,f],separator:"width"in x?void 0:x,rect:"width"in x?x:x.element.getBoundingClientRect()})}a=!1,c=f,u=[]}}else if(h.hasAttribute("data-separator")){const f=i.find(p=>p.element===h);f?u.push(f):(c=void 0,u=[])}else a=!0;return l}function xie(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function Sie(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function wie(e){return e/100*window.innerHeight}function Cie(e){return e/100*window.innerWidth}function Eie(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Qg({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,s]=Eie(n);switch(s){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=Sie(t,i);break}case"em":{r=xie(t,i);break}case"vh":{r=wie(i);break}case"vw":{r=Cie(i);break}}return r}function xs(e){return parseFloat(e.toFixed(3))}function ej(e){const{panels:t}=e,n=id({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:i,panelConstraints:s}=r;let l=0;if(s.collapsedSize){const h=Qg({groupSize:n,panelElement:i,styleProp:s.collapsedSize});l=xs(h/n*100)}let a;if(s.defaultSize){const h=Qg({groupSize:n,panelElement:i,styleProp:s.defaultSize});a=xs(h/n*100)}let c=0;if(s.minSize){const h=Qg({groupSize:n,panelElement:i,styleProp:s.minSize});c=xs(h/n*100)}let u=100;if(s.maxSize){const h=Qg({groupSize:n,panelElement:i,styleProp:s.maxSize});u=xs(h/n*100)}return{collapsedSize:l,collapsible:s.collapsible===!0,defaultSize:a,minSize:c,maxSize:u,panelId:r.id}})}class Tie{#e={};addListener(t,n){const r=this.#e[t];return r===void 0?this.#e[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=this.#e[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let i=!1,s=null;const l=Array.from(r);for(let a=0;a<l.length;a++){const c=l[a];try{c.call(null,n)}catch(u){s===null&&(i=!0,s=u)}}if(i)throw s}}removeAllListeners(){this.#e={}}removeListener(t,n){const r=this.#e[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}function $r(e,t,n=0){return Math.abs(xs(e)-xs(t))<=n}let $i={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const pc=new Tie;function no(){return $i}function Ji(e){const t=typeof e=="function"?e($i):e;if($i===t)return $i;const n=$i;return $i={...$i,...t},t.cursorFlags!==void 0&&pc.emit("cursorFlagsChange",$i.cursorFlags),t.interactionState!==void 0&&pc.emit("interactionStateChange",$i.interactionState),t.mountedGroups!==void 0&&($i.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(s=>{if(s.collapsible){const{layout:l}=n.mountedGroups.get(i)??{};if(l){const a=$r(s.collapsedSize,r.layout[s.panelId]),c=$r(s.collapsedSize,l[s.panelId]);a&&!c&&(i.inMemoryLastExpandedPanelSizes[s.panelId]=l[s.panelId])}}})}),pc.emit("mountedGroupsChange",$i.mountedGroups)),$i}const kie=e=>e,ux=()=>{},Rz=1,Az=2,Pz=4,Mz=8,tj={coarse:10,precise:5};function Oie({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case"active":case"hover":t.forEach(s=>{if(!s.disableCursor)switch(s.orientation){case"horizontal":{r++;break}case"vertical":{i++;break}}})}if(r===0&&i===0)return null;switch(n){case"active":{const s=(e&Rz)!==0,l=(e&Az)!==0,a=(e&Pz)!==0,c=(e&Mz)!==0;if(e){if(s)return a?"se-resize":c?"ne-resize":"e-resize";if(l)return a?"sw-resize":c?"nw-resize":"w-resize";if(a)return"s-resize";if(c)return"n-resize"}break}}return r>0&&i>0?"move":r>0?"ew-resize":"ns-resize"}let dx,Ds;function rO(){Ds===void 0&&(Ds=new CSSStyleSheet,document.adoptedStyleSheets=[Ds]);const{cursorFlags:e,interactionState:t}=no();switch(t.state){case"active":case"hover":{const n=Oie({cursorFlags:e,groups:t.hitRegions.map(i=>i.group),state:t.state}),r=`*{cursor: ${n} !important; ${t.state==="active"?"touch-action: none;":""} }`;if(dx===r)return;dx=r,n?Ds.cssRules.length===0?Ds.insertRule(r):Ds.replaceSync(r):Ds.cssRules.length===1&&Ds.deleteRule(0);break}case"inactive":{dx=void 0,Ds.cssRules.length===1&&Ds.deleteRule(0);break}}}function Rie(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Kh(e,t){return $r(e,t)?0:e>t?1:-1}function Mu({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:i=100,minSize:s=0}=e;if(Kh(t,s)<0)if(r){const l=(n+s)/2;Kh(t,l)<0?t=n:t=s}else t=s;return t=Math.min(i,t),t=xs(t),t}function Yh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:s}){if($r(e,0))return t;const l=Object.values(t),a=Object.values(i),c=[...l],[u,h]=r;an(u!=null,"Invalid first pivot index"),an(h!=null,"Invalid second pivot index");let f=0;if(s==="keyboard"){{const S=e<0?h:u,x=n[S];an(x,`Panel constraints not found for index ${S}`);const{collapsedSize:g=0,collapsible:b,minSize:y=0}=x;if(b){const _=l[S];if(an(_!=null,`Previous layout not found for panel index ${S}`),$r(_,g)){const T=y-_;Kh(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}{const S=e<0?u:h,x=n[S];an(x,`No panel constraints found for index ${S}`);const{collapsedSize:g=0,collapsible:b,minSize:y=0}=x;if(b){const _=l[S];if(an(_!=null,`Previous layout not found for panel index ${S}`),$r(_,y)){const T=_-g;Kh(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}}{const S=e<0?1:-1;let x=e<0?h:u,g=0;for(;;){const y=l[x];an(y!=null,`Previous layout not found for panel index ${x}`);const _=Mu({panelConstraints:n[x],size:100})-y;if(g+=_,x+=S,x<0||x>=n.length)break}const b=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-b:b}{let S=e<0?u:h;for(;S>=0&&S<n.length;){const x=Math.abs(e)-Math.abs(f),g=l[S];an(g!=null,`Previous layout not found for panel index ${S}`);const b=g-x,y=Mu({panelConstraints:n[S],size:b});if(!$r(g,y)&&(f+=g-y,c[S]=y,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?S--:S++}}if(Rie(a,c))return i;{const S=e<0?h:u,x=l[S];an(x!=null,`Previous layout not found for panel index ${S}`);const g=x+f,b=Mu({panelConstraints:n[S],size:g});if(c[S]=b,!$r(b,g)){let y=g-b,_=e<0?h:u;for(;_>=0&&_<n.length;){const T=c[_];an(T!=null,`Previous layout not found for panel index ${_}`);const E=T+y,k=Mu({panelConstraints:n[_],size:E});if($r(T,k)||(y-=k-T,c[_]=k),$r(y,0))break;e>0?_--:_++}}}const p=Object.values(c).reduce((S,x)=>x+S,0);if(!$r(p,100,.1))return i;const v=Object.keys(i);return c.reduce((S,x,g)=>(S[v[g]]=x,S),{})}function Kd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Kh(e[n],t[n])!==0)return!1;return!0}function Lz({event:e,hitRegions:t,initialLayoutMap:n,mountedGroups:r,pointerDownAtPoint:i}){let s=0;const l=new Map(r);t.forEach(a=>{const{group:c,groupSize:u}=a,{disableCursor:h,orientation:f,panels:p}=c;let v=0;i?f==="horizontal"?v=(e.clientX-i.x)/u*100:v=(e.clientY-i.y)/u*100:f==="horizontal"?v=e.clientX<0?-100:100:v=e.clientY<0?-100:100;const S=n.get(c),{defaultLayoutDeferred:x,derivedPanelConstraints:g,layout:b,separatorToPanels:y}=r.get(c)??{defaultLayoutDeferred:!1};if(g&&S&&b&&y){const _=Yh({delta:v,initialLayout:S,panelConstraints:g,pivotIndices:a.panels.map(T=>p.indexOf(T)),prevLayout:b,trigger:"mouse-or-touch"});if(Kd(_,b)){if(v!==0&&!h)switch(f){case"horizontal":{s|=v<0?Rz:Az;break}case"vertical":{s|=v<0?Pz:Mz;break}}}else{l.set(a.group,{defaultLayoutDeferred:x,derivedPanelConstraints:g,layout:_,separatorToPanels:y});const T=a.group.panels.map(({id:E})=>E).join(",");a.group.inMemoryLayouts[T]=_}}}),Ji({cursorFlags:s,mountedGroups:l}),rO()}function nj(e){if(e.defaultPrevented||e.relatedTarget!==null||e.clientX===0&&e.clientY===0)return;const{interactionState:t,mountedGroups:n}=no();t.state==="active"&&t.hitRegions.forEach(r=>{e.currentTarget===r.group.element&&Lz({event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})})}function Tv(e){const t=e.parentElement;an(t,"Parent group element not found");const{mountedGroups:n}=no();for(const[r]of n)if(r.element===t)return r;throw Error("Could not find parent Group for separator element")}function Cc({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((l,a)=>l+a,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(l=>`${l}%`).join(", ")}`);if(!$r(r,100)&&n.length>0)for(let l=0;l<t.length;l++){const a=n[l];an(a!=null,`No layout data found for index ${l}`);const c=100/r*a;n[l]=c}let i=0;for(let l=0;l<t.length;l++){const a=n[l];an(a!=null,`No layout data found for index ${l}`);const c=Mu({panelConstraints:t[l],size:a});a!=c&&(i+=a-c,n[l]=c)}if(!$r(i,0))for(let l=0;l<t.length;l++){const a=n[l];an(a!=null,`No layout data found for index ${l}`);const c=a+i,u=Mu({panelConstraints:t[l],size:c});if(a!==u&&(i-=u-a,n[l]=u,$r(i,0)))break}const s=Object.keys(e);return n.reduce((l,a,c)=>(l[s[c]]=a,l),{})}function jz({groupId:e}){const t=()=>{const{mountedGroups:n}=no();for(const[r,i]of n)if(r.id===e)return{group:r,...i};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:s,layout:l,separatorToPanels:a}=t(),c=Cc({layout:n,panelConstraints:i});return r?l:(Kd(l,c)||Ji(u=>({mountedGroups:new Map(u.mountedGroups).set(s,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:c,separatorToPanels:a})})),c)}}}function Dz(e){const{mountedGroups:t}=no(),n=t.get(e);return an(n,`Mounted Group ${e.id} not found`),n}function Ml(e,t){const n=Tv(e),r=Dz(n),i=n.separators.find(h=>h.element===e);an(i,"Matching separator not found");const s=r.separatorToPanels.get(i);an(s,"Matching panels not found");const l=s.map(h=>n.panels.indexOf(h)),a=jz({groupId:n.id}).getLayout(),c=Yh({delta:t,initialLayout:a,panelConstraints:r.derivedPanelConstraints,pivotIndices:l,prevLayout:a,trigger:"keyboard"}),u=Cc({layout:c,panelConstraints:r.derivedPanelConstraints});Kd(a,u)||Ji(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:u,separatorToPanels:r.separatorToPanels})}))}function rj(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Tv(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Ml(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Ml(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Ml(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Ml(t,-5);break}case"End":{e.preventDefault(),Ml(t,100);break}case"Enter":{e.preventDefault();const r=Tv(t),{derivedPanelConstraints:i,layout:s,separatorToPanels:l}=Dz(r),a=r.separators.find(f=>f.element===t);an(a,"Matching separator not found");const c=l.get(a);an(c,"Matching panels not found");const u=c[0],h=i.find(f=>f.panelId===u.id);if(an(h,"Panel metadata not found"),h.collapsible){const f=s[u.id],p=h.collapsedSize===f?r.inMemoryLastExpandedPanelSizes[u.id]??h.minSize:h.collapsedSize;Ml(t,p-f)}break}case"F6":{e.preventDefault();const r=Tv(t).separators.map(l=>l.element),i=Array.from(r).findIndex(l=>l===e.currentTarget);an(i!==null,"Index not found");const s=e.shiftKey?i>0?i-1:r.length-1:i+1<r.length?i+1:0;r[s].focus();break}case"Home":{e.preventDefault(),Ml(t,-100);break}}}function Aie(e,t,n){let r,i={x:1/0,y:1/0};for(const s of t){const l=kz(n,s.rect);switch(e){case"horizontal":{l.x<=i.x&&(r=s,i=l);break}case"vertical":{l.y<=i.y&&(r=s,i=l);break}}}return r?{distance:i,hitRegion:r}:void 0}let Zg;function Pie(){return Zg===void 0&&(typeof matchMedia=="function"?Zg=!!matchMedia("(pointer:coarse)").matches:Zg=!1),Zg}function Mie(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:oj(e),b:oj(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;an(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:sj(ij(n.a)),b:sj(ij(n.b))};if(i.a===i.b){const s=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const c=s[a];if(c===l.a)return 1;if(c===l.b)return-1}}return Math.sign(i.a-i.b)}const Lie=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function jie(e){const t=getComputedStyle(Iz(e)??e).display;return t==="flex"||t==="inline-flex"}function Die(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||jie(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Lie.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function ij(e){let t=e.length;for(;t--;){const n=e[t];if(an(n,"Missing node"),Die(n))return n}return null}function sj(e){return e&&Number(getComputedStyle(e).zIndex)||0}function oj(e){const t=[];for(;e;)t.push(e),e=Iz(e);return t}function Iz(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}function Iie(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Nie({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!(n instanceof HTMLElement)||n.contains(e)||e.contains(n))return!0;if(Mie(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Iie(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Nz(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const s=Pie()?tj.coarse:tj.precise,l=Oz(i),a=Aie(i.orientation,l,{x:e.clientX,y:e.clientY});a&&a.distance.x<=s&&a.distance.y<=s&&Nie({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function aj(e){if(e.defaultPrevented)return;const{mountedGroups:t}=no(),n=Nz(e,t),r=new Set,i=new Set,s=new Set,l=new Map;let a=!1;n.forEach(c=>{r.add(c.group),c.panels.forEach(h=>{i.add(h)}),c.separator&&(s.add(c.separator),a||(a=!0,c.separator.element.focus()));const u=t.get(c.group);u&&l.set(c.group,u.layout)}),Ji({interactionState:{hitRegions:n,initialLayoutMap:l,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function lj(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=no();switch(t.state){case"active":{if(e.type!=="pointerleave"&&e.buttons===0){Ji(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}});return}Lz({event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=Nz(e,n);r.length===0?t.state!=="inactive"&&Ji({interactionState:{state:"inactive"}}):Ji({interactionState:{hitRegions:r,state:"hover"}}),rO();break}}}function cj(e){if(e.defaultPrevented)return;e.preventDefault();const{interactionState:t}=no();t.state==="active"&&(Ji({cursorFlags:0,interactionState:{state:"inactive"}}),rO())}function uj(e){let t=0,n=0;const r={};for(const s of e)if(s.defaultSize!==void 0){t++;const l=xs(s.defaultSize);n+=l,r[s.panelId]=l}else r[s.panelId]=void 0;const i=e.length-t;if(i!==0){const s=xs((100-n)/i);for(const l of e)l.defaultSize===void 0&&(r[l.panelId]=s)}return r}function Bie(e,t,n){const r=n[0];if(!r)return;const i=e.panels.find(l=>l.element===t);if(!i||!i.onResize)return;const s=id({group:e});i.onResize({asPercentage:xs(r.inlineSize/s*100),inPixels:r.inlineSize},i.id)}function zie(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Hie(e){let t=!0;const n=new Set,r=new Set,i=new ResizeObserver(v=>{for(const S of v){const{borderBoxSize:x,target:g}=S;if(g===e.element){if(t){if(id({group:e})===0)return;Ji(b=>{const y=b.mountedGroups.get(e);if(y){const _=ej(e),T=y.defaultLayoutDeferred?uj(_):y.layout,E=Cc({layout:T,panelConstraints:_});return!y.defaultLayoutDeferred&&Kd(T,E)&&zie(y.derivedPanelConstraints,_)?b:{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:_,layout:E,separatorToPanels:y.separatorToPanels})}}return b})}}else Bie(e,g,x)}});i.observe(e.element),e.panels.forEach(v=>{an(!n.has(v.id),`Panel ids must be unique; id "${v.id}" was used more than once`),n.add(v.id),v.onResize&&i.observe(v.element)});const s=id({group:e}),l=ej(e),a=e.panels.map(({id:v})=>v).join(",");let c=e.defaultLayout;c&&e.panels.length!==Object.keys(c).length&&(c=void 0);const u=e.inMemoryLayouts[a]??c??uj(l),h=Cc({layout:u,panelConstraints:l}),f=Oz(e),p=Ji(v=>{const S=new Map;return f.forEach(x=>{x.separator&&S.set(x.separator,x.panels)}),{mountedGroups:new Map(v.mountedGroups).set(e,{defaultLayoutDeferred:s===0,derivedPanelConstraints:l,layout:h,separatorToPanels:S})}});return e.element.addEventListener("pointerleave",nj),e.separators.forEach(v=>{an(!r.has(v.id),`Separator ids must be unique; id "${v.id}" was used more than once`),r.add(v.id),v.element.addEventListener("keydown",rj)}),p.mountedGroups.size===1&&(window.addEventListener("pointerdown",aj),window.addEventListener("pointermove",lj),window.addEventListener("pointerup",cj)),function(){t=!1;const v=Ji(S=>{const x=new Map(S.mountedGroups);return x.delete(e),{mountedGroups:x}});e.element.removeEventListener("pointerleave",nj),e.separators.forEach(S=>{S.element.removeEventListener("keydown",rj)}),v.mountedGroups.size===0&&(window.removeEventListener("pointerdown",aj),window.removeEventListener("pointermove",lj),window.removeEventListener("pointerup",cj)),i.disconnect()}}function iO(e){const t=O.useId();return`${e??t}`}const Nc=typeof window<"u"?O.useLayoutEffect:O.useEffect;function sO(e){const t=O.useRef(e);return Nc(()=>{t.current=e},[e]),O.useCallback(n=>t.current?.(n),[t])}function oO(...e){return sO(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function $ie(e){const t=O.useRef({...e});return Nc(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Bz="--react-resizable-panels--panel--pointer-events";function zz(e,t){const n=e.replace(/[^a-zA-Z0-9\-_]/g,""),r=t.replace(/[^a-zA-Z0-9\-_]/g,"");return`--react-resizable-panels--${n}--${r}`}const Hz=O.createContext(null);function Fie(e,t){const n=O.useRef({getLayout:()=>({}),setLayout:kie});O.useImperativeHandle(t,()=>n.current,[]),Nc(()=>{Object.assign(n.current,jz({groupId:e}))})}function Uie({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:s,groupRef:l,id:a,onLayoutChange:c,orientation:u="horizontal",style:h,...f}){const p=O.useRef({}),v=sO(U=>{Kd(p.current,U)||(p.current=U,c?.(U))}),S=iO(a),[x,g]=O.useState(!1),[b,y]=O.useState(null),[_,T]=O.useState(n??{}),[E,k]=O.useState([]),[A,R]=O.useState([]),L=O.useRef({lastExpandedPanelSizes:{},layouts:{}}),z=oO(y,s);Fie(S,l);const D=O.useMemo(()=>({id:S,orientation:u,registerPanel:U=>(k(H=>c2(u,[...H,U])),()=>{k(H=>H.filter(K=>K!==U))}),registerSeparator:U=>(R(H=>c2(u,[...H,U])),()=>{R(H=>H.filter(K=>K!==U))})}),[S,u]),$=$ie({defaultLayout:n,disableCursor:r}),N=O.useRef(null);Nc(()=>{if(b===null)return;const U={defaultLayout:$.defaultLayout,disableCursor:!!$.disableCursor,disabled:!!i,element:b,id:S,inMemoryLastExpandedPanelSizes:L.current.lastExpandedPanelSizes,inMemoryLayouts:L.current.layouts,orientation:u,panels:E,separators:A};N.current=U;const H=Hie(U),K=no().mountedGroups.get(U);if(K){const{defaultLayoutDeferred:G,derivedPanelConstraints:j,layout:B}=K;!G&&j.length>0&&(T(B),v?.(B))}const W=pc.addListener("interactionStateChange",G=>{G.state==="active"?g(G.hitRegions.some(j=>j.group===U)):g(!1)}),I=pc.addListener("mountedGroupsChange",G=>{const j=G.get(U);if(j){const{defaultLayoutDeferred:B,derivedPanelConstraints:V,layout:X}=j;if(B||V.length===0)return;T(X),v?.(X)}});return()=>{N.current=null,H(),W(),I()}},[i,b,S,v,u,E,A,$]),O.useEffect(()=>{const U=N.current;U&&(U.defaultLayout=n,U.disableCursor=!!r)});const F={[Bz]:x?"none":void 0};for(const U in _){const H=zz(S,U),K=_[U];F[H]=K}return w.jsx(Hz.Provider,{value:D,children:w.jsx("div",{...f,"aria-orientation":u,className:t,"data-group":!0,"data-testid":S,id:S,ref:z,style:{...h,...F,display:"flex",flexDirection:u==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}function aO(){const e=O.useContext(Hz);return an(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Vie({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:a}=no();for(const[c,{defaultLayoutDeferred:u,derivedPanelConstraints:h,layout:f,separatorToPanels:p}]of a)if(c.id===e)return{defaultLayoutDeferred:u,derivedPanelConstraints:h,group:c,layout:f,separatorToPanels:p};throw Error(`Group ${e} not found`)},r=()=>{const a=n().derivedPanelConstraints.find(c=>c.panelId===t);if(a!==void 0)return a;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{const a=n().group.panels.find(c=>c.id===t);if(a!==void 0)return a;throw Error(`Layout not found for Panel ${t}`)},s=()=>{const a=n().layout[t];if(a!==void 0)return a;throw Error(`Layout not found for Panel ${t}`)},l=a=>{const c=s();if(a===c)return;const{defaultLayoutDeferred:u,derivedPanelConstraints:h,group:f,layout:p,separatorToPanels:v}=n(),S=f.panels.findIndex(y=>y.id===t),x=S===f.panels.length-1,g=Yh({delta:x?c-a:a-c,initialLayout:p,panelConstraints:h,pivotIndices:x?[S-1,S]:[S,S+1],prevLayout:p,trigger:"imperative-api"}),b=Cc({layout:g,panelConstraints:h});Kd(p,b)||Ji(y=>({mountedGroups:new Map(y.mountedGroups).set(f,{defaultLayoutDeferred:u,derivedPanelConstraints:h,layout:b,separatorToPanels:v})}))};return{collapse:()=>{const{collapsible:a,collapsedSize:c}=r(),u=s();a&&u!==c&&l(c)},expand:()=>{const{collapsible:a,collapsedSize:c,minSize:u}=r(),h=s();a&&h===c&&l(u)},getSize:()=>{const{group:a}=n(),c=s(),{element:u}=i(),h=a.orientation==="horizontal"?u.offsetWidth:u.offsetHeight;return{asPercentage:c,inPixels:h}},isCollapsed:()=>{const{collapsible:a,collapsedSize:c}=r(),u=s();return a&&$r(c,u)},resize:a=>{if(s()!==a){let c;switch(typeof a){case"number":{const{group:u}=n(),h=id({group:u});c=xs(a/h*100);break}case"string":{c=parseFloat(a);break}}l(c)}}}}function qie(e,t){const{id:n}=aO(),r=O.useRef({collapse:ux,expand:ux,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:ux});O.useImperativeHandle(t,()=>r.current,[]),Nc(()=>{Object.assign(r.current,Vie({groupId:n,panelId:e}))})}function Wie({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:i,elementRef:s,id:l,maxSize:a="100%",minSize:c="0%",onResize:u,panelRef:h,style:f,...p}){const v=!!l,S=iO(l),[x,g]=O.useState(null),b=oO(g,s),{id:y,registerPanel:_}=aO(),T=u!==null,E=sO(A=>{u?.(A,l)});Nc(()=>{if(x!==null)return _({element:x,id:S,idIsStable:v,onResize:T?E:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:a,minSize:c}})},[n,r,i,x,T,S,v,a,c,E,_]),qie(S,h);const k=zz(y,S);return w.jsx("div",{...p,"data-panel":!0,"data-testid":S,id:S,ref:b,style:{...Gie,flexBasis:0,flexGrow:`var(${k}, 1)`,flexShrink:1,overflow:"hidden",pointerEvents:`var(${Bz})`},children:w.jsx("div",{className:t,style:{width:"100%",height:"100%",...f},children:e})})}const Gie={minHeight:"unset",maxHeight:"unset",height:"unset",minWidth:"unset",maxWidth:"unset",width:"unset",flex:"unset",flexBasis:"unset",flexShrink:"unset",flexGrow:"unset",border:"unset",borderWidth:"unset",padding:"unset",margin:"unset"};function Kie({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,s;const l=e[n],a=t.find(c=>c.panelId===n);if(a){const c=a.maxSize,u=s=a.collapsible?a.collapsedSize:a.minSize,h=[r,r+1];s=Cc({layout:Yh({delta:u-l,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],i=Cc({layout:Yh({delta:c-l,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:s,valueNow:l}}function Yie({children:e,className:t,elementRef:n,id:r,style:i,...s}){const l=iO(r),[a,c]=O.useState({}),[u,h]=O.useState("inactive"),[f,p]=O.useState(null),v=oO(p,n),{id:S,orientation:x,registerSeparator:g}=aO(),b=x==="horizontal"?"vertical":"horizontal";return Nc(()=>{if(f!==null){const y={element:f,id:l},_=g(y),T=pc.addListener("interactionStateChange",k=>{h(k.state!=="inactive"&&k.hitRegions.some(A=>A.separator===y)?k.state:"inactive")}),E=pc.addListener("mountedGroupsChange",k=>{k.forEach(({derivedPanelConstraints:A,layout:R,separatorToPanels:L},z)=>{if(z.id===S){const D=L.get(y);if(D){const $=D[0],N=z.panels.indexOf($);c(Kie({layout:R,panelConstraints:A,panelId:$.id,panelIndex:N}))}}})});return()=>{T(),E(),_()}}},[f,S,l,g]),w.jsx("div",{...s,"aria-controls":a.valueControls,"aria-orientation":b,"aria-valuemax":a.valueMax,"aria-valuemin":a.valueMin,"aria-valuenow":a.valueNow,children:e,className:t,"data-separator":u,"data-testid":l,id:l,ref:v,role:"separator",style:{flexBasis:"auto",...i,flexGrow:0,flexShrink:0},tabIndex:0})}function $l({className:e,direction:t,...n}){return w.jsx(Uie,{"data-slot":"resizable-panel-group",orientation:t,className:Be("flex h-full w-full data-[orientation=vertical]:flex-col",e),...n})}function Vi({...e}){return w.jsx(Wie,{"data-slot":"resizable-panel",...e})}function Fl({withHandle:e,className:t,...n}){return w.jsx(Yie,{"data-slot":"resizable-handle",className:Be("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 [&[data-orientation=vertical]>div]:rotate-90",t),...n,children:e&&w.jsx("div",{className:"bg-border h-6 w-1 rounded-lg z-10 flex shrink-0"})})}var fx={exports:{}},dj;function Xie(){return dj||(dj=1,(function(e,t){(function(n,r){e.exports=r()})(globalThis,(()=>(()=>{var n={4567:function(l,a,c){var u=this&&this.__decorate||function(y,_,T,E){var k,A=arguments.length,R=A<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,T,E);else for(var L=y.length-1;L>=0;L--)(k=y[L])&&(R=(A<3?k(R):A>3?k(_,T,R):k(_,T))||R);return A>3&&R&&Object.defineProperty(_,T,R),R},h=this&&this.__param||function(y,_){return function(T,E){_(T,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const f=c(9042),p=c(9924),v=c(844),S=c(4725),x=c(2585),g=c(3656);let b=a.AccessibilityManager=class extends v.Disposable{constructor(y,_,T,E){super(),this._terminal=y,this._coreBrowserService=T,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((k=>this._handleResize(k.rows)))),this.register(this._terminal.onRender((k=>this._refreshRows(k.start,k.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((k=>this._handleChar(k)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
27
|
+
`)))),this.register(this._terminal.onA11yTab((k=>this._handleTab(k)))),this.register(this._terminal.onKey((k=>this._handleKey(k.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,g.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,v.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(y){for(let _=0;_<y;_++)this._handleChar(" ")}_handleChar(y){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===`
|
|
28
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,_){this._liveRegionDebouncer.refresh(y,_,this._terminal.rows)}_renderRows(y,_){const T=this._terminal.buffer,E=T.lines.length.toString();for(let k=y;k<=_;k++){const A=T.lines.get(T.ydisp+k),R=[],L=A?.translateToString(!0,void 0,void 0,R)||"",z=(T.ydisp+k+1).toString(),D=this._rowElements[k];D&&(L.length===0?(D.innerText=" ",this._rowColumns.set(D,[0,1])):(D.textContent=L,this._rowColumns.set(D,R)),D.setAttribute("aria-posinset",z),D.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,_){const T=y.target,E=this._rowElements[_===0?1:this._rowElements.length-2];if(T.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==E)return;let k,A;if(_===0?(k=T,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(k=this._rowElements.shift(),A=T,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const R=this._createAccessibilityTreeNode();this._rowElements.unshift(R),this._rowContainer.insertAdjacentElement("afterbegin",R)}else{const R=this._createAccessibilityTreeNode();this._rowElements.push(R),this._rowContainer.appendChild(R)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let _={node:y.anchorNode,offset:y.anchorOffset},T={node:y.focusNode,offset:y.focusOffset};if((_.node.compareDocumentPosition(T.node)&Node.DOCUMENT_POSITION_PRECEDING||_.node===T.node&&_.offset>T.offset)&&([_,T]=[T,_]),_.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(_={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(_.node))return;const E=this._rowElements.slice(-1)[0];if(T.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(T={node:E,offset:E.textContent?.length??0}),!this._rowContainer.contains(T.node))return;const k=({node:L,offset:z})=>{const D=L instanceof Text?L.parentNode:L;let $=parseInt(D?.getAttribute("aria-posinset"),10)-1;if(isNaN($))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(D);if(!N)return console.warn("columns is null. Race condition?"),null;let F=z<N.length?N[z]:N.slice(-1)[0]+1;return F>=this._terminal.cols&&(++$,F=0),{row:$,column:F}},A=k(_),R=k(T);if(A&&R){if(A.row>R.row||A.row===R.row&&A.column>=R.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(R.row-A.row)*this._terminal.cols-A.column+R.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);for(;this._rowElements.length>y;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let y=0;y<this._terminal.rows;y++)this._refreshRowDimensions(this._rowElements[y])}}_refreshRowDimensions(y){y.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=b=u([h(1,x.IInstantiationService),h(2,S.ICoreBrowserService),h(3,S.IRenderService)],b)},3614:(l,a)=>{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,v){return v?"\x1B[200~"+p+"\x1B[201~":p}function h(p,v,S,x){p=u(p=c(p),S.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(p,!0),v.value=""}function f(p,v,S){const x=S.getBoundingClientRect(),g=p.clientX-x.left-10,b=p.clientY-x.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${g}px`,v.style.top=`${b}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=u,a.copyHandler=function(p,v){p.clipboardData&&p.clipboardData.setData("text/plain",v.selectionText),p.preventDefault()},a.handlePasteEvent=function(p,v,S,x){p.stopPropagation(),p.clipboardData&&h(p.clipboardData.getData("text/plain"),v,S,x)},a.paste=h,a.moveTextAreaUnderMouseCursor=f,a.rightClickHandler=function(p,v,S,x,g){f(p,v,S),g&&x.rightClickSelect(p),v.value=x.selectionText,v.select()}},7239:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const u=c(1505);a.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(h,f,p){this._css.set(h,f,p)}getCss(h,f){return this._css.get(h,f)}setColor(h,f,p){this._color.set(h,f,p)}getColor(h,f){return this._color.get(h,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,u,h,f){c.addEventListener(u,h,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,f))}}}},3551:function(l,a,c){var u=this&&this.__decorate||function(b,y,_,T){var E,k=arguments.length,A=k<3?y:T===null?T=Object.getOwnPropertyDescriptor(y,_):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,_,T);else for(var R=b.length-1;R>=0;R--)(E=b[R])&&(A=(k<3?E(A):k>3?E(y,_,A):E(y,_))||A);return k>3&&A&&Object.defineProperty(y,_,A),A},h=this&&this.__param||function(b,y){return function(_,T){y(_,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const f=c(3656),p=c(8460),v=c(844),S=c(2585),x=c(4725);let g=a.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(b,y,_,T,E){super(),this._element=b,this._mouseService=y,this._renderService=_,this._bufferService=T,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const _=b.composedPath();for(let T=0;T<_.length;T++){const E=_[T];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&y.x===this._lastBufferCell.x&&y.y===this._lastBufferCell.y||(this._handleHover(y),this._lastBufferCell=y)}_handleHover(b){if(this._activeLine!==b.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(b,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))}_askForLink(b,y){this._activeProviderReplies&&y||(this._activeProviderReplies?.forEach((T=>{T?.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let _=!1;for(const[T,E]of this._linkProviderService.linkProviders.entries())y?this._activeProviderReplies?.get(T)&&(_=this._checkLinkProviderResult(T,b,_)):E.provideLinks(b.y,(k=>{if(this._isMouseOut)return;const A=k?.map((R=>({link:R})));this._activeProviderReplies?.set(T,A),_=this._checkLinkProviderResult(T,b,_),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const _=new Set;for(let T=0;T<y.size;T++){const E=y.get(T);if(E)for(let k=0;k<E.length;k++){const A=E[k],R=A.link.range.start.y<b?0:A.link.range.start.x,L=A.link.range.end.y>b?this._bufferService.cols:A.link.range.end.x;for(let z=R;z<=L;z++){if(_.has(z)){E.splice(k--,1);break}_.add(z)}}}}_checkLinkProviderResult(b,y,_){if(!this._activeProviderReplies)return _;const T=this._activeProviderReplies.get(b);let E=!1;for(let k=0;k<b;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(E=!0);if(!E&&T){const k=T.find((A=>this._linkAtPosition(A.link,y)));k&&(_=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!_)for(let k=0;k<this._activeProviderReplies.size;k++){const A=this._activeProviderReplies.get(k)?.find((R=>this._linkAtPosition(R.link,y)));if(A){_=!0,this._handleNewLink(A);break}}return _}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:_=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==_&&(this._currentLink.state.decorations.pointerCursor=_,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",_))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:_=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==_&&(this._currentLink.state.decorations.underline=_,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,_))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((_=>{if(!this._currentLink)return;const T=_.start===0?0:_.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+_.end;if(this._currentLink.link.range.start.y>=T&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(T,E),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}}))))}_linkHover(b,y,_){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(_,y.text)}_fireUnderlineEvent(b,y){const _=b.range,T=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(_.start.x-1,_.start.y-T-1,_.end.x,_.end.y-T-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(b,y,_){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(_,y.text)}_linkAtPosition(b,y){const _=b.range.start.y*this._bufferService.cols+b.range.start.x,T=b.range.end.y*this._bufferService.cols+b.range.end.x,E=y.y*this._bufferService.cols+y.x;return _<=E&&E<=T}_positionFromMouseEvent(b,y,_){const T=_.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(T)return{x:T[0],y:T[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,_,T,E){return{x1:b,y1:y,x2:_,y2:T,cols:this._bufferService.cols,fg:E}}};a.Linkifier=g=u([h(1,x.IMouseService),h(2,x.IRenderService),h(3,S.IBufferService),h(4,x.ILinkProviderService)],g)},9042:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(l,a,c){var u=this&&this.__decorate||function(x,g,b,y){var _,T=arguments.length,E=T<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(x,g,b,y);else for(var k=x.length-1;k>=0;k--)(_=x[k])&&(E=(T<3?_(E):T>3?_(g,b,E):_(g,b))||E);return T>3&&E&&Object.defineProperty(g,b,E),E},h=this&&this.__param||function(x,g){return function(b,y){g(b,y,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const f=c(511),p=c(2585);let v=a.OscLinkProvider=class{constructor(x,g,b){this._bufferService=x,this._optionsService=g,this._oscLinkService=b}provideLinks(x,g){const b=this._bufferService.buffer.lines.get(x-1);if(!b)return void g(void 0);const y=[],_=this._optionsService.rawOptions.linkHandler,T=new f.CellData,E=b.getTrimmedLength();let k=-1,A=-1,R=!1;for(let L=0;L<E;L++)if(A!==-1||b.hasContent(L)){if(b.loadCell(L,T),T.hasExtendedAttrs()&&T.extended.urlId){if(A===-1){A=L,k=T.extended.urlId;continue}R=T.extended.urlId!==k}else A!==-1&&(R=!0);if(R||A!==-1&&L===E-1){const z=this._oscLinkService.getLinkData(k)?.uri;if(z){const D={start:{x:A+1,y:x},end:{x:L+(R||L!==E-1?0:1),y:x}};let $=!1;if(!_?.allowNonHttpProtocols)try{const N=new URL(z);["http:","https:"].includes(N.protocol)||($=!0)}catch{$=!0}$||y.push({text:z,range:D,activate:(N,F)=>_?_.activate(N,F,D):S(0,F),hover:(N,F)=>_?.hover?.(N,F,D),leave:(N,F)=>_?.leave?.(N,F,D)})}R=!1,T.hasExtendedAttrs()&&T.extended.urlId?(A=L,k=T.extended.urlId):(A=-1,k=-1)}}g(y)}};function S(x,g){if(confirm(`Do you want to navigate to ${g}?
|
|
29
|
+
|
|
30
|
+
WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=g}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=v=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],v)},6193:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const u=c(3614),h=c(3656),f=c(3551),p=c(9042),v=c(3730),S=c(1680),x=c(3107),g=c(5744),b=c(2950),y=c(1296),_=c(428),T=c(4269),E=c(5114),k=c(8934),A=c(3230),R=c(9312),L=c(4725),z=c(6731),D=c(8055),$=c(8969),N=c(8460),F=c(844),U=c(6114),H=c(8437),K=c(2584),W=c(7399),I=c(5941),G=c(9074),j=c(2585),B=c(5435),V=c(4567),X=c(779);class re extends $.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(Q={}){super(Q),this.browser=U,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new N.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new N.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new N.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new N.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new N.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new N.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new N.EventEmitter),this._onBlur=this.register(new N.EventEmitter),this._onA11yCharEmitter=this.register(new N.EventEmitter),this._onA11yTabEmitter=this.register(new N.EventEmitter),this._onWillOpen=this.register(new N.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(G.DecorationService),this._instantiationService.setService(j.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(X.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Y,J)=>this.refresh(Y,J)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Y=>this._reportWindowsOptions(Y)))),this.register(this._inputHandler.onColor((Y=>this._handleColorEvent(Y)))),this.register((0,N.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,N.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Y=>this._afterResize(Y.cols,Y.rows)))),this.register((0,F.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(Q){if(this._themeService)for(const Y of Q){let J,ee="";switch(Y.index){case 256:J="foreground",ee="10";break;case 257:J="background",ee="11";break;case 258:J="cursor",ee="12";break;default:J="ansi",ee="4;"+Y.index}switch(Y.type){case 0:const ne=D.color.toColorRGB(J==="ansi"?this._themeService.colors.ansi[Y.index]:this._themeService.colors[J]);this.coreService.triggerDataEvent(`${K.C0.ESC}]${ee};${(0,I.toRgbString)(ne)}${K.C1_ESCAPED.ST}`);break;case 1:if(J==="ansi")this._themeService.modifyColors((te=>te.ansi[Y.index]=D.channels.toColor(...Y.color)));else{const te=J;this._themeService.modifyColors((le=>le[te]=D.channels.toColor(...Y.color)))}break;case 2:this._themeService.restoreColor(Y.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Q){Q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const Q=this.buffer.ybase+this.buffer.y,Y=this.buffer.lines.get(Q);if(!Y)return;const J=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,ne=Y.getWidth(J),te=this._renderService.dimensions.css.cell.width*ne,le=this.buffer.y*this._renderService.dimensions.css.cell.height,fe=J*this._renderService.dimensions.css.cell.width;this.textarea.style.left=fe+"px",this.textarea.style.top=le+"px",this.textarea.style.width=te+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(Y=>{this.hasSelection()&&(0,u.copyHandler)(Y,this._selectionService)})));const Q=Y=>(0,u.handlePasteEvent)(Y,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",Q)),this.register((0,h.addDisposableDomListener)(this.element,"paste",Q)),U.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(Y=>{Y.button===2&&(0,u.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(Y=>{(0,u.rightClickHandler)(Y,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),U.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(Y=>{Y.button===1&&(0,u.moveTextAreaUnderMouseCursor)(Y,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(Q=>this._keyUp(Q)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(Q=>this._keyDown(Q)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(Q=>this._keyPress(Q)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(Q=>this._compositionHelper.compositionupdate(Q)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(Q=>this._inputEvent(Q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Q){if(!Q)throw new Error("Terminal requires a parent element.");if(Q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Q.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Q.appendChild(this.element);const Y=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Y.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,h.addDisposableDomListener)(this.screenElement,"mousemove",(J=>this.updateCursorStyle(J)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Y.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),U.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,Q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(J=>this._handleTextAreaFocus(J)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(_.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(z.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(T.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((J=>this._onRender.fire(J)))),this.onResize((J=>this._renderService.resize(J.cols,J.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(k.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(Y);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((J=>this.scrollLines(J.amount,J.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(R.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((J=>this.scrollLines(J.amount,J.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((J=>this._renderService.handleSelectionChanged(J.start,J.end,J.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((J=>{this.textarea.value=J,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((J=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(J=>this._selectionService.handleMouseDown(J)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(J=>this._handleScreenReaderModeOptionChange(J)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(J=>{!this._overviewRulerRenderer&&J&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Q=this,Y=this.element;function J(te){const le=Q._mouseService.getMouseReportCoords(te,Q.screenElement);if(!le)return!1;let fe,pe;switch(te.overrideType||te.type){case"mousemove":pe=32,te.buttons===void 0?(fe=3,te.button!==void 0&&(fe=te.button<3?te.button:3)):fe=1&te.buttons?0:4&te.buttons?1:2&te.buttons?2:3;break;case"mouseup":pe=0,fe=te.button<3?te.button:3;break;case"mousedown":pe=1,fe=te.button<3?te.button:3;break;case"wheel":if(Q._customWheelEventHandler&&Q._customWheelEventHandler(te)===!1||Q.viewport.getLinesScrolled(te)===0)return!1;pe=te.deltaY<0?0:1,fe=4;break;default:return!1}return!(pe===void 0||fe===void 0||fe>4)&&Q.coreMouseService.triggerMouseEvent({col:le.col,row:le.row,x:le.x,y:le.y,button:fe,action:pe,ctrl:te.ctrlKey,alt:te.altKey,shift:te.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ne={mouseup:te=>(J(te),te.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(te)),wheel:te=>(J(te),this.cancel(te,!0)),mousedrag:te=>{te.buttons&&J(te)},mousemove:te=>{te.buttons||J(te)}};this.register(this.coreMouseService.onProtocolChange((te=>{te?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(te)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&te?ee.mousemove||(Y.addEventListener("mousemove",ne.mousemove),ee.mousemove=ne.mousemove):(Y.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&te?ee.wheel||(Y.addEventListener("wheel",ne.wheel,{passive:!1}),ee.wheel=ne.wheel):(Y.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&te?ee.mouseup||(ee.mouseup=ne.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&te?ee.mousedrag||(ee.mousedrag=ne.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(Y,"mousedown",(te=>{if(te.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(te))return J(te),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(te)}))),this.register((0,h.addDisposableDomListener)(Y,"wheel",(te=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(te)===!1)return!1;if(!this.buffer.hasScrollback){const le=this.viewport.getLinesScrolled(te);if(le===0)return;const fe=K.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(te.deltaY<0?"A":"B");let pe="";for(let de=0;de<Math.abs(le);de++)pe+=fe;return this.coreService.triggerDataEvent(pe,!0),this.cancel(te,!0)}return this.viewport.handleWheel(te)?this.cancel(te):void 0}}),{passive:!1})),this.register((0,h.addDisposableDomListener)(Y,"touchstart",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(te),this.cancel(te)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(Y,"touchmove",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(te)?void 0:this.cancel(te)}),{passive:!1}))}refresh(Q,Y){this._renderService?.refreshRows(Q,Y)}updateCursorStyle(Q){this._selectionService?.shouldColumnSelect(Q)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(Q,Y,J=0){J===1?(super.scrollLines(Q,Y,J),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(Q)}paste(Q){(0,u.paste)(Q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Q){this._customKeyEventHandler=Q}attachCustomWheelEventHandler(Q){this._customWheelEventHandler=Q}registerLinkProvider(Q){return this._linkProviderService.registerLinkProvider(Q)}registerCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Y=this._characterJoinerService.register(Q);return this.refresh(0,this.rows-1),Y}deregisterCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Q)}registerDecoration(Q){return this._decorationService.registerDecoration(Q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Q,Y,J){this._selectionService.setSelection(Q,Y,J)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(Q,Y){this._selectionService?.selectLines(Q,Y)}_keyDown(Q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;const Y=this.browser.isMac&&this.options.macOptionIsMeta&&Q.altKey;if(!Y&&!this._compositionHelper.keydown(Q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Y||Q.key!=="Dead"&&Q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const J=(0,W.evaluateKeyboardEvent)(Q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Q),J.type===3||J.type===2){const ee=this.rows-1;return this.scrollLines(J.type===2?-ee:ee),this.cancel(Q,!0)}return J.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Q)||(J.cancel&&this.cancel(Q,!0),!J.key||!!(Q.key&&!Q.ctrlKey&&!Q.altKey&&!Q.metaKey&&Q.key.length===1&&Q.key.charCodeAt(0)>=65&&Q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(J.key!==K.C0.ETX&&J.key!==K.C0.CR||(this.textarea.value=""),this._onKey.fire({key:J.key,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(J.key,!0),!this.optionsService.rawOptions.screenReaderMode||Q.altKey||Q.ctrlKey?this.cancel(Q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Q,Y){const J=Q.isMac&&!this.options.macOptionIsMeta&&Y.altKey&&!Y.ctrlKey&&!Y.metaKey||Q.isWindows&&Y.altKey&&Y.ctrlKey&&!Y.metaKey||Q.isWindows&&Y.getModifierState("AltGraph");return Y.type==="keypress"?J:J&&(!Y.keyCode||Y.keyCode>47)}_keyUp(Q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1||((function(Y){return Y.keyCode===16||Y.keyCode===17||Y.keyCode===18})(Q)||this.focus(),this.updateCursorStyle(Q),this._keyPressHandled=!1)}_keyPress(Q){let Y;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;if(this.cancel(Q),Q.charCode)Y=Q.charCode;else if(Q.which===null||Q.which===void 0)Y=Q.keyCode;else{if(Q.which===0||Q.charCode===0)return!1;Y=Q.which}return!(!Y||(Q.altKey||Q.ctrlKey||Q.metaKey)&&!this._isThirdLevelShift(this.browser,Q)||(Y=String.fromCharCode(Y),this._onKey.fire({key:Y,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(Y,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Q){if(Q.data&&Q.inputType==="insertText"&&(!Q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Y=Q.data;return this.coreService.triggerDataEvent(Y,!0),this.cancel(Q),!0}return!1}resize(Q,Y){Q!==this.cols||Y!==this.rows?super.resize(Q,Y):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Q,Y){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Q=1;Q<this.rows;Q++)this.buffer.lines.push(this.buffer.getBlankLine(H.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const Q=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=Q,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(K.C0.ESC+"[I"):this.coreService.triggerDataEvent(K.C0.ESC+"[O")}_reportWindowsOptions(Q){if(this._renderService)switch(Q){case B.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Y=this._renderService.dimensions.css.canvas.width.toFixed(0),J=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[4;${J};${Y}t`);break;case B.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ee=this._renderService.dimensions.css.cell.width.toFixed(0),ne=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[6;${ne};${ee}t`)}}cancel(Q,Y){if(this.options.cancelEvents||Y)return Q.preventDefault(),Q.stopPropagation(),!1}}a.Terminal=re},9924:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,h){this._rowCount=h,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=f-this._lastRefreshMs,v=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),v)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(l,a,c){var u=this&&this.__decorate||function(b,y,_,T){var E,k=arguments.length,A=k<3?y:T===null?T=Object.getOwnPropertyDescriptor(y,_):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,_,T);else for(var R=b.length-1;R>=0;R--)(E=b[R])&&(A=(k<3?E(A):k>3?E(y,_,A):E(y,_))||A);return k>3&&A&&Object.defineProperty(y,_,A),A},h=this&&this.__param||function(b,y){return function(_,T){y(_,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const f=c(3656),p=c(4725),v=c(8460),S=c(844),x=c(2585);let g=a.Viewport=class extends S.Disposable{constructor(b,y,_,T,E,k,A,R){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=_,this._optionsService=T,this._charSizeService=E,this._renderService=k,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((L=>this._renderDimensions=L))),this._handleThemeChange(R.colors),this.register(R.onChangeColors((L=>this._handleThemeChange(L)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,y){const _=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&_<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)}handleWheel(b){const y=this._getPixelsScrolled(b);return y!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+y:this._smoothScrollState.target+=y,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}scrollLines(b){if(b!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const y=b*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+y,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!1})}_getPixelsScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?y*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._currentRowHeight*this._bufferService.rows),y}getBufferElements(b,y){let _,T="";const E=[],k=y??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let R=b;R<k;R++){const L=A.get(R);if(!L)continue;const z=A.get(R+1)?.isWrapped;if(T+=L.translateToString(!z),!z||R===A.length-1){const D=document.createElement("div");D.textContent=T,E.push(D),T.length>0&&(_=D),T=""}}return{bufferElements:E,cursorElement:_}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const _=this._optionsService.rawOptions.fastScrollModifier;return _==="alt"&&y.altKey||_==="ctrl"&&y.ctrlKey||_==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};a.Viewport=g=u([h(2,x.IBufferService),h(3,x.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],g)},3107:function(l,a,c){var u=this&&this.__decorate||function(x,g,b,y){var _,T=arguments.length,E=T<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(x,g,b,y);else for(var k=x.length-1;k>=0;k--)(_=x[k])&&(E=(T<3?_(E):T>3?_(g,b,E):_(g,b))||E);return T>3&&E&&Object.defineProperty(g,b,E),E},h=this&&this.__param||function(x,g){return function(b,y){g(b,y,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const f=c(4725),p=c(844),v=c(2585);let S=a.BufferDecorationRenderer=class extends p.Disposable{constructor(x,g,b,y,_){super(),this._screenElement=x,this._bufferService=g,this._coreBrowserService=b,this._decorationService=y,this._renderService=_,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((T=>this._removeDecoration(T)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){const g=this._coreBrowserService.mainDocument.createElement("div");g.classList.add("xterm-decoration"),g.classList.toggle("xterm-decoration-top-layer",x?.options?.layer==="top"),g.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,g.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",g.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",g.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=x.options.x??0;return b&&b>this._bufferService.cols&&(g.style.display="none"),this._refreshXPosition(x,g),g}_refreshStyle(x){const g=x.marker.line-this._bufferService.buffers.active.ydisp;if(g<0||g>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let b=this._decorationElements.get(x);b||(b=this._createElement(x),x.element=b,this._decorationElements.set(x,b),this._container.appendChild(b),x.onDispose((()=>{this._decorationElements.delete(x),b.remove()}))),b.style.top=g*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(b)}}_refreshXPosition(x,g=x.element){if(!g)return;const b=x.options.x??0;(x.options.anchor||"left")==="right"?g.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":g.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){this._decorationElements.get(x)?.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=S=u([h(1,v.IBufferService),h(2,f.ICoreBrowserService),h(3,v.IDecorationService),h(4,f.IRenderService)],S)},5871:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,u){return u>=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(l,a,c){var u=this&&this.__decorate||function(_,T,E,k){var A,R=arguments.length,L=R<3?T:k===null?k=Object.getOwnPropertyDescriptor(T,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,T,E,k);else for(var z=_.length-1;z>=0;z--)(A=_[z])&&(L=(R<3?A(L):R>3?A(T,E,L):A(T,E))||L);return R>3&&L&&Object.defineProperty(T,E,L),L},h=this&&this.__param||function(_,T){return function(E,k){T(E,k,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const f=c(5871),p=c(4725),v=c(844),S=c(2585),x={full:0,left:0,center:0,right:0},g={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let y=a.OverviewRulerRenderer=class extends v.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,T,E,k,A,R,L){super(),this._viewportElement=_,this._screenElement=T,this._bufferService=E,this._decorationService=k,this._renderService=A,this._optionsService=R,this._coreBrowserService=L,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const z=this._canvas.getContext("2d");if(!z)throw new Error("Ctx cannot be null");this._ctx=z,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,v.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),T=Math.ceil(this._canvas.width/3);g.full=this._canvas.width,g.left=_,g.center=T,g.right=_,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=g.left,b.right=g.left+g.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,T=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowserService.dpr);x.left=T,x.center=T,x.right=T}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const T of this._decorationService.decorations)this._colorZoneStore.addDecoration(T);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const T of _)T.position!=="full"&&this._renderColorZone(T);for(const T of _)T.position==="full"&&this._renderColorZone(T);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(b[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-x[_.position||"full"]/2),g[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[_.position||"full"]))}_queueRefresh(_,T){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=T||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=y=u([h(2,S.IBufferService),h(3,S.IDecorationService),h(4,p.IRenderService),h(5,S.IOptionsService),h(6,p.ICoreBrowserService)],y)},2950:function(l,a,c){var u=this&&this.__decorate||function(x,g,b,y){var _,T=arguments.length,E=T<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(x,g,b,y);else for(var k=x.length-1;k>=0;k--)(_=x[k])&&(E=(T<3?_(E):T>3?_(g,b,E):_(g,b))||E);return T>3&&E&&Object.defineProperty(g,b,E),E},h=this&&this.__param||function(x,g){return function(b,y){g(b,y,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const f=c(4725),p=c(2585),v=c(2584);let S=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,g,b,y,_,T){this._textarea=x,this._compositionView=g,this._bufferService=b,this._optionsService=y,this._coreService=_,this._renderService=T,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const g={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,g.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(g.start,g.end):this._textarea.value.substring(g.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const g=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(g,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const g=this._textarea.value,b=g.replace(x,"");this._dataAlreadySent=b,g.length>x.length?this._coreService.triggerDataEvent(b,!0):g.length<x.length?this._coreService.triggerDataEvent(`${v.C0.DEL}`,!0):g.length===x.length&&g!==x&&this._coreService.triggerDataEvent(g,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const g=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.css.cell.height,y=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,_=g*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=_+"px",this._compositionView.style.top=y+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const T=this._compositionView.getBoundingClientRect();this._textarea.style.left=_+"px",this._textarea.style.top=y+"px",this._textarea.style.width=Math.max(T.width,1)+"px",this._textarea.style.height=Math.max(T.height,1)+"px",this._textarea.style.lineHeight=T.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=S=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,f.IRenderService)],S)},9806:(l,a)=>{function c(u,h,f){const p=f.getBoundingClientRect(),v=u.getComputedStyle(f),S=parseInt(v.getPropertyValue("padding-left")),x=parseInt(v.getPropertyValue("padding-top"));return[h.clientX-p.left-S,h.clientY-p.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(u,h,f,p,v,S,x,g,b){if(!S)return;const y=c(u,h,f);return y?(y[0]=Math.ceil((y[0]+(b?x/2:0))/x),y[1]=Math.ceil(y[1]/g),y[0]=Math.min(Math.max(y[0],1),p+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),v),y):void 0}},9504:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const u=c(2584);function h(g,b,y,_){const T=g-f(g,y),E=b-f(b,y),k=Math.abs(T-E)-(function(A,R,L){let z=0;const D=A-f(A,L),$=R-f(R,L);for(let N=0;N<Math.abs(D-$);N++){const F=p(A,R)==="A"?-1:1;L.buffer.lines.get(D+F*N)?.isWrapped&&z++}return z})(g,b,y);return x(k,S(p(g,b),_))}function f(g,b){let y=0,_=b.buffer.lines.get(g),T=_?.isWrapped;for(;T&&g>=0&&g<b.rows;)y++,_=b.buffer.lines.get(--g),T=_?.isWrapped;return y}function p(g,b){return g>b?"A":"B"}function v(g,b,y,_,T,E){let k=g,A=b,R="";for(;k!==y||A!==_;)k+=T?1:-1,T&&k>E.cols-1?(R+=E.buffer.translateBufferLineToString(A,!1,g,k),k=0,g=0,A++):!T&&k<0&&(R+=E.buffer.translateBufferLineToString(A,!1,0,g+1),k=E.cols-1,g=k,A--);return R+E.buffer.translateBufferLineToString(A,!1,g,k)}function S(g,b){const y=b?"O":"[";return u.C0.ESC+y+g}function x(g,b){g=Math.floor(g);let y="";for(let _=0;_<g;_++)y+=b;return y}a.moveToCellSequence=function(g,b,y,_){const T=y.buffer.x,E=y.buffer.y;if(!y.buffer.hasScrollback)return(function(R,L,z,D,$,N){return h(L,D,$,N).length===0?"":x(v(R,L,R,L-f(L,$),!1,$).length,S("D",N))})(T,E,0,b,y,_)+h(E,b,y,_)+(function(R,L,z,D,$,N){let F;F=h(L,D,$,N).length>0?D-f(D,$):L;const U=D,H=(function(K,W,I,G,j,B){let V;return V=h(I,G,j,B).length>0?G-f(G,j):W,K<I&&V<=G||K>=I&&V<G?"C":"D"})(R,L,z,D,$,N);return x(v(R,F,z,U,H==="C",$).length,S(H,N))})(T,E,g,b,y,_);let k;if(E===b)return k=T>g?"D":"C",x(Math.abs(T-g),S(k,_));k=E>b?"D":"C";const A=Math.abs(E-b);return x((function(R,L){return L.cols-R})(E>b?g:T,y)+(A-1)*y.cols+1+((E>b?T:g)-1),S(k,_))}},1296:function(l,a,c){var u=this&&this.__decorate||function(N,F,U,H){var K,W=arguments.length,I=W<3?F:H===null?H=Object.getOwnPropertyDescriptor(F,U):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(N,F,U,H);else for(var G=N.length-1;G>=0;G--)(K=N[G])&&(I=(W<3?K(I):W>3?K(F,U,I):K(F,U))||I);return W>3&&I&&Object.defineProperty(F,U,I),I},h=this&&this.__param||function(N,F){return function(U,H){F(U,H,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const f=c(3787),p=c(2550),v=c(2223),S=c(6171),x=c(6052),g=c(4725),b=c(8055),y=c(8460),_=c(844),T=c(2585),E="xterm-dom-renderer-owner-",k="xterm-rows",A="xterm-fg-",R="xterm-bg-",L="xterm-focus",z="xterm-selection";let D=1,$=a.DomRenderer=class extends _.Disposable{constructor(N,F,U,H,K,W,I,G,j,B,V,X,re){super(),this._terminal=N,this._document=F,this._element=U,this._screenElement=H,this._viewportElement=K,this._helperContainer=W,this._linkifier2=I,this._charSizeService=j,this._optionsService=B,this._bufferService=V,this._coreBrowserService=X,this._themeService=re,this._terminalClass=D++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(k),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(z),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ie=>this._injectCss(ie)))),this._injectCss(this._themeService.colors),this._rowFactory=G.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ie=>this._handleLinkHover(ie)))),this.register(this._linkifier2.onHideLinkUnderline((ie=>this._handleLinkLeave(ie)))),this.register((0,_.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const N=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*N,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*N),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/N),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/N),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const U of this._rowElements)U.style.width=`${this.dimensions.css.canvas.width}px`,U.style.height=`${this.dimensions.css.cell.height}px`,U.style.lineHeight=`${this.dimensions.css.cell.height}px`,U.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const F=`${this._terminalSelector} .${k} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=F,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(N){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let F=`${this._terminalSelector} .${k} { color: ${N.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;F+=`${this._terminalSelector} .${k} .xterm-dim { color: ${b.color.multiplyOpacity(N.foreground,.5).css};}`,F+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const U=`blink_underline_${this._terminalClass}`,H=`blink_bar_${this._terminalClass}`,K=`blink_block_${this._terminalClass}`;F+=`@keyframes ${U} { 50% { border-bottom-style: hidden; }}`,F+=`@keyframes ${H} { 50% { box-shadow: none; }}`,F+=`@keyframes ${K} { 0% { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css}; } 50% { background-color: inherit; color: ${N.cursor.css}; }}`,F+=`${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${H} 1s step-end infinite;}${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css};}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${N.cursor.css} !important; color: ${N.cursorAccent.css} !important;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${N.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${N.cursor.css} inset;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${N.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,F+=`${this._terminalSelector} .${z} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${z} div { position: absolute; background-color: ${N.selectionBackgroundOpaque.css};}${this._terminalSelector} .${z} div { position: absolute; background-color: ${N.selectionInactiveBackgroundOpaque.css};}`;for(const[W,I]of N.ansi.entries())F+=`${this._terminalSelector} .${A}${W} { color: ${I.css}; }${this._terminalSelector} .${A}${W}.xterm-dim { color: ${b.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${R}${W} { background-color: ${I.css}; }`;F+=`${this._terminalSelector} .${A}${v.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(N.background).css}; }${this._terminalSelector} .${A}${v.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(N.background),.5).css}; }${this._terminalSelector} .${R}${v.INVERTED_DEFAULT_COLOR} { background-color: ${N.foreground.css}; }`,this._themeStyleElement.textContent=F}_setDefaultSpacing(){const N=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${N}px`,this._rowFactory.defaultSpacing=N}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(N,F){for(let U=this._rowElements.length;U<=F;U++){const H=this._document.createElement("div");this._rowContainer.appendChild(H),this._rowElements.push(H)}for(;this._rowElements.length>F;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(N,F){this._refreshRowElements(N,F),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(N,F,U){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(N,F,U),this.renderRows(0,this._bufferService.rows-1),!N||!F)return;this._selectionRenderModel.update(this._terminal,N,F,U);const H=this._selectionRenderModel.viewportStartRow,K=this._selectionRenderModel.viewportEndRow,W=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(W>=this._bufferService.rows||I<0)return;const G=this._document.createDocumentFragment();if(U){const j=N[0]>F[0];G.appendChild(this._createSelectionElement(W,j?F[0]:N[0],j?N[0]:F[0],I-W+1))}else{const j=H===W?N[0]:0,B=W===K?F[0]:this._bufferService.cols;G.appendChild(this._createSelectionElement(W,j,B));const V=I-W-1;if(G.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,V)),W!==I){const X=K===I?F[0]:this._bufferService.cols;G.appendChild(this._createSelectionElement(I,0,X))}}this._selectionContainer.appendChild(G)}_createSelectionElement(N,F,U,H=1){const K=this._document.createElement("div"),W=F*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(U-F);return W+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-W),K.style.height=H*this.dimensions.css.cell.height+"px",K.style.top=N*this.dimensions.css.cell.height+"px",K.style.left=`${W}px`,K.style.width=`${I}px`,K}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const N of this._rowElements)N.replaceChildren()}renderRows(N,F){const U=this._bufferService.buffer,H=U.ybase+U.y,K=Math.min(U.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,G=this._optionsService.rawOptions.cursorInactiveStyle;for(let j=N;j<=F;j++){const B=j+U.ydisp,V=this._rowElements[j],X=U.lines.get(B);if(!V||!X)break;V.replaceChildren(...this._rowFactory.createRow(X,B,B===H,I,G,K,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!0)}_handleLinkLeave(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!1)}_setCellUnderline(N,F,U,H,K,W){U<0&&(N=0),H<0&&(F=0);const I=this._bufferService.rows-1;U=Math.max(Math.min(U,I),0),H=Math.max(Math.min(H,I),0),K=Math.min(K,this._bufferService.cols);const G=this._bufferService.buffer,j=G.ybase+G.y,B=Math.min(G.x,K-1),V=this._optionsService.rawOptions.cursorBlink,X=this._optionsService.rawOptions.cursorStyle,re=this._optionsService.rawOptions.cursorInactiveStyle;for(let ie=U;ie<=H;++ie){const Q=ie+G.ydisp,Y=this._rowElements[ie],J=G.lines.get(Q);if(!Y||!J)break;Y.replaceChildren(...this._rowFactory.createRow(J,Q,Q===j,X,re,B,V,this.dimensions.css.cell.width,this._widthCache,W?ie===U?N:0:-1,W?(ie===H?F:K)-1:-1))}}};a.DomRenderer=$=u([h(7,T.IInstantiationService),h(8,g.ICharSizeService),h(9,T.IOptionsService),h(10,T.IBufferService),h(11,g.ICoreBrowserService),h(12,g.IThemeService)],$)},3787:function(l,a,c){var u=this&&this.__decorate||function(k,A,R,L){var z,D=arguments.length,$=D<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(k,A,R,L);else for(var N=k.length-1;N>=0;N--)(z=k[N])&&($=(D<3?z($):D>3?z(A,R,$):z(A,R))||$);return D>3&&$&&Object.defineProperty(A,R,$),$},h=this&&this.__param||function(k,A){return function(R,L){A(R,L,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const f=c(2223),p=c(643),v=c(511),S=c(2585),x=c(8055),g=c(4725),b=c(4269),y=c(6171),_=c(3734);let T=a.DomRendererRowFactory=class{constructor(k,A,R,L,z,D,$){this._document=k,this._characterJoinerService=A,this._optionsService=R,this._coreBrowserService=L,this._coreService=z,this._decorationService=D,this._themeService=$,this._workCell=new v.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(k,A,R){this._selectionStart=k,this._selectionEnd=A,this._columnSelectMode=R}createRow(k,A,R,L,z,D,$,N,F,U,H){const K=[],W=this._characterJoinerService.getJoinedCharacters(A),I=this._themeService.colors;let G,j=k.getNoBgTrimmedLength();R&&j<D+1&&(j=D+1);let B=0,V="",X=0,re=0,ie=0,Q=!1,Y=0,J=!1,ee=0;const ne=[],te=U!==-1&&H!==-1;for(let le=0;le<j;le++){k.loadCell(le,this._workCell);let fe=this._workCell.getWidth();if(fe===0)continue;let pe=!1,de=le,ue=this._workCell;if(W.length>0&&le===W[0][0]){pe=!0;const Ee=W.shift();ue=new b.JoinedCellData(this._workCell,k.translateToString(!0,Ee[0],Ee[1]),Ee[1]-Ee[0]),de=Ee[1]-1,fe=ue.getWidth()}const Ie=this._isCellInSelection(le,A),Le=R&&le===D,we=te&&le>=U&&le<=H;let _e=!1;this._decorationService.forEachDecorationAtCell(le,A,void 0,(Ee=>{_e=!0}));let Pe=ue.getChars()||p.WHITESPACE_CELL_CHAR;if(Pe===" "&&(ue.isUnderline()||ue.isOverline())&&(Pe=" "),ee=fe*N-F.get(Pe,ue.isBold(),ue.isItalic()),G){if(B&&(Ie&&J||!Ie&&!J&&ue.bg===X)&&(Ie&&J&&I.selectionForeground||ue.fg===re)&&ue.extended.ext===ie&&we===Q&&ee===Y&&!Le&&!pe&&!_e){ue.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=Pe,B++;continue}B&&(G.textContent=V),G=this._document.createElement("span"),B=0,V=""}else G=this._document.createElement("span");if(X=ue.bg,re=ue.fg,ie=ue.extended.ext,Q=we,Y=ee,J=Ie,pe&&D>=le&&D<=de&&(D=le),!this._coreService.isCursorHidden&&Le&&this._coreService.isCursorInitialized){if(ne.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&ne.push("xterm-cursor-blink"),ne.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(z)switch(z){case"outline":ne.push("xterm-cursor-outline");break;case"block":ne.push("xterm-cursor-block");break;case"bar":ne.push("xterm-cursor-bar");break;case"underline":ne.push("xterm-cursor-underline")}}if(ue.isBold()&&ne.push("xterm-bold"),ue.isItalic()&&ne.push("xterm-italic"),ue.isDim()&&ne.push("xterm-dim"),V=ue.isInvisible()?p.WHITESPACE_CELL_CHAR:ue.getChars()||p.WHITESPACE_CELL_CHAR,ue.isUnderline()&&(ne.push(`xterm-underline-${ue.extended.underlineStyle}`),V===" "&&(V=" "),!ue.isUnderlineColorDefault()))if(ue.isUnderlineColorRGB())G.style.textDecorationColor=`rgb(${_.AttributeData.toColorRGB(ue.getUnderlineColor()).join(",")})`;else{let Ee=ue.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ue.isBold()&&Ee<8&&(Ee+=8),G.style.textDecorationColor=I.ansi[Ee].css}ue.isOverline()&&(ne.push("xterm-overline"),V===" "&&(V=" ")),ue.isStrikethrough()&&ne.push("xterm-strikethrough"),we&&(G.style.textDecoration="underline");let me=ue.getFgColor(),Ae=ue.getFgColorMode(),Te=ue.getBgColor(),We=ue.getBgColorMode();const rt=!!ue.isInverse();if(rt){const Ee=me;me=Te,Te=Ee;const xe=Ae;Ae=We,We=xe}let Ue,ot,tt,mt=!1;switch(this._decorationService.forEachDecorationAtCell(le,A,void 0,(Ee=>{Ee.options.layer!=="top"&&mt||(Ee.backgroundColorRGB&&(We=50331648,Te=Ee.backgroundColorRGB.rgba>>8&16777215,Ue=Ee.backgroundColorRGB),Ee.foregroundColorRGB&&(Ae=50331648,me=Ee.foregroundColorRGB.rgba>>8&16777215,ot=Ee.foregroundColorRGB),mt=Ee.options.layer==="top")})),!mt&&Ie&&(Ue=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Te=Ue.rgba>>8&16777215,We=50331648,mt=!0,I.selectionForeground&&(Ae=50331648,me=I.selectionForeground.rgba>>8&16777215,ot=I.selectionForeground)),mt&&ne.push("xterm-decoration-top"),We){case 16777216:case 33554432:tt=I.ansi[Te],ne.push(`xterm-bg-${Te}`);break;case 50331648:tt=x.channels.toColor(Te>>16,Te>>8&255,255&Te),this._addStyle(G,`background-color:#${E((Te>>>0).toString(16),"0",6)}`);break;default:rt?(tt=I.foreground,ne.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):tt=I.background}switch(Ue||ue.isDim()&&(Ue=x.color.multiplyOpacity(tt,.5)),Ae){case 16777216:case 33554432:ue.isBold()&&me<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(me+=8),this._applyMinimumContrast(G,tt,I.ansi[me],ue,Ue,void 0)||ne.push(`xterm-fg-${me}`);break;case 50331648:const Ee=x.channels.toColor(me>>16&255,me>>8&255,255&me);this._applyMinimumContrast(G,tt,Ee,ue,Ue,ot)||this._addStyle(G,`color:#${E(me.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(G,tt,I.foreground,ue,Ue,ot)||rt&&ne.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ne.length&&(G.className=ne.join(" "),ne.length=0),Le||pe||_e?G.textContent=V:B++,ee!==this.defaultSpacing&&(G.style.letterSpacing=`${ee}px`),K.push(G),le=de}return G&&B&&(G.textContent=V),K}_applyMinimumContrast(k,A,R,L,z,D){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const $=this._getContrastCache(L);let N;if(z||D||(N=$.getColor(A.rgba,R.rgba)),N===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);N=x.color.ensureContrastRatio(z||A,D||R,F),$.setColor((z||A).rgba,(D||R).rgba,N??null)}return!!N&&(this._addStyle(k,`color:${N.css}`),!0)}_getContrastCache(k){return k.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(k,A){k.setAttribute("style",`${k.getAttribute("style")||""}${A};`)}_isCellInSelection(k,A){const R=this._selectionStart,L=this._selectionEnd;return!(!R||!L)&&(this._columnSelectMode?R[0]<=L[0]?k>=R[0]&&A>=R[1]&&k<L[0]&&A<=L[1]:k<R[0]&&A>=R[1]&&k>=L[0]&&A<=L[1]:A>R[1]&&A<L[1]||R[1]===L[1]&&A===R[1]&&k>=R[0]&&k<L[0]||R[1]<L[1]&&A===L[1]&&k<L[0]||R[1]<L[1]&&A===R[1]&&k>=R[0])}};function E(k,A,R){for(;k.length<R;)k=A+k;return k}a.DomRendererRowFactory=T=u([h(1,g.ICharacterJoinerService),h(2,S.IOptionsService),h(3,g.ICoreBrowserService),h(4,S.ICoreService),h(5,S.IDecorationService),h(6,g.IThemeService)],T)},2550:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const h=c.createElement("span");h.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const v=c.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontWeight="bold",v.style.fontStyle="italic",this._measureElements=[h,f,p,v],this._container.appendChild(h),this._container.appendChild(f),this._container.appendChild(p),this._container.appendChild(v),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,h,f){c===this._font&&u===this._fontSize&&h===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,h){let f=0;if(!u&&!h&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(c,0);return S>0&&(this._flat[f]=S),S}let p=c;u&&(p+="B"),h&&(p+="I");let v=this._holey.get(p);if(v===void 0){let S=0;u&&(S|=1),h&&(S|=2),v=this._measure(c,S),v>0&&this._holey.set(p,v)}return v}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.offsetWidth/32}}},2223:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(l,a)=>{function c(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},a.isEmoji=u,a.allowRescaling=function(h,f,p,v){return f===1&&p>Math.ceil(1.5*v)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(S){return 57344<=S&&S<=63743})(h)},a.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(f){return 9472<=f&&f<=9631})(h)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(h,f,p=0){return(h-(2*Math.round(f)-p))%(2*Math.round(f))}},6052:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(h,f,p,v=!1){if(this.selectionStart=f,this.selectionEnd=p,!f||!p||f[0]===p[0]&&f[1]===p[1])return void this.clear();const S=h.buffers.active.ydisp,x=f[1]-S,g=p[1]-S,b=Math.max(x,0),y=Math.min(g,h.rows-1);b>=h.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=v,this.viewportStartRow=x,this.viewportEndRow=g,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(h,f,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&p>=this.viewportCappedStartRow&&f<this.endCol&&p<=this.viewportCappedEndRow:f<this.startCol&&p>=this.viewportCappedStartRow&&f>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&f>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(l,a,c){var u=this&&this.__decorate||function(y,_,T,E){var k,A=arguments.length,R=A<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,T,E);else for(var L=y.length-1;L>=0;L--)(k=y[L])&&(R=(A<3?k(R):A>3?k(_,T,R):k(_,T))||R);return A>3&&R&&Object.defineProperty(_,T,R),R},h=this&&this.__param||function(y,_){return function(T,E){_(T,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const f=c(2585),p=c(8460),v=c(844);let S=a.CharSizeService=class extends v.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(y,_,T){super(),this._optionsService=T,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new g(y,_,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};a.CharSizeService=S=u([h(2,f.IOptionsService)],S);class x extends v.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(_,T){_!==void 0&&_>0&&T!==void 0&&T>0&&(this._result.width=_,this._result.height=T)}}class g extends x{constructor(_,T,E){super(),this._document=_,this._parentElement=T,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends x{constructor(_){super(),this._optionsService=_,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const T=this._ctx.measureText("W");if(!("width"in T&&"fontBoundingBoxAscent"in T&&"fontBoundingBoxDescent"in T))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const _=this._ctx.measureText("W");return this._validateAndSet(_.width,_.fontBoundingBoxAscent+_.fontBoundingBoxDescent),this._result}}},4269:function(l,a,c){var u=this&&this.__decorate||function(b,y,_,T){var E,k=arguments.length,A=k<3?y:T===null?T=Object.getOwnPropertyDescriptor(y,_):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,_,T);else for(var R=b.length-1;R>=0;R--)(E=b[R])&&(A=(k<3?E(A):k>3?E(y,_,A):E(y,_))||A);return k>3&&A&&Object.defineProperty(y,_,A),A},h=this&&this.__param||function(b,y){return function(_,T){y(_,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const f=c(3734),p=c(643),v=c(511),S=c(2585);class x extends f.AttributeData{constructor(y,_,T){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=_,this._width=T}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let g=a.CharacterJoinerService=class $z{constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new v.CellData}register(y){const _={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(_),_.id}deregister(y){for(let _=0;_<this._characterJoiners.length;_++)if(this._characterJoiners[_].id===y)return this._characterJoiners.splice(_,1),!0;return!1}getJoinedCharacters(y){if(this._characterJoiners.length===0)return[];const _=this._bufferService.buffer.lines.get(y);if(!_||_.length===0)return[];const T=[],E=_.translateToString(!0);let k=0,A=0,R=0,L=_.getFg(0),z=_.getBg(0);for(let D=0;D<_.getTrimmedLength();D++)if(_.loadCell(D,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==z){if(D-k>1){const $=this._getJoinedRanges(E,R,A,_,k);for(let N=0;N<$.length;N++)T.push($[N])}k=D,R=A,L=this._workCell.fg,z=this._workCell.bg}A+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const D=this._getJoinedRanges(E,R,A,_,k);for(let $=0;$<D.length;$++)T.push(D[$])}return T}_getJoinedRanges(y,_,T,E,k){const A=y.substring(_,T);let R=[];try{R=this._characterJoiners[0].handler(A)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const z=this._characterJoiners[L].handler(A);for(let D=0;D<z.length;D++)$z._mergeRanges(R,z[D])}catch(z){console.error(z)}return this._stringRangesToCellRanges(R,E,k),R}_stringRangesToCellRanges(y,_,T){let E=0,k=!1,A=0,R=y[E];if(R){for(let L=T;L<this._bufferService.cols;L++){const z=_.getWidth(L),D=_.getString(L).length||p.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!k&&R[0]<=A&&(R[0]=L,k=!0),R[1]<=A){if(R[1]=L,R=y[++E],!R)break;R[0]<=A?(R[0]=L,k=!0):k=!1}A+=D}}R&&(R[1]=this._bufferService.cols)}}static _mergeRanges(y,_){let T=!1;for(let E=0;E<y.length;E++){const k=y[E];if(T){if(_[1]<=k[0])return y[E-1][1]=_[1],y;if(_[1]<=k[1])return y[E-1][1]=Math.max(_[1],k[1]),y.splice(E,1),y;y.splice(E,1),E--}else{if(_[1]<=k[0])return y.splice(E,0,_),y;if(_[1]<=k[1])return k[0]=Math.min(_[0],k[0]),y;_[0]<k[1]&&(k[0]=Math.min(_[0],k[0]),T=!0)}}return T?y[y.length-1][1]=_[1]:y.push(_),y}};a.CharacterJoinerService=g=u([h(0,S.IBufferService)],g)},5114:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const u=c(844),h=c(8460),f=c(3656);class p extends u.Disposable{constructor(x,g,b){super(),this._textarea=x,this._window=g,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new v(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,h.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=p;class v extends u.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const u=c(844);class h extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const v=this.linkProviders.indexOf(p);v!==-1&&this.linkProviders.splice(v,1)}}}}a.LinkProviderService=h},8934:function(l,a,c){var u=this&&this.__decorate||function(S,x,g,b){var y,_=arguments.length,T=_<3?x:b===null?b=Object.getOwnPropertyDescriptor(x,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,x,g,b);else for(var E=S.length-1;E>=0;E--)(y=S[E])&&(T=(_<3?y(T):_>3?y(x,g,T):y(x,g))||T);return _>3&&T&&Object.defineProperty(x,g,T),T},h=this&&this.__param||function(S,x){return function(g,b){x(g,b,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const f=c(4725),p=c(9806);let v=a.MouseService=class{constructor(S,x){this._renderService=S,this._charSizeService=x}getCoords(S,x,g,b,y){return(0,p.getCoords)(window,S,x,g,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}getMouseReportCoords(S,x){const g=(0,p.getCoordsRelativeToElement)(window,S,x);if(this._charSizeService.hasValidSize)return g[0]=Math.min(Math.max(g[0],0),this._renderService.dimensions.css.canvas.width-1),g[1]=Math.min(Math.max(g[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(g[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(g[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(g[0]),y:Math.floor(g[1])}}};a.MouseService=v=u([h(0,f.IRenderService),h(1,f.ICharSizeService)],v)},3230:function(l,a,c){var u=this&&this.__decorate||function(y,_,T,E){var k,A=arguments.length,R=A<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,T,E);else for(var L=y.length-1;L>=0;L--)(k=y[L])&&(R=(A<3?k(R):A>3?k(_,T,R):k(_,T))||R);return A>3&&R&&Object.defineProperty(_,T,R),R},h=this&&this.__param||function(y,_){return function(T,E){_(T,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const f=c(6193),p=c(4725),v=c(8460),S=c(844),x=c(7226),g=c(2585);let b=a.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,_,T,E,k,A,R,L){super(),this._rowCount=y,this._charSizeService=E,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new v.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new v.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new v.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new v.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((z,D)=>this._renderRows(z,D)),R),this.register(this._renderDebouncer),this.register(R.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(T.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(k.onDecorationRegistered((()=>this._fullRefresh()))),this.register(k.onDecorationRemoved((()=>this._fullRefresh()))),this.register(T.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(T.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(L.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(R.window,_),this.register(R.onWindowChange((z=>this._registerIntersectionObserver(z,_))))}_registerIntersectionObserver(y,_){if("IntersectionObserver"in y){const T=new y.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});T.observe(_),this._observerDisposable.value=(0,S.toDisposable)((()=>T.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(y,_,T=!1){this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,_,this._rowCount))}_renderRows(y,_){this._renderer.value&&(y=Math.min(y,this._rowCount-1),_=Math.min(_,this._rowCount-1),this._renderer.value.renderRows(y,_),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:_}),this._onRender.fire({start:y,end:_}),this._isNextRenderRedrawOnly=!0)}resize(y,_){this._rowCount=_,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((_=>this.refreshRows(_.start,_.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,_){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(y,_))):this._renderer.value.handleResize(y,_),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(y,_,T){this._selectionState.start=y,this._selectionState.end=_,this._selectionState.columnSelectMode=T,this._renderer.value?.handleSelectionChanged(y,_,T)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};a.RenderService=b=u([h(2,g.IOptionsService),h(3,p.ICharSizeService),h(4,g.IDecorationService),h(5,g.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(l,a,c){var u=this&&this.__decorate||function(R,L,z,D){var $,N=arguments.length,F=N<3?L:D===null?D=Object.getOwnPropertyDescriptor(L,z):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(R,L,z,D);else for(var U=R.length-1;U>=0;U--)($=R[U])&&(F=(N<3?$(F):N>3?$(L,z,F):$(L,z))||F);return N>3&&F&&Object.defineProperty(L,z,F),F},h=this&&this.__param||function(R,L){return function(z,D){L(z,D,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const f=c(9806),p=c(9504),v=c(456),S=c(4725),x=c(8460),g=c(844),b=c(6114),y=c(4841),_=c(511),T=c(2585),E=" ",k=new RegExp(E,"g");let A=a.SelectionService=class extends g.Disposable{constructor(R,L,z,D,$,N,F,U,H){super(),this._element=R,this._screenElement=L,this._linkifier=z,this._bufferService=D,this._coreService=$,this._mouseService=N,this._optionsService=F,this._renderService=U,this._coreBrowserService=H,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new _.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=K=>this._handleMouseMove(K),this._mouseUpListener=K=>this._handleMouseUp(K),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((K=>this._handleTrim(K))),this.register(this._bufferService.buffers.onBufferActivate((K=>this._handleBufferActivate(K)))),this.enable(),this._model=new v.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,g.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const R=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!R||!L||R[0]===L[0]&&R[1]===L[1])}get selectionText(){const R=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!R||!L)return"";const z=this._bufferService.buffer,D=[];if(this._activeSelectionMode===3){if(R[0]===L[0])return"";const $=R[0]<L[0]?R[0]:L[0],N=R[0]<L[0]?L[0]:R[0];for(let F=R[1];F<=L[1];F++){const U=z.translateBufferLineToString(F,!0,$,N);D.push(U)}}else{const $=R[1]===L[1]?L[0]:void 0;D.push(z.translateBufferLineToString(R[1],!0,R[0],$));for(let N=R[1]+1;N<=L[1]-1;N++){const F=z.lines.get(N),U=z.translateBufferLineToString(N,!0);F?.isWrapped?D[D.length-1]+=U:D.push(U)}if(R[1]!==L[1]){const N=z.lines.get(L[1]),F=z.translateBufferLineToString(L[1],!0,0,L[0]);N&&N.isWrapped?D[D.length-1]+=F:D.push(F)}}return D.map(($=>$.replace(k," "))).join(b.isWindows?`\r
|
|
31
|
+
`:`
|
|
32
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(R){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&R&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(R){const L=this._getMouseBufferCoords(R),z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!!(z&&D&&L)&&this._areCoordsInSelection(L,z,D)}isCellInSelection(R,L){const z=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!z||!D)&&this._areCoordsInSelection([R,L],z,D)}_areCoordsInSelection(R,L,z){return R[1]>L[1]&&R[1]<z[1]||L[1]===z[1]&&R[1]===L[1]&&R[0]>=L[0]&&R[0]<z[0]||L[1]<z[1]&&R[1]===z[1]&&R[0]<z[0]||L[1]<z[1]&&R[1]===L[1]&&R[0]>=L[0]}_selectWordAtCursor(R,L){const z=this._linkifier.currentLink?.link?.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(R);return!!D&&(this._selectWordAt(D,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(R,L){this._model.clearSelection(),R=Math.max(R,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,R],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(R){this._model.handleTrim(R)&&this.refresh()}_getMouseBufferCoords(R){const L=this._mouseService.getCoords(R,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(R){let L=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,R,this._screenElement)[1];const z=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=z?0:(L>z&&(L-=z),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(R){return b.isMac?R.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:R.shiftKey}handleMouseDown(R){if(this._mouseDownTimeStamp=R.timeStamp,(R.button!==2||!this.hasSelection)&&R.button===0){if(!this._enabled){if(!this.shouldForceSelection(R))return;R.stopPropagation()}R.preventDefault(),this._dragScrollAmount=0,this._enabled&&R.shiftKey?this._handleIncrementalClick(R):R.detail===1?this._handleSingleClick(R):R.detail===2?this._handleDoubleClick(R):R.detail===3&&this._handleTripleClick(R),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(R){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(R))}_handleSingleClick(R){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(R)?3:0,this._model.selectionStart=this._getMouseBufferCoords(R),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(R){this._selectWordAtCursor(R,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(R){const L=this._getMouseBufferCoords(R);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(R){return R.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(R){if(R.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(R),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(R),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const z=this._bufferService.buffer;if(this._model.selectionEnd[1]<z.lines.length){const D=z.lines.get(this._model.selectionEnd[1]);D&&D.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const R=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(R.ydisp+this._bufferService.rows,R.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=R.ydisp),this.refresh()}}_handleMouseUp(R){const L=R.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&R.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const z=this._mouseService.getCoords(R,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(z&&z[0]!==void 0&&z[1]!==void 0){const D=(0,p.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(D,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const R=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,z=!(!R||!L||R[0]===L[0]&&R[1]===L[1]);z?R&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&R[0]===this._oldSelectionStart[0]&&R[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(R,L,z)):this._oldHasSelection&&this._fireOnSelectionChange(R,L,z)}_fireOnSelectionChange(R,L,z){this._oldSelectionStart=R,this._oldSelectionEnd=L,this._oldHasSelection=z,this._onSelectionChange.fire()}_handleBufferActivate(R){this.clearSelection(),this._trimListener.dispose(),this._trimListener=R.activeBuffer.lines.onTrim((L=>this._handleTrim(L)))}_convertViewportColToCharacterIndex(R,L){let z=L;for(let D=0;L>=D;D++){const $=R.loadCell(D,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:$>1&&L!==D&&(z+=$-1)}return z}setSelection(R,L,z){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[R,L],this._model.selectionStartLength=z,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(R){this._isClickInSelection(R)||(this._selectWordAtCursor(R,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(R,L,z=!0,D=!0){if(R[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,N=$.lines.get(R[1]);if(!N)return;const F=$.translateBufferLineToString(R[1],!1);let U=this._convertViewportColToCharacterIndex(N,R[0]),H=U;const K=R[0]-U;let W=0,I=0,G=0,j=0;if(F.charAt(U)===" "){for(;U>0&&F.charAt(U-1)===" ";)U--;for(;H<F.length&&F.charAt(H+1)===" ";)H++}else{let X=R[0],re=R[0];N.getWidth(X)===0&&(W++,X--),N.getWidth(re)===2&&(I++,re++);const ie=N.getString(re).length;for(ie>1&&(j+=ie-1,H+=ie-1);X>0&&U>0&&!this._isCharWordSeparator(N.loadCell(X-1,this._workCell));){N.loadCell(X-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,X--):Q>1&&(G+=Q-1,U-=Q-1),U--,X--}for(;re<N.length&&H+1<F.length&&!this._isCharWordSeparator(N.loadCell(re+1,this._workCell));){N.loadCell(re+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,re++):Q>1&&(j+=Q-1,H+=Q-1),H++,re++}}H++;let B=U+K-W+G,V=Math.min(this._bufferService.cols,H-U+W+I-G-j);if(L||F.slice(U,H).trim()!==""){if(z&&B===0&&N.getCodePoint(0)!==32){const X=$.lines.get(R[1]-1);if(X&&N.isWrapped&&X.getCodePoint(this._bufferService.cols-1)!==32){const re=this._getWordAt([this._bufferService.cols-1,R[1]-1],!1,!0,!1);if(re){const ie=this._bufferService.cols-re.start;B-=ie,V+=ie}}}if(D&&B+V===this._bufferService.cols&&N.getCodePoint(this._bufferService.cols-1)!==32){const X=$.lines.get(R[1]+1);if(X?.isWrapped&&X.getCodePoint(0)!==32){const re=this._getWordAt([0,R[1]+1],!1,!1,!0);re&&(V+=re.length)}}return{start:B,length:V}}}_selectWordAt(R,L){const z=this._getWordAt(R,L);if(z){for(;z.start<0;)z.start+=this._bufferService.cols,R[1]--;this._model.selectionStart=[z.start,R[1]],this._model.selectionStartLength=z.length}}_selectToWordAt(R){const L=this._getWordAt(R,!0);if(L){let z=R[1];for(;L.start<0;)L.start+=this._bufferService.cols,z--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,z++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,z]}}_isCharWordSeparator(R){return R.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(R.getChars())>=0}_selectLineAt(R){const L=this._bufferService.buffer.getWrappedRangeForLine(R),z={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,y.getRangeLength)(z,this._bufferService.cols)}};a.SelectionService=A=u([h(3,T.IBufferService),h(4,T.ICoreService),h(5,S.IMouseService),h(6,T.IOptionsService),h(7,S.IRenderService),h(8,S.ICoreBrowserService)],A)},4725:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const u=c(8343);a.ICharSizeService=(0,u.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),a.IMouseService=(0,u.createDecorator)("MouseService"),a.IRenderService=(0,u.createDecorator)("RenderService"),a.ISelectionService=(0,u.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,u.createDecorator)("ThemeService"),a.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(l,a,c){var u=this&&this.__decorate||function(A,R,L,z){var D,$=arguments.length,N=$<3?R:z===null?z=Object.getOwnPropertyDescriptor(R,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(A,R,L,z);else for(var F=A.length-1;F>=0;F--)(D=A[F])&&(N=($<3?D(N):$>3?D(R,L,N):D(R,L))||N);return $>3&&N&&Object.defineProperty(R,L,N),N},h=this&&this.__param||function(A,R){return function(L,z){R(L,z,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),p=c(8055),v=c(8460),S=c(844),x=c(2585),g=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),_=p.css.toColor("#000000"),T={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],R=[0,95,135,175,215,255];for(let L=0;L<216;L++){const z=R[L/36%6|0],D=R[L/6%6|0],$=R[L%6];A.push({css:p.channels.toCss(z,D,$),rgba:p.channels.toRgba(z,D,$)})}for(let L=0;L<24;L++){const z=8+10*L;A.push({css:p.channels.toCss(z,z,z),rgba:p.channels.toRgba(z,z,z)})}return A})());let E=a.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new v.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:g,background:b,cursor:y,cursorAccent:_,selectionForeground:void 0,selectionBackgroundTransparent:T,selectionBackgroundOpaque:p.color.blend(b,T),selectionInactiveBackgroundTransparent:T,selectionInactiveBackgroundOpaque:p.color.blend(b,T),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const R=this._colors;if(R.foreground=k(A.foreground,g),R.background=k(A.background,b),R.cursor=k(A.cursor,y),R.cursorAccent=k(A.cursorAccent,_),R.selectionBackgroundTransparent=k(A.selectionBackground,T),R.selectionBackgroundOpaque=p.color.blend(R.background,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundTransparent=k(A.selectionInactiveBackground,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundOpaque=p.color.blend(R.background,R.selectionInactiveBackgroundTransparent),R.selectionForeground=A.selectionForeground?k(A.selectionForeground,p.NULL_COLOR):void 0,R.selectionForeground===p.NULL_COLOR&&(R.selectionForeground=void 0),p.color.isOpaque(R.selectionBackgroundTransparent)&&(R.selectionBackgroundTransparent=p.color.opacity(R.selectionBackgroundTransparent,.3)),p.color.isOpaque(R.selectionInactiveBackgroundTransparent)&&(R.selectionInactiveBackgroundTransparent=p.color.opacity(R.selectionInactiveBackgroundTransparent,.3)),R.ansi=a.DEFAULT_ANSI_COLORS.slice(),R.ansi[0]=k(A.black,a.DEFAULT_ANSI_COLORS[0]),R.ansi[1]=k(A.red,a.DEFAULT_ANSI_COLORS[1]),R.ansi[2]=k(A.green,a.DEFAULT_ANSI_COLORS[2]),R.ansi[3]=k(A.yellow,a.DEFAULT_ANSI_COLORS[3]),R.ansi[4]=k(A.blue,a.DEFAULT_ANSI_COLORS[4]),R.ansi[5]=k(A.magenta,a.DEFAULT_ANSI_COLORS[5]),R.ansi[6]=k(A.cyan,a.DEFAULT_ANSI_COLORS[6]),R.ansi[7]=k(A.white,a.DEFAULT_ANSI_COLORS[7]),R.ansi[8]=k(A.brightBlack,a.DEFAULT_ANSI_COLORS[8]),R.ansi[9]=k(A.brightRed,a.DEFAULT_ANSI_COLORS[9]),R.ansi[10]=k(A.brightGreen,a.DEFAULT_ANSI_COLORS[10]),R.ansi[11]=k(A.brightYellow,a.DEFAULT_ANSI_COLORS[11]),R.ansi[12]=k(A.brightBlue,a.DEFAULT_ANSI_COLORS[12]),R.ansi[13]=k(A.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),R.ansi[14]=k(A.brightCyan,a.DEFAULT_ANSI_COLORS[14]),R.ansi[15]=k(A.brightWhite,a.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const L=Math.min(R.ansi.length-16,A.extendedAnsi.length);for(let z=0;z<L;z++)R.ansi[z+16]=k(A.extendedAnsi[z],a.DEFAULT_ANSI_COLORS[z+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[A]=this._restoreColors.ansi[A]}else for(let R=0;R<this._restoreColors.ansi.length;++R)this._colors.ansi[R]=this._restoreColors.ansi[R]}modifyColors(A){A(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function k(A,R){if(A!==void 0)try{return p.css.toColor(A)}catch{}return R}a.ThemeService=E=u([h(0,x.IOptionsService)],E)},6349:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const u=c(8460),h=c(844);class f extends h.Disposable{constructor(v){super(),this._maxLength=v,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(v){if(this._maxLength===v)return;const S=new Array(v);for(let x=0;x<Math.min(v,this.length);x++)S[x]=this._array[this._getCyclicIndex(x)];this._array=S,this._maxLength=v,this._startIndex=0}get length(){return this._length}set length(v){if(v>this._length)for(let S=this._length;S<v;S++)this._array[S]=void 0;this._length=v}get(v){return this._array[this._getCyclicIndex(v)]}set(v,S){this._array[this._getCyclicIndex(v)]=S}push(v){this._array[this._getCyclicIndex(this._length)]=v,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(v,S,...x){if(S){for(let g=v;g<this._length-S;g++)this._array[this._getCyclicIndex(g)]=this._array[this._getCyclicIndex(g+S)];this._length-=S,this.onDeleteEmitter.fire({index:v,amount:S})}for(let g=this._length-1;g>=v;g--)this._array[this._getCyclicIndex(g+x.length)]=this._array[this._getCyclicIndex(g)];for(let g=0;g<x.length;g++)this._array[this._getCyclicIndex(v+g)]=x[g];if(x.length&&this.onInsertEmitter.fire({index:v,amount:x.length}),this._length+x.length>this._maxLength){const g=this._length+x.length-this._maxLength;this._startIndex+=g,this._length=this._maxLength,this.onTrimEmitter.fire(g)}else this._length+=x.length}trimStart(v){v>this._length&&(v=this._length),this._startIndex+=v,this._length-=v,this.onTrimEmitter.fire(v)}shiftElements(v,S,x){if(!(S<=0)){if(v<0||v>=this._length)throw new Error("start argument out of range");if(v+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let b=S-1;b>=0;b--)this.set(v+b+x,this.get(v+b));const g=v+S+x-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let g=0;g<S;g++)this.set(v+g+x,this.get(v+g))}}_getCyclicIndex(v){return(this._startIndex+v)%this._maxLength}}a.CircularList=f},1439:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(u,h=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=h<=1?u[p]:u[p]&&c(u[p],h-1);return f}},8055:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,u=0,h=0,f=0;var p,v,S,x,g;function b(_){const T=_.toString(16);return T.length<2?"0"+T:T}function y(_,T){return _<T?(T+.05)/(_+.05):(_+.05)/(T+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(_){_.toCss=function(T,E,k,A){return A!==void 0?`#${b(T)}${b(E)}${b(k)}${b(A)}`:`#${b(T)}${b(E)}${b(k)}`},_.toRgba=function(T,E,k,A=255){return(T<<24|E<<16|k<<8|A)>>>0},_.toColor=function(T,E,k,A){return{css:_.toCss(T,E,k,A),rgba:_.toRgba(T,E,k,A)}}})(p||(a.channels=p={})),(function(_){function T(E,k){return f=Math.round(255*k),[c,u,h]=g.toChannels(E.rgba),{css:p.toCss(c,u,h,f),rgba:p.toRgba(c,u,h,f)}}_.blend=function(E,k){if(f=(255&k.rgba)/255,f===1)return{css:k.css,rgba:k.rgba};const A=k.rgba>>24&255,R=k.rgba>>16&255,L=k.rgba>>8&255,z=E.rgba>>24&255,D=E.rgba>>16&255,$=E.rgba>>8&255;return c=z+Math.round((A-z)*f),u=D+Math.round((R-D)*f),h=$+Math.round((L-$)*f),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},_.isOpaque=function(E){return(255&E.rgba)==255},_.ensureContrastRatio=function(E,k,A){const R=g.ensureContrastRatio(E.rgba,k.rgba,A);if(R)return p.toColor(R>>24&255,R>>16&255,R>>8&255)},_.opaque=function(E){const k=(255|E.rgba)>>>0;return[c,u,h]=g.toChannels(k),{css:p.toCss(c,u,h),rgba:k}},_.opacity=T,_.multiplyOpacity=function(E,k){return f=255&E.rgba,T(E,f*k/255)},_.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(v||(a.color=v={})),(function(_){let T,E;try{const k=document.createElement("canvas");k.width=1,k.height=1;const A=k.getContext("2d",{willReadFrequently:!0});A&&(T=A,T.globalCompositeOperation="copy",E=T.createLinearGradient(0,0,1,1))}catch{}_.toColor=function(k){if(k.match(/#[\da-f]{3,8}/i))switch(k.length){case 4:return c=parseInt(k.slice(1,2).repeat(2),16),u=parseInt(k.slice(2,3).repeat(2),16),h=parseInt(k.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(k.slice(1,2).repeat(2),16),u=parseInt(k.slice(2,3).repeat(2),16),h=parseInt(k.slice(3,4).repeat(2),16),f=parseInt(k.slice(4,5).repeat(2),16),p.toColor(c,u,h,f);case 7:return{css:k,rgba:(parseInt(k.slice(1),16)<<8|255)>>>0};case 9:return{css:k,rgba:parseInt(k.slice(1),16)>>>0}}const A=k.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),h=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,h,f);if(!T||!E)throw new Error("css.toColor: Unsupported css format");if(T.fillStyle=E,T.fillStyle=k,typeof T.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(T.fillRect(0,0,1,1),[c,u,h,f]=T.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,f),css:k}}})(S||(a.css=S={})),(function(_){function T(E,k,A){const R=E/255,L=k/255,z=A/255;return .2126*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}_.relativeLuminance=function(E){return T(E>>16&255,E>>8&255,255&E)},_.relativeLuminance2=T})(x||(a.rgb=x={})),(function(_){function T(k,A,R){const L=k>>24&255,z=k>>16&255,D=k>>8&255;let $=A>>24&255,N=A>>16&255,F=A>>8&255,U=y(x.relativeLuminance2($,N,F),x.relativeLuminance2(L,z,D));for(;U<R&&($>0||N>0||F>0);)$-=Math.max(0,Math.ceil(.1*$)),N-=Math.max(0,Math.ceil(.1*N)),F-=Math.max(0,Math.ceil(.1*F)),U=y(x.relativeLuminance2($,N,F),x.relativeLuminance2(L,z,D));return($<<24|N<<16|F<<8|255)>>>0}function E(k,A,R){const L=k>>24&255,z=k>>16&255,D=k>>8&255;let $=A>>24&255,N=A>>16&255,F=A>>8&255,U=y(x.relativeLuminance2($,N,F),x.relativeLuminance2(L,z,D));for(;U<R&&($<255||N<255||F<255);)$=Math.min(255,$+Math.ceil(.1*(255-$))),N=Math.min(255,N+Math.ceil(.1*(255-N))),F=Math.min(255,F+Math.ceil(.1*(255-F))),U=y(x.relativeLuminance2($,N,F),x.relativeLuminance2(L,z,D));return($<<24|N<<16|F<<8|255)>>>0}_.blend=function(k,A){if(f=(255&A)/255,f===1)return A;const R=A>>24&255,L=A>>16&255,z=A>>8&255,D=k>>24&255,$=k>>16&255,N=k>>8&255;return c=D+Math.round((R-D)*f),u=$+Math.round((L-$)*f),h=N+Math.round((z-N)*f),p.toRgba(c,u,h)},_.ensureContrastRatio=function(k,A,R){const L=x.relativeLuminance(k>>8),z=x.relativeLuminance(A>>8);if(y(L,z)<R){if(z<L){const N=T(k,A,R),F=y(L,x.relativeLuminance(N>>8));if(F<R){const U=E(k,A,R);return F>y(L,x.relativeLuminance(U>>8))?N:U}return N}const D=E(k,A,R),$=y(L,x.relativeLuminance(D>>8));if($<R){const N=T(k,A,R);return $>y(L,x.relativeLuminance(N>>8))?D:N}return D}},_.reduceLuminance=T,_.increaseLuminance=E,_.toChannels=function(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}})(g||(a.rgba=g={})),a.toPaddedHex=b,a.contrastRatio=y},8969:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const u=c(844),h=c(2585),f=c(4348),p=c(7866),v=c(744),S=c(7302),x=c(6975),g=c(8460),b=c(1753),y=c(1480),_=c(7994),T=c(9282),E=c(5435),k=c(5981),A=c(2660);let R=!1;class L extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new g.EventEmitter),this._onScroll.event((D=>{this._onScrollApi?.fire(D.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(D){for(const $ in D)this.optionsService.options[$]=D[$]}constructor(D){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new g.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new g.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new g.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(D)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(v.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(_.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,g.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,g.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,g.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,g.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll(($=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll(($=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new k.WriteBuffer((($,N)=>this._inputHandler.parse($,N)))),this.register((0,g.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(D,$){this._writeBuffer.write(D,$)}writeSync(D,$){this._logService.logLevel<=h.LogLevelEnum.WARN&&!R&&(this._logService.warn("writeSync is unreliable and will be removed soon."),R=!0),this._writeBuffer.writeSync(D,$)}input(D,$=!0){this.coreService.triggerDataEvent(D,$)}resize(D,$){isNaN(D)||isNaN($)||(D=Math.max(D,v.MINIMUM_COLS),$=Math.max($,v.MINIMUM_ROWS),this._bufferService.resize(D,$))}scroll(D,$=!1){this._bufferService.scroll(D,$)}scrollLines(D,$,N){this._bufferService.scrollLines(D,$,N)}scrollPages(D){this.scrollLines(D*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(D){const $=D-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(D,$){return this._inputHandler.registerEscHandler(D,$)}registerDcsHandler(D,$){return this._inputHandler.registerDcsHandler(D,$)}registerCsiHandler(D,$){return this._inputHandler.registerCsiHandler(D,$)}registerOscHandler(D,$){return this._inputHandler.registerOscHandler(D,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let D=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?D=$.backend==="conpty"&&$.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(D=!0),D?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const D=[];D.push(this.onLineFeed(T.updateWindowsModeWrappedState.bind(null,this._bufferService))),D.push(this.registerCsiHandler({final:"H"},(()=>((0,T.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const $ of D)$.dispose()}))}}}a.CoreTerminal=L},8460:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const h=[];for(let f=0;f<this._listeners.length;f++)h.push(this._listeners[f]);for(let f=0;f<h.length;f++)h[f].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,u){return c((h=>u.fire(h)))},a.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(l,a,c){var u=this&&this.__decorate||function(W,I,G,j){var B,V=arguments.length,X=V<3?I:j===null?j=Object.getOwnPropertyDescriptor(I,G):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(W,I,G,j);else for(var re=W.length-1;re>=0;re--)(B=W[re])&&(X=(V<3?B(X):V>3?B(I,G,X):B(I,G))||X);return V>3&&X&&Object.defineProperty(I,G,X),X},h=this&&this.__param||function(W,I){return function(G,j){I(G,j,W)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const f=c(2584),p=c(7116),v=c(2015),S=c(844),x=c(482),g=c(8437),b=c(8460),y=c(643),_=c(511),T=c(3734),E=c(2585),k=c(1480),A=c(6242),R=c(6351),L=c(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function $(W,I){if(W>24)return I.setWinLines||!1;switch(W){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var N;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(N||(a.WindowsOptionsReportType=N={}));let F=0;class U extends S.Disposable{getAttrData(){return this._curAttrData}constructor(I,G,j,B,V,X,re,ie,Q=new v.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=G,this._coreService=j,this._logService=B,this._optionsService=V,this._oscLinkService=X,this._coreMouseService=re,this._unicodeService=ie,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new _.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new H(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((Y=>this._activeBuffer=Y.activeBuffer))),this._parser.setCsiHandlerFallback(((Y,J)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Y),params:J.toArray()})})),this._parser.setEscHandlerFallback((Y=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Y)})})),this._parser.setExecuteHandlerFallback((Y=>{this._logService.debug("Unknown EXECUTE code: ",{code:Y})})),this._parser.setOscHandlerFallback(((Y,J,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:Y,action:J,data:ee})})),this._parser.setDcsHandlerFallback(((Y,J,ee)=>{J==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Y),action:J,payload:ee})})),this._parser.setPrintHandler(((Y,J,ee)=>this.print(Y,J,ee))),this._parser.registerCsiHandler({final:"@"},(Y=>this.insertChars(Y))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(Y=>this.scrollLeft(Y))),this._parser.registerCsiHandler({final:"A"},(Y=>this.cursorUp(Y))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(Y=>this.scrollRight(Y))),this._parser.registerCsiHandler({final:"B"},(Y=>this.cursorDown(Y))),this._parser.registerCsiHandler({final:"C"},(Y=>this.cursorForward(Y))),this._parser.registerCsiHandler({final:"D"},(Y=>this.cursorBackward(Y))),this._parser.registerCsiHandler({final:"E"},(Y=>this.cursorNextLine(Y))),this._parser.registerCsiHandler({final:"F"},(Y=>this.cursorPrecedingLine(Y))),this._parser.registerCsiHandler({final:"G"},(Y=>this.cursorCharAbsolute(Y))),this._parser.registerCsiHandler({final:"H"},(Y=>this.cursorPosition(Y))),this._parser.registerCsiHandler({final:"I"},(Y=>this.cursorForwardTab(Y))),this._parser.registerCsiHandler({final:"J"},(Y=>this.eraseInDisplay(Y,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(Y=>this.eraseInDisplay(Y,!0))),this._parser.registerCsiHandler({final:"K"},(Y=>this.eraseInLine(Y,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(Y=>this.eraseInLine(Y,!0))),this._parser.registerCsiHandler({final:"L"},(Y=>this.insertLines(Y))),this._parser.registerCsiHandler({final:"M"},(Y=>this.deleteLines(Y))),this._parser.registerCsiHandler({final:"P"},(Y=>this.deleteChars(Y))),this._parser.registerCsiHandler({final:"S"},(Y=>this.scrollUp(Y))),this._parser.registerCsiHandler({final:"T"},(Y=>this.scrollDown(Y))),this._parser.registerCsiHandler({final:"X"},(Y=>this.eraseChars(Y))),this._parser.registerCsiHandler({final:"Z"},(Y=>this.cursorBackwardTab(Y))),this._parser.registerCsiHandler({final:"`"},(Y=>this.charPosAbsolute(Y))),this._parser.registerCsiHandler({final:"a"},(Y=>this.hPositionRelative(Y))),this._parser.registerCsiHandler({final:"b"},(Y=>this.repeatPrecedingCharacter(Y))),this._parser.registerCsiHandler({final:"c"},(Y=>this.sendDeviceAttributesPrimary(Y))),this._parser.registerCsiHandler({prefix:">",final:"c"},(Y=>this.sendDeviceAttributesSecondary(Y))),this._parser.registerCsiHandler({final:"d"},(Y=>this.linePosAbsolute(Y))),this._parser.registerCsiHandler({final:"e"},(Y=>this.vPositionRelative(Y))),this._parser.registerCsiHandler({final:"f"},(Y=>this.hVPosition(Y))),this._parser.registerCsiHandler({final:"g"},(Y=>this.tabClear(Y))),this._parser.registerCsiHandler({final:"h"},(Y=>this.setMode(Y))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(Y=>this.setModePrivate(Y))),this._parser.registerCsiHandler({final:"l"},(Y=>this.resetMode(Y))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(Y=>this.resetModePrivate(Y))),this._parser.registerCsiHandler({final:"m"},(Y=>this.charAttributes(Y))),this._parser.registerCsiHandler({final:"n"},(Y=>this.deviceStatus(Y))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(Y=>this.deviceStatusPrivate(Y))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(Y=>this.softReset(Y))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(Y=>this.setCursorStyle(Y))),this._parser.registerCsiHandler({final:"r"},(Y=>this.setScrollRegion(Y))),this._parser.registerCsiHandler({final:"s"},(Y=>this.saveCursor(Y))),this._parser.registerCsiHandler({final:"t"},(Y=>this.windowOptions(Y))),this._parser.registerCsiHandler({final:"u"},(Y=>this.restoreCursor(Y))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(Y=>this.insertColumns(Y))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(Y=>this.deleteColumns(Y))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(Y=>this.selectProtected(Y))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(Y=>this.requestMode(Y,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(Y=>this.requestMode(Y,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((Y=>(this.setTitle(Y),this.setIconName(Y),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((Y=>this.setIconName(Y)))),this._parser.registerOscHandler(2,new A.OscHandler((Y=>this.setTitle(Y)))),this._parser.registerOscHandler(4,new A.OscHandler((Y=>this.setOrReportIndexedColor(Y)))),this._parser.registerOscHandler(8,new A.OscHandler((Y=>this.setHyperlink(Y)))),this._parser.registerOscHandler(10,new A.OscHandler((Y=>this.setOrReportFgColor(Y)))),this._parser.registerOscHandler(11,new A.OscHandler((Y=>this.setOrReportBgColor(Y)))),this._parser.registerOscHandler(12,new A.OscHandler((Y=>this.setOrReportCursorColor(Y)))),this._parser.registerOscHandler(104,new A.OscHandler((Y=>this.restoreIndexedColor(Y)))),this._parser.registerOscHandler(110,new A.OscHandler((Y=>this.restoreFgColor(Y)))),this._parser.registerOscHandler(111,new A.OscHandler((Y=>this.restoreBgColor(Y)))),this._parser.registerOscHandler(112,new A.OscHandler((Y=>this.restoreCursorColor(Y)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const Y in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Y},(()=>this.selectCharset("("+Y))),this._parser.registerEscHandler({intermediates:")",final:Y},(()=>this.selectCharset(")"+Y))),this._parser.registerEscHandler({intermediates:"*",final:Y},(()=>this.selectCharset("*"+Y))),this._parser.registerEscHandler({intermediates:"+",final:Y},(()=>this.selectCharset("+"+Y))),this._parser.registerEscHandler({intermediates:"-",final:Y},(()=>this.selectCharset("-"+Y))),this._parser.registerEscHandler({intermediates:".",final:Y},(()=>this.selectCharset("."+Y))),this._parser.registerEscHandler({intermediates:"/",final:Y},(()=>this.selectCharset("/"+Y)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((Y=>(this._logService.error("Parsing error: ",Y),Y))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new R.DcsHandler(((Y,J)=>this.requestStatusString(Y,J))))}_preserveStack(I,G,j,B){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=G,this._parseStack.decodedLength=j,this._parseStack.position=B}_logSlowResolvingAsync(I){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([I,new Promise(((G,j)=>setTimeout((()=>j("#SLOW_TIMEOUT")),5e3)))]).catch((G=>{if(G!=="#SLOW_TIMEOUT")throw G;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,G){let j,B=this._activeBuffer.x,V=this._activeBuffer.y,X=0;const re=this._parseStack.paused;if(re){if(j=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,G))return this._logSlowResolvingAsync(j),j;B=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>D&&(X=this._parseStack.position+D)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(Y=>String.fromCharCode(Y))).join("")}"`),typeof I=="string"?I.split("").map((Y=>Y.charCodeAt(0))):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<D&&(this._parseBuffer=new Uint32Array(Math.min(I.length,D))),re||this._dirtyRowTracker.clearRange(),I.length>D)for(let Y=X;Y<I.length;Y+=D){const J=Y+D<I.length?Y+D:I.length,ee=typeof I=="string"?this._stringDecoder.decode(I.substring(Y,J),this._parseBuffer):this._utf8Decoder.decode(I.subarray(Y,J),this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,ee))return this._preserveStack(B,V,ee,Y),this._logSlowResolvingAsync(j),j}else if(!re){const Y=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,Y))return this._preserveStack(B,V,Y,0),this._logSlowResolvingAsync(j),j}this._activeBuffer.x===B&&this._activeBuffer.y===V||this._onCursorMove.fire();const ie=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(ie,this._bufferService.rows-1))}print(I,G,j){let B,V;const X=this._charsetService.charset,re=this._optionsService.rawOptions.screenReaderMode,ie=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,Y=this._coreService.modes.insertMode,J=this._curAttrData;let ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&j-G>0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,J);let ne=this._parser.precedingJoinState;for(let te=G;te<j;++te){if(B=I[te],B<127&&X){const de=X[String.fromCharCode(B)];de&&(B=de.charCodeAt(0))}const le=this._unicodeService.charProperties(B,ne);V=k.UnicodeService.extractWidth(le);const fe=k.UnicodeService.extractShouldJoin(le),pe=fe?k.UnicodeService.extractWidth(ne):0;if(ne=le,re&&this._onA11yChar.fire((0,x.stringFromCodePoint)(B)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-pe>ie){if(Q){const de=ee;let ue=this._activeBuffer.x-pe;for(this._activeBuffer.x=pe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),pe>0&&ee instanceof g.BufferLine&&ee.copyCellsFrom(de,ue,0,pe,!1);ue<ie;)de.setCellFromCodepoint(ue++,0,1,J)}else if(this._activeBuffer.x=ie-1,V===2)continue}if(fe&&this._activeBuffer.x){const de=ee.getWidth(this._activeBuffer.x-1)?1:2;ee.addCodepointToCell(this._activeBuffer.x-de,B,V);for(let ue=V-pe;--ue>=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,J)}else if(Y&&(ee.insertCells(this._activeBuffer.x,V-pe,this._activeBuffer.getNullCell(J)),ee.getWidth(ie-1)===2&&ee.setCellFromCodepoint(ie-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,J)),ee.setCellFromCodepoint(this._activeBuffer.x++,B,V,J),V>0)for(;--V;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,J)}this._parser.precedingJoinState=ne,this._activeBuffer.x<ie&&j-G>0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,J),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,G){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,G):this._parser.registerCsiHandler(I,(j=>!$(j.params[0],this._optionsService.rawOptions.windowOptions)||G(j)))}registerDcsHandler(I,G){return this._parser.registerDcsHandler(I,new R.DcsHandler(G))}registerEscHandler(I,G){return this._parser.registerEscHandler(I,G)}registerOscHandler(I,G){return this._parser.registerOscHandler(I,new A.OscHandler(G))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);I.hasWidth(this._activeBuffer.x)&&!I.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,G){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+G):(this._activeBuffer.x=I,this._activeBuffer.y=G),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,G){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+G)}cursorUp(I){const G=this._activeBuffer.y-this._activeBuffer.scrollTop;return G>=0?this._moveCursor(0,-Math.min(G,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const G=this._activeBuffer.scrollBottom-this._activeBuffer.y;return G>=0?this._moveCursor(0,Math.min(G,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const G=I.params[0];return G===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:G===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let G=I.params[0]||1;for(;G--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let G=I.params[0]||1;for(;G--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const G=I.params[0];return G===1&&(this._curAttrData.bg|=536870912),G!==2&&G!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,G,j,B=!1,V=!1){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);X.replaceCells(G,j,this._activeBuffer.getNullCell(this._eraseAttrData()),V),B&&(X.isWrapped=!1)}_resetBufferLine(I,G=!1){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);j&&(j.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),G),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),j.isWrapped=!1)}eraseInDisplay(I,G=!1){let j;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,G);j<this._bufferService.rows;j++)this._resetBufferLine(j,G);this._dirtyRowTracker.markDirty(j);break;case 1:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j,0,this._activeBuffer.x+1,!0,G),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(j+1).isWrapped=!1);j--;)this._resetBufferLine(j,G);this._dirtyRowTracker.markDirty(0);break;case 2:for(j=this._bufferService.rows,this._dirtyRowTracker.markDirty(j-1);j--;)this._resetBufferLine(j,G);this._dirtyRowTracker.markDirty(0);break;case 3:const B=this._activeBuffer.lines.length-this._bufferService.rows;B>0&&(this._activeBuffer.lines.trimStart(B),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-B,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-B,0),this._onScroll.fire(0))}return!0}eraseInLine(I,G=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,G);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,G);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,G)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let G=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y,B=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-B+1;for(;G--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(j,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let G=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y;let B;for(B=this._bufferService.rows-1-this._activeBuffer.scrollBottom,B=this._bufferService.rows-1+this._activeBuffer.ybase-B;G--;)this._activeBuffer.lines.splice(j,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let G=I.params[0]||1;for(;G--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(I){let G=I.params[0]||1;for(;G--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(g.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=I.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);B.deleteCells(0,G,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=I.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);B.insertCells(0,G,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=I.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);B.insertCells(this._activeBuffer.x,G,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=I.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);B.deleteCells(this._activeBuffer.x,G,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const G=this._parser.precedingJoinState;if(!G)return!0;const j=I.params[0]||1,B=k.UnicodeService.extractWidth(G),V=this._activeBuffer.x-B,X=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),re=new Uint32Array(X.length*j);let ie=0;for(let Y=0;Y<X.length;){const J=X.codePointAt(Y)||0;re[ie++]=J,Y+=J>65535?2:1}let Q=ie;for(let Y=1;Y<j;++Y)re.copyWithin(Q,0,ie),Q+=ie;return this.print(re,0,Q),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let G=0;G<I.length;G++)switch(I.params[G]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let G=0;G<I.length;G++)switch(I.params[G]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(I){for(let G=0;G<I.length;G++)switch(I.params[G]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let G=0;G<I.length;G++)switch(I.params[G]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),I.params[G]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(I,G){const j=this._coreService.decPrivateModes,{activeProtocol:B,activeEncoding:V}=this._coreMouseService,X=this._coreService,{buffers:re,cols:ie}=this._bufferService,{active:Q,alt:Y}=re,J=this._optionsService.rawOptions,ee=fe=>fe?1:2,ne=I.params[0];return te=ne,le=G?ne===2?4:ne===4?ee(X.modes.insertMode):ne===12?3:ne===20?ee(J.convertEol):0:ne===1?ee(j.applicationCursorKeys):ne===3?J.windowOptions.setWinLines?ie===80?2:ie===132?1:0:0:ne===6?ee(j.origin):ne===7?ee(j.wraparound):ne===8?3:ne===9?ee(B==="X10"):ne===12?ee(J.cursorBlink):ne===25?ee(!X.isCursorHidden):ne===45?ee(j.reverseWraparound):ne===66?ee(j.applicationKeypad):ne===67?4:ne===1e3?ee(B==="VT200"):ne===1002?ee(B==="DRAG"):ne===1003?ee(B==="ANY"):ne===1004?ee(j.sendFocus):ne===1005?4:ne===1006?ee(V==="SGR"):ne===1015?4:ne===1016?ee(V==="SGR_PIXELS"):ne===1048?1:ne===47||ne===1047||ne===1049?ee(Q===Y):ne===2004?ee(j.bracketedPasteMode):0,X.triggerDataEvent(`${f.C0.ESC}[${G?"":"?"}${te};${le}$y`),!0;var te,le}_updateAttrColor(I,G,j,B,V){return G===2?(I|=50331648,I&=-16777216,I|=T.AttributeData.fromColorRGB([j,B,V])):G===5&&(I&=-50331904,I|=33554432|255&j),I}_extractColor(I,G,j){const B=[0,0,-1,0,0,0];let V=0,X=0;do{if(B[X+V]=I.params[G+X],I.hasSubParams(G+X)){const re=I.getSubParams(G+X);let ie=0;do B[1]===5&&(V=1),B[X+ie+1+V]=re[ie];while(++ie<re.length&&ie+X+1+V<B.length);break}if(B[1]===5&&X+V>=2||B[1]===2&&X+V>=5)break;B[1]&&(V=1)}while(++X+G<I.length&&X+V<B.length);for(let re=2;re<B.length;++re)B[re]===-1&&(B[re]=0);switch(B[0]){case 38:j.fg=this._updateAttrColor(j.fg,B[1],B[3],B[4],B[5]);break;case 48:j.bg=this._updateAttrColor(j.bg,B[1],B[3],B[4],B[5]);break;case 58:j.extended=j.extended.clone(),j.extended.underlineColor=this._updateAttrColor(j.extended.underlineColor,B[1],B[3],B[4],B[5])}return X}_processUnderline(I,G){G.extended=G.extended.clone(),(!~I||I>5)&&(I=1),G.extended.underlineStyle=I,G.fg|=268435456,I===0&&(G.fg&=-268435457),G.updateExtended()}_processSGR0(I){I.fg=g.DEFAULT_ATTR_DATA.fg,I.bg=g.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const G=I.length;let j;const B=this._curAttrData;for(let V=0;V<G;V++)j=I.params[V],j>=30&&j<=37?(B.fg&=-50331904,B.fg|=16777216|j-30):j>=40&&j<=47?(B.bg&=-50331904,B.bg|=16777216|j-40):j>=90&&j<=97?(B.fg&=-50331904,B.fg|=16777224|j-90):j>=100&&j<=107?(B.bg&=-50331904,B.bg|=16777224|j-100):j===0?this._processSGR0(B):j===1?B.fg|=134217728:j===3?B.bg|=67108864:j===4?(B.fg|=268435456,this._processUnderline(I.hasSubParams(V)?I.getSubParams(V)[0]:1,B)):j===5?B.fg|=536870912:j===7?B.fg|=67108864:j===8?B.fg|=1073741824:j===9?B.fg|=2147483648:j===2?B.bg|=134217728:j===21?this._processUnderline(2,B):j===22?(B.fg&=-134217729,B.bg&=-134217729):j===23?B.bg&=-67108865:j===24?(B.fg&=-268435457,this._processUnderline(0,B)):j===25?B.fg&=-536870913:j===27?B.fg&=-67108865:j===28?B.fg&=-1073741825:j===29?B.fg&=2147483647:j===39?(B.fg&=-67108864,B.fg|=16777215&g.DEFAULT_ATTR_DATA.fg):j===49?(B.bg&=-67108864,B.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):j===38||j===48||j===58?V+=this._extractColor(I,V,B):j===53?B.bg|=1073741824:j===55?B.bg&=-1073741825:j===59?(B.extended=B.extended.clone(),B.extended.underlineColor=-1,B.updateExtended()):j===100?(B.fg&=-67108864,B.fg|=16777215&g.DEFAULT_ATTR_DATA.fg,B.bg&=-67108864,B.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",j);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const G=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${G};${j}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const G=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${G};${j}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=g.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const G=I.params[0]||1;switch(G){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const j=G%2==1;return this._optionsService.options.cursorBlink=j,!0}setScrollRegion(I){const G=I.params[0]||1;let j;return(I.length<2||(j=I.params[1])>this._bufferService.rows||j===0)&&(j=this._bufferService.rows),j>G&&(this._activeBuffer.scrollTop=G-1,this._activeBuffer.scrollBottom=j-1,this._setCursor(0,0)),!0}windowOptions(I){if(!$(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const G=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:G!==2&&this._onRequestWindowsOptionsReport.fire(N.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(N.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:G!==0&&G!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),G!==0&&G!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:G!==0&&G!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),G!==0&&G!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const G=[],j=I.split(";");for(;j.length>1;){const B=j.shift(),V=j.shift();if(/^\d+$/.exec(B)){const X=parseInt(B);if(K(X))if(V==="?")G.push({type:0,index:X});else{const re=(0,L.parseColor)(V);re&&G.push({type:1,index:X,color:re})}}}return G.length&&this._onColor.fire(G),!0}setHyperlink(I){const G=I.split(";");return!(G.length<2)&&(G[1]?this._createHyperlink(G[0],G[1]):!G[0]&&this._finishHyperlink())}_createHyperlink(I,G){this._getCurrentLinkId()&&this._finishHyperlink();const j=I.split(":");let B;const V=j.findIndex((X=>X.startsWith("id=")));return V!==-1&&(B=j[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:B,uri:G}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,G){const j=I.split(";");for(let B=0;B<j.length&&!(G>=this._specialColors.length);++B,++G)if(j[B]==="?")this._onColor.fire([{type:0,index:this._specialColors[G]}]);else{const V=(0,L.parseColor)(j[B]);V&&this._onColor.fire([{type:1,index:this._specialColors[G],color:V}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const G=[],j=I.split(";");for(let B=0;B<j.length;++B)if(/^\d+$/.exec(j[B])){const V=parseInt(j[B]);K(V)&&G.push({type:2,index:V})}return G.length&&this._onColor.fire(G),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(z[I[0]],p.CHARSETS[I[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new _.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let G=0;G<this._bufferService.rows;++G){const j=this._activeBuffer.ybase+this._activeBuffer.y+G,B=this._activeBuffer.lines.get(j);B&&(B.fill(I),B.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,G){const j=this._bufferService.buffer,B=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${V}${f.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${j.scrollTop+1};${j.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[B.cursorStyle]-(B.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,G){this._dirtyRowTracker.markRangeDirty(I,G)}}a.InputHandler=U;let H=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,I){W>I&&(F=W,W=I,I=F),W<this.start&&(this.start=W),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function K(W){return 0<=W&&W<256}H=u([h(0,E.IBufferService)],H)},844:(l,a)=>{function c(u){for(const h of u)h.dispose();u.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){this._isDisposed||u===this._value||(this._value?.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},a.toDisposable=function(u){return{dispose:u}},a.disposeArray=c,a.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(h,f,p){this._data[h]||(this._data[h]={}),this._data[h][f]=p}get(h,f){return this._data[h]?this._data[h][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(u,h,f,p,v){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(f,p,v)}get(u,h,f,p){return this._data.get(u,h)?.get(f,p)}clear(){this._data.clear()}}},6114:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,u=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),a.isIpad=u==="iPad",a.isIphone=u==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),a.isLinux=u.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===h);return!1}*getKeyIterator(u){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===u)}forEachByKey(u,h){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do h(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===u)}values(){return[...this._array].values()}_search(u){let h=0,f=this._array.length-1;for(;f>=h;){let p=h+f>>1;const v=this._getKey(this._array[p]);if(v>u)f=p-1;else{if(!(v<u)){for(;p>0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(v){this._tasks.push(v),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(v){this._idleCallback=void 0;let S=0,x=0,g=v.timeRemaining(),b=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),x=Math.max(S,x),b=v.timeRemaining(),1.5*x>b)return g-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(g-S))}ms`),void this._start();g=b}this.clear()}}class f extends h{_requestCallback(v){return setTimeout((()=>v(this._createDeadline(16))))}_cancelCallback(v){clearTimeout(v)}_createDeadline(v){const S=Date.now()+v;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const u=c(643);a.updateWindowsModeWrappedState=function(h){const f=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=f?.get(h.cols-1),v=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);v&&p&&(v.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new c;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,p=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=u},9092:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const u=c(6349),h=c(7226),f=c(3734),p=c(8437),v=c(4634),S=c(511),x=c(643),g=c(4863),b=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(y,_,T){this._hasScrollback=y,this._optionsService=_,this._bufferService=T,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,_){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),_)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&y<this._rows}_getCorrectBufferLength(y){if(!this._hasScrollback)return y;const _=y+this._optionsService.rawOptions.scrollback;return _>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:_}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let _=this._rows;for(;_--;)this.lines.push(this.getBlankLine(y))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(y,_){const T=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=0;const k=this._getCorrectBufferLength(_);if(k>this.lines.maxLength&&(this.lines.maxLength=k),this.lines.length>0){if(this._cols<y)for(let R=0;R<this.lines.length;R++)E+=+this.lines.get(R).resize(y,T);let A=0;if(this._rows<_)for(let R=this._rows;R<_;R++)this.lines.length<_+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(y,T)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(y,T)));else for(let R=this._rows;R>_;R--)this.lines.length>_+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(k<this.lines.maxLength){const R=this.lines.length-k;R>0&&(this.lines.trimStart(R),this.ybase=Math.max(this.ybase-R,0),this.ydisp=Math.max(this.ydisp-R,0),this.savedY=Math.max(this.savedY-R,0)),this.lines.maxLength=k}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,_-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=_-1,this._isReflowEnabled&&(this._reflow(y,_),this._cols>y))for(let A=0;A<this.lines.length;A++)E+=+this.lines.get(A).resize(y,T);this._cols=y,this._rows=_,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let _=0;for(;this._memoryCleanupPosition<this.lines.length;)if(_+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),_>100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,_){this._cols!==y&&(y>this._cols?this._reflowLarger(y,_):this._reflowSmaller(y,_))}_reflowLarger(y,_){const T=(0,v.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(T.length>0){const E=(0,v.reflowLargerCreateNewLayout)(this.lines,T);(0,v.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(y,_,E.countRemoved)}}_reflowLargerAdjustViewport(y,_,T){const E=this.getNullCell(p.DEFAULT_ATTR_DATA);let k=T;for(;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<_&&this.lines.push(new p.BufferLine(y,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-T,0)}_reflowSmaller(y,_){const T=this.getNullCell(p.DEFAULT_ATTR_DATA),E=[];let k=0;for(let A=this.lines.length-1;A>=0;A--){let R=this.lines.get(A);if(!R||!R.isWrapped&&R.getTrimmedLength()<=y)continue;const L=[R];for(;R.isWrapped&&A>0;)R=this.lines.get(--A),L.unshift(R);const z=this.ybase+this.y;if(z>=A&&z<A+L.length)continue;const D=L[L.length-1].getTrimmedLength(),$=(0,v.reflowSmallerGetNewLineLengths)(L,this._cols,y),N=$.length-L.length;let F;F=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+N):Math.max(0,this.lines.length-this.lines.maxLength+N);const U=[];for(let j=0;j<N;j++){const B=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);U.push(B)}U.length>0&&(E.push({start:A+L.length+k,newLines:U}),k+=U.length),L.push(...U);let H=$.length-1,K=$[H];K===0&&(H--,K=$[H]);let W=L.length-N-1,I=D;for(;W>=0;){const j=Math.min(I,K);if(L[H]===void 0)break;if(L[H].copyCellsFrom(L[W],I-j,K-j,j,!0),K-=j,K===0&&(H--,K=$[H]),I-=j,I===0){W--;const B=Math.max(W,0);I=(0,v.getWrappedLineTrimmedLength)(L,B,this._cols)}}for(let j=0;j<L.length;j++)$[j]<y&&L[j].setCell($[j],T);let G=N-F;for(;G-- >0;)this.ybase===0?this.y<_-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+k)-_&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+N,this.ybase+_-1)}if(E.length>0){const A=[],R=[];for(let H=0;H<this.lines.length;H++)R.push(this.lines.get(H));const L=this.lines.length;let z=L-1,D=0,$=E[D];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+k);let N=0;for(let H=Math.min(this.lines.maxLength-1,L+k-1);H>=0;H--)if($&&$.start>z+N){for(let K=$.newLines.length-1;K>=0;K--)this.lines.set(H--,$.newLines[K]);H++,A.push({index:z+1,amount:$.newLines.length}),N+=$.newLines.length,$=E[++D]}else this.lines.set(H,R[z--]);let F=0;for(let H=A.length-1;H>=0;H--)A[H].index+=F,this.lines.onInsertEmitter.fire(A[H]),F+=A[H].amount;const U=Math.max(0,L+k-this.lines.maxLength);U>0&&this.lines.onTrimEmitter.fire(U)}}translateBufferLineToString(y,_,T=0,E){const k=this.lines.get(y);return k?k.translateToString(_,T,E):""}getWrappedRangeForLine(y){let _=y,T=y;for(;_>0&&this.lines.get(_).isWrapped;)_--;for(;T+1<this.lines.length&&this.lines.get(T+1).isWrapped;)T++;return{first:_,last:T}}setupTabStops(y){for(y!=null?this.tabs[y]||(y=this.prevStop(y)):(this.tabs={},y=0);y<this._cols;y+=this._optionsService.rawOptions.tabStopWidth)this.tabs[y]=!0}prevStop(y){for(y==null&&(y=this.x);!this.tabs[--y]&&y>0;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y<this._cols;);return y>=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].line===y&&(this.markers[_].dispose(),this.markers.splice(_--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].dispose(),this.markers.splice(y--,1);this._isClearing=!1}addMarker(y){const _=new g.Marker(y);return this.markers.push(_),_.register(this.lines.onTrim((T=>{_.line-=T,_.line<0&&_.dispose()}))),_.register(this.lines.onInsert((T=>{_.line>=T.index&&(_.line+=T.amount)}))),_.register(this.lines.onDelete((T=>{_.line>=T.index&&_.line<T.index+T.amount&&_.dispose(),_.line>T.index&&(_.line-=T.amount)}))),_.register(_.onDispose((()=>this._removeMarker(_)))),_}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),f=c(643),p=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let v=0;class S{constructor(g,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*g);const _=b||h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let T=0;T<g;++T)this.setCell(T,_);this.length=g}get(g){const b=this._data[3*g+0],y=2097151&b;return[this._data[3*g+1],2097152&b?this._combined[g]:y?(0,p.stringFromCodePoint)(y):"",b>>22,2097152&b?this._combined[g].charCodeAt(this._combined[g].length-1):y]}set(g,b){this._data[3*g+1]=b[f.CHAR_DATA_ATTR_INDEX],b[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[g]=b[1],this._data[3*g+0]=2097152|g|b[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*g+0]=b[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(g){return this._data[3*g+0]>>22}hasWidth(g){return 12582912&this._data[3*g+0]}getFg(g){return this._data[3*g+1]}getBg(g){return this._data[3*g+2]}hasContent(g){return 4194303&this._data[3*g+0]}getCodePoint(g){const b=this._data[3*g+0];return 2097152&b?this._combined[g].charCodeAt(this._combined[g].length-1):2097151&b}isCombined(g){return 2097152&this._data[3*g+0]}getString(g){const b=this._data[3*g+0];return 2097152&b?this._combined[g]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(g){return 536870912&this._data[3*g+2]}loadCell(g,b){return v=3*g,b.content=this._data[v+0],b.fg=this._data[v+1],b.bg=this._data[v+2],2097152&b.content&&(b.combinedData=this._combined[g]),268435456&b.bg&&(b.extended=this._extendedAttrs[g]),b}setCell(g,b){2097152&b.content&&(this._combined[g]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[g]=b.extended),this._data[3*g+0]=b.content,this._data[3*g+1]=b.fg,this._data[3*g+2]=b.bg}setCellFromCodepoint(g,b,y,_){268435456&_.bg&&(this._extendedAttrs[g]=_.extended),this._data[3*g+0]=b|y<<22,this._data[3*g+1]=_.fg,this._data[3*g+2]=_.bg}addCodepointToCell(g,b,y){let _=this._data[3*g+0];2097152&_?this._combined[g]+=(0,p.stringFromCodePoint)(b):2097151&_?(this._combined[g]=(0,p.stringFromCodePoint)(2097151&_)+(0,p.stringFromCodePoint)(b),_&=-2097152,_|=2097152):_=b|4194304,y&&(_&=-12582913,_|=y<<22),this._data[3*g+0]=_}insertCells(g,b,y){if((g%=this.length)&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,y),b<this.length-g){const _=new h.CellData;for(let T=this.length-g-b-1;T>=0;--T)this.setCell(g+b+T,this.loadCell(g+T,_));for(let T=0;T<b;++T)this.setCell(g+T,y)}else for(let _=g;_<this.length;++_)this.setCell(_,y);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,y)}deleteCells(g,b,y){if(g%=this.length,b<this.length-g){const _=new h.CellData;for(let T=0;T<this.length-g-b;++T)this.setCell(g+T,this.loadCell(g+b+T,_));for(let T=this.length-b;T<this.length;++T)this.setCell(T,y)}else for(let _=g;_<this.length;++_)this.setCell(_,y);g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,y),this.getWidth(g)!==0||this.hasContent(g)||this.setCellFromCodepoint(g,0,1,y)}replaceCells(g,b,y,_=!1){if(_)for(g&&this.getWidth(g-1)===2&&!this.isProtected(g-1)&&this.setCellFromCodepoint(g-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,y);g<b&&g<this.length;)this.isProtected(g)||this.setCell(g,y),g++;else for(g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,y),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,y);g<b&&g<this.length;)this.setCell(g++,y)}resize(g,b){if(g===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const y=3*g;if(g>this.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const _=new Uint32Array(y);_.set(this._data),this._data=_}for(let _=this.length;_<g;++_)this.setCell(_,b)}else{this._data=this._data.subarray(0,y);const _=Object.keys(this._combined);for(let E=0;E<_.length;E++){const k=parseInt(_[E],10);k>=g&&delete this._combined[k]}const T=Object.keys(this._extendedAttrs);for(let E=0;E<T.length;E++){const k=parseInt(T[E],10);k>=g&&delete this._extendedAttrs[k]}}return this.length=g,4*y*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const g=new Uint32Array(this._data.length);return g.set(this._data),this._data=g,1}return 0}fill(g,b=!1){if(b)for(let y=0;y<this.length;++y)this.isProtected(y)||this.setCell(y,g);else{this._combined={},this._extendedAttrs={};for(let y=0;y<this.length;++y)this.setCell(y,g)}}copyFrom(g){this.length!==g.length?this._data=new Uint32Array(g._data):this._data.set(g._data),this.length=g.length,this._combined={};for(const b in g._combined)this._combined[b]=g._combined[b];this._extendedAttrs={};for(const b in g._extendedAttrs)this._extendedAttrs[b]=g._extendedAttrs[b];this.isWrapped=g.isWrapped}clone(){const g=new S(0);g._data=new Uint32Array(this._data),g.length=this.length;for(const b in this._combined)g._combined[b]=this._combined[b];for(const b in this._extendedAttrs)g._extendedAttrs[b]=this._extendedAttrs[b];return g.isWrapped=this.isWrapped,g}getTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0])return g+(this._data[3*g+0]>>22);return 0}getNoBgTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0]||50331648&this._data[3*g+2])return g+(this._data[3*g+0]>>22);return 0}copyCellsFrom(g,b,y,_,T){const E=g._data;if(T)for(let A=_-1;A>=0;A--){for(let R=0;R<3;R++)this._data[3*(y+A)+R]=E[3*(b+A)+R];268435456&E[3*(b+A)+2]&&(this._extendedAttrs[y+A]=g._extendedAttrs[b+A])}else for(let A=0;A<_;A++){for(let R=0;R<3;R++)this._data[3*(y+A)+R]=E[3*(b+A)+R];268435456&E[3*(b+A)+2]&&(this._extendedAttrs[y+A]=g._extendedAttrs[b+A])}const k=Object.keys(g._combined);for(let A=0;A<k.length;A++){const R=parseInt(k[A],10);R>=b&&(this._combined[R-b+y]=g._combined[R])}}translateToString(g,b,y,_){b=b??0,y=y??this.length,g&&(y=Math.min(y,this.getTrimmedLength())),_&&(_.length=0);let T="";for(;b<y;){const E=this._data[3*b+0],k=2097151&E,A=2097152&E?this._combined[b]:k?(0,p.stringFromCodePoint)(k):f.WHITESPACE_CELL_CHAR;if(T+=A,_)for(let R=0;R<A.length;++R)_.push(b);b+=E>>22||1}return _&&_.push(b),T}}a.BufferLine=S},4841:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(l,a)=>{function c(u,h,f){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(f-1)&&u[h].getWidth(f-1)===1,v=u[h+1].getWidth(0)===2;return p&&v?f-1:f}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(u,h,f,p,v){const S=[];for(let x=0;x<u.length-1;x++){let g=x,b=u.get(++g);if(!b.isWrapped)continue;const y=[u.get(x)];for(;g<u.length&&b.isWrapped;)y.push(b),b=u.get(++g);if(p>=x&&p<g){x+=y.length-1;continue}let _=0,T=c(y,_,h),E=1,k=0;for(;E<y.length;){const R=c(y,E,h),L=R-k,z=f-T,D=Math.min(L,z);y[_].copyCellsFrom(y[E],k,T,D,!1),T+=D,T===f&&(_++,T=0),k+=D,k===R&&(E++,k=0),T===0&&_!==0&&y[_-1].getWidth(f-1)===2&&(y[_].copyCellsFrom(y[_-1],f-1,T++,1,!1),y[_-1].setCell(f-1,v))}y[_].replaceCells(T,f,v);let A=0;for(let R=y.length-1;R>0&&(R>_||y[R].getTrimmedLength()===0);R--)A++;A>0&&(S.push(x+y.length-A),S.push(A)),x+=y.length-1}return S},a.reflowLargerCreateNewLayout=function(u,h){const f=[];let p=0,v=h[p],S=0;for(let x=0;x<u.length;x++)if(v===x){const g=h[++p];u.onDeleteEmitter.fire({index:x-S,amount:g}),x+=g-1,S+=g,v=h[++p]}else f.push(x);return{layout:f,countRemoved:S}},a.reflowLargerApplyNewLayout=function(u,h){const f=[];for(let p=0;p<h.length;p++)f.push(u.get(h[p]));for(let p=0;p<f.length;p++)u.set(p,f[p]);u.length=h.length},a.reflowSmallerGetNewLineLengths=function(u,h,f){const p=[],v=u.map(((b,y)=>c(u,y,h))).reduce(((b,y)=>b+y));let S=0,x=0,g=0;for(;g<v;){if(v-g<f){p.push(v-g);break}S+=f;const b=c(u,x,h);S>b&&(S-=b,x++);const y=u[x].getWidth(S-1)===2;y&&S--;const _=y?f-1:f;p.push(_),g+=_}return p},a.getWrappedLineTrimmedLength=c},5295:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const u=c(8460),h=c(844),f=c(9092);class p extends h.Disposable{constructor(S,x){super(),this._optionsService=S,this._bufferService=x,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(S,x){this._normal.resize(S,x),this._alt.resize(S,x),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}a.BufferSet=p},511:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const u=c(482),h=c(643),f=c(3734);class p extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const x=new p;return x.setFromCharData(S),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(S[h.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(S[h.CHAR_DATA_CHAR_INDEX].length===2){const g=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=g&&g<=56319){const b=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(g-55296)+b-56320+65536|S[h.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[h.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=S[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=p},643:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const u=c(8460),h=c(844);class f{get id(){return this._id}constructor(v){this.line=v,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,h.disposeArray)(this._disposables),this._disposables.length=0)}register(v){return this._disposables.push(v),v}}a.Marker=f,f._nextId=1},7116:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(l,a)=>{var c,u,h;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
33
|
+
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(c||(a.C0=c={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(u||(a.C1=u={})),(function(f){f.ST=`${c.ESC}\\`})(h||(a.C1_ESCAPED=h={}))},7399:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const u=c(2584),h={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(f,p,v,S){const x={type:0,cancel:!1,key:void 0},g=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:x.key=f.ctrlKey?"\b":u.C0.DEL,f.altKey&&(x.key=u.C0.ESC+x.key);break;case 9:if(f.shiftKey){x.key=u.C0.ESC+"[Z";break}x.key=u.C0.HT,x.cancel=!0;break;case 13:x.key=f.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,x.cancel=!0;break;case 27:x.key=u.C0.ESC,f.altKey&&(x.key=u.C0.ESC+u.C0.ESC),x.cancel=!0;break;case 37:if(f.metaKey)break;g?(x.key=u.C0.ESC+"[1;"+(g+1)+"D",x.key===u.C0.ESC+"[1;3D"&&(x.key=u.C0.ESC+(v?"b":"[1;5D"))):x.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(f.metaKey)break;g?(x.key=u.C0.ESC+"[1;"+(g+1)+"C",x.key===u.C0.ESC+"[1;3C"&&(x.key=u.C0.ESC+(v?"f":"[1;5C"))):x.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(f.metaKey)break;g?(x.key=u.C0.ESC+"[1;"+(g+1)+"A",v||x.key!==u.C0.ESC+"[1;3A"||(x.key=u.C0.ESC+"[1;5A")):x.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(f.metaKey)break;g?(x.key=u.C0.ESC+"[1;"+(g+1)+"B",v||x.key!==u.C0.ESC+"[1;3B"||(x.key=u.C0.ESC+"[1;5B")):x.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(x.key=u.C0.ESC+"[2~");break;case 46:x.key=g?u.C0.ESC+"[3;"+(g+1)+"~":u.C0.ESC+"[3~";break;case 36:x.key=g?u.C0.ESC+"[1;"+(g+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:x.key=g?u.C0.ESC+"[1;"+(g+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:f.shiftKey?x.type=2:f.ctrlKey?x.key=u.C0.ESC+"[5;"+(g+1)+"~":x.key=u.C0.ESC+"[5~";break;case 34:f.shiftKey?x.type=3:f.ctrlKey?x.key=u.C0.ESC+"[6;"+(g+1)+"~":x.key=u.C0.ESC+"[6~";break;case 112:x.key=g?u.C0.ESC+"[1;"+(g+1)+"P":u.C0.ESC+"OP";break;case 113:x.key=g?u.C0.ESC+"[1;"+(g+1)+"Q":u.C0.ESC+"OQ";break;case 114:x.key=g?u.C0.ESC+"[1;"+(g+1)+"R":u.C0.ESC+"OR";break;case 115:x.key=g?u.C0.ESC+"[1;"+(g+1)+"S":u.C0.ESC+"OS";break;case 116:x.key=g?u.C0.ESC+"[15;"+(g+1)+"~":u.C0.ESC+"[15~";break;case 117:x.key=g?u.C0.ESC+"[17;"+(g+1)+"~":u.C0.ESC+"[17~";break;case 118:x.key=g?u.C0.ESC+"[18;"+(g+1)+"~":u.C0.ESC+"[18~";break;case 119:x.key=g?u.C0.ESC+"[19;"+(g+1)+"~":u.C0.ESC+"[19~";break;case 120:x.key=g?u.C0.ESC+"[20;"+(g+1)+"~":u.C0.ESC+"[20~";break;case 121:x.key=g?u.C0.ESC+"[21;"+(g+1)+"~":u.C0.ESC+"[21~";break;case 122:x.key=g?u.C0.ESC+"[23;"+(g+1)+"~":u.C0.ESC+"[23~";break;case 123:x.key=g?u.C0.ESC+"[24;"+(g+1)+"~":u.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(v&&!S||!f.altKey||f.metaKey)!v||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?x.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(x.key=u.C0.US),f.key==="@"&&(x.key=u.C0.NUL)):f.keyCode===65&&(x.type=1);else{const b=h[f.keyCode],y=b?.[f.shiftKey?1:0];if(y)x.key=u.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const _=f.ctrlKey?f.keyCode-64:f.keyCode+32;let T=String.fromCharCode(_);f.shiftKey&&(T=T.toUpperCase()),x.key=u.C0.ESC+T}else if(f.keyCode===32)x.key=u.C0.ESC+(f.ctrlKey?u.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let _=f.code.slice(3,4);f.shiftKey||(_=_.toLowerCase()),x.key=u.C0.ESC+_,x.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?x.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?x.key=u.C0.NUL:f.keyCode>=51&&f.keyCode<=55?x.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?x.key=u.C0.DEL:f.keyCode===219?x.key=u.C0.ESC:f.keyCode===220?x.key=u.C0.FS:f.keyCode===221&&(x.key=u.C0.GS)}return x}},482:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,u=0,h=c.length){let f="";for(let p=u;p<h;++p){let v=c[p];v>65535?(v-=65536,f+=String.fromCharCode(55296+(v>>10))+String.fromCharCode(v%1024+56320)):f+=String.fromCharCode(v)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const h=c.length;if(!h)return 0;let f=0,p=0;if(this._interim){const v=c.charCodeAt(p++);56320<=v&&v<=57343?u[f++]=1024*(this._interim-55296)+v-56320+65536:(u[f++]=this._interim,u[f++]=v),this._interim=0}for(let v=p;v<h;++v){const S=c.charCodeAt(v);if(55296<=S&&S<=56319){if(++v>=h)return this._interim=S,f;const x=c.charCodeAt(v);56320<=x&&x<=57343?u[f++]=1024*(S-55296)+x-56320+65536:(u[f++]=S,u[f++]=x)}else S!==65279&&(u[f++]=S)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const h=c.length;if(!h)return 0;let f,p,v,S,x=0,g=0,b=0;if(this.interim[0]){let T=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let k,A=0;for(;(k=63&this.interim[++A])&&A<4;)E<<=6,E|=k;const R=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=R-A;for(;b<L;){if(b>=h)return 0;if(k=c[b++],(192&k)!=128){b--,T=!0;break}this.interim[A++]=k,E<<=6,E|=63&k}T||(R===2?E<128?b--:u[x++]=E:R===3?E<2048||E>=55296&&E<=57343||E===65279||(u[x++]=E):E<65536||E>1114111||(u[x++]=E)),this.interim.fill(0)}const y=h-4;let _=b;for(;_<h;){for(;!(!(_<y)||128&(f=c[_])||128&(p=c[_+1])||128&(v=c[_+2])||128&(S=c[_+3]));)u[x++]=f,u[x++]=p,u[x++]=v,u[x++]=S,_+=4;if(f=c[_++],f<128)u[x++]=f;else if((224&f)==192){if(_>=h)return this.interim[0]=f,x;if(p=c[_++],(192&p)!=128){_--;continue}if(g=(31&f)<<6|63&p,g<128){_--;continue}u[x++]=g}else if((240&f)==224){if(_>=h)return this.interim[0]=f,x;if(p=c[_++],(192&p)!=128){_--;continue}if(_>=h)return this.interim[0]=f,this.interim[1]=p,x;if(v=c[_++],(192&v)!=128){_--;continue}if(g=(15&f)<<12|(63&p)<<6|63&v,g<2048||g>=55296&&g<=57343||g===65279)continue;u[x++]=g}else if((248&f)==240){if(_>=h)return this.interim[0]=f,x;if(p=c[_++],(192&p)!=128){_--;continue}if(_>=h)return this.interim[0]=f,this.interim[1]=p,x;if(v=c[_++],(192&v)!=128){_--;continue}if(_>=h)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=v,x;if(S=c[_++],(192&S)!=128){_--;continue}if(g=(7&f)<<18|(63&p)<<12|(63&v)<<6|63&S,g<65536||g>1114111)continue;u[x++]=g}}return x}}},225:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const u=c(1480),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;a.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let v=0;v<h.length;++v)p.fill(0,h[v][0],h[v][1]+1)}}wcwidth(v){return v<32?0:v<127?1:v<65536?p[v]:(function(S,x){let g,b=0,y=x.length-1;if(S<x[0][0]||S>x[y][1])return!1;for(;y>=b;)if(g=b+y>>1,S>x[g][1])b=g+1;else{if(!(S<x[g][0]))return!0;y=g-1}return!1})(v,f)?0:v>=131072&&v<=196605||v>=196608&&v<=262141?2:1}charProperties(v,S){let x=this.wcwidth(v),g=x===0&&S!==0;if(g){const b=u.UnicodeService.extractWidth(S);b===0?g=!1:b>x&&(x=b)}return u.UnicodeService.createPropertyValue(0,x,g)}}},5981:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const u=c(8460),h=c(844);class f extends h.Disposable{constructor(v){super(),this._action=v,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(v,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const g=this._callbacks.shift();g&&g()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(v,S){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=v.length,this._writeBuffer.push(v),this._callbacks.push(S)}_innerWrite(v=0,S=!0){const x=v||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const g=this._writeBuffer[this._bufferOffset],b=this._action(g,S);if(b){const _=T=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,T))):this._innerWrite(x,T);return void b.catch((T=>(queueMicrotask((()=>{throw T})),Promise.resolve(!1)))).then(_)}const y=this._callbacks[this._bufferOffset];if(y&&y(),this._bufferOffset++,this._pendingData-=g.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=f},5941:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function h(f,p){const v=f.toString(16),S=v.length<2?"0"+v:v;switch(p){case 4:return v[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}a.parseColor=function(f){if(!f)return;let p=f.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const v=c.exec(p);if(v){const S=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/S*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/S*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/S*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const v=p.length/3,S=[0,0,0];for(let x=0;x<3;++x){const g=parseInt(p.slice(v*x,v*x+v),16);S[x]=v===1?g<<4:v===2?g:v===3?g>>4:g>>8}return S}},a.toRgbString=function(f,p=16){const[v,S,x]=f;return`rgb:${h(v,p)}/${h(S,p)}/${h(x,p)}`}},5770:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const u=c(482),h=c(8742),f=c(5770),p=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(S,x){this._handlers[S]===void 0&&(this._handlers[S]=[]);const g=this._handlers[S];return g.push(x),{dispose:()=>{const b=g.indexOf(x);b!==-1&&g.splice(b,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(S,x){if(this.reset(),this._ident=S,this._active=this._handlers[S]||p,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(S,x,g){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(S,x,g);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(S,x,g))}unhook(S,x=!0){if(this._active.length){let g=!1,b=this._active.length-1,y=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,g=x,y=this._stack.fallThrough,this._stack.paused=!1),!y&&g===!1){for(;b>=0&&(g=this._active[b].unhook(S),g!==!0);b--)if(g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,g;b--}for(;b>=0;b--)if(g=this._active[b].unhook(!1),g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,g}else this._handlerFb(this._ident,"UNHOOK",S);this._active=p,this._ident=0}};const v=new h.Params;v.addParam(0),a.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=v,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():v,this._data="",this._hitLimit=!1}put(S,x,g){this._hitLimit||(this._data+=(0,u.utf32ToString)(S,x,g),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let x=!1;if(this._hitLimit)x=!1;else if(S&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((g=>(this._params=v,this._data="",this._hitLimit=!1,g)));return this._params=v,this._data="",this._hitLimit=!1,x}}},2015:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const u=c(844),h=c(8742),f=c(6242),p=c(6351);class v{constructor(b){this.table=new Uint8Array(b)}setDefault(b,y){this.table.fill(b<<4|y)}add(b,y,_,T){this.table[y<<8|b]=_<<4|T}addMany(b,y,_,T){for(let E=0;E<b.length;E++)this.table[y<<8|b[E]]=_<<4|T}}a.TransitionTable=v;const S=160;a.VT500_TRANSITION_TABLE=(function(){const g=new v(4095),b=Array.apply(null,Array(256)).map(((A,R)=>R)),y=(A,R)=>b.slice(A,R),_=y(32,127),T=y(0,24);T.push(25),T.push.apply(T,y(28,32));const E=y(0,14);let k;for(k in g.setDefault(1,0),g.addMany(_,0,2,0),E)g.addMany([24,26,153,154],k,3,0),g.addMany(y(128,144),k,3,0),g.addMany(y(144,152),k,3,0),g.add(156,k,0,0),g.add(27,k,11,1),g.add(157,k,4,8),g.addMany([152,158,159],k,0,7),g.add(155,k,11,3),g.add(144,k,11,9);return g.addMany(T,0,3,0),g.addMany(T,1,3,1),g.add(127,1,0,1),g.addMany(T,8,0,8),g.addMany(T,3,3,3),g.add(127,3,0,3),g.addMany(T,4,3,4),g.add(127,4,0,4),g.addMany(T,6,3,6),g.addMany(T,5,3,5),g.add(127,5,0,5),g.addMany(T,2,3,2),g.add(127,2,0,2),g.add(93,1,4,8),g.addMany(_,8,5,8),g.add(127,8,5,8),g.addMany([156,27,24,26,7],8,6,0),g.addMany(y(28,32),8,0,8),g.addMany([88,94,95],1,0,7),g.addMany(_,7,0,7),g.addMany(T,7,0,7),g.add(156,7,0,0),g.add(127,7,0,7),g.add(91,1,11,3),g.addMany(y(64,127),3,7,0),g.addMany(y(48,60),3,8,4),g.addMany([60,61,62,63],3,9,4),g.addMany(y(48,60),4,8,4),g.addMany(y(64,127),4,7,0),g.addMany([60,61,62,63],4,0,6),g.addMany(y(32,64),6,0,6),g.add(127,6,0,6),g.addMany(y(64,127),6,0,0),g.addMany(y(32,48),3,9,5),g.addMany(y(32,48),5,9,5),g.addMany(y(48,64),5,0,6),g.addMany(y(64,127),5,7,0),g.addMany(y(32,48),4,9,5),g.addMany(y(32,48),1,9,2),g.addMany(y(32,48),2,9,2),g.addMany(y(48,127),2,10,0),g.addMany(y(48,80),1,10,0),g.addMany(y(81,88),1,10,0),g.addMany([89,90,92],1,10,0),g.addMany(y(96,127),1,10,0),g.add(80,1,11,9),g.addMany(T,9,0,9),g.add(127,9,0,9),g.addMany(y(28,32),9,0,9),g.addMany(y(32,48),9,9,12),g.addMany(y(48,60),9,8,10),g.addMany([60,61,62,63],9,9,10),g.addMany(T,11,0,11),g.addMany(y(32,128),11,0,11),g.addMany(y(28,32),11,0,11),g.addMany(T,10,0,10),g.add(127,10,0,10),g.addMany(y(28,32),10,0,10),g.addMany(y(48,60),10,8,10),g.addMany([60,61,62,63],10,0,11),g.addMany(y(32,48),10,9,12),g.addMany(T,12,0,12),g.add(127,12,0,12),g.addMany(y(28,32),12,0,12),g.addMany(y(32,48),12,9,12),g.addMany(y(48,64),12,0,11),g.addMany(y(64,127),12,12,13),g.addMany(y(64,127),10,12,13),g.addMany(y(64,127),9,12,13),g.addMany(T,13,13,13),g.addMany(_,13,13,13),g.add(127,13,0,13),g.addMany([27,156,24,26],13,14,0),g.add(S,0,2,0),g.add(S,8,5,8),g.add(S,6,0,6),g.add(S,11,0,11),g.add(S,13,13,13),g})();class x extends u.Disposable{constructor(b=a.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,_,T)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,_)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,y=[64,126]){let _=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(_=b.prefix.charCodeAt(0),_&&60>_||_>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<b.intermediates.length;++E){const k=b.intermediates.charCodeAt(E);if(32>k||k>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");_<<=8,_|=k}}if(b.final.length!==1)throw new Error("final must be a single byte");const T=b.final.charCodeAt(0);if(y[0]>T||T>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return _<<=8,_|=T,_}identToString(b){const y=[];for(;b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,y){const _=this._identifier(b,[48,126]);this._escHandlers[_]===void 0&&(this._escHandlers[_]=[]);const T=this._escHandlers[_];return T.push(y),{dispose:()=>{const E=T.indexOf(y);E!==-1&&T.splice(E,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,y){this._executeHandlers[b.charCodeAt(0)]=y}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,y){const _=this._identifier(b);this._csiHandlers[_]===void 0&&(this._csiHandlers[_]=[]);const T=this._csiHandlers[_];return T.push(y),{dispose:()=>{const E=T.indexOf(y);E!==-1&&T.splice(E,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,y){return this._oscParser.registerHandler(b,y)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,y,_,T,E){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=_,this._parseStack.transition=T,this._parseStack.chunkPos=E}parse(b,y,_){let T,E=0,k=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(_===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const R=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(_===!1&&L>-1){for(;L>=0&&(T=R[L](this._params),T!==!0);L--)if(T instanceof Promise)return this._parseStack.handlerPos=L,T}this._parseStack.handlers=[];break;case 4:if(_===!1&&L>-1){for(;L>=0&&(T=R[L](),T!==!0);L--)if(T instanceof Promise)return this._parseStack.handlerPos=L,T}this._parseStack.handlers=[];break;case 6:if(E=b[this._parseStack.chunkPos],T=this._dcsParser.unhook(E!==24&&E!==26,_),T)return T;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=b[this._parseStack.chunkPos],T=this._oscParser.end(E!==24&&E!==26,_),T)return T;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let R=A;R<y;++R){switch(E=b[R],k=this._transitions.table[this.currentState<<8|(E<160?E:S)],k>>4){case 2:for(let N=R+1;;++N){if(N>=y||(E=b[N])<32||E>126&&E<S){this._printHandler(b,R,N),R=N-1;break}if(++N>=y||(E=b[N])<32||E>126&&E<S){this._printHandler(b,R,N),R=N-1;break}if(++N>=y||(E=b[N])<32||E>126&&E<S){this._printHandler(b,R,N),R=N-1;break}if(++N>=y||(E=b[N])<32||E>126&&E<S){this._printHandler(b,R,N),R=N-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:R,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|E];let z=L?L.length-1:-1;for(;z>=0&&(T=L[z](this._params),T!==!0);z--)if(T instanceof Promise)return this._preserveStack(3,L,z,k,R),T;z<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++R<y&&(E=b[R])>47&&E<60);R--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const D=this._escHandlers[this._collect<<8|E];let $=D?D.length-1:-1;for(;$>=0&&(T=D[$](),T!==!0);$--)if(T instanceof Promise)return this._preserveStack(4,D,$,k,R),T;$<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let N=R+1;;++N)if(N>=y||(E=b[N])===24||E===26||E===27||E>127&&E<S){this._dcsParser.put(b,R,N),R=N-1;break}break;case 14:if(T=this._dcsParser.unhook(E!==24&&E!==26),T)return this._preserveStack(6,[],0,k,R),T;E===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let N=R+1;;N++)if(N>=y||(E=b[N])<32||E>127&&E<S){this._oscParser.put(b,R,N),R=N-1;break}break;case 6:if(T=this._oscParser.end(E!==24&&E!==26),T)return this._preserveStack(5,[],0,k,R),T;E===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&k}}}a.EscapeSequenceParser=x},6242:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const u=c(5770),h=c(482),f=[];a.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,v){this._handlers[p]===void 0&&(this._handlers[p]=[]);const S=this._handlers[p];return S.push(v),{dispose:()=>{const x=S.indexOf(v);x!==-1&&S.splice(x,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,v,S){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(p,v,S);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(p,v,S))}start(){this.reset(),this._state=1}put(p,v,S){if(this._state!==3){if(this._state===1)for(;v<S;){const x=p[v++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&S-v>0&&this._put(p,v,S)}}end(p,v=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,x=this._active.length-1,g=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,S=v,g=this._stack.fallThrough,this._stack.paused=!1),!g&&S===!1){for(;x>=0&&(S=this._active[x].end(p),S!==!0);x--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,S;x--}for(;x>=0;x--)if(S=this._active[x].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",p);this._active=f,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,v,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(p,v,S),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let v=!1;if(this._hitLimit)v=!1;else if(p&&(v=this._handler(this._data),v instanceof Promise))return v.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,v}}},8742:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class u{static fromArray(f){const p=new u;if(!f.length)return p;for(let v=Array.isArray(f[0])?1:0;v<f.length;++v){const S=f[v];if(Array.isArray(S))for(let x=0;x<S.length;++x)p.addSubParam(S[x]);else p.addParam(S)}return p}constructor(f=32,p=32){if(this.maxLength=f,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let p=0;p<this.length;++p){f.push(this.params[p]);const v=this._subParamsIdx[p]>>8,S=255&this._subParamsIdx[p];S-v>0&&f.push(Array.prototype.slice.call(this._subParams,v,S))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>c?c:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>c?c:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const p=this._subParamsIdx[f]>>8,v=255&this._subParamsIdx[f];return v-p>0?this._subParams.subarray(p,v):null}getSubParamsAll(){const f={};for(let p=0;p<this.length;++p){const v=this._subParamsIdx[p]>>8,S=255&this._subParamsIdx[p];S-v>0&&(f[p]=this._subParams.slice(v,S))}return f}addDigit(f){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const v=this._digitIsSub?this._subParams:this.params,S=v[p-1];v[p-1]=~S?Math.min(10*S+f,c):f}}a.Params=u},5741:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let h=0;h<this._addons.length;h++)if(this._addons[h]===c){u=h;break}if(u===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(u,1)}}},8771:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const u=c(3785),h=c(511);a.BufferApiView=class{constructor(f,p){this._buffer=f,this.type=p}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const p=this._buffer.lines.get(f);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new h.CellData}}},3785:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const u=c(511);a.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,f){if(!(h<0||h>=this._line.length))return f?(this._line.loadCell(h,f),f):this._line.loadCell(h,new u.CellData)}translateToString(h,f,p){return this._line.translateToString(h,f,p)}}},8285:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const u=c(8771),h=c(8460),f=c(844);class p extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new h.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=p},7975:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(h=>u(h.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((h,f)=>u(h,f.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(l,a,c){var u=this&&this.__decorate||function(g,b,y,_){var T,E=arguments.length,k=E<3?b:_===null?_=Object.getOwnPropertyDescriptor(b,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,y,_);else for(var A=g.length-1;A>=0;A--)(T=g[A])&&(k=(E<3?T(k):E>3?T(b,y,k):T(b,y))||k);return E>3&&k&&Object.defineProperty(b,y,k),k},h=this&&this.__param||function(g,b){return function(y,_){b(y,_,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const f=c(8460),p=c(844),v=c(5295),S=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(g){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(g.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(g.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new v.BufferSet(g,this))}resize(g,b){this.cols=g,this.rows=b,this.buffers.resize(g,b),this._onResize.fire({cols:g,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(g,b=!1){const y=this.buffer;let _;_=this._cachedBlankLine,_&&_.length===this.cols&&_.getFg(0)===g.fg&&_.getBg(0)===g.bg||(_=y.getBlankLine(g,b),this._cachedBlankLine=_),_.isWrapped=b;const T=y.ybase+y.scrollTop,E=y.ybase+y.scrollBottom;if(y.scrollTop===0){const k=y.lines.isFull;E===y.lines.length-1?k?y.lines.recycle().copyFrom(_):y.lines.push(_.clone()):y.lines.splice(E+1,0,_.clone()),k?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const k=E-T+1;y.lines.shiftElements(T+1,k-1,-1),y.lines.set(E,_.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(g,b,y){const _=this.buffer;if(g<0){if(_.ydisp===0)return;this.isUserScrolling=!0}else g+_.ydisp>=_.ybase&&(this.isUserScrolling=!1);const T=_.ydisp;_.ydisp=Math.max(Math.min(_.ydisp+g,_.ybase),0),T!==_.ydisp&&(b||this._onScroll.fire(_.ydisp))}};a.BufferService=x=u([h(0,S.IOptionsService)],x)},7994:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(l,a,c){var u=this&&this.__decorate||function(_,T,E,k){var A,R=arguments.length,L=R<3?T:k===null?k=Object.getOwnPropertyDescriptor(T,E):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,T,E,k);else for(var z=_.length-1;z>=0;z--)(A=_[z])&&(L=(R<3?A(L):R>3?A(T,E,L):A(T,E))||L);return R>3&&L&&Object.defineProperty(T,E,L),L},h=this&&this.__param||function(_,T){return function(E,k){T(E,k,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const f=c(2585),p=c(8460),v=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:_=>_.button!==4&&_.action===1&&(_.ctrl=!1,_.alt=!1,_.shift=!1,!0)},VT200:{events:19,restrict:_=>_.action!==32},DRAG:{events:23,restrict:_=>_.action!==32||_.button!==3},ANY:{events:31,restrict:_=>!0}};function x(_,T){let E=(_.ctrl?16:0)|(_.shift?4:0)|(_.alt?8:0);return _.button===4?(E|=64,E|=_.action):(E|=3&_.button,4&_.button&&(E|=64),8&_.button&&(E|=128),_.action===32?E|=32:_.action!==0||T||(E|=3)),E}const g=String.fromCharCode,b={DEFAULT:_=>{const T=[x(_,!1)+32,_.col+32,_.row+32];return T[0]>255||T[1]>255||T[2]>255?"":`\x1B[M${g(T[0])}${g(T[1])}${g(T[2])}`},SGR:_=>{const T=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${x(_,!0)};${_.col};${_.row}${T}`},SGR_PIXELS:_=>{const T=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${x(_,!0)};${_.x};${_.y}${T}`}};let y=a.CoreMouseService=class extends v.Disposable{constructor(_,T){super(),this._bufferService=_,this._coreService=T,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(S))this.addProtocol(E,S[E]);for(const E of Object.keys(b))this.addEncoding(E,b[E]);this.reset()}addProtocol(_,T){this._protocols[_]=T}addEncoding(_,T){this._encodings[_]=T}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(_){if(!this._protocols[_])throw new Error(`unknown protocol "${_}"`);this._activeProtocol=_,this._onProtocolChange.fire(this._protocols[_].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(_){if(!this._encodings[_])throw new Error(`unknown encoding "${_}"`);this._activeEncoding=_}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(_){if(_.col<0||_.col>=this._bufferService.cols||_.row<0||_.row>=this._bufferService.rows||_.button===4&&_.action===32||_.button===3&&_.action!==32||_.button!==4&&(_.action===2||_.action===3)||(_.col++,_.row++,_.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,_,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(_))return!1;const T=this._encodings[this._activeEncoding](_);return T&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(T):this._coreService.triggerDataEvent(T,!0)),this._lastEvent=_,!0}explainEvents(_){return{down:!!(1&_),up:!!(2&_),drag:!!(4&_),move:!!(8&_),wheel:!!(16&_)}}_equalEvents(_,T,E){if(E){if(_.x!==T.x||_.y!==T.y)return!1}else if(_.col!==T.col||_.row!==T.row)return!1;return _.button===T.button&&_.action===T.action&&_.ctrl===T.ctrl&&_.alt===T.alt&&_.shift===T.shift}};a.CoreMouseService=y=u([h(0,f.IBufferService),h(1,f.ICoreService)],y)},6975:function(l,a,c){var u=this&&this.__decorate||function(y,_,T,E){var k,A=arguments.length,R=A<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,T,E);else for(var L=y.length-1;L>=0;L--)(k=y[L])&&(R=(A<3?k(R):A>3?k(_,T,R):k(_,T))||R);return A>3&&R&&Object.defineProperty(_,T,R),R},h=this&&this.__param||function(y,_){return function(T,E){_(T,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const f=c(1439),p=c(8460),v=c(844),S=c(2585),x=Object.freeze({insertMode:!1}),g=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=a.CoreService=class extends v.Disposable{constructor(y,_,T){super(),this._bufferService=y,this._logService=_,this._optionsService=T,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(x),this.decPrivateModes=(0,f.clone)(g)}reset(){this.modes=(0,f.clone)(x),this.decPrivateModes=(0,f.clone)(g)}triggerDataEvent(y,_=!1){if(this._optionsService.rawOptions.disableStdin)return;const T=this._bufferService.buffer;_&&this._optionsService.rawOptions.scrollOnUserInput&&T.ybase!==T.ydisp&&this._onRequestScrollToBottom.fire(),_&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((_=>_.charCodeAt(0))))),this._onBinary.fire(y))}};a.CoreService=b=u([h(0,S.IBufferService),h(1,S.ILogService),h(2,S.IOptionsService)],b)},9074:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const u=c(8055),h=c(8460),f=c(844),p=c(6106);let v=0,S=0;class x extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((y=>y?.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const _=new g(y);if(_){const T=_.marker.onDispose((()=>_.dispose()));_.onDispose((()=>{_&&(this._decorations.delete(_)&&this._onDecorationRemoved.fire(_),T.dispose())})),this._decorations.insert(_),this._onDecorationRegistered.fire(_)}return _}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,_,T){let E=0,k=0;for(const A of this._decorations.getKeyIterator(_))E=A.options.x??0,k=E+(A.options.width??1),y>=E&&y<k&&(!T||(A.options.layer??"bottom")===T)&&(yield A)}forEachDecorationAtCell(y,_,T,E){this._decorations.forEachByKey(_,(k=>{v=k.options.x??0,S=v+(k.options.width??1),y>=v&&y<S&&(!T||(k.options.layer??"bottom")===T)&&E(k)}))}}a.DecorationService=x;class g extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=u.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=u.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(y){super(),this.options=y,this.onRenderEmitter=this.register(new h.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=y.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const u=c(2585),h=c(8343);class f{constructor(...v){this._entries=new Map;for(const[S,x]of v)this.set(S,x)}set(v,S){const x=this._entries.get(v);return this._entries.set(v,S),x}forEach(v){for(const[S,x]of this._entries.entries())v(S,x)}has(v){return this._entries.has(v)}get(v){return this._entries.get(v)}}a.ServiceCollection=f,a.InstantiationService=class{constructor(){this._services=new f,this._services.set(u.IInstantiationService,this)}setService(p,v){this._services.set(p,v)}getService(p){return this._services.get(p)}createInstance(p,...v){const S=(0,h.getServiceDependencies)(p).sort(((b,y)=>b.index-y.index)),x=[];for(const b of S){const y=this._services.get(b.id);if(!y)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);x.push(y)}const g=S.length>0?S[0].index:v.length;if(v.length!==g)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${g+1} conflicts with ${v.length} static arguments`);return new p(...v,...x)}}},7866:function(l,a,c){var u=this&&this.__decorate||function(g,b,y,_){var T,E=arguments.length,k=E<3?b:_===null?_=Object.getOwnPropertyDescriptor(b,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,y,_);else for(var A=g.length-1;A>=0;A--)(T=g[A])&&(k=(E<3?T(k):E>3?T(b,y,k):T(b,y))||k);return E>3&&k&&Object.defineProperty(b,y,k),k},h=this&&this.__param||function(g,b){return function(y,_){b(y,_,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=c(844),p=c(2585),v={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let S,x=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(g){super(),this._optionsService=g,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=v[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(g){for(let b=0;b<g.length;b++)typeof g[b]=="function"&&(g[b]=g[b]())}_log(g,b,y){this._evalLazyOptionalParams(y),g.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...y)}trace(g,...b){this._logLevel<=p.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,g,b)}debug(g,...b){this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,g,b)}info(g,...b){this._logLevel<=p.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,g,b)}warn(g,...b){this._logLevel<=p.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,g,b)}error(g,...b){this._logLevel<=p.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,g,b)}};a.LogService=x=u([h(0,p.IOptionsService)],x),a.setTraceLogger=function(g){S=g},a.traceCall=function(g,b,y){if(typeof y.value!="function")throw new Error("not supported");const _=y.value;y.value=function(...T){if(S.logLevel!==p.LogLevelEnum.TRACE)return _.apply(this,T);S.trace(`GlyphRenderer#${_.name}(${T.map((k=>JSON.stringify(k))).join(", ")})`);const E=_.apply(this,T);return S.trace(`GlyphRenderer#${_.name} return`,E),E}}},7302:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const u=c(8460),h=c(844),f=c(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class v extends h.Disposable{constructor(x){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const g={...a.DEFAULT_OPTIONS};for(const b in x)if(b in g)try{const y=x[b];g[b]=this._sanitizeAndValidateOption(b,y)}catch(y){console.error(y)}this.rawOptions=g,this.options={...g},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,g){return this.onOptionChange((b=>{b===x&&g(this.rawOptions[x])}))}onMultipleOptionChange(x,g){return this.onOptionChange((b=>{x.indexOf(b)!==-1&&g()}))}_setupOptions(){const x=b=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},g=(b,y)=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);y=this._sanitizeAndValidateOption(b,y),this.rawOptions[b]!==y&&(this.rawOptions[b]=y,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const y={get:x.bind(this,b),set:g.bind(this,b)};Object.defineProperty(this.options,b,y)}}_sanitizeAndValidateOption(x,g){switch(x){case"cursorStyle":if(g||(g=a.DEFAULT_OPTIONS[x]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(g))throw new Error(`"${g}" is not a valid value for ${x}`);break;case"wordSeparator":g||(g=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=p.includes(g)?g:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(`${x} cannot be less than 1, value: ${g}`);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${g}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${g}`);break;case"rows":case"cols":if(!g&&g!==0)throw new Error(`${x} must be numeric, value: ${g}`);break;case"windowsPty":g=g??{}}return g}}a.OptionsService=v},2660:function(l,a,c){var u=this&&this.__decorate||function(v,S,x,g){var b,y=arguments.length,_=y<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,x):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(v,S,x,g);else for(var T=v.length-1;T>=0;T--)(b=v[T])&&(_=(y<3?b(_):y>3?b(S,x,_):b(S,x))||_);return y>3&&_&&Object.defineProperty(S,x,_),_},h=this&&this.__param||function(v,S){return function(x,g){S(x,g,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const f=c(2585);let p=a.OscLinkService=class{constructor(v){this._bufferService=v,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(v){const S=this._bufferService.buffer;if(v.id===void 0){const T=S.addMarker(S.ybase+S.y),E={data:v,id:this._nextId++,lines:[T]};return T.onDispose((()=>this._removeMarkerFromLink(E,T))),this._dataByLinkId.set(E.id,E),E.id}const x=v,g=this._getEntryIdKey(x),b=this._entriesWithId.get(g);if(b)return this.addLineToLink(b.id,S.ybase+S.y),b.id;const y=S.addMarker(S.ybase+S.y),_={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(_,y))),this._entriesWithId.set(_.key,_),this._dataByLinkId.set(_.id,_),_.id}addLineToLink(v,S){const x=this._dataByLinkId.get(v);if(x&&x.lines.every((g=>g.line!==S))){const g=this._bufferService.buffer.addMarker(S);x.lines.push(g),g.onDispose((()=>this._removeMarkerFromLink(x,g)))}}getLinkData(v){return this._dataByLinkId.get(v)?.data}_getEntryIdKey(v){return`${v.id};;${v.uri}`}_removeMarkerFromLink(v,S){const x=v.lines.indexOf(S);x!==-1&&(v.lines.splice(x,1),v.lines.length===0&&(v.data.id!==void 0&&this._entriesWithId.delete(v.key),this._dataByLinkId.delete(v.id)))}};a.OscLinkService=p=u([h(0,f.IBufferService)],p)},8343:(l,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",u="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(h){return h[u]||[]},a.createDecorator=function(h){if(a.serviceRegistry.has(h))return a.serviceRegistry.get(h);const f=function(p,v,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,g,b){g[c]===g?g[u].push({id:x,index:b}):(g[u]=[{id:x,index:b}],g[c]=g)})(f,p,S)};return f.toString=()=>h,a.serviceRegistry.set(h,f),f}},2585:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const u=c(8343);var h;a.IBufferService=(0,u.createDecorator)("BufferService"),a.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),a.ICoreService=(0,u.createDecorator)("CoreService"),a.ICharsetService=(0,u.createDecorator)("CharsetService"),a.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(h||(a.LogLevelEnum=h={})),a.ILogService=(0,u.createDecorator)("LogService"),a.IOptionsService=(0,u.createDecorator)("OptionsService"),a.IOscLinkService=(0,u.createDecorator)("OscLinkService"),a.IUnicodeService=(0,u.createDecorator)("UnicodeService"),a.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(l,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const u=c(8460),h=c(225);class f{static extractShouldJoin(v){return(1&v)!=0}static extractWidth(v){return v>>1&3}static extractCharKind(v){return v>>3}static createPropertyValue(v,S,x=!1){return(16777215&v)<<3|(3&S)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const v=new h.UnicodeV6;this.register(v),this._active=v.version,this._activeProvider=v}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(v){if(!this._providers[v])throw new Error(`unknown Unicode version "${v}"`);this._active=v,this._activeProvider=this._providers[v],this._onChange.fire(v)}register(v){this._providers[v.version]=v}wcwidth(v){return this._activeProvider.wcwidth(v)}getStringCellWidth(v){let S=0,x=0;const g=v.length;for(let b=0;b<g;++b){let y=v.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=g)return S+this.wcwidth(y);const E=v.charCodeAt(b);56320<=E&&E<=57343?y=1024*(y-55296)+E-56320+65536:S+=this.wcwidth(E)}const _=this.charProperties(y,x);let T=f.extractWidth(_);f.extractShouldJoin(_)&&(T-=f.extractWidth(x)),S+=T,x=_}return S}charProperties(v,S){return this._activeProvider.charProperties(v,S)}}a.UnicodeService=f}},r={};function i(l){var a=r[l];if(a!==void 0)return a.exports;var c=r[l]={exports:{}};return n[l].call(c.exports,c,c.exports,i),c.exports}var s={};return(()=>{var l=s;Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const a=i(9042),c=i(3236),u=i(844),h=i(5741),f=i(8285),p=i(7975),v=i(7090),S=["cols","rows"];class x extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const y=T=>this._core.options[T],_=(T,E)=>{this._checkReadonlyOptions(T),this._core.options[T]=E};for(const T in this._core.options){const E={get:y.bind(this,T),set:_.bind(this,T)};Object.defineProperty(this._publicOptions,T,E)}}_checkReadonlyOptions(b){if(S.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new v.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const y in b)this._publicOptions[y]=b[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,y=!0){this._core.input(b,y)}resize(b,y){this._verifyIntegers(b,y),this._core.resize(b,y)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,y,_){this._verifyIntegers(b,y,_),this._core.select(b,y,_)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,y){this._verifyIntegers(b,y),this._core.selectLines(b,y)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,y){this._core.write(b,y)}writeln(b,y){this._core.write(b),this._core.write(`\r
|
|
34
|
+
`,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return a}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}l.Terminal=x})(),s})()))})(fx)),fx.exports}var Fz=Xie(),hx={exports:{}},fj;function Qie(){return fj||(fj=1,(function(e,t){(function(n,r){e.exports=r()})(self,(()=>(()=>{var n={};return(()=>{var r=n;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const s=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(s._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,s=i._renderService.dimensions;if(s.css.cell.width===0||s.css.cell.height===0)return;const l=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),u=Math.max(0,parseInt(a.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),f=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-l;return{cols:Math.max(2,Math.floor(p/s.css.cell.width)),rows:Math.max(1,Math.floor(f/s.css.cell.height))}}}})(),n})()))})(hx)),hx.exports}var Uz=Qie(),px={exports:{}},hj;function Zie(){return hj||(hj=1,(function(e,t){(function(n,r){e.exports=r()})(self,(()=>(()=>{var n={6:(l,a)=>{function c(h){try{const f=new URL(h),p=f.password&&f.username?`${f.protocol}//${f.username}:${f.password}@${f.host}`:f.username?`${f.protocol}//${f.username}@${f.host}`:`${f.protocol}//${f.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(h,f,p,v={}){this._terminal=h,this._regex=f,this._handler=p,this._options=v}provideLinks(h,f){const p=u.computeLink(h,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(h){return h.map((f=>(f.leave=this._options.leave,f.hover=(p,v)=>{if(this._options.hover){const{range:S}=f;this._options.hover(p,v,S)}},f)))}};class u{static computeLink(f,p,v,S){const x=new RegExp(p.source,(p.flags||"")+"g"),[g,b]=u._getWindowedLineStrings(f-1,v),y=g.join("");let _;const T=[];for(;_=x.exec(y);){const E=_[0];if(!c(E))continue;const[k,A]=u._mapStrIdx(v,b,0,_.index),[R,L]=u._mapStrIdx(v,k,A,E.length);if(k===-1||A===-1||R===-1||L===-1)continue;const z={start:{x:A+1,y:k+1},end:{x:L,y:R+1}};T.push({range:z,text:E,activate:S})}return T}static _getWindowedLineStrings(f,p){let v,S=f,x=f,g=0,b="";const y=[];if(v=p.buffer.active.getLine(f)){const _=v.translateToString(!0);if(v.isWrapped&&_[0]!==" "){for(g=0;(v=p.buffer.active.getLine(--S))&&g<2048&&(b=v.translateToString(!0),g+=b.length,y.push(b),v.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(_),g=0;(v=p.buffer.active.getLine(++x))&&v.isWrapped&&g<2048&&(b=v.translateToString(!0),g+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,S]}static _mapStrIdx(f,p,v,S){const x=f.buffer.active,g=x.getNullCell();let b=v;for(;S;){const y=x.getLine(p);if(!y)return[-1,-1];for(let _=b;_<y.length;++_){y.getCell(_,g);const T=g.getChars();if(g.getWidth()&&(S-=T.length||1,_===y.length-1&&T==="")){const E=x.getLine(p+1);E&&E.isWrapped&&(E.getCell(0,g),g.getWidth()===2&&(S+=1))}if(S<0)return[p,_]}p++,b=0}return[p,b]}}a.LinkComputer=u}},r={};function i(l){var a=r[l];if(a!==void 0)return a.exports;var c=r[l]={exports:{}};return n[l](c,c.exports,i),c.exports}var s={};return(()=>{var l=s;Object.defineProperty(l,"__esModule",{value:!0}),l.WebLinksAddon=void 0;const a=i(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,f){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}l.WebLinksAddon=class{constructor(h=u,f={}){this._handler=h,this._options=f}activate(h){this._terminal=h;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){this._linkProvider?.dispose()}}})(),s})()))})(px)),px.exports}var Vz=Zie();function $b(){const[e,t]=O.useState(!1);return O.useEffect(()=>{const n=window.matchMedia("(max-width: 639px)");t(n.matches);const r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const Jie=[{label:"Esc",icon:Cs,data:"\x1B"},{label:"Up",icon:uk,data:"\x1B[A"},{label:"Down",icon:xb,data:"\x1B[B"},{label:"Left",icon:J9,data:"\x1B[D"},{label:"Right",icon:Sb,data:"\x1B[C"},{label:"Enter",icon:null,data:"\r"}];function lO({onSend:e}){return $b()?w.jsx("div",{className:"flex shrink-0 items-center justify-center gap-2 border-t border-border bg-card px-3 py-2",children:Jie.map(n=>w.jsxs(ze,{variant:"outline",className:"h-11 min-w-11 touch-manipulation",onClick:()=>e(n.data),children:[n.icon?w.jsx(be,{icon:n.icon,size:20,strokeWidth:2}):w.jsx("span",{className:"text-xs font-medium",children:n.label}),w.jsx("span",{className:"sr-only",children:n.label})]},n.label))}):null}function ese({className:e,onReady:t,onResize:n,onContainerReady:r,terminalId:i,setupImagePaste:s,onSend:l,onFocus:a}){const c=O.useRef(null),u=O.useRef(null),h=O.useRef(null),f=O.useRef(n),p=O.useRef(a),{setTerminalFocused:v}=nO();O.useEffect(()=>{f.current=n},[n]),O.useEffect(()=>{p.current=a},[a]);const S=O.useCallback(()=>{if(!h.current||!u.current)return;h.current.fit();const{cols:g,rows:b}=u.current;f.current?.(g,b)},[]);O.useEffect(()=>{if(!c.current||u.current)return;const g=new Fz.Terminal({cursorBlink:!0,fontSize:13,fontFamily:"JetBrains Mono Variable, Menlo, Monaco, monospace",lineHeight:1.2,theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#e4e4e7",cursorAccent:"#0a0a0a",selectionBackground:"#3f3f46",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"}}),b=new Uz.FitAddon,y=new Vz.WebLinksAddon;g.loadAddon(b),g.loadAddon(y),g.open(c.current),u.current=g,h.current=b,requestAnimationFrame(()=>{S(),t?.(g),c.current&&r?.(c.current)});const _=()=>{v(!0),p.current?.()},T=()=>v(!1);g.textarea&&(g.textarea.addEventListener("focus",_),g.textarea.addEventListener("blur",T));const E=setTimeout(()=>{S(),g.refresh(0,g.rows-1)},100),k=()=>{requestAnimationFrame(S)};window.addEventListener("resize",k);const A=()=>{document.visibilityState==="visible"&&requestAnimationFrame(()=>{S(),g.refresh(0,g.rows-1)})};document.addEventListener("visibilitychange",A);const R=new ResizeObserver(k);R.observe(c.current);const L=new IntersectionObserver(z=>{z[0]?.isIntersecting&&requestAnimationFrame(()=>{S(),g.refresh(0,g.rows-1)})},{threshold:.1});return L.observe(c.current),()=>{clearTimeout(E),window.removeEventListener("resize",k),document.removeEventListener("visibilitychange",A),R.disconnect(),L.disconnect(),g.textarea&&(g.textarea.removeEventListener("focus",_),g.textarea.removeEventListener("blur",T)),v(!1),g.dispose(),u.current=null,h.current=null}},[S,t,r,v]),O.useEffect(()=>!c.current||!i||!s?void 0:s(c.current,i),[i,s]);const x=O.useCallback(()=>{u.current?.scrollToBottom()},[]);return w.jsxs("div",{className:"flex h-full w-full max-w-full flex-col",children:[w.jsxs("div",{className:"relative min-h-0 flex-1",children:[w.jsx("div",{ref:c,className:Be("h-full w-full max-w-full overflow-hidden bg-[#0a0a0a] p-2",e)}),w.jsx("button",{onClick:x,className:"absolute top-2 right-5 p-1 text-white/50 hover:text-white/80 transition-colors",children:w.jsx(be,{icon:Z9,size:20,strokeWidth:2})})]}),l&&w.jsx(lO,{onSend:l})]})}function tse({name:e,status:t,exitCode:n,className:r,onRename:i}){const[s,l]=O.useState(!1),[a,c]=O.useState(e),u=O.useRef(null);O.useEffect(()=>{s&&u.current&&(u.current.focus(),u.current.select())},[s]);const h=()=>{i&&(c(e),l(!0))},f=()=>{const v=a.trim();v&&v!==e&&i&&i(v),l(!1)},p=v=>{v.key==="Enter"?f():v.key==="Escape"&&l(!1)};return w.jsxs("div",{className:Be("flex h-6 items-center gap-2 border-b border-border bg-card px-2 text-xs",r),children:[w.jsx("span",{className:Be("h-2 w-2 shrink-0 rounded-full",{"bg-green-500":t==="running","bg-zinc-500":t==="exited"&&n===0,"bg-red-500":t==="exited"&&n!==0,"bg-yellow-500":t==="error"})}),s?w.jsx("input",{ref:u,type:"text",value:a,onChange:v=>c(v.target.value),onBlur:f,onKeyDown:p,className:"h-4 w-24 rounded border border-border bg-background px-1 text-xs font-medium text-foreground outline-none focus:border-primary"}):w.jsx("span",{className:Be("font-medium text-foreground",i&&"cursor-pointer hover:text-primary"),onDoubleClick:h,title:i?"Double-click to rename":void 0,children:e}),t==="exited"&&n!==void 0&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"ml-auto text-muted-foreground",children:"·"}),w.jsxs("span",{className:Be({"text-muted-foreground":n===0,"text-red-400":n!==0}),children:["exit ",n]})]})]})}function qz({...e}){return w.jsx(One,{"data-slot":"dropdown-menu",...e})}function Wz({...e}){return w.jsx(Ane,{"data-slot":"dropdown-menu-trigger",...e})}function Gz({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...s}){return w.jsx(gne,{children:w.jsx(vne,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:w.jsx(pne,{"data-slot":"dropdown-menu-content",className:Be("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden",i),...s})})})}function mx({className:e,inset:t,variant:n="default",...r}){return w.jsx(fne,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Be("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r})}function nse({...e}){return w.jsx(bne,{"data-slot":"dropdown-menu-radio-group",...e})}function rse({className:e,children:t,...n}){return w.jsxs(xne,{"data-slot":"dropdown-menu-radio-item",className:Be("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n,children:[w.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none","data-slot":"dropdown-menu-radio-item-indicator",children:w.jsx(Sne,{children:w.jsx(be,{icon:Pc,strokeWidth:2})})}),t]})}const ise="";function Kz(){return Kn({mutationFn:async e=>{const t=await fetch(`${ise}/api/git/sync`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.error||"Sync failed")}return t.json()}})}const sse="";function Yz(){return Kn({mutationFn:async e=>{const t=await fetch(`${sse}/api/git/merge-to-main`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.error||"Merge failed")}return t.json()}})}const ose="";function Xz(){return Kn({mutationFn:async e=>{const t=await fetch(`${ose}/api/git/sync-parent`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.error||"Sync parent failed")}return t.json()}})}const ase="";function Qz(){return Kn({mutationFn:async e=>{const t=await fetch(`${ase}/api/tasks/${e}/kill-claude`,{method:"POST"});if(!t.ok){const n=await t.json();throw new Error(n.error||"Failed to kill Claude")}return t.json()}})}function lse({repoPath:e,worktreePath:t,baseBranch:n,taskId:r,isMobile:i}){const s=Kz(),l=Yz(),a=Xz(),c=Zk(),u=Qz(),h=async()=>{try{await s.mutateAsync({repoPath:e,worktreePath:t,baseBranch:n}),ei.success("Synced from main")}catch(S){const x=S instanceof Error?S.message:"Sync failed";ei.error(x)}},f=async()=>{try{await l.mutateAsync({repoPath:e,worktreePath:t,baseBranch:n}),ei.success("Merged to main"),u.mutate(r),c.mutate({taskId:r,updates:{status:"DONE"}})}catch(S){const x=S instanceof Error?S.message:"Merge failed";ei.error(x)}},p=async()=>{try{await a.mutateAsync({repoPath:e,baseBranch:n}),ei.success("Parent synced with origin")}catch(S){const x=S instanceof Error?S.message:"Sync parent failed";ei.error(x)}},v=s.isPending||l.isPending||a.isPending;return i?w.jsxs(qz,{children:[w.jsx(Wz,{className:"flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:text-foreground",children:w.jsx(be,{icon:zX,size:12,strokeWidth:2,className:v?"animate-pulse":""})}),w.jsxs(Gz,{align:"end",children:[w.jsxs(mx,{onClick:h,disabled:s.isPending,children:[w.jsx(be,{icon:qE,size:12,strokeWidth:2,className:s.isPending?"animate-spin":""}),"Pull from main"]}),w.jsxs(mx,{onClick:f,disabled:l.isPending,children:[w.jsx(be,{icon:WE,size:12,strokeWidth:2,className:l.isPending?"animate-pulse":""}),"Merge to main"]}),w.jsxs(mx,{onClick:p,disabled:a.isPending,children:[w.jsx(be,{icon:XE,size:12,strokeWidth:2,className:a.isPending?"animate-spin":""}),"Sync parent with origin"]})]})]}):w.jsxs(w.Fragment,{children:[w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:h,disabled:s.isPending,className:"h-5 w-5 text-muted-foreground hover:text-foreground",title:"Pull from main",children:w.jsx(be,{icon:qE,size:12,strokeWidth:2,className:s.isPending?"animate-spin":""})}),w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:f,disabled:l.isPending,className:"h-5 w-5 text-muted-foreground hover:text-foreground",title:"Merge to main",children:w.jsx(be,{icon:WE,size:12,strokeWidth:2,className:l.isPending?"animate-pulse":""})}),w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:p,disabled:a.isPending,className:"h-5 w-5 text-muted-foreground hover:text-foreground",title:"Sync parent with origin",children:w.jsx(be,{icon:XE,size:12,strokeWidth:2,className:a.isPending?"animate-spin":""})})]})}function cse({terminal:e,taskInfo:t,isMobile:n,onClose:r,onReady:i,onResize:s,onRename:l,onContainerReady:a,setupImagePaste:c,onFocus:u}){return w.jsxs("div",{className:"flex h-full min-w-0 flex-col overflow-hidden",children:[w.jsx("div",{className:"flex shrink-0 items-center justify-between border-b border-border bg-card",children:t?w.jsxs("div",{className:"flex flex-1 items-center gap-2 px-2 py-1",children:[w.jsxs(er,{to:"/tasks/$taskId",params:{taskId:t.taskId},className:"flex items-center gap-1.5 rounded px-2 py-0.5 text-xs font-medium text-primary hover:bg-primary/10 truncate",children:[w.jsx(be,{icon:hk,size:14,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{className:"truncate",children:t.title})]}),!n&&w.jsxs(w.Fragment,{children:[w.jsx(er,{to:t.repoId?"/repositories/$repoId":"/repositories",params:t.repoId?{repoId:t.repoId}:void 0,className:"text-xs font-medium text-foreground shrink-0 cursor-pointer hover:underline",children:t.repoName}),e.cwd&&w.jsx("span",{className:"text-xs text-muted-foreground truncate",children:e.cwd.split("/").pop()})]}),w.jsx("div",{className:"ml-auto flex items-center gap-0.5",children:w.jsx(lse,{repoPath:t.repoPath,worktreePath:t.worktreePath,baseBranch:t.baseBranch,taskId:t.taskId,isMobile:n})})]}):w.jsxs(w.Fragment,{children:[w.jsx(tse,{name:e.name,status:e.status,exitCode:e.exitCode,className:"flex-1 border-b-0",onRename:l}),r&&w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:r,className:"mr-1 h-5 w-5 text-muted-foreground hover:text-foreground",children:w.jsx(be,{icon:Cs,size:12,strokeWidth:2})})]})}),w.jsx("div",{className:"min-h-0 min-w-0 flex-1",children:w.jsx(ese,{onReady:i,onResize:s,onContainerReady:a,terminalId:e.id,setupImagePaste:c,onFocus:u})})]})}function use({onAdd:e}){return w.jsx("div",{className:"flex h-full items-center justify-center bg-[#0a0a0a]",children:e?w.jsxs(ze,{variant:"outline",size:"sm",onClick:e,className:"gap-2",children:[w.jsx(be,{icon:Ld,size:14,strokeWidth:2}),"New Terminal"]}):w.jsx("p",{className:"text-xs text-muted-foreground",children:"No terminals"})})}function dse(e){return e<=1?{rows:1,cols:1}:e<=2?{rows:1,cols:2}:e<=4?{rows:2,cols:2}:e<=6?{rows:2,cols:3}:e<=9?{rows:3,cols:3}:{rows:3,cols:4}}function fse({terminals:e,onTerminalClose:t,onTerminalAdd:n,onTerminalReady:r,onTerminalResize:i,onTerminalRename:s,onTerminalContainerReady:l,setupImagePaste:a,writeToTerminal:c,taskInfoByCwd:u}){const h=$b(),[f,p]=O.useState(e.length>0?e[0].id:null);if(e.length===0)return w.jsx(use,{onAdd:n});const{rows:v,cols:S}=dse(e.length),x=[];for(let _=0;_<v;_++){const T=_*S,E=Math.min(T+S,e.length);T<e.length&&x.push(e.slice(T,E))}const g=_=>{f&&c&&c(f,_)},b=_=>w.jsx(cse,{terminal:_,taskInfo:_.cwd?u?.get(_.cwd):void 0,isMobile:h,onClose:t?()=>t(_.id):void 0,onReady:r?T=>r(_.id,T):void 0,onResize:i?(T,E)=>i(_.id,T,E):void 0,onRename:s?T=>s(_.id,T):void 0,onContainerReady:l?T=>l(_.id,T):void 0,setupImagePaste:a,onFocus:()=>p(_.id)}),y=_=>w.jsxs("div",{className:"flex h-full w-full flex-col",children:[w.jsx("div",{className:"min-h-0 flex-1",children:_}),h&&c&&w.jsx(lO,{onSend:g})]});return e.length===1?y(w.jsx("div",{className:"h-full w-full max-w-full min-w-0 overflow-hidden",children:b(e[0])})):e.length===2?y(w.jsxs($l,{direction:h?"vertical":"horizontal",className:"h-full max-w-full",children:[w.jsx(Vi,{defaultSize:50,minSize:15,children:b(e[0])},e[0].id),w.jsx(Fl,{}),w.jsx(Vi,{defaultSize:50,minSize:15,children:b(e[1])},e[1].id)]})):e.length===3?y(w.jsxs($l,{direction:"horizontal",className:"h-full max-w-full",children:[w.jsx(Vi,{defaultSize:50,minSize:15,children:b(e[0])},e[0].id),w.jsx(Fl,{}),w.jsx(Vi,{defaultSize:50,minSize:15,children:w.jsxs($l,{direction:"vertical",className:"h-full max-w-full",children:[w.jsx(Vi,{defaultSize:50,minSize:15,children:b(e[1])},e[1].id),w.jsx(Fl,{}),w.jsx(Vi,{defaultSize:50,minSize:15,children:b(e[2])},e[2].id)]})})]})):y(w.jsx($l,{direction:"vertical",className:"h-full max-w-full",children:x.map((_,T)=>w.jsxs(O.Fragment,{children:[T>0&&w.jsx(Fl,{}),w.jsx(Vi,{defaultSize:100/x.length,minSize:15,children:_.length===1?b(_[0]):w.jsx($l,{direction:"horizontal",className:"h-full max-w-full",children:_.map((E,k)=>w.jsxs(O.Fragment,{children:[k>0&&w.jsx(Fl,{}),w.jsx(Vi,{defaultSize:100/S,minSize:15,children:b(E)})]},E.id))})})]},`row-${T}`))}))}function hse({tabs:e,activeTabId:t,onTabSelect:n,onTabClose:r,onTabCreate:i,onTabRename:s}){const[l,a]=O.useState(null),[c,u]=O.useState(""),h=O.useRef(null);O.useEffect(()=>{l&&h.current&&(h.current.focus(),h.current.select())},[l]);const f=S=>{a(S.id),u(S.name)},p=()=>{l&&c.trim()&&s(l,c.trim()),a(null)},v=S=>{S.key==="Enter"?p():S.key==="Escape"&&a(null)};return w.jsxs("div",{className:"flex items-center gap-1",children:[e.map(S=>w.jsx("button",{onClick:()=>n(S.id),onDoubleClick:()=>f(S),className:Be("group relative flex items-center gap-1.5 rounded-t-md border-x border-t px-3 py-1.5 text-xs transition-colors max-sm:px-2 max-sm:py-1",S.id===t?"border-border bg-background text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:l===S.id?w.jsxs("div",{className:"flex items-center gap-1",children:[w.jsx(nn,{ref:h,value:c,onChange:x=>u(x.target.value),onBlur:p,onKeyDown:v,className:"h-5 w-20 px-1 text-xs"}),w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:p,className:"h-4 w-4",children:w.jsx(be,{icon:UX,size:12,strokeWidth:2})})]}):w.jsxs(w.Fragment,{children:[S.name,e.length>1&&w.jsx("button",{onClick:x=>{x.stopPropagation(),r(S.id)},className:"ml-1 rounded opacity-0 hover:bg-muted group-hover:opacity-100",children:w.jsx(be,{icon:Cs,size:12,strokeWidth:2})})]})},S.id)),w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:i,className:"ml-1",children:w.jsx(be,{icon:Ld,size:14,strokeWidth:2})})]})}function pse(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`}function cO(e={}){const{url:t=pse(),reconnectInterval:n=2e3,maxReconnectAttempts:r=10}=e,[i,s]=O.useState([]),[l,a]=O.useState(!1),[c,u]=O.useState([]),[h,f]=O.useState(!1),p=O.useRef(null),v=O.useRef(0),S=O.useRef(void 0),x=O.useRef(new Map),g=O.useRef(new Set),b=O.useRef(new Map),y=O.useRef(()=>{}),_=O.useRef(null),T=O.useRef(!1),E=O.useCallback(j=>{p.current?.readyState===WebSocket.OPEN&&p.current.send(JSON.stringify(j))},[]),k=O.useCallback(j=>{try{const B=JSON.parse(j.data);switch(B.type){case"terminals:list":s(B.payload.terminals),a(!0);break;case"terminal:created":s(V=>[...V,B.payload.terminal]),B.payload.isNew&&g.current.add(B.payload.terminal.id);break;case"terminal:output":{const V=x.current.get(B.payload.terminalId);V&&V.write(B.payload.data);break}case"terminal:attached":{const V=x.current.get(B.payload.terminalId);V&&(V.reset(),B.payload.buffer&&V.write(B.payload.buffer));const X=b.current.get(B.payload.terminalId);X&&(b.current.delete(B.payload.terminalId),X());break}case"terminal:bufferCleared":{const V=x.current.get(B.payload.terminalId);V&&V.reset();break}case"terminal:exit":s(V=>V.map(X=>X.id===B.payload.terminalId?{...X,status:"exited",exitCode:B.payload.exitCode}:X));break;case"terminal:error":console.error("Terminal error:",B.payload.error);break;case"terminal:renamed":s(V=>V.map(X=>X.id===B.payload.terminalId?{...X,name:B.payload.name}:X));break;case"terminal:destroyed":x.current.delete(B.payload.terminalId),s(V=>V.filter(X=>X.id!==B.payload.terminalId));break;case"terminal:tabAssigned":s(V=>V.map(X=>X.id===B.payload.terminalId?{...X,tabId:B.payload.tabId??void 0,positionInTab:B.payload.positionInTab}:X));break;case"tabs:list":u(B.payload.tabs);break;case"tab:created":u(V=>[...V,B.payload.tab].sort((X,re)=>X.position-re.position));break;case"tab:renamed":u(V=>V.map(X=>X.id===B.payload.tabId?{...X,name:B.payload.name}:X));break;case"tab:deleted":u(V=>V.filter(X=>X.id!==B.payload.tabId));break;case"tab:reordered":u(V=>V.map(X=>X.id===B.payload.tabId?{...X,position:B.payload.position}:X).sort((X,re)=>X.position-re.position));break}}catch(B){console.error("Failed to parse WebSocket message:",B)}},[]),A=O.useCallback(()=>{const j=p.current;if(j&&(j.readyState===WebSocket.CONNECTING||j.readyState===WebSocket.OPEN))return;const B=new WebSocket(t);p.current=B,B.onopen=()=>{f(!0),v.current=0},B.onmessage=k,B.onclose=()=>{f(!1),a(!1),p.current===B&&(p.current=null),v.current<r&&(v.current++,S.current=setTimeout(()=>y.current(),n))},B.onerror=()=>{}},[t,n,r,k]);y.current=A,O.useEffect(()=>(A(),()=>{S.current&&clearTimeout(S.current),p.current&&(p.current.close(),p.current=null)}),[A]),O.useEffect(()=>{if(h&&!T.current){const j=setTimeout(()=>{_.current&&document.hasFocus()&&document.visibilityState==="visible"&&x.current.get(_.current)?.focus()},150);return()=>clearTimeout(j)}T.current=h},[h]);const R=O.useCallback(j=>{E({type:"terminal:create",payload:j})},[E]),L=O.useCallback(j=>{E({type:"terminal:destroy",payload:{terminalId:j}}),x.current.delete(j),s(B=>B.filter(V=>V.id!==j))},[E]),z=O.useCallback((j,B)=>{E({type:"terminal:input",payload:{terminalId:j,data:B}})},[E]),D=O.useCallback((j,B,V)=>{E({type:"terminal:resize",payload:{terminalId:j,cols:B,rows:V}})},[E]),$=O.useCallback((j,B)=>{E({type:"terminal:rename",payload:{terminalId:j,name:B}})},[E]),N=O.useCallback(j=>{E({type:"terminal:clearBuffer",payload:{terminalId:j}})},[E]),F=O.useCallback((j,B,V)=>{E({type:"terminal:assignTab",payload:{terminalId:j,tabId:B,positionInTab:V}})},[E]),U=O.useCallback((j,B)=>{E({type:"tab:create",payload:{name:j,position:B}})},[E]),H=O.useCallback((j,B)=>{E({type:"tab:rename",payload:{tabId:j,name:B}})},[E]),K=O.useCallback(j=>{E({type:"tab:delete",payload:{tabId:j}})},[E]),W=O.useCallback((j,B)=>{E({type:"tab:reorder",payload:{tabId:j,position:B}})},[E]),I=O.useCallback((j,B,V)=>{x.current.set(j,B),B.attachCustomKeyEventHandler(ie=>ie.type==="keydown"&&ie.shiftKey&&ie.key==="Enter"?(ie.preventDefault(),ie.stopPropagation(),z(j,`
|
|
35
|
+
`),!1):!0);const X=B.onData(ie=>{z(j,ie)}),re=()=>{_.current=j};return B.textarea?.addEventListener("focus",re),V?.onAttached&&b.current.set(j,V.onAttached),E({type:"terminal:attach",payload:{terminalId:j}}),()=>{X.dispose(),x.current.delete(j),b.current.delete(j),B.textarea?.removeEventListener("focus",re)}},[E,z]),G=O.useCallback((j,B)=>{const V=async X=>{const re=X.clipboardData?.items;if(re){for(const ie of re)if(ie.type.startsWith("image/")){X.preventDefault(),X.stopPropagation();const Q=ie.getAsFile();if(!Q)return;try{const Y=await yB(Q);z(B,Y)}catch(Y){console.error("Failed to upload image:",Y)}return}}};return j.addEventListener("paste",V,!0),()=>{j.removeEventListener("paste",V,!0)}},[z]);return{terminals:i,terminalsLoaded:l,tabs:c,connected:h,newTerminalIds:g.current,createTerminal:R,destroyTerminal:L,writeToTerminal:z,resizeTerminal:D,renameTerminal:$,clearTerminalBuffer:N,assignTerminalToTab:F,createTab:U,renameTab:H,deleteTab:K,reorderTab:W,attachXterm:I,setupImagePaste:G}}const Is="all-tasks",pj=["IN_PROGRESS","IN_REVIEW"],mse=ts("/terminals/")({component:gse});function gse(){const{terminals:e,tabs:t,connected:n,createTerminal:r,destroyTerminal:i,renameTerminal:s,assignTerminalToTab:l,createTab:a,renameTab:c,deleteTab:u,attachXterm:h,resizeTerminal:f,setupImagePaste:p,writeToTerminal:v}=cO(),{activeTabId:S,setActiveTab:x,isLoading:g}=wz();O.useEffect(()=>{if(t.length>0&&!g){const B=t.map(V=>V.id);(!S||!B.includes(S)&&S!==Is)&&x(t[0].id)}},[t,S,g,x]);const{data:b=[]}=Qk(),{data:y=[]}=eO(),{data:_}=gz(),[T,E]=O.useState(null),k=O.useMemo(()=>{const B=new Map;for(const V of y)B.set(V.path,V.id);return B},[y]),A=O.useMemo(()=>new Set(b.filter(B=>pj.includes(B.status)&&B.worktreePath).map(B=>B.worktreePath)),[b]),R=O.useMemo(()=>new Set(b.filter(B=>B.worktreePath).map(B=>B.worktreePath)),[b]),L=O.useMemo(()=>{const B=new Map;for(const V of b)V.worktreePath&&B.set(V.worktreePath,{taskId:V.id,repoId:k.get(V.repoPath),repoName:V.repoName,title:V.title,repoPath:V.repoPath,worktreePath:V.worktreePath,baseBranch:V.baseBranch,branch:V.branch});return B},[b,k]),z=O.useMemo(()=>{const B=new Set(b.filter(V=>pj.includes(V.status)).map(V=>V.repoName));return Array.from(B).sort()},[b]),D=O.useRef(new Map),$=O.useRef(0);O.useEffect(()=>{if(_)for(const B of e){const V=B.cwd?.startsWith(_),X=B.cwd&&R.has(B.cwd);V&&!X&&i(B.id)}},[e,R,_,i]);const N=O.useMemo(()=>S===Is?e.filter(B=>B.cwd&&A.has(B.cwd)).filter(B=>T?b.find(X=>X.worktreePath===B.cwd)?.repoName===T:!0).sort((B,V)=>{const X=b.find(ie=>ie.worktreePath===B.cwd),re=b.find(ie=>ie.worktreePath===V.cwd);return!X||!re?0:new Date(re.createdAt).getTime()-new Date(X.createdAt).getTime()}):e.filter(B=>B.tabId===S).sort((B,V)=>(B.positionInTab??0)-(V.positionInTab??0)),[S,e,A,T,b]),F=O.useCallback(()=>{$.current++;const V=e.filter(X=>X.tabId===S).length;r({name:`Terminal ${$.current}`,cols:80,rows:24,tabId:S??void 0,positionInTab:V})},[r,S,e]);O.useEffect(()=>{for(const B of e)B.cwd&&R.has(B.cwd)&&B.tabId&&l(B.id,null)},[e,R,l]);const U=O.useCallback(B=>{const V=D.current.get(B);V&&(V(),D.current.delete(B)),i(B)},[i]),H=O.useCallback((B,V)=>{const X=h(B,V);D.current.set(B,X)},[h]),K=O.useCallback((B,V,X)=>{f(B,V,X)},[f]),W=O.useCallback((B,V)=>{s(B,V)},[s]),I=O.useCallback(()=>{const B=t.length;a(`Tab ${B+1}`)},[a,t.length]),G=O.useCallback(B=>{const V=e.filter(X=>X.tabId===B);for(const X of V)U(X.id);u(B)},[e,u,U]),j=t.map((B,V)=>({id:B.id,name:B.name,layout:"single",position:V}));return w.jsxs("div",{className:"flex h-full max-w-full flex-col overflow-hidden",children:[w.jsxs("div",{className:"sticky top-0 z-10 flex shrink-0 items-center justify-between border-b border-border bg-muted/30 px-2 py-1",children:[w.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto",children:w.jsx(hse,{tabs:j,activeTabId:S??"",onTabSelect:x,onTabClose:G,onTabCreate:I,onTabRename:c})}),w.jsxs("div",{className:"flex shrink-0 items-center gap-3 max-sm:gap-1",children:[S===Is&&z.length>1&&w.jsxs(cc,{value:T??"",onValueChange:B=>E(B||null),children:[w.jsxs(dc,{size:"sm",className:"max-sm:w-auto",children:[w.jsx(be,{icon:t7,size:12,strokeWidth:2,className:"text-muted-foreground"}),w.jsx(uc,{children:T||"All Repos"})]}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"",children:"All Repos"}),z.map(B=>w.jsx(Rr,{value:B,children:B},B))]})]}),w.jsxs("button",{onClick:()=>x(Is),className:Be("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors max-sm:px-2",S===Is?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[w.jsx(be,{icon:$v,size:12,strokeWidth:2}),w.jsx("span",{className:"max-sm:hidden",children:"Task Terminals"})]}),w.jsxs(ze,{variant:"outline",size:"sm",onClick:F,disabled:!n||e.length>=12||S===Is,className:"max-sm:px-2",children:[w.jsx(be,{icon:Ld,size:14,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"New Terminal"})]})]})]}),w.jsx("div",{className:"pixel-grid min-w-0 flex-1 overflow-hidden",children:w.jsx(fse,{terminals:N,onTerminalClose:S===Is?void 0:U,onTerminalAdd:n&&S!==Is?F:void 0,onTerminalReady:H,onTerminalResize:K,onTerminalRename:S===Is?void 0:W,setupImagePaste:p,writeToTerminal:v,taskInfoByCwd:S===Is?L:void 0})})]})}function vse(e){if(Array.isArray(e))return e}function yse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function u2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zz(e,t){if(e){if(typeof e=="string")return u2(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u2(e,t):void 0}}function bse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
36
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jz(e,t){return vse(e)||yse(e,t)||Zz(e,t)||bse()}var gx={},ah={},mj;function eH(){if(mj)return ah;mj=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.bind=void 0;function e(t,n){var r=n.type,i=n.listener,s=n.options;return t.addEventListener(r,i,s),function(){t.removeEventListener(r,i,s)}}return ah.bind=e,ah}var Ll={},gj;function _se(){if(gj)return Ll;gj=1;var e=Ll&&Ll.__assign||function(){return e=Object.assign||function(s){for(var l,a=1,c=arguments.length;a<c;a++){l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])}return s},e.apply(this,arguments)};Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.bindAll=void 0;var t=eH();function n(s){if(!(typeof s>"u"))return typeof s=="boolean"?{capture:s}:s}function r(s,l){if(l==null)return s;var a=e(e({},s),{options:e(e({},n(l)),n(s.options))});return a}function i(s,l,a){var c=l.map(function(u){var h=r(u,a);return(0,t.bind)(s,h)});return function(){c.forEach(function(h){return h()})}}return Ll.bindAll=i,Ll}var vj;function xse(){return vj||(vj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindAll=e.bind=void 0;var t=eH();Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return t.bind}});var n=_se();Object.defineProperty(e,"bindAll",{enumerable:!0,get:function(){return n.bindAll}})})(gx)),gx}var sd=xse(),tH="data-pdnd-honey-pot";function nH(e){return e instanceof Element&&e.hasAttribute(tH)}function rH(e){var t=document.elementsFromPoint(e.x,e.y),n=Jz(t,2),r=n[0],i=n[1];return r?nH(r)?i??null:r:null}function Xh(e){"@babel/helpers - typeof";return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function Sse(e,t){if(Xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wse(e){var t=Sse(e,"string");return Xh(t)=="symbol"?t:t+""}function nm(e,t,n){return(t=wse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iH=2147483647;function yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yj(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Qh=2,_j=Qh/2;function Cse(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function Ese(e){return{x:e.x-_j,y:e.y-_j}}function Tse(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function kse(e){return{x:Math.min(e.x,window.innerWidth-Qh),y:Math.min(e.y,window.innerHeight-Qh)}}function xj(e){var t=e.client,n=kse(Tse(Ese(Cse(t))));return DOMRect.fromRect({x:n.x,y:n.y,width:Qh,height:Qh})}function Sj(e){var t=e.clientRect;return{left:"".concat(t.left,"px"),top:"".concat(t.top,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}}function Ose(e){var t=e.client,n=e.clientRect;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function Rse(e){var t=e.initial,n=document.createElement("div");n.setAttribute(tH,"true");var r=xj({client:t});Object.assign(n.style,bj(bj({backgroundColor:"transparent",position:"fixed",padding:0,margin:0,boxSizing:"border-box"},Sj({clientRect:r})),{},{pointerEvents:"auto",zIndex:iH})),document.body.appendChild(n);var i=sd.bind(window,{type:"pointermove",listener:function(l){var a={x:l.clientX,y:l.clientY};r=xj({client:a}),Object.assign(n.style,Sj({clientRect:r}))},options:{capture:!0}});return function(l){var a=l.current;if(i(),Ose({client:a,clientRect:r})){n.remove();return}function c(){u(),n.remove()}var u=sd.bindAll(window,[{type:"pointerdown",listener:c},{type:"pointermove",listener:c},{type:"focusin",listener:c},{type:"focusout",listener:c},{type:"dragstart",listener:c},{type:"dragenter",listener:c},{type:"dragover",listener:c}],{capture:!0})}}function Ase(){var e=null;function t(){return e=null,sd.bind(window,{type:"pointermove",listener:function(i){e={x:i.clientX,y:i.clientY}},options:{capture:!0}})}function n(){var r=null;return function(s){var l=s.eventName,a=s.payload;if(l==="onDragStart"){var c=a.location.initial.input,u=e??{x:c.clientX,y:c.clientY};r=Rse({initial:u})}if(l==="onDrop"){var h,f=a.location.current.input;(h=r)===null||h===void 0||h({current:{x:f.clientX,y:f.clientY}}),r=null,e=null}}}return{bindEvents:t,getOnPostDispatch:n}}function Pse(e){if(Array.isArray(e))return u2(e)}function Mse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sH(e){return Pse(e)||Mse(e)||Zz(e)||Lse()}function Bc(e){var t=null;return function(){if(!t){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var l=e.apply(this,i);t={result:l}}return t.result}}var jse=Bc(function(){return navigator.userAgent.includes("Firefox")}),rm=Bc(function(){var t=navigator,n=t.userAgent;return n.includes("AppleWebKit")&&!n.includes("Chrome")}),d2={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function Dse(e){var t=e.dragLeave;return rm()?t.hasOwnProperty(d2.isLeavingWindow):!1}(function(){if(typeof window>"u"||!rm())return;function t(){return{enterCount:0,isOverWindow:!1}}var n=t();function r(){n=t()}sd.bindAll(window,[{type:"dragstart",listener:function(){n.enterCount=0,n.isOverWindow=!0}},{type:"drop",listener:r},{type:"dragend",listener:r},{type:"dragenter",listener:function(s){!n.isOverWindow&&n.enterCount===0&&(s[d2.isEnteringWindow]=!0),n.isOverWindow=!0,n.enterCount++}},{type:"dragleave",listener:function(s){n.enterCount--,n.isOverWindow&&n.enterCount===0&&(s[d2.isLeavingWindow]=!0,n.isOverWindow=!1)}}],{capture:!0})})();function Ise(e){return"nodeName"in e}function Nse(e){return Ise(e)&&e.ownerDocument!==document}function Bse(e){var t=e.dragLeave,n=t.type,r=t.relatedTarget;return n!=="dragleave"?!1:rm()?Dse({dragLeave:t}):r==null?!0:jse()?Nse(r):r instanceof HTMLIFrameElement}function zse(e){var t=e.onDragEnd;return[{type:"pointermove",listener:(function(){var n=0;return function(){if(n<20){n++;return}t()}})()},{type:"pointerdown",listener:t}]}function Mh(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var Hse=function(t){var n=[],r=null,i=function(){for(var l=arguments.length,a=new Array(l),c=0;c<l;c++)a[c]=arguments[c];n=a,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i},vx=Hse(function(e){return e()}),Jg=(function(){var e=null;function t(r){var i=requestAnimationFrame(function(){e=null,r()});e={frameId:i,fn:r}}function n(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:n}})();function $se(e){var t=e.source,n=e.initial,r=e.dispatchEvent,i={dropTargets:[]};function s(a){r(a),i={dropTargets:a.payload.location.current.dropTargets}}var l={start:function(c){var u=c.nativeSetDragImage,h={current:n,previous:i,initial:n};s({eventName:"onGenerateDragPreview",payload:{source:t,location:h,nativeSetDragImage:u}}),Jg.schedule(function(){s({eventName:"onDragStart",payload:{source:t,location:h}})})},dragUpdate:function(c){var u=c.current;Jg.flush(),vx.cancel(),s({eventName:"onDropTargetChange",payload:{source:t,location:{initial:n,previous:i,current:u}}})},drag:function(c){var u=c.current;vx(function(){Jg.flush();var h={initial:n,previous:i,current:u};s({eventName:"onDrag",payload:{source:t,location:h}})})},drop:function(c){var u=c.current,h=c.updatedSourcePayload;Jg.flush(),vx.cancel(),s({eventName:"onDrop",payload:{source:h??t,location:{current:u,previous:i,initial:n}}})}};return l}var f2={isActive:!1};function oH(){return!f2.isActive}function Fse(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function Use(e){var t=e.current,n=e.next;if(t.length!==n.length)return!0;for(var r=0;r<t.length;r++)if(t[r].element!==n[r].element)return!0;return!1}function Vse(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=e.dispatchEvent;if(!oH())return;var s=qse({event:t,dragType:n,getDropTargetsOver:r});f2.isActive=!0;var l={current:s};yx({event:t,current:s.dropTargets});var a=$se({source:n.payload,dispatchEvent:i,initial:s});function c(v){var S=Use({current:l.current.dropTargets,next:v.dropTargets});l.current=v,S&&a.dragUpdate({current:l.current})}function u(v){var S=Mh(v),x=nH(v.target)?rH({x:S.clientX,y:S.clientY}):v.target,g=r({target:x,input:S,source:n.payload,current:l.current.dropTargets});g.length&&(v.preventDefault(),yx({event:v,current:g})),c({dropTargets:g,input:S})}function h(){l.current.dropTargets.length&&c({dropTargets:[],input:l.current.input}),a.drop({current:l.current,updatedSourcePayload:null}),f()}function f(){f2.isActive=!1,p()}var p=sd.bindAll(window,[{type:"dragover",listener:function(S){u(S),a.drag({current:l.current})}},{type:"dragenter",listener:u},{type:"dragleave",listener:function(S){Bse({dragLeave:S})&&(c({input:l.current.input,dropTargets:[]}),n.startedFrom==="external"&&h())}},{type:"drop",listener:function(S){if(l.current={dropTargets:l.current.dropTargets,input:Mh(S)},!l.current.dropTargets.length){h();return}S.preventDefault(),yx({event:S,current:l.current.dropTargets}),a.drop({current:l.current,updatedSourcePayload:n.type==="external"?n.getDropPayload(S):null}),f()}},{type:"dragend",listener:function(S){l.current={dropTargets:l.current.dropTargets,input:Mh(S)},h()}}].concat(sH(zse({onDragEnd:h}))),{capture:!0});a.start({nativeSetDragImage:Fse(t)})}function yx(e){var t,n=e.event,r=e.current,i=(t=r[0])===null||t===void 0?void 0:t.dropEffect;i!=null&&n.dataTransfer&&(n.dataTransfer.dropEffect=i)}function qse(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=Mh(t);if(n.startedFrom==="external")return{input:i,dropTargets:[]};var s=r({input:i,source:n.payload,target:t.target,current:[]});return{input:i,dropTargets:s}}var wj={canStart:oH,start:Vse},h2=new Map;function Wse(e){var t=e.typeKey,n=e.mount,r=h2.get(t);if(r)return r.usageCount++,r;var i={typeKey:t,unmount:n(),usageCount:1};return h2.set(t,i),i}function Gse(e){var t=Wse(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),h2.delete(e.typeKey))}}function Fb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){t.forEach(function(i){return i()})}}function aH(e,t){var n=t.attribute,r=t.value;return e.setAttribute(n,r),function(){return e.removeAttribute(n)}}function Cj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cj(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bx(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Kse(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return l=u.done,u},e:function(u){a=!0,s=u},f:function(){try{l||n.return==null||n.return()}finally{if(a)throw s}}}}function Kse(e,t){if(e){if(typeof e=="string")return Ej(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ej(e,t):void 0}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _x(e){return e.slice(0).reverse()}function Yse(e){var t=e.typeKey,n=e.defaultDropEffect,r=new WeakMap,i="data-drop-target-for-".concat(t),s="[".concat(i,"]");function l(v){return r.set(v.element,v),function(){return r.delete(v.element)}}function a(v){var S=Fb(aH(v.element,{attribute:i,value:"true"}),l(v));return Bc(S)}function c(v){var S,x,g,b,y=v.source,_=v.target,T=v.input,E=v.result,k=E===void 0?[]:E;if(_==null)return k;if(!(_ instanceof Element))return _ instanceof Node?c({source:y,target:_.parentElement,input:T,result:k}):k;var A=_.closest(s);if(A==null)return k;var R=r.get(A);if(R==null)return k;var L={input:T,source:y,element:R.element};if(R.canDrop&&!R.canDrop(L))return c({source:y,target:R.element.parentElement,input:T,result:k});var z=(S=(x=R.getData)===null||x===void 0?void 0:x.call(R,L))!==null&&S!==void 0?S:{},D=(g=(b=R.getDropEffect)===null||b===void 0?void 0:b.call(R,L))!==null&&g!==void 0?g:n,$={data:z,element:R.element,dropEffect:D,isActiveDueToStickiness:!1};return c({source:y,target:R.element.parentElement,input:T,result:[].concat(sH(k),[$])})}function u(v){var S=v.eventName,x=v.payload,g=bx(x.location.current.dropTargets),b;try{for(g.s();!(b=g.n()).done;){var y,_=b.value,T=r.get(_.element),E=Ea(Ea({},x),{},{self:_});T==null||(y=T[S])===null||y===void 0||y.call(T,E)}}catch(k){g.e(k)}finally{g.f()}}var h={onGenerateDragPreview:u,onDrag:u,onDragStart:u,onDrop:u,onDropTargetChange:function(S){var x=S.payload,g=new Set(x.location.current.dropTargets.map(function(K){return K.element})),b=new Set,y=bx(x.location.previous.dropTargets),_;try{for(y.s();!(_=y.n()).done;){var T,E=_.value;b.add(E.element);var k=r.get(E.element),A=g.has(E.element),R=Ea(Ea({},x),{},{self:E});if(k==null||(T=k.onDropTargetChange)===null||T===void 0||T.call(k,R),!A){var L;k==null||(L=k.onDragLeave)===null||L===void 0||L.call(k,R)}}}catch(K){y.e(K)}finally{y.f()}var z=bx(x.location.current.dropTargets),D;try{for(z.s();!(D=z.n()).done;){var $,N,F=D.value;if(!b.has(F.element)){var U=Ea(Ea({},x),{},{self:F}),H=r.get(F.element);H==null||($=H.onDropTargetChange)===null||$===void 0||$.call(H,U),H==null||(N=H.onDragEnter)===null||N===void 0||N.call(H,U)}}}catch(K){z.e(K)}finally{z.f()}}};function f(v){h[v.eventName](v)}function p(v){var S=v.source,x=v.target,g=v.input,b=v.current,y=c({source:S,target:x,input:g});if(y.length>=b.length)return y;for(var _=_x(b),T=_x(y),E=[],k=0;k<_.length;k++){var A,R=_[k],L=T[k];if(L!=null){E.push(L);continue}var z=E[k-1],D=_[k-1];if(z?.element!==D?.element)break;var $=r.get(R.element);if(!$)break;var N={input:g,source:S,element:$.element};if($.canDrop&&!$.canDrop(N)||!((A=$.getIsSticky)!==null&&A!==void 0&&A.call($,N)))break;E.push(Ea(Ea({},R),{},{isActiveDueToStickiness:!0}))}return _x(E)}return{dropTargetForConsumers:a,getIsOver:p,dispatchEvent:f}}function Xse(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Qse(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
39
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return l=u.done,u},e:function(u){a=!0,s=u},f:function(){try{l||n.return==null||n.return()}finally{if(a)throw s}}}}function Qse(e,t){if(e){if(typeof e=="string")return Tj(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tj(e,t):void 0}}function Tj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zse(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kj(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jse(){var e=new Set,t=null;function n(s){t&&(!s.canMonitor||s.canMonitor(t.canMonitorArgs))&&t.active.add(s)}function r(s){var l=Zse({},s);e.add(l),n(l);function a(){e.delete(l),t&&t.active.delete(l)}return Bc(a)}function i(s){var l=s.eventName,a=s.payload;if(l==="onGenerateDragPreview"){t={canMonitorArgs:{initial:a.location.initial,source:a.source},active:new Set};var c=Xse(e),u;try{for(c.s();!(u=c.n()).done;){var h=u.value;n(h)}}catch(g){c.e(g)}finally{c.f()}}if(t){for(var f=Array.from(t.active),p=0,v=f;p<v.length;p++){var S=v[p];if(t.active.has(S)){var x;(x=S[l])===null||x===void 0||x.call(S,a)}}l==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:i,monitorForConsumers:r}}function eoe(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,i=e.onPostDispatch,s=e.defaultDropEffect,l=Jse(),a=Yse({typeKey:t,defaultDropEffect:s});function c(f){r?.(f),a.dispatchEvent(f),l.dispatchEvent(f),i?.(f)}function u(f){var p=f.event,v=f.dragType;wj.start({event:p,dragType:v,getDropTargetsOver:a.getIsOver,dispatchEvent:c})}function h(){function f(){var p={canStart:wj.canStart,start:u};return n(p)}return Gse({typeKey:t,mount:f})}return{registerUsage:h,dropTarget:a.dropTargetForConsumers,monitor:l.monitorForConsumers}}var lH=Bc(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),toe="pdnd:android-fallback",Oj="text/plain",noe="text/uri-list",roe="application/vnd.pdnd",ny=new WeakMap;function ioe(e){return ny.set(e.element,e),function(){ny.delete(e.element)}}var Rj=Ase(),uO=eoe({typeKey:"element",defaultDropEffect:"move",mount:function(t){return Fb(Rj.bindEvents(),sd.bind(document,{type:"dragstart",listener:function(r){var i,s,l,a,c,u;if(t.canStart(r)&&!r.defaultPrevented&&r.dataTransfer){var h=r.target;if(h instanceof HTMLElement){var f=ny.get(h);if(f){var p=Mh(r),v={element:f.element,dragHandle:(i=f.dragHandle)!==null&&i!==void 0?i:null,input:p};if(f.canDrag&&!f.canDrag(v)){r.preventDefault();return}if(f.dragHandle){var S=rH({x:p.clientX,y:p.clientY});if(!f.dragHandle.contains(S)){r.preventDefault();return}}var x=(s=(l=f.getInitialDataForExternal)===null||l===void 0?void 0:l.call(f,v))!==null&&s!==void 0?s:null;if(x)for(var g=0,b=Object.entries(x);g<b.length;g++){var y=Jz(b[g],2),_=y[0],T=y[1];r.dataTransfer.setData(_,T??"")}lH()&&!r.dataTransfer.types.includes(Oj)&&!r.dataTransfer.types.includes(noe)&&r.dataTransfer.setData(Oj,toe),r.dataTransfer.setData(roe,"");var E={element:f.element,dragHandle:(a=f.dragHandle)!==null&&a!==void 0?a:null,data:(c=(u=f.getInitialData)===null||u===void 0?void 0:u.call(f,v))!==null&&c!==void 0?c:{}},k={type:"element",payload:E,startedFrom:"internal"};t.start({event:r,dragType:k})}}}}}))},dispatchEventToSource:function(t){var n,r,i=t.eventName,s=t.payload;(n=ny.get(s.source.element))===null||n===void 0||(r=n[i])===null||r===void 0||r.call(n,s)},onPostDispatch:Rj.getOnPostDispatch()}),dO=uO.dropTarget,cH=uO.monitor;function soe(e){var t=Fb(uO.registerUsage(),ioe(e),aH(e.element,{attribute:"draggable",value:"true"}));return Bc(t)}function Aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aj(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ooe={top:function(t,n){return Math.abs(n.y-t.top)},right:function(t,n){return Math.abs(t.right-n.x)},bottom:function(t,n){return Math.abs(t.bottom-n.y)},left:function(t,n){return Math.abs(n.x-t.left)}},uH=Symbol("closestEdge");function aoe(e,t){var n,r,i=t.element,s=t.input,l=t.allowedEdges,a={x:s.clientX,y:s.clientY},c=i.getBoundingClientRect(),u=l.map(function(f){return{edge:f,value:ooe[f](c,a)}}),h=(n=(r=u.sort(function(f,p){return f.value-p.value})[0])===null||r===void 0?void 0:r.edge)!==null&&n!==void 0?n:null;return Pj(Pj({},e),{},nm({},uH,h))}function p2(e){var t;return(t=e[uH])!==null&&t!==void 0?t:null}function loe(){return{x:0,y:0}}function coe(e){var t=e.render,n=e.nativeSetDragImage,r=e.getOffset,i=r===void 0?loe:r,s=document.createElement("div");Object.assign(s.style,{position:"fixed",top:0,left:0,zIndex:iH,pointerEvents:"none"}),document.body.append(s);var l=t({container:s});queueMicrotask(function(){var u=i({container:s});if(rm()){var h=s.getBoundingClientRect();if(h.width===0)return;s.style.left="-".concat(h.width-1e-4,"px")}n?.(s,u.x,u.y)});function a(){c(),l?.(),document.body.removeChild(s)}var c=cH({onDragStart:a,onDrop:a})}var uoe=Bc(function(){return rm()&&"ontouchend"in document}),doe=function(t){var n=t.container,r=n.getBoundingClientRect();return{x:r.width/2,y:r.height/2}};function foe(e){return function(n){var r=n.container;if(uoe()||lH())return doe({container:r});Object.assign(r.style,{borderInlineStart:"".concat(e.x," solid transparent"),borderTop:"".concat(e.y," solid transparent")});var i=window.getComputedStyle(r);if(i.direction==="rtl"){var s=r.getBoundingClientRect();return{x:s.width,y:0}}return{x:0,y:0}}}const dH=O.createContext(null);function hoe({children:e}){const[t,n]=O.useState(!1),[r,i]=O.useState(new Set),s=O.useCallback(h=>{i(f=>{const p=new Set(f);return p.has(h)?p.delete(h):p.add(h),p})},[]),l=O.useCallback(h=>{i(new Set(h))},[]),a=O.useCallback(()=>{i(new Set)},[]),c=O.useCallback(()=>{n(!1),i(new Set)},[]),u=O.useCallback(h=>r.has(h),[r]);return w.jsx(dH.Provider,{value:{selectMode:t,setSelectMode:n,selectedIds:r,isSelected:u,toggle:s,selectAll:l,clearSelection:a,exitSelectMode:c,selectedCount:r.size},children:e})}function fH(){const e=O.useContext(dH);if(!e)throw new Error("useSelection must be used within a SelectionProvider");return e}const hH=O.createContext(null);function poe({children:e}){const[t,n]=O.useState(null);return w.jsx(hH.Provider,{value:{activeTask:t,setActiveTask:n},children:e})}function pH(){const e=O.useContext(hH);if(!e)throw new Error("useDrag must be used within DragProvider");return e}function moe(e){return e.match(/\/issue\/([A-Z]+-\d+)/i)?.[1]??null}function mH({task:e,open:t,onOpenChange:n}){const r=Zk(),[i,s]=O.useState(e.title),[l,a]=O.useState(e.description||""),[c,u]=O.useState(e.prUrl||""),[h,f]=O.useState(e.linearTicketUrl||"");O.useEffect(()=>{t&&(s(e.title),a(e.description||""),u(e.prUrl||""),f(e.linearTicketUrl||""))},[t,e]);const p=()=>{const S={},x=i.trim();if(!x)return;x!==e.title&&(S.title=x);const g=l.trim();g!==(e.description||"")&&(S.description=g);const b=c.trim();b!==(e.prUrl||"")&&(S.prUrl=b||null);const y=h.trim();y!==(e.linearTicketUrl||"")&&(S.linearTicketUrl=y||null,S.linearTicketId=y?moe(y):null),Object.keys(S).length>0&&r.mutate({taskId:e.id,updates:S}),n(!1)},v=S=>{S.key==="Enter"&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),p())};return w.jsx(bs,{open:t,onOpenChange:n,children:w.jsxs(_s,{className:"sm:max-w-md",onKeyDown:v,children:[w.jsx($s,{children:w.jsx(Fs,{children:"Task Settings"})}),w.jsxs(Qp,{className:"mt-4",children:[w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"config-title",children:"Title"}),w.jsx(nn,{id:"config-title",value:i,onChange:S=>s(S.target.value),autoFocus:!0})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"config-description",children:"Description"}),w.jsx(bB,{id:"config-description",value:l,onValueChange:a,rows:3})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"config-pr-url",children:"GitHub PR URL"}),w.jsx(nn,{id:"config-pr-url",value:c,onChange:S=>u(S.target.value),placeholder:"https://github.com/owner/repo/pull/123"})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"config-linear-url",children:"Linear Ticket URL"}),w.jsx(nn,{id:"config-linear-url",value:h,onChange:S=>f(S.target.value),placeholder:"https://linear.app/team/issue/TEAM-123"})]})]}),w.jsxs(Va,{className:"mt-4",children:[w.jsx(ze,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),w.jsx(ze,{onClick:p,disabled:!i.trim(),children:"Save"})]})]})})}function gH({task:e,isDragPreview:t}){const{selectMode:n,isSelected:r,toggle:i}=fH(),{setActiveTask:s}=pH(),l=r(e.id),a=Qa(),c=O.useRef(null),[u,h]=O.useState(!1),[f,p]=O.useState(null),[v,S]=O.useState(null),[x,g]=O.useState(!1),b=O.useRef(!1);O.useEffect(()=>{const E=c.current;if(!(!E||n||t))return Fb(soe({element:E,getInitialData:()=>({type:"task",taskId:e.id,status:e.status}),onGenerateDragPreview:({nativeSetDragImage:k})=>{coe({nativeSetDragImage:k,getOffset:foe({x:"16px",y:"8px"}),render:({container:A})=>{S(A)}})},onDragStart:()=>{h(!0),s(e),b.current=!0},onDrop:()=>{h(!1),s(null),S(null)}}),dO({element:E,getData:({input:k,element:A})=>{const R={type:"task",taskId:e.id,status:e.status};return aoe(R,{input:k,element:A,allowedEdges:["top","bottom"]})},canDrop:({source:k})=>k.data.taskId!==e.id,onDragEnter:({self:k})=>{p(p2(k.data))},onDrag:({self:k})=>{p(p2(k.data))},onDragLeave:()=>{p(null)},onDrop:()=>{p(null)}}))},[e,n,t,s]);const y=()=>{b.current=!1},_=E=>{if(n){E.preventDefault(),i(e.id);return}b.current||a({to:"/tasks/$taskId",params:{taskId:e.id}}),b.current=!1},T=w.jsxs(jo,{ref:t?void 0:c,onPointerDown:y,onClick:_,className:Be("transition-shadow hover:shadow-md relative",n?"cursor-pointer":"cursor-grab active:cursor-grabbing",u&&"opacity-50",l&&"ring-2 ring-primary"),children:[f&&w.jsx("div",{className:Be("absolute left-0 right-0 h-0.5 bg-primary z-10",f==="top"&&"-top-1",f==="bottom"&&"-bottom-1")}),n&&w.jsx("div",{className:"absolute right-2 top-2 z-10 cursor-pointer",onClick:E=>{E.stopPropagation(),i(e.id)},children:w.jsx(tm,{checked:l,className:"cursor-pointer pointer-events-none"})}),w.jsxs(cie,{className:Be("p-3 pb-1 flex flex-row items-start justify-between gap-2",n&&"pr-8"),children:[w.jsx(uie,{className:"text-sm font-medium leading-tight flex-1",children:e.title}),!n&&!t&&w.jsx("button",{type:"button",className:"shrink-0 p-0.5 -m-0.5 rounded hover:bg-muted transition-colors cursor-pointer",onClick:E=>{E.stopPropagation(),g(!0)},onPointerDown:E=>E.stopPropagation(),children:w.jsx(be,{icon:s7,size:14,strokeWidth:2,className:"text-muted-foreground"})})]}),w.jsxs(em,{className:"p-3 pt-1",children:[e.description&&w.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:e.description}),w.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-muted-foreground/70",children:[w.jsx(be,{icon:Qi,size:12,strokeWidth:2}),w.jsx("span",{children:e.repoName}),e.prUrl&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-muted-foreground/30",children:"•"}),w.jsx(be,{icon:fk,size:12,strokeWidth:2,className:"text-foreground"})]}),e.linearTicketId&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-muted-foreground/30",children:"•"}),w.jsx(be,{icon:hk,size:12,strokeWidth:2,className:"text-foreground"})]})]})]})]});return w.jsxs(w.Fragment,{children:[T,v&&Ir.createPortal(w.jsx("div",{className:"w-72 max-w-[90vw]",children:w.jsx(gH,{task:e,isDragPreview:!0})}),v),w.jsx(mH,{task:e,open:x,onOpenChange:g})]})}const goe={IN_PROGRESS:"In Progress",IN_REVIEW:"In Review",DONE:"Done",CANCELED:"Canceled"},voe={IN_PROGRESS:"border-t-slate-400",IN_REVIEW:"border-t-violet-400",DONE:"border-t-emerald-400",CANCELED:"border-t-rose-500"};function Mj({status:e,tasks:t,isMobile:n}){const r=O.useRef(null),[i,s]=O.useState(!1),l=[...t].sort((a,c)=>a.position-c.position);return O.useEffect(()=>{const a=r.current;if(a)return dO({element:a,getData:()=>({type:"column",status:e}),canDrop:({source:c})=>c.data.type==="task",onDragEnter:()=>s(!0),onDragLeave:()=>s(!1),onDrop:()=>s(!1)})},[e]),w.jsxs("div",{ref:r,className:Be("flex flex-col rounded-lg border border-t-4 bg-card",n?"h-full w-full":"h-full w-72 min-w-52 flex-shrink",voe[e],i&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[!n&&w.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[w.jsx("h3",{className:"text-sm font-medium",children:goe[e]}),w.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-muted px-1.5 text-xs font-medium",children:t.length})]}),w.jsx(rd,{className:"min-h-0 flex-1",children:w.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>w.jsx(gH,{task:a},a.id))})})]})}const xx=["IN_PROGRESS","IN_REVIEW","DONE","CANCELED"],vH={IN_PROGRESS:"In Progress",IN_REVIEW:"In Review",DONE:"Done",CANCELED:"Canceled"};function yoe({status:e}){const t=O.useRef(null),[n,r]=O.useState(!1);return O.useEffect(()=>{const i=t.current;if(i)return dO({element:i,getData:()=>({type:"column",status:e}),canDrop:({source:s})=>s.data.type==="task",onDragEnter:()=>r(!0),onDragLeave:()=>r(!1),onDrop:()=>r(!1)})},[e]),w.jsx("div",{ref:t,className:Be("flex-1 rounded-lg border-2 border-dashed px-3 py-2 text-center text-xs font-medium transition-colors",n?"border-primary bg-primary/10 text-primary":"border-muted-foreground/30 text-muted-foreground"),children:vH[e]})}function boe({repoFilter:e}){const{data:t=[],isLoading:n}=Qk(),r=mre(),{activeTask:i}=pH(),[s,l]=O.useState("IN_PROGRESS"),a=O.useMemo(()=>e?t.filter(u=>u.repoName===e):t,[t,e]),c=O.useMemo(()=>{const u={IN_PROGRESS:0,IN_REVIEW:0,DONE:0,CANCELED:0};for(const h of a)u[h.status]++;return u},[a]);return O.useEffect(()=>cH({canMonitor:({source:u})=>u.data.type==="task",onDrop:({source:u,location:h})=>{const f=h.current.dropTargets;if(f.length===0)return;const p=u.data.taskId,v=a.find(g=>g.id===p);if(!v)return;const S=f[0],x=S.data;if(x.type==="column"){const g=x.status;if(g!==v.status){const b=a.filter(y=>y.status===g);r.mutate({taskId:p,status:g,position:b.length})}}else if(x.type==="task"){const g=p2(S.data),b=x.status,y=a.filter(E=>E.status===b).sort((E,k)=>E.position-k.position),_=y.findIndex(E=>E.id===x.taskId);let T=_;g==="bottom"&&(T=_+1),v.status===b&&y.findIndex(k=>k.id===p)<_&&(T=Math.max(0,T-1)),(v.status!==b||T!==v.position)&&r.mutate({taskId:p,status:b,position:T})}}}),[a,r]),n?w.jsx("div",{className:"flex h-full items-center justify-center",children:w.jsx("p",{className:"text-muted-foreground",children:"Loading tasks..."})}):w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsx("div",{className:"border-b lg:hidden",children:w.jsx(qa,{value:s,onValueChange:u=>l(u),children:w.jsx(Wa,{variant:"line",className:"w-full justify-start px-4",children:xx.map(u=>w.jsxs(Sr,{value:u,className:"gap-1.5",children:[w.jsx("span",{className:"truncate",children:vH[u]}),w.jsx("span",{className:"text-muted-foreground",children:c[u]})]},u))})})}),w.jsx("div",{className:"pixel-grid hidden h-full justify-center gap-4 overflow-x-auto p-4 lg:flex",children:xx.map(u=>w.jsx(Mj,{status:u,tasks:a.filter(h=>h.status===u)},u))}),w.jsx("div",{className:"pixel-grid flex-1 overflow-y-auto p-4 lg:hidden",children:w.jsx(Mj,{status:s,tasks:a.filter(u=>u.status===s),isMobile:!0})}),i&&w.jsx("div",{className:"fixed inset-x-0 bottom-0 flex gap-2 border-t bg-background/95 p-4 backdrop-blur-sm lg:hidden",children:xx.filter(u=>u!==s).map(u=>w.jsx(yoe,{status:u},u))})]})}function _oe(e){return w.jsx(poe,{children:w.jsx(boe,{...e})})}const xoe=ts("/tasks/")({component:Soe});function Soe(){return w.jsx(hoe,{children:w.jsx(woe,{})})}function woe(){const{selectMode:e,setSelectMode:t,selectedIds:n,selectedCount:r,exitSelectMode:i}=fH(),s=vre(),{data:l=[]}=Qk(),[a,c]=O.useState(null),u=O.useMemo(()=>{const f=new Set(l.map(p=>p.repoName));return Array.from(f).sort()},[l]),h=()=>{const f=Array.from(n);s.mutate({ids:f},{onSuccess:()=>{i()}})};return w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsx("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:e?w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx("span",{className:"text-sm font-medium",children:r>0?`${r} selected`:"Select tasks"}),w.jsxs(ze,{variant:"ghost",size:"sm",onClick:i,className:"max-sm:px-2",children:[w.jsx(be,{icon:Cs,size:14,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Cancel"})]})]}),w.jsxs(Hd,{children:[w.jsxs($d,{render:w.jsx(ze,{variant:"destructive",size:"sm",disabled:s.isPending||r===0,className:"max-sm:px-2"}),children:[w.jsx(be,{icon:Fp,size:14,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:s.isPending?"Deleting...":"Delete"}),r>0&&w.jsxs("span",{className:"max-sm:hidden",children:[" (",r,")"]})]}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsxs(qd,{children:["Delete ",r," Tasks"]}),w.jsx(Wd,{children:"This will permanently delete the selected tasks and remove their worktrees. This action cannot be undone."})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{children:"Cancel"}),w.jsx(Ez,{onClick:h,variant:"destructive",disabled:s.isPending,children:s.isPending?"Deleting...":"Delete All"})]})]})]})]}):w.jsxs(w.Fragment,{children:[w.jsx("h1",{className:"text-sm font-medium max-sm:hidden",children:"Tasks"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsxs(cc,{value:a??"",onValueChange:f=>c(f||null),children:[w.jsxs(dc,{size:"sm",className:"max-sm:w-auto",children:[w.jsx(be,{icon:t7,size:12,strokeWidth:2,className:"text-muted-foreground"}),w.jsx(uc,{children:a||"All Repos"})]}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"",children:"All Repos"}),u.map(f=>w.jsx(Rr,{value:f,children:f},f))]})]}),w.jsxs(ze,{variant:"ghost",size:"sm",onClick:()=>t(!0),className:"max-sm:px-2",children:[w.jsx(be,{icon:TX,size:14,strokeWidth:2,"data-slot":"icon"}),w.jsx("span",{className:"max-sm:hidden",children:"Select"})]})]})]})}),w.jsx("div",{className:"flex-1 overflow-hidden",children:w.jsx(_oe,{repoFilter:a})})]})}const Coe=ts("/settings/")({component:Eoe});function lh({title:e,children:t}){return w.jsxs("div",{className:"relative rounded-lg border border-border bg-card p-4 pt-6",children:[w.jsx("span",{className:"absolute -top-2.5 left-3 bg-card px-2 text-xs font-medium text-muted-foreground",children:e}),t]})}function Eoe(){const{data:e,isLoading:t}=Tre(),{data:n,isLoading:r}=Jk(),{data:i,isLoading:s}=vz(),{data:l,isLoading:a}=zb(),{data:c,isLoading:u}=Hb(),{data:h,isLoading:f}=kre(),{data:p,isLoading:v}=Ore(),{data:S,isLoading:x}=Pre(),g=Rre(),b=Are(),y=Mre(),_=Lre(),[T,E]=O.useState(""),[k,A]=O.useState(""),[R,L]=O.useState(""),[z,D]=O.useState(""),[$,N]=O.useState(""),[F,U]=O.useState(""),[H,K]=O.useState(""),[W,I]=O.useState(!1),[G,j]=O.useState(!1),[B,V]=O.useState(!1),[X,re]=O.useState(!1),[ie,Q]=O.useState(!1),[Y,J]=O.useState(""),[ee,ne]=O.useState(!1),[te,le]=O.useState(""),[fe,pe]=O.useState(!1),[de,ue]=O.useState(""),[Ie,Le]=O.useState("");O.useEffect(()=>{e!==void 0&&E(String(e)),n!==void 0&&A(n),i!==void 0&&L(i),l!==void 0&&D(l),c!==void 0&&N(String(c)),h!==void 0&&U(h),p!==void 0&&K(p)},[e,n,i,l,c,h,p]),O.useEffect(()=>{S&&(V(S.enabled),re(S.sound?.enabled??!1),Q(S.slack?.enabled??!1),J(S.slack?.webhookUrl??""),ne(S.discord?.enabled??!1),le(S.discord?.webhookUrl??""),pe(S.pushover?.enabled??!1),ue(S.pushover?.appToken??""),Le(S.pushover?.userKey??""))},[S]);const we=t||r||s||a||u||f||v||x,_e=S&&(B!==S.enabled||X!==(S.sound?.enabled??!1)||ie!==(S.slack?.enabled??!1)||Y!==(S.slack?.webhookUrl??"")||ee!==(S.discord?.enabled??!1)||te!==(S.discord?.webhookUrl??"")||fe!==(S.pushover?.enabled??!1)||de!==(S.pushover?.appToken??"")||Ie!==(S.pushover?.userKey??"")),Pe=T!==String(e)||k!==n||R!==i||z!==l||$!==String(c)||F!==h||H!==p||_e,me=async()=>{const Ee=[];if(T!==String(e)){const xe=parseInt(T,10);!isNaN(xe)&&xe>=1&&xe<=65535&&Ee.push(new Promise(Ce=>{g.mutate({key:Sn.PORT,value:xe},{onSettled:Ce})}))}if(k!==n&&Ee.push(new Promise(xe=>{g.mutate({key:Sn.DEFAULT_GIT_REPOS_DIR,value:k},{onSettled:xe})})),R!==i&&Ee.push(new Promise(xe=>{g.mutate({key:Sn.TASK_CREATION_COMMAND,value:R},{onSettled:xe})})),z!==l&&Ee.push(new Promise(xe=>{g.mutate({key:Sn.HOSTNAME,value:z},{onSettled:xe})})),$!==String(c)){const xe=parseInt($,10);!isNaN(xe)&&xe>=1&&xe<=65535&&Ee.push(new Promise(Ce=>{g.mutate({key:Sn.SSH_PORT,value:xe},{onSettled:Ce})}))}F!==h&&Ee.push(new Promise(xe=>{g.mutate({key:Sn.LINEAR_API_KEY,value:F},{onSettled:xe})})),H!==p&&Ee.push(new Promise(xe=>{g.mutate({key:Sn.GITHUB_PAT,value:H},{onSettled:xe})})),_e&&Ee.push(new Promise(xe=>{y.mutate({enabled:B,sound:{enabled:X},slack:{enabled:ie,webhookUrl:Y},discord:{enabled:ee,webhookUrl:te},pushover:{enabled:fe,appToken:de,userKey:Ie}},{onSettled:xe})})),await Promise.all(Ee),j(!0),setTimeout(()=>j(!1),2e3)},Ae=()=>{b.mutate(Sn.PORT,{onSuccess:Ee=>{Ee.value!==null&&E(String(Ee.value))}})},Te=()=>{b.mutate(Sn.DEFAULT_GIT_REPOS_DIR,{onSuccess:Ee=>{Ee.value&&A(String(Ee.value))}})},We=()=>{b.mutate(Sn.TASK_CREATION_COMMAND,{onSuccess:Ee=>{Ee.value!==null&&Ee.value!==void 0&&L(String(Ee.value))}})},rt=()=>{b.mutate(Sn.HOSTNAME,{onSuccess:Ee=>{Ee.value!==null&&Ee.value!==void 0&&D(String(Ee.value))}})},Ue=()=>{b.mutate(Sn.SSH_PORT,{onSuccess:Ee=>{Ee.value!==null&&Ee.value!==void 0&&N(String(Ee.value))}})},ot=()=>{b.mutate(Sn.LINEAR_API_KEY,{onSuccess:Ee=>{U(Ee.value!==null&&Ee.value!==void 0?String(Ee.value):"")}})},tt=()=>{b.mutate(Sn.GITHUB_PAT,{onSuccess:Ee=>{K(Ee.value!==null&&Ee.value!==void 0?String(Ee.value):"")}})},mt=async Ee=>{_.mutate(Ee,{onSuccess:xe=>{xe.success?ei.success(`${Ee} test successful`):ei.error(`${Ee} test failed: ${xe.error}`)},onError:xe=>{ei.error(`Test failed: ${xe.message}`)}})};return w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsx("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:w.jsx("h1",{className:"text-sm font-medium",children:"Settings"})}),w.jsx("div",{className:"pixel-grid flex-1 overflow-auto p-6",children:w.jsxs("div",{className:"mx-auto max-w-5xl space-y-4",children:[w.jsx(lh,{title:"Server & Defaults",children:w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-32 sm:shrink-0",children:"Port"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(nn,{type:"number",min:1,max:65535,value:T,onChange:Ee=>E(Ee.target.value),placeholder:"3333",disabled:we,className:"w-24 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:Ae,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-32 sm:pl-2",children:"Requires restart"})]}),w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-32 sm:shrink-0",children:"Startup Command"}),w.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[w.jsx(nn,{value:R,onChange:Ee=>L(Ee.target.value),placeholder:"claude --dangerously-skip-permissions",disabled:we,className:"flex-1 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:We,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-32 sm:pl-2",children:"Command for new task terminals"})]})]})}),w.jsx(lh,{title:"Paths",children:w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-32 sm:shrink-0",children:"Git Repos Directory"}),w.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[w.jsx(nn,{value:k,onChange:Ee=>A(Ee.target.value),placeholder:"~/projects",disabled:we,className:"flex-1 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>I(!0),disabled:we,title:"Browse",children:w.jsx(be,{icon:Qi,size:14,strokeWidth:2})}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:Te,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-32 sm:pl-2",children:"Starting directory for repo picker"})]})}),w.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[w.jsx(lh,{title:"Remote Access",children:w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-20 sm:shrink-0",children:"Hostname"}),w.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[w.jsx(nn,{value:z,onChange:Ee=>D(Ee.target.value),placeholder:"e.g., citadel",disabled:we,className:"flex-1 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:rt,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-20 sm:pl-2",children:"For VS Code SSH URLs"})]}),w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-20 sm:shrink-0",children:"SSH Port"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(nn,{type:"number",min:1,max:65535,value:$,onChange:Ee=>N(Ee.target.value),placeholder:"22",disabled:we,className:"w-20 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:Ue,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-20 sm:pl-2",children:"Remote connection port"})]})]})}),w.jsx(lh,{title:"Integrations",children:w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-20 sm:shrink-0",children:"Linear"}),w.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[w.jsx(nn,{type:"password",value:F,onChange:Ee=>U(Ee.target.value),placeholder:"lin_api_...",disabled:we,className:"flex-1 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:ot,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-20 sm:pl-2",children:"API key for ticket sync"})]}),w.jsxs("div",{className:"space-y-1",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-20 sm:shrink-0",children:"GitHub"}),w.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[w.jsx(nn,{type:"password",value:H,onChange:Ee=>K(Ee.target.value),placeholder:"ghp_...",disabled:we,className:"flex-1 font-mono text-sm"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:tt,disabled:we||b.isPending,title:"Reset to default",children:w.jsx(be,{icon:Al,size:14,strokeWidth:2})})]})]}),w.jsx("p",{className:"text-xs text-muted-foreground sm:ml-20 sm:pl-2",children:"PAT for Issues & PRs"})]})]})})]}),w.jsx(lh,{title:"Notifications",children:w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[w.jsx("label",{className:"text-sm text-muted-foreground sm:w-40 sm:shrink-0",children:"Enable Notifications"}),w.jsx(Hl,{checked:B,onCheckedChange:V,disabled:we})]}),w.jsx("div",{className:"space-y-2 pl-4",children:w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(Hl,{checked:X,onCheckedChange:re,disabled:we||!B}),w.jsx("label",{className:"text-sm text-muted-foreground",children:"Sound (macOS only)"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"ml-auto h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>mt("sound"),disabled:we||!B||!X||_.isPending,title:"Test sound",children:_.isPending?w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}):w.jsx(be,{icon:Dg,size:14,strokeWidth:2})})]})}),w.jsxs("div",{className:"space-y-2 pl-4",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(Hl,{checked:ie,onCheckedChange:Q,disabled:we||!B}),w.jsx("label",{className:"text-sm text-muted-foreground",children:"Slack"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"ml-auto h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>mt("slack"),disabled:we||!B||!ie||!Y||_.isPending,title:"Test Slack",children:_.isPending?w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}):w.jsx(be,{icon:Dg,size:14,strokeWidth:2})})]}),ie&&w.jsx(nn,{type:"password",value:Y,onChange:Ee=>J(Ee.target.value),placeholder:"https://hooks.slack.com/services/...",disabled:we||!B,className:"ml-6 flex-1 font-mono text-sm"})]}),w.jsxs("div",{className:"space-y-2 pl-4",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(Hl,{checked:ee,onCheckedChange:ne,disabled:we||!B}),w.jsx("label",{className:"text-sm text-muted-foreground",children:"Discord"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"ml-auto h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>mt("discord"),disabled:we||!B||!ee||!te||_.isPending,title:"Test Discord",children:_.isPending?w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}):w.jsx(be,{icon:Dg,size:14,strokeWidth:2})})]}),ee&&w.jsx(nn,{type:"password",value:te,onChange:Ee=>le(Ee.target.value),placeholder:"https://discord.com/api/webhooks/...",disabled:we||!B,className:"ml-6 flex-1 font-mono text-sm"})]}),w.jsxs("div",{className:"space-y-2 pl-4",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(Hl,{checked:fe,onCheckedChange:pe,disabled:we||!B}),w.jsx("label",{className:"text-sm text-muted-foreground",children:"Pushover"}),w.jsx(ze,{variant:"ghost",size:"icon",className:"ml-auto h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>mt("pushover"),disabled:we||!B||!fe||!de||!Ie||_.isPending,title:"Test Pushover",children:_.isPending?w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}):w.jsx(be,{icon:Dg,size:14,strokeWidth:2})})]}),fe&&w.jsxs("div",{className:"ml-6 space-y-2",children:[w.jsx(nn,{type:"password",value:de,onChange:Ee=>ue(Ee.target.value),placeholder:"App Token",disabled:we||!B,className:"flex-1 font-mono text-sm"}),w.jsx(nn,{type:"password",value:Ie,onChange:Ee=>Le(Ee.target.value),placeholder:"User Key",disabled:we||!B,className:"flex-1 font-mono text-sm"})]})]})]})}),w.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[G&&w.jsxs("span",{className:"flex items-center gap-1 text-xs text-emerald-500",children:[w.jsx(be,{icon:Pc,size:12,strokeWidth:2}),"Saved"]}),w.jsx(ze,{size:"sm",onClick:me,disabled:!Pe||we||g.isPending,children:"Save Changes"})]})]})}),w.jsx(tO,{open:W,onOpenChange:I,onSelect:Ee=>A(Ee),initialPath:k||void 0})]})}const Ub="";function Toe(){return ar({queryKey:["github-user"],queryFn:async()=>{const e=await fetch(`${Ub}/api/github/user`);return e.ok?e.json():null},staleTime:600*1e3,retry:!1})}function koe(){return ar({queryKey:["github-orgs"],queryFn:async()=>{const e=await fetch(`${Ub}/api/github/orgs`);return e.ok?e.json():[]},staleTime:600*1e3})}function Ooe(e,t,n){return ar({queryKey:["github-issues",e,t,n],queryFn:async()=>{const r=new URLSearchParams({filter:e});t&&r.set("viboraReposOnly","true"),n&&r.set("org",n);const i=await fetch(`${Ub}/api/github/issues?${r}`);if(!i.ok)throw new Error("Failed to fetch issues");return i.json()},staleTime:300*1e3})}function Roe(e,t,n){return ar({queryKey:["github-prs",e,t,n],queryFn:async()=>{const r=new URLSearchParams({filter:e});t&&r.set("viboraReposOnly","true"),n&&r.set("org",n);const i=await fetch(`${Ub}/api/github/prs?${r}`);if(!i.ok)throw new Error("Failed to fetch PRs");return i.json()},staleTime:300*1e3})}function Aoe({filter:e,viboraReposOnly:t,org:n}){const{data:r,isLoading:i,error:s}=Ooe(e,t,n);if(i)return w.jsx("div",{className:"flex h-48 items-center justify-center",children:w.jsx(be,{icon:Fr,size:24,className:"animate-spin text-muted-foreground"})});if(s)return w.jsxs("div",{className:"flex h-48 flex-col items-center justify-center gap-2 text-muted-foreground",children:[w.jsx(be,{icon:Md,size:24}),w.jsx("p",{className:"text-sm",children:"Failed to load issues"}),w.jsx("p",{className:"text-xs",children:s.message})]});const l={assigned:"No issues assigned to you",created:"No issues created by you",mentioned:"No issues mentioning you"};return r?.length?w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"text-xs text-muted-foreground",children:[r.length," result",r.length!==1?"s":""]}),w.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:r.map(a=>w.jsx(Poe,{issue:a},a.id))})]}):w.jsxs("div",{className:"flex h-48 flex-col items-center justify-center gap-2 text-muted-foreground",children:[w.jsx(be,{icon:Pc,size:24}),w.jsx("p",{className:"text-sm",children:l[e]})]})}function Poe({issue:e}){return w.jsx(jo,{className:"transition-colors hover:border-border/80",children:w.jsx(em,{className:"py-4",children:w.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"block space-y-2",children:[w.jsx("div",{className:"flex items-start gap-2",children:w.jsx("span",{className:"line-clamp-2 text-sm font-medium",children:e.title})}),w.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:w.jsxs("span",{className:"font-mono",children:[e.repository.fullName,"#",e.number]})}),e.labels.length>0&&w.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.labels.slice(0,3).map(t=>w.jsx(hc,{className:"text-xs",style:{backgroundColor:`#${t.color}20`,color:`#${t.color}`,borderColor:`#${t.color}40`},children:t.name},t.name)),e.labels.length>3&&w.jsxs(hc,{variant:"secondary",className:"text-xs",children:["+",e.labels.length-3]})]})]})})})}function Moe({filter:e,viboraReposOnly:t,org:n}){const{data:r,isLoading:i,error:s}=Roe(e,t,n);if(i)return w.jsx("div",{className:"flex h-48 items-center justify-center",children:w.jsx(be,{icon:Fr,size:24,className:"animate-spin text-muted-foreground"})});if(s)return w.jsxs("div",{className:"flex h-48 flex-col items-center justify-center gap-2 text-muted-foreground",children:[w.jsx(be,{icon:Md,size:24}),w.jsx("p",{className:"text-sm",children:"Failed to load pull requests"}),w.jsx("p",{className:"text-xs",children:s.message})]});const l={all:"No open pull requests",created:"No pull requests created by you",assigned:"No pull requests assigned to you",review_requested:"No pull requests awaiting your review",mentioned:"No pull requests mentioning you"};return r?.length?w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"text-xs text-muted-foreground",children:[r.length," result",r.length!==1?"s":""]}),w.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:r.map(a=>w.jsx(Loe,{pr:a},a.id))})]}):w.jsxs("div",{className:"flex h-48 flex-col items-center justify-center gap-2 text-muted-foreground",children:[w.jsx(be,{icon:Pc,size:24}),w.jsx("p",{className:"text-sm",children:l[e]})]})}function Loe({pr:e}){return w.jsx(jo,{className:"transition-colors hover:border-border/80",children:w.jsx(em,{className:"py-4",children:w.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"block space-y-2",children:[w.jsx("div",{className:"flex items-start gap-2",children:w.jsx("span",{className:"line-clamp-2 text-sm font-medium",children:e.title})}),w.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsxs("span",{className:"font-mono",children:[e.repository.fullName,"#",e.number]}),e.draft&&w.jsx(hc,{variant:"secondary",className:Be("text-xs","bg-amber-400/20 text-amber-600 dark:text-amber-400"),children:"Draft"})]}),w.jsxs("div",{className:"flex items-center gap-2",children:[e.author.avatarUrl&&w.jsx("img",{src:e.author.avatarUrl,alt:e.author.login,className:"h-4 w-4 rounded-full"}),w.jsx("span",{className:"text-xs text-muted-foreground",children:e.author.login})]}),e.labels.length>0&&w.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.labels.slice(0,3).map(t=>w.jsx(hc,{className:"text-xs",style:{backgroundColor:`#${t.color}20`,color:`#${t.color}`,borderColor:`#${t.color}40`},children:t.name},t.name)),e.labels.length>3&&w.jsxs(hc,{variant:"secondary",className:"text-xs",children:["+",e.labels.length-3]})]})]})})})}const joe=ts("/review/")({component:Doe});function Doe(){const[e,t]=O.useState("prs"),[n,r]=O.useState("review_requested"),[i,s]=O.useState("assigned"),[l,a]=O.useState(!1),[c,u]=O.useState(""),{data:h,isLoading:f}=Toe(),{data:p=[]}=koe();return!f&&!h?w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsx("div",{className:"flex shrink-0 items-center border-b border-border px-4 py-2",children:w.jsx("h1",{className:"text-sm font-medium",children:"Review"})}),w.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:w.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[w.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:w.jsx(be,{icon:NX,size:24,className:"text-muted-foreground"})}),w.jsx("h2",{className:"text-lg font-medium",children:"GitHub Token Required"}),w.jsx("p",{className:"text-sm text-muted-foreground",children:"To view your issues and pull requests, add a GitHub Personal Access Token in Settings."}),w.jsxs("div",{className:"rounded-lg border border-border bg-muted/50 p-4 text-left",children:[w.jsx("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Required scopes:"}),w.jsxs("ul",{className:"space-y-1 text-xs text-muted-foreground",children:[w.jsxs("li",{children:["• ",w.jsx("code",{className:"rounded bg-muted px-1",children:"repo"})," (for private repositories)"]}),w.jsxs("li",{children:["• ",w.jsx("code",{className:"rounded bg-muted px-1",children:"read:user"})," (for user info)"]}),w.jsxs("li",{children:["• ",w.jsx("code",{className:"rounded bg-muted px-1",children:"read:org"})," (for organization list)"]})]})]}),w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user,read:org&description=Vibora",target:"_blank",rel:"noopener noreferrer",children:w.jsxs(ze,{variant:"outline",size:"sm",className:"w-full",children:[w.jsx(be,{icon:BX,size:14,"data-slot":"icon"}),"Generate Token"]})}),w.jsx(er,{to:"/settings",children:w.jsx(ze,{size:"sm",className:"w-full",children:"Go to Settings"})})]})]})})]}):w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2 max-sm:px-2",children:[w.jsx("div",{className:"flex items-center gap-4 max-sm:gap-2",children:w.jsx("h1",{className:"text-sm font-medium max-sm:hidden",children:"Review"})}),w.jsxs("div",{className:"flex items-center gap-4 max-sm:gap-2",children:[e==="prs"?w.jsxs(cc,{value:n,onValueChange:v=>r(v),children:[w.jsx(dc,{size:"sm",className:"max-sm:w-auto",children:w.jsx(uc,{})}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"created",children:"Created by me"}),w.jsx(Rr,{value:"assigned",children:"Assigned to me"}),w.jsx(Rr,{value:"review_requested",children:"Review requests"}),w.jsx(Rr,{value:"mentioned",children:"Mentioned"})]})]}):w.jsxs(cc,{value:i,onValueChange:v=>s(v),children:[w.jsx(dc,{size:"sm",className:"max-sm:w-auto",children:w.jsx(uc,{})}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"assigned",children:"Assigned to me"}),w.jsx(Rr,{value:"created",children:"Created by me"}),w.jsx(Rr,{value:"mentioned",children:"Mentioned"})]})]}),w.jsxs(cc,{value:c,onValueChange:v=>u(v||""),children:[w.jsx(dc,{size:"sm",className:"max-sm:w-auto",children:w.jsx(uc,{children:c||"All Orgs"})}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"",children:"All Organizations"}),p.map(v=>w.jsx(Rr,{value:v.login,children:v.login},v.login))]})]}),w.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-xs",title:"Vibora repos only",children:[w.jsx(Hl,{checked:l,onCheckedChange:a,disabled:!!c}),w.jsx("span",{className:"text-muted-foreground max-sm:hidden",children:"Vibora repos only"})]})]})]}),w.jsxs(qa,{value:e,onValueChange:v=>t(v),className:"flex flex-1 flex-col overflow-hidden",children:[w.jsx("div",{className:"shrink-0 border-b border-border px-4",children:w.jsxs(Wa,{variant:"line",children:[w.jsx(Sr,{value:"prs",children:"Pull Requests"}),w.jsx(Sr,{value:"issues",children:"Issues"})]})}),w.jsx(Ar,{value:"prs",className:"flex-1 overflow-auto p-4",children:w.jsx(Moe,{filter:n,viboraReposOnly:l,org:c||void 0})}),w.jsx(Ar,{value:"issues",className:"flex-1 overflow-auto p-4",children:w.jsx(Aoe,{filter:i,viboraReposOnly:l,org:c||void 0})})]})]})}function ry(e,t,n){return t?`vscode://vscode-remote/ssh-remote+${n!==22?`${t}:${n}`:t}${e}`:`vscode://file${e}`}const Ioe=ts("/repositories/")({component:zoe});function Noe({repository:e,onDelete:t}){const[n,r]=O.useState(!1),[i,s]=O.useState(!1),{data:l}=zb(),{data:a}=Hb(),c=h=>{h.preventDefault(),h.stopPropagation();const f=ry(e.path,l,a);window.open(f,"_blank")},u=async h=>{h.preventDefault(),h.stopPropagation(),s(!0);try{await t(),r(!1)}catch{}finally{s(!1)}};return w.jsxs("div",{className:"relative h-full",children:[w.jsx(er,{to:"/repositories/$repoId",params:{repoId:e.id},className:"block h-full",children:w.jsx(jo,{className:"h-full transition-colors hover:border-border/80 cursor-pointer",children:w.jsxs(em,{className:"flex flex-col gap-2 py-4",children:[w.jsxs("div",{className:"flex items-center justify-between gap-2",children:[w.jsx("span",{className:"min-w-0 truncate font-medium",children:e.displayName}),w.jsxs("div",{className:"flex shrink-0 gap-1",children:[w.jsx("div",{className:"size-6"}),w.jsx("div",{className:"size-6"})]})]}),w.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:Qi,size:12,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{className:"truncate font-mono",children:e.path})]}),e.startupScript&&w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:dk,size:12,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{className:"truncate font-mono",children:e.startupScript})]}),e.copyFiles&&w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx(be,{icon:RX,size:12,strokeWidth:2,className:"shrink-0"}),w.jsx("span",{className:"truncate font-mono",children:e.copyFiles})]})]})]})})}),w.jsxs("div",{className:"absolute right-3 top-3 flex gap-1",children:[w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:c,className:"shrink-0 text-muted-foreground hover:text-foreground",title:"Open in VS Code",children:w.jsx(be,{icon:pk,size:14,strokeWidth:2})}),w.jsxs(Hd,{open:n,onOpenChange:r,children:[w.jsx($d,{render:w.jsx(ze,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-muted-foreground hover:text-destructive"}),children:w.jsx(be,{icon:Fp,size:14,strokeWidth:2})}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsx(qd,{children:"Delete Repository"}),w.jsxs(Wd,{children:['This will remove "',e.displayName,'" from Vibora. The actual repository files will not be affected.']})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{disabled:i,children:"Cancel"}),w.jsxs(ze,{variant:"destructive",onClick:u,disabled:i,className:"gap-2",children:[i&&w.jsx(be,{icon:Fr,size:14,strokeWidth:2,className:"animate-spin"}),i?"Deleting...":"Delete"]})]})]})]})]})]})}function Boe(){const[e,t]=O.useState(!1),[n,r]=O.useState(!1),[i,s]=O.useState(""),[l,a]=O.useState(""),[c,u]=O.useState(""),[h,f]=O.useState(""),p=yz(),{data:v}=Jk(),S=b=>{s(b),l||a(b.split("/").pop()||"")},x=b=>{b.preventDefault(),i.trim()&&p.mutate({path:i.trim(),displayName:l.trim()||i.split("/").pop()||"repo",startupScript:c.trim()||null,copyFiles:h.trim()||null},{onSuccess:()=>{t(!1),s(""),a(""),u(""),f("")}})},g=i?i.split("/").pop():"";return w.jsxs(w.Fragment,{children:[w.jsxs(bs,{open:e,onOpenChange:t,children:[w.jsxs(vB,{render:w.jsx(ze,{size:"sm"}),children:[w.jsx(be,{icon:Ld,size:16,strokeWidth:2,"data-slot":"icon"}),"Add Repository"]}),w.jsx(_s,{className:"sm:max-w-md",children:w.jsxs("form",{onSubmit:x,children:[w.jsxs($s,{children:[w.jsx(Fs,{children:"Add Repository"}),w.jsx(Gl,{children:"Add a git repository for quick access when creating tasks."})]}),w.jsxs(Qp,{className:"mt-4",children:[w.jsxs(Un,{children:[w.jsx(Vn,{children:"Repository Path"}),w.jsxs(ze,{type:"button",variant:"outline",className:"w-full justify-start font-normal",onClick:()=>r(!0),children:[w.jsx(be,{icon:Qi,size:14,strokeWidth:2,className:"mr-2"}),g?w.jsx("span",{className:"truncate",children:i}):w.jsx("span",{className:"text-muted-foreground",children:"Select repository..."})]})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"displayName",children:"Display Name"}),w.jsx(nn,{id:"displayName",value:l,onChange:b=>a(b.target.value),placeholder:g||"My Project"})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"startupScript",children:"Startup Script"}),w.jsx(Ik,{id:"startupScript",value:c,onChange:b=>u(b.target.value),placeholder:"npm install && npm run dev",rows:2}),w.jsx(La,{children:"Command to run in the terminal when creating a worktree."})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"copyFiles",children:"Copy Files"}),w.jsx(nn,{id:"copyFiles",value:h,onChange:b=>f(b.target.value),placeholder:".env, config.local.json"}),w.jsx(La,{children:"Comma-separated glob patterns for files to copy into new worktrees."})]})]}),w.jsxs(Va,{className:"mt-4",children:[w.jsx(Dk,{render:w.jsx(ze,{variant:"outline",type:"button"}),children:"Cancel"}),w.jsx(ze,{type:"submit",disabled:p.isPending||!i.trim(),children:p.isPending?"Adding...":"Add Repository"})]})]})})]}),w.jsx(tO,{open:n,onOpenChange:r,onSelect:S,initialPath:v||void 0})]})}function zoe(){const{data:e,isLoading:t,error:n}=eO(),r=bz(),i=async s=>{await r.mutateAsync(s)};return w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:[w.jsxs("div",{className:"flex items-center gap-4",children:[w.jsx("h1",{className:"text-sm font-medium",children:"Repositories"}),e&&w.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.length," total"]})]}),w.jsx(Boe,{})]}),w.jsxs("div",{className:"pixel-grid flex-1 overflow-auto p-4",children:[t&&w.jsx("div",{className:"flex items-center justify-center py-12",children:w.jsx(be,{icon:Fr,size:24,strokeWidth:2,className:"animate-spin text-muted-foreground"})}),n&&w.jsxs("div",{className:"flex items-center gap-3 py-6 text-destructive",children:[w.jsx(be,{icon:Md,size:20,strokeWidth:2}),w.jsxs("span",{className:"text-sm",children:["Failed to load repositories: ",n.message]})]}),!t&&!n&&e?.length===0&&w.jsx("div",{className:"py-12 text-muted-foreground",children:w.jsx("p",{className:"text-sm",children:"No repositories added yet. Add a repository for quick access when creating tasks."})}),w.jsx("div",{className:"grid auto-rows-fr grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:e?.map(s=>w.jsx(Noe,{repository:s,onDelete:()=>i(s.id)},s.id))})]})]})}var Sx,Lj;function si(){if(Lj)return Sx;Lj=1;var e=Array.isArray;return Sx=e,Sx}var wx,jj;function yH(){if(jj)return wx;jj=1;var e=typeof Tg=="object"&&Tg&&Tg.Object===Object&&Tg;return wx=e,wx}var Cx,Dj;function ro(){if(Dj)return Cx;Dj=1;var e=yH(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Cx=n,Cx}var Ex,Ij;function im(){if(Ij)return Ex;Ij=1;var e=ro(),t=e.Symbol;return Ex=t,Ex}var Tx,Nj;function Hoe(){if(Nj)return Tx;Nj=1;var e=im(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(l){var a=n.call(l,i),c=l[i];try{l[i]=void 0;var u=!0}catch{}var h=r.call(l);return u&&(a?l[i]=c:delete l[i]),h}return Tx=s,Tx}var kx,Bj;function $oe(){if(Bj)return kx;Bj=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return kx=n,kx}var Ox,zj;function Yo(){if(zj)return Ox;zj=1;var e=im(),t=Hoe(),n=$oe(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function l(a){return a==null?a===void 0?i:r:s&&s in Object(a)?t(a):n(a)}return Ox=l,Ox}var Rx,Hj;function Xo(){if(Hj)return Rx;Hj=1;function e(t){return t!=null&&typeof t=="object"}return Rx=e,Rx}var Ax,$j;function Yd(){if($j)return Ax;$j=1;var e=Yo(),t=Xo(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Ax=r,Ax}var Px,Fj;function fO(){if(Fj)return Px;Fj=1;var e=si(),t=Yd(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,l){if(e(s))return!1;var a=typeof s;return a=="number"||a=="symbol"||a=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return Px=i,Px}var Mx,Uj;function sl(){if(Uj)return Mx;Uj=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Mx=e,Mx}var Lx,Vj;function hO(){if(Vj)return Lx;Vj=1;var e=Yo(),t=sl(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function l(a){if(!t(a))return!1;var c=e(a);return c==r||c==i||c==n||c==s}return Lx=l,Lx}var jx,qj;function Foe(){if(qj)return jx;qj=1;var e=ro(),t=e["__core-js_shared__"];return jx=t,jx}var Dx,Wj;function Uoe(){if(Wj)return Dx;Wj=1;var e=Foe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Dx=n,Dx}var Ix,Gj;function bH(){if(Gj)return Ix;Gj=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ix=n,Ix}var Nx,Kj;function Voe(){if(Kj)return Nx;Kj=1;var e=hO(),t=Uoe(),n=sl(),r=bH(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,a=Object.prototype,c=l.toString,u=a.hasOwnProperty,h=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||t(p))return!1;var v=e(p)?h:s;return v.test(r(p))}return Nx=f,Nx}var Bx,Yj;function qoe(){if(Yj)return Bx;Yj=1;function e(t,n){return t?.[n]}return Bx=e,Bx}var zx,Xj;function zc(){if(Xj)return zx;Xj=1;var e=Voe(),t=qoe();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return zx=n,zx}var Hx,Qj;function Vb(){if(Qj)return Hx;Qj=1;var e=zc(),t=e(Object,"create");return Hx=t,Hx}var $x,Zj;function Woe(){if(Zj)return $x;Zj=1;var e=Vb();function t(){this.__data__=e?e(null):{},this.size=0}return $x=t,$x}var Fx,Jj;function Goe(){if(Jj)return Fx;Jj=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Fx=e,Fx}var Ux,eD;function Koe(){if(eD)return Ux;eD=1;var e=Vb(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var l=this.__data__;if(e){var a=l[s];return a===t?void 0:a}return r.call(l,s)?l[s]:void 0}return Ux=i,Ux}var Vx,tD;function Yoe(){if(tD)return Vx;tD=1;var e=Vb(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return Vx=r,Vx}var qx,nD;function Xoe(){if(nD)return qx;nD=1;var e=Vb(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return qx=n,qx}var Wx,rD;function Qoe(){if(rD)return Wx;rD=1;var e=Woe(),t=Goe(),n=Koe(),r=Yoe(),i=Xoe();function s(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var u=l[a];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,Wx=s,Wx}var Gx,iD;function Zoe(){if(iD)return Gx;iD=1;function e(){this.__data__=[],this.size=0}return Gx=e,Gx}var Kx,sD;function pO(){if(sD)return Kx;sD=1;function e(t,n){return t===n||t!==t&&n!==n}return Kx=e,Kx}var Yx,oD;function qb(){if(oD)return Yx;oD=1;var e=pO();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Yx=t,Yx}var Xx,aD;function Joe(){if(aD)return Xx;aD=1;var e=qb(),t=Array.prototype,n=t.splice;function r(i){var s=this.__data__,l=e(s,i);if(l<0)return!1;var a=s.length-1;return l==a?s.pop():n.call(s,l,1),--this.size,!0}return Xx=r,Xx}var Qx,lD;function eae(){if(lD)return Qx;lD=1;var e=qb();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Qx=t,Qx}var Zx,cD;function tae(){if(cD)return Zx;cD=1;var e=qb();function t(n){return e(this.__data__,n)>-1}return Zx=t,Zx}var Jx,uD;function nae(){if(uD)return Jx;uD=1;var e=qb();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return Jx=t,Jx}var eS,dD;function Wb(){if(dD)return eS;dD=1;var e=Zoe(),t=Joe(),n=eae(),r=tae(),i=nae();function s(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var u=l[a];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,eS=s,eS}var tS,fD;function mO(){if(fD)return tS;fD=1;var e=zc(),t=ro(),n=e(t,"Map");return tS=n,tS}var nS,hD;function rae(){if(hD)return nS;hD=1;var e=Qoe(),t=Wb(),n=mO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return nS=r,nS}var rS,pD;function iae(){if(pD)return rS;pD=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return rS=e,rS}var iS,mD;function Gb(){if(mD)return iS;mD=1;var e=iae();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return iS=t,iS}var sS,gD;function sae(){if(gD)return sS;gD=1;var e=Gb();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return sS=t,sS}var oS,vD;function oae(){if(vD)return oS;vD=1;var e=Gb();function t(n){return e(this,n).get(n)}return oS=t,oS}var aS,yD;function aae(){if(yD)return aS;yD=1;var e=Gb();function t(n){return e(this,n).has(n)}return aS=t,aS}var lS,bD;function lae(){if(bD)return lS;bD=1;var e=Gb();function t(n,r){var i=e(this,n),s=i.size;return i.set(n,r),this.size+=i.size==s?0:1,this}return lS=t,lS}var cS,_D;function gO(){if(_D)return cS;_D=1;var e=rae(),t=sae(),n=oae(),r=aae(),i=lae();function s(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var u=l[a];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,cS=s,cS}var uS,xD;function _H(){if(xD)return uS;xD=1;var e=gO(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var l=arguments,a=i?i.apply(this,l):l[0],c=s.cache;if(c.has(a))return c.get(a);var u=r.apply(this,l);return s.cache=c.set(a,u)||c,u};return s.cache=new(n.Cache||e),s}return n.Cache=e,uS=n,uS}var dS,SD;function cae(){if(SD)return dS;SD=1;var e=_H(),t=500;function n(r){var i=e(r,function(l){return s.size===t&&s.clear(),l}),s=i.cache;return i}return dS=n,dS}var fS,wD;function uae(){if(wD)return fS;wD=1;var e=cae(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(l,a,c,u){s.push(c?u.replace(n,"$1"):a||l)}),s});return fS=r,fS}var hS,CD;function vO(){if(CD)return hS;CD=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return hS=e,hS}var pS,ED;function dae(){if(ED)return pS;ED=1;var e=im(),t=vO(),n=si(),r=Yd(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function l(a){if(typeof a=="string")return a;if(n(a))return t(a,l)+"";if(r(a))return s?s.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return pS=l,pS}var mS,TD;function xH(){if(TD)return mS;TD=1;var e=dae();function t(n){return n==null?"":e(n)}return mS=t,mS}var gS,kD;function SH(){if(kD)return gS;kD=1;var e=si(),t=fO(),n=uae(),r=xH();function i(s,l){return e(s)?s:t(s,l)?[s]:n(r(s))}return gS=i,gS}var vS,OD;function Kb(){if(OD)return vS;OD=1;var e=Yd();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return vS=t,vS}var yS,RD;function yO(){if(RD)return yS;RD=1;var e=SH(),t=Kb();function n(r,i){i=e(i,r);for(var s=0,l=i.length;r!=null&&s<l;)r=r[t(i[s++])];return s&&s==l?r:void 0}return yS=n,yS}var bS,AD;function wH(){if(AD)return bS;AD=1;var e=yO();function t(n,r,i){var s=n==null?void 0:e(n,r);return s===void 0?i:s}return bS=t,bS}var fae=wH();const es=sn(fae);var _S,PD;function hae(){if(PD)return _S;PD=1;function e(t){return t==null}return _S=e,_S}var pae=hae();const It=sn(pae);var xS,MD;function mae(){if(MD)return xS;MD=1;var e=Yo(),t=si(),n=Xo(),r="[object String]";function i(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return xS=i,xS}var gae=mae();const Ec=sn(gae);var vae=hO();const Ct=sn(vae);var yae=sl();const Xd=sn(yae);var SS={exports:{}},Wt={};var LD;function bae(){if(LD)return Wt;LD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function x(g){if(typeof g=="object"&&g!==null){var b=g.$$typeof;switch(b){case e:switch(g=g.type,g){case n:case i:case r:case u:case h:return g;default:switch(g=g&&g.$$typeof,g){case a:case l:case c:case p:case f:case s:return g;default:return b}}case t:return b}}}return Wt.ContextConsumer=l,Wt.ContextProvider=s,Wt.Element=e,Wt.ForwardRef=c,Wt.Fragment=n,Wt.Lazy=p,Wt.Memo=f,Wt.Portal=t,Wt.Profiler=i,Wt.StrictMode=r,Wt.Suspense=u,Wt.SuspenseList=h,Wt.isAsyncMode=function(){return!1},Wt.isConcurrentMode=function(){return!1},Wt.isContextConsumer=function(g){return x(g)===l},Wt.isContextProvider=function(g){return x(g)===s},Wt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Wt.isForwardRef=function(g){return x(g)===c},Wt.isFragment=function(g){return x(g)===n},Wt.isLazy=function(g){return x(g)===p},Wt.isMemo=function(g){return x(g)===f},Wt.isPortal=function(g){return x(g)===t},Wt.isProfiler=function(g){return x(g)===i},Wt.isStrictMode=function(g){return x(g)===r},Wt.isSuspense=function(g){return x(g)===u},Wt.isSuspenseList=function(g){return x(g)===h},Wt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===i||g===r||g===u||g===h||g===v||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===f||g.$$typeof===s||g.$$typeof===l||g.$$typeof===c||g.$$typeof===S||g.getModuleId!==void 0)},Wt.typeOf=x,Wt}var jD;function _ae(){return jD||(jD=1,SS.exports=bae()),SS.exports}var xae=_ae(),wS,DD;function CH(){if(DD)return wS;DD=1;var e=Yo(),t=Xo(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return wS=r,wS}var CS,ID;function Sae(){if(ID)return CS;ID=1;var e=CH();function t(n){return e(n)&&n!=+n}return CS=t,CS}var wae=Sae();const Qd=sn(wae);var Cae=CH();const Eae=sn(Cae);var Ss=function(t){return t===0?0:t>0?1:-1},Xl=function(t){return Ec(t)&&t.indexOf("%")===t.length-1},$e=function(t){return Eae(t)&&!Qd(t)},Tae=function(t){return It(t)},or=function(t){return $e(t)||Ec(t)},kae=0,sm=function(t){var n=++kae;return"".concat(t||"").concat(n)},Tc=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!$e(t)&&!Ec(t))return r;var s;if(Xl(t)){var l=t.indexOf("%");s=n*parseFloat(t.slice(0,l))/100}else s=+t;return Qd(s)&&(s=r),i&&s>n&&(s=n),s},Ra=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Oae=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Wi=function(t,n){return $e(t)&&$e(n)?function(r){return t+r*(n-t)}:function(){return n}};function iy(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):es(r,t))===n})}var Rae=function(t,n){return $e(t)&&$e(n)?t-n:Ec(t)&&Ec(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Uu(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function m2(e){"@babel/helpers - typeof";return m2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m2(e)}var Aae=["viewBox","children"],Pae=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],ND=["points","pathLength"],ES={svg:Aae,polygon:ND,polyline:ND},bO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],sy=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(O.isValidElement(t)&&(r=t.props),!Xd(r))return null;var i={};return Object.keys(r).forEach(function(s){bO.includes(s)&&(i[s]=n||function(l){return r[s](r,l)})}),i},Mae=function(t,n,r){return function(i){return t(n,r,i),null}},oy=function(t,n,r){if(!Xd(t)||m2(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var l=t[s];bO.includes(s)&&typeof l=="function"&&(i||(i={}),i[s]=Mae(l,n,r))}),i},Lae=["children"],jae=["children"];function BD(e,t){if(e==null)return{};var n=Dae(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function g2(e){"@babel/helpers - typeof";return g2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g2(e)}var zD={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Do=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},HD=null,TS=null,_O=function e(t){if(t===HD&&Array.isArray(TS))return TS;var n=[];return O.Children.forEach(t,function(r){It(r)||(xae.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),TS=n,HD=t,n};function ws(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Do(i)}):r=[Do(t)],_O(e).forEach(function(i){var s=es(i,"type.displayName")||es(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function _i(e,t){var n=ws(e,t);return n&&n[0]}var $D=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!$e(r)||r<=0||!$e(i)||i<=0)},Iae=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Nae=function(t){return t&&t.type&&Ec(t.type)&&Iae.indexOf(t.type)>=0},Bae=function(t){return t&&g2(t)==="object"&&"clipDot"in t},zae=function(t,n,r,i){var s,l=(s=ES?.[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!Ct(t)&&(i&&l.includes(n)||Pae.includes(n))||r&&bO.includes(n)},Mt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(O.isValidElement(t)&&(i=t.props),!Xd(i))return null;var s={};return Object.keys(i).forEach(function(l){var a;zae((a=i)===null||a===void 0?void 0:a[l],l,n,r)&&(s[l]=i[l])}),s},v2=function e(t,n){if(t===n)return!0;var r=O.Children.count(t);if(r!==O.Children.count(n))return!1;if(r===0)return!0;if(r===1)return FD(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=t[i],l=n[i];if(Array.isArray(s)||Array.isArray(l)){if(!e(s,l))return!1}else if(!FD(s,l))return!1}return!0},FD=function(t,n){if(It(t)&&It(n))return!0;if(!It(t)&&!It(n)){var r=t.props||{},i=r.children,s=BD(r,Lae),l=n.props||{},a=l.children,c=BD(l,jae);return i&&a?Uu(s,c)&&v2(i,a):!i&&!a?Uu(s,c):!1}return!1},UD=function(t,n){var r=[],i={};return _O(t).forEach(function(s,l){if(Nae(s))r.push(s);else if(s){var a=Do(s.type),c=n[a]||{},u=c.handler,h=c.once;if(u&&(!h||!i[a])){var f=u(s,a,l);r.push(f),i[a]=!0}}}),r},Hae=function(t){var n=t&&t.type;return n&&zD[n]?zD[n]:null},$ae=function(t,n){return _O(n).indexOf(t)},Fae=["children","width","height","viewBox","className","style","title","desc"];function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y2.apply(this,arguments)}function Uae(e,t){if(e==null)return{};var n=Vae(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function b2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,l=e.style,a=e.title,c=e.desc,u=Uae(e,Fae),h=i||{width:n,height:r,x:0,y:0},f=Bt("recharts-surface",s);return oe.createElement("svg",y2({},Mt(u,!0,"svg"),{className:f,width:n,height:r,style:l,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),oe.createElement("title",null,a),oe.createElement("desc",null,c),t)}var qae=["children","className"];function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_2.apply(this,arguments)}function Wae(e,t){if(e==null)return{};var n=Gae(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cn=oe.forwardRef(function(e,t){var n=e.children,r=e.className,i=Wae(e,qae),s=Bt("recharts-layer",r);return oe.createElement("g",_2({className:s},Mt(i,!0),{ref:t}),n)}),Io=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s]},kS,VD;function Kae(){if(VD)return kS;VD=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(s);++i<s;)l[i]=t[i+n];return l}return kS=e,kS}var OS,qD;function Yae(){if(qD)return OS;qD=1;var e=Kae();function t(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:e(n,r,i)}return OS=t,OS}var RS,WD;function EH(){if(WD)return RS;WD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",a=RegExp("["+l+e+i+s+"]");function c(u){return a.test(u)}return RS=c,RS}var AS,GD;function Xae(){if(GD)return AS;GD=1;function e(t){return t.split("")}return AS=e,AS}var PS,KD;function Qae(){if(KD)return PS;KD=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",a="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+c+")",h="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",S=u+"?",x="["+s+"]?",g="(?:"+v+"(?:"+[h,f,p].join("|")+")"+x+S+")*",b=x+S+g,y="(?:"+[h+a+"?",a,f,p,l].join("|")+")",_=RegExp(c+"(?="+c+")|"+y+b,"g");function T(E){return E.match(_)||[]}return PS=T,PS}var MS,YD;function Zae(){if(YD)return MS;YD=1;var e=Xae(),t=EH(),n=Qae();function r(i){return t(i)?n(i):e(i)}return MS=r,MS}var LS,XD;function Jae(){if(XD)return LS;XD=1;var e=Yae(),t=EH(),n=Zae(),r=xH();function i(s){return function(l){l=r(l);var a=t(l)?n(l):void 0,c=a?a[0]:l.charAt(0),u=a?e(a,1).join(""):l.slice(1);return c[s]()+u}}return LS=i,LS}var jS,QD;function ele(){if(QD)return jS;QD=1;var e=Jae(),t=e("toUpperCase");return jS=t,jS}var tle=ele();const Yb=sn(tle);function dn(e){return function(){return e}}const TH=Math.cos,ay=Math.sin,Ts=Math.sqrt,ly=Math.PI,Xb=2*ly,x2=Math.PI,S2=2*x2,Il=1e-6,nle=S2-Il;function kH(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rle(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return kH;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class ile{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?kH:rle(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+l}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let l=this._x1,a=this._y1,c=r-t,u=i-n,h=l-t,f=a-n,p=h*h+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Il)if(!(Math.abs(f*c-u*h)>Il)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-l,S=i-a,x=c*c+u*u,g=v*v+S*S,b=Math.sqrt(x),y=Math.sqrt(p),_=s*Math.tan((x2-Math.acos((x+p-g)/(2*b*y)))/2),T=_/y,E=_/b;Math.abs(T-1)>Il&&this._append`L${t+T*h},${n+T*f}`,this._append`A${s},${s},0,0,${+(f*v>h*S)},${this._x1=t+E*c},${this._y1=n+E*u}`}}arc(t,n,r,i,s,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),c=r*Math.sin(i),u=t+a,h=n+c,f=1^l,p=l?i-s:s-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>Il||Math.abs(this._y1-h)>Il)&&this._append`L${u},${h}`,r&&(p<0&&(p=p%S2+S2),p>nle?this._append`A${r},${r},0,1,${f},${t-a},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=h}`:p>Il&&this._append`A${r},${r},0,${+(p>=x2)},${f},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function xO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new ile(t)}function SO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OH(e){this._context=e}OH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Qb(e){return new OH(e)}function RH(e){return e[0]}function AH(e){return e[1]}function PH(e,t){var n=dn(!0),r=null,i=Qb,s=null,l=xO(a);e=typeof e=="function"?e:e===void 0?RH:dn(e),t=typeof t=="function"?t:t===void 0?AH:dn(t);function a(c){var u,h=(c=SO(c)).length,f,p=!1,v;for(r==null&&(s=i(v=l())),u=0;u<=h;++u)!(u<h&&n(f=c[u],u,c))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(f,u,c),+t(f,u,c));if(v)return s=null,v+""||null}return a.x=function(c){return arguments.length?(e=typeof c=="function"?c:dn(+c),a):e},a.y=function(c){return arguments.length?(t=typeof c=="function"?c:dn(+c),a):t},a.defined=function(c){return arguments.length?(n=typeof c=="function"?c:dn(!!c),a):n},a.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),a):i},a.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),a):r},a}function ev(e,t,n){var r=null,i=dn(!0),s=null,l=Qb,a=null,c=xO(u);e=typeof e=="function"?e:e===void 0?RH:dn(+e),t=typeof t=="function"?t:dn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?AH:dn(+n);function u(f){var p,v,S,x=(f=SO(f)).length,g,b=!1,y,_=new Array(x),T=new Array(x);for(s==null&&(a=l(y=c())),p=0;p<=x;++p){if(!(p<x&&i(g=f[p],p,f))===b)if(b=!b)v=p,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),S=p-1;S>=v;--S)a.point(_[S],T[S]);a.lineEnd(),a.areaEnd()}b&&(_[p]=+e(g,p,f),T[p]=+t(g,p,f),a.point(r?+r(g,p,f):_[p],n?+n(g,p,f):T[p]))}if(y)return a=null,y+""||null}function h(){return PH().defined(i).curve(l).context(s)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:dn(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:dn(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:dn(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:dn(+f),u):n},u.lineX0=u.lineY0=function(){return h().x(e).y(t)},u.lineY1=function(){return h().x(e).y(n)},u.lineX1=function(){return h().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:dn(!!f),u):i},u.curve=function(f){return arguments.length?(l=f,s!=null&&(a=l(s)),u):l},u.context=function(f){return arguments.length?(f==null?s=a=null:a=l(s=f),u):s},u}class MH{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function sle(e){return new MH(e,!0)}function ole(e){return new MH(e,!1)}const wO={draw(e,t){const n=Ts(t/ly);e.moveTo(n,0),e.arc(0,0,n,0,Xb)}},ale={draw(e,t){const n=Ts(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},LH=Ts(1/3),lle=LH*2,cle={draw(e,t){const n=Ts(t/lle),r=n*LH;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ule={draw(e,t){const n=Ts(t),r=-n/2;e.rect(r,r,n,n)}},dle=.8908130915292852,jH=ay(ly/10)/ay(7*ly/10),fle=ay(Xb/10)*jH,hle=-TH(Xb/10)*jH,ple={draw(e,t){const n=Ts(t*dle),r=fle*n,i=hle*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const l=Xb*s/5,a=TH(l),c=ay(l);e.lineTo(c*n,-a*n),e.lineTo(a*r-c*i,c*r+a*i)}e.closePath()}},DS=Ts(3),mle={draw(e,t){const n=-Ts(t/(DS*3));e.moveTo(0,n*2),e.lineTo(-DS*n,-n),e.lineTo(DS*n,-n),e.closePath()}},Bi=-.5,zi=Ts(3)/2,w2=1/Ts(12),gle=(w2/2+1)*3,vle={draw(e,t){const n=Ts(t/gle),r=n/2,i=n*w2,s=r,l=n*w2+n,a=-s,c=l;e.moveTo(r,i),e.lineTo(s,l),e.lineTo(a,c),e.lineTo(Bi*r-zi*i,zi*r+Bi*i),e.lineTo(Bi*s-zi*l,zi*s+Bi*l),e.lineTo(Bi*a-zi*c,zi*a+Bi*c),e.lineTo(Bi*r+zi*i,Bi*i-zi*r),e.lineTo(Bi*s+zi*l,Bi*l-zi*s),e.lineTo(Bi*a+zi*c,Bi*c-zi*a),e.closePath()}};function yle(e,t){let n=null,r=xO(i);e=typeof e=="function"?e:dn(e||wO),t=typeof t=="function"?t:dn(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:dn(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:dn(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function cy(){}function uy(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function DH(e){this._context=e}DH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:uy(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ble(e){return new DH(e)}function IH(e){this._context=e}IH.prototype={areaStart:cy,areaEnd:cy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:uy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _le(e){return new IH(e)}function NH(e){this._context=e}NH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:uy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xle(e){return new NH(e)}function BH(e){this._context=e}BH.prototype={areaStart:cy,areaEnd:cy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Sle(e){return new BH(e)}function ZD(e){return e<0?-1:1}function JD(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),a=(s*i+l*r)/(r+i);return(ZD(s)+ZD(l))*Math.min(Math.abs(s),Math.abs(l),.5*Math.abs(a))||0}function e3(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function IS(e,t,n){var r=e._x0,i=e._y0,s=e._x1,l=e._y1,a=(s-r)/3;e._context.bezierCurveTo(r+a,i+a*t,s-a,l-a*n,s,l)}function dy(e){this._context=e}dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:IS(this,this._t0,e3(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,IS(this,e3(this,n=JD(this,e,t)),n);break;default:IS(this,this._t0,n=JD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function zH(e){this._context=new HH(e)}(zH.prototype=Object.create(dy.prototype)).point=function(e,t){dy.prototype.point.call(this,t,e)};function HH(e){this._context=e}HH.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function wle(e){return new dy(e)}function Cle(e){return new zH(e)}function $H(e){this._context=e}$H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=t3(e),i=t3(t),s=0,l=1;l<n;++s,++l)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function t3(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),l=new Array(n);for(i[0]=0,s[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function Ele(e){return new $H(e)}function Zb(e,t){this._context=e,this._t=t}Zb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Tle(e){return new Zb(e,.5)}function kle(e){return new Zb(e,0)}function Ole(e){return new Zb(e,1)}function od(e,t){if((l=e.length)>1)for(var n=1,r,i,s=e[t[0]],l,a=s.length;n<l;++n)for(i=s,s=e[t[n]],r=0;r<a;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function C2(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Rle(e,t){return e[t]}function Ale(e){const t=[];return t.key=e,t}function Ple(){var e=dn([]),t=C2,n=od,r=Rle;function i(s){var l=Array.from(e.apply(this,arguments),Ale),a,c=l.length,u=-1,h;for(const f of s)for(a=0,++u;a<c;++a)(l[a][u]=[0,+r(f,l[a].key,u,s)]).data=f;for(a=0,h=SO(t(l));a<c;++a)l[h[a]].index=a;return n(l,h),l}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:dn(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:dn(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?C2:typeof s=="function"?s:dn(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??od,i):n},i}function Mle(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,l;i<s;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}od(e,t)}}function Lle(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var l=0,a=0;l<i;++l)a+=e[l][n][1]||0;r[n][1]+=r[n][0]=-a/2}od(e,t)}}function jle(e,t){if(!(!((l=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,l;r<s;++r){for(var a=0,c=0,u=0;a<l;++a){for(var h=e[t[a]],f=h[r][1]||0,p=h[r-1][1]||0,v=(f-p)/2,S=0;S<a;++S){var x=e[t[S]],g=x[r][1]||0,b=x[r-1][1]||0;v+=g-b}c+=f,u+=v*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,od(e,t)}}function Zh(e){"@babel/helpers - typeof";return Zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(e)}var Dle=["type","size","sizeType"];function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E2.apply(this,arguments)}function n3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function r3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n3(Object(n),!0).forEach(function(r){Ile(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ile(e,t,n){return t=Nle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nle(e){var t=Ble(e,"string");return Zh(t)=="symbol"?t:t+""}function Ble(e,t){if(Zh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zle(e,t){if(e==null)return{};var n=Hle(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var FH={symbolCircle:wO,symbolCross:ale,symbolDiamond:cle,symbolSquare:ule,symbolStar:ple,symbolTriangle:mle,symbolWye:vle},$le=Math.PI/180,Fle=function(t){var n="symbol".concat(Yb(t));return FH[n]||wO},Ule=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*$le;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Vle=function(t,n){FH["symbol".concat(Yb(t))]=n},CO=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,l=t.sizeType,a=l===void 0?"area":l,c=zle(t,Dle),u=r3(r3({},c),{},{type:r,size:s,sizeType:a}),h=function(){var g=Fle(r),b=yle().type(g).size(Ule(s,a,r));return b()},f=u.className,p=u.cx,v=u.cy,S=Mt(u,!0);return p===+p&&v===+v&&s===+s?oe.createElement("path",E2({},S,{className:Bt("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};CO.registerSymbol=Vle;function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T2.apply(this,arguments)}function i3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qle(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i3(Object(n),!0).forEach(function(r){Jh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gle(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VH(r.key),r)}}function Kle(e,t,n){return t&&Gle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yle(e,t,n){return t=fy(t),Xle(e,UH()?Reflect.construct(t,n||[],fy(e).constructor):t.apply(e,n))}function Xle(e,t){if(t&&(ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qle(e)}function Qle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UH=function(){return!!e})()}function fy(e){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fy(e)}function Zle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k2(e,t)}function k2(e,t){return k2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},k2(e,t)}function Jh(e,t,n){return t=VH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VH(e){var t=Jle(e,"string");return ad(t)=="symbol"?t:t+""}function Jle(e,t){if(ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hi=32,EO=(function(e){function t(){return Wle(this,t),Yle(this,t,arguments)}return Zle(t,e),Kle(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=Hi/2,l=Hi/6,a=Hi/3,c=r.inactive?i:r.color;if(r.type==="plainline")return oe.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:Hi,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return oe.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(s,"h").concat(a,`
|
|
40
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(2*a,",").concat(s,`
|
|
41
|
+
H`).concat(Hi,"M").concat(2*a,",").concat(s,`
|
|
42
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(a,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return oe.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Hi/8,"h").concat(Hi,"v").concat(Hi*3/4,"h").concat(-Hi,"z"),className:"recharts-legend-icon"});if(oe.isValidElement(r.legendIcon)){var u=qle({},r);return delete u.legendIcon,oe.cloneElement(r.legendIcon,u)}return oe.createElement(CO,{fill:c,cx:s,cy:s,size:Hi,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,l=i.iconSize,a=i.layout,c=i.formatter,u=i.inactiveColor,h={x:0,y:0,width:Hi,height:Hi},f={display:a==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(v,S){var x=v.formatter||c,g=Bt(Jh(Jh({"recharts-legend-item":!0},"legend-item-".concat(S),!0),"inactive",v.inactive));if(v.type==="none")return null;var b=Ct(v.value)?null:v.value;Io(!Ct(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var y=v.inactive?u:v.color;return oe.createElement("li",T2({className:g,style:f,key:"legend-item-".concat(S)},oy(r.props,v,S)),oe.createElement(b2,{width:l,height:l,viewBox:h,style:p},r.renderIcon(v)),oe.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},x?x(b,v,S):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,l=r.align;if(!i||!i.length)return null;var a={padding:0,margin:0,textAlign:s==="horizontal"?l:"left"};return oe.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])})(O.PureComponent);Jh(EO,"displayName","Legend");Jh(EO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var NS,s3;function ece(){if(s3)return NS;s3=1;var e=Wb();function t(){this.__data__=new e,this.size=0}return NS=t,NS}var BS,o3;function tce(){if(o3)return BS;o3=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return BS=e,BS}var zS,a3;function nce(){if(a3)return zS;a3=1;function e(t){return this.__data__.get(t)}return zS=e,zS}var HS,l3;function rce(){if(l3)return HS;l3=1;function e(t){return this.__data__.has(t)}return HS=e,HS}var $S,c3;function ice(){if(c3)return $S;c3=1;var e=Wb(),t=mO(),n=gO(),r=200;function i(s,l){var a=this.__data__;if(a instanceof e){var c=a.__data__;if(!t||c.length<r-1)return c.push([s,l]),this.size=++a.size,this;a=this.__data__=new n(c)}return a.set(s,l),this.size=a.size,this}return $S=i,$S}var FS,u3;function qH(){if(u3)return FS;u3=1;var e=Wb(),t=ece(),n=tce(),r=nce(),i=rce(),s=ice();function l(a){var c=this.__data__=new e(a);this.size=c.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=s,FS=l,FS}var US,d3;function sce(){if(d3)return US;d3=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return US=t,US}var VS,f3;function oce(){if(f3)return VS;f3=1;function e(t){return this.__data__.has(t)}return VS=e,VS}var qS,h3;function WH(){if(h3)return qS;h3=1;var e=gO(),t=sce(),n=oce();function r(i){var s=-1,l=i==null?0:i.length;for(this.__data__=new e;++s<l;)this.add(i[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,qS=r,qS}var WS,p3;function GH(){if(p3)return WS;p3=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return WS=e,WS}var GS,m3;function KH(){if(m3)return GS;m3=1;function e(t,n){return t.has(n)}return GS=e,GS}var KS,g3;function YH(){if(g3)return KS;g3=1;var e=WH(),t=GH(),n=KH(),r=1,i=2;function s(l,a,c,u,h,f){var p=c&r,v=l.length,S=a.length;if(v!=S&&!(p&&S>v))return!1;var x=f.get(l),g=f.get(a);if(x&&g)return x==a&&g==l;var b=-1,y=!0,_=c&i?new e:void 0;for(f.set(l,a),f.set(a,l);++b<v;){var T=l[b],E=a[b];if(u)var k=p?u(E,T,b,a,l,f):u(T,E,b,l,a,f);if(k!==void 0){if(k)continue;y=!1;break}if(_){if(!t(a,function(A,R){if(!n(_,R)&&(T===A||h(T,A,c,u,f)))return _.push(R)})){y=!1;break}}else if(!(T===E||h(T,E,c,u,f))){y=!1;break}}return f.delete(l),f.delete(a),y}return KS=s,KS}var YS,v3;function ace(){if(v3)return YS;v3=1;var e=ro(),t=e.Uint8Array;return YS=t,YS}var XS,y3;function lce(){if(y3)return XS;y3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,s){r[++n]=[s,i]}),r}return XS=e,XS}var QS,b3;function TO(){if(b3)return QS;b3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return QS=e,QS}var ZS,_3;function cce(){if(_3)return ZS;_3=1;var e=im(),t=ace(),n=pO(),r=YH(),i=lce(),s=TO(),l=1,a=2,c="[object Boolean]",u="[object Date]",h="[object Error]",f="[object Map]",p="[object Number]",v="[object RegExp]",S="[object Set]",x="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,T=_?_.valueOf:void 0;function E(k,A,R,L,z,D,$){switch(R){case y:if(k.byteLength!=A.byteLength||k.byteOffset!=A.byteOffset)return!1;k=k.buffer,A=A.buffer;case b:return!(k.byteLength!=A.byteLength||!D(new t(k),new t(A)));case c:case u:case p:return n(+k,+A);case h:return k.name==A.name&&k.message==A.message;case v:case x:return k==A+"";case f:var N=i;case S:var F=L&l;if(N||(N=s),k.size!=A.size&&!F)return!1;var U=$.get(k);if(U)return U==A;L|=a,$.set(k,A);var H=r(N(k),N(A),L,z,D,$);return $.delete(k),H;case g:if(T)return T.call(k)==T.call(A)}return!1}return ZS=E,ZS}var JS,x3;function XH(){if(x3)return JS;x3=1;function e(t,n){for(var r=-1,i=n.length,s=t.length;++r<i;)t[s+r]=n[r];return t}return JS=e,JS}var ew,S3;function uce(){if(S3)return ew;S3=1;var e=XH(),t=si();function n(r,i,s){var l=i(r);return t(r)?l:e(l,s(r))}return ew=n,ew}var tw,w3;function dce(){if(w3)return tw;w3=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=0,l=[];++r<i;){var a=t[r];n(a,r,t)&&(l[s++]=a)}return l}return tw=e,tw}var nw,C3;function fce(){if(C3)return nw;C3=1;function e(){return[]}return nw=e,nw}var rw,E3;function hce(){if(E3)return rw;E3=1;var e=dce(),t=fce(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(a){return r.call(l,a)}))}:t;return rw=s,rw}var iw,T3;function pce(){if(T3)return iw;T3=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return iw=e,iw}var sw,k3;function mce(){if(k3)return sw;k3=1;var e=Yo(),t=Xo(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return sw=r,sw}var ow,O3;function kO(){if(O3)return ow;O3=1;var e=mce(),t=Xo(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!i.call(l,"callee")};return ow=s,ow}var wh={exports:{}},aw,R3;function gce(){if(R3)return aw;R3=1;function e(){return!1}return aw=e,aw}wh.exports;var A3;function QH(){return A3||(A3=1,(function(e,t){var n=ro(),r=gce(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,l=s&&s.exports===i,a=l?n.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||r;e.exports=u})(wh,wh.exports)),wh.exports}var lw,P3;function OO(){if(P3)return lw;P3=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var s=typeof r;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return lw=n,lw}var cw,M3;function RO(){if(M3)return cw;M3=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return cw=t,cw}var uw,L3;function vce(){if(L3)return uw;L3=1;var e=Yo(),t=RO(),n=Xo(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",l="[object Date]",a="[object Error]",c="[object Function]",u="[object Map]",h="[object Number]",f="[object Object]",p="[object RegExp]",v="[object Set]",S="[object String]",x="[object WeakMap]",g="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",T="[object Int8Array]",E="[object Int16Array]",k="[object Int32Array]",A="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",z="[object Uint32Array]",D={};D[y]=D[_]=D[T]=D[E]=D[k]=D[A]=D[R]=D[L]=D[z]=!0,D[r]=D[i]=D[g]=D[s]=D[b]=D[l]=D[a]=D[c]=D[u]=D[h]=D[f]=D[p]=D[v]=D[S]=D[x]=!1;function $(N){return n(N)&&t(N.length)&&!!D[e(N)]}return uw=$,uw}var dw,j3;function ZH(){if(j3)return dw;j3=1;function e(t){return function(n){return t(n)}}return dw=e,dw}var Ch={exports:{}};Ch.exports;var D3;function yce(){return D3||(D3=1,(function(e,t){var n=yH(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,l=s&&n.process,a=(function(){try{var c=i&&i.require&&i.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}})();e.exports=a})(Ch,Ch.exports)),Ch.exports}var fw,I3;function JH(){if(I3)return fw;I3=1;var e=vce(),t=ZH(),n=yce(),r=n&&n.isTypedArray,i=r?t(r):e;return fw=i,fw}var hw,N3;function bce(){if(N3)return hw;N3=1;var e=pce(),t=kO(),n=si(),r=QH(),i=OO(),s=JH(),l=Object.prototype,a=l.hasOwnProperty;function c(u,h){var f=n(u),p=!f&&t(u),v=!f&&!p&&r(u),S=!f&&!p&&!v&&s(u),x=f||p||v||S,g=x?e(u.length,String):[],b=g.length;for(var y in u)(h||a.call(u,y))&&!(x&&(y=="length"||v&&(y=="offset"||y=="parent")||S&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,b)))&&g.push(y);return g}return hw=c,hw}var pw,B3;function _ce(){if(B3)return pw;B3=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return pw=t,pw}var mw,z3;function e$(){if(z3)return mw;z3=1;function e(t,n){return function(r){return t(n(r))}}return mw=e,mw}var gw,H3;function xce(){if(H3)return gw;H3=1;var e=e$(),t=e(Object.keys,Object);return gw=t,gw}var vw,$3;function Sce(){if($3)return vw;$3=1;var e=_ce(),t=xce(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var l=[];for(var a in Object(s))r.call(s,a)&&a!="constructor"&&l.push(a);return l}return vw=i,vw}var yw,F3;function om(){if(F3)return yw;F3=1;var e=hO(),t=RO();function n(r){return r!=null&&t(r.length)&&!e(r)}return yw=n,yw}var bw,U3;function Jb(){if(U3)return bw;U3=1;var e=bce(),t=Sce(),n=om();function r(i){return n(i)?e(i):t(i)}return bw=r,bw}var _w,V3;function wce(){if(V3)return _w;V3=1;var e=uce(),t=hce(),n=Jb();function r(i){return e(i,n,t)}return _w=r,_w}var xw,q3;function Cce(){if(q3)return xw;q3=1;var e=wce(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,l,a,c,u,h){var f=a&t,p=e(s),v=p.length,S=e(l),x=S.length;if(v!=x&&!f)return!1;for(var g=v;g--;){var b=p[g];if(!(f?b in l:r.call(l,b)))return!1}var y=h.get(s),_=h.get(l);if(y&&_)return y==l&&_==s;var T=!0;h.set(s,l),h.set(l,s);for(var E=f;++g<v;){b=p[g];var k=s[b],A=l[b];if(c)var R=f?c(A,k,b,l,s,h):c(k,A,b,s,l,h);if(!(R===void 0?k===A||u(k,A,a,c,h):R)){T=!1;break}E||(E=b=="constructor")}if(T&&!E){var L=s.constructor,z=l.constructor;L!=z&&"constructor"in s&&"constructor"in l&&!(typeof L=="function"&&L instanceof L&&typeof z=="function"&&z instanceof z)&&(T=!1)}return h.delete(s),h.delete(l),T}return xw=i,xw}var Sw,W3;function Ece(){if(W3)return Sw;W3=1;var e=zc(),t=ro(),n=e(t,"DataView");return Sw=n,Sw}var ww,G3;function Tce(){if(G3)return ww;G3=1;var e=zc(),t=ro(),n=e(t,"Promise");return ww=n,ww}var Cw,K3;function t$(){if(K3)return Cw;K3=1;var e=zc(),t=ro(),n=e(t,"Set");return Cw=n,Cw}var Ew,Y3;function kce(){if(Y3)return Ew;Y3=1;var e=zc(),t=ro(),n=e(t,"WeakMap");return Ew=n,Ew}var Tw,X3;function Oce(){if(X3)return Tw;X3=1;var e=Ece(),t=mO(),n=Tce(),r=t$(),i=kce(),s=Yo(),l=bH(),a="[object Map]",c="[object Object]",u="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",v=l(e),S=l(t),x=l(n),g=l(r),b=l(i),y=s;return(e&&y(new e(new ArrayBuffer(1)))!=p||t&&y(new t)!=a||n&&y(n.resolve())!=u||r&&y(new r)!=h||i&&y(new i)!=f)&&(y=function(_){var T=s(_),E=T==c?_.constructor:void 0,k=E?l(E):"";if(k)switch(k){case v:return p;case S:return a;case x:return u;case g:return h;case b:return f}return T}),Tw=y,Tw}var kw,Q3;function Rce(){if(Q3)return kw;Q3=1;var e=qH(),t=YH(),n=cce(),r=Cce(),i=Oce(),s=si(),l=QH(),a=JH(),c=1,u="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function S(x,g,b,y,_,T){var E=s(x),k=s(g),A=E?h:i(x),R=k?h:i(g);A=A==u?f:A,R=R==u?f:R;var L=A==f,z=R==f,D=A==R;if(D&&l(x)){if(!l(g))return!1;E=!0,L=!1}if(D&&!L)return T||(T=new e),E||a(x)?t(x,g,b,y,_,T):n(x,g,A,b,y,_,T);if(!(b&c)){var $=L&&v.call(x,"__wrapped__"),N=z&&v.call(g,"__wrapped__");if($||N){var F=$?x.value():x,U=N?g.value():g;return T||(T=new e),_(F,U,b,y,T)}}return D?(T||(T=new e),r(x,g,b,y,_,T)):!1}return kw=S,kw}var Ow,Z3;function AO(){if(Z3)return Ow;Z3=1;var e=Rce(),t=Xo();function n(r,i,s,l,a){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,s,l,n,a)}return Ow=n,Ow}var Rw,J3;function Ace(){if(J3)return Rw;J3=1;var e=qH(),t=AO(),n=1,r=2;function i(s,l,a,c){var u=a.length,h=u,f=!c;if(s==null)return!h;for(s=Object(s);u--;){var p=a[u];if(f&&p[2]?p[1]!==s[p[0]]:!(p[0]in s))return!1}for(;++u<h;){p=a[u];var v=p[0],S=s[v],x=p[1];if(f&&p[2]){if(S===void 0&&!(v in s))return!1}else{var g=new e;if(c)var b=c(S,x,v,s,l,g);if(!(b===void 0?t(x,S,n|r,c,g):b))return!1}}return!0}return Rw=i,Rw}var Aw,eI;function n$(){if(eI)return Aw;eI=1;var e=sl();function t(n){return n===n&&!e(n)}return Aw=t,Aw}var Pw,tI;function Pce(){if(tI)return Pw;tI=1;var e=n$(),t=Jb();function n(r){for(var i=t(r),s=i.length;s--;){var l=i[s],a=r[l];i[s]=[l,a,e(a)]}return i}return Pw=n,Pw}var Mw,nI;function r$(){if(nI)return Mw;nI=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Mw=e,Mw}var Lw,rI;function Mce(){if(rI)return Lw;rI=1;var e=Ace(),t=Pce(),n=r$();function r(i){var s=t(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(l){return l===i||e(l,i,s)}}return Lw=r,Lw}var jw,iI;function Lce(){if(iI)return jw;iI=1;function e(t,n){return t!=null&&n in Object(t)}return jw=e,jw}var Dw,sI;function jce(){if(sI)return Dw;sI=1;var e=SH(),t=kO(),n=si(),r=OO(),i=RO(),s=Kb();function l(a,c,u){c=e(c,a);for(var h=-1,f=c.length,p=!1;++h<f;){var v=s(c[h]);if(!(p=a!=null&&u(a,v)))break;a=a[v]}return p||++h!=f?p:(f=a==null?0:a.length,!!f&&i(f)&&r(v,f)&&(n(a)||t(a)))}return Dw=l,Dw}var Iw,oI;function Dce(){if(oI)return Iw;oI=1;var e=Lce(),t=jce();function n(r,i){return r!=null&&t(r,i,e)}return Iw=n,Iw}var Nw,aI;function Ice(){if(aI)return Nw;aI=1;var e=AO(),t=wH(),n=Dce(),r=fO(),i=n$(),s=r$(),l=Kb(),a=1,c=2;function u(h,f){return r(h)&&i(f)?s(l(h),f):function(p){var v=t(p,h);return v===void 0&&v===f?n(p,h):e(f,v,a|c)}}return Nw=u,Nw}var Bw,lI;function Zd(){if(lI)return Bw;lI=1;function e(t){return t}return Bw=e,Bw}var zw,cI;function Nce(){if(cI)return zw;cI=1;function e(t){return function(n){return n?.[t]}}return zw=e,zw}var Hw,uI;function Bce(){if(uI)return Hw;uI=1;var e=yO();function t(n){return function(r){return e(r,n)}}return Hw=t,Hw}var $w,dI;function zce(){if(dI)return $w;dI=1;var e=Nce(),t=Bce(),n=fO(),r=Kb();function i(s){return n(s)?e(r(s)):t(s)}return $w=i,$w}var Fw,fI;function ol(){if(fI)return Fw;fI=1;var e=Mce(),t=Ice(),n=Zd(),r=si(),i=zce();function s(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return Fw=s,Fw}var Uw,hI;function i$(){if(hI)return Uw;hI=1;function e(t,n,r,i){for(var s=t.length,l=r+(i?1:-1);i?l--:++l<s;)if(n(t[l],l,t))return l;return-1}return Uw=e,Uw}var Vw,pI;function Hce(){if(pI)return Vw;pI=1;function e(t){return t!==t}return Vw=e,Vw}var qw,mI;function $ce(){if(mI)return qw;mI=1;function e(t,n,r){for(var i=r-1,s=t.length;++i<s;)if(t[i]===n)return i;return-1}return qw=e,qw}var Ww,gI;function Fce(){if(gI)return Ww;gI=1;var e=i$(),t=Hce(),n=$ce();function r(i,s,l){return s===s?n(i,s,l):e(i,t,l)}return Ww=r,Ww}var Gw,vI;function Uce(){if(vI)return Gw;vI=1;var e=Fce();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return Gw=t,Gw}var Kw,yI;function Vce(){if(yI)return Kw;yI=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;)if(r(n,t[i]))return!0;return!1}return Kw=e,Kw}var Yw,bI;function qce(){if(bI)return Yw;bI=1;function e(){}return Yw=e,Yw}var Xw,_I;function Wce(){if(_I)return Xw;_I=1;var e=t$(),t=qce(),n=TO(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return Xw=i,Xw}var Qw,xI;function Gce(){if(xI)return Qw;xI=1;var e=WH(),t=Uce(),n=Vce(),r=KH(),i=Wce(),s=TO(),l=200;function a(c,u,h){var f=-1,p=t,v=c.length,S=!0,x=[],g=x;if(h)S=!1,p=n;else if(v>=l){var b=u?null:i(c);if(b)return s(b);S=!1,p=r,g=new e}else g=u?[]:x;e:for(;++f<v;){var y=c[f],_=u?u(y):y;if(y=h||y!==0?y:0,S&&_===_){for(var T=g.length;T--;)if(g[T]===_)continue e;u&&g.push(_),x.push(y)}else p(g,_,h)||(g!==x&&g.push(_),x.push(y))}return x}return Qw=a,Qw}var Zw,SI;function Kce(){if(SI)return Zw;SI=1;var e=ol(),t=Gce();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Zw=n,Zw}var Yce=Kce();const wI=sn(Yce);function s$(e,t,n){return t===!0?wI(e,n):Ct(t)?wI(e,t):e}function ld(e){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ld(e)}var Xce=["ref"];function CI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CI(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a$(r.key),r)}}function Zce(e,t,n){return t&&EI(e.prototype,t),n&&EI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jce(e,t,n){return t=hy(t),eue(e,o$()?Reflect.construct(t,n||[],hy(e).constructor):t.apply(e,n))}function eue(e,t){if(t&&(ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tue(e)}function tue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o$=function(){return!!e})()}function hy(e){return hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hy(e)}function nue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O2(e,t)}function O2(e,t){return O2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},O2(e,t)}function e0(e,t,n){return t=a$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a$(e){var t=rue(e,"string");return ld(t)=="symbol"?t:t+""}function rue(e,t){if(ld(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function iue(e,t){if(e==null)return{};var n=sue(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oue(e){return e.value}function aue(e,t){if(oe.isValidElement(e))return oe.cloneElement(e,t);if(typeof e=="function")return oe.createElement(e,t);t.ref;var n=iue(t,Xce);return oe.createElement(EO,n)}var TI=1,Vu=(function(e){function t(){var n;Qce(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Jce(this,t,[].concat(i)),e0(n,"lastBoundingBox",{width:-1,height:-1}),n}return nue(t,e),Zce(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>TI||Math.abs(i.height-this.lastBoundingBox.height)>TI)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ao({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,l=i.align,a=i.verticalAlign,c=i.margin,u=i.chartWidth,h=i.chartHeight,f,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&s==="vertical"){var v=this.getBBoxSnapshot();f={left:((u||0)-v.width)/2}}else f=l==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(a==="middle"){var S=this.getBBoxSnapshot();p={top:((h||0)-S.height)/2}}else p=a==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Ao(Ao({},f),p)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,l=i.width,a=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,h=i.payload,f=Ao(Ao({position:"absolute",width:l||"auto",height:a||"auto"},this.getDefaultPosition(c)),c);return oe.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(v){r.wrapperNode=v}},aue(s,Ao(Ao({},this.props),{},{payload:s$(h,u,oue)})))}}],[{key:"getWithHeight",value:function(r,i){var s=Ao(Ao({},this.defaultProps),r.props),l=s.layout;return l==="vertical"&&$e(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(O.PureComponent);e0(Vu,"displayName","Legend");e0(Vu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Jw,kI;function lue(){if(kI)return Jw;kI=1;var e=im(),t=kO(),n=si(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return Jw=i,Jw}var eC,OI;function l$(){if(OI)return eC;OI=1;var e=XH(),t=lue();function n(r,i,s,l,a){var c=-1,u=r.length;for(s||(s=t),a||(a=[]);++c<u;){var h=r[c];i>0&&s(h)?i>1?n(h,i-1,s,l,a):e(a,h):l||(a[a.length]=h)}return a}return eC=n,eC}var tC,RI;function cue(){if(RI)return tC;RI=1;function e(t){return function(n,r,i){for(var s=-1,l=Object(n),a=i(n),c=a.length;c--;){var u=a[t?c:++s];if(r(l[u],u,l)===!1)break}return n}}return tC=e,tC}var nC,AI;function uue(){if(AI)return nC;AI=1;var e=cue(),t=e();return nC=t,nC}var rC,PI;function c$(){if(PI)return rC;PI=1;var e=uue(),t=Jb();function n(r,i){return r&&e(r,i,t)}return rC=n,rC}var iC,MI;function due(){if(MI)return iC;MI=1;var e=om();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var l=i.length,a=r?l:-1,c=Object(i);(r?a--:++a<l)&&s(c[a],a,c)!==!1;);return i}}return iC=t,iC}var sC,LI;function PO(){if(LI)return sC;LI=1;var e=c$(),t=due(),n=t(e);return sC=n,sC}var oC,jI;function u$(){if(jI)return oC;jI=1;var e=PO(),t=om();function n(r,i){var s=-1,l=t(r)?Array(r.length):[];return e(r,function(a,c,u){l[++s]=i(a,c,u)}),l}return oC=n,oC}var aC,DI;function fue(){if(DI)return aC;DI=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return aC=e,aC}var lC,II;function hue(){if(II)return lC;II=1;var e=Yd();function t(n,r){if(n!==r){var i=n!==void 0,s=n===null,l=n===n,a=e(n),c=r!==void 0,u=r===null,h=r===r,f=e(r);if(!u&&!f&&!a&&n>r||a&&c&&h&&!u&&!f||s&&c&&h||!i&&h||!l)return 1;if(!s&&!a&&!f&&n<r||f&&i&&l&&!s&&!a||u&&i&&l||!c&&l||!h)return-1}return 0}return lC=t,lC}var cC,NI;function pue(){if(NI)return cC;NI=1;var e=hue();function t(n,r,i){for(var s=-1,l=n.criteria,a=r.criteria,c=l.length,u=i.length;++s<c;){var h=e(l[s],a[s]);if(h){if(s>=u)return h;var f=i[s];return h*(f=="desc"?-1:1)}}return n.index-r.index}return cC=t,cC}var uC,BI;function mue(){if(BI)return uC;BI=1;var e=vO(),t=yO(),n=ol(),r=u$(),i=fue(),s=ZH(),l=pue(),a=Zd(),c=si();function u(h,f,p){f.length?f=e(f,function(x){return c(x)?function(g){return t(g,x.length===1?x[0]:x)}:x}):f=[a];var v=-1;f=e(f,s(n));var S=r(h,function(x,g,b){var y=e(f,function(_){return _(x)});return{criteria:y,index:++v,value:x}});return i(S,function(x,g){return l(x,g,p)})}return uC=u,uC}var dC,zI;function gue(){if(zI)return dC;zI=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return dC=e,dC}var fC,HI;function vue(){if(HI)return fC;HI=1;var e=gue(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,a=-1,c=t(l.length-i,0),u=Array(c);++a<c;)u[a]=l[i+a];a=-1;for(var h=Array(i+1);++a<i;)h[a]=l[a];return h[i]=s(u),e(r,this,h)}}return fC=n,fC}var hC,$I;function yue(){if($I)return hC;$I=1;function e(t){return function(){return t}}return hC=e,hC}var pC,FI;function d$(){if(FI)return pC;FI=1;var e=zc(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return pC=t,pC}var mC,UI;function bue(){if(UI)return mC;UI=1;var e=yue(),t=d$(),n=Zd(),r=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return mC=r,mC}var gC,VI;function _ue(){if(VI)return gC;VI=1;var e=800,t=16,n=Date.now;function r(i){var s=0,l=0;return function(){var a=n(),c=t-(a-l);if(l=a,c>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return gC=r,gC}var vC,qI;function xue(){if(qI)return vC;qI=1;var e=bue(),t=_ue(),n=t(e);return vC=n,vC}var yC,WI;function Sue(){if(WI)return yC;WI=1;var e=Zd(),t=vue(),n=xue();function r(i,s){return n(t(i,s,e),i+"")}return yC=r,yC}var bC,GI;function t0(){if(GI)return bC;GI=1;var e=pO(),t=om(),n=OO(),r=sl();function i(s,l,a){if(!r(a))return!1;var c=typeof l;return(c=="number"?t(a)&&n(l,a.length):c=="string"&&l in a)?e(a[l],s):!1}return bC=i,bC}var _C,KI;function wue(){if(KI)return _C;KI=1;var e=l$(),t=mue(),n=Sue(),r=t0(),i=n(function(s,l){if(s==null)return[];var a=l.length;return a>1&&r(s,l[0],l[1])?l=[]:a>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return _C=i,_C}var Cue=wue();const MO=sn(Cue);function ep(e){"@babel/helpers - typeof";return ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ep(e)}function R2(){return R2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R2.apply(this,arguments)}function Eue(e,t){return Rue(e)||Oue(e,t)||kue(e,t)||Tue()}function Tue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kue(e,t){if(e){if(typeof e=="string")return YI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YI(e,t)}}function YI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function Rue(e){if(Array.isArray(e))return e}function XI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(n),!0).forEach(function(r){Aue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aue(e,t,n){return t=Pue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pue(e){var t=Mue(e,"string");return ep(t)=="symbol"?t:t+""}function Mue(e,t){if(ep(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lue(e){return Array.isArray(e)&&or(e[0])&&or(e[1])?e.join(" ~ "):e}var jue=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,s=i===void 0?{}:i,l=t.itemStyle,a=l===void 0?{}:l,c=t.labelStyle,u=c===void 0?{}:c,h=t.payload,f=t.formatter,p=t.itemSorter,v=t.wrapperClassName,S=t.labelClassName,x=t.label,g=t.labelFormatter,b=t.accessibilityLayer,y=b===void 0?!1:b,_=function(){if(h&&h.length){var $={padding:0,margin:0},N=(p?MO(h,p):h).map(function(F,U){if(F.type==="none")return null;var H=xC({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},a),K=F.formatter||f||Lue,W=F.value,I=F.name,G=W,j=I;if(K&&G!=null&&j!=null){var B=K(W,I,F,U,h);if(Array.isArray(B)){var V=Eue(B,2);G=V[0],j=V[1]}else G=B}return oe.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:H},or(j)?oe.createElement("span",{className:"recharts-tooltip-item-name"},j):null,or(j)?oe.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,oe.createElement("span",{className:"recharts-tooltip-item-value"},G),oe.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return oe.createElement("ul",{className:"recharts-tooltip-item-list",style:$},N)}return null},T=xC({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),E=xC({margin:0},u),k=!It(x),A=k?x:"",R=Bt("recharts-default-tooltip",v),L=Bt("recharts-tooltip-label",S);k&&g&&h!==void 0&&h!==null&&(A=g(x,h));var z=y?{role:"status","aria-live":"assertive"}:{};return oe.createElement("div",R2({className:R,style:T},z),oe.createElement("p",{className:L,style:E},oe.isValidElement(A)?A:"".concat(A)),_())};function tp(e){"@babel/helpers - typeof";return tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tp(e)}function tv(e,t,n){return t=Due(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Due(e){var t=Iue(e,"string");return tp(t)=="symbol"?t:t+""}function Iue(e,t){if(tp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ch="recharts-tooltip-wrapper",Nue={visibility:"hidden"};function Bue(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Bt(ch,tv(tv(tv(tv({},"".concat(ch,"-right"),$e(n)&&t&&$e(t.x)&&n>=t.x),"".concat(ch,"-left"),$e(n)&&t&&$e(t.x)&&n<t.x),"".concat(ch,"-bottom"),$e(r)&&t&&$e(t.y)&&r>=t.y),"".concat(ch,"-top"),$e(r)&&t&&$e(t.y)&&r<t.y))}function QI(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,s=e.position,l=e.reverseDirection,a=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(s&&$e(s[r]))return s[r];var h=n[r]-a-i,f=n[r]+i;if(t[r])return l[r]?h:f;if(l[r]){var p=h,v=c[r];return p<v?Math.max(f,c[r]):Math.max(h,c[r])}var S=f+a,x=c[r]+u;return S>x?Math.max(h,c[r]):Math.max(f,c[r])}function zue(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Hue(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipBox,a=e.useTranslate3d,c=e.viewBox,u,h,f;return l.height>0&&l.width>0&&n?(h=QI({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),f=QI({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),u=zue({translateX:h,translateY:f,useTranslate3d:a})):u=Nue,{cssProperties:u,cssClasses:Bue({translateX:h,translateY:f,coordinate:n})}}function cd(e){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cd(e)}function ZI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function JI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(n),!0).forEach(function(r){P2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h$(r.key),r)}}function Uue(e,t,n){return t&&Fue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vue(e,t,n){return t=py(t),que(e,f$()?Reflect.construct(t,n||[],py(e).constructor):t.apply(e,n))}function que(e,t){if(t&&(cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wue(e)}function Wue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(f$=function(){return!!e})()}function py(e){return py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},py(e)}function Gue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A2(e,t)}function A2(e,t){return A2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},A2(e,t)}function P2(e,t,n){return t=h$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h$(e){var t=Kue(e,"string");return cd(t)=="symbol"?t:t+""}function Kue(e,t){if(cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eN=1,Yue=(function(e){function t(){var n;$ue(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Vue(this,t,[].concat(i)),P2(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),P2(n,"handleKeyDown",function(l){if(l.key==="Escape"){var a,c,u,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&a!==void 0?a:0,y:(u=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&u!==void 0?u:0}})}}),n}return Gue(t,e),Uue(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>eN||Math.abs(r.height-this.state.lastBoundingBox.height)>eN)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,l=i.allowEscapeViewBox,a=i.animationDuration,c=i.animationEasing,u=i.children,h=i.coordinate,f=i.hasPayload,p=i.isAnimationActive,v=i.offset,S=i.position,x=i.reverseDirection,g=i.useTranslate3d,b=i.viewBox,y=i.wrapperStyle,_=Hue({allowEscapeViewBox:l,coordinate:h,offsetTopLeft:v,position:S,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:b}),T=_.cssClasses,E=_.cssProperties,k=JI(JI({transition:p&&s?"transform ".concat(a,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&f?"visible":"hidden",position:"absolute",top:0,left:0},y);return oe.createElement("div",{tabIndex:-1,className:T,style:k,ref:function(R){r.wrapperNode=R}},u)}}])})(O.PureComponent),Xue=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Jd={isSsr:Xue()};function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function tN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(n),!0).forEach(function(r){LO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Que(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m$(r.key),r)}}function Jue(e,t,n){return t&&Zue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ede(e,t,n){return t=my(t),tde(e,p$()?Reflect.construct(t,n||[],my(e).constructor):t.apply(e,n))}function tde(e,t){if(t&&(ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nde(e)}function nde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p$=function(){return!!e})()}function my(e){return my=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},my(e)}function rde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M2(e,t)}function M2(e,t){return M2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},M2(e,t)}function LO(e,t,n){return t=m$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m$(e){var t=ide(e,"string");return ud(t)=="symbol"?t:t+""}function ide(e,t){if(ud(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sde(e){return e.dataKey}function ode(e,t){return oe.isValidElement(e)?oe.cloneElement(e,t):typeof e=="function"?oe.createElement(e,t):oe.createElement(jue,t)}var zs=(function(e){function t(){return Que(this,t),ede(this,t,arguments)}return rde(t,e),Jue(t,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,l=i.allowEscapeViewBox,a=i.animationDuration,c=i.animationEasing,u=i.content,h=i.coordinate,f=i.filterNull,p=i.isAnimationActive,v=i.offset,S=i.payload,x=i.payloadUniqBy,g=i.position,b=i.reverseDirection,y=i.useTranslate3d,_=i.viewBox,T=i.wrapperStyle,E=S??[];f&&E.length&&(E=s$(S.filter(function(A){return A.value!=null&&(A.hide!==!0||r.props.includeHidden)}),x,sde));var k=E.length>0;return oe.createElement(Yue,{allowEscapeViewBox:l,animationDuration:a,animationEasing:c,isAnimationActive:p,active:s,coordinate:h,hasPayload:k,offset:v,position:g,reverseDirection:b,useTranslate3d:y,viewBox:_,wrapperStyle:T},ode(u,nN(nN({},this.props),{},{payload:E})))}}])})(O.PureComponent);LO(zs,"displayName","Tooltip");LO(zs,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Jd.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var SC,rN;function ade(){if(rN)return SC;rN=1;var e=ro(),t=function(){return e.Date.now()};return SC=t,SC}var wC,iN;function lde(){if(iN)return wC;iN=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return wC=t,wC}var CC,sN;function cde(){if(sN)return CC;sN=1;var e=lde(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return CC=n,CC}var EC,oN;function g$(){if(oN)return EC;oN=1;var e=cde(),t=sl(),n=Yd(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;function c(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=t(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=s.test(u);return f||l.test(u)?a(u.slice(2),f?2:8):i.test(u)?r:+u}return EC=c,EC}var TC,aN;function ude(){if(aN)return TC;aN=1;var e=sl(),t=ade(),n=g$(),r="Expected a function",i=Math.max,s=Math.min;function l(a,c,u){var h,f,p,v,S,x,g=0,b=!1,y=!1,_=!0;if(typeof a!="function")throw new TypeError(r);c=n(c)||0,e(u)&&(b=!!u.leading,y="maxWait"in u,p=y?i(n(u.maxWait)||0,c):p,_="trailing"in u?!!u.trailing:_);function T(N){var F=h,U=f;return h=f=void 0,g=N,v=a.apply(U,F),v}function E(N){return g=N,S=setTimeout(R,c),b?T(N):v}function k(N){var F=N-x,U=N-g,H=c-F;return y?s(H,p-U):H}function A(N){var F=N-x,U=N-g;return x===void 0||F>=c||F<0||y&&U>=p}function R(){var N=t();if(A(N))return L(N);S=setTimeout(R,k(N))}function L(N){return S=void 0,_&&h?T(N):(h=f=void 0,v)}function z(){S!==void 0&&clearTimeout(S),g=0,h=x=f=S=void 0}function D(){return S===void 0?v:L(t())}function $(){var N=t(),F=A(N);if(h=arguments,f=this,x=N,F){if(S===void 0)return E(x);if(y)return clearTimeout(S),S=setTimeout(R,c),T(x)}return S===void 0&&(S=setTimeout(R,c)),v}return $.cancel=z,$.flush=D,$}return TC=l,TC}var kC,lN;function dde(){if(lN)return kC;lN=1;var e=ude(),t=sl(),n="Expected a function";function r(i,s,l){var a=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(a="leading"in l?!!l.leading:a,c="trailing"in l?!!l.trailing:c),e(i,s,{leading:a,maxWait:s,trailing:c})}return kC=r,kC}var fde=dde();const v$=sn(fde);function np(e){"@babel/helpers - typeof";return np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(e)}function cN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cN(Object(n),!0).forEach(function(r){hde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hde(e,t,n){return t=pde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pde(e){var t=mde(e,"string");return np(t)=="symbol"?t:t+""}function mde(e,t){if(np(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(np(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gde(e,t){return _de(e)||bde(e,t)||yde(e,t)||vde()}function vde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yde(e,t){if(e){if(typeof e=="string")return uN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uN(e,t)}}function uN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function _de(e){if(Array.isArray(e))return e}var xde=O.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=e.width,l=s===void 0?"100%":s,a=e.height,c=a===void 0?"100%":a,u=e.minWidth,h=u===void 0?0:u,f=e.minHeight,p=e.maxHeight,v=e.children,S=e.debounce,x=S===void 0?0:S,g=e.id,b=e.className,y=e.onResize,_=e.style,T=_===void 0?{}:_,E=O.useRef(null),k=O.useRef();k.current=y,O.useImperativeHandle(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var A=O.useState({containerWidth:i.width,containerHeight:i.height}),R=gde(A,2),L=R[0],z=R[1],D=O.useCallback(function(N,F){z(function(U){var H=Math.round(N),K=Math.round(F);return U.containerWidth===H&&U.containerHeight===K?U:{containerWidth:H,containerHeight:K}})},[]);O.useEffect(function(){var N=function(I){var G,j=I[0].contentRect,B=j.width,V=j.height;D(B,V),(G=k.current)===null||G===void 0||G.call(k,B,V)};x>0&&(N=v$(N,x,{trailing:!0,leading:!1}));var F=new ResizeObserver(N),U=E.current.getBoundingClientRect(),H=U.width,K=U.height;return D(H,K),F.observe(E.current),function(){F.disconnect()}},[D,x]);var $=O.useMemo(function(){var N=L.containerWidth,F=L.containerHeight;if(N<0||F<0)return null;Io(Xl(l)||Xl(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
45
|
+
maybe you don't need to use a ResponsiveContainer.`,l,c),Io(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=Xl(l)?N:l,H=Xl(c)?F:c;n&&n>0&&(U?H=U/n:H&&(U=H*n),p&&H>p&&(H=p)),Io(U>0||H>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
46
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
47
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
48
|
+
height and width.`,U,H,l,c,h,f,n);var K=!Array.isArray(v)&&Do(v.type).endsWith("Chart");return oe.Children.map(v,function(W){return oe.isValidElement(W)?O.cloneElement(W,nv({width:U,height:H},K?{style:nv({height:"100%",width:"100%",maxHeight:H,maxWidth:U},W.props.style)}:{})):W})},[n,v,c,p,f,h,L,l]);return oe.createElement("div",{id:g?"".concat(g):void 0,className:Bt("recharts-responsive-container",b),style:nv(nv({},T),{},{width:l,height:c,minWidth:h,minHeight:f,maxHeight:p}),ref:E},$)}),y$=function(t){return null};y$.displayName="Cell";function rp(e){"@babel/helpers - typeof";return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(e)}function dN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dN(Object(n),!0).forEach(function(r){Sde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sde(e,t,n){return t=wde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wde(e){var t=Cde(e,"string");return rp(t)=="symbol"?t:t+""}function Cde(e,t){if(rp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ku={widthCache:{},cacheCount:0},Ede=2e3,Tde={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},fN="recharts_measurement_span";function kde(e){var t=L2({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Lh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Jd.isSsr)return{width:0,height:0};var r=kde(n),i=JSON.stringify({text:t,copyStyle:r});if(ku.widthCache[i])return ku.widthCache[i];try{var s=document.getElementById(fN);s||(s=document.createElement("span"),s.setAttribute("id",fN),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var l=L2(L2({},Tde),r);Object.assign(s.style,l),s.textContent="".concat(t);var a=s.getBoundingClientRect(),c={width:a.width,height:a.height};return ku.widthCache[i]=c,++ku.cacheCount>Ede&&(ku.cacheCount=0,ku.widthCache={}),c}catch{return{width:0,height:0}}},Ode=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ip(e){"@babel/helpers - typeof";return ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(e)}function gy(e,t){return Mde(e)||Pde(e,t)||Ade(e,t)||Rde()}function Rde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ade(e,t){if(e){if(typeof e=="string")return hN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hN(e,t)}}function hN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function Mde(e){if(Array.isArray(e))return e}function Lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dde(r.key),r)}}function jde(e,t,n){return t&&pN(e.prototype,t),n&&pN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dde(e){var t=Ide(e,"string");return ip(t)=="symbol"?t:t+""}function Ide(e,t){if(ip(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ip(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Nde=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Bde=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,b$={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},zde=Object.keys(b$),Lu="NaN";function Hde(e,t){return e*b$[t]}var rv=(function(){function e(t,n){Lde(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Nde.test(n)&&(this.num=NaN,this.unit=""),zde.includes(n)&&(this.num=Hde(t,n),this.unit="px")}return jde(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=Bde.exec(n))!==null&&r!==void 0?r:[],s=gy(i,3),l=s[1],a=s[2];return new e(parseFloat(l),a??"")}}])})();function _$(e){if(e.includes(Lu))return Lu;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=mN.exec(t))!==null&&n!==void 0?n:[],i=gy(r,4),s=i[1],l=i[2],a=i[3],c=rv.parse(s??""),u=rv.parse(a??""),h=l==="*"?c.multiply(u):c.divide(u);if(h.isNaN())return Lu;t=t.replace(mN,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=gN.exec(t))!==null&&f!==void 0?f:[],v=gy(p,4),S=v[1],x=v[2],g=v[3],b=rv.parse(S??""),y=rv.parse(g??""),_=x==="+"?b.add(y):b.subtract(y);if(_.isNaN())return Lu;t=t.replace(gN,_.toString())}return t}var vN=/\(([^()]*)\)/;function $de(e){for(var t=e;t.includes("(");){var n=vN.exec(t),r=gy(n,2),i=r[1];t=t.replace(vN,_$(i))}return t}function Fde(e){var t=e.replace(/\s+/g,"");return t=$de(t),t=_$(t),t}function Ude(e){try{return Fde(e)}catch{return Lu}}function OC(e){var t=Ude(e.slice(5,-1));return t===Lu?"":t}var Vde=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],qde=["dx","dy","angle","className","breakAll"];function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j2.apply(this,arguments)}function yN(e,t){if(e==null)return{};var n=Wde(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bN(e,t){return Xde(e)||Yde(e,t)||Kde(e,t)||Gde()}function Gde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kde(e,t){if(e){if(typeof e=="string")return _N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _N(e,t)}}function _N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function Xde(e){if(Array.isArray(e))return e}var x$=/[ \f\n\r\t\v\u2028\u2029]+/,S$=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var s=[];It(n)||(r?s=n.toString().split(""):s=n.toString().split(x$));var l=s.map(function(c){return{word:c,width:Lh(c,i).width}}),a=r?0:Lh(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:a}}catch{return null}},Qde=function(t,n,r,i,s){var l=t.maxLines,a=t.children,c=t.style,u=t.breakAll,h=$e(l),f=a,p=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(H,K){var W=K.word,I=K.width,G=H[H.length-1];if(G&&(i==null||s||G.width+I+r<Number(i)))G.words.push(W),G.width+=I+r;else{var j={words:[W],width:I};H.push(j)}return H},[])},v=p(n),S=function(U){return U.reduce(function(H,K){return H.width>K.width?H:K})};if(!h)return v;for(var x="…",g=function(U){var H=f.slice(0,U),K=S$({breakAll:u,style:c,children:H+x}).wordsWithComputedWidth,W=p(K),I=W.length>l||S(W).width>Number(i);return[I,W]},b=0,y=f.length-1,_=0,T;b<=y&&_<=f.length-1;){var E=Math.floor((b+y)/2),k=E-1,A=g(k),R=bN(A,2),L=R[0],z=R[1],D=g(E),$=bN(D,1),N=$[0];if(!L&&!N&&(b=E+1),L&&N&&(y=E-1),!L&&N){T=z;break}_++}return T||v},xN=function(t){var n=It(t)?[]:t.toString().split(x$);return[{words:n}]},Zde=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,l=t.breakAll,a=t.maxLines;if((n||r)&&!Jd.isSsr){var c,u,h=S$({breakAll:l,children:i,style:s});if(h){var f=h.wordsWithComputedWidth,p=h.spaceWidth;c=f,u=p}else return xN(i);return Qde({breakAll:l,children:i,maxLines:a,style:s},c,u,n,r)}return xN(i)},SN="#808080",vy=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,l=t.lineHeight,a=l===void 0?"1em":l,c=t.capHeight,u=c===void 0?"0.71em":c,h=t.scaleToFit,f=h===void 0?!1:h,p=t.textAnchor,v=p===void 0?"start":p,S=t.verticalAnchor,x=S===void 0?"end":S,g=t.fill,b=g===void 0?SN:g,y=yN(t,Vde),_=O.useMemo(function(){return Zde({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),T=y.dx,E=y.dy,k=y.angle,A=y.className,R=y.breakAll,L=yN(y,qde);if(!or(r)||!or(s))return null;var z=r+($e(T)?T:0),D=s+($e(E)?E:0),$;switch(x){case"start":$=OC("calc(".concat(u,")"));break;case"middle":$=OC("calc(".concat((_.length-1)/2," * -").concat(a," + (").concat(u," / 2))"));break;default:$=OC("calc(".concat(_.length-1," * -").concat(a,")"));break}var N=[];if(f){var F=_[0].width,U=y.width;N.push("scale(".concat(($e(U)?U/F:1)/F,")"))}return k&&N.push("rotate(".concat(k,", ").concat(z,", ").concat(D,")")),N.length&&(L.transform=N.join(" ")),oe.createElement("text",j2({},Mt(L,!0),{x:z,y:D,className:Bt("recharts-text",A),textAnchor:v,fill:b.includes("url")?SN:b}),_.map(function(H,K){var W=H.words.join(R?"":" ");return oe.createElement("tspan",{x:z,dy:K===0?$:a,key:"".concat(W,"-").concat(K)},W)}))};function Ga(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Jde(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function jO(e){let t,n,r;e.length!==2?(t=Ga,n=(a,c)=>Ga(e(a),c),r=(a,c)=>e(a)-c):(t=e===Ga||e===Jde?e:efe,n=e,r=e);function i(a,c,u=0,h=a.length){if(u<h){if(t(c,c)!==0)return h;do{const f=u+h>>>1;n(a[f],c)<0?u=f+1:h=f}while(u<h)}return u}function s(a,c,u=0,h=a.length){if(u<h){if(t(c,c)!==0)return h;do{const f=u+h>>>1;n(a[f],c)<=0?u=f+1:h=f}while(u<h)}return u}function l(a,c,u=0,h=a.length){const f=i(a,c,u,h-1);return f>u&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:i,center:l,right:s}}function efe(){return 0}function w$(e){return e===null?NaN:+e}function*tfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const nfe=jO(Ga),am=nfe.right;jO(w$).center;class wN extends Map{constructor(t,n=sfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(CN(this,t))}has(t){return super.has(CN(this,t))}set(t,n){return super.set(rfe(this,t),n)}delete(t){return super.delete(ife(this,t))}}function CN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function rfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ife({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function sfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ofe(e=Ga){if(e===Ga)return C$;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function C$(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const afe=Math.sqrt(50),lfe=Math.sqrt(10),cfe=Math.sqrt(2);function yy(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),l=s>=afe?10:s>=lfe?5:s>=cfe?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/l,a=Math.round(e*u),c=Math.round(t*u),a/u<e&&++a,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*l,a=Math.round(e/u),c=Math.round(t/u),a*u<e&&++a,c*u>t&&--c),c<a&&.5<=n&&n<2?yy(e,t,n*2):[a,c,u]}function D2(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,l]=r?yy(t,e,n):yy(e,t,n);if(!(s>=i))return[];const a=s-i+1,c=new Array(a);if(r)if(l<0)for(let u=0;u<a;++u)c[u]=(s-u)/-l;else for(let u=0;u<a;++u)c[u]=(s-u)*l;else if(l<0)for(let u=0;u<a;++u)c[u]=(i+u)/-l;else for(let u=0;u<a;++u)c[u]=(i+u)*l;return c}function I2(e,t,n){return t=+t,e=+e,n=+n,yy(e,t,n)[2]}function N2(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?I2(t,e,n):I2(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function EN(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function TN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function E$(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?C$:ofe(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,h=Math.log(c),f=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*f*(c-f)/c)*(u-c/2<0?-1:1),v=Math.max(n,Math.floor(t-u*f/c+p)),S=Math.min(r,Math.floor(t+(c-u)*f/c+p));E$(e,t,v,S,i)}const s=e[t];let l=n,a=r;for(uh(e,n,t),i(e[r],s)>0&&uh(e,n,r);l<a;){for(uh(e,l,a),++l,--a;i(e[l],s)<0;)++l;for(;i(e[a],s)>0;)--a}i(e[n],s)===0?uh(e,n,a):(++a,uh(e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}return e}function uh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ufe(e,t,n){if(e=Float64Array.from(tfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return TN(e);if(t>=1)return EN(e);var r,i=(r-1)*t,s=Math.floor(i),l=EN(E$(e,s).subarray(0,s+1)),a=TN(e.subarray(s+1));return l+(a-l)*(i-s)}}function dfe(e,t,n=w$){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,s=Math.floor(i),l=+n(e[s],s,e),a=+n(e[s+1],s+1,e);return l+(a-l)*(i-s)}}function ffe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function ss(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Qo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const B2=Symbol("implicit");function DO(){var e=new wN,t=[],n=[],r=B2;function i(s){let l=e.get(s);if(l===void 0){if(r!==B2)return r;e.set(s,l=t.push(s)-1)}return n[l%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new wN;for(const l of s)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return DO(t,n).unknown(r)},ss.apply(i,arguments),i}function sp(){var e=DO().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,l,a=!1,c=0,u=0,h=.5;delete e.unknown;function f(){var p=t().length,v=i<r,S=v?i:r,x=v?r:i;s=(x-S)/Math.max(1,p-c+u*2),a&&(s=Math.floor(s)),S+=(x-S-s*(p-c))*h,l=s*(1-c),a&&(S=Math.round(S),l=Math.round(l));var g=ffe(p).map(function(b){return S+s*b});return n(v?g.reverse():g)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return l},e.step=function(){return s},e.round=function(p){return arguments.length?(a=!!p,f()):a},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),f()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),f()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,f()):u},e.align=function(p){return arguments.length?(h=Math.max(0,Math.min(1,p)),f()):h},e.copy=function(){return sp(t(),[r,i]).round(a).paddingInner(c).paddingOuter(u).align(h)},ss.apply(f(),arguments)}function T$(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return T$(t())},e}function jh(){return T$(sp.apply(null,arguments).paddingInner(1))}function IO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function k$(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function lm(){}var op=.7,by=1/op,qu="\\s*([+-]?\\d+)\\s*",ap="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hfe=/^#([0-9a-f]{3,8})$/,pfe=new RegExp(`^rgb\\(${qu},${qu},${qu}\\)$`),mfe=new RegExp(`^rgb\\(${Gs},${Gs},${Gs}\\)$`),gfe=new RegExp(`^rgba\\(${qu},${qu},${qu},${ap}\\)$`),vfe=new RegExp(`^rgba\\(${Gs},${Gs},${Gs},${ap}\\)$`),yfe=new RegExp(`^hsl\\(${ap},${Gs},${Gs}\\)$`),bfe=new RegExp(`^hsla\\(${ap},${Gs},${Gs},${ap}\\)$`),kN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};IO(lm,lp,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ON,formatHex:ON,formatHex8:_fe,formatHsl:xfe,formatRgb:RN,toString:RN});function ON(){return this.rgb().formatHex()}function _fe(){return this.rgb().formatHex8()}function xfe(){return O$(this).formatHsl()}function RN(){return this.rgb().formatRgb()}function lp(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=hfe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?AN(t):n===3?new ni(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?iv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?iv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pfe.exec(e))?new ni(t[1],t[2],t[3],1):(t=mfe.exec(e))?new ni(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gfe.exec(e))?iv(t[1],t[2],t[3],t[4]):(t=vfe.exec(e))?iv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yfe.exec(e))?LN(t[1],t[2]/100,t[3]/100,1):(t=bfe.exec(e))?LN(t[1],t[2]/100,t[3]/100,t[4]):kN.hasOwnProperty(e)?AN(kN[e]):e==="transparent"?new ni(NaN,NaN,NaN,0):null}function AN(e){return new ni(e>>16&255,e>>8&255,e&255,1)}function iv(e,t,n,r){return r<=0&&(e=t=n=NaN),new ni(e,t,n,r)}function Sfe(e){return e instanceof lm||(e=lp(e)),e?(e=e.rgb(),new ni(e.r,e.g,e.b,e.opacity)):new ni}function z2(e,t,n,r){return arguments.length===1?Sfe(e):new ni(e,t,n,r??1)}function ni(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}IO(ni,z2,k$(lm,{brighter(e){return e=e==null?by:Math.pow(by,e),new ni(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?op:Math.pow(op,e),new ni(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ni(mc(this.r),mc(this.g),mc(this.b),_y(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:PN,formatHex:PN,formatHex8:wfe,formatRgb:MN,toString:MN}));function PN(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}`}function wfe(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}${Ql((isNaN(this.opacity)?1:this.opacity)*255)}`}function MN(){const e=_y(this.opacity);return`${e===1?"rgb(":"rgba("}${mc(this.r)}, ${mc(this.g)}, ${mc(this.b)}${e===1?")":`, ${e})`}`}function _y(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ql(e){return e=mc(e),(e<16?"0":"")+e.toString(16)}function LN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vs(e,t,n,r)}function O$(e){if(e instanceof vs)return new vs(e.h,e.s,e.l,e.opacity);if(e instanceof lm||(e=lp(e)),!e)return new vs;if(e instanceof vs)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),l=NaN,a=s-i,c=(s+i)/2;return a?(t===s?l=(n-r)/a+(n<r)*6:n===s?l=(r-t)/a+2:l=(t-n)/a+4,a/=c<.5?s+i:2-s-i,l*=60):a=c>0&&c<1?0:l,new vs(l,a,c,e.opacity)}function Cfe(e,t,n,r){return arguments.length===1?O$(e):new vs(e,t,n,r??1)}function vs(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}IO(vs,Cfe,k$(lm,{brighter(e){return e=e==null?by:Math.pow(by,e),new vs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?op:Math.pow(op,e),new vs(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ni(RC(e>=240?e-240:e+120,i,r),RC(e,i,r),RC(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new vs(jN(this.h),sv(this.s),sv(this.l),_y(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_y(this.opacity);return`${e===1?"hsl(":"hsla("}${jN(this.h)}, ${sv(this.s)*100}%, ${sv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jN(e){return e=(e||0)%360,e<0?e+360:e}function sv(e){return Math.max(0,Math.min(1,e||0))}function RC(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const NO=e=>()=>e;function Efe(e,t){return function(n){return e+n*t}}function Tfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function kfe(e){return(e=+e)==1?R$:function(t,n){return n-t?Tfe(t,n,e):NO(isNaN(t)?n:t)}}function R$(e,t){var n=t-e;return n?Efe(e,n):NO(isNaN(e)?t:e)}const DN=(function e(t){var n=kfe(t);function r(i,s){var l=n((i=z2(i)).r,(s=z2(s)).r),a=n(i.g,s.g),c=n(i.b,s.b),u=R$(i.opacity,s.opacity);return function(h){return i.r=l(h),i.g=a(h),i.b=c(h),i.opacity=u(h),i+""}}return r.gamma=e,r})(1);function Ofe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Rfe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Afe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),l;for(l=0;l<r;++l)i[l]=ef(e[l],t[l]);for(;l<n;++l)s[l]=t[l];return function(a){for(l=0;l<r;++l)s[l]=i[l](a);return s}}function Pfe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function xy(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Mfe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ef(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var H2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,AC=new RegExp(H2.source,"g");function Lfe(e){return function(){return e}}function jfe(e){return function(t){return e(t)+""}}function Dfe(e,t){var n=H2.lastIndex=AC.lastIndex=0,r,i,s,l=-1,a=[],c=[];for(e=e+"",t=t+"";(r=H2.exec(e))&&(i=AC.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[l]?a[l]+=s:a[++l]=s),(r=r[0])===(i=i[0])?a[l]?a[l]+=i:a[++l]=i:(a[++l]=null,c.push({i:l,x:xy(r,i)})),n=AC.lastIndex;return n<t.length&&(s=t.slice(n),a[l]?a[l]+=s:a[++l]=s),a.length<2?c[0]?jfe(c[0].x):Lfe(t):(t=c.length,function(u){for(var h=0,f;h<t;++h)a[(f=c[h]).i]=f.x(u);return a.join("")})}function ef(e,t){var n=typeof t,r;return t==null||n==="boolean"?NO(t):(n==="number"?xy:n==="string"?(r=lp(t))?(t=r,DN):Dfe:t instanceof lp?DN:t instanceof Date?Pfe:Rfe(t)?Ofe:Array.isArray(t)?Afe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Mfe:xy)(e,t)}function BO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ife(e,t){t===void 0&&(t=e,e=ef);for(var n=0,r=t.length-1,i=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(i,i=t[++n]);return function(l){var a=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return s[a](l-a)}}function Nfe(e){return function(){return e}}function Sy(e){return+e}var IN=[0,1];function Ur(e){return e}function $2(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Nfe(isNaN(t)?NaN:.5)}function Bfe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function zfe(e,t,n){var r=e[0],i=e[1],s=t[0],l=t[1];return i<r?(r=$2(i,r),s=n(l,s)):(r=$2(r,i),s=n(s,l)),function(a){return s(r(a))}}function Hfe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=$2(e[l],e[l+1]),s[l]=n(t[l],t[l+1]);return function(a){var c=am(e,a,1,r)-1;return s[c](i[c](a))}}function cm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function n0(){var e=IN,t=IN,n=ef,r,i,s,l=Ur,a,c,u;function h(){var p=Math.min(e.length,t.length);return l!==Ur&&(l=Bfe(e[0],e[p-1])),a=p>2?Hfe:zfe,c=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(c||(c=a(e.map(r),t,n)))(r(l(p)))}return f.invert=function(p){return l(i((u||(u=a(t,e.map(r),xy)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,Sy),h()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),h()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=BO,h()},f.clamp=function(p){return arguments.length?(l=p?!0:Ur,h()):l!==Ur},f.interpolate=function(p){return arguments.length?(n=p,h()):n},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,v){return r=p,i=v,h()}}function zO(){return n0()(Ur,Ur)}function $fe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wy(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function dd(e){return e=wy(Math.abs(e)),e?e[1]:NaN}function Ffe(e,t){return function(n,r){for(var i=n.length,s=[],l=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),s.push(n.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[l=(l+1)%e.length];return s.reverse().join(t)}}function Ufe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Vfe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cp(e){if(!(t=Vfe.exec(e)))throw new Error("invalid format: "+e);var t;return new HO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}cp.prototype=HO.prototype;function HO(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}HO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function qfe(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var A$;function Wfe(e,t){var n=wy(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(A$=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return s===l?r:s>l?r+new Array(s-l+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+wy(e,Math.max(0,t+s-1))[0]}function NN(e,t){var n=wy(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const BN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$fe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>NN(e*100,t),r:NN,s:Wfe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zN(e){return e}var HN=Array.prototype.map,$N=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gfe(e){var t=e.grouping===void 0||e.thousands===void 0?zN:Ffe(HN.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?zN:Ufe(HN.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=cp(f);var p=f.fill,v=f.align,S=f.sign,x=f.symbol,g=f.zero,b=f.width,y=f.comma,_=f.precision,T=f.trim,E=f.type;E==="n"?(y=!0,E="g"):BN[E]||(_===void 0&&(_=12),T=!0,E="g"),(g||p==="0"&&v==="=")&&(g=!0,p="0",v="=");var k=x==="$"?n:x==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",A=x==="$"?r:/[%p]/.test(E)?l:"",R=BN[E],L=/[defgprs%]/.test(E);_=_===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function z(D){var $=k,N=A,F,U,H;if(E==="c")N=R(D)+N,D="";else{D=+D;var K=D<0||1/D<0;if(D=isNaN(D)?c:R(Math.abs(D),_),T&&(D=qfe(D)),K&&+D==0&&S!=="+"&&(K=!1),$=(K?S==="("?S:a:S==="-"||S==="("?"":S)+$,N=(E==="s"?$N[8+A$/3]:"")+N+(K&&S==="("?")":""),L){for(F=-1,U=D.length;++F<U;)if(H=D.charCodeAt(F),48>H||H>57){N=(H===46?i+D.slice(F+1):D.slice(F))+N,D=D.slice(0,F);break}}}y&&!g&&(D=t(D,1/0));var W=$.length+D.length+N.length,I=W<b?new Array(b-W+1).join(p):"";switch(y&&g&&(D=t(I+D,I.length?b-N.length:1/0),I=""),v){case"<":D=$+D+N+I;break;case"=":D=$+I+D+N;break;case"^":D=I.slice(0,W=I.length>>1)+$+D+N+I.slice(W);break;default:D=I+$+D+N;break}return s(D)}return z.toString=function(){return f+""},z}function h(f,p){var v=u((f=cp(f),f.type="f",f)),S=Math.max(-8,Math.min(8,Math.floor(dd(p)/3)))*3,x=Math.pow(10,-S),g=$N[8+S/3];return function(b){return v(x*b)+g}}return{format:u,formatPrefix:h}}var ov,$O,P$;Kfe({thousands:",",grouping:[3],currency:["$",""]});function Kfe(e){return ov=Gfe(e),$O=ov.format,P$=ov.formatPrefix,ov}function Yfe(e){return Math.max(0,-dd(Math.abs(e)))}function Xfe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(dd(t)/3)))*3-dd(Math.abs(e)))}function Qfe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,dd(t)-dd(e))+1}function M$(e,t,n,r){var i=N2(e,t,n),s;switch(r=cp(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Xfe(i,l))&&(r.precision=s),P$(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Qfe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Yfe(i))&&(r.precision=s-(r.type==="%")*2);break}}return $O(r)}function al(e){var t=e.domain;return e.ticks=function(n){var r=t();return D2(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return M$(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,l=r[i],a=r[s],c,u,h=10;for(a<l&&(u=l,l=a,a=u,u=i,i=s,s=u);h-- >0;){if(u=I2(l,a,n),u===c)return r[i]=l,r[s]=a,t(r);if(u>0)l=Math.floor(l/u)*u,a=Math.ceil(a/u)*u;else if(u<0)l=Math.ceil(l*u)/u,a=Math.floor(a*u)/u;else break;c=u}return e},e}function Cy(){var e=zO();return e.copy=function(){return cm(e,Cy())},ss.apply(e,arguments),al(e)}function L$(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Sy),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return L$(e).unknown(t)},e=arguments.length?Array.from(e,Sy):[0,1],al(n)}function j$(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],l;return s<i&&(l=n,n=r,r=l,l=i,i=s,s=l),e[n]=t.floor(i),e[r]=t.ceil(s),e}function FN(e){return Math.log(e)}function UN(e){return Math.exp(e)}function Zfe(e){return-Math.log(-e)}function Jfe(e){return-Math.exp(-e)}function ehe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function the(e){return e===10?ehe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function nhe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function VN(e){return(t,n)=>-e(-t,n)}function FO(e){const t=e(FN,UN),n=t.domain;let r=10,i,s;function l(){return i=nhe(r),s=the(r),n()[0]<0?(i=VN(i),s=VN(s),e(Zfe,Jfe)):e(FN,UN),t}return t.base=function(a){return arguments.length?(r=+a,l()):r},t.domain=function(a){return arguments.length?(n(a),l()):n()},t.ticks=a=>{const c=n();let u=c[0],h=c[c.length-1];const f=h<u;f&&([u,h]=[h,u]);let p=i(u),v=i(h),S,x;const g=a==null?10:+a;let b=[];if(!(r%1)&&v-p<g){if(p=Math.floor(p),v=Math.ceil(v),u>0){for(;p<=v;++p)for(S=1;S<r;++S)if(x=p<0?S/s(-p):S*s(p),!(x<u)){if(x>h)break;b.push(x)}}else for(;p<=v;++p)for(S=r-1;S>=1;--S)if(x=p>0?S/s(-p):S*s(p),!(x<u)){if(x>h)break;b.push(x)}b.length*2<g&&(b=D2(u,h,g))}else b=D2(p,v,Math.min(v-p,g)).map(s);return f?b.reverse():b},t.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=cp(c)).precision==null&&(c.trim=!0),c=$O(c)),a===1/0)return c;const u=Math.max(1,r*a/t.ticks().length);return h=>{let f=h/s(Math.round(i(h)));return f*r<r-.5&&(f*=r),f<=u?c(h):""}},t.nice=()=>n(j$(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),t}function D$(){const e=FO(n0()).domain([1,10]);return e.copy=()=>cm(e,D$()).base(e.base()),ss.apply(e,arguments),e}function qN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function WN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function UO(e){var t=1,n=e(qN(t),WN(t));return n.constant=function(r){return arguments.length?e(qN(t=+r),WN(t)):t},al(n)}function I$(){var e=UO(n0());return e.copy=function(){return cm(e,I$()).constant(e.constant())},ss.apply(e,arguments)}function GN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rhe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ihe(e){return e<0?-e*e:e*e}function VO(e){var t=e(Ur,Ur),n=1;function r(){return n===1?e(Ur,Ur):n===.5?e(rhe,ihe):e(GN(n),GN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},al(t)}function qO(){var e=VO(n0());return e.copy=function(){return cm(e,qO()).exponent(e.exponent())},ss.apply(e,arguments),e}function she(){return qO.apply(null,arguments).exponent(.5)}function KN(e){return Math.sign(e)*e*e}function ohe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function N$(){var e=zO(),t=[0,1],n=!1,r;function i(s){var l=ohe(e(s));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(s){return e.invert(KN(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,Sy)).map(KN)),i):t.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return N$(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ss.apply(i,arguments),al(i)}function B$(){var e=[],t=[],n=[],r;function i(){var l=0,a=Math.max(1,t.length);for(n=new Array(a-1);++l<a;)n[l-1]=dfe(e,l/a);return s}function s(l){return l==null||isNaN(l=+l)?r:t[am(n,l)]}return s.invertExtent=function(l){var a=t.indexOf(l);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},s.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let a of l)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Ga),i()},s.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},s.unknown=function(l){return arguments.length?(r=l,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return B$().domain(e).range(t).unknown(r)},ss.apply(s,arguments)}function z$(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function l(c){return c!=null&&c<=c?i[am(r,c,0,n)]:s}function a(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,a()):[e,t]},l.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,a()):i.slice()},l.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},l.unknown=function(c){return arguments.length&&(s=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return z$().domain([e,t]).range(i).unknown(s)},ss.apply(al(l),arguments)}function H$(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[am(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var l=t.indexOf(s);return[e[l-1],e[l]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return H$().domain(e).range(t).unknown(n)},ss.apply(i,arguments)}const PC=new Date,MC=new Date;function lr(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const l=i(s),a=i.ceil(s);return s-l<a-s?l:a},i.offset=(s,l)=>(t(s=new Date(+s),l==null?1:Math.floor(l)),s),i.range=(s,l,a)=>{const c=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s<l)||!(a>0))return c;let u;do c.push(u=new Date(+s)),t(s,a),e(s);while(u<s&&s<l);return c},i.filter=s=>lr(l=>{if(l>=l)for(;e(l),!s(l);)l.setTime(l-1)},(l,a)=>{if(l>=l)if(a<0)for(;++a<=0;)for(;t(l,-1),!s(l););else for(;--a>=0;)for(;t(l,1),!s(l););}),n&&(i.count=(s,l)=>(PC.setTime(+s),MC.setTime(+l),e(PC),e(MC),Math.floor(n(PC,MC))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?l=>r(l)%s===0:l=>i.count(0,l)%s===0):i)),i}const Ey=lr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ey.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?lr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ey);Ey.range;const Po=1e3,Yi=Po*60,Mo=Yi*60,Ho=Mo*24,WO=Ho*7,YN=Ho*30,LC=Ho*365,Zl=lr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Po)},(e,t)=>(t-e)/Po,e=>e.getUTCSeconds());Zl.range;const GO=lr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Po)},(e,t)=>{e.setTime(+e+t*Yi)},(e,t)=>(t-e)/Yi,e=>e.getMinutes());GO.range;const KO=lr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yi)},(e,t)=>(t-e)/Yi,e=>e.getUTCMinutes());KO.range;const YO=lr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Po-e.getMinutes()*Yi)},(e,t)=>{e.setTime(+e+t*Mo)},(e,t)=>(t-e)/Mo,e=>e.getHours());YO.range;const XO=lr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Mo)},(e,t)=>(t-e)/Mo,e=>e.getUTCHours());XO.range;const um=lr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yi)/Ho,e=>e.getDate()-1);um.range;const r0=lr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ho,e=>e.getUTCDate()-1);r0.range;const $$=lr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ho,e=>Math.floor(e/Ho));$$.range;function Hc(e){return lr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Yi)/WO)}const i0=Hc(0),Ty=Hc(1),ahe=Hc(2),lhe=Hc(3),fd=Hc(4),che=Hc(5),uhe=Hc(6);i0.range;Ty.range;ahe.range;lhe.range;fd.range;che.range;uhe.range;function $c(e){return lr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/WO)}const s0=$c(0),ky=$c(1),dhe=$c(2),fhe=$c(3),hd=$c(4),hhe=$c(5),phe=$c(6);s0.range;ky.range;dhe.range;fhe.range;hd.range;hhe.range;phe.range;const QO=lr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());QO.range;const ZO=lr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ZO.range;const $o=lr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());$o.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});$o.range;const Fo=lr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Fo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Fo.range;function F$(e,t,n,r,i,s){const l=[[Zl,1,Po],[Zl,5,5*Po],[Zl,15,15*Po],[Zl,30,30*Po],[s,1,Yi],[s,5,5*Yi],[s,15,15*Yi],[s,30,30*Yi],[i,1,Mo],[i,3,3*Mo],[i,6,6*Mo],[i,12,12*Mo],[r,1,Ho],[r,2,2*Ho],[n,1,WO],[t,1,YN],[t,3,3*YN],[e,1,LC]];function a(u,h,f){const p=h<u;p&&([u,h]=[h,u]);const v=f&&typeof f.range=="function"?f:c(u,h,f),S=v?v.range(u,+h+1):[];return p?S.reverse():S}function c(u,h,f){const p=Math.abs(h-u)/f,v=jO(([,,g])=>g).right(l,p);if(v===l.length)return e.every(N2(u/LC,h/LC,f));if(v===0)return Ey.every(Math.max(N2(u,h,f),1));const[S,x]=l[p/l[v-1][2]<l[v][2]/p?v-1:v];return S.every(x)}return[a,c]}const[mhe,ghe]=F$(Fo,ZO,s0,$$,XO,KO),[vhe,yhe]=F$($o,QO,i0,um,YO,GO);function jC(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function DC(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function dh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function bhe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,l=e.shortDays,a=e.months,c=e.shortMonths,u=fh(i),h=hh(i),f=fh(s),p=hh(s),v=fh(l),S=hh(l),x=fh(a),g=hh(a),b=fh(c),y=hh(c),_={a:K,A:W,b:I,B:G,c:null,d:t4,e:t4,f:Fhe,g:Zhe,G:epe,H:zhe,I:Hhe,j:$he,L:U$,m:Uhe,M:Vhe,p:j,q:B,Q:i4,s:s4,S:qhe,u:Whe,U:Ghe,V:Khe,w:Yhe,W:Xhe,x:null,X:null,y:Qhe,Y:Jhe,Z:tpe,"%":r4},T={a:V,A:X,b:re,B:ie,c:null,d:n4,e:n4,f:spe,g:mpe,G:vpe,H:npe,I:rpe,j:ipe,L:q$,m:ope,M:ape,p:Q,q:Y,Q:i4,s:s4,S:lpe,u:cpe,U:upe,V:dpe,w:fpe,W:hpe,x:null,X:null,y:ppe,Y:gpe,Z:ype,"%":r4},E={a:z,A:D,b:$,B:N,c:F,d:JN,e:JN,f:Dhe,g:ZN,G:QN,H:e4,I:e4,j:Phe,L:jhe,m:Ahe,M:Mhe,p:L,q:Rhe,Q:Nhe,s:Bhe,S:Lhe,u:Che,U:Ehe,V:The,w:whe,W:khe,x:U,X:H,y:ZN,Y:QN,Z:Ohe,"%":Ihe};_.x=k(n,_),_.X=k(r,_),_.c=k(t,_),T.x=k(n,T),T.X=k(r,T),T.c=k(t,T);function k(J,ee){return function(ne){var te=[],le=-1,fe=0,pe=J.length,de,ue,Ie;for(ne instanceof Date||(ne=new Date(+ne));++le<pe;)J.charCodeAt(le)===37&&(te.push(J.slice(fe,le)),(ue=XN[de=J.charAt(++le)])!=null?de=J.charAt(++le):ue=de==="e"?" ":"0",(Ie=ee[de])&&(de=Ie(ne,ue)),te.push(de),fe=le+1);return te.push(J.slice(fe,le)),te.join("")}}function A(J,ee){return function(ne){var te=dh(1900,void 0,1),le=R(te,J,ne+="",0),fe,pe;if(le!=ne.length)return null;if("Q"in te)return new Date(te.Q);if("s"in te)return new Date(te.s*1e3+("L"in te?te.L:0));if(ee&&!("Z"in te)&&(te.Z=0),"p"in te&&(te.H=te.H%12+te.p*12),te.m===void 0&&(te.m="q"in te?te.q:0),"V"in te){if(te.V<1||te.V>53)return null;"w"in te||(te.w=1),"Z"in te?(fe=DC(dh(te.y,0,1)),pe=fe.getUTCDay(),fe=pe>4||pe===0?ky.ceil(fe):ky(fe),fe=r0.offset(fe,(te.V-1)*7),te.y=fe.getUTCFullYear(),te.m=fe.getUTCMonth(),te.d=fe.getUTCDate()+(te.w+6)%7):(fe=jC(dh(te.y,0,1)),pe=fe.getDay(),fe=pe>4||pe===0?Ty.ceil(fe):Ty(fe),fe=um.offset(fe,(te.V-1)*7),te.y=fe.getFullYear(),te.m=fe.getMonth(),te.d=fe.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),pe="Z"in te?DC(dh(te.y,0,1)).getUTCDay():jC(dh(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(pe+5)%7:te.w+te.U*7-(pe+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,DC(te)):jC(te)}}function R(J,ee,ne,te){for(var le=0,fe=ee.length,pe=ne.length,de,ue;le<fe;){if(te>=pe)return-1;if(de=ee.charCodeAt(le++),de===37){if(de=ee.charAt(le++),ue=E[de in XN?ee.charAt(le++):de],!ue||(te=ue(J,ne,te))<0)return-1}else if(de!=ne.charCodeAt(te++))return-1}return te}function L(J,ee,ne){var te=u.exec(ee.slice(ne));return te?(J.p=h.get(te[0].toLowerCase()),ne+te[0].length):-1}function z(J,ee,ne){var te=v.exec(ee.slice(ne));return te?(J.w=S.get(te[0].toLowerCase()),ne+te[0].length):-1}function D(J,ee,ne){var te=f.exec(ee.slice(ne));return te?(J.w=p.get(te[0].toLowerCase()),ne+te[0].length):-1}function $(J,ee,ne){var te=b.exec(ee.slice(ne));return te?(J.m=y.get(te[0].toLowerCase()),ne+te[0].length):-1}function N(J,ee,ne){var te=x.exec(ee.slice(ne));return te?(J.m=g.get(te[0].toLowerCase()),ne+te[0].length):-1}function F(J,ee,ne){return R(J,t,ee,ne)}function U(J,ee,ne){return R(J,n,ee,ne)}function H(J,ee,ne){return R(J,r,ee,ne)}function K(J){return l[J.getDay()]}function W(J){return s[J.getDay()]}function I(J){return c[J.getMonth()]}function G(J){return a[J.getMonth()]}function j(J){return i[+(J.getHours()>=12)]}function B(J){return 1+~~(J.getMonth()/3)}function V(J){return l[J.getUTCDay()]}function X(J){return s[J.getUTCDay()]}function re(J){return c[J.getUTCMonth()]}function ie(J){return a[J.getUTCMonth()]}function Q(J){return i[+(J.getUTCHours()>=12)]}function Y(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var ee=k(J+="",_);return ee.toString=function(){return J},ee},parse:function(J){var ee=A(J+="",!1);return ee.toString=function(){return J},ee},utcFormat:function(J){var ee=k(J+="",T);return ee.toString=function(){return J},ee},utcParse:function(J){var ee=A(J+="",!0);return ee.toString=function(){return J},ee}}}var XN={"-":"",_:" ",0:"0"},pr=/^\s*\d+/,_he=/^%/,xhe=/[\\^$*+?|[\]().{}]/g;function Ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function She(e){return e.replace(xhe,"\\$&")}function fh(e){return new RegExp("^(?:"+e.map(She).join("|")+")","i")}function hh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function whe(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Che(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ehe(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function The(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function khe(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function QN(e,t,n){var r=pr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ZN(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ohe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Rhe(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ahe(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function JN(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Phe(e,t,n){var r=pr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function e4(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Mhe(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Lhe(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function jhe(e,t,n){var r=pr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Dhe(e,t,n){var r=pr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ihe(e,t,n){var r=_he.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Nhe(e,t,n){var r=pr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Bhe(e,t,n){var r=pr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function t4(e,t){return Ft(e.getDate(),t,2)}function zhe(e,t){return Ft(e.getHours(),t,2)}function Hhe(e,t){return Ft(e.getHours()%12||12,t,2)}function $he(e,t){return Ft(1+um.count($o(e),e),t,3)}function U$(e,t){return Ft(e.getMilliseconds(),t,3)}function Fhe(e,t){return U$(e,t)+"000"}function Uhe(e,t){return Ft(e.getMonth()+1,t,2)}function Vhe(e,t){return Ft(e.getMinutes(),t,2)}function qhe(e,t){return Ft(e.getSeconds(),t,2)}function Whe(e){var t=e.getDay();return t===0?7:t}function Ghe(e,t){return Ft(i0.count($o(e)-1,e),t,2)}function V$(e){var t=e.getDay();return t>=4||t===0?fd(e):fd.ceil(e)}function Khe(e,t){return e=V$(e),Ft(fd.count($o(e),e)+($o(e).getDay()===4),t,2)}function Yhe(e){return e.getDay()}function Xhe(e,t){return Ft(Ty.count($o(e)-1,e),t,2)}function Qhe(e,t){return Ft(e.getFullYear()%100,t,2)}function Zhe(e,t){return e=V$(e),Ft(e.getFullYear()%100,t,2)}function Jhe(e,t){return Ft(e.getFullYear()%1e4,t,4)}function epe(e,t){var n=e.getDay();return e=n>=4||n===0?fd(e):fd.ceil(e),Ft(e.getFullYear()%1e4,t,4)}function tpe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ft(t/60|0,"0",2)+Ft(t%60,"0",2)}function n4(e,t){return Ft(e.getUTCDate(),t,2)}function npe(e,t){return Ft(e.getUTCHours(),t,2)}function rpe(e,t){return Ft(e.getUTCHours()%12||12,t,2)}function ipe(e,t){return Ft(1+r0.count(Fo(e),e),t,3)}function q$(e,t){return Ft(e.getUTCMilliseconds(),t,3)}function spe(e,t){return q$(e,t)+"000"}function ope(e,t){return Ft(e.getUTCMonth()+1,t,2)}function ape(e,t){return Ft(e.getUTCMinutes(),t,2)}function lpe(e,t){return Ft(e.getUTCSeconds(),t,2)}function cpe(e){var t=e.getUTCDay();return t===0?7:t}function upe(e,t){return Ft(s0.count(Fo(e)-1,e),t,2)}function W$(e){var t=e.getUTCDay();return t>=4||t===0?hd(e):hd.ceil(e)}function dpe(e,t){return e=W$(e),Ft(hd.count(Fo(e),e)+(Fo(e).getUTCDay()===4),t,2)}function fpe(e){return e.getUTCDay()}function hpe(e,t){return Ft(ky.count(Fo(e)-1,e),t,2)}function ppe(e,t){return Ft(e.getUTCFullYear()%100,t,2)}function mpe(e,t){return e=W$(e),Ft(e.getUTCFullYear()%100,t,2)}function gpe(e,t){return Ft(e.getUTCFullYear()%1e4,t,4)}function vpe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?hd(e):hd.ceil(e),Ft(e.getUTCFullYear()%1e4,t,4)}function ype(){return"+0000"}function r4(){return"%"}function i4(e){return+e}function s4(e){return Math.floor(+e/1e3)}var Ou,G$,K$;bpe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function bpe(e){return Ou=bhe(e),G$=Ou.format,Ou.parse,K$=Ou.utcFormat,Ou.utcParse,Ou}function _pe(e){return new Date(e)}function xpe(e){return e instanceof Date?+e:+new Date(+e)}function JO(e,t,n,r,i,s,l,a,c,u){var h=zO(),f=h.invert,p=h.domain,v=u(".%L"),S=u(":%S"),x=u("%I:%M"),g=u("%I %p"),b=u("%a %d"),y=u("%b %d"),_=u("%B"),T=u("%Y");function E(k){return(c(k)<k?v:a(k)<k?S:l(k)<k?x:s(k)<k?g:r(k)<k?i(k)<k?b:y:n(k)<k?_:T)(k)}return h.invert=function(k){return new Date(f(k))},h.domain=function(k){return arguments.length?p(Array.from(k,xpe)):p().map(_pe)},h.ticks=function(k){var A=p();return e(A[0],A[A.length-1],k??10)},h.tickFormat=function(k,A){return A==null?E:u(A)},h.nice=function(k){var A=p();return(!k||typeof k.range!="function")&&(k=t(A[0],A[A.length-1],k??10)),k?p(j$(A,k)):h},h.copy=function(){return cm(h,JO(e,t,n,r,i,s,l,a,c,u))},h}function Spe(){return ss.apply(JO(vhe,yhe,$o,QO,i0,um,YO,GO,Zl,G$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wpe(){return ss.apply(JO(mhe,ghe,Fo,ZO,s0,r0,XO,KO,Zl,K$).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function o0(){var e=0,t=1,n,r,i,s,l=Ur,a=!1,c;function u(f){return f==null||isNaN(f=+f)?c:l(i===0?.5:(f=(s(f)-n)*i,a?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(a=!!f,u):a},u.interpolator=function(f){return arguments.length?(l=f,u):l};function h(f){return function(p){var v,S;return arguments.length?([v,S]=p,l=f(v,S),u):[l(0),l(1)]}}return u.range=h(ef),u.rangeRound=h(BO),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return s=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),u}}function ll(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Y$(){var e=al(o0()(Ur));return e.copy=function(){return ll(e,Y$())},Qo.apply(e,arguments)}function X$(){var e=FO(o0()).domain([1,10]);return e.copy=function(){return ll(e,X$()).base(e.base())},Qo.apply(e,arguments)}function Q$(){var e=UO(o0());return e.copy=function(){return ll(e,Q$()).constant(e.constant())},Qo.apply(e,arguments)}function eR(){var e=VO(o0());return e.copy=function(){return ll(e,eR()).exponent(e.exponent())},Qo.apply(e,arguments)}function Cpe(){return eR.apply(null,arguments).exponent(.5)}function Z$(){var e=[],t=Ur;function n(r){if(r!=null&&!isNaN(r=+r))return t((am(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ga),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>ufe(e,s/r))},n.copy=function(){return Z$(t).domain(e)},Qo.apply(n,arguments)}function a0(){var e=0,t=.5,n=1,r=1,i,s,l,a,c,u=Ur,h,f=!1,p;function v(x){return isNaN(x=+x)?p:(x=.5+((x=+h(x))-s)*(r*x<r*s?a:c),u(f?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([e,t,n]=x,i=h(e=+e),s=h(t=+t),l=h(n=+n),a=i===s?0:.5/(s-i),c=s===l?0:.5/(l-s),r=s<i?-1:1,v):[e,t,n]},v.clamp=function(x){return arguments.length?(f=!!x,v):f},v.interpolator=function(x){return arguments.length?(u=x,v):u};function S(x){return function(g){var b,y,_;return arguments.length?([b,y,_]=g,u=Ife(x,[b,y,_]),v):[u(0),u(.5),u(1)]}}return v.range=S(ef),v.rangeRound=S(BO),v.unknown=function(x){return arguments.length?(p=x,v):p},function(x){return h=x,i=x(e),s=x(t),l=x(n),a=i===s?0:.5/(s-i),c=s===l?0:.5/(l-s),r=s<i?-1:1,v}}function J$(){var e=al(a0()(Ur));return e.copy=function(){return ll(e,J$())},Qo.apply(e,arguments)}function eF(){var e=FO(a0()).domain([.1,1,10]);return e.copy=function(){return ll(e,eF()).base(e.base())},Qo.apply(e,arguments)}function tF(){var e=UO(a0());return e.copy=function(){return ll(e,tF()).constant(e.constant())},Qo.apply(e,arguments)}function tR(){var e=VO(a0());return e.copy=function(){return ll(e,tR()).exponent(e.exponent())},Qo.apply(e,arguments)}function Epe(){return tR.apply(null,arguments).exponent(.5)}const o4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:sp,scaleDiverging:J$,scaleDivergingLog:eF,scaleDivergingPow:tR,scaleDivergingSqrt:Epe,scaleDivergingSymlog:tF,scaleIdentity:L$,scaleImplicit:B2,scaleLinear:Cy,scaleLog:D$,scaleOrdinal:DO,scalePoint:jh,scalePow:qO,scaleQuantile:B$,scaleQuantize:z$,scaleRadial:N$,scaleSequential:Y$,scaleSequentialLog:X$,scaleSequentialPow:eR,scaleSequentialQuantile:Z$,scaleSequentialSqrt:Cpe,scaleSequentialSymlog:Q$,scaleSqrt:she,scaleSymlog:I$,scaleThreshold:H$,scaleTime:Spe,scaleUtc:wpe,tickFormat:M$},Symbol.toStringTag,{value:"Module"}));var IC,a4;function nF(){if(a4)return IC;a4=1;var e=Yd();function t(n,r,i){for(var s=-1,l=n.length;++s<l;){var a=n[s],c=r(a);if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,h=a}return h}return IC=t,IC}var NC,l4;function Tpe(){if(l4)return NC;l4=1;function e(t,n){return t>n}return NC=e,NC}var BC,c4;function kpe(){if(c4)return BC;c4=1;var e=nF(),t=Tpe(),n=Zd();function r(i){return i&&i.length?e(i,n,t):void 0}return BC=r,BC}var Ope=kpe();const Da=sn(Ope);var zC,u4;function Rpe(){if(u4)return zC;u4=1;function e(t,n){return t<n}return zC=e,zC}var HC,d4;function Ape(){if(d4)return HC;d4=1;var e=nF(),t=Rpe(),n=Zd();function r(i){return i&&i.length?e(i,n,t):void 0}return HC=r,HC}var Ppe=Ape();const l0=sn(Ppe);var $C,f4;function Mpe(){if(f4)return $C;f4=1;var e=vO(),t=ol(),n=u$(),r=si();function i(s,l){var a=r(s)?e:n;return a(s,t(l,3))}return $C=i,$C}var FC,h4;function Lpe(){if(h4)return FC;h4=1;var e=l$(),t=Mpe();function n(r,i){return e(t(r,i),1)}return FC=n,FC}var jpe=Lpe();const Dpe=sn(jpe);var UC,p4;function Ipe(){if(p4)return UC;p4=1;var e=AO();function t(n,r){return e(n,r)}return UC=t,UC}var Npe=Ipe();const up=sn(Npe);var tf=1e9,Bpe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},rR,bn=!0,is="[DecimalError] ",gc=is+"Invalid argument: ",nR=is+"Exponent out of range: ",nf=Math.floor,Nl=Math.pow,zpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ci,fr=1e7,pn=7,rF=9007199254740991,Oy=nf(rF/pn),Ke={};Ke.absoluteValue=Ke.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ke.comparedTo=Ke.cmp=function(e){var t,n,r,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(r=s.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};Ke.decimalPlaces=Ke.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*pn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ke.dividedBy=Ke.div=function(e){return No(this,new this.constructor(e))};Ke.dividedToIntegerBy=Ke.idiv=function(e){var t=this,n=t.constructor;return ln(No(t,new n(e),0,1),n.precision)};Ke.equals=Ke.eq=function(e){return!this.cmp(e)};Ke.exponent=function(){return Gn(this)};Ke.greaterThan=Ke.gt=function(e){return this.cmp(e)>0};Ke.greaterThanOrEqualTo=Ke.gte=function(e){return this.cmp(e)>=0};Ke.isInteger=Ke.isint=function(){return this.e>this.d.length-2};Ke.isNegative=Ke.isneg=function(){return this.s<0};Ke.isPositive=Ke.ispos=function(){return this.s>0};Ke.isZero=function(){return this.s===0};Ke.lessThan=Ke.lt=function(e){return this.cmp(e)<0};Ke.lessThanOrEqualTo=Ke.lte=function(e){return this.cmp(e)<1};Ke.logarithm=Ke.log=function(e){var t,n=this,r=n.constructor,i=r.precision,s=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ci))throw Error(is+"NaN");if(n.s<1)throw Error(is+(n.s?"NaN":"-Infinity"));return n.eq(Ci)?new r(0):(bn=!1,t=No(dp(n,s),dp(e,s),s),bn=!0,ln(t,i))};Ke.minus=Ke.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?oF(t,e):iF(t,(e.s=-e.s,e))};Ke.modulo=Ke.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(is+"NaN");return n.s?(bn=!1,t=No(n,e,0,1).times(e),bn=!0,n.minus(t)):ln(new r(n),i)};Ke.naturalExponential=Ke.exp=function(){return sF(this)};Ke.naturalLogarithm=Ke.ln=function(){return dp(this)};Ke.negated=Ke.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ke.plus=Ke.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iF(t,e):oF(t,(e.s=-e.s,e))};Ke.precision=Ke.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(gc+e);if(t=Gn(i)+1,r=i.d.length-1,n=r*pn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ke.squareRoot=Ke.sqrt=function(){var e,t,n,r,i,s,l,a=this,c=a.constructor;if(a.s<1){if(!a.s)return new c(0);throw Error(is+"NaN")}for(e=Gn(a),bn=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Us(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=nf((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=l=n+3;;)if(s=r,r=s.plus(No(a,s,l+2)).times(.5),Us(s.d).slice(0,l)===(t=Us(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(ln(s,n+1,0),s.times(s).eq(a)){r=s;break}}else if(t!="9999")break;l+=4}return bn=!0,ln(r,n)};Ke.times=Ke.mul=function(e){var t,n,r,i,s,l,a,c,u,h=this,f=h.constructor,p=h.d,v=(e=new f(e)).d;if(!h.s||!e.s)return new f(0);for(e.s*=h.s,n=h.e+e.e,c=p.length,u=v.length,c<u&&(s=p,p=v,v=s,l=c,c=u,u=l),s=[],l=c+u,r=l;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)a=s[i]+v[r]*p[i-r-1]+t,s[i--]=a%fr|0,t=a/fr|0;s[i]=(s[i]+t)%fr|0}for(;!s[--l];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,bn?ln(e,f.precision):e};Ke.toDecimalPlaces=Ke.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Zs(e,0,tf),t===void 0?t=r.rounding:Zs(t,0,8),ln(n,e+Gn(n)+1,t))};Ke.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=kc(r,!0):(Zs(e,0,tf),t===void 0?t=i.rounding:Zs(t,0,8),r=ln(new i(r),e+1,t),n=kc(r,!0,e+1)),n};Ke.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?kc(i):(Zs(e,0,tf),t===void 0?t=s.rounding:Zs(t,0,8),r=ln(new s(i),e+Gn(i)+1,t),n=kc(r.abs(),!1,e+Gn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ke.toInteger=Ke.toint=function(){var e=this,t=e.constructor;return ln(new t(e),Gn(e)+1,t.rounding)};Ke.toNumber=function(){return+this};Ke.toPower=Ke.pow=function(e){var t,n,r,i,s,l,a=this,c=a.constructor,u=12,h=+(e=new c(e));if(!e.s)return new c(Ci);if(a=new c(a),!a.s){if(e.s<1)throw Error(is+"Infinity");return a}if(a.eq(Ci))return a;if(r=c.precision,e.eq(Ci))return ln(a,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=a.s,l){if((n=h<0?-h:h)<=rF){for(i=new c(Ci),t=Math.ceil(r/pn+4),bn=!1;n%2&&(i=i.times(a),g4(i.d,t)),n=nf(n/2),n!==0;)a=a.times(a),g4(a.d,t);return bn=!0,e.s<0?new c(Ci).div(i):ln(i,r)}}else if(s<0)throw Error(is+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,a.s=1,bn=!1,i=e.times(dp(a,r+u)),bn=!0,i=sF(i),i.s=s,i};Ke.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Gn(i),r=kc(i,n<=s.toExpNeg||n>=s.toExpPos)):(Zs(e,1,tf),t===void 0?t=s.rounding:Zs(t,0,8),i=ln(new s(i),e,t),n=Gn(i),r=kc(i,e<=n||n<=s.toExpNeg,e)),r};Ke.toSignificantDigits=Ke.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Zs(e,1,tf),t===void 0?t=r.rounding:Zs(t,0,8)),ln(new r(n),e,t)};Ke.toString=Ke.valueOf=Ke.val=Ke.toJSON=Ke[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Gn(e),n=e.constructor;return kc(e,t<=n.toExpNeg||t>=n.toExpPos)};function iF(e,t){var n,r,i,s,l,a,c,u,h=e.constructor,f=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),bn?ln(t,f):t;if(c=e.d,u=t.d,l=e.e,i=t.e,c=c.slice(),s=l-i,s){for(s<0?(r=c,s=-s,a=u.length):(r=u,i=l,a=c.length),l=Math.ceil(f/pn),a=l>a?l+1:a+1,s>a&&(s=a,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(a=c.length,s=u.length,a-s<0&&(s=a,r=u,u=c,c=r),n=0;s;)n=(c[--s]=c[s]+u[s]+n)/fr|0,c[s]%=fr;for(n&&(c.unshift(n),++i),a=c.length;c[--a]==0;)c.pop();return t.d=c,t.e=i,bn?ln(t,f):t}function Zs(e,t,n){if(e!==~~e||e<t||e>n)throw Error(gc+e)}function Us(e){var t,n,r,i=e.length-1,s="",l=e[0];if(i>0){for(s+=l,t=1;t<i;t++)r=e[t]+"",n=pn-r.length,n&&(s+=Oa(n)),s+=r;l=e[t],r=l+"",n=pn-r.length,n&&(s+=Oa(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return s+l}var No=(function(){function e(r,i){var s,l=0,a=r.length;for(r=r.slice();a--;)s=r[a]*i+l,r[a]=s%fr|0,l=s/fr|0;return l&&r.unshift(l),r}function t(r,i,s,l){var a,c;if(s!=l)c=s>l?1:-1;else for(a=c=0;a<s;a++)if(r[a]!=i[a]){c=r[a]>i[a]?1:-1;break}return c}function n(r,i,s){for(var l=0;s--;)r[s]-=l,l=r[s]<i[s]?1:0,r[s]=l*fr+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,l){var a,c,u,h,f,p,v,S,x,g,b,y,_,T,E,k,A,R,L=r.constructor,z=r.s==i.s?1:-1,D=r.d,$=i.d;if(!r.s)return new L(r);if(!i.s)throw Error(is+"Division by zero");for(c=r.e-i.e,A=$.length,E=D.length,v=new L(z),S=v.d=[],u=0;$[u]==(D[u]||0);)++u;if($[u]>(D[u]||0)&&--c,s==null?y=s=L.precision:l?y=s+(Gn(r)-Gn(i))+1:y=s,y<0)return new L(0);if(y=y/pn+2|0,u=0,A==1)for(h=0,$=$[0],y++;(u<E||h)&&y--;u++)_=h*fr+(D[u]||0),S[u]=_/$|0,h=_%$|0;else{for(h=fr/($[0]+1)|0,h>1&&($=e($,h),D=e(D,h),A=$.length,E=D.length),T=A,x=D.slice(0,A),g=x.length;g<A;)x[g++]=0;R=$.slice(),R.unshift(0),k=$[0],$[1]>=fr/2&&++k;do h=0,a=t($,x,A,g),a<0?(b=x[0],A!=g&&(b=b*fr+(x[1]||0)),h=b/k|0,h>1?(h>=fr&&(h=fr-1),f=e($,h),p=f.length,g=x.length,a=t(f,x,p,g),a==1&&(h--,n(f,A<p?R:$,p))):(h==0&&(a=h=1),f=$.slice()),p=f.length,p<g&&f.unshift(0),n(x,f,g),a==-1&&(g=x.length,a=t($,x,A,g),a<1&&(h++,n(x,A<g?R:$,g))),g=x.length):a===0&&(h++,x=[0]),S[u++]=h,a&&x[0]?x[g++]=D[T]||0:(x=[D[T]],g=1);while((T++<E||x[0]!==void 0)&&y--)}return S[0]||S.shift(),v.e=c,ln(v,l?s+Gn(v)+1:s)}})();function sF(e,t){var n,r,i,s,l,a,c=0,u=0,h=e.constructor,f=h.precision;if(Gn(e)>16)throw Error(nR+Gn(e));if(!e.s)return new h(Ci);for(bn=!1,a=f,l=new h(.03125);e.abs().gte(.1);)e=e.times(l),u+=5;for(r=Math.log(Nl(2,u))/Math.LN10*2+5|0,a+=r,n=i=s=new h(Ci),h.precision=a;;){if(i=ln(i.times(e),a),n=n.times(++c),l=s.plus(No(i,n,a)),Us(l.d).slice(0,a)===Us(s.d).slice(0,a)){for(;u--;)s=ln(s.times(s),a);return h.precision=f,t==null?(bn=!0,ln(s,f)):s}s=l}}function Gn(e){for(var t=e.e*pn,n=e.d[0];n>=10;n/=10)t++;return t}function VC(e,t,n){if(t>e.LN10.sd())throw bn=!0,n&&(e.precision=n),Error(is+"LN10 precision limit exceeded");return ln(new e(e.LN10),t)}function Oa(e){for(var t="";e--;)t+="0";return t}function dp(e,t){var n,r,i,s,l,a,c,u,h,f=1,p=10,v=e,S=v.d,x=v.constructor,g=x.precision;if(v.s<1)throw Error(is+(v.s?"NaN":"-Infinity"));if(v.eq(Ci))return new x(0);if(t==null?(bn=!1,u=g):u=t,v.eq(10))return t==null&&(bn=!0),VC(x,u);if(u+=p,x.precision=u,n=Us(S),r=n.charAt(0),s=Gn(v),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=Us(v.d),r=n.charAt(0),f++;s=Gn(v),r>1?(v=new x("0."+n),s++):v=new x(r+"."+n.slice(1))}else return c=VC(x,u+2,g).times(s+""),v=dp(new x(r+"."+n.slice(1)),u-p).plus(c),x.precision=g,t==null?(bn=!0,ln(v,g)):v;for(a=l=v=No(v.minus(Ci),v.plus(Ci),u),h=ln(v.times(v),u),i=3;;){if(l=ln(l.times(h),u),c=a.plus(No(l,new x(i),u)),Us(c.d).slice(0,u)===Us(a.d).slice(0,u))return a=a.times(2),s!==0&&(a=a.plus(VC(x,u+2,g).times(s+""))),a=No(a,new x(f),u),x.precision=g,t==null?(bn=!0,ln(a,g)):a;a=c,i+=2}}function m4(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=nf(n/pn),e.d=[],r=(n+1)%pn,n<0&&(r+=pn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=pn;r<i;)e.d.push(+t.slice(r,r+=pn));t=t.slice(r),r=pn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bn&&(e.e>Oy||e.e<-Oy))throw Error(nR+n)}else e.s=0,e.e=0,e.d=[0];return e}function ln(e,t,n){var r,i,s,l,a,c,u,h,f=e.d;for(l=1,s=f[0];s>=10;s/=10)l++;if(r=t-l,r<0)r+=pn,i=t,u=f[h=0];else{if(h=Math.ceil((r+1)/pn),s=f.length,h>=s)return e;for(u=s=f[h],l=1;s>=10;s/=10)l++;r%=pn,i=r-pn+l}if(n!==void 0&&(s=Nl(10,l-i-1),a=u/s%10|0,c=t<0||f[h+1]!==void 0||u%s,c=n<4?(a||c)&&(n==0||n==(e.s<0?3:2)):a>5||a==5&&(n==4||c||n==6&&(r>0?i>0?u/Nl(10,l-i):0:f[h-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(s=Gn(e),f.length=1,t=t-s-1,f[0]=Nl(10,(pn-t%pn)%pn),e.e=nf(-t/pn)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=h,s=1,h--):(f.length=h+1,s=Nl(10,pn-r),f[h]=i>0?(u/Nl(10,l-i)%Nl(10,i)|0)*s:0),c)for(;;)if(h==0){(f[0]+=s)==fr&&(f[0]=1,++e.e);break}else{if(f[h]+=s,f[h]!=fr)break;f[h--]=0,s=1}for(r=f.length;f[--r]===0;)f.pop();if(bn&&(e.e>Oy||e.e<-Oy))throw Error(nR+Gn(e));return e}function oF(e,t){var n,r,i,s,l,a,c,u,h,f,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),bn?ln(t,v):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),l=u-r,l){for(h=l<0,h?(n=c,l=-l,a=f.length):(n=f,r=u,a=c.length),i=Math.max(Math.ceil(v/pn),a)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=c.length,a=f.length,h=i<a,h&&(a=i),i=0;i<a;i++)if(c[i]!=f[i]){h=c[i]<f[i];break}l=0}for(h&&(n=c,c=f,f=n,t.s=-t.s),a=c.length,i=f.length-a;i>0;--i)c[a++]=0;for(i=f.length;i>l;){if(c[--i]<f[i]){for(s=i;s&&c[--s]===0;)c[s]=fr-1;--c[s],c[i]+=fr}c[i]-=f[i]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,bn?ln(t,v):t):new p(0)}function kc(e,t,n){var r,i=Gn(e),s=Us(e.d),l=s.length;return t?(n&&(r=n-l)>0?s=s.charAt(0)+"."+s.slice(1)+Oa(r):l>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+Oa(-i-1)+s,n&&(r=n-l)>0&&(s+=Oa(r))):i>=l?(s+=Oa(i+1-l),n&&(r=n-i-1)>0&&(s=s+"."+Oa(r))):((r=i+1)<l&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(s+="."),s+=Oa(r))),e.s<0?"-"+s:s}function g4(e,t){if(e.length>t)return e.length=t,!0}function aF(e){var t,n,r;function i(s){var l=this;if(!(l instanceof i))return new i(s);if(l.constructor=i,s instanceof i){l.s=s.s,l.e=s.e,l.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(gc+s);if(s>0)l.s=1;else if(s<0)s=-s,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(s===~~s&&s<1e7){l.e=0,l.d=[s];return}return m4(l,s.toString())}else if(typeof s!="string")throw Error(gc+s);if(s.charCodeAt(0)===45?(s=s.slice(1),l.s=-1):l.s=1,zpe.test(s))m4(l,s);else throw Error(gc+s)}if(i.prototype=Ke,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=aF,i.config=i.set=Hpe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Hpe(e){if(!e||typeof e!="object")throw Error(is+"Object expected");var t,n,r,i=["precision",1,tf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(nf(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(gc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(gc+n+": "+r);return this}var rR=aF(Bpe);Ci=new rR(1);const rn=rR;function $pe(e){return qpe(e)||Vpe(e)||Upe(e)||Fpe()}function Fpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Upe(e,t){if(e){if(typeof e=="string")return F2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F2(e,t)}}function Vpe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qpe(e){if(Array.isArray(e))return F2(e)}function F2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wpe=function(t){return t},lF={},cF=function(t){return t===lF},v4=function(t){return function n(){return arguments.length===0||arguments.length===1&&cF(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Gpe=function e(t,n){return t===1?n:v4(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var l=i.filter(function(a){return a!==lF}).length;return l>=t?n.apply(void 0,i):e(t-l,v4(function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];var h=i.map(function(f){return cF(f)?c.shift():f});return n.apply(void 0,$pe(h).concat(c))}))})},c0=function(t){return Gpe(t.length,t)},U2=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Kpe=c0(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Ype=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Wpe;var i=n.reverse(),s=i[0],l=i.slice(1);return function(){return l.reduce(function(a,c){return c(a)},s.apply(void 0,arguments))}},V2=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},uF=function(t){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return n&&s.every(function(a,c){return a===n[c]})||(n=s,r=t.apply(void 0,s)),r}};function Xpe(e){var t;return e===0?t=1:t=Math.floor(new rn(e).abs().log(10).toNumber())+1,t}function Qpe(e,t,n){for(var r=new rn(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var Zpe=c0(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Jpe=c0(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),eme=c0(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const u0={rangeStep:Qpe,getDigitCount:Xpe,interpolateNumber:Zpe,uninterpolateNumber:Jpe,uninterpolateTruncation:eme};function q2(e){return rme(e)||nme(e)||dF(e)||tme()}function tme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nme(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function rme(e){if(Array.isArray(e))return W2(e)}function fp(e,t){return ome(e)||sme(e,t)||dF(e,t)||ime()}function ime(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dF(e,t){if(e){if(typeof e=="string")return W2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W2(e,t)}}function W2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sme(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var l=e[Symbol.iterator](),a;!(r=(a=l.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,s=c}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw s}}return n}}function ome(e){if(Array.isArray(e))return e}function fF(e){var t=fp(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function hF(e,t,n){if(e.lte(0))return new rn(0);var r=u0.getDigitCount(e.toNumber()),i=new rn(10).pow(r),s=e.div(i),l=r!==1?.05:.1,a=new rn(Math.ceil(s.div(l).toNumber())).add(n).mul(l),c=a.mul(i);return t?c:new rn(Math.ceil(c))}function ame(e,t,n){var r=1,i=new rn(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new rn(10).pow(u0.getDigitCount(e)-1),i=new rn(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new rn(Math.floor(e)))}else e===0?i=new rn(Math.floor((t-1)/2)):n||(i=new rn(Math.floor(e)));var l=Math.floor((t-1)/2),a=Ype(Kpe(function(c){return i.add(new rn(c-l).mul(r)).toNumber()}),U2);return a(0,t)}function pF(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new rn(0),tickMin:new rn(0),tickMax:new rn(0)};var s=hF(new rn(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new rn(0):(l=new rn(e).add(t).div(2),l=l.sub(new rn(l).mod(s)));var a=Math.ceil(l.sub(e).div(s).toNumber()),c=Math.ceil(new rn(t).sub(l).div(s).toNumber()),u=a+c+1;return u>n?pF(e,t,n,r,i+1):(u<n&&(c=t>0?c+(n-u):c,a=t>0?a:a+(n-u)),{step:s,tickMin:l.sub(new rn(a).mul(s)),tickMax:l.add(new rn(c).mul(s))})}function lme(e){var t=fp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),a=fF([n,r]),c=fp(a,2),u=c[0],h=c[1];if(u===-1/0||h===1/0){var f=h===1/0?[u].concat(q2(U2(0,i-1).map(function(){return 1/0}))):[].concat(q2(U2(0,i-1).map(function(){return-1/0})),[h]);return n>r?V2(f):f}if(u===h)return ame(u,i,s);var p=pF(u,h,l,s),v=p.step,S=p.tickMin,x=p.tickMax,g=u0.rangeStep(S,x.add(new rn(.1).mul(v)),v);return n>r?V2(g):g}function cme(e,t){var n=fp(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=fF([r,i]),a=fp(l,2),c=a[0],u=a[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var h=Math.max(t,2),f=hF(new rn(u).sub(c).div(h-1),s,0),p=[].concat(q2(u0.rangeStep(new rn(c),new rn(u).sub(new rn(.99).mul(f)),f)),[u]);return r>i?V2(p):p}var ume=uF(lme),dme=uF(cme),fme=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function Ry(){return Ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ry.apply(this,arguments)}function hme(e,t){return vme(e)||gme(e,t)||mme(e,t)||pme()}function pme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
54
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mme(e,t){if(e){if(typeof e=="string")return y4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y4(e,t)}}function y4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function vme(e){if(Array.isArray(e))return e}function yme(e,t){if(e==null)return{};var n=bme(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xme(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vF(r.key),r)}}function Sme(e,t,n){return t&&xme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wme(e,t,n){return t=Ay(t),Cme(e,mF()?Reflect.construct(t,n||[],Ay(e).constructor):t.apply(e,n))}function Cme(e,t){if(t&&(pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eme(e)}function Eme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mF=function(){return!!e})()}function Ay(e){return Ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ay(e)}function Tme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G2(e,t)}function G2(e,t){return G2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},G2(e,t)}function gF(e,t,n){return t=vF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vF(e){var t=kme(e,"string");return pd(t)=="symbol"?t:t+""}function kme(e,t){if(pd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var d0=(function(e){function t(){return _me(this,t),wme(this,t,arguments)}return Tme(t,e),Sme(t,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,l=r.width,a=r.dataKey,c=r.data,u=r.dataPointFormatter,h=r.xAxis,f=r.yAxis,p=yme(r,fme),v=Mt(p,!1);this.props.direction==="x"&&h.type!=="number"&&Dr(!1);var S=c.map(function(x){var g=u(x,a),b=g.x,y=g.y,_=g.value,T=g.errorVal;if(!T)return null;var E=[],k,A;if(Array.isArray(T)){var R=hme(T,2);k=R[0],A=R[1]}else k=A=T;if(s==="vertical"){var L=h.scale,z=y+i,D=z+l,$=z-l,N=L(_-k),F=L(_+A);E.push({x1:F,y1:D,x2:F,y2:$}),E.push({x1:N,y1:z,x2:F,y2:z}),E.push({x1:N,y1:D,x2:N,y2:$})}else if(s==="horizontal"){var U=f.scale,H=b+i,K=H-l,W=H+l,I=U(_-k),G=U(_+A);E.push({x1:K,y1:G,x2:W,y2:G}),E.push({x1:H,y1:I,x2:H,y2:G}),E.push({x1:K,y1:I,x2:W,y2:I})}return oe.createElement(Cn,Ry({className:"recharts-errorBar",key:"bar-".concat(E.map(function(j){return"".concat(j.x1,"-").concat(j.x2,"-").concat(j.y1,"-").concat(j.y2)}))},v),E.map(function(j){return oe.createElement("line",Ry({},j,{key:"line-".concat(j.x1,"-").concat(j.x2,"-").concat(j.y1,"-").concat(j.y2)}))}))});return oe.createElement(Cn,{className:"recharts-errorBars"},S)}}])})(oe.Component);gF(d0,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});gF(d0,"displayName","ErrorBar");function hp(e){"@babel/helpers - typeof";return hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hp(e)}function b4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b4(Object(n),!0).forEach(function(r){Ome(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ome(e,t,n){return t=Rme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rme(e){var t=Ame(e,"string");return hp(t)=="symbol"?t:t+""}function Ame(e,t){if(hp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yF=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,l=_i(n,Vu);if(!l)return null;var a=Vu.defaultProps,c=a!==void 0?jl(jl({},a),l.props):{},u;return l.props&&l.props.payload?u=l.props&&l.props.payload:s==="children"?u=(r||[]).reduce(function(h,f){var p=f.item,v=f.props,S=v.sectors||v.data||[];return h.concat(S.map(function(x){return{type:l.props.iconType||p.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):u=(r||[]).map(function(h){var f=h.item,p=f.type.defaultProps,v=p!==void 0?jl(jl({},p),f.props):{},S=v.dataKey,x=v.name,g=v.legendType,b=v.hide;return{inactive:b,dataKey:S,type:c.iconType||g||"square",color:iR(f),value:x||S,payload:v}}),jl(jl(jl({},c),Vu.getWithHeight(l,i)),{},{payload:u,item:l})};function pp(e){"@babel/helpers - typeof";return pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(e)}function _4(e){return jme(e)||Lme(e)||Mme(e)||Pme()}function Pme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mme(e,t){if(e){if(typeof e=="string")return K2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K2(e,t)}}function Lme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jme(e){if(Array.isArray(e))return K2(e)}function K2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x4(Object(n),!0).forEach(function(r){Wu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wu(e,t,n){return t=Dme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dme(e){var t=Ime(e,"string");return pp(t)=="symbol"?t:t+""}function Ime(e,t){if(pp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ki(e,t,n){return It(e)||It(t)?n:or(t)?es(e,t,n):Ct(t)?t(e):n}function Dh(e,t,n,r){var i=Dpe(e,function(a){return ki(a,t)});if(n==="number"){var s=i.filter(function(a){return $e(a)||parseFloat(a)});return s.length?[l0(s),Da(s)]:[1/0,-1/0]}var l=r?i.filter(function(a){return!It(a)}):i;return l.map(function(a){return or(a)||a instanceof Date?a:""})}var Nme=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,l=-1,a=(n=r?.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var c=s.range,u=0;u<a;u++){var h=u>0?i[u-1].coordinate:i[a-1].coordinate,f=i[u].coordinate,p=u>=a-1?i[0].coordinate:i[u+1].coordinate,v=void 0;if(Ss(f-h)!==Ss(p-f)){var S=[];if(Ss(p-f)===Ss(c[1]-c[0])){v=p;var x=f+c[1]-c[0];S[0]=Math.min(x,(x+h)/2),S[1]=Math.max(x,(x+h)/2)}else{v=h;var g=p+c[1]-c[0];S[0]=Math.min(f,(g+f)/2),S[1]=Math.max(f,(g+f)/2)}var b=[Math.min(f,(v+f)/2),Math.max(f,(v+f)/2)];if(t>b[0]&&t<=b[1]||t>=S[0]&&t<=S[1]){l=i[u].index;break}}else{var y=Math.min(h,p),_=Math.max(h,p);if(t>(y+f)/2&&t<=(_+f)/2){l=i[u].index;break}}}else for(var T=0;T<a;T++)if(T===0&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T>0&&T<a-1&&t>(r[T].coordinate+r[T-1].coordinate)/2&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T===a-1&&t>(r[T].coordinate+r[T-1].coordinate)/2){l=r[T].index;break}return l},iR=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?kn(kn({},t.type.defaultProps),t.props):t.props,l=s.stroke,a=s.fill,c;switch(i){case"Line":c=l;break;case"Area":case"Radar":c=l&&l!=="none"?l:a;break;default:c=a;break}return c},Bme=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var l={},a=Object.keys(s),c=0,u=a.length;c<u;c++)for(var h=s[a[c]].stackGroups,f=Object.keys(h),p=0,v=f.length;p<v;p++){var S=h[f[p]],x=S.items,g=S.cateAxisId,b=x.filter(function(A){return Do(A.type).indexOf("Bar")>=0});if(b&&b.length){var y=b[0].type.defaultProps,_=y!==void 0?kn(kn({},y),b[0].props):b[0].props,T=_.barSize,E=_[g];l[E]||(l[E]=[]);var k=It(T)?n:T;l[E].push({item:b[0],stackList:b.slice(1),barSize:It(k)?void 0:Tc(k,r,0)})}}return l},zme=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,l=s===void 0?[]:s,a=t.maxBarSize,c=l.length;if(c<1)return null;var u=Tc(n,i,0,!0),h,f=[];if(l[0].barSize===+l[0].barSize){var p=!1,v=i/c,S=l.reduce(function(T,E){return T+E.barSize||0},0);S+=(c-1)*u,S>=i&&(S-=(c-1)*u,u=0),S>=i&&v>0&&(p=!0,v*=.9,S=c*v);var x=(i-S)/2>>0,g={offset:x-u,size:0};h=l.reduce(function(T,E){var k={item:E.item,position:{offset:g.offset+g.size+u,size:p?v:E.barSize}},A=[].concat(_4(T),[k]);return g=A[A.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){A.push({item:R,position:g})}),A},f)}else{var b=Tc(r,i,0,!0);i-2*b-(c-1)*u<=0&&(u=0);var y=(i-2*b-(c-1)*u)/c;y>1&&(y>>=0);var _=a===+a?Math.min(y,a):y;h=l.reduce(function(T,E,k){var A=[].concat(_4(T),[{item:E.item,position:{offset:b+(y+u)*k+(y-_)/2,size:_}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(R){A.push({item:R,position:A[A.length-1].position})}),A},f)}return h},Hme=function(t,n,r,i){var s=r.children,l=r.width,a=r.margin,c=l-(a.left||0)-(a.right||0),u=yF({children:s,legendWidth:c});if(u){var h=i||{},f=h.width,p=h.height,v=u.align,S=u.verticalAlign,x=u.layout;if((x==="vertical"||x==="horizontal"&&S==="middle")&&v!=="center"&&$e(t[v]))return kn(kn({},t),{},Wu({},v,t[v]+(f||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&S!=="middle"&&$e(t[S]))return kn(kn({},t),{},Wu({},S,t[S]+(p||0)))}return t},$me=function(t,n,r){return It(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},bF=function(t,n,r,i,s){var l=n.props.children,a=ws(l,d0).filter(function(u){return $me(i,s,u.props.direction)});if(a&&a.length){var c=a.map(function(u){return u.props.dataKey});return t.reduce(function(u,h){var f=ki(h,r);if(It(f))return u;var p=Array.isArray(f)?[l0(f),Da(f)]:[f,f],v=c.reduce(function(S,x){var g=ki(h,x,0),b=p[0]-Math.abs(Array.isArray(g)?g[0]:g),y=p[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(b,S[0]),Math.max(y,S[1])]},[1/0,-1/0]);return[Math.min(v[0],u[0]),Math.max(v[1],u[1])]},[1/0,-1/0])}return null},Fme=function(t,n,r,i,s){var l=n.map(function(a){return bF(t,a,r,s,i)}).filter(function(a){return!It(a)});return l&&l.length?l.reduce(function(a,c){return[Math.min(a[0],c[0]),Math.max(a[1],c[1])]},[1/0,-1/0]):null},_F=function(t,n,r,i,s){var l=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&bF(t,c,u,i)||Dh(t,u,r,s)});if(r==="number")return l.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var a={};return l.reduce(function(c,u){for(var h=0,f=u.length;h<f;h++)a[u[h]]||(a[u[h]]=!0,c.push(u[h]));return c},[])},xF=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},SF=function(t,n,r,i){if(i)return t.map(function(c){return c.coordinate});var s,l,a=t.map(function(c){return c.coordinate===n&&(s=!0),c.coordinate===r&&(l=!0),c.coordinate});return s||a.push(n),l||a.push(r),a},Lo=function(t,n,r){if(!t)return null;var i=t.scale,s=t.duplicateDomain,l=t.type,a=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&a?.length>=2?Ss(a[0]-a[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(f){var p=s?s.indexOf(f):f;return{coordinate:i(p)+u,value:f,offset:u}});return h.filter(function(f){return!Qd(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:i(f)+u,value:f,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,p){return{coordinate:i(f)+u,value:s?s[f]:f,index:p,offset:u}})},qC=new WeakMap,av=function(t,n){if(typeof n!="function")return t;qC.has(t)||qC.set(t,new WeakMap);var r=qC.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},Ume=function(t,n,r){var i=t.scale,s=t.type,l=t.layout,a=t.axisType;if(i==="auto")return l==="radial"&&a==="radiusAxis"?{scale:sp(),realScaleType:"band"}:l==="radial"&&a==="angleAxis"?{scale:Cy(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:jh(),realScaleType:"point"}:s==="category"?{scale:sp(),realScaleType:"band"}:{scale:Cy(),realScaleType:"linear"};if(Ec(i)){var c="scale".concat(Yb(i));return{scale:(o4[c]||jh)(),realScaleType:o4[c]?c:"point"}}return Ct(i)?{scale:i}:{scale:jh(),realScaleType:"point"}},S4=1e-4,Vme=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),s=Math.min(i[0],i[1])-S4,l=Math.max(i[0],i[1])+S4,a=t(n[0]),c=t(n[r-1]);(a<s||a>l||c<s||c>l)&&t.domain([n[0],n[r-1]])}},qme=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},Wme=function(t,n){if(!n||n.length!==2||!$e(n[0])||!$e(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),s=[t[0],t[1]];return(!$e(t[0])||t[0]<r)&&(s[0]=r),(!$e(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},Gme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,l=0,a=0;a<n;++a){var c=Qd(t[a][r][1])?t[a][r][0]:t[a][r][1];c>=0?(t[a][r][0]=s,t[a][r][1]=s+c,s=t[a][r][1]):(t[a][r][0]=l,t[a][r][1]=l+c,l=t[a][r][1])}},Kme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,l=0;l<n;++l){var a=Qd(t[l][r][1])?t[l][r][0]:t[l][r][1];a>=0?(t[l][r][0]=s,t[l][r][1]=s+a,s=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},Yme={sign:Gme,expand:Mle,none:od,silhouette:Lle,wiggle:jle,positive:Kme},Xme=function(t,n,r){var i=n.map(function(a){return a.props.dataKey}),s=Yme[r],l=Ple().keys(i).value(function(a,c){return+ki(a,c,0)}).order(C2).offset(s);return l(t)},Qme=function(t,n,r,i,s,l){if(!t)return null;var a=l?n.reverse():n,c={},u=a.reduce(function(f,p){var v,S=(v=p.type)!==null&&v!==void 0&&v.defaultProps?kn(kn({},p.type.defaultProps),p.props):p.props,x=S.stackId,g=S.hide;if(g)return f;var b=S[r],y=f[b]||{hasStack:!1,stackGroups:{}};if(or(x)){var _=y.stackGroups[x]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(p),y.hasStack=!0,y.stackGroups[x]=_}else y.stackGroups[sm("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return kn(kn({},f),{},Wu({},b,y))},c),h={};return Object.keys(u).reduce(function(f,p){var v=u[p];if(v.hasStack){var S={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,g){var b=v.stackGroups[g];return kn(kn({},x),{},Wu({},g,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:Xme(t,b.items,s)}))},S)}return kn(kn({},f),{},Wu({},p,v))},h)},Zme=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,l=n.originalDomain,a=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(s&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var u=t.domain();if(!u.length)return null;var h=ume(u,s,a);return t.domain([l0(h),Da(h)]),{niceTicks:h}}if(s&&i==="number"){var f=t.domain(),p=dme(f,s,a);return{niceTicks:p}}return null};function w4(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!It(i[t.dataKey])){var a=iy(n,"value",i[t.dataKey]);if(a)return a.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var c=ki(i,It(l)?t.dataKey:l);return It(c)?null:t.scale(c)}var C4=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,l=t.entry,a=t.index;if(n.type==="category")return r[a]?r[a].coordinate+i:null;var c=ki(l,n.dataKey,n.domain[a]);return It(c)?null:n.scale(c)-s/2+i},Jme=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},ege=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?kn(kn({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(or(s)){var l=n[s];if(l){var a=l.items.indexOf(t);return a>=0?l.stackedData[a]:null}}return null},tge=function(t){return t.reduce(function(n,r){return[l0(r.concat([n[0]]).filter($e)),Da(r.concat([n[1]]).filter($e))]},[1/0,-1/0])},wF=function(t,n,r){return Object.keys(t).reduce(function(i,s){var l=t[s],a=l.stackedData,c=a.reduce(function(u,h){var f=tge(h.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},E4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,T4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Y2=function(t,n,r){if(Ct(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if($e(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(E4.test(t[0])){var s=+E4.exec(t[0])[1];i[0]=n[0]-s}else Ct(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if($e(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(T4.test(t[1])){var l=+T4.exec(t[1])[1];i[1]=n[1]+l}else Ct(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Py=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var s=MO(n,function(f){return f.coordinate}),l=1/0,a=1,c=s.length;a<c;a++){var u=s[a],h=s[a-1];l=Math.min((u.coordinate||0)-(h.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},k4=function(t,n,r){return!t||!t.length||up(t,es(r,"type.defaultProps.domain"))?n:t},CF=function(t,n){var r=t.type.defaultProps?kn(kn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,s=r.name,l=r.unit,a=r.formatter,c=r.tooltipType,u=r.chartType,h=r.hide;return kn(kn({},Mt(t,!1)),{},{dataKey:i,unit:l,formatter:a,name:s||i,color:iR(t),value:ki(n,i),type:c,payload:n,chartType:u,hide:h})};function mp(e){"@babel/helpers - typeof";return mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mp(e)}function O4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function R4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O4(Object(n),!0).forEach(function(r){nge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nge(e,t,n){return t=rge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rge(e){var t=ige(e,"string");return mp(t)=="symbol"?t:t+""}function ige(e,t){if(mp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var My=Math.PI/180,sge=function(t){return t*180/Math.PI},wr=function(t,n,r,i){return{x:t+Math.cos(-My*i)*r,y:n+Math.sin(-My*i)*r}},oge=function(t,n){var r=t.x,i=t.y,s=n.x,l=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-l,2))},age=function(t,n){var r=t.x,i=t.y,s=n.cx,l=n.cy,a=oge({x:r,y:i},{x:s,y:l});if(a<=0)return{radius:a};var c=(r-s)/a,u=Math.acos(c);return i>l&&(u=2*Math.PI-u),{radius:a,angle:sge(u),angleInRadian:u}},lge=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),l=Math.min(i,s);return{startAngle:n-l*360,endAngle:r-l*360}},cge=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),l=Math.floor(i/360),a=Math.min(s,l);return t+a*360},A4=function(t,n){var r=t.x,i=t.y,s=age({x:r,y:i},n),l=s.radius,a=s.angle,c=n.innerRadius,u=n.outerRadius;if(l<c||l>u)return!1;if(l===0)return!0;var h=lge(n),f=h.startAngle,p=h.endAngle,v=a,S;if(f<=p){for(;v>p;)v-=360;for(;v<f;)v+=360;S=v>=f&&v<=p}else{for(;v>f;)v-=360;for(;v<p;)v+=360;S=v>=p&&v<=f}return S?R4(R4({},n),{},{radius:l,angle:cge(v,n)}):null};function gp(e){"@babel/helpers - typeof";return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gp(e)}var uge=["offset"];function dge(e){return mge(e)||pge(e)||hge(e)||fge()}function fge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
56
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hge(e,t){if(e){if(typeof e=="string")return X2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X2(e,t)}}function pge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mge(e){if(Array.isArray(e))return X2(e)}function X2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gge(e,t){if(e==null)return{};var n=vge(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function P4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P4(Object(n),!0).forEach(function(r){yge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yge(e,t,n){return t=bge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bge(e){var t=_ge(e,"string");return gp(t)=="symbol"?t:t+""}function _ge(e,t){if(gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vp.apply(this,arguments)}var xge=function(t){var n=t.value,r=t.formatter,i=It(t.children)?n:t.children;return Ct(r)?r(i):i},Sge=function(t,n){var r=Ss(n-t),i=Math.min(Math.abs(n-t),360);return r*i},wge=function(t,n,r){var i=t.position,s=t.viewBox,l=t.offset,a=t.className,c=s,u=c.cx,h=c.cy,f=c.innerRadius,p=c.outerRadius,v=c.startAngle,S=c.endAngle,x=c.clockWise,g=(f+p)/2,b=Sge(v,S),y=b>=0?1:-1,_,T;i==="insideStart"?(_=v+y*l,T=x):i==="insideEnd"?(_=S-y*l,T=!x):i==="end"&&(_=S+y*l,T=x),T=b<=0?T:!T;var E=wr(u,h,g,_),k=wr(u,h,g,_+(T?1:-1)*359),A="M".concat(E.x,",").concat(E.y,`
|
|
57
|
+
A`).concat(g,",").concat(g,",0,1,").concat(T?0:1,`,
|
|
58
|
+
`).concat(k.x,",").concat(k.y),R=It(t.id)?sm("recharts-radial-line-"):t.id;return oe.createElement("text",vp({},r,{dominantBaseline:"central",className:Bt("recharts-radial-bar-label",a)}),oe.createElement("defs",null,oe.createElement("path",{id:R,d:A})),oe.createElement("textPath",{xlinkHref:"#".concat(R)},n))},Cge=function(t){var n=t.viewBox,r=t.offset,i=t.position,s=n,l=s.cx,a=s.cy,c=s.innerRadius,u=s.outerRadius,h=s.startAngle,f=s.endAngle,p=(h+f)/2;if(i==="outside"){var v=wr(l,a,u+r,p),S=v.x,x=v.y;return{x:S,y:x,textAnchor:S>=l?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:l,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:l,y:a,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:l,y:a,textAnchor:"middle",verticalAnchor:"end"};var g=(c+u)/2,b=wr(l,a,g,p),y=b.x,_=b.y;return{x:y,y:_,textAnchor:"middle",verticalAnchor:"middle"}},Ege=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,s=t.position,l=n,a=l.x,c=l.y,u=l.width,h=l.height,f=h>=0?1:-1,p=f*i,v=f>0?"end":"start",S=f>0?"start":"end",x=u>=0?1:-1,g=x*i,b=x>0?"end":"start",y=x>0?"start":"end";if(s==="top"){var _={x:a+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:v};return Jn(Jn({},_),r?{height:Math.max(c-r.y,0),width:u}:{})}if(s==="bottom"){var T={x:a+u/2,y:c+h+p,textAnchor:"middle",verticalAnchor:S};return Jn(Jn({},T),r?{height:Math.max(r.y+r.height-(c+h),0),width:u}:{})}if(s==="left"){var E={x:a-g,y:c+h/2,textAnchor:b,verticalAnchor:"middle"};return Jn(Jn({},E),r?{width:Math.max(E.x-r.x,0),height:h}:{})}if(s==="right"){var k={x:a+u+g,y:c+h/2,textAnchor:y,verticalAnchor:"middle"};return Jn(Jn({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:h}:{})}var A=r?{width:u,height:h}:{};return s==="insideLeft"?Jn({x:a+g,y:c+h/2,textAnchor:y,verticalAnchor:"middle"},A):s==="insideRight"?Jn({x:a+u-g,y:c+h/2,textAnchor:b,verticalAnchor:"middle"},A):s==="insideTop"?Jn({x:a+u/2,y:c+p,textAnchor:"middle",verticalAnchor:S},A):s==="insideBottom"?Jn({x:a+u/2,y:c+h-p,textAnchor:"middle",verticalAnchor:v},A):s==="insideTopLeft"?Jn({x:a+g,y:c+p,textAnchor:y,verticalAnchor:S},A):s==="insideTopRight"?Jn({x:a+u-g,y:c+p,textAnchor:b,verticalAnchor:S},A):s==="insideBottomLeft"?Jn({x:a+g,y:c+h-p,textAnchor:y,verticalAnchor:v},A):s==="insideBottomRight"?Jn({x:a+u-g,y:c+h-p,textAnchor:b,verticalAnchor:v},A):Xd(s)&&($e(s.x)||Xl(s.x))&&($e(s.y)||Xl(s.y))?Jn({x:a+Tc(s.x,u),y:c+Tc(s.y,h),textAnchor:"end",verticalAnchor:"end"},A):Jn({x:a+u/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},A)},Tge=function(t){return"cx"in t&&$e(t.cx)};function Pr(e){var t=e.offset,n=t===void 0?5:t,r=gge(e,uge),i=Jn({offset:n},r),s=i.viewBox,l=i.position,a=i.value,c=i.children,u=i.content,h=i.className,f=h===void 0?"":h,p=i.textBreakAll;if(!s||It(a)&&It(c)&&!O.isValidElement(u)&&!Ct(u))return null;if(O.isValidElement(u))return O.cloneElement(u,i);var v;if(Ct(u)){if(v=O.createElement(u,i),O.isValidElement(v))return v}else v=xge(i);var S=Tge(s),x=Mt(i,!0);if(S&&(l==="insideStart"||l==="insideEnd"||l==="end"))return wge(i,v,x);var g=S?Cge(i):Ege(i);return oe.createElement(vy,vp({className:Bt("recharts-label",f)},x,g,{breakAll:p}),v)}Pr.displayName="Label";var EF=function(t){var n=t.cx,r=t.cy,i=t.angle,s=t.startAngle,l=t.endAngle,a=t.r,c=t.radius,u=t.innerRadius,h=t.outerRadius,f=t.x,p=t.y,v=t.top,S=t.left,x=t.width,g=t.height,b=t.clockWise,y=t.labelViewBox;if(y)return y;if($e(x)&&$e(g)){if($e(f)&&$e(p))return{x:f,y:p,width:x,height:g};if($e(v)&&$e(S))return{x:v,y:S,width:x,height:g}}return $e(f)&&$e(p)?{x:f,y:p,width:0,height:0}:$e(n)&&$e(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:l||i||0,innerRadius:u||0,outerRadius:h||c||a||0,clockWise:b}:t.viewBox?t.viewBox:{}},kge=function(t,n){return t?t===!0?oe.createElement(Pr,{key:"label-implicit",viewBox:n}):or(t)?oe.createElement(Pr,{key:"label-implicit",viewBox:n,value:t}):O.isValidElement(t)?t.type===Pr?O.cloneElement(t,{key:"label-implicit",viewBox:n}):oe.createElement(Pr,{key:"label-implicit",content:t,viewBox:n}):Ct(t)?oe.createElement(Pr,{key:"label-implicit",content:t,viewBox:n}):Xd(t)?oe.createElement(Pr,vp({viewBox:n},t,{key:"label-implicit"})):null:null},Oge=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,s=EF(t),l=ws(i,Pr).map(function(c,u){return O.cloneElement(c,{viewBox:n||s,key:"label-".concat(u)})});if(!r)return l;var a=kge(t.label,n||s);return[a].concat(dge(l))};Pr.parseViewBox=EF;Pr.renderCallByParent=Oge;var WC,M4;function Rge(){if(M4)return WC;M4=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return WC=e,WC}var Age=Rge();const Pge=sn(Age);function yp(e){"@babel/helpers - typeof";return yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yp(e)}var Mge=["valueAccessor"],Lge=["data","dataKey","clockWise","id","textBreakAll"];function jge(e){return Bge(e)||Nge(e)||Ige(e)||Dge()}function Dge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ige(e,t){if(e){if(typeof e=="string")return Q2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q2(e,t)}}function Nge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bge(e){if(Array.isArray(e))return Q2(e)}function Q2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ly.apply(this,arguments)}function L4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L4(Object(n),!0).forEach(function(r){zge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zge(e,t,n){return t=Hge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hge(e){var t=$ge(e,"string");return yp(t)=="symbol"?t:t+""}function $ge(e,t){if(yp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D4(e,t){if(e==null)return{};var n=Fge(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Uge=function(t){return Array.isArray(t.value)?Pge(t.value):t.value};function Ka(e){var t=e.valueAccessor,n=t===void 0?Uge:t,r=D4(e,Mge),i=r.data,s=r.dataKey,l=r.clockWise,a=r.id,c=r.textBreakAll,u=D4(r,Lge);return!i||!i.length?null:oe.createElement(Cn,{className:"recharts-label-list"},i.map(function(h,f){var p=It(s)?n(h,f):ki(h&&h.payload,s),v=It(a)?{}:{id:"".concat(a,"-").concat(f)};return oe.createElement(Pr,Ly({},Mt(h,!0),u,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:c,viewBox:Pr.parseViewBox(It(l)?h:j4(j4({},h),{},{clockWise:l})),key:"label-".concat(f),index:f}))}))}Ka.displayName="LabelList";function Vge(e,t){return e?e===!0?oe.createElement(Ka,{key:"labelList-implicit",data:t}):oe.isValidElement(e)||Ct(e)?oe.createElement(Ka,{key:"labelList-implicit",data:t,content:e}):Xd(e)?oe.createElement(Ka,Ly({data:t},e,{key:"labelList-implicit"})):null:null}function qge(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ws(r,Ka).map(function(l,a){return O.cloneElement(l,{data:t,key:"labelList-".concat(a)})});if(!n)return i;var s=Vge(e.label,t);return[s].concat(jge(i))}Ka.renderCallByParent=qge;function bp(e){"@babel/helpers - typeof";return bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bp(e)}function Z2(){return Z2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z2.apply(this,arguments)}function I4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function N4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I4(Object(n),!0).forEach(function(r){Wge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wge(e,t,n){return t=Gge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gge(e){var t=Kge(e,"string");return bp(t)=="symbol"?t:t+""}function Kge(e,t){if(bp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yge=function(t,n){var r=Ss(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},lv=function(t){var n=t.cx,r=t.cy,i=t.radius,s=t.angle,l=t.sign,a=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,h=c*(a?1:-1)+i,f=Math.asin(c/h)/My,p=u?s:s+l*f,v=wr(n,r,h,p),S=wr(n,r,i,p),x=u?s-l*f:s,g=wr(n,r,h*Math.cos(f*My),x);return{center:v,circleTangency:S,lineTangency:g,theta:f}},TF=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,l=t.startAngle,a=t.endAngle,c=Yge(l,a),u=l+c,h=wr(n,r,s,l),f=wr(n,r,s,u),p="M ".concat(h.x,",").concat(h.y,`
|
|
60
|
+
A `).concat(s,",").concat(s,`,0,
|
|
61
|
+
`).concat(+(Math.abs(c)>180),",").concat(+(l>u),`,
|
|
62
|
+
`).concat(f.x,",").concat(f.y,`
|
|
63
|
+
`);if(i>0){var v=wr(n,r,i,l),S=wr(n,r,i,u);p+="L ".concat(S.x,",").concat(S.y,`
|
|
64
|
+
A `).concat(i,",").concat(i,`,0,
|
|
65
|
+
`).concat(+(Math.abs(c)>180),",").concat(+(l<=u),`,
|
|
66
|
+
`).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},Xge=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,l=t.cornerRadius,a=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,h=t.endAngle,f=Ss(h-u),p=lv({cx:n,cy:r,radius:s,angle:u,sign:f,cornerRadius:l,cornerIsExternal:c}),v=p.circleTangency,S=p.lineTangency,x=p.theta,g=lv({cx:n,cy:r,radius:s,angle:h,sign:-f,cornerRadius:l,cornerIsExternal:c}),b=g.circleTangency,y=g.lineTangency,_=g.theta,T=c?Math.abs(u-h):Math.abs(u-h)-x-_;if(T<0)return a?"M ".concat(S.x,",").concat(S.y,`
|
|
67
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
|
|
68
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
|
|
69
|
+
`):TF({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:u,endAngle:h});var E="M ".concat(S.x,",").concat(S.y,`
|
|
70
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(v.x,",").concat(v.y,`
|
|
71
|
+
A`).concat(s,",").concat(s,",0,").concat(+(T>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
|
|
72
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(y.x,",").concat(y.y,`
|
|
73
|
+
`);if(i>0){var k=lv({cx:n,cy:r,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),A=k.circleTangency,R=k.lineTangency,L=k.theta,z=lv({cx:n,cy:r,radius:i,angle:h,sign:-f,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),D=z.circleTangency,$=z.lineTangency,N=z.theta,F=c?Math.abs(u-h):Math.abs(u-h)-L-N;if(F<0&&l===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat($.x,",").concat($.y,`
|
|
74
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,`
|
|
75
|
+
A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(f>0),",").concat(A.x,",").concat(A.y,`
|
|
76
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(f<0),",").concat(R.x,",").concat(R.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},Qge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kF=function(t){var n=N4(N4({},Qge),t),r=n.cx,i=n.cy,s=n.innerRadius,l=n.outerRadius,a=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,h=n.startAngle,f=n.endAngle,p=n.className;if(l<s||h===f)return null;var v=Bt("recharts-sector",p),S=l-s,x=Tc(a,S,0,!0),g;return x>0&&Math.abs(h-f)<360?g=Xge({cx:r,cy:i,innerRadius:s,outerRadius:l,cornerRadius:Math.min(x,S/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:h,endAngle:f}):g=TF({cx:r,cy:i,innerRadius:s,outerRadius:l,startAngle:h,endAngle:f}),oe.createElement("path",Z2({},Mt(n,!0),{className:v,d:g,role:"img"}))};function _p(e){"@babel/helpers - typeof";return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_p(e)}function J2(){return J2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J2.apply(this,arguments)}function B4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B4(Object(n),!0).forEach(function(r){Zge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zge(e,t,n){return t=Jge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jge(e){var t=eve(e,"string");return _p(t)=="symbol"?t:t+""}function eve(e,t){if(_p(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_p(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H4={curveBasisClosed:_le,curveBasisOpen:xle,curveBasis:ble,curveBumpX:sle,curveBumpY:ole,curveLinearClosed:Sle,curveLinear:Qb,curveMonotoneX:wle,curveMonotoneY:Cle,curveNatural:Ele,curveStep:Tle,curveStepAfter:Ole,curveStepBefore:kle},cv=function(t){return t.x===+t.x&&t.y===+t.y},ph=function(t){return t.x},mh=function(t){return t.y},tve=function(t,n){if(Ct(t))return t;var r="curve".concat(Yb(t));return(r==="curveMonotone"||r==="curveBump")&&n?H4["".concat(r).concat(n==="vertical"?"Y":"X")]:H4[r]||Qb},nve=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,s=i===void 0?[]:i,l=t.baseLine,a=t.layout,c=t.connectNulls,u=c===void 0?!1:c,h=tve(r,a),f=u?s.filter(function(x){return cv(x)}):s,p;if(Array.isArray(l)){var v=u?l.filter(function(x){return cv(x)}):l,S=f.map(function(x,g){return z4(z4({},x),{},{base:v[g]})});return a==="vertical"?p=ev().y(mh).x1(ph).x0(function(x){return x.base.x}):p=ev().x(ph).y1(mh).y0(function(x){return x.base.y}),p.defined(cv).curve(h),p(S)}return a==="vertical"&&$e(l)?p=ev().y(mh).x1(ph).x0(l):$e(l)?p=ev().x(ph).y1(mh).y0(l):p=PH().x(ph).y(mh),p.defined(cv).curve(h),p(f)},Ih=function(t){var n=t.className,r=t.points,i=t.path,s=t.pathRef;if((!r||!r.length)&&!i)return null;var l=r&&r.length?nve(t):i;return O.createElement("path",J2({},Mt(t,!1),sy(t),{className:Bt("recharts-curve",n),d:l,ref:s}))},GC={exports:{}},KC,$4;function rve(){if($4)return KC;$4=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return KC=e,KC}var YC,F4;function ive(){if(F4)return YC;F4=1;var e=rve();function t(){}function n(){}return n.resetWarningCache=t,YC=function(){function r(l,a,c,u,h,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},YC}var U4;function sve(){return U4||(U4=1,GC.exports=ive()()),GC.exports}var ove=sve();const Gt=sn(ove),{getOwnPropertyNames:ave,getOwnPropertySymbols:lve}=Object,{hasOwnProperty:cve}=Object.prototype;function XC(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function uv(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:s}=i,l=s.get(n),a=s.get(r);if(l&&a)return l===r&&a===n;s.set(n,r),s.set(r,n);const c=e(n,r,i);return s.delete(n),s.delete(r),c}}function uve(e){return e?.[Symbol.toStringTag]}function V4(e){return ave(e).concat(lve(e))}const dve=Object.hasOwn||((e,t)=>cve.call(e,t));function Fc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const fve="__v",hve="__o",pve="_owner",{getOwnPropertyDescriptor:q4,keys:W4}=Object;function mve(e,t){return e.byteLength===t.byteLength&&jy(new Uint8Array(e),new Uint8Array(t))}function gve(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function vve(e,t){return e.byteLength===t.byteLength&&jy(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function yve(e,t){return Fc(e.getTime(),t.getTime())}function bve(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function _ve(e,t){return e===t}function G4(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.entries();let l,a,c=0;for(;(l=s.next())&&!l.done;){const u=t.entries();let h=!1,f=0;for(;(a=u.next())&&!a.done;){if(i[f]){f++;continue}const p=l.value,v=a.value;if(n.equals(p[0],v[0],c,f,e,t,n)&&n.equals(p[1],v[1],p[0],v[0],e,t,n)){h=i[f]=!0;break}f++}if(!h)return!1;c++}return!0}const xve=Fc;function Sve(e,t,n){const r=W4(e);let i=r.length;if(W4(t).length!==i)return!1;for(;i-- >0;)if(!OF(e,t,n,r[i]))return!1;return!0}function gh(e,t,n){const r=V4(e);let i=r.length;if(V4(t).length!==i)return!1;let s,l,a;for(;i-- >0;)if(s=r[i],!OF(e,t,n,s)||(l=q4(e,s),a=q4(t,s),(l||a)&&(!l||!a||l.configurable!==a.configurable||l.enumerable!==a.enumerable||l.writable!==a.writable)))return!1;return!0}function wve(e,t){return Fc(e.valueOf(),t.valueOf())}function Cve(e,t){return e.source===t.source&&e.flags===t.flags}function K4(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.values();let l,a;for(;(l=s.next())&&!l.done;){const c=t.values();let u=!1,h=0;for(;(a=c.next())&&!a.done;){if(!i[h]&&n.equals(l.value,a.value,l.value,a.value,e,t,n)){u=i[h]=!0;break}h++}if(!u)return!1}return!0}function jy(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Eve(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function OF(e,t,n,r){return(r===pve||r===hve||r===fve)&&(e.$$typeof||t.$$typeof)?!0:dve(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Tve="[object ArrayBuffer]",kve="[object Arguments]",Ove="[object Boolean]",Rve="[object DataView]",Ave="[object Date]",Pve="[object Error]",Mve="[object Map]",Lve="[object Number]",jve="[object Object]",Dve="[object RegExp]",Ive="[object Set]",Nve="[object String]",Bve={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},zve="[object URL]",Hve=Object.prototype.toString;function $ve({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:l,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:h,areSetsEqual:f,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:S}){return function(g,b,y){if(g===b)return!0;if(g==null||b==null)return!1;const _=typeof g;if(_!==typeof b)return!1;if(_!=="object")return _==="number"?a(g,b,y):_==="function"?s(g,b,y):!1;const T=g.constructor;if(T!==b.constructor)return!1;if(T===Object)return c(g,b,y);if(Array.isArray(g))return t(g,b,y);if(T===Date)return r(g,b,y);if(T===RegExp)return h(g,b,y);if(T===Map)return l(g,b,y);if(T===Set)return f(g,b,y);const E=Hve.call(g);if(E===Ave)return r(g,b,y);if(E===Dve)return h(g,b,y);if(E===Mve)return l(g,b,y);if(E===Ive)return f(g,b,y);if(E===jve)return typeof g.then!="function"&&typeof b.then!="function"&&c(g,b,y);if(E===zve)return v(g,b,y);if(E===Pve)return i(g,b,y);if(E===kve)return c(g,b,y);if(Bve[E])return p(g,b,y);if(E===Tve)return e(g,b,y);if(E===Rve)return n(g,b,y);if(E===Ove||E===Lve||E===Nve)return u(g,b,y);if(S){let k=S[E];if(!k){const A=uve(g);A&&(k=S[A])}if(k)return k(g,b,y)}return!1}}function Fve({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:mve,areArraysEqual:n?gh:gve,areDataViewsEqual:vve,areDatesEqual:yve,areErrorsEqual:bve,areFunctionsEqual:_ve,areMapsEqual:n?XC(G4,gh):G4,areNumbersEqual:xve,areObjectsEqual:n?gh:Sve,arePrimitiveWrappersEqual:wve,areRegExpsEqual:Cve,areSetsEqual:n?XC(K4,gh):K4,areTypedArraysEqual:n?XC(jy,gh):jy,areUrlsEqual:Eve,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=uv(r.areArraysEqual),s=uv(r.areMapsEqual),l=uv(r.areObjectsEqual),a=uv(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:l,areSetsEqual:a})}return r}function Uve(e){return function(t,n,r,i,s,l,a){return e(t,n,a)}}function Vve({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,c){const{cache:u=e?new WeakMap:void 0,meta:h}=n();return t(a,c,{cache:u,equals:r,meta:h,strict:i})};if(e)return function(a,c){return t(a,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,c){return t(a,c,s)}}const qve=cl();cl({strict:!0});cl({circular:!0});cl({circular:!0,strict:!0});cl({createInternalComparator:()=>Fc});cl({strict:!0,createInternalComparator:()=>Fc});cl({circular:!0,createInternalComparator:()=>Fc});cl({circular:!0,createInternalComparator:()=>Fc,strict:!0});function cl(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=Fve(e),l=$ve(s),a=n?n(l):Uve(l);return Vve({circular:t,comparator:l,createState:r,equals:a,strict:i})}function Wve(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Y4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(s){n<0&&(n=s),s-n>t?(e(s),n=-1):Wve(i)};requestAnimationFrame(r)}function eT(e){"@babel/helpers - typeof";return eT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eT(e)}function Gve(e){return Qve(e)||Xve(e)||Yve(e)||Kve()}function Kve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
77
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yve(e,t){if(e){if(typeof e=="string")return X4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X4(e,t)}}function X4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qve(e){if(Array.isArray(e))return e}function Zve(){var e={},t=function(){return null},n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var l=s,a=Gve(l),c=a[0],u=a.slice(1);if(typeof c=="number"){Y4(i.bind(null,u),c);return}i(c),Y4(i.bind(null,u));return}eT(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){n=!0},start:function(s){n=!1,r(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}function xp(e){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xp(e)}function Q4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q4(Object(n),!0).forEach(function(r){RF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RF(e,t,n){return t=Jve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jve(e){var t=eye(e,"string");return xp(t)==="symbol"?t:String(t)}function eye(e,t){if(xp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tye=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},nye=function(t){return t},rye=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Nh=function(t,n){return Object.keys(n).reduce(function(r,i){return Z4(Z4({},r),{},RF({},i,t(i,n[i])))},{})},J4=function(t,n,r){return t.map(function(i){return"".concat(rye(i)," ").concat(n,"ms ").concat(r)}).join(",")};function iye(e,t){return aye(e)||oye(e,t)||AF(e,t)||sye()}function sye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
78
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function aye(e){if(Array.isArray(e))return e}function lye(e){return dye(e)||uye(e)||AF(e)||cye()}function cye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
79
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AF(e,t){if(e){if(typeof e=="string")return tT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tT(e,t)}}function uye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dye(e){if(Array.isArray(e))return tT(e)}function tT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dy=1e-4,PF=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},MF=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},e6=function(t,n){return function(r){var i=PF(t,n);return MF(i,r)}},fye=function(t,n){return function(r){var i=PF(t,n),s=[].concat(lye(i.map(function(l,a){return l*a}).slice(1)),[0]);return MF(s,r)}},t6=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],s=n[1],l=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,l=1,a=1;break;case"ease":i=.25,s=.1,l=.25,a=1;break;case"ease-in":i=.42,s=0,l=1,a=1;break;case"ease-out":i=.42,s=0,l=.58,a=1;break;case"ease-in-out":i=0,s=0,l=.58,a=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),h=iye(u,4);i=h[0],s=h[1],l=h[2],a=h[3]}}}var f=e6(i,l),p=e6(s,a),v=fye(i,l),S=function(b){return b>1?1:b<0?0:b},x=function(b){for(var y=b>1?1:b,_=y,T=0;T<8;++T){var E=f(_)-y,k=v(_);if(Math.abs(E-y)<Dy||k<Dy)return p(_);_=S(_-E/k)}return p(_)};return x.isStepper=!1,x},hye=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,s=i===void 0?8:i,l=t.dt,a=l===void 0?17:l,c=function(h,f,p){var v=-(h-f)*r,S=p*s,x=p+(v-S)*a/1e3,g=p*a/1e3+h;return Math.abs(g-f)<Dy&&Math.abs(x)<Dy?[f,0]:[g,x]};return c.isStepper=!0,c.dt=a,c},pye=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return t6(i);case"spring":return hye();default:if(i.split("(")[0]==="cubic-bezier")return t6(i)}return typeof i=="function"?i:null};function Sp(e){"@babel/helpers - typeof";return Sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sp(e)}function n6(e){return vye(e)||gye(e)||LF(e)||mye()}function mye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
80
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vye(e){if(Array.isArray(e))return rT(e)}function r6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r6(Object(n),!0).forEach(function(r){nT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nT(e,t,n){return t=yye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yye(e){var t=bye(e,"string");return Sp(t)==="symbol"?t:String(t)}function bye(e,t){if(Sp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ye(e,t){return wye(e)||Sye(e,t)||LF(e,t)||xye()}function xye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LF(e,t){if(e){if(typeof e=="string")return rT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rT(e,t)}}function rT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function wye(e){if(Array.isArray(e))return e}var Iy=function(t,n,r){return t+(n-t)*r},iT=function(t){var n=t.from,r=t.to;return n!==r},Cye=function e(t,n,r){var i=Nh(function(s,l){if(iT(l)){var a=t(l.from,l.to,l.velocity),c=_ye(a,2),u=c[0],h=c[1];return _r(_r({},l),{},{from:u,velocity:h})}return l},n);return r<1?Nh(function(s,l){return iT(l)?_r(_r({},l),{},{velocity:Iy(l.velocity,i[s].velocity,r),from:Iy(l.from,i[s].from,r)}):l},n):e(t,i,r-1)};const Eye=(function(e,t,n,r,i){var s=tye(e,t),l=s.reduce(function(g,b){return _r(_r({},g),{},nT({},b,[e[b],t[b]]))},{}),a=s.reduce(function(g,b){return _r(_r({},g),{},nT({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,h,f=function(){return null},p=function(){return Nh(function(b,y){return y.from},a)},v=function(){return!Object.values(a).filter(iT).length},S=function(b){u||(u=b);var y=b-u,_=y/n.dt;a=Cye(n,a,_),i(_r(_r(_r({},e),t),p())),u=b,v()||(c=requestAnimationFrame(f))},x=function(b){h||(h=b);var y=(b-h)/r,_=Nh(function(E,k){return Iy.apply(void 0,n6(k).concat([n(y)]))},l);if(i(_r(_r(_r({},e),t),_)),y<1)c=requestAnimationFrame(f);else{var T=Nh(function(E,k){return Iy.apply(void 0,n6(k).concat([n(1)]))},l);i(_r(_r(_r({},e),t),T))}};return f=n.isStepper?S:x,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function md(e){"@babel/helpers - typeof";return md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},md(e)}var Tye=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function kye(e,t){if(e==null)return{};var n=Oye(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function QC(e){return Mye(e)||Pye(e)||Aye(e)||Rye()}function Rye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aye(e,t){if(e){if(typeof e=="string")return sT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sT(e,t)}}function Pye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mye(e){if(Array.isArray(e))return sT(e)}function sT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i6(Object(n),!0).forEach(function(r){Eh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eh(e,t,n){return t=jF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jF(r.key),r)}}function Dye(e,t,n){return t&&jye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jF(e){var t=Iye(e,"string");return md(t)==="symbol"?t:String(t)}function Iye(e,t){if(md(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(md(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oT(e,t)}function oT(e,t){return oT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oT(e,t)}function Bye(e){var t=zye();return function(){var r=Ny(e),i;if(t){var s=Ny(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return aT(this,i)}}function aT(e,t){if(t&&(md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lT(e)}function lT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ny(e){return Ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ny(e)}var Uo=(function(e){Nye(n,e);var t=Bye(n);function n(r,i){var s;Lye(this,n),s=t.call(this,r,i);var l=s.props,a=l.isActive,c=l.attributeName,u=l.from,h=l.to,f=l.steps,p=l.children,v=l.duration;if(s.handleStyleChange=s.handleStyleChange.bind(lT(s)),s.changeStyle=s.changeStyle.bind(lT(s)),!a||v<=0)return s.state={style:{}},typeof p=="function"&&(s.state={style:h}),aT(s);if(f&&f.length)s.state={style:f[0].style};else if(u){if(typeof p=="function")return s.state={style:u},aT(s);s.state={style:c?Eh({},c,u):u}}else s.state={style:{}};return s}return Dye(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,l=i.canBegin;this.mounted=!0,!(!s||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,l=s.isActive,a=s.canBegin,c=s.attributeName,u=s.shouldReAnimate,h=s.to,f=s.from,p=this.state.style;if(a){if(!l){var v={style:c?Eh({},c,h):h};this.state&&p&&(c&&p[c]!==h||!c&&p!==h)&&this.setState(v);return}if(!(qve(i.to,h)&&i.canBegin&&i.isActive)){var S=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=S||u?f:i.to;if(this.state&&p){var g={style:c?Eh({},c,x):x};(c&&p[c]!==x||!c&&p!==x)&&this.setState(g)}this.runAnimation(hs(hs({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,l=i.from,a=i.to,c=i.duration,u=i.easing,h=i.begin,f=i.onAnimationEnd,p=i.onAnimationStart,v=Eye(l,a,pye(u),c,this.changeStyle),S=function(){s.stopJSAnimation=v()};this.manager.start([p,h,S,c,f])}},{key:"runStepAnimation",value:function(i){var s=this,l=i.steps,a=i.begin,c=i.onAnimationStart,u=l[0],h=u.style,f=u.duration,p=f===void 0?0:f,v=function(x,g,b){if(b===0)return x;var y=g.duration,_=g.easing,T=_===void 0?"ease":_,E=g.style,k=g.properties,A=g.onAnimationEnd,R=b>0?l[b-1]:g,L=k||Object.keys(E);if(typeof T=="function"||T==="spring")return[].concat(QC(x),[s.runJSAnimation.bind(s,{from:R.style,to:E,duration:y,easing:T}),y]);var z=J4(L,y,T),D=hs(hs(hs({},R.style),E),{},{transition:z});return[].concat(QC(x),[D,y,A]).filter(nye)};return this.manager.start([c].concat(QC(l.reduce(v,[h,Math.max(p,a)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Zve());var s=i.begin,l=i.duration,a=i.attributeName,c=i.to,u=i.easing,h=i.onAnimationStart,f=i.onAnimationEnd,p=i.steps,v=i.children,S=this.manager;if(this.unSubscribe=S.subscribe(this.handleStyleChange),typeof u=="function"||typeof v=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var x=a?Eh({},a,c):c,g=J4(Object.keys(x),l,u);S.start([h,s,hs(hs({},x),{},{transition:g}),l,f])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var l=i.duration;i.attributeName,i.easing;var a=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=kye(i,Tye),u=O.Children.count(s),h=this.state.style;if(typeof s=="function")return s(h);if(!a||u===0||l<=0)return s;var f=function(v){var S=v.props,x=S.style,g=x===void 0?{}:x,b=S.className,y=O.cloneElement(v,hs(hs({},c),{},{style:hs(hs({},g),h),className:b}));return y};return u===1?f(O.Children.only(s)):oe.createElement("div",null,O.Children.map(s,function(p){return f(p)}))}}]),n})(O.PureComponent);Uo.displayName="Animate";Uo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Uo.propTypes={from:Gt.oneOfType([Gt.object,Gt.string]),to:Gt.oneOfType([Gt.object,Gt.string]),attributeName:Gt.string,duration:Gt.number,begin:Gt.number,easing:Gt.oneOfType([Gt.string,Gt.func]),steps:Gt.arrayOf(Gt.shape({duration:Gt.number.isRequired,style:Gt.object.isRequired,easing:Gt.oneOfType([Gt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Gt.func]),properties:Gt.arrayOf("string"),onAnimationEnd:Gt.func})),children:Gt.oneOfType([Gt.node,Gt.func]),isActive:Gt.bool,canBegin:Gt.bool,onAnimationEnd:Gt.func,shouldReAnimate:Gt.bool,onAnimationStart:Gt.func,onAnimationReStart:Gt.func};function wp(e){"@babel/helpers - typeof";return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wp(e)}function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},By.apply(this,arguments)}function Hye(e,t){return Vye(e)||Uye(e,t)||Fye(e,t)||$ye()}function $ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fye(e,t){if(e){if(typeof e=="string")return s6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s6(e,t)}}function s6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function Vye(e){if(Array.isArray(e))return e}function o6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function a6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o6(Object(n),!0).forEach(function(r){qye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qye(e,t,n){return t=Wye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wye(e){var t=Gye(e,"string");return wp(t)=="symbol"?t:t+""}function Gye(e,t){if(wp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l6=function(t,n,r,i,s){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),a=i>=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,h;if(l>0&&s instanceof Array){for(var f=[0,0,0,0],p=0,v=4;p<v;p++)f[p]=s[p]>l?l:s[p];h="M".concat(t,",").concat(n+a*f[0]),f[0]>0&&(h+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),h+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(h+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
|
84
|
+
`).concat(t+r,",").concat(n+a*f[1])),h+="L ".concat(t+r,",").concat(n+i-a*f[2]),f[2]>0&&(h+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
|
85
|
+
`).concat(t+r-c*f[2],",").concat(n+i)),h+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(h+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
|
86
|
+
`).concat(t,",").concat(n+i-a*f[3])),h+="Z"}else if(l>0&&s===+s&&s>0){var S=Math.min(l,s);h="M ".concat(t,",").concat(n+a*S,`
|
|
87
|
+
A `).concat(S,",").concat(S,",0,0,").concat(u,",").concat(t+c*S,",").concat(n,`
|
|
88
|
+
L `).concat(t+r-c*S,",").concat(n,`
|
|
89
|
+
A `).concat(S,",").concat(S,",0,0,").concat(u,",").concat(t+r,",").concat(n+a*S,`
|
|
90
|
+
L `).concat(t+r,",").concat(n+i-a*S,`
|
|
91
|
+
A `).concat(S,",").concat(S,",0,0,").concat(u,",").concat(t+r-c*S,",").concat(n+i,`
|
|
92
|
+
L `).concat(t+c*S,",").concat(n+i,`
|
|
93
|
+
A `).concat(S,",").concat(S,",0,0,").concat(u,",").concat(t,",").concat(n+i-a*S," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},Kye=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,s=n.x,l=n.y,a=n.width,c=n.height;if(Math.abs(a)>0&&Math.abs(c)>0){var u=Math.min(s,s+a),h=Math.max(s,s+a),f=Math.min(l,l+c),p=Math.max(l,l+c);return r>=u&&r<=h&&i>=f&&i<=p}return!1},Yye={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sR=function(t){var n=a6(a6({},Yye),t),r=O.useRef(),i=O.useState(-1),s=Hye(i,2),l=s[0],a=s[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&a(T)}catch{}},[]);var c=n.x,u=n.y,h=n.width,f=n.height,p=n.radius,v=n.className,S=n.animationEasing,x=n.animationDuration,g=n.animationBegin,b=n.isAnimationActive,y=n.isUpdateAnimationActive;if(c!==+c||u!==+u||h!==+h||f!==+f||h===0||f===0)return null;var _=Bt("recharts-rectangle",v);return y?oe.createElement(Uo,{canBegin:l>0,from:{width:h,height:f,x:c,y:u},to:{width:h,height:f,x:c,y:u},duration:x,animationEasing:S,isActive:y},function(T){var E=T.width,k=T.height,A=T.x,R=T.y;return oe.createElement(Uo,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:x,isActive:b,easing:S},oe.createElement("path",By({},Mt(n,!0),{className:_,d:l6(A,R,E,k,p),ref:r})))}):oe.createElement("path",By({},Mt(n,!0),{className:_,d:l6(c,u,h,f,p)}))};function cT(){return cT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cT.apply(this,arguments)}var oR=function(t){var n=t.cx,r=t.cy,i=t.r,s=t.className,l=Bt("recharts-dot",s);return n===+n&&r===+r&&i===+i?O.createElement("circle",cT({},Mt(t,!1),sy(t),{className:l,cx:n,cy:r,r:i})):null};function Cp(e){"@babel/helpers - typeof";return Cp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(e)}var Xye=["x","y","top","left","width","height","className"];function uT(){return uT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uT.apply(this,arguments)}function c6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c6(Object(n),!0).forEach(function(r){Zye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zye(e,t,n){return t=Jye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jye(e){var t=ebe(e,"string");return Cp(t)=="symbol"?t:t+""}function ebe(e,t){if(Cp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tbe(e,t){if(e==null)return{};var n=nbe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rbe=function(t,n,r,i,s,l){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},ibe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,l=t.top,a=l===void 0?0:l,c=t.left,u=c===void 0?0:c,h=t.width,f=h===void 0?0:h,p=t.height,v=p===void 0?0:p,S=t.className,x=tbe(t,Xye),g=Qye({x:r,y:s,top:a,left:u,width:f,height:v},x);return!$e(r)||!$e(s)||!$e(f)||!$e(v)||!$e(a)||!$e(u)?null:oe.createElement("path",uT({},Mt(g,!0),{className:Bt("recharts-cross",S),d:rbe(r,s,f,v,a,u)}))},ZC,u6;function sbe(){if(u6)return ZC;u6=1;var e=e$(),t=e(Object.getPrototypeOf,Object);return ZC=t,ZC}var JC,d6;function obe(){if(d6)return JC;d6=1;var e=Yo(),t=sbe(),n=Xo(),r="[object Object]",i=Function.prototype,s=Object.prototype,l=i.toString,a=s.hasOwnProperty,c=l.call(Object);function u(h){if(!n(h)||e(h)!=r)return!1;var f=t(h);if(f===null)return!0;var p=a.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&l.call(p)==c}return JC=u,JC}var abe=obe();const lbe=sn(abe);var eE,f6;function cbe(){if(f6)return eE;f6=1;var e=Yo(),t=Xo(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return eE=r,eE}var ube=cbe();const dbe=sn(ube);function Ep(e){"@babel/helpers - typeof";return Ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ep(e)}function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zy.apply(this,arguments)}function fbe(e,t){return gbe(e)||mbe(e,t)||pbe(e,t)||hbe()}function hbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pbe(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function gbe(e){if(Array.isArray(e))return e}function p6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p6(Object(n),!0).forEach(function(r){vbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vbe(e,t,n){return t=ybe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ybe(e){var t=bbe(e,"string");return Ep(t)=="symbol"?t:t+""}function bbe(e,t){if(Ep(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g6=function(t,n,r,i,s){var l=r-i,a;return a="M ".concat(t,",").concat(n),a+="L ".concat(t+r,",").concat(n),a+="L ".concat(t+r-l/2,",").concat(n+s),a+="L ".concat(t+r-l/2-i,",").concat(n+s),a+="L ".concat(t,",").concat(n," Z"),a},_be={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xbe=function(t){var n=m6(m6({},_be),t),r=O.useRef(),i=O.useState(-1),s=fbe(i,2),l=s[0],a=s[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&a(_)}catch{}},[]);var c=n.x,u=n.y,h=n.upperWidth,f=n.lowerWidth,p=n.height,v=n.className,S=n.animationEasing,x=n.animationDuration,g=n.animationBegin,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||h!==+h||f!==+f||p!==+p||h===0&&f===0||p===0)return null;var y=Bt("recharts-trapezoid",v);return b?oe.createElement(Uo,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:h,lowerWidth:f,height:p,x:c,y:u},duration:x,animationEasing:S,isActive:b},function(_){var T=_.upperWidth,E=_.lowerWidth,k=_.height,A=_.x,R=_.y;return oe.createElement(Uo,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:x,easing:S},oe.createElement("path",zy({},Mt(n,!0),{className:y,d:g6(A,R,T,E,k),ref:r})))}):oe.createElement("g",null,oe.createElement("path",zy({},Mt(n,!0),{className:y,d:g6(c,u,h,f,p)})))},Sbe=["option","shapeType","propTransformer","activeClassName","isActive"];function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function wbe(e,t){if(e==null)return{};var n=Cbe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function v6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v6(Object(n),!0).forEach(function(r){Ebe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ebe(e,t,n){return t=Tbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tbe(e){var t=kbe(e,"string");return Tp(t)=="symbol"?t:t+""}function kbe(e,t){if(Tp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Obe(e,t){return Hy(Hy({},t),e)}function Rbe(e,t){return e==="symbols"}function y6(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return oe.createElement(sR,n);case"trapezoid":return oe.createElement(xbe,n);case"sector":return oe.createElement(kF,n);case"symbols":if(Rbe(t))return oe.createElement(CO,n);break;default:return null}}function Abe(e){return O.isValidElement(e)?e.props:e}function Pbe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Obe:r,s=e.activeClassName,l=s===void 0?"recharts-active-shape":s,a=e.isActive,c=wbe(e,Sbe),u;if(O.isValidElement(t))u=O.cloneElement(t,Hy(Hy({},c),Abe(t)));else if(Ct(t))u=t(c);else if(lbe(t)&&!dbe(t)){var h=i(t,c);u=oe.createElement(y6,{shapeType:n,elementProps:h})}else{var f=c;u=oe.createElement(y6,{shapeType:n,elementProps:f})}return a?oe.createElement(Cn,{className:l},u):u}function f0(e,t){return t!=null&&"trapezoids"in e.props}function h0(e,t){return t!=null&&"sectors"in e.props}function kp(e,t){return t!=null&&"points"in e.props}function Mbe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,s=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&s}function Lbe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function jbe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Dbe(e,t){var n;return f0(e,t)?n=Mbe:h0(e,t)?n=Lbe:kp(e,t)&&(n=jbe),n}function Ibe(e,t){var n;return f0(e,t)?n="trapezoids":h0(e,t)?n="sectors":kp(e,t)&&(n="points"),n}function Nbe(e,t){if(f0(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(h0(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return kp(e,t)?t.payload:{}}function Bbe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Ibe(n,t),s=Nbe(n,t),l=r.filter(function(c,u){var h=up(s,c),f=n.props[i].filter(function(S){var x=Dbe(n,t);return x(S,t)}),p=n.props[i].indexOf(f[f.length-1]),v=u===p;return h&&v}),a=r.indexOf(l[l.length-1]);return a}var tE,b6;function zbe(){if(b6)return tE;b6=1;var e=Math.ceil,t=Math.max;function n(r,i,s,l){for(var a=-1,c=t(e((i-r)/(s||1)),0),u=Array(c);c--;)u[l?c:++a]=r,r+=s;return u}return tE=n,tE}var nE,_6;function DF(){if(_6)return nE;_6=1;var e=g$(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var s=i<0?-1:1;return s*n}return i===i?i:0}return nE=r,nE}var rE,x6;function Hbe(){if(x6)return rE;x6=1;var e=zbe(),t=t0(),n=DF();function r(i){return function(s,l,a){return a&&typeof a!="number"&&t(s,l,a)&&(l=a=void 0),s=n(s),l===void 0?(l=s,s=0):l=n(l),a=a===void 0?s<l?1:-1:n(a),e(s,l,a,i)}}return rE=r,rE}var iE,S6;function $be(){if(S6)return iE;S6=1;var e=Hbe(),t=e();return iE=t,iE}var Fbe=$be();const $y=sn(Fbe);function Op(e){"@babel/helpers - typeof";return Op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Op(e)}function w6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function C6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w6(Object(n),!0).forEach(function(r){IF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IF(e,t,n){return t=Ube(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ube(e){var t=Vbe(e,"string");return Op(t)=="symbol"?t:t+""}function Vbe(e,t){if(Op(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qbe=["Webkit","Moz","O","ms"],Wbe=function(t,n){var r=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=qbe.reduce(function(s,l){return C6(C6({},s),{},IF({},l+r,n))},{});return i[t]=n,i};function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function Fy(){return Fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fy.apply(this,arguments)}function E6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E6(Object(n),!0).forEach(function(r){bi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BF(r.key),r)}}function Kbe(e,t,n){return t&&T6(e.prototype,t),n&&T6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ybe(e,t,n){return t=Uy(t),Xbe(e,NF()?Reflect.construct(t,n||[],Uy(e).constructor):t.apply(e,n))}function Xbe(e,t){if(t&&(gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qbe(e)}function Qbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NF=function(){return!!e})()}function Uy(e){return Uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uy(e)}function Zbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dT(e,t)}function dT(e,t){return dT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dT(e,t)}function bi(e,t,n){return t=BF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BF(e){var t=Jbe(e,"string");return gd(t)=="symbol"?t:t+""}function Jbe(e,t){if(gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var e0e=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,s=t.x,l=t.width,a=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=jh().domain($y(0,c)).range([s,s+l-a]),h=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:h}},k6=function(t){return t.changedTouches&&!!t.changedTouches.length},vd=(function(e){function t(n){var r;return Gbe(this,t),r=Ybe(this,t,[n]),bi(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),bi(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),bi(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,l=i.onDragEnd,a=i.startIndex;l?.({endIndex:s,startIndex:a})}),r.detachDragEndListener()}),bi(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),bi(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),bi(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),bi(r,"handleSlideDragStart",function(i){var s=k6(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Zbe(t,e),Kbe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,s=r.endX,l=this.state.scaleValues,a=this.props,c=a.gap,u=a.data,h=u.length-1,f=Math.min(i,s),p=Math.max(i,s),v=t.getIndexInRange(l,f),S=t.getIndexInRange(l,p);return{startIndex:v-v%c,endIndex:S===h?h:S-S%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,l=i.tickFormatter,a=i.dataKey,c=ki(s[r],a,r);return Ct(l)?l(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,s=i.slideMoveStartX,l=i.startX,a=i.endX,c=this.props,u=c.x,h=c.width,f=c.travellerWidth,p=c.startIndex,v=c.endIndex,S=c.onChange,x=r.pageX-s;x>0?x=Math.min(x,u+h-f-a,u+h-f-l):x<0&&(x=Math.max(x,u-l,u-a));var g=this.getIndex({startX:l+x,endX:a+x});(g.startIndex!==p||g.endIndex!==v)&&S&&S(g),this.setState({startX:l+x,endX:a+x,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=k6(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,s=i.brushMoveStartX,l=i.movingTravellerId,a=i.endX,c=i.startX,u=this.state[l],h=this.props,f=h.x,p=h.width,v=h.travellerWidth,S=h.onChange,x=h.gap,g=h.data,b={startX:this.state.startX,endX:this.state.endX},y=r.pageX-s;y>0?y=Math.min(y,f+p-v-u):y<0&&(y=Math.max(y,f-u)),b[l]=u+y;var _=this.getIndex(b),T=_.startIndex,E=_.endIndex,k=function(){var R=g.length-1;return l==="startX"&&(a>c?T%x===0:E%x===0)||a<c&&E===R||l==="endX"&&(a>c?E%x===0:T%x===0)||a>c&&E===R};this.setState(bi(bi({},l,u+y),"brushMoveStartX",r.pageX),function(){S&&k()&&S(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,l=this.state,a=l.scaleValues,c=l.startX,u=l.endX,h=this.state[i],f=a.indexOf(h);if(f!==-1){var p=f+r;if(!(p===-1||p>=a.length)){var v=a[p];i==="startX"&&v>=u||i==="endX"&&v<=c||this.setState(bi({},i,v),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,s=r.y,l=r.width,a=r.height,c=r.fill,u=r.stroke;return oe.createElement("rect",{stroke:u,fill:c,x:i,y:s,width:l,height:a})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,l=r.width,a=r.height,c=r.data,u=r.children,h=r.padding,f=O.Children.only(u);return f?oe.cloneElement(f,{x:i,y:s,width:l,height:a,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,l,a=this,c=this.props,u=c.y,h=c.travellerWidth,f=c.height,p=c.traveller,v=c.ariaLabel,S=c.data,x=c.startIndex,g=c.endIndex,b=Math.max(r,this.props.x),y=sE(sE({},Mt(this.props,!1)),{},{x:b,y:u,width:h,height:f}),_=v||"Min value: ".concat((s=S[x])===null||s===void 0?void 0:s.name,", Max value: ").concat((l=S[g])===null||l===void 0?void 0:l.name);return oe.createElement(Cn,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),a.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,y))}},{key:"renderSlide",value:function(r,i){var s=this.props,l=s.y,a=s.height,c=s.stroke,u=s.travellerWidth,h=Math.min(r,i)+u,f=Math.max(Math.abs(i-r)-u,0);return oe.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:l,width:f,height:a})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,l=r.y,a=r.height,c=r.travellerWidth,u=r.stroke,h=this.state,f=h.startX,p=h.endX,v=5,S={pointerEvents:"none",fill:u};return oe.createElement(Cn,{className:"recharts-brush-texts"},oe.createElement(vy,Fy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-v,y:l+a/2},S),this.getTextOfTick(i)),oe.createElement(vy,Fy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+c+v,y:l+a/2},S),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,l=r.children,a=r.x,c=r.y,u=r.width,h=r.height,f=r.alwaysShowText,p=this.state,v=p.startX,S=p.endX,x=p.isTextActive,g=p.isSlideMoving,b=p.isTravellerMoving,y=p.isTravellerFocused;if(!i||!i.length||!$e(a)||!$e(c)||!$e(u)||!$e(h)||u<=0||h<=0)return null;var _=Bt("recharts-brush",s),T=oe.Children.count(l)===1,E=Wbe("userSelect","none");return oe.createElement(Cn,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,S),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(S,"endX"),(x||g||b||y||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,l=r.width,a=r.height,c=r.stroke,u=Math.floor(s+a/2)-1;return oe.createElement(oe.Fragment,null,oe.createElement("rect",{x:i,y:s,width:l,height:a,fill:c,stroke:"none"}),oe.createElement("line",{x1:i+1,y1:u,x2:i+l-1,y2:u,fill:"none",stroke:"#fff"}),oe.createElement("line",{x1:i+1,y1:u+2,x2:i+l-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return oe.isValidElement(r)?s=oe.cloneElement(r,i):Ct(r)?s=r(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,l=r.width,a=r.x,c=r.travellerWidth,u=r.updateId,h=r.startIndex,f=r.endIndex;if(s!==i.prevData||u!==i.prevUpdateId)return sE({prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:a,prevWidth:l},s&&s.length?e0e({data:s,width:l,x:a,travellerWidth:c,startIndex:h,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||a!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([a,a+l-c]);var p=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:a,prevWidth:l,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,l=0,a=s-1;a-l>1;){var c=Math.floor((l+a)/2);r[c]>i?a=c:l=c}return i>=r[a]?a:l}}])})(O.PureComponent);bi(vd,"displayName","Brush");bi(vd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var oE,O6;function t0e(){if(O6)return oE;O6=1;var e=PO();function t(n,r){var i;return e(n,function(s,l,a){return i=r(s,l,a),!i}),!!i}return oE=t,oE}var aE,R6;function n0e(){if(R6)return aE;R6=1;var e=GH(),t=ol(),n=t0e(),r=si(),i=t0();function s(l,a,c){var u=r(l)?e:n;return c&&i(l,a,c)&&(a=void 0),u(l,t(a,3))}return aE=s,aE}var r0e=n0e();const i0e=sn(r0e);var Ks=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},lE,A6;function s0e(){if(A6)return lE;A6=1;var e=d$();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return lE=t,lE}var cE,P6;function o0e(){if(P6)return cE;P6=1;var e=s0e(),t=c$(),n=ol();function r(i,s){var l={};return s=n(s,3),t(i,function(a,c,u){e(l,c,s(a,c,u))}),l}return cE=r,cE}var a0e=o0e();const l0e=sn(a0e);var uE,M6;function c0e(){if(M6)return uE;M6=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return uE=e,uE}var dE,L6;function u0e(){if(L6)return dE;L6=1;var e=PO();function t(n,r){var i=!0;return e(n,function(s,l,a){return i=!!r(s,l,a),i}),i}return dE=t,dE}var fE,j6;function d0e(){if(j6)return fE;j6=1;var e=c0e(),t=u0e(),n=ol(),r=si(),i=t0();function s(l,a,c){var u=r(l)?e:t;return c&&i(l,a,c)&&(a=void 0),u(l,n(a,3))}return fE=s,fE}var f0e=d0e();const zF=sn(f0e);var h0e=["x","y"];function Rp(e){"@babel/helpers - typeof";return Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rp(e)}function fT(){return fT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fT.apply(this,arguments)}function D6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D6(Object(n),!0).forEach(function(r){p0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p0e(e,t,n){return t=m0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e){var t=g0e(e,"string");return Rp(t)=="symbol"?t:t+""}function g0e(e,t){if(Rp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v0e(e,t){if(e==null)return{};var n=y0e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function y0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function b0e(e,t){var n=e.x,r=e.y,i=v0e(e,h0e),s="".concat(n),l=parseInt(s,10),a="".concat(r),c=parseInt(a,10),u="".concat(t.height||i.height),h=parseInt(u,10),f="".concat(t.width||i.width),p=parseInt(f,10);return vh(vh(vh(vh(vh({},t),i),l?{x:l}:{}),c?{y:c}:{}),{},{height:h,width:p,name:t.name,radius:t.radius})}function I6(e){return oe.createElement(Pbe,fT({shapeType:"rectangle",propTransformer:b0e,activeClassName:"recharts-active-bar"},e))}var _0e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var s=$e(r)||Tae(r);return s?t(r,i):(s||Dr(!1),n)}},x0e=["value","background"],HF;function yd(e){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yd(e)}function S0e(e,t){if(e==null)return{};var n=w0e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Vy(){return Vy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vy.apply(this,arguments)}function N6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N6(Object(n),!0).forEach(function(r){Ia(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FF(r.key),r)}}function E0e(e,t,n){return t&&B6(e.prototype,t),n&&B6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function T0e(e,t,n){return t=qy(t),k0e(e,$F()?Reflect.construct(t,n||[],qy(e).constructor):t.apply(e,n))}function k0e(e,t){if(t&&(yd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O0e(e)}function O0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($F=function(){return!!e})()}function qy(e){return qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qy(e)}function R0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hT(e,t)}function hT(e,t){return hT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hT(e,t)}function Ia(e,t,n){return t=FF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FF(e){var t=A0e(e,"string");return yd(t)=="symbol"?t:t+""}function A0e(e,t){if(yd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dm=(function(e){function t(){var n;C0e(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=T0e(this,t,[].concat(i)),Ia(n,"state",{isAnimationFinished:!1}),Ia(n,"id",sm("recharts-bar-")),Ia(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Ia(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return R0e(t,e),E0e(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,l=s.shape,a=s.dataKey,c=s.activeIndex,u=s.activeBar,h=Mt(this.props,!1);return r&&r.map(function(f,p){var v=p===c,S=v?u:l,x=$n($n($n({},h),f),{},{isActive:v,option:S,index:p,dataKey:a,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return oe.createElement(Cn,Vy({className:"recharts-bar-rectangle"},oy(i.props,f,p),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value,"-").concat(p)}),oe.createElement(I6,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,l=i.layout,a=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,h=i.animationEasing,f=i.animationId,p=this.state.prevData;return oe.createElement(Uo,{begin:c,duration:u,isActive:a,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var S=v.t,x=s.map(function(g,b){var y=p&&p[b];if(y){var _=Wi(y.x,g.x),T=Wi(y.y,g.y),E=Wi(y.width,g.width),k=Wi(y.height,g.height);return $n($n({},g),{},{x:_(S),y:T(S),width:E(S),height:k(S)})}if(l==="horizontal"){var A=Wi(0,g.height),R=A(S);return $n($n({},g),{},{y:g.y+g.height-R,height:R})}var L=Wi(0,g.width),z=L(S);return $n($n({},g),{},{width:z})});return oe.createElement(Cn,null,r.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,l=this.state.prevData;return s&&i&&i.length&&(!l||!up(l,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,l=i.dataKey,a=i.activeIndex,c=Mt(this.props.background,!1);return s.map(function(u,h){u.value;var f=u.background,p=S0e(u,x0e);if(!f)return null;var v=$n($n($n($n($n({},p),{},{fill:"#eee"},f),c),oy(r.props,u,h)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:h,className:"recharts-bar-background-rectangle"});return oe.createElement(I6,Vy({key:"background-bar-".concat(h),option:r.props.background,isActive:h===a},v))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.data,a=s.xAxis,c=s.yAxis,u=s.layout,h=s.children,f=ws(h,d0);if(!f)return null;var p=u==="vertical"?l[0].height/2:l[0].width/2,v=function(g,b){var y=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:y,errorVal:ki(g,b)}},S={clipPath:r?"url(#clipPath-".concat(i,")"):null};return oe.createElement(Cn,S,f.map(function(x){return oe.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.props.dataKey),data:l,xAxis:a,yAxis:c,layout:u,offset:p,dataPointFormatter:v})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,l=r.className,a=r.xAxis,c=r.yAxis,u=r.left,h=r.top,f=r.width,p=r.height,v=r.isAnimationActive,S=r.background,x=r.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,b=Bt("recharts-bar",l),y=a&&a.allowDataOverflow,_=c&&c.allowDataOverflow,T=y||_,E=It(x)?this.id:x;return oe.createElement(Cn,{className:b},y||_?oe.createElement("defs",null,oe.createElement("clipPath",{id:"clipPath-".concat(E)},oe.createElement("rect",{x:y?u:u-f/2,y:_?h:h-p/2,width:y?f:f*2,height:_?p:p*2}))):null,oe.createElement(Cn,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(E,")"):null},S?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,E),(!v||g)&&Ka.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(O.PureComponent);HF=dm;Ia(dm,"displayName","Bar");Ia(dm,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Jd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ia(dm,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,s=e.xAxis,l=e.yAxis,a=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,h=e.dataStartIndex,f=e.displayedData,p=e.offset,v=qme(r,n);if(!v)return null;var S=t.layout,x=n.type.defaultProps,g=x!==void 0?$n($n({},x),n.props):n.props,b=g.dataKey,y=g.children,_=g.minPointSize,T=S==="horizontal"?l:s,E=u?T.scale.domain():null,k=Jme({numericAxis:T}),A=ws(y,y$),R=f.map(function(L,z){var D,$,N,F,U,H;u?D=Wme(u[h+z],E):(D=ki(L,b),Array.isArray(D)||(D=[k,D]));var K=_0e(_,HF.defaultProps.minPointSize)(D[1],z);if(S==="horizontal"){var W,I=[l.scale(D[0]),l.scale(D[1])],G=I[0],j=I[1];$=C4({axis:s,ticks:a,bandSize:i,offset:v.offset,entry:L,index:z}),N=(W=j??G)!==null&&W!==void 0?W:void 0,F=v.size;var B=G-j;if(U=Number.isNaN(B)?0:B,H={x:$,y:l.y,width:F,height:l.height},Math.abs(K)>0&&Math.abs(U)<Math.abs(K)){var V=Ss(U||K)*(Math.abs(K)-Math.abs(U));N-=V,U+=V}}else{var X=[s.scale(D[0]),s.scale(D[1])],re=X[0],ie=X[1];if($=re,N=C4({axis:l,ticks:c,bandSize:i,offset:v.offset,entry:L,index:z}),F=ie-re,U=v.size,H={x:s.x,y:N,width:s.width,height:U},Math.abs(K)>0&&Math.abs(F)<Math.abs(K)){var Q=Ss(F||K)*(Math.abs(K)-Math.abs(F));F+=Q}}return $n($n($n({},L),{},{x:$,y:N,width:F,height:U,value:u?D:D[1],payload:L,background:H},A&&A[z]&&A[z].props),{},{tooltipPayload:[CF(n,L)],tooltipPosition:{x:$+F/2,y:N+U/2}})});return $n({data:R,layout:S},p)});function Ap(e){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ap(e)}function P0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,UF(r.key),r)}}function M0e(e,t,n){return t&&z6(e.prototype,t),n&&z6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ps(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H6(Object(n),!0).forEach(function(r){p0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p0(e,t,n){return t=UF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UF(e){var t=L0e(e,"string");return Ap(t)=="symbol"?t:t+""}function L0e(e,t){if(Ap(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ap(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j0e=function(t,n,r,i,s){var l=t.width,a=t.height,c=t.layout,u=t.children,h=Object.keys(n),f={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!_i(u,dm);return h.reduce(function(v,S){var x=n[S],g=x.orientation,b=x.domain,y=x.padding,_=y===void 0?{}:y,T=x.mirror,E=x.reversed,k="".concat(g).concat(T?"Mirror":""),A,R,L,z,D;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var $=b[1]-b[0],N=1/0,F=x.categoricalDomain.sort(Rae);if(F.forEach(function(X,re){re>0&&(N=Math.min((X||0)-(F[re-1]||0),N))}),Number.isFinite(N)){var U=N/$,H=x.layout==="vertical"?r.height:r.width;if(x.padding==="gap"&&(A=U*H/2),x.padding==="no-gap"){var K=Tc(t.barCategoryGap,U*H),W=U*H/2;A=W-K-(W-K)/H*K}}}i==="xAxis"?R=[r.left+(_.left||0)+(A||0),r.left+r.width-(_.right||0)-(A||0)]:i==="yAxis"?R=c==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(A||0),r.top+r.height-(_.bottom||0)-(A||0)]:R=x.range,E&&(R=[R[1],R[0]]);var I=Ume(x,s,p),G=I.scale,j=I.realScaleType;G.domain(b).range(R),Vme(G);var B=Zme(G,ps(ps({},x),{},{realScaleType:j}));i==="xAxis"?(D=g==="top"&&!T||g==="bottom"&&T,L=r.left,z=f[k]-D*x.height):i==="yAxis"&&(D=g==="left"&&!T||g==="right"&&T,L=f[k]-D*x.width,z=r.top);var V=ps(ps(ps({},x),B),{},{realScaleType:j,x:L,y:z,scale:G,width:i==="xAxis"?r.width:x.width,height:i==="yAxis"?r.height:x.height});return V.bandSize=Py(V,B),!x.hide&&i==="xAxis"?f[k]+=(D?-1:1)*V.height:x.hide||(f[k]+=(D?-1:1)*V.width),ps(ps({},v),{},p0({},S,V))},{})},VF=function(t,n){var r=t.x,i=t.y,s=n.x,l=n.y;return{x:Math.min(r,s),y:Math.min(i,l),width:Math.abs(s-r),height:Math.abs(l-i)}},D0e=function(t){var n=t.x1,r=t.y1,i=t.x2,s=t.y2;return VF({x:n,y:r},{x:i,y:s})},qF=(function(){function e(t){P0e(this,e),this.scale=t}return M0e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,s=r.position;if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],s=r[r.length-1];return i<=s?n>=i&&n<=s:n>=s&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();p0(qF,"EPS",1e-4);var aR=function(t){var n=Object.keys(t).reduce(function(r,i){return ps(ps({},r),{},p0({},i,qF.create(t[i])))},{});return ps(ps({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=s.bandAware,a=s.position;return l0e(i,function(c,u){return n[u].apply(c,{bandAware:l,position:a})})},isInRange:function(i){return zF(i,function(s,l){return n[l].isInRange(s)})}})};function I0e(e){return(e%180+180)%180}var N0e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=I0e(i),l=s*Math.PI/180,a=Math.atan(r/n),c=l>a&&l<Math.PI-a?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},hE,$6;function B0e(){if($6)return hE;$6=1;var e=ol(),t=om(),n=Jb();function r(i){return function(s,l,a){var c=Object(s);if(!t(s)){var u=e(l,3);s=n(s),l=function(f){return u(c[f],f,c)}}var h=i(s,l,a);return h>-1?c[u?s[h]:h]:void 0}}return hE=r,hE}var pE,F6;function z0e(){if(F6)return pE;F6=1;var e=DF();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return pE=t,pE}var mE,U6;function H0e(){if(U6)return mE;U6=1;var e=i$(),t=ol(),n=z0e(),r=Math.max;function i(s,l,a){var c=s==null?0:s.length;if(!c)return-1;var u=a==null?0:n(a);return u<0&&(u=r(c+u,0)),e(s,t(l,3),u)}return mE=i,mE}var gE,V6;function $0e(){if(V6)return gE;V6=1;var e=B0e(),t=H0e(),n=e(t);return gE=n,gE}var F0e=$0e();const U0e=sn(F0e);var V0e=_H();const q0e=sn(V0e);var W0e=q0e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),lR=O.createContext(void 0),cR=O.createContext(void 0),WF=O.createContext(void 0),GF=O.createContext({}),KF=O.createContext(void 0),YF=O.createContext(0),XF=O.createContext(0),q6=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,l=t.clipPathId,a=t.children,c=t.width,u=t.height,h=W0e(s);return oe.createElement(lR.Provider,{value:r},oe.createElement(cR.Provider,{value:i},oe.createElement(GF.Provider,{value:s},oe.createElement(WF.Provider,{value:h},oe.createElement(KF.Provider,{value:l},oe.createElement(YF.Provider,{value:u},oe.createElement(XF.Provider,{value:c},a)))))))},G0e=function(){return O.useContext(KF)},QF=function(t){var n=O.useContext(lR);n==null&&Dr(!1);var r=n[t];return r==null&&Dr(!1),r},K0e=function(){var t=O.useContext(lR);return Ra(t)},Y0e=function(){var t=O.useContext(cR),n=U0e(t,function(r){return zF(r.domain,Number.isFinite)});return n||Ra(t)},ZF=function(t){var n=O.useContext(cR);n==null&&Dr(!1);var r=n[t];return r==null&&Dr(!1),r},X0e=function(){var t=O.useContext(WF);return t},Q0e=function(){return O.useContext(GF)},uR=function(){return O.useContext(XF)},dR=function(){return O.useContext(YF)};function bd(e){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bd(e)}function Z0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eU(r.key),r)}}function e_e(e,t,n){return t&&J0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function t_e(e,t,n){return t=Wy(t),n_e(e,JF()?Reflect.construct(t,n||[],Wy(e).constructor):t.apply(e,n))}function n_e(e,t){if(t&&(bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r_e(e)}function r_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JF=function(){return!!e})()}function Wy(e){return Wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wy(e)}function i_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pT(e,t)}function pT(e,t){return pT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pT(e,t)}function W6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W6(Object(n),!0).forEach(function(r){fR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fR(e,t,n){return t=eU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eU(e){var t=s_e(e,"string");return bd(t)=="symbol"?t:t+""}function s_e(e,t){if(bd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function o_e(e,t){return u_e(e)||c_e(e,t)||l_e(e,t)||a_e()}function a_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l_e(e,t){if(e){if(typeof e=="string")return K6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K6(e,t)}}function K6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function u_e(e){if(Array.isArray(e))return e}function mT(){return mT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mT.apply(this,arguments)}var d_e=function(t,n){var r;return oe.isValidElement(t)?r=oe.cloneElement(t,n):Ct(t)?r=t(n):r=oe.createElement("line",mT({},n,{className:"recharts-reference-line-line"})),r},f_e=function(t,n,r,i,s,l,a,c,u){var h=s.x,f=s.y,p=s.width,v=s.height;if(r){var S=u.y,x=t.y.apply(S,{position:l});if(Ks(u,"discard")&&!t.y.isInRange(x))return null;var g=[{x:h+p,y:x},{x:h,y:x}];return c==="left"?g.reverse():g}if(n){var b=u.x,y=t.x.apply(b,{position:l});if(Ks(u,"discard")&&!t.x.isInRange(y))return null;var _=[{x:y,y:f+v},{x:y,y:f}];return a==="top"?_.reverse():_}if(i){var T=u.segment,E=T.map(function(k){return t.apply(k,{position:l})});return Ks(u,"discard")&&i0e(E,function(k){return!t.isInRange(k)})?null:E}return null};function h_e(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,s=e.yAxisId,l=e.shape,a=e.className,c=e.alwaysShow,u=G0e(),h=QF(i),f=ZF(s),p=X0e();if(!u||!p)return null;Io(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=aR({x:h.scale,y:f.scale}),S=or(t),x=or(n),g=r&&r.length===2,b=f_e(v,S,x,g,p,e.position,h.orientation,f.orientation,e);if(!b)return null;var y=o_e(b,2),_=y[0],T=_.x,E=_.y,k=y[1],A=k.x,R=k.y,L=Ks(e,"hidden")?"url(#".concat(u,")"):void 0,z=G6(G6({clipPath:L},Mt(e,!0)),{},{x1:T,y1:E,x2:A,y2:R});return oe.createElement(Cn,{className:Bt("recharts-reference-line",a)},d_e(l,z),Pr.renderCallByParent(e,D0e({x1:T,y1:E,x2:A,y2:R})))}var hR=(function(e){function t(){return Z0e(this,t),t_e(this,t,arguments)}return i_e(t,e),e_e(t,[{key:"render",value:function(){return oe.createElement(h_e,this.props)}}])})(oe.Component);fR(hR,"displayName","ReferenceLine");fR(hR,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function gT(){return gT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gT.apply(this,arguments)}function _d(e){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_d(e)}function Y6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y6(Object(n),!0).forEach(function(r){m0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nU(r.key),r)}}function g_e(e,t,n){return t&&m_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function v_e(e,t,n){return t=Gy(t),y_e(e,tU()?Reflect.construct(t,n||[],Gy(e).constructor):t.apply(e,n))}function y_e(e,t){if(t&&(_d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b_e(e)}function b_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tU=function(){return!!e})()}function Gy(e){return Gy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gy(e)}function __e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vT(e,t)}function vT(e,t){return vT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vT(e,t)}function m0(e,t,n){return t=nU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nU(e){var t=x_e(e,"string");return _d(t)=="symbol"?t:t+""}function x_e(e,t){if(_d(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_d(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var S_e=function(t){var n=t.x,r=t.y,i=t.xAxis,s=t.yAxis,l=aR({x:i.scale,y:s.scale}),a=l.apply({x:n,y:r},{bandAware:!0});return Ks(t,"discard")&&!l.isInRange(a)?null:a},g0=(function(e){function t(){return p_e(this,t),v_e(this,t,arguments)}return __e(t,e),g_e(t,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,l=r.r,a=r.alwaysShow,c=r.clipPathId,u=or(i),h=or(s);if(Io(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!h)return null;var f=S_e(this.props);if(!f)return null;var p=f.x,v=f.y,S=this.props,x=S.shape,g=S.className,b=Ks(this.props,"hidden")?"url(#".concat(c,")"):void 0,y=X6(X6({clipPath:b},Mt(this.props,!0)),{},{cx:p,cy:v});return oe.createElement(Cn,{className:Bt("recharts-reference-dot",g)},t.renderDot(x,y),Pr.renderCallByParent(this.props,{x:p-l,y:v-l,width:2*l,height:2*l}))}}])})(oe.Component);m0(g0,"displayName","ReferenceDot");m0(g0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});m0(g0,"renderDot",function(e,t){var n;return oe.isValidElement(e)?n=oe.cloneElement(e,t):Ct(e)?n=e(t):n=oe.createElement(oR,gT({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function yT(){return yT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yT.apply(this,arguments)}function xd(e){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(e)}function Q6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(n),!0).forEach(function(r){v0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iU(r.key),r)}}function E_e(e,t,n){return t&&C_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T_e(e,t,n){return t=Ky(t),k_e(e,rU()?Reflect.construct(t,n||[],Ky(e).constructor):t.apply(e,n))}function k_e(e,t){if(t&&(xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O_e(e)}function O_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rU=function(){return!!e})()}function Ky(e){return Ky=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ky(e)}function R_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bT(e,t)}function bT(e,t){return bT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bT(e,t)}function v0(e,t,n){return t=iU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iU(e){var t=A_e(e,"string");return xd(t)=="symbol"?t:t+""}function A_e(e,t){if(xd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var P_e=function(t,n,r,i,s){var l=s.x1,a=s.x2,c=s.y1,u=s.y2,h=s.xAxis,f=s.yAxis;if(!h||!f)return null;var p=aR({x:h.scale,y:f.scale}),v={x:t?p.x.apply(l,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},S={x:n?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Ks(s,"discard")&&(!p.isInRange(v)||!p.isInRange(S))?null:VF(v,S)},y0=(function(e){function t(){return w_e(this,t),T_e(this,t,arguments)}return R_e(t,e),E_e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,l=r.y1,a=r.y2,c=r.className,u=r.alwaysShow,h=r.clipPathId;Io(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=or(i),p=or(s),v=or(l),S=or(a),x=this.props.shape;if(!f&&!p&&!v&&!S&&!x)return null;var g=P_e(f,p,v,S,this.props);if(!g&&!x)return null;var b=Ks(this.props,"hidden")?"url(#".concat(h,")"):void 0;return oe.createElement(Cn,{className:Bt("recharts-reference-area",c)},t.renderRect(x,Z6(Z6({clipPath:b},Mt(this.props,!0)),g)),Pr.renderCallByParent(this.props,g))}}])})(oe.Component);v0(y0,"displayName","ReferenceArea");v0(y0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});v0(y0,"renderRect",function(e,t){var n;return oe.isValidElement(e)?n=oe.cloneElement(e,t):Ct(e)?n=e(t):n=oe.createElement(sR,yT({},t,{className:"recharts-reference-area-rect"})),n});function sU(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function M_e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return N0e(r,n)}function L_e(e,t,n){var r=n==="width",i=e.x,s=e.y,l=e.width,a=e.height;return t===1?{start:r?i:s,end:r?i+l:s+a}:{start:r?i+l:s+a,end:r?i:s}}function Yy(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var s=n();return e*(t-e*s/2-r)>=0&&e*(t+e*s/2-i)<=0}function j_e(e,t){return sU(e,t+1)}function D_e(e,t,n,r,i){for(var s=(r||[]).slice(),l=t.start,a=t.end,c=0,u=1,h=l,f=function(){var S=r?.[c];if(S===void 0)return{v:sU(r,u)};var x=c,g,b=function(){return g===void 0&&(g=n(S,x)),g},y=S.coordinate,_=c===0||Yy(e,y,b,h,a);_||(c=0,h=l,u+=1),_&&(h=y+e*(b()/2+i),c+=u)},p;u<=s.length;)if(p=f(),p)return p.v;return[]}function Pp(e){"@babel/helpers - typeof";return Pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pp(e)}function J6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J6(Object(n),!0).forEach(function(r){I_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I_e(e,t,n){return t=N_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N_e(e){var t=B_e(e,"string");return Pp(t)=="symbol"?t:t+""}function B_e(e,t){if(Pp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z_e(e,t,n,r,i){for(var s=(r||[]).slice(),l=s.length,a=t.start,c=t.end,u=function(p){var v=s[p],S,x=function(){return S===void 0&&(S=n(v,p)),S};if(p===l-1){var g=e*(v.coordinate+e*x()/2-c);s[p]=v=Or(Or({},v),{},{tickCoord:g>0?v.coordinate-g*e:v.coordinate})}else s[p]=v=Or(Or({},v),{},{tickCoord:v.coordinate});var b=Yy(e,v.tickCoord,x,a,c);b&&(c=v.tickCoord-e*(x()/2+i),s[p]=Or(Or({},v),{},{isShow:!0}))},h=l-1;h>=0;h--)u(h);return s}function H_e(e,t,n,r,i,s){var l=(r||[]).slice(),a=l.length,c=t.start,u=t.end;if(s){var h=r[a-1],f=n(h,a-1),p=e*(h.coordinate+e*f/2-u);l[a-1]=h=Or(Or({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=Yy(e,h.tickCoord,function(){return f},c,u);v&&(u=h.tickCoord-e*(f/2+i),l[a-1]=Or(Or({},h),{},{isShow:!0}))}for(var S=s?a-1:a,x=function(y){var _=l[y],T,E=function(){return T===void 0&&(T=n(_,y)),T};if(y===0){var k=e*(_.coordinate-e*E()/2-c);l[y]=_=Or(Or({},_),{},{tickCoord:k<0?_.coordinate-k*e:_.coordinate})}else l[y]=_=Or(Or({},_),{},{tickCoord:_.coordinate});var A=Yy(e,_.tickCoord,E,c,u);A&&(c=_.tickCoord+e*(E()/2+i),l[y]=Or(Or({},_),{},{isShow:!0}))},g=0;g<S;g++)x(g);return l}function pR(e,t,n){var r=e.tick,i=e.ticks,s=e.viewBox,l=e.minTickGap,a=e.orientation,c=e.interval,u=e.tickFormatter,h=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if($e(c)||Jd.isSsr)return j_e(i,typeof c=="number"&&$e(c)?c:0);var p=[],v=a==="top"||a==="bottom"?"width":"height",S=h&&v==="width"?Lh(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},x=function(_,T){var E=Ct(u)?u(_.value,T):_.value;return v==="width"?M_e(Lh(E,{fontSize:t,letterSpacing:n}),S,f):Lh(E,{fontSize:t,letterSpacing:n})[v]},g=i.length>=2?Ss(i[1].coordinate-i[0].coordinate):1,b=L_e(s,g,v);return c==="equidistantPreserveStart"?D_e(g,b,x,i,l):(c==="preserveStart"||c==="preserveStartEnd"?p=H_e(g,b,x,i,l,c==="preserveStartEnd"):p=z_e(g,b,x,i,l),p.filter(function(y){return y.isShow}))}var $_e=["viewBox"],F_e=["viewBox"],U_e=["ticks"];function Sd(e){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(e)}function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}function e8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e8(Object(n),!0).forEach(function(r){mR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vE(e,t){if(e==null)return{};var n=V_e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function q_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aU(r.key),r)}}function W_e(e,t,n){return t&&t8(e.prototype,t),n&&t8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function G_e(e,t,n){return t=Xy(t),K_e(e,oU()?Reflect.construct(t,n||[],Xy(e).constructor):t.apply(e,n))}function K_e(e,t){if(t&&(Sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y_e(e)}function Y_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oU=function(){return!!e})()}function Xy(e){return Xy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xy(e)}function X_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_T(e,t)}function _T(e,t){return _T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_T(e,t)}function mR(e,t,n){return t=aU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aU(e){var t=Q_e(e,"string");return Sd(t)=="symbol"?t:t+""}function Q_e(e,t){if(Sd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rf=(function(e){function t(n){var r;return q_e(this,t),r=G_e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return X_e(t,e),W_e(t,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,l=vE(r,$_e),a=this.props,c=a.viewBox,u=vE(a,F_e);return!Uu(s,c)||!Uu(l,u)||!Uu(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.x,l=i.y,a=i.width,c=i.height,u=i.orientation,h=i.tickSize,f=i.mirror,p=i.tickMargin,v,S,x,g,b,y,_=f?-1:1,T=r.tickSize||h,E=$e(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":v=S=r.coordinate,g=l+ +!f*c,x=g-_*T,y=x-_*p,b=E;break;case"left":x=g=r.coordinate,S=s+ +!f*a,v=S-_*T,b=v-_*p,y=E;break;case"right":x=g=r.coordinate,S=s+ +f*a,v=S+_*T,b=v+_*p,y=E;break;default:v=S=r.coordinate,g=l+ +f*c,x=g+_*T,y=x+_*p,b=E;break}return{line:{x1:v,y1:x,x2:S,y2:g},tick:{x:b,y}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,l;switch(i){case"left":l=s?"start":"end";break;case"right":l=s?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,l="end";switch(i){case"left":case"right":l="middle";break;case"top":l=s?"start":"end";break;default:l=s?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,l=r.width,a=r.height,c=r.orientation,u=r.mirror,h=r.axisLine,f=Zn(Zn(Zn({},Mt(this.props,!1)),Mt(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);f=Zn(Zn({},f),{},{x1:i,y1:s+p*a,x2:i+l,y2:s+p*a})}else{var v=+(c==="left"&&!u||c==="right"&&u);f=Zn(Zn({},f),{},{x1:i+v*l,y1:s,x2:i+v*l,y2:s+a})}return oe.createElement("line",ju({},f,{className:Bt("recharts-cartesian-axis-line",es(h,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var l=this,a=this.props,c=a.tickLine,u=a.stroke,h=a.tick,f=a.tickFormatter,p=a.unit,v=pR(Zn(Zn({},this.props),{},{ticks:r}),i,s),S=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),g=Mt(this.props,!1),b=Mt(h,!1),y=Zn(Zn({},g),{},{fill:"none"},Mt(c,!1)),_=v.map(function(T,E){var k=l.getTickLineCoord(T),A=k.line,R=k.tick,L=Zn(Zn(Zn(Zn({textAnchor:S,verticalAnchor:x},g),{},{stroke:"none",fill:u},b),R),{},{index:E,payload:T,visibleTicksCount:v.length,tickFormatter:f});return oe.createElement(Cn,ju({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},oy(l.props,T,E)),c&&oe.createElement("line",ju({},y,A,{className:Bt("recharts-cartesian-axis-tick-line",es(c,"className"))})),h&&t.renderTickItem(h,L,"".concat(Ct(f)?f(T.value,E):T.value).concat(p||"")))});return oe.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,l=i.width,a=i.height,c=i.ticksGenerator,u=i.className,h=i.hide;if(h)return null;var f=this.props,p=f.ticks,v=vE(f,U_e),S=p;return Ct(c)&&(S=p&&p.length>0?c(this.props):c(v)),l<=0||a<=0||!S||!S.length?null:oe.createElement(Cn,{className:Bt("recharts-cartesian-axis",u),ref:function(g){r.layerReference=g}},s&&this.renderAxisLine(),this.renderTicks(S,this.state.fontSize,this.state.letterSpacing),Pr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var l,a=Bt(i.className,"recharts-cartesian-axis-tick-value");return oe.isValidElement(r)?l=oe.cloneElement(r,Zn(Zn({},i),{},{className:a})):Ct(r)?l=r(Zn(Zn({},i),{},{className:a})):l=oe.createElement(vy,ju({},i,{className:"recharts-cartesian-axis-tick-value"}),s),l}}])})(O.Component);mR(rf,"displayName","CartesianAxis");mR(rf,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Z_e=["x1","y1","x2","y2","key"],J_e=["offset"];function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function n8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n8(Object(n),!0).forEach(function(r){e1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e1e(e,t,n){return t=t1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t1e(e){var t=n1e(e,"string");return Oc(t)=="symbol"?t:t+""}function n1e(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(this,arguments)}function r8(e,t){if(e==null)return{};var n=r1e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function r1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var i1e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,s=t.y,l=t.width,a=t.height,c=t.ry;return oe.createElement("rect",{x:i,y:s,ry:c,width:l,height:a,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function lU(e,t){var n;if(oe.isValidElement(e))n=oe.cloneElement(e,t);else if(Ct(e))n=e(t);else{var r=t.x1,i=t.y1,s=t.x2,l=t.y2,a=t.key,c=r8(t,Z_e),u=Mt(c,!1);u.offset;var h=r8(u,J_e);n=oe.createElement("line",Jl({},h,{x1:r,y1:i,x2:s,y2:l,fill:"none",key:a}))}return n}function s1e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,s=e.horizontalPoints;if(!i||!s||!s.length)return null;var l=s.map(function(a,c){var u=Mr(Mr({},e),{},{x1:t,y1:a,x2:t+n,y2:a,key:"line-".concat(c),index:c});return lU(i,u)});return oe.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function o1e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,s=e.verticalPoints;if(!i||!s||!s.length)return null;var l=s.map(function(a,c){var u=Mr(Mr({},e),{},{x1:a,y1:t,x2:a,y2:t+n,key:"line-".concat(c),index:c});return lU(i,u)});return oe.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function a1e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,s=e.width,l=e.height,a=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var h=a.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==h[0]&&h.unshift(0);var f=h.map(function(p,v){var S=!h[v+1],x=S?i+l-p:h[v+1]-p;if(x<=0)return null;var g=v%t.length;return oe.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:x,width:s,stroke:"none",fill:t[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return oe.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function l1e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,s=e.x,l=e.y,a=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var h=u.map(function(p){return Math.round(p+s-s)}).sort(function(p,v){return p-v});s!==h[0]&&h.unshift(0);var f=h.map(function(p,v){var S=!h[v+1],x=S?s+a-p:h[v+1]-p;if(x<=0)return null;var g=v%r.length;return oe.createElement("rect",{key:"react-".concat(v),x:p,y:l,width:x,height:c,stroke:"none",fill:r[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return oe.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var c1e=function(t,n){var r=t.xAxis,i=t.width,s=t.height,l=t.offset;return SF(pR(Mr(Mr(Mr({},rf.defaultProps),r),{},{ticks:Lo(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),l.left,l.left+l.width,n)},u1e=function(t,n){var r=t.yAxis,i=t.width,s=t.height,l=t.offset;return SF(pR(Mr(Mr(Mr({},rf.defaultProps),r),{},{ticks:Lo(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),l.top,l.top+l.height,n)},Ru={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function xT(e){var t,n,r,i,s,l,a=uR(),c=dR(),u=Q0e(),h=Mr(Mr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ru.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Ru.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Ru.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ru.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:Ru.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Ru.verticalFill,x:$e(e.x)?e.x:u.left,y:$e(e.y)?e.y:u.top,width:$e(e.width)?e.width:u.width,height:$e(e.height)?e.height:u.height}),f=h.x,p=h.y,v=h.width,S=h.height,x=h.syncWithTicks,g=h.horizontalValues,b=h.verticalValues,y=K0e(),_=Y0e();if(!$e(v)||v<=0||!$e(S)||S<=0||!$e(f)||f!==+f||!$e(p)||p!==+p)return null;var T=h.verticalCoordinatesGenerator||c1e,E=h.horizontalCoordinatesGenerator||u1e,k=h.horizontalPoints,A=h.verticalPoints;if((!k||!k.length)&&Ct(E)){var R=g&&g.length,L=E({yAxis:_?Mr(Mr({},_),{},{ticks:R?g:_.ticks}):void 0,width:a,height:c,offset:u},R?!0:x);Io(Array.isArray(L),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Oc(L),"]")),Array.isArray(L)&&(k=L)}if((!A||!A.length)&&Ct(T)){var z=b&&b.length,D=T({xAxis:y?Mr(Mr({},y),{},{ticks:z?b:y.ticks}):void 0,width:a,height:c,offset:u},z?!0:x);Io(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Oc(D),"]")),Array.isArray(D)&&(A=D)}return oe.createElement("g",{className:"recharts-cartesian-grid"},oe.createElement(i1e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),oe.createElement(s1e,Jl({},h,{offset:u,horizontalPoints:k,xAxis:y,yAxis:_})),oe.createElement(o1e,Jl({},h,{offset:u,verticalPoints:A,xAxis:y,yAxis:_})),oe.createElement(a1e,Jl({},h,{horizontalPoints:k})),oe.createElement(l1e,Jl({},h,{verticalPoints:A})))}xT.displayName="CartesianGrid";var d1e=["layout","type","stroke","connectNulls","isRange","ref"],f1e=["key"],cU;function wd(e){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wd(e)}function uU(e,t){if(e==null)return{};var n=h1e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function h1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ec.apply(this,arguments)}function i8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i8(Object(n),!0).forEach(function(r){Vs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fU(r.key),r)}}function m1e(e,t,n){return t&&s8(e.prototype,t),n&&s8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g1e(e,t,n){return t=Qy(t),v1e(e,dU()?Reflect.construct(t,n||[],Qy(e).constructor):t.apply(e,n))}function v1e(e,t){if(t&&(wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y1e(e)}function y1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dU=function(){return!!e})()}function Qy(e){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qy(e)}function b1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ST(e,t)}function ST(e,t){return ST=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ST(e,t)}function Vs(e,t,n){return t=fU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fU(e){var t=_1e(e,"string");return wd(t)=="symbol"?t:t+""}function _1e(e,t){if(wd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vo=(function(e){function t(){var n;p1e(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=g1e(this,t,[].concat(i)),Vs(n,"state",{isAnimationFinished:!0}),Vs(n,"id",sm("recharts-area-")),Vs(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ct(l)&&l()}),Vs(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ct(l)&&l()}),n}return b1e(t,e),m1e(t,[{key:"renderDots",value:function(r,i,s){var l=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(l&&!a)return null;var c=this.props,u=c.dot,h=c.points,f=c.dataKey,p=Mt(this.props,!1),v=Mt(u,!0),S=h.map(function(g,b){var y=Ta(Ta(Ta({key:"dot-".concat(b),r:3},p),v),{},{index:b,cx:g.x,cy:g.y,dataKey:f,value:g.value,payload:g.payload,points:h});return t.renderDotItem(u,y)}),x={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return oe.createElement(Cn,ec({className:"recharts-area-dots"},x),S)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,s=i.baseLine,l=i.points,a=i.strokeWidth,c=l[0].x,u=l[l.length-1].x,h=r*Math.abs(c-u),f=Da(l.map(function(p){return p.y||0}));return $e(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Da(s.map(function(p){return p.y||0})),f)),$e(f)?oe.createElement("rect",{x:c<u?c:c-h,y:0,width:h,height:Math.floor(f+(a?parseInt("".concat(a),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,s=i.baseLine,l=i.points,a=i.strokeWidth,c=l[0].y,u=l[l.length-1].y,h=r*Math.abs(c-u),f=Da(l.map(function(p){return p.x||0}));return $e(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Da(s.map(function(p){return p.x||0})),f)),$e(f)?oe.createElement("rect",{x:0,y:c<u?c:c-h,width:f+(a?parseInt("".concat(a),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,s,l){var a=this.props,c=a.layout,u=a.type,h=a.stroke,f=a.connectNulls,p=a.isRange;a.ref;var v=uU(a,d1e);return oe.createElement(Cn,{clipPath:s?"url(#clipPath-".concat(l,")"):null},oe.createElement(Ih,ec({},Mt(v,!0),{points:r,connectNulls:f,type:u,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&oe.createElement(Ih,ec({},Mt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:r})),h!=="none"&&p&&oe.createElement(Ih,ec({},Mt(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var s=this,l=this.props,a=l.points,c=l.baseLine,u=l.isAnimationActive,h=l.animationBegin,f=l.animationDuration,p=l.animationEasing,v=l.animationId,S=this.state,x=S.prevPoints,g=S.prevBaseLine;return oe.createElement(Uo,{begin:h,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var y=b.t;if(x){var _=x.length/a.length,T=a.map(function(R,L){var z=Math.floor(L*_);if(x[z]){var D=x[z],$=Wi(D.x,R.x),N=Wi(D.y,R.y);return Ta(Ta({},R),{},{x:$(y),y:N(y)})}return R}),E;if($e(c)&&typeof c=="number"){var k=Wi(g,c);E=k(y)}else if(It(c)||Qd(c)){var A=Wi(g,0);E=A(y)}else E=c.map(function(R,L){var z=Math.floor(L*_);if(g[z]){var D=g[z],$=Wi(D.x,R.x),N=Wi(D.y,R.y);return Ta(Ta({},R),{},{x:$(y),y:N(y)})}return R});return s.renderAreaStatically(T,E,r,i)}return oe.createElement(Cn,null,oe.createElement("defs",null,oe.createElement("clipPath",{id:"animationClipPath-".concat(i)},s.renderClipRect(y))),oe.createElement(Cn,{clipPath:"url(#animationClipPath-".concat(i,")")},s.renderAreaStatically(a,c,r,i)))})}},{key:"renderArea",value:function(r,i){var s=this.props,l=s.points,a=s.baseLine,c=s.isAnimationActive,u=this.state,h=u.prevPoints,f=u.prevBaseLine,p=u.totalLength;return c&&l&&l.length&&(!h&&p>0||!up(h,l)||!up(f,a))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(l,a,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,l=i.dot,a=i.points,c=i.className,u=i.top,h=i.left,f=i.xAxis,p=i.yAxis,v=i.width,S=i.height,x=i.isAnimationActive,g=i.id;if(s||!a||!a.length)return null;var b=this.state.isAnimationFinished,y=a.length===1,_=Bt("recharts-area",c),T=f&&f.allowDataOverflow,E=p&&p.allowDataOverflow,k=T||E,A=It(g)?this.id:g,R=(r=Mt(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=R.r,z=L===void 0?3:L,D=R.strokeWidth,$=D===void 0?2:D,N=Bae(l)?l:{},F=N.clipDot,U=F===void 0?!0:F,H=z*2+$;return oe.createElement(Cn,{className:_},T||E?oe.createElement("defs",null,oe.createElement("clipPath",{id:"clipPath-".concat(A)},oe.createElement("rect",{x:T?h:h-v/2,y:E?u:u-S/2,width:T?v:v*2,height:E?S:S*2})),!U&&oe.createElement("clipPath",{id:"clipPath-dots-".concat(A)},oe.createElement("rect",{x:h-H/2,y:u-H/2,width:v+H,height:S+H}))):null,y?null:this.renderArea(k,A),(l||y)&&this.renderDots(k,U,A),(!x||b)&&Ka.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(O.PureComponent);cU=Vo;Vs(Vo,"displayName","Area");Vs(Vo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Jd.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Vs(Vo,"getBaseValue",function(e,t,n,r){var i=e.layout,s=e.baseValue,l=t.props.baseValue,a=l??s;if($e(a)&&typeof a=="number")return a;var c=i==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var h=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return a==="dataMin"?f:a==="dataMax"||h<0?h:Math.max(Math.min(u[0],u[1]),0)}return a==="dataMin"?u[0]:a==="dataMax"?u[1]:u[0]});Vs(Vo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,a=e.bandSize,c=e.dataKey,u=e.stackedData,h=e.dataStartIndex,f=e.displayedData,p=e.offset,v=t.layout,S=u&&u.length,x=cU.getBaseValue(t,n,r,i),g=v==="horizontal",b=!1,y=f.map(function(T,E){var k;S?k=u[h+E]:(k=ki(T,c),Array.isArray(k)?b=!0:k=[x,k]);var A=k[1]==null||S&&ki(T,c)==null;return g?{x:w4({axis:r,ticks:s,bandSize:a,entry:T,index:E}),y:A?null:i.scale(k[1]),value:k,payload:T}:{x:A?null:r.scale(k[1]),y:w4({axis:i,ticks:l,bandSize:a,entry:T,index:E}),value:k,payload:T}}),_;return S||b?_=y.map(function(T){var E=Array.isArray(T.value)?T.value[0]:null;return g?{x:T.x,y:E!=null&&T.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:T.y}}):_=g?i.scale(x):r.scale(x),Ta({points:y,baseLine:_,layout:v,isRange:b},p)});Vs(Vo,"renderDotItem",function(e,t){var n;if(oe.isValidElement(e))n=oe.cloneElement(e,t);else if(Ct(e))n=e(t);else{var r=Bt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,s=uU(t,f1e);n=oe.createElement(oR,ec({},s,{key:i,className:r}))}return n});function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function x1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mU(r.key),r)}}function w1e(e,t,n){return t&&S1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C1e(e,t,n){return t=Zy(t),E1e(e,hU()?Reflect.construct(t,n||[],Zy(e).constructor):t.apply(e,n))}function E1e(e,t){if(t&&(Cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T1e(e)}function T1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hU=function(){return!!e})()}function Zy(e){return Zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zy(e)}function k1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wT(e,t)}function wT(e,t){return wT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wT(e,t)}function pU(e,t,n){return t=mU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mU(e){var t=O1e(e,"string");return Cd(t)=="symbol"?t:t+""}function O1e(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function CT(){return CT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CT.apply(this,arguments)}function R1e(e){var t=e.xAxisId,n=uR(),r=dR(),i=QF(t);return i==null?null:O.createElement(rf,CT({},i,{className:Bt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Lo(l,!0)}}))}var Mp=(function(e){function t(){return x1e(this,t),C1e(this,t,arguments)}return k1e(t,e),w1e(t,[{key:"render",value:function(){return O.createElement(R1e,this.props)}}])})(O.Component);pU(Mp,"displayName","XAxis");pU(Mp,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Ed(e){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ed(e)}function A1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yU(r.key),r)}}function M1e(e,t,n){return t&&P1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function L1e(e,t,n){return t=Jy(t),j1e(e,gU()?Reflect.construct(t,n||[],Jy(e).constructor):t.apply(e,n))}function j1e(e,t){if(t&&(Ed(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D1e(e)}function D1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gU=function(){return!!e})()}function Jy(e){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jy(e)}function I1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ET(e,t)}function ET(e,t){return ET=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ET(e,t)}function vU(e,t,n){return t=yU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yU(e){var t=N1e(e,"string");return Ed(t)=="symbol"?t:t+""}function N1e(e,t){if(Ed(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ed(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function TT(){return TT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TT.apply(this,arguments)}var B1e=function(t){var n=t.yAxisId,r=uR(),i=dR(),s=ZF(n);return s==null?null:O.createElement(rf,TT({},s,{className:Bt("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(a){return Lo(a,!0)}}))},Lp=(function(e){function t(){return A1e(this,t),L1e(this,t,arguments)}return I1e(t,e),M1e(t,[{key:"render",value:function(){return O.createElement(B1e,this.props)}}])})(O.Component);vU(Lp,"displayName","YAxis");vU(Lp,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function o8(e){return F1e(e)||$1e(e)||H1e(e)||z1e()}function z1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H1e(e,t){if(e){if(typeof e=="string")return kT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kT(e,t)}}function $1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F1e(e){if(Array.isArray(e))return kT(e)}function kT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var OT=function(t,n,r,i,s){var l=ws(t,hR),a=ws(t,g0),c=[].concat(o8(l),o8(a)),u=ws(t,y0),h="".concat(i,"Id"),f=i[0],p=n;if(c.length&&(p=c.reduce(function(x,g){if(g.props[h]===r&&Ks(g.props,"extendDomain")&&$e(g.props[f])){var b=g.props[f];return[Math.min(x[0],b),Math.max(x[1],b)]}return x},p)),u.length){var v="".concat(f,"1"),S="".concat(f,"2");p=u.reduce(function(x,g){if(g.props[h]===r&&Ks(g.props,"extendDomain")&&$e(g.props[v])&&$e(g.props[S])){var b=g.props[v],y=g.props[S];return[Math.min(x[0],b,y),Math.max(x[1],b,y)]}return x},p)}return s&&s.length&&(p=s.reduce(function(x,g){return $e(g)?[Math.min(x[0],g),Math.max(x[1],g)]:x},p)),p},yE={exports:{}},a8;function U1e(){return a8||(a8=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function s(c,u,h,f,p){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new i(h,f||c,p),S=n?n+u:u;return c._events[S]?c._events[S].fn?c._events[S]=[c._events[S],v]:c._events[S].push(v):(c._events[S]=v,c._eventsCount++),c}function l(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],h,f;if(this._eventsCount===0)return u;for(f in h=this._events)t.call(h,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},a.prototype.listeners=function(u){var h=n?n+u:u,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,v=f.length,S=new Array(v);p<v;p++)S[p]=f[p].fn;return S},a.prototype.listenerCount=function(u){var h=n?n+u:u,f=this._events[h];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,h,f,p,v,S){var x=n?n+u:u;if(!this._events[x])return!1;var g=this._events[x],b=arguments.length,y,_;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,f),!0;case 4:return g.fn.call(g.context,h,f,p),!0;case 5:return g.fn.call(g.context,h,f,p,v),!0;case 6:return g.fn.call(g.context,h,f,p,v,S),!0}for(_=1,y=new Array(b-1);_<b;_++)y[_-1]=arguments[_];g.fn.apply(g.context,y)}else{var T=g.length,E;for(_=0;_<T;_++)switch(g[_].once&&this.removeListener(u,g[_].fn,void 0,!0),b){case 1:g[_].fn.call(g[_].context);break;case 2:g[_].fn.call(g[_].context,h);break;case 3:g[_].fn.call(g[_].context,h,f);break;case 4:g[_].fn.call(g[_].context,h,f,p);break;default:if(!y)for(E=1,y=new Array(b-1);E<b;E++)y[E-1]=arguments[E];g[_].fn.apply(g[_].context,y)}}return!0},a.prototype.on=function(u,h,f){return s(this,u,h,f,!1)},a.prototype.once=function(u,h,f){return s(this,u,h,f,!0)},a.prototype.removeListener=function(u,h,f,p){var v=n?n+u:u;if(!this._events[v])return this;if(!h)return l(this,v),this;var S=this._events[v];if(S.fn)S.fn===h&&(!p||S.once)&&(!f||S.context===f)&&l(this,v);else{for(var x=0,g=[],b=S.length;x<b;x++)(S[x].fn!==h||p&&!S[x].once||f&&S[x].context!==f)&&g.push(S[x]);g.length?this._events[v]=g.length===1?g[0]:g:l(this,v)}return this},a.prototype.removeAllListeners=function(u){var h;return u?(h=n?n+u:u,this._events[h]&&l(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(yE)),yE.exports}var V1e=U1e();const q1e=sn(V1e);var bE=new q1e,_E="recharts.syncMouseEvents";function jp(e){"@babel/helpers - typeof";return jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jp(e)}function W1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bU(r.key),r)}}function K1e(e,t,n){return t&&G1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xE(e,t,n){return t=bU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bU(e){var t=Y1e(e,"string");return jp(t)=="symbol"?t:t+""}function Y1e(e,t){if(jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var X1e=(function(){function e(){W1e(this,e),xE(this,"activeIndex",0),xE(this,"coordinateList",[]),xE(this,"layout","horizontal")}return K1e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,l=n.container,a=l===void 0?null:l,c=n.layout,u=c===void 0?null:c,h=n.offset,f=h===void 0?null:h,p=n.mouseHandlerCallback,v=p===void 0?null:p;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=a??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,l=i.y,a=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=s+c+u,p=l+this.offset.top+a/2+h;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])})();function Q1e(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&$e(r)&&$e(i))return!0}return!1}function Z1e(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function _U(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,s=e.endAngle,l=wr(t,n,r,i),a=wr(t,n,r,s);return{points:[l,a],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function J1e(e,t,n){var r,i,s,l;if(e==="horizontal")r=t.x,s=r,i=n.top,l=n.top+n.height;else if(e==="vertical")i=t.y,l=i,r=n.left,s=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var a=t.cx,c=t.cy,u=t.innerRadius,h=t.outerRadius,f=t.angle,p=wr(a,c,u,f),v=wr(a,c,h,f);r=p.x,i=p.y,s=v.x,l=v.y}else return _U(t);return[{x:r,y:i},{x:s,y:l}]}function Dp(e){"@babel/helpers - typeof";return Dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dp(e)}function l8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l8(Object(n),!0).forEach(function(r){exe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function exe(e,t,n){return t=txe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function txe(e){var t=nxe(e,"string");return Dp(t)=="symbol"?t:t+""}function nxe(e,t){if(Dp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rxe(e){var t,n,r=e.element,i=e.tooltipEventType,s=e.isActive,l=e.activeCoordinate,a=e.activePayload,c=e.offset,u=e.activeTooltipIndex,h=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,v=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!v||!s||!l||p!=="ScatterChart"&&i!=="axis")return null;var S,x=Ih;if(p==="ScatterChart")S=l,x=ibe;else if(p==="BarChart")S=Z1e(f,l,c,h),x=sR;else if(f==="radial"){var g=_U(l),b=g.cx,y=g.cy,_=g.radius,T=g.startAngle,E=g.endAngle;S={cx:b,cy:y,startAngle:T,endAngle:E,innerRadius:_,outerRadius:_},x=kF}else S={points:J1e(f,l,c)},x=Ih;var k=dv(dv(dv(dv({stroke:"#ccc",pointerEvents:"none"},c),S),Mt(v,!1)),{},{payload:a,payloadIndex:u,className:Bt("recharts-tooltip-cursor",v.className)});return O.isValidElement(v)?O.cloneElement(v,k):O.createElement(x,k)}var ixe=["item"],sxe=["children","className","width","height","style","compact","title","desc"];function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Du.apply(this,arguments)}function c8(e,t){return lxe(e)||axe(e,t)||SU(e,t)||oxe()}function oxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function axe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,l,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(h){u=!0,i=h}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function lxe(e){if(Array.isArray(e))return e}function u8(e,t){if(e==null)return{};var n=cxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dxe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wU(r.key),r)}}function fxe(e,t,n){return t&&dxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hxe(e,t,n){return t=eb(t),pxe(e,xU()?Reflect.construct(t,n||[],eb(e).constructor):t.apply(e,n))}function pxe(e,t){if(t&&(Td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mxe(e)}function mxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xU=function(){return!!e})()}function eb(e){return eb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},eb(e)}function gxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RT(e,t)}function RT(e,t){return RT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RT(e,t)}function kd(e){return bxe(e)||yxe(e)||SU(e)||vxe()}function vxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SU(e,t){if(e){if(typeof e=="string")return AT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AT(e,t)}}function yxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bxe(e){if(Array.isArray(e))return AT(e)}function AT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d8(Object(n),!0).forEach(function(r){pt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pt(e,t,n){return t=wU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wU(e){var t=_xe(e,"string");return Td(t)=="symbol"?t:t+""}function _xe(e,t){if(Td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xxe={xAxis:["bottom","top"],yAxis:["left","right"]},Sxe={width:"100%",height:"100%"},CU={x:0,y:0};function fv(e){return e}var wxe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Cxe=function(t,n,r,i){var s=n.find(function(h){return h&&h.index===r});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var l=s.coordinate,a=i.radius;return Oe(Oe(Oe({},i),wr(i.cx,i.cy,a,l)),{},{angle:l,radius:a})}var c=s.coordinate,u=i.angle;return Oe(Oe(Oe({},i),wr(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return CU},b0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,l=(r??[]).reduce(function(a,c){var u=c.props.data;return u&&u.length?[].concat(kd(a),kd(u)):a},[]);return l.length>0?l:t&&t.length&&$e(i)&&$e(s)?t.slice(i,s+1):[]};function EU(e){return e==="number"?[0,"auto"]:void 0}var PT=function(t,n,r,i){var s=t.graphicalItems,l=t.tooltipAxis,a=b0(n,t);return r<0||!s||!s.length||r>=a.length?null:s.reduce(function(c,u){var h,f=(h=u.props.data)!==null&&h!==void 0?h:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(l.dataKey&&!l.allowDuplicatedCategory){var v=f===void 0?a:f;p=iy(v,l.dataKey,i)}else p=f&&f[r]||a[r];return p?[].concat(kd(c),[CF(u,p)]):c},[])},f8=function(t,n,r,i){var s=i||{x:t.chartX,y:t.chartY},l=wxe(s,r),a=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,h=Nme(l,a,u,c);if(h>=0&&u){var f=u[h]&&u[h].value,p=PT(t,n,h,f),v=Cxe(r,a,h,s);return{activeTooltipIndex:h,activeLabel:f,activePayload:p,activeCoordinate:v}}return null},Exe=function(t,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,l=n.axisIdKey,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.layout,f=t.children,p=t.stackOffset,v=xF(h,s);return r.reduce(function(S,x){var g,b=x.type.defaultProps!==void 0?Oe(Oe({},x.type.defaultProps),x.props):x.props,y=b.type,_=b.dataKey,T=b.allowDataOverflow,E=b.allowDuplicatedCategory,k=b.scale,A=b.ticks,R=b.includeHidden,L=b[l];if(S[L])return S;var z=b0(t.data,{graphicalItems:i.filter(function(B){var V,X=l in B.props?B.props[l]:(V=B.type.defaultProps)===null||V===void 0?void 0:V[l];return X===L}),dataStartIndex:c,dataEndIndex:u}),D=z.length,$,N,F;Q1e(b.domain,T,y)&&($=Y2(b.domain,null,T),v&&(y==="number"||k!=="auto")&&(F=Dh(z,_,"category")));var U=EU(y);if(!$||$.length===0){var H,K=(H=b.domain)!==null&&H!==void 0?H:U;if(_){if($=Dh(z,_,y),y==="category"&&v){var W=Oae($);E&&W?(N=$,$=$y(0,D)):E||($=k4(K,$,x).reduce(function(B,V){return B.indexOf(V)>=0?B:[].concat(kd(B),[V])},[]))}else if(y==="category")E?$=$.filter(function(B){return B!==""&&!It(B)}):$=k4(K,$,x).reduce(function(B,V){return B.indexOf(V)>=0||V===""||It(V)?B:[].concat(kd(B),[V])},[]);else if(y==="number"){var I=Fme(z,i.filter(function(B){var V,X,re=l in B.props?B.props[l]:(V=B.type.defaultProps)===null||V===void 0?void 0:V[l],ie="hide"in B.props?B.props.hide:(X=B.type.defaultProps)===null||X===void 0?void 0:X.hide;return re===L&&(R||!ie)}),_,s,h);I&&($=I)}v&&(y==="number"||k!=="auto")&&(F=Dh(z,_,"category"))}else v?$=$y(0,D):a&&a[L]&&a[L].hasStack&&y==="number"?$=p==="expand"?[0,1]:wF(a[L].stackGroups,c,u):$=_F(z,i.filter(function(B){var V=l in B.props?B.props[l]:B.type.defaultProps[l],X="hide"in B.props?B.props.hide:B.type.defaultProps.hide;return V===L&&(R||!X)}),y,h,!0);if(y==="number")$=OT(f,$,L,s,A),K&&($=Y2(K,$,T));else if(y==="category"&&K){var G=K,j=$.every(function(B){return G.indexOf(B)>=0});j&&($=G)}}return Oe(Oe({},S),{},pt({},L,Oe(Oe({},b),{},{axisType:s,domain:$,categoricalDomain:F,duplicateDomain:N,originalDomain:(g=b.domain)!==null&&g!==void 0?g:U,isCategorical:v,layout:h})))},{})},Txe=function(t,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,l=n.axisIdKey,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.layout,f=t.children,p=b0(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),v=p.length,S=xF(h,s),x=-1;return r.reduce(function(g,b){var y=b.type.defaultProps!==void 0?Oe(Oe({},b.type.defaultProps),b.props):b.props,_=y[l],T=EU("number");if(!g[_]){x++;var E;return S?E=$y(0,v):a&&a[_]&&a[_].hasStack?(E=wF(a[_].stackGroups,c,u),E=OT(f,E,_,s)):(E=Y2(T,_F(p,r.filter(function(k){var A,R,L=l in k.props?k.props[l]:(A=k.type.defaultProps)===null||A===void 0?void 0:A[l],z="hide"in k.props?k.props.hide:(R=k.type.defaultProps)===null||R===void 0?void 0:R.hide;return L===_&&!z}),"number",h),i.defaultProps.allowDataOverflow),E=OT(f,E,_,s)),Oe(Oe({},g),{},pt({},_,Oe(Oe({axisType:s},i.defaultProps),{},{hide:!0,orientation:es(xxe,"".concat(s,".").concat(x%2),null),domain:E,originalDomain:T,isCategorical:S,layout:h})))}return g},{})},kxe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,l=n.graphicalItems,a=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,h=t.children,f="".concat(i,"Id"),p=ws(h,s),v={};return p&&p.length?v=Exe(t,{axes:p,graphicalItems:l,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:c,dataEndIndex:u}):l&&l.length&&(v=Txe(t,{Axis:s,graphicalItems:l,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:c,dataEndIndex:u})),v},Oxe=function(t){var n=Ra(t),r=Lo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:MO(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Py(n,r)}},h8=function(t){var n=t.children,r=t.defaultShowTooltip,i=_i(n,vd),s=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(l=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Rxe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Do(n&&n.type);return r&&r.indexOf("Bar")>=0})},p8=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Axe=function(t,n){var r=t.props,i=t.graphicalItems,s=t.xAxisMap,l=s===void 0?{}:s,a=t.yAxisMap,c=a===void 0?{}:a,u=r.width,h=r.height,f=r.children,p=r.margin||{},v=_i(f,vd),S=_i(f,Vu),x=Object.keys(c).reduce(function(E,k){var A=c[k],R=A.orientation;return!A.mirror&&!A.hide?Oe(Oe({},E),{},pt({},R,E[R]+A.width)):E},{left:p.left||0,right:p.right||0}),g=Object.keys(l).reduce(function(E,k){var A=l[k],R=A.orientation;return!A.mirror&&!A.hide?Oe(Oe({},E),{},pt({},R,es(E,"".concat(R))+A.height)):E},{top:p.top||0,bottom:p.bottom||0}),b=Oe(Oe({},g),x),y=b.bottom;v&&(b.bottom+=v.props.height||vd.defaultProps.height),S&&n&&(b=Hme(b,i,r,n));var _=u-b.left-b.right,T=h-b.top-b.bottom;return Oe(Oe({brushBottom:y},b),{},{width:Math.max(_,0),height:Math.max(T,0)})},Pxe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Mxe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,l=t.validateTooltipEventTypes,a=l===void 0?["axis"]:l,c=t.axisComponents,u=t.legendContent,h=t.formatAxisMap,f=t.defaultProps,p=function(b,y){var _=y.graphicalItems,T=y.stackGroups,E=y.offset,k=y.updateId,A=y.dataStartIndex,R=y.dataEndIndex,L=b.barSize,z=b.layout,D=b.barGap,$=b.barCategoryGap,N=b.maxBarSize,F=p8(z),U=F.numericAxisName,H=F.cateAxisName,K=Rxe(_),W=[];return _.forEach(function(I,G){var j=b0(b.data,{graphicalItems:[I],dataStartIndex:A,dataEndIndex:R}),B=I.type.defaultProps!==void 0?Oe(Oe({},I.type.defaultProps),I.props):I.props,V=B.dataKey,X=B.maxBarSize,re=B["".concat(U,"Id")],ie=B["".concat(H,"Id")],Q={},Y=c.reduce(function(_e,Pe){var me=y["".concat(Pe.axisType,"Map")],Ae=B["".concat(Pe.axisType,"Id")];me&&me[Ae]||Pe.axisType==="zAxis"||Dr(!1);var Te=me[Ae];return Oe(Oe({},_e),{},pt(pt({},Pe.axisType,Te),"".concat(Pe.axisType,"Ticks"),Lo(Te)))},Q),J=Y[H],ee=Y["".concat(H,"Ticks")],ne=T&&T[re]&&T[re].hasStack&&ege(I,T[re].stackGroups),te=Do(I.type).indexOf("Bar")>=0,le=Py(J,ee),fe=[],pe=K&&Bme({barSize:L,stackGroups:T,totalSize:Pxe(Y,H)});if(te){var de,ue,Ie=It(X)?N:X,Le=(de=(ue=Py(J,ee,!0))!==null&&ue!==void 0?ue:Ie)!==null&&de!==void 0?de:0;fe=zme({barGap:D,barCategoryGap:$,bandSize:Le!==le?Le:le,sizeList:pe[ie],maxBarSize:Ie}),Le!==le&&(fe=fe.map(function(_e){return Oe(Oe({},_e),{},{position:Oe(Oe({},_e.position),{},{offset:_e.position.offset-Le/2})})}))}var we=I&&I.type&&I.type.getComposedData;we&&W.push({props:Oe(Oe({},we(Oe(Oe({},Y),{},{displayedData:j,props:b,dataKey:V,item:I,bandSize:le,barPosition:fe,offset:E,stackedData:ne,layout:z,dataStartIndex:A,dataEndIndex:R}))),{},pt(pt(pt({key:I.key||"item-".concat(G)},U,Y[U]),H,Y[H]),"animationId",k)),childIndex:$ae(I,b.children),item:I})}),W},v=function(b,y){var _=b.props,T=b.dataStartIndex,E=b.dataEndIndex,k=b.updateId;if(!$D({props:_}))return null;var A=_.children,R=_.layout,L=_.stackOffset,z=_.data,D=_.reverseStackOrder,$=p8(R),N=$.numericAxisName,F=$.cateAxisName,U=ws(A,r),H=Qme(z,U,"".concat(N,"Id"),"".concat(F,"Id"),L,D),K=c.reduce(function(B,V){var X="".concat(V.axisType,"Map");return Oe(Oe({},B),{},pt({},X,kxe(_,Oe(Oe({},V),{},{graphicalItems:U,stackGroups:V.axisType===N&&H,dataStartIndex:T,dataEndIndex:E}))))},{}),W=Axe(Oe(Oe({},K),{},{props:_,graphicalItems:U}),y?.legendBBox);Object.keys(K).forEach(function(B){K[B]=h(_,K[B],W,B.replace("Map",""),n)});var I=K["".concat(F,"Map")],G=Oxe(I),j=p(_,Oe(Oe({},K),{},{dataStartIndex:T,dataEndIndex:E,updateId:k,graphicalItems:U,stackGroups:H,offset:W}));return Oe(Oe({formattedGraphicalItems:j,graphicalItems:U,offset:W,stackGroups:H},G),K)},S=(function(g){function b(y){var _,T,E;return uxe(this,b),E=hxe(this,b,[y]),pt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pt(E,"accessibilityManager",new X1e),pt(E,"handleLegendBBoxUpdate",function(k){if(k){var A=E.state,R=A.dataStartIndex,L=A.dataEndIndex,z=A.updateId;E.setState(Oe({legendBBox:k},v({props:E.props,dataStartIndex:R,dataEndIndex:L,updateId:z},Oe(Oe({},E.state),{},{legendBBox:k}))))}}),pt(E,"handleReceiveSyncEvent",function(k,A,R){if(E.props.syncId===k){if(R===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(A)}}),pt(E,"handleBrushChange",function(k){var A=k.startIndex,R=k.endIndex;if(A!==E.state.dataStartIndex||R!==E.state.dataEndIndex){var L=E.state.updateId;E.setState(function(){return Oe({dataStartIndex:A,dataEndIndex:R},v({props:E.props,dataStartIndex:A,dataEndIndex:R,updateId:L},E.state))}),E.triggerSyncEvent({dataStartIndex:A,dataEndIndex:R})}}),pt(E,"handleMouseEnter",function(k){var A=E.getMouseInfo(k);if(A){var R=Oe(Oe({},A),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var L=E.props.onMouseEnter;Ct(L)&&L(R,k)}}),pt(E,"triggeredAfterMouseMove",function(k){var A=E.getMouseInfo(k),R=A?Oe(Oe({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(R),E.triggerSyncEvent(R);var L=E.props.onMouseMove;Ct(L)&&L(R,k)}),pt(E,"handleItemMouseEnter",function(k){E.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),pt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),pt(E,"handleMouseMove",function(k){k.persist(),E.throttleTriggeredAfterMouseMove(k)}),pt(E,"handleMouseLeave",function(k){E.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};E.setState(A),E.triggerSyncEvent(A);var R=E.props.onMouseLeave;Ct(R)&&R(A,k)}),pt(E,"handleOuterEvent",function(k){var A=Hae(k),R=es(E.props,"".concat(A));if(A&&Ct(R)){var L,z;/.*touch.*/i.test(A)?z=E.getMouseInfo(k.changedTouches[0]):z=E.getMouseInfo(k),R((L=z)!==null&&L!==void 0?L:{},k)}}),pt(E,"handleClick",function(k){var A=E.getMouseInfo(k);if(A){var R=Oe(Oe({},A),{},{isTooltipActive:!0});E.setState(R),E.triggerSyncEvent(R);var L=E.props.onClick;Ct(L)&&L(R,k)}}),pt(E,"handleMouseDown",function(k){var A=E.props.onMouseDown;if(Ct(A)){var R=E.getMouseInfo(k);A(R,k)}}),pt(E,"handleMouseUp",function(k){var A=E.props.onMouseUp;if(Ct(A)){var R=E.getMouseInfo(k);A(R,k)}}),pt(E,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),pt(E,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.handleMouseDown(k.changedTouches[0])}),pt(E,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.handleMouseUp(k.changedTouches[0])}),pt(E,"handleDoubleClick",function(k){var A=E.props.onDoubleClick;if(Ct(A)){var R=E.getMouseInfo(k);A(R,k)}}),pt(E,"handleContextMenu",function(k){var A=E.props.onContextMenu;if(Ct(A)){var R=E.getMouseInfo(k);A(R,k)}}),pt(E,"triggerSyncEvent",function(k){E.props.syncId!==void 0&&bE.emit(_E,E.props.syncId,k,E.eventEmitterSymbol)}),pt(E,"applySyncEvent",function(k){var A=E.props,R=A.layout,L=A.syncMethod,z=E.state.updateId,D=k.dataStartIndex,$=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)E.setState(Oe({dataStartIndex:D,dataEndIndex:$},v({props:E.props,dataStartIndex:D,dataEndIndex:$,updateId:z},E.state)));else if(k.activeTooltipIndex!==void 0){var N=k.chartX,F=k.chartY,U=k.activeTooltipIndex,H=E.state,K=H.offset,W=H.tooltipTicks;if(!K)return;if(typeof L=="function")U=L(W,k);else if(L==="value"){U=-1;for(var I=0;I<W.length;I++)if(W[I].value===k.activeLabel){U=I;break}}var G=Oe(Oe({},K),{},{x:K.left,y:K.top}),j=Math.min(N,G.x+G.width),B=Math.min(F,G.y+G.height),V=W[U]&&W[U].value,X=PT(E.state,E.props.data,U),re=W[U]?{x:R==="horizontal"?W[U].coordinate:j,y:R==="horizontal"?B:W[U].coordinate}:CU;E.setState(Oe(Oe({},k),{},{activeLabel:V,activeCoordinate:re,activePayload:X,activeTooltipIndex:U}))}else E.setState(k)}),pt(E,"renderCursor",function(k){var A,R=E.state,L=R.isTooltipActive,z=R.activeCoordinate,D=R.activePayload,$=R.offset,N=R.activeTooltipIndex,F=R.tooltipAxisBandSize,U=E.getTooltipEventType(),H=(A=k.props.active)!==null&&A!==void 0?A:L,K=E.props.layout,W=k.key||"_recharts-cursor";return oe.createElement(rxe,{key:W,activeCoordinate:z,activePayload:D,activeTooltipIndex:N,chartName:n,element:k,isActive:H,layout:K,offset:$,tooltipAxisBandSize:F,tooltipEventType:U})}),pt(E,"renderPolarAxis",function(k,A,R){var L=es(k,"type.axisType"),z=es(E.state,"".concat(L,"Map")),D=k.type.defaultProps,$=D!==void 0?Oe(Oe({},D),k.props):k.props,N=z&&z[$["".concat(L,"Id")]];return O.cloneElement(k,Oe(Oe({},N),{},{className:Bt(L,N.className),key:k.key||"".concat(A,"-").concat(R),ticks:Lo(N,!0)}))}),pt(E,"renderPolarGrid",function(k){var A=k.props,R=A.radialLines,L=A.polarAngles,z=A.polarRadius,D=E.state,$=D.radiusAxisMap,N=D.angleAxisMap,F=Ra($),U=Ra(N),H=U.cx,K=U.cy,W=U.innerRadius,I=U.outerRadius;return O.cloneElement(k,{polarAngles:Array.isArray(L)?L:Lo(U,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(z)?z:Lo(F,!0).map(function(G){return G.coordinate}),cx:H,cy:K,innerRadius:W,outerRadius:I,key:k.key||"polar-grid",radialLines:R})}),pt(E,"renderLegend",function(){var k=E.state.formattedGraphicalItems,A=E.props,R=A.children,L=A.width,z=A.height,D=E.props.margin||{},$=L-(D.left||0)-(D.right||0),N=yF({children:R,formattedGraphicalItems:k,legendWidth:$,legendContent:u});if(!N)return null;var F=N.item,U=u8(N,ixe);return O.cloneElement(F,Oe(Oe({},U),{},{chartWidth:L,chartHeight:z,margin:D,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),pt(E,"renderTooltip",function(){var k,A=E.props,R=A.children,L=A.accessibilityLayer,z=_i(R,zs);if(!z)return null;var D=E.state,$=D.isTooltipActive,N=D.activeCoordinate,F=D.activePayload,U=D.activeLabel,H=D.offset,K=(k=z.props.active)!==null&&k!==void 0?k:$;return O.cloneElement(z,{viewBox:Oe(Oe({},H),{},{x:H.left,y:H.top}),active:K,label:U,payload:K?F:[],coordinate:N,accessibilityLayer:L})}),pt(E,"renderBrush",function(k){var A=E.props,R=A.margin,L=A.data,z=E.state,D=z.offset,$=z.dataStartIndex,N=z.dataEndIndex,F=z.updateId;return O.cloneElement(k,{key:k.key||"_recharts-brush",onChange:av(E.handleBrushChange,k.props.onChange),data:L,x:$e(k.props.x)?k.props.x:D.left,y:$e(k.props.y)?k.props.y:D.top+D.height+D.brushBottom-(R.bottom||0),width:$e(k.props.width)?k.props.width:D.width,startIndex:$,endIndex:N,updateId:"brush-".concat(F)})}),pt(E,"renderReferenceElement",function(k,A,R){if(!k)return null;var L=E,z=L.clipPathId,D=E.state,$=D.xAxisMap,N=D.yAxisMap,F=D.offset,U=k.type.defaultProps||{},H=k.props,K=H.xAxisId,W=K===void 0?U.xAxisId:K,I=H.yAxisId,G=I===void 0?U.yAxisId:I;return O.cloneElement(k,{key:k.key||"".concat(A,"-").concat(R),xAxis:$[W],yAxis:N[G],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:z})}),pt(E,"renderActivePoints",function(k){var A=k.item,R=k.activePoint,L=k.basePoint,z=k.childIndex,D=k.isRange,$=[],N=A.props.key,F=A.item.type.defaultProps!==void 0?Oe(Oe({},A.item.type.defaultProps),A.item.props):A.item.props,U=F.activeDot,H=F.dataKey,K=Oe(Oe({index:z,dataKey:H,cx:R.x,cy:R.y,r:4,fill:iR(A.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},Mt(U,!1)),sy(U));return $.push(b.renderActiveDot(U,K,"".concat(N,"-activePoint-").concat(z))),L?$.push(b.renderActiveDot(U,Oe(Oe({},K),{},{cx:L.x,cy:L.y}),"".concat(N,"-basePoint-").concat(z))):D&&$.push(null),$}),pt(E,"renderGraphicChild",function(k,A,R){var L=E.filterFormatItem(k,A,R);if(!L)return null;var z=E.getTooltipEventType(),D=E.state,$=D.isTooltipActive,N=D.tooltipAxis,F=D.activeTooltipIndex,U=D.activeLabel,H=E.props.children,K=_i(H,zs),W=L.props,I=W.points,G=W.isRange,j=W.baseLine,B=L.item.type.defaultProps!==void 0?Oe(Oe({},L.item.type.defaultProps),L.item.props):L.item.props,V=B.activeDot,X=B.hide,re=B.activeBar,ie=B.activeShape,Q=!!(!X&&$&&K&&(V||re||ie)),Y={};z!=="axis"&&K&&K.props.trigger==="click"?Y={onClick:av(E.handleItemMouseEnter,k.props.onClick)}:z!=="axis"&&(Y={onMouseLeave:av(E.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:av(E.handleItemMouseEnter,k.props.onMouseEnter)});var J=O.cloneElement(k,Oe(Oe({},L.props),Y));function ee(Pe){return typeof N.dataKey=="function"?N.dataKey(Pe.payload):null}if(Q)if(F>=0){var ne,te;if(N.dataKey&&!N.allowDuplicatedCategory){var le=typeof N.dataKey=="function"?ee:"payload.".concat(N.dataKey.toString());ne=iy(I,le,U),te=G&&j&&iy(j,le,U)}else ne=I?.[F],te=G&&j&&j[F];if(ie||re){var fe=k.props.activeIndex!==void 0?k.props.activeIndex:F;return[O.cloneElement(k,Oe(Oe(Oe({},L.props),Y),{},{activeIndex:fe})),null,null]}if(!It(ne))return[J].concat(kd(E.renderActivePoints({item:L,activePoint:ne,basePoint:te,childIndex:F,isRange:G})))}else{var pe,de=(pe=E.getItemByXY(E.state.activeCoordinate))!==null&&pe!==void 0?pe:{graphicalItem:J},ue=de.graphicalItem,Ie=ue.item,Le=Ie===void 0?k:Ie,we=ue.childIndex,_e=Oe(Oe(Oe({},L.props),Y),{},{activeIndex:we});return[O.cloneElement(Le,_e),null,null]}return G?[J,null,null]:[J,null]}),pt(E,"renderCustomized",function(k,A,R){return O.cloneElement(k,Oe(Oe({key:"recharts-customized-".concat(R)},E.props),E.state))}),pt(E,"renderMap",{CartesianGrid:{handler:fv,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:fv},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:fv},YAxis:{handler:fv},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((_=y.id)!==null&&_!==void 0?_:sm("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=v$(E.triggeredAfterMouseMove,(T=y.throttleDelay)!==null&&T!==void 0?T:1e3/60),E.state={},E}return gxe(b,g),fxe(b,[{key:"componentDidMount",value:function(){var _,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,T=_.children,E=_.data,k=_.height,A=_.layout,R=_i(T,zs);if(R){var L=R.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,D=PT(this.state,E,L,z),$=this.state.tooltipTicks[L].coordinate,N=(this.state.offset.top+k)/2,F=A==="horizontal",U=F?{x:$,y:N}:{y:$,x:N},H=this.state.formattedGraphicalItems.find(function(W){var I=W.item;return I.type.name==="Scatter"});H&&(U=Oe(Oe({},U),H.props.points[L].tooltipPosition),D=H.props.points[L].tooltipPayload);var K={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:z,activePayload:D,activeCoordinate:U};this.setState(K),this.renderCursor(R),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var E,k;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(_){v2([_i(_.children,zs)],[_i(this.props.children,zs)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=_i(this.props.children,zs);if(_&&typeof _.props.shared=="boolean"){var T=_.props.shared?"axis":"item";return a.indexOf(T)>=0?T:s}return s}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var T=this.container,E=T.getBoundingClientRect(),k=Ode(E),A={chartX:Math.round(_.pageX-k.left),chartY:Math.round(_.pageY-k.top)},R=E.width/T.offsetWidth||1,L=this.inRange(A.chartX,A.chartY,R);if(!L)return null;var z=this.state,D=z.xAxisMap,$=z.yAxisMap,N=this.getTooltipEventType(),F=f8(this.state,this.props.data,this.props.layout,L);if(N!=="axis"&&D&&$){var U=Ra(D).scale,H=Ra($).scale,K=U&&U.invert?U.invert(A.chartX):null,W=H&&H.invert?H.invert(A.chartY):null;return Oe(Oe({},A),{},{xValue:K,yValue:W},F)}return F?Oe(Oe({},A),F):null}},{key:"inRange",value:function(_,T){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,A=_/E,R=T/E;if(k==="horizontal"||k==="vertical"){var L=this.state.offset,z=A>=L.left&&A<=L.left+L.width&&R>=L.top&&R<=L.top+L.height;return z?{x:A,y:R}:null}var D=this.state,$=D.angleAxisMap,N=D.radiusAxisMap;if($&&N){var F=Ra($);return A4({x:A,y:R},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,T=this.getTooltipEventType(),E=_i(_,zs),k={};E&&T==="axis"&&(E.props.trigger==="click"?k={onClick:this.handleClick}:k={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=sy(this.props,this.handleOuterEvent);return Oe(Oe({},A),k)}},{key:"addListener",value:function(){bE.on(_E,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bE.removeListener(_E,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,T,E){for(var k=this.state.formattedGraphicalItems,A=0,R=k.length;A<R;A++){var L=k[A];if(L.item===_||L.props.key===_.key||T===Do(L.item.type)&&E===L.childIndex)return L}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,T=this.state.offset,E=T.left,k=T.top,A=T.height,R=T.width;return oe.createElement("defs",null,oe.createElement("clipPath",{id:_},oe.createElement("rect",{x:E,y:k,height:A,width:R})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(T,E){var k=c8(E,2),A=k[0],R=k[1];return Oe(Oe({},T),{},pt({},A,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(T,E){var k=c8(E,2),A=k[0],R=k[1];return Oe(Oe({},T),{},pt({},A,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(_){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[_])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(_){var T=this.state,E=T.formattedGraphicalItems,k=T.activeItem;if(E&&E.length)for(var A=0,R=E.length;A<R;A++){var L=E[A],z=L.props,D=L.item,$=D.type.defaultProps!==void 0?Oe(Oe({},D.type.defaultProps),D.props):D.props,N=Do(D.type);if(N==="Bar"){var F=(z.data||[]).find(function(W){return Kye(_,W)});if(F)return{graphicalItem:L,payload:F}}else if(N==="RadialBar"){var U=(z.data||[]).find(function(W){return A4(_,W)});if(U)return{graphicalItem:L,payload:U}}else if(f0(L,k)||h0(L,k)||kp(L,k)){var H=Bbe({graphicalItem:L,activeTooltipItem:k,itemData:$.data}),K=$.activeIndex===void 0?H:$.activeIndex;return{graphicalItem:Oe(Oe({},L),{},{childIndex:K}),payload:kp(L,k)?$.data[H]:L.props.data[H]}}}return null}},{key:"render",value:function(){var _=this;if(!$D(this))return null;var T=this.props,E=T.children,k=T.className,A=T.width,R=T.height,L=T.style,z=T.compact,D=T.title,$=T.desc,N=u8(T,sxe),F=Mt(N,!1);if(z)return oe.createElement(q6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},oe.createElement(b2,Du({},F,{width:A,height:R,title:D,desc:$}),this.renderClipPath(),UD(E,this.renderMap)));if(this.props.accessibilityLayer){var U,H;F.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,F.role=(H=this.props.role)!==null&&H!==void 0?H:"application",F.onKeyDown=function(W){_.accessibilityManager.keyboardEvent(W)},F.onFocus=function(){_.accessibilityManager.focus()}}var K=this.parseEventsOfWrapper();return oe.createElement(q6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},oe.createElement("div",Du({className:Bt("recharts-wrapper",k),style:Oe({position:"relative",cursor:"default",width:A,height:R},L)},K,{ref:function(I){_.container=I}}),oe.createElement(b2,Du({},F,{width:A,height:R,title:D,desc:$,style:Sxe}),this.renderClipPath(),UD(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(O.Component);pt(S,"displayName",n),pt(S,"defaultProps",Oe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),pt(S,"getDerivedStateFromProps",function(g,b){var y=g.dataKey,_=g.data,T=g.children,E=g.width,k=g.height,A=g.layout,R=g.stackOffset,L=g.margin,z=b.dataStartIndex,D=b.dataEndIndex;if(b.updateId===void 0){var $=h8(g);return Oe(Oe(Oe({},$),{},{updateId:0},v(Oe(Oe({props:g},$),{},{updateId:0}),b)),{},{prevDataKey:y,prevData:_,prevWidth:E,prevHeight:k,prevLayout:A,prevStackOffset:R,prevMargin:L,prevChildren:T})}if(y!==b.prevDataKey||_!==b.prevData||E!==b.prevWidth||k!==b.prevHeight||A!==b.prevLayout||R!==b.prevStackOffset||!Uu(L,b.prevMargin)){var N=h8(g),F={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},U=Oe(Oe({},f8(b,_,A)),{},{updateId:b.updateId+1}),H=Oe(Oe(Oe({},N),F),U);return Oe(Oe(Oe({},H),v(Oe({props:g},H),b)),{},{prevDataKey:y,prevData:_,prevWidth:E,prevHeight:k,prevLayout:A,prevStackOffset:R,prevMargin:L,prevChildren:T})}if(!v2(T,b.prevChildren)){var K,W,I,G,j=_i(T,vd),B=j&&(K=(W=j.props)===null||W===void 0?void 0:W.startIndex)!==null&&K!==void 0?K:z,V=j&&(I=(G=j.props)===null||G===void 0?void 0:G.endIndex)!==null&&I!==void 0?I:D,X=B!==z||V!==D,re=!It(_),ie=re&&!X?b.updateId:b.updateId+1;return Oe(Oe({updateId:ie},v(Oe(Oe({props:g},b),{},{updateId:ie,dataStartIndex:B,dataEndIndex:V}),b)),{},{prevChildren:T,dataStartIndex:B,dataEndIndex:V})}return null}),pt(S,"renderActiveDot",function(g,b,y){var _;return O.isValidElement(g)?_=O.cloneElement(g,b):Ct(g)?_=g(b):_=oe.createElement(oR,b),oe.createElement(Cn,{className:"recharts-active-dot",key:y},_)});var x=O.forwardRef(function(b,y){return oe.createElement(S,Du({},b,{ref:y}))});return x.displayName=S.displayName,x},m8=Mxe({chartName:"AreaChart",GraphicalChild:Vo,axisComponents:[{axisType:"xAxis",AxisComp:Mp},{axisType:"yAxis",AxisComp:Lp}],formatAxisMap:j0e});const Lxe={light:"",dark:".dark"},TU=O.createContext(null);function jxe(){const e=O.useContext(TU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function g8({id:e,className:t,children:n,config:r,...i}){const s=O.useId(),l=`chart-${e||s.replace(/:/g,"")}`;return w.jsx(TU.Provider,{value:{config:r},children:w.jsxs("div",{"data-slot":"chart","data-chart":l,className:Be("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",t),...i,children:[w.jsx(Dxe,{id:l,config:r}),w.jsx(xde,{children:n})]})})}const Dxe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?w.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Lxe).map(([r,i])=>`
|
|
99
|
+
${i} [data-chart=${e}] {
|
|
100
|
+
${n.map(([s,l])=>{const a=l.theme?.[r]||l.color;return a?` --color-${s}: ${a};`:null}).join(`
|
|
101
|
+
`)}
|
|
102
|
+
}
|
|
103
|
+
`).join(`
|
|
104
|
+
`)}}):null},v8=zs;function y8({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:s=!1,label:l,labelFormatter:a,labelClassName:c,formatter:u,color:h,nameKey:f,labelKey:p}){const{config:v}=jxe(),S=O.useMemo(()=>{if(i||!t?.length)return null;const[g]=t,b=`${p||g?.dataKey||g?.name||"value"}`,y=b8(v,g,b),_=!p&&typeof l=="string"?v[l]?.label||l:y?.label;return a?w.jsx("div",{className:Be("font-medium",c),children:a(_,t)}):_?w.jsx("div",{className:Be("font-medium",c),children:_}):null},[l,a,t,i,c,v,p]);if(!e||!t?.length)return null;const x=t.length===1&&r!=="dot";return w.jsxs("div",{className:Be("border-border/50 bg-background gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs/relaxed shadow-xl grid min-w-[8rem] items-start",n),children:[x?null:S,w.jsx("div",{className:"grid gap-1.5",children:t.filter(g=>g.type!=="none").map((g,b)=>{const y=`${f||g.name||g.dataKey||"value"}`,_=b8(v,g,y),T=h||g.payload.fill||g.color;return w.jsx("div",{className:Be("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",r==="dot"&&"items-center"),children:u&&g?.value!==void 0&&g.name?u(g.value,g.name,g,b,g.payload):w.jsxs(w.Fragment,{children:[_?.icon?w.jsx(_.icon,{}):!s&&w.jsx("div",{className:Be("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":x&&r==="dashed"}),style:{"--color-bg":T,"--color-border":T}}),w.jsxs("div",{className:Be("flex flex-1 justify-between leading-none",x?"items-end":"items-center"),children:[w.jsxs("div",{className:"grid gap-1.5",children:[x?S:null,w.jsx("span",{className:"text-muted-foreground",children:_?.label||g.name})]}),g.value&&w.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:g.value.toLocaleString()})]})]})},g.dataKey)})})]})}function b8(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}const tb="";function Ixe(e="vibora"){return ar({queryKey:["monitoring","claude-instances",e],queryFn:()=>Qt(`${tb}/api/monitoring/claude-instances?filter=${e}`),refetchInterval:5e3})}function Nxe(e="1h"){return ar({queryKey:["monitoring","system-metrics",e],queryFn:()=>Qt(`${tb}/api/monitoring/system-metrics?window=${e}`),refetchInterval:5e3})}function Bxe(){const e=hr();return Kn({mutationFn:({terminalId:t,pid:n})=>{if(t)return Qt(`${tb}/api/monitoring/claude-instances/${t}/kill`,{method:"POST"});if(n)return Qt(`${tb}/api/monitoring/claude-instances/${n}/kill-pid`,{method:"POST"});throw new Error("Either terminalId or pid must be provided")},onSuccess:()=>{e.invalidateQueries({queryKey:["monitoring","claude-instances"]})}})}function hv(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function zxe(e){return{"1m":"1 min","10m":"10 min","1h":"1 hour","3h":"3 hours","6h":"6 hours","12h":"12 hours","24h":"24 hours"}[e]}const Hxe=ts("/monitoring/")({component:Vxe}),$xe=["1m","10m","1h","3h","6h","12h","24h"],_8={cpu:{label:"CPU",color:"#22c55e"},memory:{label:"Memory",color:"#3b82f6"},disk:{label:"Disk",color:"#f59e0b"}};function Fxe(){const[e,t]=O.useState("vibora"),{data:n,isLoading:r,error:i}=Ixe(e),s=Bxe(),l=n?.reduce((c,u)=>c+u.ramMB,0)||0,a=c=>{c.isViboraManaged&&c.terminalId?s.mutate({terminalId:c.terminalId}):s.mutate({pid:c.pid})};return w.jsxs("div",{className:"space-y-4",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs(cc,{value:e,onValueChange:c=>t(c),children:[w.jsx(dc,{className:"w-40",children:w.jsx(uc,{})}),w.jsxs(fc,{children:[w.jsx(Rr,{value:"vibora",children:"Vibora only"}),w.jsx(Rr,{value:"all",children:"All instances"})]})]}),n&&w.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.length," instance",n.length!==1?"s":""," running",l>0&&` · ${l.toFixed(0)} MB total`]})]}),r&&w.jsx("div",{className:"flex items-center justify-center py-12",children:w.jsx(be,{icon:Fr,className:"size-6 animate-spin text-muted-foreground"})}),i&&w.jsxs("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",children:["Failed to load Claude instances: ",i.message]}),n&&n.length===0&&w.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:["No Claude instances running",e==="vibora"&&" in Vibora terminals"]}),n&&n.length>0&&w.jsxs("div",{className:"space-y-2",children:[e==="vibora"?w.jsxs("div",{className:"grid grid-cols-[1fr_1fr_80px_80px] gap-4 px-3 py-2 text-xs font-medium text-muted-foreground",children:[w.jsx("span",{children:"Terminal"}),w.jsx("span",{children:"Task"}),w.jsx("span",{className:"text-right",children:"RAM"}),w.jsx("span",{className:"text-right",children:"Actions"})]}):w.jsxs("div",{className:"grid grid-cols-[60px_1fr_80px_120px_80px] gap-4 px-3 py-2 text-xs font-medium text-muted-foreground",children:[w.jsx("span",{children:"PID"}),w.jsx("span",{children:"Working Directory"}),w.jsx("span",{className:"text-right",children:"RAM"}),w.jsx("span",{children:"Source"}),w.jsx("span",{className:"text-right",children:"Actions"})]}),n.map(c=>w.jsx(jo,{className:"px-3 py-2",children:e==="vibora"?w.jsxs("div",{className:"grid grid-cols-[1fr_1fr_80px_80px] items-center gap-4",children:[w.jsx("span",{className:"font-medium truncate",children:c.terminalName||`Terminal ${c.terminalId?.slice(0,8)}`}),w.jsx("span",{className:"text-muted-foreground truncate",children:c.taskId?w.jsx(er,{to:"/tasks/$taskId",params:{taskId:c.taskId},className:"hover:text-foreground hover:underline",children:c.taskTitle}):"(no task)"}),w.jsxs("span",{className:"text-right tabular-nums",children:[c.ramMB.toFixed(0)," MB"]}),w.jsx("div",{className:"flex justify-end",children:w.jsxs(ze,{variant:"ghost",size:"xs",onClick:()=>a(c),disabled:s.isPending,className:"text-destructive hover:text-destructive hover:bg-destructive/10",children:[w.jsx(be,{icon:Cs,className:"size-3.5"}),"Kill"]})})]}):w.jsxs("div",{className:"grid grid-cols-[60px_1fr_80px_120px_80px] items-center gap-4",children:[w.jsx("span",{className:"font-mono text-xs",children:c.pid}),w.jsx("span",{className:"text-muted-foreground truncate",title:c.cwd,children:c.cwd}),w.jsxs("span",{className:"text-right tabular-nums",children:[c.ramMB.toFixed(0)," MB"]}),w.jsx("span",{className:"text-xs",children:c.isViboraManaged?w.jsxs("span",{className:"text-blue-500",children:["Vibora: ",c.terminalName]}):w.jsx("span",{className:"text-muted-foreground",children:"External"})}),w.jsx("div",{className:"flex justify-end",children:w.jsxs(ze,{variant:"ghost",size:"xs",onClick:()=>a(c),disabled:s.isPending,className:"text-destructive hover:text-destructive hover:bg-destructive/10",children:[w.jsx(be,{icon:Cs,className:"size-3.5"}),"Kill"]})})]})},c.pid))]})]})}function Uxe(){const[e,t]=O.useState("1h"),{data:n,isLoading:r,error:i}=Nxe(e),s=n?.dataPoints.map(l=>({time:new Date(l.timestamp*1e3).toLocaleTimeString(),timestamp:l.timestamp,cpu:Math.round(l.cpuPercent*10)/10,memory:Math.round(l.memoryUsedPercent*10)/10}))||[];return w.jsxs("div",{className:"space-y-6",children:[w.jsx("div",{className:"flex gap-1",children:$xe.map(l=>w.jsx(ze,{variant:e===l?"secondary":"ghost",size:"xs",onClick:()=>t(l),children:zxe(l)},l))}),r&&w.jsx("div",{className:"flex items-center justify-center py-12",children:w.jsx(be,{icon:Fr,className:"size-6 animate-spin text-muted-foreground"})}),i&&w.jsxs("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",children:["Failed to load system metrics: ",i.message]}),n&&w.jsxs("div",{className:"space-y-6",children:[w.jsxs(jo,{className:"p-4",children:[w.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[w.jsx("h3",{className:"font-medium",children:"CPU Usage"}),w.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums",children:[n.current.cpu.toFixed(1),"%"]})]}),w.jsx(g8,{config:_8,className:"h-[150px] w-full",children:w.jsxs(m8,{data:s,margin:{left:0,right:0},children:[w.jsx(xT,{strokeDasharray:"3 3",vertical:!1}),w.jsx(Mp,{dataKey:"time",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:40}),w.jsx(Lp,{domain:[0,100],tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:l=>`${l}%`}),w.jsx(v8,{content:w.jsx(y8,{hideLabel:!0,formatter:l=>[`${l}%`,"CPU"]})}),w.jsx(Vo,{type:"monotone",dataKey:"cpu",stroke:"var(--color-cpu)",fill:"var(--color-cpu)",fillOpacity:.4,strokeWidth:2})]})})]}),w.jsxs(jo,{className:"p-4",children:[w.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[w.jsx("h3",{className:"font-medium",children:"Memory Usage"}),w.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums",children:[n.current.memory.usedPercent.toFixed(1),"% (",hv(n.current.memory.used)," ","/ ",hv(n.current.memory.total),")"]})]}),w.jsx(g8,{config:_8,className:"h-[150px] w-full",children:w.jsxs(m8,{data:s,margin:{left:0,right:0},children:[w.jsx(xT,{strokeDasharray:"3 3",vertical:!1}),w.jsx(Mp,{dataKey:"time",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:40}),w.jsx(Lp,{domain:[0,100],tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:l=>`${l}%`}),w.jsx(v8,{content:w.jsx(y8,{hideLabel:!0,formatter:l=>[`${l}%`,"Memory"]})}),w.jsx(Vo,{type:"monotone",dataKey:"memory",stroke:"var(--color-memory)",fill:"var(--color-memory)",fillOpacity:.4,strokeWidth:2})]})})]}),w.jsxs(jo,{className:"p-4",children:[w.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[w.jsxs("h3",{className:"font-medium",children:["Disk Usage (",n.current.disk.path,")"]}),w.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums",children:[n.current.disk.usedPercent.toFixed(1),"% (",hv(n.current.disk.used)," /"," ",hv(n.current.disk.total),")"]})]}),w.jsx("div",{className:"h-4 w-full overflow-hidden rounded-full bg-muted",children:w.jsx("div",{className:"h-full bg-amber-500 transition-all",style:{width:`${Math.min(n.current.disk.usedPercent,100)}%`}})})]})]})]})}function Vxe(){return w.jsxs("div",{className:"flex h-full flex-col overflow-hidden p-4",children:[w.jsx("h1",{className:"mb-4 text-lg font-semibold",children:"Monitoring"}),w.jsxs(qa,{defaultValue:"claude",className:"flex-1 flex flex-col min-h-0",children:[w.jsxs(Wa,{children:[w.jsx(Sr,{value:"claude",children:"Claude Instances"}),w.jsx(Sr,{value:"system",children:"System Metrics"})]}),w.jsx(Ar,{value:"claude",className:"flex-1 overflow-auto pt-4",children:w.jsx(Fxe,{})}),w.jsx(Ar,{value:"system",className:"flex-1 overflow-auto pt-4",children:w.jsx(Uxe,{})})]})]})}const qxe=()=>`http://${window.location.hostname}:3000`,yh={activeTab:"diff",browserUrl:qxe(),diffOptions:{wrap:!0,ignoreWhitespace:!0,includeUntracked:!1,collapsedFiles:[]},filesViewState:{selectedFile:null,expandedDirs:[]}};function _0(e){const t=hr(),n=O.useRef(void 0),r=O.useRef({}),{data:i}=mz(e),s=O.useMemo(()=>{const p=i?.viewState;return p?{activeTab:p.activeTab??yh.activeTab,browserUrl:p.browserUrl??yh.browserUrl,diffOptions:{...yh.diffOptions,...p.diffOptions},filesViewState:{...yh.filesViewState,...p.filesViewState}}:yh},[i?.viewState]),l=Kn({mutationFn:async p=>{const v=await fetch(`/api/tasks/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({viewState:p})});if(!v.ok)throw new Error("Failed to update view state");return v.json()},onSuccess:p=>{t.setQueryData(["tasks",e],p),t.setQueryData(["tasks"],v=>v&&v.map(S=>S.id===e?p:S))}}),a=O.useCallback(p=>{const v=r.current;r.current={...v,...p,diffOptions:p.diffOptions||v.diffOptions?{...v.diffOptions,...p.diffOptions}:void 0,filesViewState:p.filesViewState||v.filesViewState?{...v.filesViewState,...p.filesViewState}:void 0};const S=r.current,x={activeTab:S.activeTab??s.activeTab,browserUrl:S.browserUrl??s.browserUrl,diffOptions:{...s.diffOptions,...S.diffOptions},filesViewState:{...s.filesViewState,...S.filesViewState}};t.setQueryData(["tasks",e],g=>g&&{...g,viewState:x}),t.setQueryData(["tasks"],g=>g&&g.map(b=>b.id===e?{...b,viewState:x}:b)),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{l.mutate(x),r.current={}},500)},[t,e,s,l]),c=O.useCallback(p=>{a({activeTab:p})},[a]),u=O.useCallback(p=>{a({browserUrl:p})},[a]),h=O.useCallback(p=>{a({diffOptions:p})},[a]),f=O.useCallback(p=>{a({filesViewState:p})},[a]);return{viewState:s,setActiveTab:c,setBrowserUrl:u,setDiffOptions:h,setFilesViewState:f}}function Wxe(e){const{viewState:t,setActiveTab:n}=_0(e);return{tab:t.activeTab,setTab:n}}function Gxe(e){return ar({queryKey:["linear-ticket",e],queryFn:async()=>{if(!e)return null;const t=await fetch(`/api/linear/ticket/${e}`);return t.ok?t.json():null},enabled:!!e,staleTime:300*1e3})}function x8({taskName:e,cwd:t,className:n,aiMode:r,description:i,startupScript:s}){const l=O.useRef(null),a=O.useRef(null),c=O.useRef(null),u=O.useRef(!1),h=O.useRef(!1),[f,p]=O.useState(null),[v,S]=O.useState(!1),{data:x}=vz(),{setTerminalFocused:g}=nO(),{terminals:b,terminalsLoaded:y,connected:_,newTerminalIds:T,createTerminal:E,attachXterm:k,resizeTerminal:A,setupImagePaste:R,writeToTerminal:L}=cO(),z=f?b.find(F=>F.id===f):null,D=z?.status;O.useEffect(()=>{if(!l.current||a.current)return;const F=new Fz.Terminal({cursorBlink:!0,fontSize:13,fontFamily:"JetBrains Mono Variable, Menlo, Monaco, monospace",lineHeight:1.2,theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#e4e4e7",cursorAccent:"#0a0a0a",selectionBackground:"#3f3f46",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"}}),U=new Uz.FitAddon,H=new Vz.WebLinksAddon;F.loadAddon(U),F.loadAddon(H),F.open(l.current),a.current=F,c.current=U,requestAnimationFrame(()=>{U.fit(),S(!0)});const K=setTimeout(()=>{U.fit(),F.refresh(0,F.rows-1)},100),W=()=>g(!0),I=()=>g(!1);return F.textarea&&(F.textarea.addEventListener("focus",W),F.textarea.addEventListener("blur",I)),()=>{clearTimeout(K),F.textarea&&(F.textarea.removeEventListener("focus",W),F.textarea.removeEventListener("blur",I)),g(!1),F.dispose(),a.current=null,c.current=null,S(!1)}},[g]);const $=O.useCallback(()=>{if(!c.current||!a.current)return;c.current.fit();const{cols:F,rows:U}=a.current;f&&A(f,F,U)},[f,A]);O.useEffect(()=>{if(!l.current)return;const F=()=>{requestAnimationFrame($)};window.addEventListener("resize",F);const U=()=>{document.visibilityState==="visible"&&requestAnimationFrame(()=>{$(),a.current&&a.current.refresh(0,a.current.rows-1)})};document.addEventListener("visibilitychange",U);const H=new ResizeObserver(F);H.observe(l.current);const K=new IntersectionObserver(W=>{W[0]?.isIntersecting&&requestAnimationFrame(()=>{$(),a.current&&a.current.refresh(0,a.current.rows-1)})},{threshold:.1});return K.observe(l.current),()=>{window.removeEventListener("resize",F),document.removeEventListener("visibilitychange",U),H.disconnect(),K.disconnect()}},[$]),O.useEffect(()=>{if(!_||!t||!v||!y)return;const F=b.find(U=>U.cwd===t);if(F){p(F.id);return}if(!u.current&&a.current){u.current=!0;const{cols:U,rows:H}=a.current;E({name:e,cols:U,rows:H,cwd:t})}},[_,t,v,y,b,e,E]),O.useEffect(()=>{if(!t||f)return;const F=b.find(U=>U.cwd===t);F&&p(F.id)},[b,t,f]),O.useEffect(()=>{if(!f||!a.current||!l.current||h.current)return;const F=T.has(f);F&&T.delete(f);const U=()=>{if(requestAnimationFrame($),F){s&&setTimeout(()=>{L(f,s+"\r")},100);let W=x;r==="plan"&&i?W=`claude "${`${e}: ${i}`.replace(/"/g,'\\"')}" --allow-dangerously-skip-permissions --permission-mode plan`:r==="default"&&i&&(W=`claude "${`${e}: ${i}`.replace(/"/g,'\\"')}" --dangerously-skip-permissions`),W&&setTimeout(()=>{L(f,W+"\r")},s?300:100)}},H=k(f,a.current,{onAttached:U}),K=R(l.current,f);return h.current=!0,()=>{H(),K(),h.current=!1}},[f,k,R,t,$,x,L,r,i,e,s,T]);const N=O.useCallback(F=>{f&&L(f,F)},[f,L]);return t?w.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!_&&w.jsx("div",{className:"shrink-0 px-2 py-1 bg-yellow-500/20 text-yellow-500 text-xs",children:"Connecting to terminal server..."}),D==="error"&&w.jsx("div",{className:"shrink-0 px-2 py-1 bg-red-500/20 text-red-500 text-xs",children:"Terminal failed to start. The worktree directory may not exist."}),D==="exited"&&w.jsxs("div",{className:"shrink-0 px-2 py-1 bg-muted text-muted-foreground text-xs",children:["Terminal exited (code: ",z?.exitCode,")"]}),w.jsxs("div",{className:"relative min-h-0 flex-1",children:[w.jsx("div",{ref:l,className:Be("h-full w-full overflow-hidden bg-[#0a0a0a] p-2",n)}),w.jsx("button",{onClick:()=>a.current?.scrollToBottom(),className:"absolute top-2 right-5 p-1 text-white/50 hover:text-white/80 transition-colors",children:w.jsx(be,{icon:Z9,size:20,strokeWidth:2})})]}),w.jsx(lO,{onSend:N})]}):w.jsx("div",{className:Be("flex h-full items-center justify-center bg-[#0a0a0a] text-muted-foreground text-sm",n),children:"No worktree path configured for this task"})}function Kxe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function Yxe(e,t=[]){let n=[];function r(s,l){const a=O.createContext(l),c=n.length;n=[...n,l];const u=f=>{const{scope:p,children:v,...S}=f,x=p?.[e]?.[c]||a,g=O.useMemo(()=>S,Object.values(S));return w.jsx(x.Provider,{value:g,children:v})};u.displayName=s+"Provider";function h(f,p){const v=p?.[e]?.[c]||a,S=O.useContext(v);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,h]}const i=()=>{const s=n.map(l=>O.createContext(l));return function(a){const c=a?.[e]||s;return O.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Xxe(i,...t)]}function Xxe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...a,...f}},{});return O.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Ip=globalThis?.document?O.useLayoutEffect:()=>{},Qxe=fb[" useInsertionEffect ".trim().toString()]||Ip;function Zxe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,l]=Jxe({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:i;{const h=O.useRef(e!==void 0);O.useEffect(()=>{const f=h.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=a},[a,r])}const u=O.useCallback(h=>{if(a){const f=eSe(h)?h(e):h;f!==e&&l.current?.(f)}else s(h)},[a,e,s,l]);return[c,u]}function Jxe({defaultProp:e,onChange:t}){const[n,r]=O.useState(e),i=O.useRef(n),s=O.useRef(t);return Qxe(()=>{s.current=t},[t]),O.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}function eSe(e){return typeof e=="function"}function S8(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kU(...e){return t=>{let n=!1;const r=e.map(i=>{const s=S8(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():S8(e[i],null)}}}}function OU(...e){return O.useCallback(kU(...e),e)}function tSe(e){const t=nSe(e),n=O.forwardRef((r,i)=>{const{children:s,...l}=r,a=O.Children.toArray(s),c=a.find(iSe);if(c){const u=c.props.children,h=a.map(f=>f===c?O.Children.count(u)>1?O.Children.only(null):O.isValidElement(u)?u.props.children:null:f);return w.jsx(t,{...l,ref:i,children:O.isValidElement(u)?O.cloneElement(u,void 0,h):null})}return w.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function nSe(e){const t=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const l=oSe(i),a=sSe(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kU(r,l):l),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rSe=Symbol("radix.slottable");function iSe(e){return O.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rSe}function sSe(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const c=s(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function oSe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var aSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],gR=aSe.reduce((e,t)=>{const n=tSe(`Primitive.${t}`),r=O.forwardRef((i,s)=>{const{asChild:l,...a}=i,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lSe(e,t){return O.useReducer((n,r)=>t[n][r]??n,e)}var RU=e=>{const{present:t,children:n}=e,r=cSe(t),i=typeof n=="function"?n({present:r.isPresent}):O.Children.only(n),s=OU(r.ref,uSe(i));return typeof n=="function"||r.isPresent?O.cloneElement(i,{ref:s}):null};RU.displayName="Presence";function cSe(e){const[t,n]=O.useState(),r=O.useRef(null),i=O.useRef(e),s=O.useRef("none"),l=e?"mounted":"unmounted",[a,c]=lSe(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const u=pv(r.current);s.current=a==="mounted"?u:"none"},[a]),Ip(()=>{const u=r.current,h=i.current;if(h!==e){const p=s.current,v=pv(u);e?c("MOUNT"):v==="none"||u?.display==="none"?c("UNMOUNT"):c(h&&p!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ip(()=>{if(t){let u;const h=t.ownerDocument.defaultView??window,f=v=>{const x=pv(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&x&&(c("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=v=>{v.target===t&&(s.current=pv(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:O.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function pv(e){return e?.animationName||"none"}function uSe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dSe=fb[" useId ".trim().toString()]||(()=>{}),fSe=0;function hSe(e){const[t,n]=O.useState(dSe());return Ip(()=>{n(r=>r??String(fSe++))},[e]),e||(t?`radix-${t}`:"")}var x0="Collapsible",[pSe]=Yxe(x0),[mSe,vR]=pSe(x0),AU=O.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:l,...a}=e,[c,u]=Zxe({prop:r,defaultProp:i??!1,onChange:l,caller:x0});return w.jsx(mSe,{scope:n,disabled:s,contentId:hSe(),open:c,onOpenToggle:O.useCallback(()=>u(h=>!h),[u]),children:w.jsx(gR.div,{"data-state":bR(c),"data-disabled":s?"":void 0,...a,ref:t})})});AU.displayName=x0;var PU="CollapsibleTrigger",MU=O.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=vR(PU,n);return w.jsx(gR.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":bR(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Kxe(e.onClick,i.onOpenToggle)})});MU.displayName=PU;var yR="CollapsibleContent",LU=O.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=vR(yR,e.__scopeCollapsible);return w.jsx(RU,{present:n||i.open,children:({present:s})=>w.jsx(gSe,{...r,ref:t,present:s})})});LU.displayName=yR;var gSe=O.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=e,l=vR(yR,n),[a,c]=O.useState(r),u=O.useRef(null),h=OU(t,u),f=O.useRef(0),p=f.current,v=O.useRef(0),S=v.current,x=l.open||a,g=O.useRef(x),b=O.useRef(void 0);return O.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),Ip(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const _=y.getBoundingClientRect();f.current=_.height,v.current=_.width,g.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),c(r)}},[l.open,r]),w.jsx(gR.div,{"data-state":bR(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!x,...s,ref:h,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":S?`${S}px`:void 0,...e.style},children:x&&i})});function bR(e){return e?"open":"closed"}var vSe=AU;const ySe=vSe,bSe=MU,_Se=LU;function xSe(e){const{viewState:t,setDiffOptions:n}=_0(e),{collapsedFiles:r}=t.diffOptions,i=O.useCallback(c=>{const u=r.includes(c);n({collapsedFiles:u?r.filter(h=>h!==c):[...r,c]})},[r,n]),s=O.useCallback(c=>{n({collapsedFiles:c})},[n]),l=O.useCallback(()=>{n({collapsedFiles:[]})},[n]),a=O.useCallback(c=>r.includes(c),[r]);return{options:t.diffOptions,setOption:(c,u)=>{n({[c]:u})},setOptions:n,toggleFileCollapse:i,collapseAll:s,expandAll:l,isFileCollapsed:a}}function SSe(e){const t=[];let n=null,r=0,i=0;for(const s of e.split(`
|
|
105
|
+
`))if(s.startsWith("diff --git"))n={path:s.match(/diff --git a\/(.+?) b\//)?.[1]??"unknown",lines:[],additions:0,deletions:0},t.push(n),n.lines.push({type:"header",content:s});else if(s.startsWith("index ")||s.startsWith("---")||s.startsWith("+++"))n?.lines.push({type:"header",content:s});else if(s.startsWith("@@")){const l=s.match(/@@ -(\d+),?\d* \+(\d+),?\d* @@/);l&&(r=parseInt(l[1],10),i=parseInt(l[2],10)),n?.lines.push({type:"hunk",content:s})}else s.startsWith("+")?n&&(n.additions++,n.lines.push({type:"added",content:s.slice(1),newLineNumber:i++})):s.startsWith("-")?n&&(n.deletions++,n.lines.push({type:"removed",content:s.slice(1),oldLineNumber:r++})):s.startsWith(" ")&&n?.lines.push({type:"context",content:s.slice(1),oldLineNumber:r++,newLineNumber:i++});return t}function wSe({file:e,wrap:t,isCollapsed:n,onToggle:r}){return w.jsxs(ySe,{open:!n,onOpenChange:()=>r(),children:[w.jsx(bSe,{asChild:!0,children:w.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-muted/30 border-b border-border cursor-pointer hover:bg-muted/50 select-none",children:[w.jsx(be,{icon:n?Sb:xb,size:12,strokeWidth:2,className:"text-muted-foreground shrink-0"}),w.jsx("span",{className:"font-mono text-xs text-foreground truncate flex-1",children:e.path}),w.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[e.additions>0&&w.jsxs("span",{className:"text-green-500",children:["+",e.additions]}),e.additions>0&&e.deletions>0&&" ",e.deletions>0&&w.jsxs("span",{className:"text-red-500",children:["-",e.deletions]})]})]})}),w.jsx(_Se,{children:w.jsx("div",{className:"font-mono text-xs",children:e.lines.slice(1).map((i,s)=>w.jsxs("div",{className:Be("flex px-2 py-0.5",i.type==="added"&&"bg-green-500/10",i.type==="removed"&&"bg-red-500/10",i.type==="header"&&"bg-muted/50 text-muted-foreground",i.type==="hunk"&&"bg-blue-500/10 text-blue-400"),children:[(i.type==="added"||i.type==="removed"||i.type==="context")&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"w-10 shrink-0 select-none pr-2 text-right text-muted-foreground",children:i.oldLineNumber??""}),w.jsx("span",{className:"w-10 shrink-0 select-none pr-2 text-right text-muted-foreground",children:i.newLineNumber??""})]}),w.jsxs("span",{className:Be("w-4 shrink-0 select-none text-center",i.type==="added"&&"text-green-500",i.type==="removed"&&"text-red-500"),children:[i.type==="added"&&"+",i.type==="removed"&&"-"]}),w.jsx("span",{className:Be("flex-1",t?"whitespace-pre-wrap break-all":"whitespace-pre",i.type==="added"&&"text-green-400",i.type==="removed"&&"text-red-400"),children:i.content})]},s))})})]})}function w8({taskId:e,worktreePath:t}){const{options:n,setOption:r,toggleFileCollapse:i,collapseAll:s,expandAll:l,isFileCollapsed:a}=xSe(e),{wrap:c,ignoreWhitespace:u,includeUntracked:h,collapsedFiles:f}=n,{data:p,isLoading:v,error:S}=_re(t,{ignoreWhitespace:u,includeUntracked:h}),x=O.useMemo(()=>p?.diff?SSe(p.diff):[],[p?.diff]),g=O.useMemo(()=>x.map(_=>_.path),[x]),b=x.length>0&&f.length===x.length;if(O.useEffect(()=>{const _=T=>{if(T.shiftKey&&T.key==="C"&&!T.ctrlKey&&!T.metaKey&&!T.altKey){const E=T.target;if(E.tagName==="INPUT"||E.tagName==="TEXTAREA"||E.isContentEditable)return;T.preventDefault(),b?l():s(g)}};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[b,g,s,l]),!t)return w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"No worktree selected"});if(v)return w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Loading diff..."});if(S)return w.jsx("div",{className:"flex h-full items-center justify-center text-destructive text-sm",children:S.message});const y=p?.files?.some(_=>_.status==="untracked")??!1;return x.length===0?w.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-muted-foreground text-sm gap-2",children:[w.jsx("p",{children:"No changes detected"}),p?.files&&p.files.length>0&&w.jsxs("div",{className:"text-xs",children:[w.jsx("p",{className:"text-center mb-2",children:"Modified files:"}),w.jsxs("div",{className:"flex flex-col gap-1",children:[p.files.map(_=>w.jsxs("div",{className:"flex gap-2",children:[w.jsxs("span",{className:Be("w-4 text-center",_.status==="added"&&"text-green-500",_.status==="deleted"&&"text-red-500",_.status==="modified"&&"text-yellow-500",_.status==="untracked"&&"text-gray-500"),children:[_.status==="added"&&"A",_.status==="deleted"&&"D",_.status==="modified"&&"M",_.status==="untracked"&&"?"]}),w.jsx("span",{children:_.path})]},_.path)),y&&w.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-muted-foreground hover:text-foreground mt-1",children:[w.jsx("input",{type:"checkbox",checked:h,onChange:_=>r("includeUntracked",_.target.checked),className:"w-4 h-3"}),w.jsx("span",{children:"Show untracked files"})]})]})]})]}):w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsxs("div",{className:"flex items-center gap-3 px-2 py-1.5 bg-muted/50 border-b border-border text-xs",children:[p?.branch&&w.jsxs("span",{className:"text-muted-foreground",children:[p.branch,p.isBranchDiff&&w.jsx("span",{className:"opacity-70",children:" (vs master)"})]}),w.jsx("div",{className:"flex-1"}),w.jsxs("button",{onClick:()=>b?l():s(g),className:"flex items-center gap-1 px-1.5 py-0.5 text-muted-foreground hover:text-foreground rounded hover:bg-muted/50",title:b?"Expand all (Shift+C)":"Collapse all (Shift+C)",children:[w.jsx(be,{icon:b?o7:r7,size:12,strokeWidth:2}),w.jsx("span",{className:"hidden sm:inline",children:b?"Expand":"Collapse"})]}),w.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer text-muted-foreground hover:text-foreground",children:[w.jsx("input",{type:"checkbox",checked:c,onChange:_=>r("wrap",_.target.checked),className:"w-3 h-3"}),"Wrap"]}),w.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer text-muted-foreground hover:text-foreground",children:[w.jsx("input",{type:"checkbox",checked:u,onChange:_=>r("ignoreWhitespace",_.target.checked),className:"w-3 h-3"}),"Ignore whitespace"]}),w.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer text-muted-foreground hover:text-foreground",children:[w.jsx("input",{type:"checkbox",checked:h,onChange:_=>r("includeUntracked",_.target.checked),className:"w-3 h-3"}),"Untracked"]})]}),w.jsx(rd,{className:"flex-1 min-h-0",children:x.map(_=>w.jsx(wSe,{file:_,wrap:c,isCollapsed:a(_.path),onToggle:()=>i(_.path)},_.path))})]})}function CSe(e){const{viewState:t,setBrowserUrl:n}=_0(e);return{url:t.browserUrl,setUrl:n}}function C8({taskId:e}){const{url:t,setUrl:n}=CSe(e),[r,i]=O.useState(t),[s,l]=O.useState(0);O.useEffect(()=>{i(t)},[t]);const a=O.useCallback(()=>{l(u=>u+1)},[]),c=O.useCallback(u=>{u.preventDefault();let h=r.trim();!h.startsWith("http://")&&!h.startsWith("https://")&&(h=`http://${h}`),n(h),l(f=>f+1)},[r,n]);return w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b border-border bg-muted/30 px-2 py-1.5",children:[w.jsx(ze,{variant:"ghost",size:"icon-xs",disabled:!0,children:w.jsx(be,{icon:J9,size:14,strokeWidth:2})}),w.jsx(ze,{variant:"ghost",size:"icon-xs",disabled:!0,children:w.jsx(be,{icon:Sb,size:14,strokeWidth:2})}),w.jsx(ze,{variant:"ghost",size:"icon-xs",onClick:a,children:w.jsx(be,{icon:$X,size:14,strokeWidth:2})}),w.jsx("form",{onSubmit:c,className:"flex-1",children:w.jsx(nn,{value:r,onChange:u=>i(u.target.value),className:"h-7 bg-background text-xs",placeholder:"Enter URL..."})})]}),w.jsx("div",{className:"flex-1 overflow-hidden bg-white",children:w.jsx("iframe",{src:t,className:"h-full w-full border-0",title:"Browser Preview",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups"},s)})]})}function ESe(e){const{viewState:t,setFilesViewState:n}=_0(e),r=t.filesViewState??{selectedFile:null,expandedDirs:[]},i=O.useCallback(a=>{n({selectedFile:a})},[n]),s=O.useCallback(a=>{const u=r.expandedDirs.includes(a)?r.expandedDirs.filter(h=>h!==a):[...r.expandedDirs,a];n({expandedDirs:u})},[r.expandedDirs,n]),l=O.useCallback(()=>{n({expandedDirs:[]})},[n]);return{selectedFile:r.selectedFile,expandedDirs:r.expandedDirs,setSelectedFile:i,toggleDir:s,collapseAll:l}}function TSe(e){const t=e.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","svg","webp","ico"].includes(t)?DX:["ts","tsx","js","jsx","json","css","html","md","yaml","yml","toml","sh","py","rs","go","sql"].includes(t)?AX:PX}function jU({entry:e,depth:t,selectedFile:n,expandedDirs:r,onSelectFile:i,onToggleDir:s}){const l=r.includes(e.path),a=n===e.path,c=e.type==="directory",u=O.useCallback(()=>{c?s(e.path):i(e.path)},[c,e.path,i,s]);return w.jsxs("div",{children:[w.jsxs("div",{className:Be("flex items-center gap-1.5 px-2 py-0.5 cursor-pointer text-sm hover:bg-muted/50",a&&"bg-primary/10 text-primary"),style:{paddingLeft:`${t*12+8}px`},onClick:u,children:[w.jsx(be,{icon:c?l?KE:Qi:TSe(e.name),size:14,strokeWidth:2,className:Be("shrink-0",c?"text-yellow-500":"text-muted-foreground")}),w.jsx("span",{className:"break-all",children:e.name})]}),c&&l&&e.children&&w.jsx("div",{children:e.children.map(h=>w.jsx(jU,{entry:h,depth:t+1,selectedFile:n,expandedDirs:r,onSelectFile:i,onToggleDir:s},h.path))})]})}function E8({entries:e,selectedFile:t,expandedDirs:n,onSelectFile:r,onToggleDir:i,onCollapseAll:s}){return e.length===0?w.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"No files"}):w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsxs("div",{className:"flex shrink-0 items-center justify-between px-2 py-1 border-b border-border",children:[w.jsx("span",{className:"text-xs text-muted-foreground",children:"Files"}),w.jsx("button",{onClick:s,className:"p-1 text-muted-foreground hover:text-foreground rounded hover:bg-muted/50",title:"Collapse all",children:w.jsx(be,{icon:r7,size:14,strokeWidth:2})})]}),w.jsx("div",{className:"py-1 flex-1 overflow-auto",children:e.map(l=>w.jsx(jU,{entry:l,depth:0,selectedFile:t,expandedDirs:n,onSelectFile:r,onToggleDir:i},l.path))})]})}const kSe="modulepreload",OSe=function(e){return"/"+e},T8={},se=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};var l=u;document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=u(n.map(h=>{if(h=OSe(h),h in T8)return;T8[h]=!0;const f=h.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":kSe,f||(v.as="script"),v.crossOrigin="",v.href=h,c&&v.setAttribute("nonce",c),document.head.appendChild(v),f)return new Promise((S,x)=>{v.addEventListener("load",S),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};let qn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function RSe(e){return _R(e)}function _R(e){return Array.isArray(e)?ASe(e):e instanceof RegExp?e:typeof e=="object"?PSe(e):e}function ASe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=_R(e[n]);return t}function PSe(e){let t={};for(let n in e)t[n]=_R(e[n]);return t}function DU(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function IU(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?IU(e.substring(0,e.length-1)):e.substr(~t+1)}var SE=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,mv=class{static hasCaptures(e){return e===null?!1:(SE.lastIndex=0,SE.test(e))}static replaceCaptures(e,t,n){return e.replace(SE,(r,i,s,l)=>{let a=n[parseInt(i||s,10)];if(a){let c=t.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(l){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function NU(e,t){return e<t?-1:e>t?1:0}function BU(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 i=0;i<n;i++){let s=NU(e[i],t[i]);if(s!==0)return s}return 0}return n-r}function k8(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 zU(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var HU=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},nb=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(jSe(e),t)}static createFromParsedTheme(e,t){return ISe(e,t)}_cachedMatchRoot=new HU(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>MSe(e.parent,i.parentScopes));return r?new $U(r.fontStyle,r.foreground,r.background):null}},wE=class kv{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new kv(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new kv(n,t[r]);return n}push(t){return new kv(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function MSe(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&&!LSe(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function LSe(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var $U=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function jSe(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i<s;i++){let l=t[i];if(!l.settings)continue;let a;if(typeof l.scope=="string"){let f=l.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),a=f.split(",")}else Array.isArray(l.scope)?a=l.scope:a=[""];let c=-1;if(typeof l.settings.fontStyle=="string"){c=0;let f=l.settings.fontStyle.split(" ");for(let p=0,v=f.length;p<v;p++)switch(f[p]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let u=null;typeof l.settings.foreground=="string"&&k8(l.settings.foreground)&&(u=l.settings.foreground);let h=null;typeof l.settings.background=="string"&&k8(l.settings.background)&&(h=l.settings.background);for(let f=0,p=a.length;f<p;f++){let S=a[f].trim().split(" "),x=S[S.length-1],g=null;S.length>1&&(g=S.slice(0,S.length-1),g.reverse()),n[r++]=new DSe(x,g,i,c,u,h)}}return n}var DSe=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Lr=(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))(Lr||{});function ISe(e,t){e.sort((c,u)=>{let h=NU(c.scope,u.scope);return h!==0||(h=BU(c.parentScopes,u.parentScopes),h!==0)?h:c.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(i=c.background)}let s=new NSe(t),l=new $U(n,s.getId(r),s.getId(i)),a=new zSe(new MT(0,null,-1,0,0),[]);for(let c=0,u=e.length;c<u;c++){let h=e[c];a.insert(0,h.scope,h.parentScopes,h.fontStyle,s.getId(h.foreground),s.getId(h.background))}return new nb(s,l,a)}var NSe=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},BSe=Object.freeze([]),MT=class FU{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,s){this.scopeDepth=t,this.parentScopes=n||BSe,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new FU(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},zSe=class LT{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(LT._cmpBySpecificity),n}insert(t,n,r,i,s,l){if(n===""){this._doInsertHere(t,r,i,s,l);return}let a=n.indexOf("."),c,u;a===-1?(c=n,u=""):(c=n.substring(0,a),u=n.substring(a+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new LT(this._mainRule.clone(),MT.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(t+1,u,r,i,s,l)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let l=0,a=this._rulesWithParentScopes.length;l<a;l++){let c=this._rulesWithParentScopes[l];if(BU(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new MT(t,n,r,i,s))}},Od=class Fi{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Fi.getLanguageId(t),r=Fi.getTokenType(t),i=Fi.getFontStyle(t),s=Fi.getForeground(t),l=Fi.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,s,l,a){let c=Fi.getLanguageId(t),u=Fi.getTokenType(t),h=Fi.containsBalancedBrackets(t)?1:0,f=Fi.getFontStyle(t),p=Fi.getForeground(t),v=Fi.getBackground(t);return n!==0&&(c=n),r!==8&&(u=r),i!==null&&(h=i?1:0),s!==-1&&(f=s),l!==0&&(p=l),a!==0&&(v=a),(c<<0|u<<8|h<<10|f<<11|p<<15|v<<24)>>>0}};function rb(e,t){const n=[],r=HSe(e);let i=r.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=l();if(n.push({matcher:u,priority:c}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const c=s();return u=>!!c&&!c(u)}if(i==="("){i=r.next();const c=a();return i===")"&&(i=r.next()),c}if(O8(i)){const c=[];do c.push(i),i=r.next();while(O8(i));return u=>t(c,u)}return null}function l(){const c=[];let u=s();for(;u;)c.push(u),u=s();return h=>c.every(f=>f(h))}function a(){const c=[];let u=l();for(;u&&(c.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=l()}return h=>c.some(f=>f(h))}}function O8(e){return!!e&&!!e.match(/[\w\.:]+/)}function HSe(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function UU(e){typeof e.dispose=="function"&&e.dispose()}var Np=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},$Se=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},FSe=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},USe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Np(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new FSe;for(const n of e)VSe(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Np){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function VSe(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Np?Ov({baseGrammar:s,selfGrammar:i},r):jT(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const l=n.injections(e.scopeName);if(l)for(const a of l)r.add(new Np(a))}function jT(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];ib([r],t,n)}}function Ov(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ib(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ib(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ib(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?DU({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ib(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const l=VU(s);switch(l.kind){case 0:Ov({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ov(t,n);break;case 2:jT(l.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const c={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};l.kind===4?jT(l.ruleName,c,n):Ov(c,n)}else l.kind===4?n.add(new $Se(l.scopeName,l.ruleName)):n.add(new Np(l.scopeName));break}}}var qSe=class{kind=0},WSe=class{kind=1},GSe=class{constructor(e){this.ruleName=e}kind=2},KSe=class{constructor(e){this.scopeName=e}kind=3},YSe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function VU(e){if(e==="$base")return new qSe;if(e==="$self")return new WSe;const t=e.indexOf("#");if(t===-1)return new KSe(e);if(t===0)return new GSe(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new YSe(n,r)}}var XSe=/\\(\d+)/,R8=/\\(\d+)/g,QSe=-1,qU=-2;var fm=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=mv.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=mv.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${IU(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:mv.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:mv.replaceCaptures(this._contentName,e,t)}},ZSe=class extends fm{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},JSe=class extends fm{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Bp(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},A8=class extends fm{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(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},DT=class extends fm{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,l,a,c,u){super(e,t,n,r),this._begin=new Bp(i,this.id),this.beginCaptures=s,this._end=new Bp(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new zp;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},sb=class extends fm{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,l,a,c){super(e,t,n,r),this._begin=new Bp(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new Bp(l,qU),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(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new zp;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new zp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},WU=class kr{static createCaptureRule(t,n,r,i,s){return t.registerRule(l=>new ZSe(n,l,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new JSe(t.$vscodeTextmateLocation,t.id,t.name,t.match,kr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=DU({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new A8(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,kr._compilePatterns(s,n,r))}return t.while?new sb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,kr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,kr._compileCaptures(t.whileCaptures||t.captures,n,r),kr._compilePatterns(t.patterns,n,r)):new DT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,kr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,kr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,kr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const a=parseInt(l,10);a>s&&(s=a)}for(let l=0;l<=s;l++)i[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const a=parseInt(l,10);let c=0;t[l].patterns&&(c=kr.getCompiledRuleId(t[l],n,r)),i[a]=kr.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,l=t.length;s<l;s++){const a=t[s];let c=-1;if(a.include){const u=VU(a.include);switch(u.kind){case 0:case 1:c=kr.getCompiledRuleId(r[a.include],n,r);break;case 2:let h=r[u.ruleName];h&&(c=kr.getCompiledRuleId(h,n,r));break;case 3:case 4:const f=u.scopeName,p=u.kind===4?u.ruleName:null,v=n.getExternalGrammar(f,r);if(v)if(p){let S=v.repository[p];S&&(c=kr.getCompiledRuleId(S,n,v.repository))}else c=kr.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else c=kr.getCompiledRuleId(a,n,r);if(c!==-1){const u=n.getRule(c);let h=!1;if((u instanceof A8||u instanceof DT||u instanceof sb)&&u.hasMissingPatterns&&u.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Bp=class GU{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,s=[],l=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(s.push(t.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(l=!0),a++}this.hasAnchor=l,i===0?this.source=t:(s.push(t.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=XSe.test(this.source):this.hasBackReferences=!1}clone(){return new GU(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return R8.lastIndex=0,this.source.replace(R8,(i,s)=>zU(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],s,l,a,c;for(s=0,l=this.source.length;s<l;s++)a=this.source.charAt(s),t[s]=a,n[s]=a,r[s]=a,i[s]=a,a==="\\"&&s+1<l&&(c=this.source.charAt(s+1),c==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",i[s+1]="A"):c==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",i[s+1]="G"):(t[s+1]=c,n[s+1]=c,r[s+1]=c,i[s+1]=c),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},zp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new P8(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new P8(e,r,this._items.map(i=>i.ruleId))}},P8=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
106
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},CE=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ewe=class IT{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new CE(t,8),this._embeddedLanguagesMatcher=new twe(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?IT._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new CE(0,0);_getBasicScopeAttributes=new HU(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new CE(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(IT.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},twe=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>zU(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},M8=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function KU(e,t,n,r,i,s,l,a){const c=t.content.length;let u=!1,h=-1;if(l){const v=nwe(e,t,n,r,i,s);i=v.stack,r=v.linePos,n=v.isFirstLine,h=v.anchorPosition}const f=Date.now();for(;!u;){if(a!==0&&Date.now()-f>a)return new M8(i,!0);p()}return new M8(i,!1);function p(){const v=rwe(e,t,n,r,i,h);if(!v){s.produce(i,c),u=!0;return}const S=v.captureIndices,x=v.matchedRuleId,g=S&&S.length>0?S[0].end>r:!1;if(x===QSe){const b=i.getRule(e);s.produce(i,S[0].start),i=i.withContentNameScopesList(i.nameScopesList),Th(e,t,n,i,s,b.endCaptures,S),s.produce(i,S[0].end);const y=i;if(i=i.parent,h=y.getAnchorPos(),!g&&y.getEnterPos()===r){i=y,s.produce(i,c),u=!0;return}}else{const b=e.getRule(x);s.produce(i,S[0].start);const y=i,_=b.getName(t.content,S),T=i.contentNameScopesList.pushAttributed(_,e);if(i=i.push(x,r,h,S[0].end===c,null,T,T),b instanceof DT){const E=b;Th(e,t,n,i,s,E.beginCaptures,S),s.produce(i,S[0].end),h=S[0].end;const k=E.getContentName(t.content,S),A=T.pushAttributed(k,e);if(i=i.withContentNameScopesList(A),E.endHasBackReferences&&(i=i.withEndRule(E.getEndWithResolvedBackReferences(t.content,S))),!g&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),u=!0;return}}else if(b instanceof sb){const E=b;Th(e,t,n,i,s,E.beginCaptures,S),s.produce(i,S[0].end),h=S[0].end;const k=E.getContentName(t.content,S),A=T.pushAttributed(k,e);if(i=i.withContentNameScopesList(A),E.whileHasBackReferences&&(i=i.withEndRule(E.getWhileWithResolvedBackReferences(t.content,S))),!g&&y.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),u=!0;return}}else if(Th(e,t,n,i,s,b.captures,S),s.produce(i,S[0].end),i=i.pop(),!g){i=i.safePop(),s.produce(i,c),u=!0;return}}S[0].end>r&&(r=S[0].end,n=!1)}}function nwe(e,t,n,r,i,s){let l=i.beginRuleCapturedEOL?0:-1;const a=[];for(let c=i;c;c=c.pop()){const u=c.getRule(e);u instanceof sb&&a.push({rule:u,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:u,findOptions:h}=owe(c.rule,e,c.stack.endRule,n,r===l),f=u.findNextMatchSync(t,r,h);if(f){if(f.ruleId!==qU){i=c.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(s.produce(c.stack,f.captureIndices[0].start),Th(e,t,n,c.stack,s,c.rule.whileCaptures,f.captureIndices),s.produce(c.stack,f.captureIndices[0].end),l=f.captureIndices[0].end,f.captureIndices[0].end>r&&(r=f.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:n}}function rwe(e,t,n,r,i,s){const l=iwe(e,t,n,r,i,s),a=e.getInjections();if(a.length===0)return l;const c=swe(a,e,t,n,r,i,s);if(!c)return l;if(!l)return c;const u=l.captureIndices[0].start,h=c.captureIndices[0].start;return h<u||c.priorityMatch&&h===u?c:l}function iwe(e,t,n,r,i,s){const l=i.getRule(e),{ruleScanner:a,findOptions:c}=YU(l,e,i.endRule,n,r===s),u=a.findNextMatchSync(t,r,c);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function swe(e,t,n,r,i,s,l){let a=Number.MAX_VALUE,c=null,u,h=0;const f=s.contentNameScopesList.getScopeNames();for(let p=0,v=e.length;p<v;p++){const S=e[p];if(!S.matcher(f))continue;const x=t.getRule(S.ruleId),{ruleScanner:g,findOptions:b}=YU(x,t,null,r,i===l),y=g.findNextMatchSync(n,i,b);if(!y)continue;const _=y.captureIndices[0].start;if(!(_>=a)&&(a=_,c=y.captureIndices,u=y.ruleId,h=S.priority,a===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:u}:null}function YU(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function owe(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Th(e,t,n,r,i,s,l){if(s.length===0)return;const a=t.content,c=Math.min(s.length,l.length),u=[],h=l[0].end;for(let f=0;f<c;f++){const p=s[f];if(p===null)continue;const v=l[f];if(v.length===0)continue;if(v.start>h)break;for(;u.length>0&&u[u.length-1].endPos<=v.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,v.start):i.produce(r,v.start),p.retokenizeCapturedWithRuleId){const x=p.getName(a,l),g=r.contentNameScopesList.pushAttributed(x,e),b=p.getContentName(a,l),y=g.pushAttributed(b,e),_=r.push(p.retokenizeCapturedWithRuleId,v.start,-1,!1,null,g,y),T=e.createOnigString(a.substring(0,v.end));KU(e,T,n&&v.start===0,v.start,_,i,!1,0),UU(T);continue}const S=p.getName(a,l);if(S!==null){const g=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(S,e);u.push(new awe(g,v.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var awe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function lwe(e,t,n,r,i,s,l,a){return new uwe(e,t,n,r,i,s,l,a)}function L8(e,t,n,r,i){const s=rb(t,ob),l=WU.getCompiledRuleId(n,r,i.repository);for(const a of s)e.push({debugSelector:t,matcher:a.matcher,ruleId:l,grammar:i,priority:a.priority})}function ob(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(cwe(t[i],r))return n=i+1,!0;return!1})}function cwe(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var uwe=class{constructor(e,t,n,r,i,s,l,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ewe(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=j8(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const u=rb(c,ob);for(const h of u)this._tokenTypeMatchers.push({matcher:h.matcher,type:i[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let l in i)L8(t,l,i[l],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const a=this.getExternalGrammar(l);if(a){const c=a.injectionSelector;c&&L8(t,c,a,this,a)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=j8(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const 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){const 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=WU.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===NT.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),f=Od.set(0,u.languageId,u.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),p=this.getRule(this._rootId).getName(null,null);let v;p?v=Bh.createRootAndLookUpScopeName(p,f,this):v=Bh.createRoot("unknown",f),t=new NT(null,this._rootId,-1,-1,!1,null,v,v)}else i=!1,t.reset();e=e+`
|
|
107
|
+
`;const s=this.createOnigString(e),l=s.content.length,a=new fwe(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=KU(this,s,i,0,t,a,!0,r);return UU(s),{lineLength:l,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function j8(e,t){return e=RSe(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 Bh=class Ns{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=wE.push(i,s.scopeNames),r=new Ns(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Ns(null,new wE(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new wE(null,t),l=r.themeProvider.themeMatch(s),a=Ns.mergeAttributes(n,i,l);return new Ns(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ns.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,s=0,l=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,l=r.backgroundId),Od.set(t,n.languageId,n.tokenType,null,i,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ns._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=Ns._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),a=Ns.mergeAttributes(t.tokenAttributes,i,l);return new Ns(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},NT=class Bl{constructor(t,n,r,i,s,l,a,c){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Bl(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Bl._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Bh.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Bl._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,l,a){return new Bl(this,t,n,r,i,s,l,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Bl(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Bh.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Bl(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Bh.fromExtension(r,n.contentNameScopesList))}},dwe=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):rb(n,ob).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>rb(n,ob).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},fwe=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 r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(s)&&(r=Od.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=Od.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},hwe=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,lwe(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},pwe=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new hwe(nb.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(nb.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new dwe(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,s){const l=new USe(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(a=>this._loadSingleGrammar(a.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},BT=NT.NULL;const mwe=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class hm{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}hm.prototype.normal={};hm.prototype.property={};hm.prototype.space=void 0;function XU(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new hm(n,r,t)}function zT(e){return e.toLowerCase()}class oi{constructor(t,n){this.attribute=n,this.property=t}}oi.prototype.attribute="";oi.prototype.booleanish=!1;oi.prototype.boolean=!1;oi.prototype.commaOrSpaceSeparated=!1;oi.prototype.commaSeparated=!1;oi.prototype.defined=!1;oi.prototype.mustUseProperty=!1;oi.prototype.number=!1;oi.prototype.overloadedBoolean=!1;oi.prototype.property="";oi.prototype.spaceSeparated=!1;oi.prototype.space=void 0;let gwe=0;const wt=Uc(),Fn=Uc(),HT=Uc(),He=Uc(),un=Uc(),Gu=Uc(),yi=Uc();function Uc(){return 2**++gwe}const $T=Object.freeze(Object.defineProperty({__proto__:null,boolean:wt,booleanish:Fn,commaOrSpaceSeparated:yi,commaSeparated:Gu,number:He,overloadedBoolean:HT,spaceSeparated:un},Symbol.toStringTag,{value:"Module"})),EE=Object.keys($T);class xR extends oi{constructor(t,n,r,i){let s=-1;if(super(t,n),D8(this,"space",i),typeof r=="number")for(;++s<EE.length;){const l=EE[s];D8(this,EE[s],(r&$T[l])===$T[l])}}}xR.prototype.defined=!0;function D8(e,t,n){n&&(e[t]=n)}function sf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new xR(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[zT(r)]=r,n[zT(s.attribute)]=r}return new hm(t,n,e.space)}const QU=sf({properties:{ariaActiveDescendant:null,ariaAtomic:Fn,ariaAutoComplete:null,ariaBusy:Fn,ariaChecked:Fn,ariaColCount:He,ariaColIndex:He,ariaColSpan:He,ariaControls:un,ariaCurrent:null,ariaDescribedBy:un,ariaDetails:null,ariaDisabled:Fn,ariaDropEffect:un,ariaErrorMessage:null,ariaExpanded:Fn,ariaFlowTo:un,ariaGrabbed:Fn,ariaHasPopup:null,ariaHidden:Fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:un,ariaLevel:He,ariaLive:null,ariaModal:Fn,ariaMultiLine:Fn,ariaMultiSelectable:Fn,ariaOrientation:null,ariaOwns:un,ariaPlaceholder:null,ariaPosInSet:He,ariaPressed:Fn,ariaReadOnly:Fn,ariaRelevant:null,ariaRequired:Fn,ariaRoleDescription:un,ariaRowCount:He,ariaRowIndex:He,ariaRowSpan:He,ariaSelected:Fn,ariaSetSize:He,ariaSort:null,ariaValueMax:He,ariaValueMin:He,ariaValueNow:He,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ZU(e,t){return t in e?e[t]:t}function JU(e,t){return ZU(e,t.toLowerCase())}const vwe=sf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gu,acceptCharset:un,accessKey:un,action:null,allow:null,allowFullScreen:wt,allowPaymentRequest:wt,allowUserMedia:wt,alt:null,as:null,async:wt,autoCapitalize:null,autoComplete:un,autoFocus:wt,autoPlay:wt,blocking:un,capture:null,charSet:null,checked:wt,cite:null,className:un,cols:He,colSpan:null,content:null,contentEditable:Fn,controls:wt,controlsList:un,coords:He|Gu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:wt,defer:wt,dir:null,dirName:null,disabled:wt,download:HT,draggable:Fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:wt,formTarget:null,headers:un,height:He,hidden:HT,high:He,href:null,hrefLang:null,htmlFor:un,httpEquiv:un,id:null,imageSizes:null,imageSrcSet:null,inert:wt,inputMode:null,integrity:null,is:null,isMap:wt,itemId:null,itemProp:un,itemRef:un,itemScope:wt,itemType:un,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:wt,low:He,manifest:null,max:null,maxLength:He,media:null,method:null,min:null,minLength:He,multiple:wt,muted:wt,name:null,nonce:null,noModule:wt,noValidate:wt,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:wt,optimum:He,pattern:null,ping:un,placeholder:null,playsInline:wt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:wt,referrerPolicy:null,rel:un,required:wt,reversed:wt,rows:He,rowSpan:He,sandbox:un,scope:null,scoped:wt,seamless:wt,selected:wt,shadowRootClonable:wt,shadowRootDelegatesFocus:wt,shadowRootMode:null,shape:null,size:He,sizes:null,slot:null,span:He,spellCheck:Fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:He,step:null,style:null,tabIndex:He,target:null,title:null,translate:null,type:null,typeMustMatch:wt,useMap:null,value:Fn,width:He,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:un,axis:null,background:null,bgColor:null,border:He,borderColor:null,bottomMargin:He,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:wt,declare:wt,event:null,face:null,frame:null,frameBorder:null,hSpace:He,leftMargin:He,link:null,longDesc:null,lowSrc:null,marginHeight:He,marginWidth:He,noResize:wt,noHref:wt,noShade:wt,noWrap:wt,object:null,profile:null,prompt:null,rev:null,rightMargin:He,rules:null,scheme:null,scrolling:Fn,standby:null,summary:null,text:null,topMargin:He,valueType:null,version:null,vAlign:null,vLink:null,vSpace:He,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:wt,disableRemotePlayback:wt,prefix:null,property:null,results:He,security:null,unselectable:null},space:"html",transform:JU}),ywe=sf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:yi,accentHeight:He,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:He,amplitude:He,arabicForm:null,ascent:He,attributeName:null,attributeType:null,azimuth:He,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:He,by:null,calcMode:null,capHeight:He,className:un,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:He,diffuseConstant:He,direction:null,display:null,dur:null,divisor:He,dominantBaseline:null,download:wt,dx:null,dy:null,edgeMode:null,editable:null,elevation:He,enableBackground:null,end:null,event:null,exponent:He,externalResourcesRequired:null,fill:null,fillOpacity:He,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:Gu,g2:Gu,glyphName:Gu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:He,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:He,horizOriginX:He,horizOriginY:He,id:null,ideographic:He,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:He,k:He,k1:He,k2:He,k3:He,k4:He,kernelMatrix:yi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:He,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:He,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:He,overlineThickness:He,paintOrder:null,panose1:null,path:null,pathLength:He,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:un,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:He,pointsAtY:He,pointsAtZ:He,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yi,rev:yi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yi,requiredFeatures:yi,requiredFonts:yi,requiredFormats:yi,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:He,specularExponent:He,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:He,strikethroughThickness:He,string:null,stroke:null,strokeDashArray:yi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:He,strokeOpacity:He,strokeWidth:null,style:null,surfaceScale:He,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yi,tabIndex:He,tableValues:null,target:null,targetX:He,targetY:He,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:He,underlineThickness:He,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:He,values:null,vAlphabetic:He,vMathematical:He,vectorEffect:null,vHanging:He,vIdeographic:He,version:null,vertAdvY:He,vertOriginX:He,vertOriginY:He,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:He,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ZU}),eV=sf({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()}}),tV=sf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:JU}),nV=sf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bwe=/[A-Z]/g,I8=/-[a-z]/g,_we=/^data[-\w.:]+$/i;function xwe(e,t){const n=zT(t);let r=t,i=oi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_we.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(I8,wwe);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!I8.test(s)){let l=s.replace(bwe,Swe);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=xR}return new i(r,t)}function Swe(e){return"-"+e.toLowerCase()}function wwe(e){return e.charAt(1).toUpperCase()}const Cwe=XU([QU,vwe,eV,tV,nV],"html"),rV=XU([QU,ywe,eV,tV,nV],"svg"),N8={}.hasOwnProperty;function Ewe(e,t){const n=t||{};function r(i,...s){let l=r.invalid;const a=r.handlers;if(i&&N8.call(i,e)){const c=String(i[e]);l=N8.call(a,c)?a[c]:r.unknown}if(l)return l.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Twe=/["&'<>`]/g,kwe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Owe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Rwe=/[|\\{}()[\]^$+*?.]/g,B8=new WeakMap;function Awe(e,t){if(e=e.replace(t.subset?Pwe(t.subset):Twe,r),t.subset||t.escapeOnly)return e;return e.replace(kwe,n).replace(Owe,r);function n(i,s,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(i,s,l){return t.format(i.charCodeAt(0),l.charCodeAt(s+1),t)}}function Pwe(e){let t=B8.get(e);return t||(t=Mwe(e),B8.set(e,t)),t}function Mwe(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Rwe,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Lwe=/[\dA-Fa-f]/;function jwe(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Lwe.test(String.fromCharCode(t))?r:r+";"}const Dwe=/\d/;function Iwe(e,t,n){const r="&#"+String(e);return n&&t&&!Dwe.test(String.fromCharCode(t))?r:r+";"}const Nwe=["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"],TE={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Bwe=["cent","copy","divide","gt","lt","not","para","times"],iV={}.hasOwnProperty,FT={};let gv;for(gv in TE)iV.call(TE,gv)&&(FT[TE[gv]]=gv);const zwe=/[^\dA-Za-z]/;function Hwe(e,t,n,r){const i=String.fromCharCode(e);if(iV.call(FT,i)){const s=FT[i],l="&"+s;return n&&Nwe.includes(s)&&!Bwe.includes(s)&&(!r||t&&t!==61&&zwe.test(String.fromCharCode(t)))?l:l+";"}return""}function $we(e,t,n){let r=jwe(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Hwe(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=Iwe(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ku(e,t){return Awe(e,Object.assign({format:$we},t))}const Fwe=/^>|^->|<!--|-->|--!>|<!-$/g,Uwe=[">"],Vwe=["<",">"];function qwe(e,t,n,r){return r.settings.bogusComments?"<?"+Ku(e.value,Object.assign({},r.settings.characterReferences,{subset:Uwe}))+">":"<!--"+e.value.replace(Fwe,i)+"-->";function i(s){return Ku(s,Object.assign({},r.settings.characterReferences,{subset:Vwe}))}}function Wwe(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function z8(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Gwe(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Kwe(e){return e.join(" ").trim()}const Ywe=/[ \t\n\f\r]/g;function SR(e){return typeof e=="object"?e.type==="text"?H8(e.value):!1:H8(e)}function H8(e){return e.replace(Ywe,"")===""}const cr=oV(1),sV=oV(-1),Xwe=[];function oV(e){return t;function t(n,r,i){const s=n?n.children:Xwe;let l=(r||0)+e,a=s[l];if(!i)for(;a&&SR(a);)l+=e,a=s[l];return a}}const Qwe={}.hasOwnProperty;function aV(e){return t;function t(n,r,i){return Qwe.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const wR=aV({body:Jwe,caption:kE,colgroup:kE,dd:rCe,dt:nCe,head:kE,html:Zwe,li:tCe,optgroup:iCe,option:sCe,p:eCe,rp:$8,rt:$8,tbody:aCe,td:F8,tfoot:lCe,th:F8,thead:oCe,tr:cCe});function kE(e,t,n){const r=cr(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&SR(r.value.charAt(0)))}function Zwe(e,t,n){const r=cr(n,t);return!r||r.type!=="comment"}function Jwe(e,t,n){const r=cr(n,t);return!r||r.type!=="comment"}function eCe(e,t,n){const r=cr(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 tCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&r.tagName==="li"}function nCe(e,t,n){const r=cr(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function rCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function $8(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function iCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function sCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function oCe(e,t,n){const r=cr(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function aCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function lCe(e,t,n){return!cr(n,t)}function cCe(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function F8(e,t,n){const r=cr(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const uCe=aV({body:hCe,colgroup:pCe,head:fCe,html:dCe,tbody:mCe});function dCe(e){const t=cr(e,-1);return!t||t.type!=="comment"}function fCe(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function hCe(e){const t=cr(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&SR(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function pCe(e,t,n){const r=sV(n,t),i=cr(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&wR(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function mCe(e,t,n){const r=sV(n,t),i=cr(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&wR(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const vv={name:[[`
|
|
108
|
+
\f\r &/=>`.split(""),`
|
|
109
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
110
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
111
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
112
|
+
\f\r &>`.split(""),`\0
|
|
113
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
114
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
115
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function gCe(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=rV);const u=vCe(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(l=!1),(u||!s||!uCe(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(h),!l&&(!s||!wR(e,t,n))&&a.push("</"+e.tagName+">"),a.join("")}function vCe(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=yCe(e,i,t[i]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function yCe(e,t,n){const r=xwe(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Ku(r.attribute,Object.assign({},e.settings.characterReferences,{subset:vv.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Gwe:Kwe)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(a=Ku(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:vv.unquoted[i][s]}))),a!==n&&(e.settings.quoteSmart&&z8(n,l)>z8(n,e.alternative)&&(l=e.alternative),a=l+Ku(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?vv.single:vv.double)[i][s],attribute:!0}))+l),c+(a&&"="+a))}const bCe=["<","&"];function lV(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Ku(e.value,Object.assign({},r.settings.characterReferences,{subset:bCe}))}function _Ce(e,t,n,r){return r.settings.allowDangerousHtml?e.value:lV(e,t,n,r)}function xCe(e,t,n,r){return r.all(e)}const SCe=Ewe("type",{invalid:wCe,unknown:CCe,handlers:{comment:qwe,doctype:Wwe,element:gCe,raw:_Ce,root:xCe,text:lV}});function wCe(e){throw new Error("Expected node, not `"+e+"`")}function CCe(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const ECe={},TCe={},kCe=[];function OCe(e,t){const n=t||ECe,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:RCe,all:ACe,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||mwe,characterReferences:n.characterReferences||TCe,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?rV:Cwe,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function RCe(e,t,n){return SCe(e,t,n,this)}function ACe(e){const t=[],n=e&&e.children||kCe;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ab(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Ya(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function PCe(e){return Array.isArray(e)?e:[e]}async function cV(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function CR(e){return!e||["plaintext","txt","text","plain"].includes(e)}function uV(e){return e==="ansi"||CR(e)}function ER(e){return e==="none"}function dV(e){return ER(e)}function fV(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function S0(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const l=t?n[s]+(n[s+1]||""):n[s];i.push([l,r]),r+=n[s].length,r+=n[s+1]?.length||0}return i}function MCe(e){const t=S0(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,l=0;for(const a of t){if(s<a.length)break;s-=a.length,l++}return{line:l,character:s}}function r(i,s){let l=0;for(let a=0;a<i;a++)l+=t[a].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}const TR="light-dark()",LCe=["color","background-color"];function jCe(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function DCe(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(l=>i.offset<l&&l<i.offset+i.content.length).map(l=>l-i.offset).sort((l,a)=>l-a);return s.length?jCe(i,s):i})):e}function ICe(e,t,n,r,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(h=>lb(e.variants[h])),a=new Set(l.flatMap(h=>Object.keys(h))),c={},u=(h,f)=>{const p=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+t[h]+(f==="color"?"":p)};return l.forEach((h,f)=>{for(const p of a){const v=h[p]||"inherit";if(f===0&&r&&LCe.includes(p))if(r===TR&&l.length>1){const S=t.findIndex(y=>y==="light"),x=t.findIndex(y=>y==="dark");if(S===-1||x===-1)throw new qn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=l[S][p]||"inherit",b=l[x][p]||"inherit";c[p]=`light-dark(${g}, ${b})`,i==="css-vars"&&(c[u(f,p)]=v)}else c[p]=v;else i==="css-vars"&&(c[u(f,p)]=v)}}),s.htmlStyle=c,s}function lb(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Lr.Italic&&(t["font-style"]="italic"),e.fontStyle&Lr.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Lr.Underline&&n.push("underline"),e.fontStyle&Lr.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function UT(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const hV=new WeakMap;function w0(e,t){hV.set(e,t)}function Hp(e){return hV.get(e)}class of{_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 of(Object.fromEntries(PCe(n).map(r=>[r,BT])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return NCe(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function NCe(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function BCe(e,t){if(!(e instanceof of))throw new qn("Invalid grammar state");return e.getInternalStack(t)}function zCe(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new qn(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...i.indexToPos(l),offset:l}}else{const a=i.lines[l.line];if(a===void 0)throw new qn(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${i.lines.length}`);let c=l.character;if(c<0&&(c=a.length+c),c<0||c>a.length)throw new qn(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${a.length}`);return{...l,character:c,offset:i.posToIndex(l.line,c)}}};const i=MCe(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));HCe(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return DCe(n,i)},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=Array.from(n.children).filter(h=>h.type==="element"&&h.tagName==="span");if(i.length!==r.converter.lines.length)throw new qn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(h,f,p,v){const S=i[h];let x="",g=-1,b=-1;if(f===0&&(g=0),p===0&&(b=0),p===Number.POSITIVE_INFINITY&&(b=S.children.length),g===-1||b===-1)for(let _=0;_<S.children.length;_++)x+=pV(S.children[_]),g===-1&&x.length===f&&(g=_+1),b===-1&&x.length===p&&(b=_+1);if(g===-1)throw new qn(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(b===-1)throw new qn(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const y=S.children.slice(g,b);if(!v.alwaysWrap&&y.length===S.children.length)a(S,v,"line");else if(!v.alwaysWrap&&y.length===1&&y[0].type==="element")a(y[0],v,"token");else{const _={type:"element",tagName:"span",properties:{},children:y};a(_,v,"wrapper"),S.children.splice(g,y.length,_)}}function l(h,f){i[h]=a(i[h],f,"line")}function a(h,f,p){const v=f.properties||{},S=f.transform||(x=>x);return h.tagName=f.tagName||"span",h.properties={...h.properties,...v,class:h.properties.class},f.properties?.class&&fV(h,f.properties.class),h=S(h,p)||h,h}const c=[],u=r.decorations.sort((h,f)=>f.start.offset-h.start.offset||h.end.offset-f.end.offset);for(const h of u){const{start:f,end:p}=h;if(f.line===p.line)s(f.line,f.character,p.character,h);else if(f.line<p.line){s(f.line,f.character,Number.POSITIVE_INFINITY,h);for(let v=f.line+1;v<p.line;v++)c.unshift(()=>l(v,h));s(p.line,0,p.character,h)}}c.forEach(h=>h())}}}function HCe(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new qn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],s=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,l=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,a=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,c=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(s||l||a||c){if(s&&l||a&&c||a&&n.start.offset===n.end.offset||l&&i.start.offset===i.end.offset)continue;throw new qn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function pV(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(pV).join(""):""}const $Ce=[zCe()];function cb(e){const t=FCe(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...$Ce]}function FCe(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var tc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],OE={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function UCe(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function U8(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function VCe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)OE[r]&&t.push({type:"setDecoration",value:OE[r]});else if(r<=29){const i=OE[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:tc[r-30]}});else if(r===38){const i=U8(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:tc[r-40]}});else if(r===48){const i=U8(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:tc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:tc[r-100+8]}})}return t}function qCe(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const l=UCe(r,s),a=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const c=VCe(l.sequence);for(const u of c)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of c)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}s=l.position}while(s<r.length);return i}}}var WCe={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function GCe(e=WCe){function t(a){return e[a]}function n(a){return`#${a.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let u=0;u<tc.length;u++)r.push(t(tc[u]));let a=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let h=0;h<6;h++)for(let f=0;f<6;f++)r.push(n([a[u],a[h],a[f]]));let c=8;for(let u=0;u<24;u++,c+=10)r.push(n([c,c,c]));return r}function s(a){return i()[a]}function l(a){switch(a.type){case"named":return t(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:l}}const KCe={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function YCe(e,t,n){const r=ab(e,n),i=S0(t),s=Object.fromEntries(tc.map(c=>{const u=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,h=e.colors?.[u];return[c,h||KCe[c]]})),l=GCe(s),a=qCe();return i.map(c=>a.parse(c[0]).map(u=>{let h,f;u.decorations.has("reverse")?(h=u.background?l.value(u.background):e.bg,f=u.foreground?l.value(u.foreground):e.fg):(h=u.foreground?l.value(u.foreground):e.fg,f=u.background?l.value(u.background):void 0),h=Ya(h,r),f=Ya(f,r),u.decorations.has("dim")&&(h=XCe(h));let p=Lr.None;return u.decorations.has("bold")&&(p|=Lr.Bold),u.decorations.has("italic")&&(p|=Lr.Italic),u.decorations.has("underline")&&(p|=Lr.Underline),u.decorations.has("strikethrough")&&(p|=Lr.Strikethrough),{content:u.value,offset:c[1],color:h,bgColor:f,fontStyle:p}}))}function XCe(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],s=r[1],l=r[2],a=r[3],c=Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${s}${s}${l}${l}${c}`}else if(r.length===3){const i=r[0],s=r[1],l=r[2];return`#${i}${i}${s}${s}${l}${l}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function kR(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(CR(i)||ER(r))return S0(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:l}=e.setTheme(r);if(i==="ansi")return YCe(s,t,n);const a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new qn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new qn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return ZCe(t,a,s,l,n)}function QCe(...e){if(e.length===2)return Hp(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(CR(i)||ER(s))throw new qn("Plain language does not have grammar state");if(i==="ansi")throw new qn("ANSI language does not have grammar state");const{theme:l,colorMap:a}=t.setTheme(s),c=t.getLanguage(i);return new of(OR(n,c,l,a,r).stateStack,c.name,l.name)}function ZCe(e,t,n,r,i){const s=OR(e,t,n,r,i),l=new of(s.stateStack,t.name,n.name);return w0(s.tokens,l),s.tokens}function OR(e,t,n,r,i){const s=ab(n,i),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:a=500}=i,c=S0(e);let u=i.grammarState?BCe(i.grammarState,n.name)??BT:i.grammarContextCode!=null?OR(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:BT,h=[];const f=[];for(let p=0,v=c.length;p<v;p++){const[S,x]=c[p];if(S===""){h=[],f.push([]);continue}if(l>0&&S.length>=l){h=[],f.push([{content:S,offset:x,color:"",fontStyle:0}]);continue}let g,b,y;i.includeExplanation&&(g=t.tokenizeLine(S,u,a),b=g.tokens,y=0);const _=t.tokenizeLine2(S,u,a),T=_.tokens.length/2;for(let E=0;E<T;E++){const k=_.tokens[2*E],A=E+1<T?_.tokens[2*E+2]:S.length;if(k===A)continue;const R=_.tokens[2*E+1],L=Ya(r[Od.getForeground(R)],s),z=Od.getFontStyle(R),D={content:S.substring(k,A),offset:x+k,color:L,fontStyle:z};if(i.includeExplanation){const $=[];if(i.includeExplanation!=="scopeName")for(const F of n.settings){let U;switch(typeof F.scope){case"string":U=F.scope.split(/,/).map(H=>H.trim());break;case"object":U=F.scope;break;default:continue}$.push({settings:F,selectors:U.map(H=>H.split(/ /))})}D.explanation=[];let N=0;for(;k+N<A;){const F=b[y],U=S.substring(F.startIndex,F.endIndex);N+=U.length,D.explanation.push({content:U,scopes:i.includeExplanation==="scopeName"?JCe(F.scopes):eEe($,F.scopes)}),y+=1}}h.push(D)}f.push(h),h=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function JCe(e){return e.map(t=>({scopeName:t}))}function eEe(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];n[r]={scopeName:s,themeMatches:nEe(e,s,t.slice(0,r))}}return n}function V8(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function tEe(e,t,n){if(!V8(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)V8(e[r],n[i])&&(r-=1),i-=1;return r===-1}function nEe(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const l of i)if(tEe(l,t,n)){r.push(s);break}return r}function mV(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=r.map(c=>{const u=kR(e,t,{...n,theme:c.theme}),h=Hp(u),f=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:u,state:h,theme:f}}),s=rEe(...i.map(c=>c.tokens)),l=s[0].map((c,u)=>c.map((h,f)=>{const p={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=h.explanation),s.forEach((v,S)=>{const{content:x,explanation:g,offset:b,...y}=v[u][f];p.variants[r[S].color]=y}),p})),a=i[0].state?new of(Object.fromEntries(i.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),i[0].state.lang):void 0;return a&&w0(l,a),l}function rEe(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),s=t.map(()=>[]);t.forEach((c,u)=>c.push(s[u]));const l=i.map(()=>0),a=i.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const h=a[u];h.content.length===c?(s[u].push(h),l[u]+=1,a[u]=i[u][l[u]]):(s[u].push({...h,content:h.content.slice(0,c)}),a[u]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}function ub(e,t,n){let r,i,s,l,a,c;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:h="--shiki-",colorsRendering:f="css-vars"}=n,p=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,y)=>b.color===u?-1:y.color===u?1:0);if(p.length===0)throw new qn("`themes` option must not be empty");const v=mV(e,t,n);if(c=Hp(v),u&&TR!==u&&!p.find(b=>b.color===u))throw new qn(`\`themes\` option must contain the defaultColor key \`${u}\``);const S=p.map(b=>e.getTheme(b.theme)),x=p.map(b=>b.color);s=v.map(b=>b.map(y=>ICe(y,x,h,u,f))),c&&w0(s,c);const g=p.map(b=>ab(b.theme,n));i=q8(p,S,g,h,u,"fg",f),r=q8(p,S,g,h,u,"bg",f),l=`shiki-themes ${S.map(b=>b.name).join(" ")}`,a=u?void 0:[i,r].join(";")}else if("theme"in n){const u=ab(n.theme,n);s=kR(e,t,n);const h=e.getTheme(n.theme);r=Ya(h.bg,u),i=Ya(h.fg,u),l=h.name,c=Hp(s)}else throw new qn("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:l,rootStyle:a,grammarState:c}}function q8(e,t,n,r,i,s,l){return e.map((a,c)=>{const u=Ya(t[c][s],n[c])||"inherit",h=`${r+a.color}${s==="bg"?"-bg":""}:${u}`;if(c===0&&i){if(i===TR&&e.length>1){const f=e.findIndex(x=>x.color==="light"),p=e.findIndex(x=>x.color==="dark");if(f===-1||p===-1)throw new qn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=Ya(t[f][s],n[f])||"inherit",S=Ya(t[p][s],n[p])||"inherit";return`light-dark(${v}, ${S});${h}`}return u}return l==="css-vars"?h:null}).filter(a=>!!a).join(";")}function db(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>db(e,i,s),codeToTokens:(i,s)=>ub(e,i,s)}){let i=t;for(const S of cb(n))i=S.preprocess?.call(r,i,n)||i;let{tokens:s,fg:l,bg:a,themeName:c,rootStyle:u,grammarState:h}=ub(e,i,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:p=!1}=n;f===!0?s=sEe(s):f==="never"&&(s=oEe(s)),p&&(s=aEe(s));const v={...r,get source(){return i}};for(const S of cb(n))s=S.tokens?.call(v,s)||s;return iEe(s,{...n,fg:l,bg:a,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},v,h)}function iEe(e,t,n,r=Hp(e)){const i=cb(t),s=[],l={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(u.tabindex=c.toString());for(const[x,g]of Object.entries(t.meta||{}))x.startsWith("_")||(u[x]=g);let h={type:"element",tagName:"pre",properties:u,children:[]},f={type:"element",tagName:"code",properties:{},children:s};const p=[],v={...n,structure:a,addClassToHast:fV,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return h},get code(){return f},get lines(){return p}};if(e.forEach((x,g)=>{g&&(a==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
|
|
116
|
+
`}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const _ of x){let T={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const E=UT(_.htmlStyle||lb(_));E&&(T.properties.style=E);for(const k of i)T=k?.span?.call(v,T,g+1,y,b,_)||T;a==="inline"?l.children.push(T):a==="classic"&&b.children.push(T),y+=_.content.length}if(a==="classic"){for(const _ of i)b=_?.line?.call(v,b,g+1)||b;p.push(b),s.push(b)}else a==="inline"&&p.push(b)}),a==="classic"){for(const x of i)f=x?.code?.call(v,f)||f;h.children.push(f);for(const x of i)h=x?.pre?.call(v,h)||h;l.children.push(h)}else if(a==="inline"){const x=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of l.children)_.type==="element"&&_.tagName==="br"?(x.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&g.children.push(_);x.push(g);let y={type:"element",tagName:"code",properties:{},children:x};for(const _ of i)y=_?.code?.call(v,y)||y;l.children=[];for(let _=0;_<y.children.length;_++){_>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const T=y.children[_];T.type==="element"&&l.children.push(...T.children)}}let S=l;for(const x of i)S=x?.root?.call(v,S)||S;return r&&w0(S,r),S}function sEe(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((s,l)=>{const c=!(s.fontStyle&&(s.fontStyle&Lr.Underline||s.fontStyle&Lr.Strikethrough));c&&s.content.match(/^\s+$/)&&t[l+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(c?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=void 0,r=""):n.push(s)}),n})}function oEe(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,l]=r;if(!i&&!l)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),l&&a.push({content:l,offset:n.offset+i.length+s.length}),a}))}function aEe(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],s=UT(i.htmlStyle||lb(i)),l=UT(r.htmlStyle||lb(r)),a=i.fontStyle&&(i.fontStyle&Lr.Underline||i.fontStyle&Lr.Strikethrough),c=r.fontStyle&&(r.fontStyle&Lr.Underline||r.fontStyle&Lr.Strikethrough);!a&&!c&&s===l?i.content+=r.content:n.push({...r})}return n})}const lEe=OCe;function cEe(e,t,n){const r={meta:{},options:n,codeToHast:(s,l)=>db(e,s,l),codeToTokens:(s,l)=>ub(e,s,l)};let i=lEe(db(e,t,n,r));for(const s of cb(n))i=s.postprocess?.call(r,i,n)||i;return i}const W8={light:"#333333",dark:"#bbbbbb"},G8={light:"#fffffe",dark:"#1e1e1e"},K8="__shiki_resolved";function RR(e){if(e?.[K8])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const a=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?W8.light:W8.dark),n||(n=t.type==="light"?G8.light:G8.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;const s=new Map;function l(a){if(s.has(a))return s.get(a);i+=1;const c=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?l(a):(s.set(a,c),c)}t.settings=t.settings.map(a=>{const c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!u)return a;const h={...a,settings:{...a.settings}};if(c){const f=l(a.settings.foreground);t.colorReplacements[f]=a.settings.foreground,h.settings.foreground=f}if(u){const f=l(a.settings.background);t.colorReplacements[f]=a.settings.background,h.settings.background=f}return h});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const c=l(t.colors[a]);t.colorReplacements[c]=t.colors[a],t.colors[a]=c}return Object.defineProperty(t,K8,{enumerable:!1,writable:!1,value:!0}),t}async function gV(e){return Array.from(new Set((await Promise.all(e.filter(t=>!uV(t)).map(async t=>await cV(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function vV(e){return(await Promise.all(e.map(async n=>dV(n)?null:RR(await cV(n))))).filter(n=>!!n)}let uEe=3;function dEe(e,t=3){t>uEe||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Iu=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function yV(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Iu(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class fEe extends pwe{constructor(t,n,r,i={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=RR(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=nb.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=yV(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,s])=>!s);if(r.length){const i=n.filter(([s,l])=>l?(l.embeddedLanguages||l.embeddedLangs)?.some(c=>r.map(([u])=>u).includes(c)):!1).filter(s=>!r.includes(s));throw new Iu(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of n)this._resolver.addLanguage(s);for(const[i,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class hEe{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let bh=0;function pEe(e){bh+=1,e.warnings!==!1&&bh>=10&&bh%10===0&&console.warn(`[Shiki] ${bh} 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 Iu("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(RR),i=new hEe(e.engine,n),s=new fEe(i,r,n,e.langAlias);let l;function a(_){return yV(_,e.langAlias)}function c(_){b();const T=s.getGrammar(typeof _=="string"?_:_.name);if(!T)throw new Iu(`Language \`${_}\` not found, you may need to load it first`);return T}function u(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const T=s.getTheme(_);if(!T)throw new Iu(`Theme \`${_}\` not found, you may need to load it first`);return T}function h(_){b();const T=u(_);l!==_&&(s.setTheme(T),l=_);const E=s.getColorMap();return{theme:T,colorMap:E}}function f(){return b(),s.getLoadedThemes()}function p(){return b(),s.getLoadedLanguages()}function v(..._){b(),s.loadLanguages(_.flat(1))}async function S(..._){return v(await gV(_))}function x(..._){b();for(const T of _.flat(1))s.loadTheme(T)}async function g(..._){return b(),x(await vV(_))}function b(){if(t)throw new Iu("Shiki instance has been disposed")}function y(){t||(t=!0,s.dispose(),bh-=1)}return{setTheme:h,getTheme:u,getLanguage:c,getLoadedThemes:f,getLoadedLanguages:p,resolveLangAlias:a,loadLanguage:S,loadLanguageSync:v,loadTheme:g,loadThemeSync:x,dispose:y,[Symbol.dispose]:y}}async function mEe(e){e.engine||dEe("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([vV(e.themes||[]),gV(e.langs||[]),e.engine]);return pEe({...e,themes:t,langs:n,engine:r})}async function gEe(e){const t=await mEe(e);return{getLastGrammarState:(...n)=>QCe(t,...n),codeToTokensBase:(n,r)=>kR(t,n,r),codeToTokensWithThemes:(n,r)=>mV(t,n,r),codeToTokens:(n,r)=>ub(t,n,r),codeToHast:(n,r)=>db(t,n,r),codeToHtml:(n,r)=>cEe(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function vEe(e){const t=e.langs,n=e.themes,r=e.engine;async function i(s){function l(f){if(typeof f=="string"){if(f=s.langAlias?.[f]||f,uV(f))return[];const p=t[f];if(!p)throw new qn(`Language \`${f}\` is not included in this bundle. You may want to load it from external source.`);return p}return f}function a(f){if(dV(f))return"none";if(typeof f=="string"){const p=n[f];if(!p)throw new qn(`Theme \`${f}\` is not included in this bundle. You may want to load it from external source.`);return p}return f}const c=(s.themes??[]).map(f=>a(f)),u=(s.langs??[]).map(f=>l(f)),h=await gEe({engine:s.engine??r(),...s,themes:c,langs:u});return{...h,loadLanguage(...f){return h.loadLanguage(...f.map(l))},loadTheme(...f){return h.loadTheme(...f.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}const bV=[{id:"abap",name:"ABAP",import:(()=>se(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>se(()=>import("./actionscript-3-CfeIJUat.js"),[]))},{id:"ada",name:"Ada",import:(()=>se(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>se(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>se(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>se(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>se(()=>import("./apex-DDbsPZ6N.js"),[]))},{id:"apl",name:"APL",import:(()=>se(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>se(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>se(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>se(()=>import("./asciidoc-Dv7Oe6Be.js"),[]))},{id:"asm",name:"Assembly",import:(()=>se(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>se(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>se(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>se(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>se(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>se(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>se(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>se(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>se(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"blade",name:"Blade",import:(()=>se(()=>import("./blade-DVc8C-J4.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>se(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>se(()=>import("./c-BIGW1oBm.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>se(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>se(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>se(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>se(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>se(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>se(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>se(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>se(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>se(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>se(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>se(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>se(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>se(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>se(()=>import("./csharp-K5feNrxe.js"),[]))},{id:"css",name:"CSS",import:(()=>se(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>se(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>se(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>se(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>se(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>se(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>se(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>se(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>se(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>se(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>se(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>se(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>se(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>se(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>se(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>se(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>se(()=>import("./erb-BOJIQeun.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>se(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>se(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>se(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>se(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>se(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>se(()=>import("./fortran-free-form-D22FLkUw.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>se(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",import:(()=>se(()=>import("./gdresource-B7Tvp0Sc.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",import:(()=>se(()=>import("./gdscript-DTMYz4Jt.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>se(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>se(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>se(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>se(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>se(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>se(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>se(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>se(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>se(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gnuplot",name:"Gnuplot",import:(()=>se(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>se(()=>import("./go-Dn2_MT6a.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>se(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>se(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>se(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>se(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>se(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>se(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>se(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>se(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>se(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>se(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>se(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>se(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>se(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>se(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>se(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>se(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>se(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>se(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>se(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>se(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>se(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>se(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>se(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>se(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>se(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>se(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>se(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>se(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>se(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>se(()=>import("./julia-C8NyazO9.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"kdl",name:"KDL",import:(()=>se(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>se(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>se(()=>import("./kusto-BvAqAH-y.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>se(()=>import("./latex-BdAV_C_H.js"),__vite__mapDeps([63,64,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>se(()=>import("./lean-Bc6EcWN3.js"),[]))},{id:"less",name:"Less",import:(()=>se(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>se(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([65,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>se(()=>import("./llvm-BtvRca6l.js"),[]))},{id:"log",name:"Log file",import:(()=>se(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>se(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>se(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>se(()=>import("./luau-CXu1NL6O.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>se(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>se(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>se(()=>import("./marko-CPi9NSCl.js"),__vite__mapDeps([66,3,67,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>se(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>se(()=>import("./mdc-DUICxH0z.js"),__vite__mapDeps([68,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>se(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>se(()=>import("./mermaid-DKYwYmdq.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>se(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>se(()=>import("./mojo-1DNp92w6.js"),[]))},{id:"move",name:"Move",import:(()=>se(()=>import("./move-Bu9oaDYs.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>se(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>se(()=>import("./nextflow-BrzmwbiE.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>se(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([69,37,26])))},{id:"nim",name:"Nim",import:(()=>se(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([70,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>se(()=>import("./nix-c8nO5XWb.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>se(()=>import("./nushell-C-sUppwS.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>se(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>se(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>se(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>se(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>se(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>se(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([71,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>se(()=>import("./php-CDn_0X-4.js"),__vite__mapDeps([72,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>se(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>se(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>se(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>se(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>se(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>se(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>se(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>se(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>se(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>se(()=>import("./proto-DyJlTyXw.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>se(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([73,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>se(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>se(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>se(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>se(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([74,2])))},{id:"qmldir",name:"QML Directory",import:(()=>se(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>se(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>se(()=>import("./r-DiinP2Uv.js"),[]))},{id:"racket",name:"Racket",import:(()=>se(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>se(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>se(()=>import("./razor-CE9lU5zL.js"),__vite__mapDeps([75,1,2,3,76])))},{id:"reg",name:"Windows Registry Script",import:(()=>se(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>se(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>se(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>se(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>se(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>se(()=>import("./rst-B0xPkSld.js"),__vite__mapDeps([77,15,1,2,3,23,24,25,26,16,20,28,38,78,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>se(()=>import("./ruby-BvKwtOVI.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>se(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>se(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([79,16])))},{id:"sass",name:"Sass",import:(()=>se(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>se(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>se(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>se(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>se(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>se(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([80,81])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>se(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>se(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([82,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>se(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>se(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>se(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([83,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>se(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([84,85])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>se(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>se(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>se(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>se(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([86,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>se(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>se(()=>import("./svelte-3Dk4HxPD.js"),__vite__mapDeps([87,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>se(()=>import("./swift-Dg5xB15N.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>se(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>se(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>se(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>se(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>se(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>se(()=>import("./templ-W15q3VgB.js"),__vite__mapDeps([88,89,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>se(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>se(()=>import("./tex-CxkMU7Pf.js"),__vite__mapDeps([64,62])))},{id:"toml",name:"TOML",import:(()=>se(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>se(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([90,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>se(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>se(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>se(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>se(()=>import("./twig-CO9l9SDP.js"),__vite__mapDeps([91,3,2,5,72,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>se(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>se(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>se(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>se(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>se(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>se(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>se(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>se(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>se(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>se(()=>import("./vue-DnHKYNfI.js"),__vite__mapDeps([92,3,2,11,9,15,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>se(()=>import("./vue-html-CChd_i61.js"),__vite__mapDeps([93,92,3,2,11,9,15,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>se(()=>import("./vue-vine-8moa0y9V.js"),__vite__mapDeps([94,3,5,67,95,12,92,2,11,9,15,1])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>se(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>se(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>se(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>se(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>se(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>se(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>se(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>se(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>se(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([96,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>se(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>se(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>se(()=>import("./zig-VOosw3JB.js"),[]))}],yEe=Object.fromEntries(bV.map(e=>[e.id,e.import])),bEe=Object.fromEntries(bV.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),_Ee={...yEe,...bEe},xEe=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>se(()=>import("./andromeeda-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>se(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>se(()=>import("./ayu-dark-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>se(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>se(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>se(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>se(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>se(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>se(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>se(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>se(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>se(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>se(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>se(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>se(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>se(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>se(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>se(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>se(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>se(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>se(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>se(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>se(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>se(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>se(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>se(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>se(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>se(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>se(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>se(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>se(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>se(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>se(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>se(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>se(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>se(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>se(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>se(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>se(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>se(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>se(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>se(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>se(()=>import("./one-light-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>se(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>se(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>se(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>se(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>se(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>se(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>se(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>se(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>se(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>se(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>se(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>se(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>se(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>se(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>se(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>se(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>se(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],SEe=Object.fromEntries(xEe.map(e=>[e.id,e.import]));class AR extends Error{constructor(t){super(t),this.name="ShikiError"}}function wEe(){return 2147483648}function CEe(){return typeof performance<"u"?performance.now():Date.now()}const EEe=(e,t)=>e+(t-e%t)%t;async function TEe(e){let t,n;const r={};function i(v){n=v,r.HEAPU8=new Uint8Array(v),r.HEAPU32=new Uint32Array(v)}function s(v,S,x){r.HEAPU8.copyWithin(v,S,S+x)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(v){const S=r.HEAPU8.length;v=v>>>0;const x=wEe();if(v>x)return!1;for(let g=1;g<=4;g*=2){let b=S*(1+.2/g);b=Math.min(b,v+100663296);const y=Math.min(x,EEe(Math.max(v,b),65536));if(l(y))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(v,S,x=1024){const g=S+x;let b=S;for(;v[b]&&!(b>=g);)++b;if(b-S>16&&v.buffer&&c)return c.decode(v.subarray(S,b));let y="";for(;S<b;){let _=v[S++];if(!(_&128)){y+=String.fromCharCode(_);continue}const T=v[S++]&63;if((_&224)===192){y+=String.fromCharCode((_&31)<<6|T);continue}const E=v[S++]&63;if((_&240)===224?_=(_&15)<<12|T<<6|E:_=(_&7)<<18|T<<12|E<<6|v[S++]&63,_<65536)y+=String.fromCharCode(_);else{const k=_-65536;y+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return y}function h(v,S){return v?u(r.HEAPU8,v,S):""}const f={emscripten_get_now:CEe,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function p(){const S=await e({env:f,wasi_snapshot_preview1:f});t=S.memory,i(t.buffer),Object.assign(r,S),r.UTF8ToString=h}return await p(),r}var kEe=Object.defineProperty,OEe=(e,t,n)=>t in e?kEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nr=(e,t,n)=>OEe(e,typeof t!="symbol"?t+"":t,n);let dr=null;function REe(e){throw new AR(e.UTF8ToString(e.getLastOnigError()))}class C0{constructor(t){nr(this,"utf16Length"),nr(this,"utf8Length"),nr(this,"utf16Value"),nr(this,"utf8Value"),nr(this,"utf16OffsetToUtf8"),nr(this,"utf8OffsetToUtf16");const n=t.length,r=C0._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=n);const a=new Uint8Array(r);let c=0;for(let u=0;u<n;u++){const h=t.charCodeAt(u);let f=h,p=!1;if(h>=55296&&h<=56319&&u+1<n){const v=t.charCodeAt(u+1);v>=56320&&v<=57343&&(f=(h-55296<<10)+65536|v-56320,p=!0)}i&&(s[u]=c,p&&(s[u+1]=c),f<=127?l[c+0]=u:f<=2047?(l[c+0]=u,l[c+1]=u):f<=65535?(l[c+0]=u,l[c+1]=u,l[c+2]=u):(l[c+0]=u,l[c+1]=u,l[c+2]=u,l[c+3]=u)),f<=127?a[c++]=f:f<=2047?(a[c++]=192|(f&1984)>>>6,a[c++]=128|(f&63)>>>0):f<=65535?(a[c++]=224|(f&61440)>>>12,a[c++]=128|(f&4032)>>>6,a[c++]=128|(f&63)>>>0):(a[c++]=240|(f&1835008)>>>18,a[c++]=128|(f&258048)>>>12,a[c++]=128|(f&4032)>>>6,a[c++]=128|(f&63)>>>0),p&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const s=t.charCodeAt(r);let l=s,a=!1;if(s>=55296&&s<=56319&&r+1<i){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(l=(s-55296<<10)+65536|c-56320,a=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const E0=class Bs{constructor(t){if(nr(this,"id",++Bs.LAST_ID),nr(this,"_onigBinding"),nr(this,"content"),nr(this,"utf16Length"),nr(this,"utf8Length"),nr(this,"utf16OffsetToUtf8"),nr(this,"utf8OffsetToUtf16"),nr(this,"ptr"),!dr)throw new AR("Must invoke loadWasm first.");this._onigBinding=dr,this.content=t;const n=new C0(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Bs._sharedPtrInUse?(Bs._sharedPtr||(Bs._sharedPtr=dr.omalloc(1e4)),Bs._sharedPtrInUse=!0,dr.HEAPU8.set(n.utf8Value,Bs._sharedPtr),this.ptr=Bs._sharedPtr):this.ptr=n.createString(dr)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Bs._sharedPtr?Bs._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};nr(E0,"LAST_ID",0);nr(E0,"_sharedPtr",0);nr(E0,"_sharedPtrInUse",!1);let _V=E0;class AEe{constructor(t){if(nr(this,"_onigBinding"),nr(this,"_ptr"),!dr)throw new AR("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,c=t.length;a<c;a++){const u=new C0(t[a]);n[a]=u.createString(dr),r[a]=u.utf8Length}const i=dr.omalloc(4*t.length);dr.HEAPU32.set(n,i/4);const s=dr.omalloc(4*t.length);dr.HEAPU32.set(r,s/4);const l=dr.createOnigScanner(i,s,t.length);for(let a=0,c=t.length;a<c;a++)dr.ofree(n[a]);dr.ofree(s),dr.ofree(i),l===0&&REe(dr),this._onigBinding=dr,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new _V(t);const s=this._findNextMatchSync(t,n,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(l===0)return null;const a=s.HEAPU32;let c=l/4;const u=a[c++],h=a[c++],f=[];for(let p=0;p<h;p++){const v=t.convertUtf8OffsetToUtf16(a[c++]),S=t.convertUtf8OffsetToUtf16(a[c++]);f[p]={start:v,end:S,length:S-v}}return{index:u,captureIndices:f}}}function PEe(e){return typeof e.instantiator=="function"}function MEe(e){return typeof e.default=="function"}function LEe(e){return typeof e.data<"u"}function jEe(e){return typeof Response<"u"&&e instanceof Response}function DEe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let yv;function IEe(e){if(yv)return yv;async function t(){dr=await TEe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),PEe(r)?r=await r.instantiator(n):MEe(r)?r=await r.default(n):(LEe(r)&&(r=r.data),jEe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await NEe(r)(n):r=await BEe(r)(n):DEe(r)?r=await RE(r)(n):r instanceof WebAssembly.Module?r=await RE(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await RE(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return yv=t(),yv}function RE(e){return t=>WebAssembly.instantiate(e,t)}function NEe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function BEe(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function zEe(e){return e&&await IEe(e),{createScanner(t){return new AEe(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new _V(t)}}}const HEe=vEe({langs:_Ee,themes:SEe,engine:()=>zEe(se(()=>import("./wasm-CG6Dc4jp.js"),[]))});let bv=null,_v=null;const $Ee=["typescript","tsx","javascript","jsx","json","css","html","markdown","yaml","toml","bash","shell","python","rust","go","sql","diff","plaintext"];async function FEe(){return bv||_v||(_v=HEe({themes:["github-dark"],langs:$Ee}),bv=await _v,bv)}async function UEe(e,t){const n=await FEe(),r=VEe(t);if(!n.getLoadedLanguages().includes(r))try{await n.loadLanguage(r)}catch{return n.codeToHtml(e,{lang:"plaintext",theme:"github-dark"})}return n.codeToHtml(e,{lang:r,theme:"github-dark"})}function VEe(e){return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rb:"ruby",rs:"rust",sh:"bash",yml:"yaml",md:"markdown"}[e]||e}function qEe(e){const t=e.split(".").pop()?.toLowerCase()||"";return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",json:"json",css:"css",html:"html",md:"markdown",yaml:"yaml",yml:"yaml",toml:"toml",sh:"bash",bash:"bash",zsh:"bash",py:"python",rs:"rust",go:"go",sql:"sql",diff:"diff",txt:"plaintext"}[t]||"plaintext"}function Y8({filePath:e,content:t,isLoading:n,error:r,onClose:i}){const[s,l]=O.useState(null),[a,c]=O.useState(!1),[u,h]=O.useState(!0);if(O.useEffect(()=>{if(!t||!e){l(null);return}if(t.mimeType.startsWith("image/")||t.mimeType==="application/octet-stream"){l(null);return}c(!0);const p=qEe(e);UEe(t.content,p).then(v=>{l(v),c(!1)}).catch(()=>{l(null),c(!1)})},[t,e]),!e)return w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Select a file to view"});if(n)return w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Loading file..."});if(r)return w.jsx("div",{className:"flex h-full items-center justify-center text-destructive text-sm",children:r.message});if(!t)return w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Unable to load file"});if(t.mimeType==="application/octet-stream")return w.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-muted-foreground text-sm gap-2",children:[w.jsx("p",{children:"Binary file"}),w.jsxs("p",{className:"text-xs",children:[(t.size/1024).toFixed(1)," KB"]})]});if(t.mimeType.startsWith("image/"))return w.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[w.jsxs("div",{className:"flex shrink-0 items-center justify-between px-2 py-1.5 bg-muted/50 border-b border-border text-xs",children:[w.jsx("span",{className:"text-muted-foreground truncate",title:e,children:e.split("/").pop()||e}),w.jsx("button",{onClick:i,className:"p-1 text-muted-foreground hover:text-foreground rounded hover:bg-muted/50",title:"Close file",children:w.jsx(be,{icon:Cs,size:14,strokeWidth:2})})]}),w.jsx("div",{className:"flex flex-1 items-center justify-center p-4 bg-[#0d1117]",children:w.jsx("img",{src:t.content,alt:e,className:"max-w-full max-h-full object-contain"})})]});const f=e.split("/").pop()||e;return w.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[w.jsxs("div",{className:"flex shrink-0 items-center gap-3 px-2 py-1.5 bg-muted/50 border-b border-border text-xs",children:[w.jsx("span",{className:"text-muted-foreground truncate flex-1",title:e,children:f}),t.truncated&&w.jsxs("span",{className:"text-yellow-500",children:["Truncated (",t.lineCount.toLocaleString()," lines)"]}),w.jsxs("span",{className:"text-muted-foreground",children:[(t.size/1024).toFixed(1)," KB"]}),w.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer text-muted-foreground hover:text-foreground",children:[w.jsx("input",{type:"checkbox",checked:u,onChange:p=>h(p.target.checked),className:"w-3 h-3"}),"Wrap"]}),w.jsx("button",{onClick:i,className:"p-1 text-muted-foreground hover:text-foreground rounded hover:bg-muted/50",title:"Close file",children:w.jsx(be,{icon:Cs,size:14,strokeWidth:2})})]}),w.jsx(rd,{className:"flex-1 min-h-0",children:a?w.jsx("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm",children:"Highlighting..."}):s?w.jsx("div",{className:Be("text-xs [&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-2 [&_code]:!bg-transparent",u?"[&_pre]:whitespace-pre-wrap [&_pre]:break-all":"[&_pre]:whitespace-pre"),dangerouslySetInnerHTML:{__html:s}}):w.jsx("pre",{className:Be("p-2 font-mono text-xs",u?"whitespace-pre-wrap break-all":"whitespace-pre"),children:t.content})})]})}function X8({taskId:e,worktreePath:t}){const{selectedFile:n,expandedDirs:r,setSelectedFile:i,toggleDir:s,collapseAll:l}=ESe(e),[a,c]=O.useState("tree"),u=$b(),{data:h,isLoading:f,error:p}=xre(t),{data:v,isLoading:S,error:x}=Sre(t,n),g=O.useCallback(_=>{i(_),window.matchMedia("(max-width: 639px)").matches&&c("content")},[i]),b=O.useCallback(()=>{i(null),window.matchMedia("(max-width: 639px)").matches&&c("tree")},[i]),y=O.useCallback(_=>{s(_)},[s]);return t?f?w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Loading files..."}):p?w.jsx("div",{className:"flex h-full items-center justify-center text-destructive text-sm",children:p.message}):u?w.jsxs(qa,{value:a,onValueChange:_=>c(_),className:"flex h-full flex-col",children:[w.jsx("div",{className:"shrink-0 border-b border-border px-2 py-1",children:w.jsxs(Wa,{className:"w-full",children:[w.jsx(Sr,{value:"tree",className:"flex-1",children:"Files"}),w.jsx(Sr,{value:"content",className:"flex-1",children:"Content"})]})}),w.jsx(Ar,{value:"tree",className:"flex-1 min-h-0 overflow-hidden",children:w.jsx(rd,{className:"h-full",children:w.jsx(E8,{entries:h?.entries||[],selectedFile:n,expandedDirs:r,onSelectFile:g,onToggleDir:y,onCollapseAll:l})})}),w.jsx(Ar,{value:"content",className:"flex-1 min-h-0 overflow-hidden",children:w.jsx(Y8,{filePath:n,content:v??null,isLoading:S,error:x,onClose:b})})]}):w.jsxs($l,{direction:"horizontal",className:"h-full",children:[w.jsx(Vi,{defaultSize:65,minSize:30,className:"overflow-hidden",children:w.jsx(Y8,{filePath:n,content:v??null,isLoading:S,error:x,onClose:b})}),w.jsx(Fl,{withHandle:!0}),w.jsx(Vi,{defaultSize:35,minSize:15,children:w.jsx(rd,{className:"h-full",children:w.jsx(E8,{entries:h?.entries||[],selectedFile:n,expandedDirs:r,onSelectFile:g,onToggleDir:y,onCollapseAll:l})})})]}):w.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"No worktree selected"})}const xV=ts("/tasks/$taskId")({component:GEe}),Q8={IN_PROGRESS:"In Progress",IN_REVIEW:"In Review",DONE:"Done",CANCELED:"Canceled"},WEe={IN_PROGRESS:"bg-blue-500/20 text-blue-500",IN_REVIEW:"bg-yellow-500/20 text-yellow-600",DONE:"bg-green-500/20 text-green-600",CANCELED:"bg-red-500/20 text-red-500"};function GEe(){const{taskId:e}=xV.useParams(),t=Qa(),n=gK(),{data:r,isLoading:i}=mz(e),s=Zk(),l=gre(),{tab:a,setTab:c}=Wxe(e),u=Kz(),h=Yz(),f=Xz(),p=Qz(),{data:v}=zb(),{data:S}=Hb(),{data:x}=Gxe(r?.linearTicketId??null),g=n.state,b=g?.aiMode&&g?.description?g.aiMode:void 0,y=g?.description,[_,T]=O.useState(!1),[E,k]=O.useState(!1),[A,R]=O.useState(!1),[L,z]=O.useState(null),[D,$]=O.useState(!1),[N,F]=O.useState(!1),[U,H]=O.useState(null),[K,W]=O.useState(!1),[I,G]=O.useState(!1),[j,B]=O.useState(null),[V,X]=O.useState(!1),[re,ie]=O.useState(!1),[Q,Y]=O.useState(!1),[J,ee]=O.useState("terminal"),ne=$b(),{terminals:te,writeToTerminal:le}=cO();O.useEffect(()=>{if(N){const xe=setTimeout(()=>F(!1),3e3);return()=>clearTimeout(xe)}},[N]),O.useEffect(()=>{if(I){const xe=setTimeout(()=>G(!1),3e3);return()=>clearTimeout(xe)}},[I]),O.useEffect(()=>{if(re){const xe=setTimeout(()=>ie(!1),3e3);return()=>clearTimeout(xe)}},[re]);const fe=async()=>{if(!(!r?.repoPath||!r?.worktreePath)){z(null),F(!1);try{await u.mutateAsync({repoPath:r.repoPath,worktreePath:r.worktreePath,baseBranch:r.baseBranch}),F(!0)}catch(xe){const Ce=xe instanceof Error?xe.message:"Sync failed";z(Ce),$(!0)}}},pe=()=>{if(!r||!L)return"";const xe=r.baseBranch||"main";return`Fix the git sync issue. Worktree: ${r.worktreePath} | Parent repo: ${r.repoPath} | Branch: ${r.branch} | Base: ${xe} | Error: ${L} | Steps: 1) Check git status 2) Resolve conflicts or commit/stash changes 3) Rebase onto the parent repo's ${xe} branch`},de=()=>{if(!r||!U)return"";const xe=r.baseBranch||"main";return`Fix the git merge issue. Worktree: ${r.worktreePath} | Parent repo: ${r.repoPath} | Branch: ${r.branch} | Base: ${xe} | Error: ${U} | Steps: 1) Check git status in both worktree and parent 2) Resolve any conflicts 3) Ensure worktree changes are committed 4) Retry merge to ${xe} 5) On successful merge, run: vibora tasks move ${r.id} --status done`},ue=async()=>{if(!(!r?.repoPath||!r?.worktreePath)){H(null),G(!1);try{await h.mutateAsync({repoPath:r.repoPath,worktreePath:r.worktreePath,baseBranch:r.baseBranch}),G(!0),p.mutate(r.id),s.mutate({taskId:r.id,updates:{status:"DONE"}})}catch(xe){const Ce=xe instanceof Error?xe.message:"Merge failed";H(Ce),W(!0)}}},Ie=async()=>{if(r?.repoPath){B(null),ie(!1);try{await f.mutateAsync({repoPath:r.repoPath,baseBranch:r.baseBranch}),ie(!0)}catch(xe){const Ce=xe instanceof Error?xe.message:"Sync parent failed";B(Ce),X(!0)}}},Le=()=>{if(!r||!j)return"";const xe=r.baseBranch||"main";return`Fix the git sync parent issue. Parent repo: ${r.repoPath} | Base branch: ${xe} | Error: ${j} | Steps: 1) Check git status in parent repo 2) Resolve any local changes or divergence 3) Fetch and merge/rebase from origin/${xe}`},we=te.find(xe=>xe.cwd===r?.worktreePath),_e=()=>{if(!we)return;const xe=pe();le(we.id,xe+"\r"),$(!1)},Pe=()=>{if(!we)return;const Ce=`claude -p "${pe().replace(/"/g,'\\"')}" --dangerously-skip-permissions\r`;le(we.id,Ce),$(!1)},me=()=>{if(!we)return;const xe=de();le(we.id,xe+"\r"),W(!1)},Ae=()=>{if(!we)return;const Ce=`claude -p "${de().replace(/"/g,'\\"')}" --dangerously-skip-permissions\r`;le(we.id,Ce),W(!1)},Te=()=>{if(!we)return;const xe=Le();le(we.id,xe+"\r"),X(!1)},We=()=>{if(!we)return;const Ce=`claude -p "${Le().replace(/"/g,'\\"')}" --dangerously-skip-permissions\r`;le(we.id,Ce),X(!1)},rt=()=>{Y(!0)},Ue=()=>{if(!r?.worktreePath)return;const xe=ry(r.worktreePath,v,S);window.open(xe,"_blank"),Y(!1)},ot=()=>{if(!r?.repoPath)return;const xe=ry(r.repoPath,v,S);window.open(xe,"_blank"),Y(!1)},tt=xe=>{r&&s.mutate({taskId:r.id,updates:{status:xe}})},mt=()=>{r&&l.mutate({taskId:r.id,deleteLinkedWorktree:A},{onSuccess:()=>{t({to:"/tasks"})}})},Ee=xe=>{k(xe),xe||R(!1)};return i?w.jsx("div",{className:"flex h-full items-center justify-center",children:w.jsx("p",{className:"text-muted-foreground",children:"Loading task..."})}):r?w.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[w.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-2",children:[w.jsxs("div",{className:"flex-1",children:[w.jsxs("div",{className:"flex items-center gap-1.5",children:[w.jsx("h1",{className:"text-sm font-medium",children:r.title}),w.jsx("button",{type:"button",className:"p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",onClick:()=>T(!0),title:"Task settings",children:w.jsx(be,{icon:s7,size:14,strokeWidth:2})})]}),w.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsx("span",{children:r.repoName}),w.jsx(be,{icon:YE,size:12,strokeWidth:2}),w.jsx("span",{className:"font-mono",children:r.branch}),r.prUrl&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-muted-foreground/50",children:"•"}),w.jsxs("a",{href:r.prUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-foreground hover:text-primary font-medium",onClick:xe=>xe.stopPropagation(),children:[w.jsx(be,{icon:fk,size:14,strokeWidth:2}),w.jsxs("span",{children:["#",r.prUrl.match(/\/pull\/(\d+)/)?.[1]??"PR"]})]})]}),r.linearTicketUrl&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-muted-foreground/50",children:"•"}),w.jsxs("a",{href:r.linearTicketUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-foreground hover:text-primary font-medium",onClick:xe=>xe.stopPropagation(),title:x?.title,children:[w.jsx(be,{icon:hk,size:14,strokeWidth:2}),w.jsx("span",{children:r.linearTicketId}),x?.status&&w.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",x.status,")"]})]})]})]})]}),w.jsxs(qz,{children:[w.jsx(Wz,{render:w.jsx(ze,{variant:"ghost",size:"sm",className:WEe[r.status]}),children:Q8[r.status]}),w.jsx(Gz,{align:"end",children:w.jsx(nse,{value:r.status,onValueChange:tt,children:Object.entries(Q8).map(([xe,Ce])=>w.jsx(rse,{value:xe,children:Ce},xe))})})]}),w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:fe,disabled:u.isPending||!r.worktreePath,className:"text-muted-foreground hover:text-foreground",title:"Pull from main",children:w.jsx(be,{icon:qE,size:16,strokeWidth:2,className:u.isPending?"animate-spin":""})}),w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:ue,disabled:h.isPending||!r.worktreePath,className:"text-muted-foreground hover:text-foreground",title:"Merge to main",children:w.jsx(be,{icon:WE,size:16,strokeWidth:2,className:h.isPending?"animate-pulse":""})}),w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:Ie,disabled:f.isPending||!r.repoPath,className:"text-muted-foreground hover:text-foreground",title:"Sync parent with origin",children:w.jsx(be,{icon:XE,size:16,strokeWidth:2,className:f.isPending?"animate-spin":""})}),w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:rt,className:"text-muted-foreground hover:text-foreground",title:"Open in VS Code",children:w.jsx(be,{icon:pk,size:16,strokeWidth:2})}),N&&w.jsx("span",{className:"text-xs text-green-600",children:"Synced!"}),I&&w.jsx("span",{className:"text-xs text-green-600",children:"Merged!"}),re&&w.jsx("span",{className:"text-xs text-green-600",children:"Parent synced!"}),w.jsxs(Hd,{open:E,onOpenChange:Ee,children:[w.jsx($d,{render:w.jsx(ze,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive"}),children:w.jsx(be,{icon:Fp,size:16,strokeWidth:2})}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsx(qd,{children:"Delete Task"}),w.jsxs(Wd,{children:['This will permanently delete "',r.title,'" and close its terminal.',A&&r.worktreePath&&" The linked worktree will also be removed."," ","This action cannot be undone."]}),r.worktreePath&&w.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground",children:[w.jsx(tm,{checked:A,onCheckedChange:xe=>R(xe===!0),disabled:l.isPending}),"Also delete linked worktree"]})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{disabled:l.isPending,children:"Cancel"}),w.jsx(Ez,{onClick:mt,variant:"destructive",disabled:l.isPending,children:l.isPending?"Deleting...":"Delete"})]})]})]})]}),ne?w.jsxs(qa,{value:J,onValueChange:xe=>ee(xe),className:"flex min-h-0 flex-1 flex-col",children:[w.jsx("div",{className:"shrink-0 border-b border-border px-2 py-1",children:w.jsxs(Wa,{className:"w-full",children:[w.jsx(Sr,{value:"terminal",className:"flex-1",children:"Terminal"}),w.jsx(Sr,{value:"details",className:"flex-1",children:"Details"})]})}),w.jsx(Ar,{value:"terminal",className:"flex-1 min-h-0",children:w.jsx(x8,{taskId:r.id,taskName:r.title,cwd:r.worktreePath,aiMode:b,description:y,startupScript:r.startupScript})}),w.jsx(Ar,{value:"details",className:"flex-1 min-h-0",children:w.jsxs(qa,{value:a,onValueChange:c,className:"flex h-full flex-col",children:[w.jsx("div",{className:"shrink-0 border-b border-border px-2 py-1",children:w.jsxs(Wa,{variant:"line",children:[w.jsxs(Sr,{value:"diff",children:[w.jsx(be,{icon:sL,size:14,strokeWidth:2,"data-slot":"icon"}),"Diff"]}),w.jsxs(Sr,{value:"browser",children:[w.jsx(be,{icon:GE,size:14,strokeWidth:2,"data-slot":"icon"}),"Browser"]}),w.jsxs(Sr,{value:"files",children:[w.jsx(be,{icon:Qi,size:14,strokeWidth:2,"data-slot":"icon"}),"Files"]})]})}),w.jsx(Ar,{value:"diff",className:"flex-1 overflow-hidden",children:w.jsx(w8,{taskId:r.id,worktreePath:r.worktreePath})}),w.jsx(Ar,{value:"browser",className:"flex-1 overflow-hidden",children:w.jsx(C8,{taskId:r.id})}),w.jsx(Ar,{value:"files",className:"flex-1 overflow-hidden",children:w.jsx(X8,{taskId:r.id,worktreePath:r.worktreePath})})]})})]}):w.jsxs($l,{direction:"horizontal",className:"min-h-0 flex-1",children:[w.jsx(Vi,{defaultSize:50,minSize:30,children:w.jsx(x8,{taskId:r.id,taskName:r.title,cwd:r.worktreePath,aiMode:b,description:y,startupScript:r.startupScript})}),w.jsx(Fl,{withHandle:!0}),w.jsx(Vi,{defaultSize:50,minSize:30,children:w.jsxs(qa,{value:a,onValueChange:c,className:"flex h-full flex-col",children:[w.jsx("div",{className:"shrink-0 border-b border-border px-2 py-1",children:w.jsxs(Wa,{variant:"line",children:[w.jsxs(Sr,{value:"diff",children:[w.jsx(be,{icon:sL,size:14,strokeWidth:2,"data-slot":"icon"}),"Diff"]}),w.jsxs(Sr,{value:"browser",children:[w.jsx(be,{icon:GE,size:14,strokeWidth:2,"data-slot":"icon"}),"Browser"]}),w.jsxs(Sr,{value:"files",children:[w.jsx(be,{icon:Qi,size:14,strokeWidth:2,"data-slot":"icon"}),"Files"]})]})}),w.jsx(Ar,{value:"diff",className:"flex-1 overflow-hidden",children:w.jsx(w8,{taskId:r.id,worktreePath:r.worktreePath})}),w.jsx(Ar,{value:"browser",className:"flex-1 overflow-hidden",children:w.jsx(C8,{taskId:r.id})}),w.jsx(Ar,{value:"files",className:"flex-1 overflow-hidden",children:w.jsx(X8,{taskId:r.id,worktreePath:r.worktreePath})})]})})]}),w.jsx(mH,{task:r,open:_,onOpenChange:T}),w.jsx(bs,{open:Q,onOpenChange:Y,children:w.jsxs(_s,{className:"sm:max-w-sm",children:[w.jsxs($s,{children:[w.jsx(Fs,{children:"Open in VS Code"}),w.jsx(Gl,{children:"Choose which folder to open"})]}),w.jsxs("div",{className:"flex flex-col gap-2 mt-4",children:[w.jsxs(ze,{variant:"outline",className:"justify-start font-mono text-sm",onClick:Ue,disabled:!r.worktreePath,children:[w.jsx(be,{icon:YE,size:16,strokeWidth:2,className:"mr-2"}),"Worktree",w.jsx("span",{className:"ml-auto text-xs text-muted-foreground truncate max-w-32",children:r.branch})]}),w.jsxs(ze,{variant:"outline",className:"justify-start font-mono text-sm",onClick:ot,disabled:!r.repoPath,children:[w.jsx(be,{icon:Qi,size:16,strokeWidth:2,className:"mr-2"}),"Repository",w.jsx("span",{className:"ml-auto text-xs text-muted-foreground truncate max-w-32",children:r.repoName})]})]})]})}),w.jsx(bs,{open:D,onOpenChange:$,children:w.jsxs(_s,{className:"sm:max-w-md",children:[w.jsxs($s,{children:[w.jsx(Fs,{className:"text-destructive",children:"Sync Failed"}),w.jsx(Gl,{children:"An error occurred while syncing with upstream."})]}),w.jsx("div",{className:"mt-2 rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:L}),w.jsxs(Va,{className:"mt-4 gap-2",children:[w.jsx(ze,{variant:"outline",onClick:()=>$(!1),children:"Close"}),w.jsx(ze,{variant:"outline",onClick:_e,disabled:!we,title:"Send prompt to running Claude Code session",children:"Send Prompt"}),w.jsx(ze,{variant:"destructive",onClick:Pe,disabled:!we,title:"Launch Claude Code with -p flag",children:"Launch Claude"})]})]})}),w.jsx(bs,{open:K,onOpenChange:W,children:w.jsxs(_s,{className:"sm:max-w-md",children:[w.jsxs($s,{children:[w.jsx(Fs,{className:"text-destructive",children:"Merge Failed"}),w.jsxs(Gl,{children:["An error occurred while merging to ",r?.baseBranch||"main","."]})]}),w.jsx("div",{className:"mt-2 rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:U}),w.jsxs(Va,{className:"mt-4 gap-2",children:[w.jsx(ze,{variant:"outline",onClick:()=>W(!1),children:"Close"}),w.jsx(ze,{variant:"outline",onClick:me,disabled:!we,title:"Send prompt to running Claude Code session",children:"Send Prompt"}),w.jsx(ze,{variant:"destructive",onClick:Ae,disabled:!we,title:"Launch Claude Code with -p flag",children:"Launch Claude"})]})]})}),w.jsx(bs,{open:V,onOpenChange:X,children:w.jsxs(_s,{className:"sm:max-w-md",children:[w.jsxs($s,{children:[w.jsx(Fs,{className:"text-destructive",children:"Sync Parent Failed"}),w.jsx(Gl,{children:"An error occurred while syncing the parent repository with origin."})]}),w.jsx("div",{className:"mt-2 rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:j}),w.jsxs(Va,{className:"mt-4 gap-2",children:[w.jsx(ze,{variant:"outline",onClick:()=>X(!1),children:"Close"}),w.jsx(ze,{variant:"outline",onClick:Te,disabled:!we,title:"Send prompt to running Claude Code session",children:"Send Prompt"}),w.jsx(ze,{variant:"destructive",onClick:We,disabled:!we,title:"Launch Claude Code with -p flag",children:"Launch Claude"})]})]})})]}):w.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4",children:[w.jsx("p",{className:"text-muted-foreground",children:"Task not found"}),w.jsx(er,{to:"/tasks",children:w.jsx(ze,{variant:"outline",children:"Back to Tasks"})})]})}const SV=ts("/repositories/$repoId")({component:KEe});function KEe(){const{repoId:e}=SV.useParams(),t=Qa(),{data:n,isLoading:r,error:i}=jre(e),s=Dre(),l=bz(),{data:a}=zb(),{data:c}=Hb(),[u,h]=O.useState(""),[f,p]=O.useState(""),[v,S]=O.useState(""),[x,g]=O.useState(!1);O.useEffect(()=>{n&&(h(n.displayName),p(n.startupScript||""),S(n.copyFiles||""),g(!1))},[n]),O.useEffect(()=>{if(n){const T=u!==n.displayName||f!==(n.startupScript||"")||v!==(n.copyFiles||"");g(T)}},[u,f,v,n]);const b=()=>{n&&s.mutate({id:n.id,updates:{displayName:u.trim()||n.path.split("/").pop()||"repo",startupScript:f.trim()||null,copyFiles:v.trim()||null}})},y=async()=>{n&&(await l.mutateAsync(n.id),t({to:"/repositories"}))},_=()=>{if(!n)return;const T=ry(n.path,a,c);window.open(T,"_blank")};return r?w.jsx("div",{className:"flex h-full items-center justify-center",children:w.jsx(be,{icon:Fr,size:24,strokeWidth:2,className:"animate-spin text-muted-foreground"})}):i||!n?w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsx("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-4 py-2",children:w.jsxs(er,{to:"/repositories",className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[w.jsx(be,{icon:iL,size:16,strokeWidth:2}),"Repositories"]})}),w.jsx("div",{className:"flex flex-1 items-center justify-center",children:w.jsxs("div",{className:"flex items-center gap-3 text-destructive",children:[w.jsx(be,{icon:Md,size:20,strokeWidth:2}),w.jsx("span",{className:"text-sm",children:"Repository not found"})]})})]}):w.jsxs("div",{className:"flex h-full flex-col",children:[w.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:[w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsxs(er,{to:"/repositories",className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[w.jsx(be,{icon:iL,size:16,strokeWidth:2}),"Repositories"]}),w.jsx("span",{className:"text-muted-foreground",children:"/"}),w.jsx("span",{className:"text-sm font-medium",children:n.displayName})]}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:_,className:"text-muted-foreground hover:text-foreground",title:"Open in VS Code",children:w.jsx(be,{icon:pk,size:14,strokeWidth:2})}),w.jsxs(Hd,{children:[w.jsxs($d,{render:w.jsx(ze,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive"}),children:[w.jsx(be,{icon:Fp,size:14,strokeWidth:2,"data-slot":"icon"}),"Delete"]}),w.jsxs(Fd,{children:[w.jsxs(Ud,{children:[w.jsx(qd,{children:"Delete Repository"}),w.jsxs(Wd,{children:['This will remove "',n.displayName,'" from Vibora. The actual repository files will not be affected.']})]}),w.jsxs(Vd,{children:[w.jsx(Gd,{children:"Cancel"}),w.jsx(ze,{variant:"destructive",onClick:y,children:"Delete"})]})]})]}),w.jsx(ze,{size:"sm",onClick:b,disabled:!x||s.isPending,children:s.isPending?"Saving...":"Save"})]})]}),w.jsx("div",{className:"flex-1 overflow-auto p-4",children:w.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[w.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[w.jsx(be,{icon:Qi,size:14,strokeWidth:2}),w.jsx("span",{className:"font-mono",children:n.path})]}),w.jsxs(Qp,{children:[w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"displayName",children:"Display Name"}),w.jsx(nn,{id:"displayName",value:u,onChange:T=>h(T.target.value),placeholder:n.path.split("/").pop()||"My Project"})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"startupScript",children:"Startup Script"}),w.jsx(Ik,{id:"startupScript",value:f,onChange:T=>p(T.target.value),placeholder:"npm install && npm run dev",rows:3}),w.jsx(La,{children:"Command to run in the terminal when creating a worktree."})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"copyFiles",children:"Copy Files"}),w.jsx(nn,{id:"copyFiles",value:v,onChange:T=>S(T.target.value),placeholder:".env, config.local.json"}),w.jsx(La,{children:"Comma-separated glob patterns for files to copy into new worktrees."})]})]})]})})]})}const YEe=sie.update({id:"/",path:"/",getParentRoute:()=>Es}),XEe=hie.update({id:"/worktrees/",path:"/worktrees/",getParentRoute:()=>Es}),QEe=mse.update({id:"/terminals/",path:"/terminals/",getParentRoute:()=>Es}),ZEe=xoe.update({id:"/tasks/",path:"/tasks/",getParentRoute:()=>Es}),JEe=Coe.update({id:"/settings/",path:"/settings/",getParentRoute:()=>Es}),e2e=joe.update({id:"/review/",path:"/review/",getParentRoute:()=>Es}),t2e=Ioe.update({id:"/repositories/",path:"/repositories/",getParentRoute:()=>Es}),n2e=Hxe.update({id:"/monitoring/",path:"/monitoring/",getParentRoute:()=>Es}),r2e=xV.update({id:"/tasks/$taskId",path:"/tasks/$taskId",getParentRoute:()=>Es}),i2e=SV.update({id:"/repositories/$repoId",path:"/repositories/$repoId",getParentRoute:()=>Es}),s2e={IndexRoute:YEe,RepositoriesRepoIdRoute:i2e,TasksTaskIdRoute:r2e,MonitoringIndexRoute:n2e,RepositoriesIndexRoute:t2e,ReviewIndexRoute:e2e,SettingsIndexRoute:JEe,TasksIndexRoute:ZEe,TerminalsIndexRoute:QEe,WorktreesIndexRoute:XEe},o2e=Es._addFileChildren(s2e)._addFileTypes(),wV=O.createContext(null);function a2e({children:e}){const[t,n]=O.useState(!1),[r,i]=O.useState(!0),[s,l]=O.useState(!1),[a,c]=O.useState(!1),u=O.useCallback(async()=>{try{const v=await fetch("/api/auth/check");if(v.ok){const S=await v.json();l(S.authRequired),n(S.authenticated),S.authRequired&&!S.authenticated&&c(!0)}}catch{l(!1),n(!0)}finally{i(!1)}},[]);O.useEffect(()=>{u()},[u]),O.useEffect(()=>{const v=()=>{s&&(n(!1),c(!0))};return window.addEventListener("vibora:auth-required",v),()=>window.removeEventListener("vibora:auth-required",v)},[s]);const h=O.useCallback(async(v,S)=>{const x=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:v,password:S})});if(!x.ok){const g=await x.json();throw new Error(g.error||"Login failed")}n(!0),c(!1)},[]),f=O.useCallback(async()=>{await fetch("/api/auth/logout",{method:"POST"}),n(!1),c(!0)},[]),p=O.useMemo(()=>({isAuthenticated:t,isLoading:r,authRequired:s,showLoginModal:a,setShowLoginModal:c,login:h,logout:f}),[t,r,s,a,h,f]);return w.jsx(wV.Provider,{value:p,children:e})}function l2e(){const e=O.useContext(wV);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function c2e(){const{showLoginModal:e,login:t}=l2e(),[n,r]=O.useState(""),[i,s]=O.useState(""),[l,a]=O.useState(null),[c,u]=O.useState(!1),h=O.useCallback(async p=>{p.preventDefault(),a(null),u(!0);try{await t(n,i)}catch(v){a(v instanceof Error?v.message:"Login failed")}finally{u(!1)}},[n,i,t]),f=p=>{p.key==="Enter"&&!c&&n&&i&&(p.preventDefault(),h(p))};return w.jsx(bs,{open:e,children:w.jsxs(_s,{showCloseButton:!1,className:"sm:max-w-sm",onKeyDown:f,children:[w.jsx($s,{children:w.jsx(Fs,{children:"Login to Vibora"})}),w.jsxs("form",{onSubmit:h,children:[w.jsxs(Qp,{className:"mt-4",children:[w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"login-username",children:"Username"}),w.jsx(nn,{id:"login-username",type:"text",value:n,onChange:p=>r(p.target.value),autoComplete:"username",autoFocus:!0,required:!0})]}),w.jsxs(Un,{children:[w.jsx(Vn,{htmlFor:"login-password",children:"Password"}),w.jsx(nn,{id:"login-password",type:"password",value:i,onChange:p=>s(p.target.value),autoComplete:"current-password",required:!0})]}),l&&w.jsx("p",{className:"text-sm text-red-500",children:l})]}),w.jsx(Va,{className:"mt-4",children:w.jsx(ze,{type:"submit",disabled:c||!n||!i,children:c?"Logging in...":"Login"})})]})]})})}const u2e=new zK({defaultOptions:{queries:{staleTime:1e3*60,refetchOnWindowFocus:!1}}}),d2e=fK({routeTree:o2e});DW.createRoot(document.getElementById("root")).render(w.jsx(O.StrictMode,{children:w.jsx(HK,{client:u2e,children:w.jsxs(a2e,{children:[w.jsx(mK,{router:d2e}),w.jsx(c2e,{})]})})}));
|