bertrand 0.15.0 → 0.16.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/dist/bertrand.js +209 -87
- package/dist/dashboard/assets/bash-Yzrsuije.js +1 -0
- package/dist/dashboard/assets/css-DPfMkruS.js +1 -0
- package/dist/dashboard/assets/html-GMplVEZG.js +1 -0
- package/dist/dashboard/assets/index-e53khqNa.js +673 -0
- package/dist/dashboard/assets/index-qVHXGTGL.css +1 -0
- package/dist/dashboard/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/dashboard/assets/json-Cp-IABpG.js +1 -0
- package/dist/dashboard/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/dashboard/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/dashboard/assets/python-B6aJPvgy.js +1 -0
- package/dist/dashboard/assets/tsx-COt5Ahok.js +1 -0
- package/dist/dashboard/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/dashboard/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/dashboard/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/dashboard/assets/workbox-window.prod.es5-BBnX5xw4.js +2 -0
- package/dist/dashboard/icon.svg +13 -0
- package/dist/dashboard/index.html +28 -0
- package/dist/dashboard/manifest.webmanifest +1 -0
- package/dist/dashboard/sw.js +1 -0
- package/dist/dashboard/workbox-e4022e15.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var c6=Object.defineProperty;var f6=Object.getPrototypeOf;var d6=Reflect.get;var vT=e=>{throw TypeError(e)};var h6=(e,t,n)=>t in e?c6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>h6(e,typeof t!="symbol"?t+"":t,n),S0=(e,t,n)=>t.has(e)||vT("Cannot "+n);var K=(e,t,n)=>(S0(e,t,"read from private field"),n?n.call(e):t.get(e)),He=(e,t,n)=>t.has(e)?vT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$e=(e,t,n,r)=>(S0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rt=(e,t,n)=>(S0(e,t,"access private method"),n);var um=(e,t,n,r)=>({set _(i){$e(e,t,i,n)},get _(){return K(e,t,r)}}),xT=(e,t,n)=>d6(f6(e),n,t);function p6(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{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 o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Zw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C0={exports:{}},hd={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var wT;function m6(){if(wT)return hd;wT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return hd.Fragment=t,hd.jsx=n,hd.jsxs=n,hd}var ST;function g6(){return ST||(ST=1,C0.exports=m6()),C0.exports}var E=g6(),E0={exports:{}},nt={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var CT;function y6(){if(CT)return nt;CT=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"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function y(Y){return Y===null||typeof Y!="object"?null:(Y=m&&Y[m]||Y["@@iterator"],typeof Y=="function"?Y:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function x(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}x.prototype.isReactComponent={},x.prototype.setState=function(Y,J){if(typeof Y!="object"&&typeof Y!="function"&&Y!=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,Y,J,"setState")},x.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function _(){}_.prototype=x.prototype;function k(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}var T=k.prototype=new _;T.constructor=k,v(T,x.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function B(Y,J,H){var ie=H.ref;return{$$typeof:e,type:Y,key:J,ref:ie!==void 0?ie:null,props:H}}function L(Y,J){return B(Y.type,J,Y.props)}function N(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function M(Y){var J={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(H){return J[H]})}var z=/\/+/g;function G(Y,J){return typeof Y=="object"&&Y!==null&&Y.key!=null?M(""+Y.key):J.toString(36)}function j(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(D,D):(Y.status="pending",Y.then(function(J){Y.status==="pending"&&(Y.status="fulfilled",Y.value=J)},function(J){Y.status==="pending"&&(Y.status="rejected",Y.reason=J)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function F(Y,J,H,ie,re){var he=typeof Y;(he==="undefined"||he==="boolean")&&(Y=null);var ve=!1;if(Y===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(Y.$$typeof){case e:case t:ve=!0;break;case h:return ve=Y._init,F(ve(Y._payload),J,H,ie,re)}}if(ve)return re=re(Y),ve=ie===""?"."+G(Y,0):ie,A(re)?(H="",ve!=null&&(H=ve.replace(z,"$&/")+"/"),F(re,J,H,"",function(Ie){return Ie})):re!=null&&(N(re)&&(re=L(re,H+(re.key==null||Y&&Y.key===re.key?"":(""+re.key).replace(z,"$&/")+"/")+ve)),J.push(re)),1;ve=0;var Re=ie===""?".":ie+":";if(A(Y))for(var ce=0;ce<Y.length;ce++)ie=Y[ce],he=Re+G(ie,ce),ve+=F(ie,J,H,he,re);else if(ce=y(Y),typeof ce=="function")for(Y=ce.call(Y),ce=0;!(ie=Y.next()).done;)ie=ie.value,he=Re+G(ie,ce++),ve+=F(ie,J,H,he,re);else if(he==="object"){if(typeof Y.then=="function")return F(j(Y),J,H,ie,re);throw J=String(Y),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ve}function U(Y,J,H){if(Y==null)return Y;var ie=[],re=0;return F(Y,ie,"","",function(he){return J.call(H,he,re++)}),ie}function q(Y){if(Y._status===-1){var J=Y._result;J=J(),J.then(function(H){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=H)},function(H){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=H)}),Y._status===-1&&(Y._status=0,Y._result=J)}if(Y._status===1)return Y._result.default;throw Y._result}var W=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},I={map:U,forEach:function(Y,J,H){U(Y,function(){J.apply(this,arguments)},H)},count:function(Y){var J=0;return U(Y,function(){J++}),J},toArray:function(Y){return U(Y,function(J){return J})||[]},only:function(Y){if(!N(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return nt.Activity=p,nt.Children=I,nt.Component=x,nt.Fragment=n,nt.Profiler=i,nt.PureComponent=k,nt.StrictMode=r,nt.Suspense=c,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,nt.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return O.H.useMemoCache(Y)}},nt.cache=function(Y){return function(){return Y.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(Y,J,H){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var ie=v({},Y.props),re=Y.key;if(J!=null)for(he in J.key!==void 0&&(re=""+J.key),J)!$.call(J,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&J.ref===void 0||(ie[he]=J[he]);var he=arguments.length-2;if(he===1)ie.children=H;else if(1<he){for(var ve=Array(he),Re=0;Re<he;Re++)ve[Re]=arguments[Re+2];ie.children=ve}return B(Y.type,re,ie)},nt.createContext=function(Y){return Y={$$typeof:a,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:o,_context:Y},Y},nt.createElement=function(Y,J,H){var ie,re={},he=null;if(J!=null)for(ie in J.key!==void 0&&(he=""+J.key),J)$.call(J,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(re[ie]=J[ie]);var ve=arguments.length-2;if(ve===1)re.children=H;else if(1<ve){for(var Re=Array(ve),ce=0;ce<ve;ce++)Re[ce]=arguments[ce+2];re.children=Re}if(Y&&Y.defaultProps)for(ie in ve=Y.defaultProps,ve)re[ie]===void 0&&(re[ie]=ve[ie]);return B(Y,he,re)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(Y){return{$$typeof:u,render:Y}},nt.isValidElement=N,nt.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:q}},nt.memo=function(Y,J){return{$$typeof:f,type:Y,compare:J===void 0?null:J}},nt.startTransition=function(Y){var J=O.T,H={};O.T=H;try{var ie=Y(),re=O.S;re!==null&&re(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(D,W)}catch(he){W(he)}finally{J!==null&&H.types!==null&&(J.types=H.types),O.T=J}},nt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},nt.use=function(Y){return O.H.use(Y)},nt.useActionState=function(Y,J,H){return O.H.useActionState(Y,J,H)},nt.useCallback=function(Y,J){return O.H.useCallback(Y,J)},nt.useContext=function(Y){return O.H.useContext(Y)},nt.useDebugValue=function(){},nt.useDeferredValue=function(Y,J){return O.H.useDeferredValue(Y,J)},nt.useEffect=function(Y,J){return O.H.useEffect(Y,J)},nt.useEffectEvent=function(Y){return O.H.useEffectEvent(Y)},nt.useId=function(){return O.H.useId()},nt.useImperativeHandle=function(Y,J,H){return O.H.useImperativeHandle(Y,J,H)},nt.useInsertionEffect=function(Y,J){return O.H.useInsertionEffect(Y,J)},nt.useLayoutEffect=function(Y,J){return O.H.useLayoutEffect(Y,J)},nt.useMemo=function(Y,J){return O.H.useMemo(Y,J)},nt.useOptimistic=function(Y,J){return O.H.useOptimistic(Y,J)},nt.useReducer=function(Y,J,H){return O.H.useReducer(Y,J,H)},nt.useRef=function(Y){return O.H.useRef(Y)},nt.useState=function(Y){return O.H.useState(Y)},nt.useSyncExternalStore=function(Y,J,H){return O.H.useSyncExternalStore(Y,J,H)},nt.useTransition=function(){return O.H.useTransition()},nt.version="19.2.5",nt}var ET;function Sh(){return ET||(ET=1,E0.exports=y6()),E0.exports}var C=Sh();const Ca=Zw(C),as=p6({__proto__:null,default:Ca},[C]);var k0={exports:{}},pd={},R0={exports:{}},_0={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var kT;function b6(){return kT||(kT=1,(function(e){function t(F,U){var q=F.length;F.push(U);e:for(;0<q;){var W=q-1>>>1,I=F[W];if(0<i(I,U))F[W]=U,F[q]=I,q=W;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var U=F[0],q=F.pop();if(q!==U){F[0]=q;e:for(var W=0,I=F.length,Y=I>>>1;W<Y;){var J=2*(W+1)-1,H=F[J],ie=J+1,re=F[ie];if(0>i(H,q))ie<I&&0>i(re,H)?(F[W]=re,F[ie]=q,W=ie):(F[W]=H,F[J]=q,W=J);else if(ie<I&&0>i(re,q))F[W]=re,F[ie]=q,W=ie;else break e}}return U}function i(F,U){var q=F.sortIndex-U.sortIndex;return q!==0?q:F.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,p=null,m=3,y=!1,b=!1,v=!1,S=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function T(F){for(var U=n(f);U!==null;){if(U.callback===null)r(f);else if(U.startTime<=F)r(f),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(f)}}function A(F){if(v=!1,T(F),!b)if(n(c)!==null)b=!0,D||(D=!0,M());else{var U=n(f);U!==null&&j(A,U.startTime-F)}}var D=!1,O=-1,$=5,B=-1;function L(){return S?!0:!(e.unstable_now()-B<$)}function N(){if(S=!1,D){var F=e.unstable_now();B=F;var U=!0;try{e:{b=!1,v&&(v=!1,_(O),O=-1),y=!0;var q=m;try{t:{for(T(F),p=n(c);p!==null&&!(p.expirationTime>F&&L());){var W=p.callback;if(typeof W=="function"){p.callback=null,m=p.priorityLevel;var I=W(p.expirationTime<=F);if(F=e.unstable_now(),typeof I=="function"){p.callback=I,T(F),U=!0;break t}p===n(c)&&r(c),T(F)}else r(c);p=n(c)}if(p!==null)U=!0;else{var Y=n(f);Y!==null&&j(A,Y.startTime-F),U=!1}}break e}finally{p=null,m=q,y=!1}U=void 0}}finally{U?M():D=!1}}}var M;if(typeof k=="function")M=function(){k(N)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,G=z.port2;z.port1.onmessage=N,M=function(){G.postMessage(null)}}else M=function(){x(N,0)};function j(F,U){O=x(function(){F(e.unstable_now())},U)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(F){switch(m){case 1:case 2:case 3:var U=3;break;default:U=m}var q=m;m=U;try{return F()}finally{m=q}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(F,U){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var q=m;m=F;try{return U()}finally{m=q}},e.unstable_scheduleCallback=function(F,U,q){var W=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?W+q:W):q=W,F){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=q+I,F={id:h++,callback:U,priorityLevel:F,startTime:q,expirationTime:I,sortIndex:-1},q>W?(F.sortIndex=q,t(f,F),n(c)===null&&F===n(f)&&(v?(_(O),O=-1):v=!0,j(A,q-W))):(F.sortIndex=I,t(c,F),b||y||(b=!0,D||(D=!0,M()))),F},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(F){var U=m;return function(){var q=m;m=U;try{return F.apply(this,arguments)}finally{m=q}}}})(_0)),_0}var RT;function v6(){return RT||(RT=1,R0.exports=b6()),R0.exports}var T0={exports:{}},Yn={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var _T;function x6(){if(_T)return Yn;_T=1;var e=Sh();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" 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 o(c,f,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:c,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Yn.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(c,f,null,h)},Yn.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},Yn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},Yn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Yn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Yn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},Yn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Yn.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},Yn.requestFormReset=function(c){r.d.r(c)},Yn.unstable_batchedUpdates=function(c,f){return c(f)},Yn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},Yn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Yn.version="19.2.5",Yn}var TT;function OO(){if(TT)return T0.exports;TT=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(),T0.exports=x6(),T0.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var AT;function w6(){if(AT)return pd;AT=1;var e=v6(),t=Sh(),n=OO();function r(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function a(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function c(s){if(o(s)!==s)throw Error(r(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(r(188));return l!==s?null:s}for(var d=s,g=l;;){var w=d.return;if(w===null)break;var R=w.alternate;if(R===null){if(g=w.return,g!==null){d=g;continue}break}if(w.child===R.child){for(R=w.child;R;){if(R===d)return c(w),s;if(R===g)return c(w),l;R=R.sibling}throw Error(r(188))}if(d.return!==g.return)d=w,g=R;else{for(var P=!1,V=w.child;V;){if(V===d){P=!0,d=w,g=R;break}if(V===g){P=!0,g=w,d=R;break}V=V.sibling}if(!P){for(V=R.child;V;){if(V===d){P=!0,d=R,g=w;break}if(V===g){P=!0,g=R,d=w;break}V=V.sibling}if(!P)throw Error(r(189))}}if(d.alternate!==g)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function M(s){return s===null||typeof s!="object"?null:(s=N&&s[N]||s["@@iterator"],typeof s=="function"?s:null)}var z=Symbol.for("react.client.reference");function G(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===z?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case x:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList";case B:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case k:return s.displayName||"Context";case _:return(s._context.displayName||"Context")+".Consumer";case T:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return l=s.displayName||null,l!==null?l:G(s.type)||"Memo";case $:l=s._payload,s=s._init;try{return G(s(l))}catch{}}return null}var j=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},W=[],I=-1;function Y(s){return{current:s}}function J(s){0>I||(s.current=W[I],W[I]=null,I--)}function H(s,l){I++,W[I]=s.current,s.current=l}var ie=Y(null),re=Y(null),he=Y(null),ve=Y(null);function Re(s,l){switch(H(he,l),H(re,s),H(ie,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?U_(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=U_(l),s=H_(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(ie),H(ie,s)}function ce(){J(ie),J(re),J(he)}function Ie(s){s.memoizedState!==null&&H(ve,s);var l=ie.current,d=H_(l,s.type);l!==d&&(H(re,s),H(ie,d))}function We(s){re.current===s&&(J(ie),J(re)),ve.current===s&&(J(ve),ud._currentValue=q)}var X,Z;function ne(s){if(X===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||"",Z=-1<d.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+X+s+Z}var xe=!1;function ge(s,l){if(!s||xe)return"";xe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ye){var pe=ye}Reflect.construct(s,[],Ee)}else{try{Ee.call()}catch(ye){pe=ye}s.call(Ee.prototype)}}else{try{throw Error()}catch(ye){pe=ye}(Ee=s())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ye){if(ye&&pe&&typeof ye.stack=="string")return[ye.stack,pe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=g.DetermineComponentFrameRoot(),P=R[0],V=R[1];if(P&&V){var Q=P.split(`
|
|
45
|
+
`),de=V.split(`
|
|
46
|
+
`);for(w=g=0;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;for(;w<de.length&&!de[w].includes("DetermineComponentFrameRoot");)w++;if(g===Q.length||w===de.length)for(g=Q.length-1,w=de.length-1;1<=g&&0<=w&&Q[g]!==de[w];)w--;for(;1<=g&&0<=w;g--,w--)if(Q[g]!==de[w]){if(g!==1||w!==1)do if(g--,w--,0>w||Q[g]!==de[w]){var be=`
|
|
47
|
+
`+Q[g].replace(" at new "," at ");return s.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",s.displayName)),be}while(1<=g&&0<=w);break}}}finally{xe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?ne(d):""}function Ce(s,l){switch(s.tag){case 26:case 27:case 5:return ne(s.type);case 16:return ne("Lazy");case 13:return s.child!==l&&l!==null?ne("Suspense Fallback"):ne("Suspense");case 19:return ne("SuspenseList");case 0:case 15:return ge(s.type,!1);case 11:return ge(s.type.render,!1);case 1:return ge(s.type,!0);case 31:return ne("Activity");default:return""}}function le(s){try{var l="",d=null;do l+=Ce(s,d),d=s,s=s.return;while(s);return l}catch(g){return`
|
|
48
|
+
Error generating stack: `+g.message+`
|
|
49
|
+
`+g.stack}}var oe=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,ae=e.unstable_cancelCallback,Oe=e.unstable_shouldYield,Te=e.unstable_requestPaint,_e=e.unstable_now,De=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,Se=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,Le=e.unstable_IdlePriority,st=e.log,Ut=e.unstable_setDisableYieldValue,Ot=null,Me=null;function Xe(s){if(typeof st=="function"&&Ut(s),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Ot,s)}catch{}}var Ne=Math.clz32?Math.clz32:ut,Tt=Math.log,ft=Math.LN2;function ut(s){return s>>>=0,s===0?32:31-(Tt(s)/ft|0)|0}var Rt=256,en=262144,Xt=4194304;function tn(s){var l=s&42;if(l!==0)return l;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function bn(s,l,d){var g=s.pendingLanes;if(g===0)return 0;var w=0,R=s.suspendedLanes,P=s.pingedLanes;s=s.warmLanes;var V=g&134217727;return V!==0?(g=V&~R,g!==0?w=tn(g):(P&=V,P!==0?w=tn(P):d||(d=V&~s,d!==0&&(w=tn(d))))):(V=g&~R,V!==0?w=tn(V):P!==0?w=tn(P):d||(d=g&~s,d!==0&&(w=tn(d)))),w===0?0:l!==0&&l!==w&&(l&R)===0&&(R=w&-w,d=l&-l,R>=d||R===32&&(d&4194048)!==0)?l:w}function Jr(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function ja(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Ei(){var s=Xt;return Xt<<=1,(Xt&62914560)===0&&(Xt=4194304),s}function Fa(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function ki(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function au(s,l,d,g,w,R){var P=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var V=s.entanglements,Q=s.expirationTimes,de=s.hiddenUpdates;for(d=P&~d;0<d;){var be=31-Ne(d),Ee=1<<be;V[be]=0,Q[be]=-1;var pe=de[be];if(pe!==null)for(de[be]=null,be=0;be<pe.length;be++){var ye=pe[be];ye!==null&&(ye.lane&=-536870913)}d&=~Ee}g!==0&&lu(s,g,0),R!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=R&~(P&~l))}function lu(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var g=31-Ne(l);s.entangledLanes|=l,s.entanglements[g]=s.entanglements[g]|1073741824|d&261930}function fs(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var g=31-Ne(d),w=1<<g;w&l|s[g]&l&&(s[g]|=l),d&=~w}}function Ri(s,l){var d=l&-l;return d=(d&42)!==0?1:za(d),(d&(s.suspendedLanes|l))!==0?0:d}function za(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Ba(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Hi(){var s=U.p;return s!==0?s:(s=window.event,s===void 0?32:dT(s.type))}function Ua(s,l){var d=U.p;try{return U.p=s,l()}finally{U.p=d}}var Or=Math.random().toString(36).slice(2),on="__reactFiber$"+Or,jn="__reactProps$"+Or,fo="__reactContainer$"+Or,uu="__reactEvents$"+Or,J3="__reactListeners$"+Or,eB="__reactHandles$"+Or,AE="__reactResources$"+Or,Ef="__reactMarker$"+Or;function pb(s){delete s[on],delete s[jn],delete s[uu],delete s[J3],delete s[eB]}function cu(s){var l=s[on];if(l)return l;for(var d=s.parentNode;d;){if(l=d[fo]||d[on]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=X_(s);s!==null;){if(d=s[on])return d;s=X_(s)}return l}s=d,d=s.parentNode}return null}function fu(s){if(s=s[on]||s[fo]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function kf(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function du(s){var l=s[AE];return l||(l=s[AE]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function On(s){s[Ef]=!0}var DE=new Set,ME={};function Ha(s,l){hu(s,l),hu(s+"Capture",l)}function hu(s,l){for(ME[s]=l,s=0;s<l.length;s++)DE.add(l[s])}var tB=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]*$"),OE={},$E={};function nB(s){return oe.call($E,s)?!0:oe.call(OE,s)?!1:tB.test(s)?$E[s]=!0:(OE[s]=!0,!1)}function Qh(s,l,d){if(nB(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function Zh(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function ho(s,l,d,g){if(g===null)s.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+g)}}function ei(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function PE(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function rB(s,l,d){var g=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var w=g.get,R=g.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(P){d=""+P,R.call(this,P)}}),Object.defineProperty(s,l,{enumerable:g.enumerable}),{getValue:function(){return d},setValue:function(P){d=""+P},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function mb(s){if(!s._valueTracker){var l=PE(s)?"checked":"value";s._valueTracker=rB(s,l,""+s[l])}}function NE(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return s&&(g=PE(s)?s.checked?"true":"false":s.value),s=g,s!==d?(l.setValue(s),!0):!1}function Jh(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var iB=/[\n"\\]/g;function ti(s){return s.replace(iB,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function gb(s,l,d,g,w,R,P,V){s.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.type=P:s.removeAttribute("type"),l!=null?P==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+ei(l)):s.value!==""+ei(l)&&(s.value=""+ei(l)):P!=="submit"&&P!=="reset"||s.removeAttribute("value"),l!=null?yb(s,P,ei(l)):d!=null?yb(s,P,ei(d)):g!=null&&s.removeAttribute("value"),w==null&&R!=null&&(s.defaultChecked=!!R),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?s.name=""+ei(V):s.removeAttribute("name")}function IE(s,l,d,g,w,R,P,V){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.type=R),l!=null||d!=null){if(!(R!=="submit"&&R!=="reset"||l!=null)){mb(s);return}d=d!=null?""+ei(d):"",l=l!=null?""+ei(l):d,V||l===s.value||(s.value=l),s.defaultValue=l}g=g??w,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=V?s.checked:!!g,s.defaultChecked=!!g,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(s.name=P),mb(s)}function yb(s,l,d){l==="number"&&Jh(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function pu(s,l,d,g){if(s=s.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<s.length;d++)w=l.hasOwnProperty("$"+s[d].value),s[d].selected!==w&&(s[d].selected=w),w&&g&&(s[d].defaultSelected=!0)}else{for(d=""+ei(d),l=null,w=0;w<s.length;w++){if(s[w].value===d){s[w].selected=!0,g&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function LE(s,l,d){if(l!=null&&(l=""+ei(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+ei(d):""}function jE(s,l,d,g){if(l==null){if(g!=null){if(d!=null)throw Error(r(92));if(j(g)){if(1<g.length)throw Error(r(93));g=g[0]}d=g}d==null&&(d=""),l=d}d=ei(l),s.defaultValue=d,g=s.textContent,g===d&&g!==""&&g!==null&&(s.value=g),mb(s)}function mu(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var oB=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 FE(s,l,d){var g=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":g?s.setProperty(l,d):typeof d!="number"||d===0||oB.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function zE(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?s.setProperty(g,""):g==="float"?s.cssFloat="":s[g]="");for(var w in l)g=l[w],l.hasOwnProperty(w)&&d[w]!==g&&FE(s,w,g)}else for(var R in l)l.hasOwnProperty(R)&&FE(s,R,l[R])}function bb(s){if(s.indexOf("-")===-1)return!1;switch(s){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 sB=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"]]),aB=/^[\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 ep(s){return aB.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function po(){}var vb=null;function xb(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var gu=null,yu=null;function BE(s){var l=fu(s);if(l&&(s=l.stateNode)){var d=s[jn]||null;e:switch(s=l.stateNode,l.type){case"input":if(gb(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+ti(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var g=d[l];if(g!==s&&g.form===s.form){var w=g[jn]||null;if(!w)throw Error(r(90));gb(g,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<d.length;l++)g=d[l],g.form===s.form&&NE(g)}break e;case"textarea":LE(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&pu(s,!!d.multiple,l,!1)}}}var wb=!1;function UE(s,l,d){if(wb)return s(l,d);wb=!0;try{var g=s(l);return g}finally{if(wb=!1,(gu!==null||yu!==null)&&(Bp(),gu&&(l=gu,s=yu,yu=gu=null,BE(l),s)))for(l=0;l<s.length;l++)BE(s[l])}}function Rf(s,l){var d=s.stateNode;if(d===null)return null;var g=d[jn]||null;if(g===null)return null;d=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(s=s.type,g=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!g;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sb=!1;if(mo)try{var _f={};Object.defineProperty(_f,"passive",{get:function(){Sb=!0}}),window.addEventListener("test",_f,_f),window.removeEventListener("test",_f,_f)}catch{Sb=!1}var ds=null,Cb=null,tp=null;function HE(){if(tp)return tp;var s,l=Cb,d=l.length,g,w="value"in ds?ds.value:ds.textContent,R=w.length;for(s=0;s<d&&l[s]===w[s];s++);var P=d-s;for(g=1;g<=P&&l[d-g]===w[R-g];g++);return tp=w.slice(s,1<g?1-g:void 0)}function np(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function rp(){return!0}function GE(){return!1}function hr(s){function l(d,g,w,R,P){this._reactName=d,this._targetInst=w,this.type=g,this.nativeEvent=R,this.target=P,this.currentTarget=null;for(var V in s)s.hasOwnProperty(V)&&(d=s[V],this[V]=d?d(R):R[V]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?rp:GE,this.isPropagationStopped=GE,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=rp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=rp)},persist:function(){},isPersistent:rp}),l}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ip=hr(Ga),Tf=p({},Ga,{view:0,detail:0}),lB=hr(Tf),Eb,kb,Af,op=p({},Tf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_b,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Af&&(Af&&s.type==="mousemove"?(Eb=s.screenX-Af.screenX,kb=s.screenY-Af.screenY):kb=Eb=0,Af=s),Eb)},movementY:function(s){return"movementY"in s?s.movementY:kb}}),VE=hr(op),uB=p({},op,{dataTransfer:0}),cB=hr(uB),fB=p({},Tf,{relatedTarget:0}),Rb=hr(fB),dB=p({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),hB=hr(dB),pB=p({},Ga,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),mB=hr(pB),gB=p({},Ga,{data:0}),qE=hr(gB),yB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bB={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"},vB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=vB[s])?!!l[s]:!1}function _b(){return xB}var wB=p({},Tf,{key:function(s){if(s.key){var l=yB[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=np(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?bB[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_b,charCode:function(s){return s.type==="keypress"?np(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?np(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),SB=hr(wB),CB=p({},op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),YE=hr(CB),EB=p({},Tf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_b}),kB=hr(EB),RB=p({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),_B=hr(RB),TB=p({},op,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),AB=hr(TB),DB=p({},Ga,{newState:0,oldState:0}),MB=hr(DB),OB=[9,13,27,32],Tb=mo&&"CompositionEvent"in window,Df=null;mo&&"documentMode"in document&&(Df=document.documentMode);var $B=mo&&"TextEvent"in window&&!Df,WE=mo&&(!Tb||Df&&8<Df&&11>=Df),KE=" ",XE=!1;function QE(s,l){switch(s){case"keyup":return OB.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZE(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var bu=!1;function PB(s,l){switch(s){case"compositionend":return ZE(l);case"keypress":return l.which!==32?null:(XE=!0,KE);case"textInput":return s=l.data,s===KE&&XE?null:s;default:return null}}function NB(s,l){if(bu)return s==="compositionend"||!Tb&&QE(s,l)?(s=HE(),tp=Cb=ds=null,bu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return WE&&l.locale!=="ko"?null:l.data;default:return null}}var IB={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 JE(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!IB[s.type]:l==="textarea"}function ek(s,l,d,g){gu?yu?yu.push(g):yu=[g]:gu=g,l=Wp(l,"onChange"),0<l.length&&(d=new ip("onChange","change",null,d,g),s.push({event:d,listeners:l}))}var Mf=null,Of=null;function LB(s){I_(s,0)}function sp(s){var l=kf(s);if(NE(l))return s}function tk(s,l){if(s==="change")return l}var nk=!1;if(mo){var Ab;if(mo){var Db="oninput"in document;if(!Db){var rk=document.createElement("div");rk.setAttribute("oninput","return;"),Db=typeof rk.oninput=="function"}Ab=Db}else Ab=!1;nk=Ab&&(!document.documentMode||9<document.documentMode)}function ik(){Mf&&(Mf.detachEvent("onpropertychange",ok),Of=Mf=null)}function ok(s){if(s.propertyName==="value"&&sp(Of)){var l=[];ek(l,Of,s,xb(s)),UE(LB,l)}}function jB(s,l,d){s==="focusin"?(ik(),Mf=l,Of=d,Mf.attachEvent("onpropertychange",ok)):s==="focusout"&&ik()}function FB(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sp(Of)}function zB(s,l){if(s==="click")return sp(l)}function BB(s,l){if(s==="input"||s==="change")return sp(l)}function UB(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var $r=typeof Object.is=="function"?Object.is:UB;function $f(s,l){if($r(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),g=Object.keys(l);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var w=d[g];if(!oe.call(l,w)||!$r(s[w],l[w]))return!1}return!0}function sk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function ak(s,l){var d=sk(s);s=0;for(var g;d;){if(d.nodeType===3){if(g=s+d.textContent.length,s<=l&&g>=l)return{node:d,offset:l-s};s=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=sk(d)}}function lk(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?lk(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function uk(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Jh(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=Jh(s.document)}return l}function Mb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var HB=mo&&"documentMode"in document&&11>=document.documentMode,vu=null,Ob=null,Pf=null,$b=!1;function ck(s,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$b||vu==null||vu!==Jh(g)||(g=vu,"selectionStart"in g&&Mb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Pf&&$f(Pf,g)||(Pf=g,g=Wp(Ob,"onSelect"),0<g.length&&(l=new ip("onSelect","select",null,l,d),s.push({event:l,listeners:g}),l.target=vu)))}function Va(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var xu={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},Pb={},fk={};mo&&(fk=document.createElement("div").style,"AnimationEvent"in window||(delete xu.animationend.animation,delete xu.animationiteration.animation,delete xu.animationstart.animation),"TransitionEvent"in window||delete xu.transitionend.transition);function qa(s){if(Pb[s])return Pb[s];if(!xu[s])return s;var l=xu[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in fk)return Pb[s]=l[d];return s}var dk=qa("animationend"),hk=qa("animationiteration"),pk=qa("animationstart"),GB=qa("transitionrun"),VB=qa("transitionstart"),qB=qa("transitioncancel"),mk=qa("transitionend"),gk=new Map,Nb="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(" ");Nb.push("scrollEnd");function _i(s,l){gk.set(s,l),Ha(l,[s])}var ap=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ni=[],wu=0,Ib=0;function lp(){for(var s=wu,l=Ib=wu=0;l<s;){var d=ni[l];ni[l++]=null;var g=ni[l];ni[l++]=null;var w=ni[l];ni[l++]=null;var R=ni[l];if(ni[l++]=null,g!==null&&w!==null){var P=g.pending;P===null?w.next=w:(w.next=P.next,P.next=w),g.pending=w}R!==0&&yk(d,w,R)}}function up(s,l,d,g){ni[wu++]=s,ni[wu++]=l,ni[wu++]=d,ni[wu++]=g,Ib|=g,s.lanes|=g,s=s.alternate,s!==null&&(s.lanes|=g)}function Lb(s,l,d,g){return up(s,l,d,g),cp(s)}function Ya(s,l){return up(s,null,null,l),cp(s)}function yk(s,l,d){s.lanes|=d;var g=s.alternate;g!==null&&(g.lanes|=d);for(var w=!1,R=s.return;R!==null;)R.childLanes|=d,g=R.alternate,g!==null&&(g.childLanes|=d),R.tag===22&&(s=R.stateNode,s===null||s._visibility&1||(w=!0)),s=R,R=R.return;return s.tag===3?(R=s.stateNode,w&&l!==null&&(w=31-Ne(d),s=R.hiddenUpdates,g=s[w],g===null?s[w]=[l]:g.push(l),l.lane=d|536870912),R):null}function cp(s){if(50<nd)throw nd=0,qv=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Su={};function YB(s,l,d,g){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(s,l,d,g){return new YB(s,l,d,g)}function jb(s){return s=s.prototype,!(!s||!s.isReactComponent)}function go(s,l){var d=s.alternate;return d===null?(d=Pr(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function bk(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function fp(s,l,d,g,w,R){var P=0;if(g=s,typeof s=="function")jb(s)&&(P=1);else if(typeof s=="string")P=Z5(s,d,ie.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case B:return s=Pr(31,d,l,w),s.elementType=B,s.lanes=R,s;case v:return Wa(d.children,w,R,l);case S:P=8,w|=24;break;case x:return s=Pr(12,d,l,w|2),s.elementType=x,s.lanes=R,s;case A:return s=Pr(13,d,l,w),s.elementType=A,s.lanes=R,s;case D:return s=Pr(19,d,l,w),s.elementType=D,s.lanes=R,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:P=10;break e;case _:P=9;break e;case T:P=11;break e;case O:P=14;break e;case $:P=16,g=null;break e}P=29,d=Error(r(130,s===null?"null":typeof s,"")),g=null}return l=Pr(P,d,l,w),l.elementType=s,l.type=g,l.lanes=R,l}function Wa(s,l,d,g){return s=Pr(7,s,g,l),s.lanes=d,s}function Fb(s,l,d){return s=Pr(6,s,null,l),s.lanes=d,s}function vk(s){var l=Pr(18,null,null,0);return l.stateNode=s,l}function zb(s,l,d){return l=Pr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var xk=new WeakMap;function ri(s,l){if(typeof s=="object"&&s!==null){var d=xk.get(s);return d!==void 0?d:(l={value:s,source:l,stack:le(l)},xk.set(s,l),l)}return{value:s,source:l,stack:le(l)}}var Cu=[],Eu=0,dp=null,Nf=0,ii=[],oi=0,hs=null,Gi=1,Vi="";function yo(s,l){Cu[Eu++]=Nf,Cu[Eu++]=dp,dp=s,Nf=l}function wk(s,l,d){ii[oi++]=Gi,ii[oi++]=Vi,ii[oi++]=hs,hs=s;var g=Gi;s=Vi;var w=32-Ne(g)-1;g&=~(1<<w),d+=1;var R=32-Ne(l)+w;if(30<R){var P=w-w%5;R=(g&(1<<P)-1).toString(32),g>>=P,w-=P,Gi=1<<32-Ne(l)+w|d<<w|g,Vi=R+s}else Gi=1<<R|d<<w|g,Vi=s}function Bb(s){s.return!==null&&(yo(s,1),wk(s,1,0))}function Ub(s){for(;s===dp;)dp=Cu[--Eu],Cu[Eu]=null,Nf=Cu[--Eu],Cu[Eu]=null;for(;s===hs;)hs=ii[--oi],ii[oi]=null,Vi=ii[--oi],ii[oi]=null,Gi=ii[--oi],ii[oi]=null}function Sk(s,l){ii[oi++]=Gi,ii[oi++]=Vi,ii[oi++]=hs,Gi=l.id,Vi=l.overflow,hs=s}var Fn=null,Qt=null,Et=!1,ps=null,si=!1,Hb=Error(r(519));function ms(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw If(ri(l,s)),Hb}function Ck(s){var l=s.stateNode,d=s.type,g=s.memoizedProps;switch(l[on]=s,l[jn]=g,d){case"dialog":bt("cancel",l),bt("close",l);break;case"iframe":case"object":case"embed":bt("load",l);break;case"video":case"audio":for(d=0;d<id.length;d++)bt(id[d],l);break;case"source":bt("error",l);break;case"img":case"image":case"link":bt("error",l),bt("load",l);break;case"details":bt("toggle",l);break;case"input":bt("invalid",l),IE(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":bt("invalid",l);break;case"textarea":bt("invalid",l),jE(l,g.value,g.defaultValue,g.children)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||g.suppressHydrationWarning===!0||z_(l.textContent,d)?(g.popover!=null&&(bt("beforetoggle",l),bt("toggle",l)),g.onScroll!=null&&bt("scroll",l),g.onScrollEnd!=null&&bt("scrollend",l),g.onClick!=null&&(l.onclick=po),l=!0):l=!1,l||ms(s,!0)}function Ek(s){for(Fn=s.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:si=!1;return;case 27:case 3:si=!0;return;default:Fn=Fn.return}}function ku(s){if(s!==Fn)return!1;if(!Et)return Ek(s),Et=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||a0(s.type,s.memoizedProps)),d=!d),d&&Qt&&ms(s),Ek(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=K_(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=K_(s)}else l===27?(l=Qt,As(s.type)?(s=d0,d0=null,Qt=s):Qt=l):Qt=Fn?li(s.stateNode.nextSibling):null;return!0}function Ka(){Qt=Fn=null,Et=!1}function Gb(){var s=ps;return s!==null&&(yr===null?yr=s:yr.push.apply(yr,s),ps=null),s}function If(s){ps===null?ps=[s]:ps.push(s)}var Vb=Y(null),Xa=null,bo=null;function gs(s,l,d){H(Vb,l._currentValue),l._currentValue=d}function vo(s){s._currentValue=Vb.current,J(Vb)}function qb(s,l,d){for(;s!==null;){var g=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),s===d)break;s=s.return}}function Yb(s,l,d,g){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var R=w.dependencies;if(R!==null){var P=w.child;R=R.firstContext;e:for(;R!==null;){var V=R;R=w;for(var Q=0;Q<l.length;Q++)if(V.context===l[Q]){R.lanes|=d,V=R.alternate,V!==null&&(V.lanes|=d),qb(R.return,d,s),g||(P=null);break e}R=V.next}}else if(w.tag===18){if(P=w.return,P===null)throw Error(r(341));P.lanes|=d,R=P.alternate,R!==null&&(R.lanes|=d),qb(P,d,s),P=null}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===s){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}}function Ru(s,l,d,g){s=null;for(var w=l,R=!1;w!==null;){if(!R){if((w.flags&524288)!==0)R=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var P=w.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var V=w.type;$r(w.pendingProps.value,P.value)||(s!==null?s.push(V):s=[V])}}else if(w===ve.current){if(P=w.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(ud):s=[ud])}w=w.return}s!==null&&Yb(l,s,d,g),l.flags|=262144}function hp(s){for(s=s.firstContext;s!==null;){if(!$r(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Qa(s){Xa=s,bo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function zn(s){return kk(Xa,s)}function pp(s,l){return Xa===null&&Qa(s),kk(s,l)}function kk(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},bo===null){if(s===null)throw Error(r(308));bo=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else bo=bo.next=l;return d}var WB=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,g){s.push(g)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},KB=e.unstable_scheduleCallback,XB=e.unstable_NormalPriority,vn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wb(){return{controller:new WB,data:new Map,refCount:0}}function Lf(s){s.refCount--,s.refCount===0&&KB(XB,function(){s.controller.abort()})}var jf=null,Kb=0,_u=0,Tu=null;function QB(s,l){if(jf===null){var d=jf=[];Kb=0,_u=Zv(),Tu={status:"pending",value:void 0,then:function(g){d.push(g)}}}return Kb++,l.then(Rk,Rk),l}function Rk(){if(--Kb===0&&jf!==null){Tu!==null&&(Tu.status="fulfilled");var s=jf;jf=null,_u=0,Tu=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function ZB(s,l){var d=[],g={status:"pending",value:null,reason:null,then:function(w){d.push(w)}};return s.then(function(){g.status="fulfilled",g.value=l;for(var w=0;w<d.length;w++)(0,d[w])(l)},function(w){for(g.status="rejected",g.reason=w,w=0;w<d.length;w++)(0,d[w])(void 0)}),g}var _k=F.S;F.S=function(s,l){c_=_e(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&QB(s,l),_k!==null&&_k(s,l)};var Za=Y(null);function Xb(){var s=Za.current;return s!==null?s:Yt.pooledCache}function mp(s,l){l===null?H(Za,Za.current):H(Za,l.pool)}function Tk(){var s=Xb();return s===null?null:{parent:vn._currentValue,pool:s}}var Au=Error(r(460)),Qb=Error(r(474)),gp=Error(r(542)),yp={then:function(){}};function Ak(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Dk(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(po,po),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ok(s),s;default:if(typeof l.status=="string")l.then(po,po);else{if(s=Yt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(g){if(l.status==="pending"){var w=l;w.status="fulfilled",w.value=g}},function(g){if(l.status==="pending"){var w=l;w.status="rejected",w.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ok(s),s}throw el=l,Au}}function Ja(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(el=d,Au):d}}var el=null;function Mk(){if(el===null)throw Error(r(459));var s=el;return el=null,s}function Ok(s){if(s===Au||s===gp)throw Error(r(483))}var Du=null,Ff=0;function bp(s){var l=Ff;return Ff+=1,Du===null&&(Du=[]),Dk(Du,s,l)}function zf(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function vp(s,l){throw l.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function $k(s){function l(se,ee){if(s){var fe=se.deletions;fe===null?(se.deletions=[ee],se.flags|=16):fe.push(ee)}}function d(se,ee){if(!s)return null;for(;ee!==null;)l(se,ee),ee=ee.sibling;return null}function g(se){for(var ee=new Map;se!==null;)se.key!==null?ee.set(se.key,se):ee.set(se.index,se),se=se.sibling;return ee}function w(se,ee){return se=go(se,ee),se.index=0,se.sibling=null,se}function R(se,ee,fe){return se.index=fe,s?(fe=se.alternate,fe!==null?(fe=fe.index,fe<ee?(se.flags|=67108866,ee):fe):(se.flags|=67108866,ee)):(se.flags|=1048576,ee)}function P(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function V(se,ee,fe,we){return ee===null||ee.tag!==6?(ee=Fb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Q(se,ee,fe,we){var Qe=fe.type;return Qe===v?be(se,ee,fe.props.children,we,fe.key):ee!==null&&(ee.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===$&&Ja(Qe)===ee.type)?(ee=w(ee,fe.props),zf(ee,fe),ee.return=se,ee):(ee=fp(fe.type,fe.key,fe.props,null,se.mode,we),zf(ee,fe),ee.return=se,ee)}function de(se,ee,fe,we){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==fe.containerInfo||ee.stateNode.implementation!==fe.implementation?(ee=zb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe.children||[]),ee.return=se,ee)}function be(se,ee,fe,we,Qe){return ee===null||ee.tag!==7?(ee=Wa(fe,se.mode,we,Qe),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Ee(se,ee,fe){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Fb(""+ee,se.mode,fe),ee.return=se,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return fe=fp(ee.type,ee.key,ee.props,null,se.mode,fe),zf(fe,ee),fe.return=se,fe;case b:return ee=zb(ee,se.mode,fe),ee.return=se,ee;case $:return ee=Ja(ee),Ee(se,ee,fe)}if(j(ee)||M(ee))return ee=Wa(ee,se.mode,fe,null),ee.return=se,ee;if(typeof ee.then=="function")return Ee(se,bp(ee),fe);if(ee.$$typeof===k)return Ee(se,pp(se,ee),fe);vp(se,ee)}return null}function pe(se,ee,fe,we){var Qe=ee!==null?ee.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Qe!==null?null:V(se,ee,""+fe,we);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Qe?Q(se,ee,fe,we):null;case b:return fe.key===Qe?de(se,ee,fe,we):null;case $:return fe=Ja(fe),pe(se,ee,fe,we)}if(j(fe)||M(fe))return Qe!==null?null:be(se,ee,fe,we,null);if(typeof fe.then=="function")return pe(se,ee,bp(fe),we);if(fe.$$typeof===k)return pe(se,ee,pp(se,fe),we);vp(se,fe)}return null}function ye(se,ee,fe,we,Qe){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return se=se.get(fe)||null,V(ee,se,""+we,Qe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return se=se.get(we.key===null?fe:we.key)||null,Q(ee,se,we,Qe);case b:return se=se.get(we.key===null?fe:we.key)||null,de(ee,se,we,Qe);case $:return we=Ja(we),ye(se,ee,fe,we,Qe)}if(j(we)||M(we))return se=se.get(fe)||null,be(ee,se,we,Qe,null);if(typeof we.then=="function")return ye(se,ee,fe,bp(we),Qe);if(we.$$typeof===k)return ye(se,ee,fe,pp(ee,we),Qe);vp(ee,we)}return null}function Be(se,ee,fe,we){for(var Qe=null,At=null,qe=ee,at=ee=0,St=null;qe!==null&&at<fe.length;at++){qe.index>at?(St=qe,qe=null):St=qe.sibling;var Dt=pe(se,qe,fe[at],we);if(Dt===null){qe===null&&(qe=St);break}s&&qe&&Dt.alternate===null&&l(se,qe),ee=R(Dt,ee,at),At===null?Qe=Dt:At.sibling=Dt,At=Dt,qe=St}if(at===fe.length)return d(se,qe),Et&&yo(se,at),Qe;if(qe===null){for(;at<fe.length;at++)qe=Ee(se,fe[at],we),qe!==null&&(ee=R(qe,ee,at),At===null?Qe=qe:At.sibling=qe,At=qe);return Et&&yo(se,at),Qe}for(qe=g(qe);at<fe.length;at++)St=ye(qe,se,at,fe[at],we),St!==null&&(s&&St.alternate!==null&&qe.delete(St.key===null?at:St.key),ee=R(St,ee,at),At===null?Qe=St:At.sibling=St,At=St);return s&&qe.forEach(function(Ps){return l(se,Ps)}),Et&&yo(se,at),Qe}function et(se,ee,fe,we){if(fe==null)throw Error(r(151));for(var Qe=null,At=null,qe=ee,at=ee=0,St=null,Dt=fe.next();qe!==null&&!Dt.done;at++,Dt=fe.next()){qe.index>at?(St=qe,qe=null):St=qe.sibling;var Ps=pe(se,qe,Dt.value,we);if(Ps===null){qe===null&&(qe=St);break}s&&qe&&Ps.alternate===null&&l(se,qe),ee=R(Ps,ee,at),At===null?Qe=Ps:At.sibling=Ps,At=Ps,qe=St}if(Dt.done)return d(se,qe),Et&&yo(se,at),Qe;if(qe===null){for(;!Dt.done;at++,Dt=fe.next())Dt=Ee(se,Dt.value,we),Dt!==null&&(ee=R(Dt,ee,at),At===null?Qe=Dt:At.sibling=Dt,At=Dt);return Et&&yo(se,at),Qe}for(qe=g(qe);!Dt.done;at++,Dt=fe.next())Dt=ye(qe,se,at,Dt.value,we),Dt!==null&&(s&&Dt.alternate!==null&&qe.delete(Dt.key===null?at:Dt.key),ee=R(Dt,ee,at),At===null?Qe=Dt:At.sibling=Dt,At=Dt);return s&&qe.forEach(function(u6){return l(se,u6)}),Et&&yo(se,at),Qe}function Vt(se,ee,fe,we){if(typeof fe=="object"&&fe!==null&&fe.type===v&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Qe=fe.key;ee!==null;){if(ee.key===Qe){if(Qe=fe.type,Qe===v){if(ee.tag===7){d(se,ee.sibling),we=w(ee,fe.props.children),we.return=se,se=we;break e}}else if(ee.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===$&&Ja(Qe)===ee.type){d(se,ee.sibling),we=w(ee,fe.props),zf(we,fe),we.return=se,se=we;break e}d(se,ee);break}else l(se,ee);ee=ee.sibling}fe.type===v?(we=Wa(fe.props.children,se.mode,we,fe.key),we.return=se,se=we):(we=fp(fe.type,fe.key,fe.props,null,se.mode,we),zf(we,fe),we.return=se,se=we)}return P(se);case b:e:{for(Qe=fe.key;ee!==null;){if(ee.key===Qe)if(ee.tag===4&&ee.stateNode.containerInfo===fe.containerInfo&&ee.stateNode.implementation===fe.implementation){d(se,ee.sibling),we=w(ee,fe.children||[]),we.return=se,se=we;break e}else{d(se,ee);break}else l(se,ee);ee=ee.sibling}we=zb(fe,se.mode,we),we.return=se,se=we}return P(se);case $:return fe=Ja(fe),Vt(se,ee,fe,we)}if(j(fe))return Be(se,ee,fe,we);if(M(fe)){if(Qe=M(fe),typeof Qe!="function")throw Error(r(150));return fe=Qe.call(fe),et(se,ee,fe,we)}if(typeof fe.then=="function")return Vt(se,ee,bp(fe),we);if(fe.$$typeof===k)return Vt(se,ee,pp(se,fe),we);vp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ee!==null&&ee.tag===6?(d(se,ee.sibling),we=w(ee,fe),we.return=se,se=we):(d(se,ee),we=Fb(fe,se.mode,we),we.return=se,se=we),P(se)):d(se,ee)}return function(se,ee,fe,we){try{Ff=0;var Qe=Vt(se,ee,fe,we);return Du=null,Qe}catch(qe){if(qe===Au||qe===gp)throw qe;var At=Pr(29,qe,null,se.mode);return At.lanes=we,At.return=se,At}finally{}}}var tl=$k(!0),Pk=$k(!1),ys=!1;function Zb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jb(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function vs(s,l,d){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,($t&2)!==0){var w=g.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),g.pending=l,l=cp(s),yk(s,null,d),l}return up(s,g,l,d),cp(s)}function Bf(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var g=l.lanes;g&=s.pendingLanes,d|=g,l.lanes=d,fs(s,d)}}function ev(s,l){var d=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var w=null,R=null;if(d=d.firstBaseUpdate,d!==null){do{var P={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};R===null?w=R=P:R=R.next=P,d=d.next}while(d!==null);R===null?w=R=l:R=R.next=l}else w=R=l;d={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:R,shared:g.shared,callbacks:g.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var tv=!1;function Uf(){if(tv){var s=Tu;if(s!==null)throw s}}function Hf(s,l,d,g){tv=!1;var w=s.updateQueue;ys=!1;var R=w.firstBaseUpdate,P=w.lastBaseUpdate,V=w.shared.pending;if(V!==null){w.shared.pending=null;var Q=V,de=Q.next;Q.next=null,P===null?R=de:P.next=de,P=Q;var be=s.alternate;be!==null&&(be=be.updateQueue,V=be.lastBaseUpdate,V!==P&&(V===null?be.firstBaseUpdate=de:V.next=de,be.lastBaseUpdate=Q))}if(R!==null){var Ee=w.baseState;P=0,be=de=Q=null,V=R;do{var pe=V.lane&-536870913,ye=pe!==V.lane;if(ye?(wt&pe)===pe:(g&pe)===pe){pe!==0&&pe===_u&&(tv=!0),be!==null&&(be=be.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Be=s,et=V;pe=l;var Vt=d;switch(et.tag){case 1:if(Be=et.payload,typeof Be=="function"){Ee=Be.call(Vt,Ee,pe);break e}Ee=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=et.payload,pe=typeof Be=="function"?Be.call(Vt,Ee,pe):Be,pe==null)break e;Ee=p({},Ee,pe);break e;case 2:ys=!0}}pe=V.callback,pe!==null&&(s.flags|=64,ye&&(s.flags|=8192),ye=w.callbacks,ye===null?w.callbacks=[pe]:ye.push(pe))}else ye={lane:pe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},be===null?(de=be=ye,Q=Ee):be=be.next=ye,P|=pe;if(V=V.next,V===null){if(V=w.shared.pending,V===null)break;ye=V,V=ye.next,ye.next=null,w.lastBaseUpdate=ye,w.shared.pending=null}}while(!0);be===null&&(Q=Ee),w.baseState=Q,w.firstBaseUpdate=de,w.lastBaseUpdate=be,R===null&&(w.shared.lanes=0),Es|=P,s.lanes=P,s.memoizedState=Ee}}function Nk(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function Ik(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Nk(d[s],l)}var Mu=Y(null),xp=Y(0);function Lk(s,l){s=To,H(xp,s),H(Mu,l),To=s|l.baseLanes}function nv(){H(xp,To),H(Mu,Mu.current)}function rv(){To=xp.current,J(Mu),J(xp)}var Nr=Y(null),ai=null;function xs(s){var l=s.alternate;H(hn,hn.current&1),H(Nr,s),ai===null&&(l===null||Mu.current!==null||l.memoizedState!==null)&&(ai=s)}function iv(s){H(hn,hn.current),H(Nr,s),ai===null&&(ai=s)}function jk(s){s.tag===22?(H(hn,hn.current),H(Nr,s),ai===null&&(ai=s)):ws()}function ws(){H(hn,hn.current),H(Nr,Nr.current)}function Ir(s){J(Nr),ai===s&&(ai=null),J(hn)}var hn=Y(0);function wp(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||c0(d)||f0(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var xo=0,ot=null,Ht=null,xn=null,Sp=!1,Ou=!1,nl=!1,Cp=0,Gf=0,$u=null,JB=0;function sn(){throw Error(r(321))}function ov(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!$r(s[d],l[d]))return!1;return!0}function sv(s,l,d,g,w,R){return xo=R,ot=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,F.H=s===null||s.memoizedState===null?wR:wv,nl=!1,R=d(g,w),nl=!1,Ou&&(R=zk(l,d,g,w)),Fk(s),R}function Fk(s){F.H=Yf;var l=Ht!==null&&Ht.next!==null;if(xo=0,xn=Ht=ot=null,Sp=!1,Gf=0,$u=null,l)throw Error(r(300));s===null||wn||(s=s.dependencies,s!==null&&hp(s)&&(wn=!0))}function zk(s,l,d,g){ot=s;var w=0;do{if(Ou&&($u=null),Gf=0,Ou=!1,25<=w)throw Error(r(301));if(w+=1,xn=Ht=null,s.updateQueue!=null){var R=s.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}F.H=SR,R=l(d,g)}while(Ou);return R}function e5(){var s=F.H,l=s.useState()[0];return l=typeof l.then=="function"?Vf(l):l,s=s.useState()[0],(Ht!==null?Ht.memoizedState:null)!==s&&(ot.flags|=1024),l}function av(){var s=Cp!==0;return Cp=0,s}function lv(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function uv(s){if(Sp){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Sp=!1}xo=0,xn=Ht=ot=null,Ou=!1,Gf=Cp=0,$u=null}function nr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xn===null?ot.memoizedState=xn=s:xn=xn.next=s,xn}function pn(){if(Ht===null){var s=ot.alternate;s=s!==null?s.memoizedState:null}else s=Ht.next;var l=xn===null?ot.memoizedState:xn.next;if(l!==null)xn=l,Ht=s;else{if(s===null)throw ot.alternate===null?Error(r(467)):Error(r(310));Ht=s,s={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},xn===null?ot.memoizedState=xn=s:xn=xn.next=s}return xn}function Ep(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vf(s){var l=Gf;return Gf+=1,$u===null&&($u=[]),s=Dk($u,s,l),l=ot,(xn===null?l.memoizedState:xn.next)===null&&(l=l.alternate,F.H=l===null||l.memoizedState===null?wR:wv),s}function kp(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Vf(s);if(s.$$typeof===k)return zn(s)}throw Error(r(438,String(s)))}function cv(s){var l=null,d=ot.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var g=ot.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Ep(),ot.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),g=0;g<s;g++)d[g]=L;return l.index++,d}function wo(s,l){return typeof l=="function"?l(s):l}function Rp(s){var l=pn();return fv(l,Ht,s)}function fv(s,l,d){var g=s.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var w=s.baseQueue,R=g.pending;if(R!==null){if(w!==null){var P=w.next;w.next=R.next,R.next=P}l.baseQueue=w=R,g.pending=null}if(R=s.baseState,w===null)s.memoizedState=R;else{l=w.next;var V=P=null,Q=null,de=l,be=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(wt&Ee)===Ee:(xo&Ee)===Ee){var pe=de.revertLane;if(pe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ee===_u&&(be=!0);else if((xo&pe)===pe){de=de.next,pe===_u&&(be=!0);continue}else Ee={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=Ee,P=R):Q=Q.next=Ee,ot.lanes|=pe,Es|=pe;Ee=de.action,nl&&d(R,Ee),R=de.hasEagerState?de.eagerState:d(R,Ee)}else pe={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=pe,P=R):Q=Q.next=pe,ot.lanes|=Ee,Es|=Ee;de=de.next}while(de!==null&&de!==l);if(Q===null?P=R:Q.next=V,!$r(R,s.memoizedState)&&(wn=!0,be&&(d=Tu,d!==null)))throw d;s.memoizedState=R,s.baseState=P,s.baseQueue=Q,g.lastRenderedState=R}return w===null&&(g.lanes=0),[s.memoizedState,g.dispatch]}function dv(s){var l=pn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var g=d.dispatch,w=d.pending,R=l.memoizedState;if(w!==null){d.pending=null;var P=w=w.next;do R=s(R,P.action),P=P.next;while(P!==w);$r(R,l.memoizedState)||(wn=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),d.lastRenderedState=R}return[R,g]}function Bk(s,l,d){var g=ot,w=pn(),R=Et;if(R){if(d===void 0)throw Error(r(407));d=d()}else d=l();var P=!$r((Ht||w).memoizedState,d);if(P&&(w.memoizedState=d,wn=!0),w=w.queue,mv(Gk.bind(null,g,w,s),[s]),w.getSnapshot!==l||P||xn!==null&&xn.memoizedState.tag&1){if(g.flags|=2048,Pu(9,{destroy:void 0},Hk.bind(null,g,w,d,l),null),Yt===null)throw Error(r(349));R||(xo&127)!==0||Uk(g,l,d)}return d}function Uk(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=ot.updateQueue,l===null?(l=Ep(),ot.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function Hk(s,l,d,g){l.value=d,l.getSnapshot=g,Vk(l)&&qk(s)}function Gk(s,l,d){return d(function(){Vk(l)&&qk(s)})}function Vk(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!$r(s,d)}catch{return!0}}function qk(s){var l=Ya(s,2);l!==null&&br(l,s,2)}function hv(s){var l=nr();if(typeof s=="function"){var d=s;if(s=d(),nl){Xe(!0);try{d()}finally{Xe(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:s},l}function Yk(s,l,d,g){return s.baseState=d,fv(s,Ht,typeof g=="function"?g:wo)}function t5(s,l,d,g,w){if(Ap(s))throw Error(r(485));if(s=l.action,s!==null){var R={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){R.listeners.push(P)}};F.T!==null?d(!0):R.isTransition=!1,g(R),d=l.pending,d===null?(R.next=l.pending=R,Wk(l,R)):(R.next=d.next,l.pending=d.next=R)}}function Wk(s,l){var d=l.action,g=l.payload,w=s.state;if(l.isTransition){var R=F.T,P={};F.T=P;try{var V=d(w,g),Q=F.S;Q!==null&&Q(P,V),Kk(s,l,V)}catch(de){pv(s,l,de)}finally{R!==null&&P.types!==null&&(R.types=P.types),F.T=R}}else try{R=d(w,g),Kk(s,l,R)}catch(de){pv(s,l,de)}}function Kk(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){Xk(s,l,g)},function(g){return pv(s,l,g)}):Xk(s,l,d)}function Xk(s,l,d){l.status="fulfilled",l.value=d,Qk(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Wk(s,d)))}function pv(s,l,d){var g=s.pending;if(s.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=d,Qk(l),l=l.next;while(l!==g)}s.action=null}function Qk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function Zk(s,l){return l}function Jk(s,l){if(Et){var d=Yt.formState;if(d!==null){e:{var g=ot;if(Et){if(Qt){t:{for(var w=Qt,R=si;w.nodeType!==8;){if(!R){w=null;break t}if(w=li(w.nextSibling),w===null){w=null;break t}}R=w.data,w=R==="F!"||R==="F"?w:null}if(w){Qt=li(w.nextSibling),g=w.data==="F!";break e}}ms(g)}g=!1}g&&(l=d[0])}}return d=nr(),d.memoizedState=d.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zk,lastRenderedState:l},d.queue=g,d=bR.bind(null,ot,g),g.dispatch=d,g=hv(!1),R=xv.bind(null,ot,!1,g.queue),g=nr(),w={state:l,dispatch:null,action:s,pending:null},g.queue=w,d=t5.bind(null,ot,w,R,d),w.dispatch=d,g.memoizedState=s,[l,d,!1]}function eR(s){var l=pn();return tR(l,Ht,s)}function tR(s,l,d){if(l=fv(s,l,Zk)[0],s=Rp(wo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=Vf(l)}catch(P){throw P===Au?gp:P}else g=l;l=pn();var w=l.queue,R=w.dispatch;return d!==l.memoizedState&&(ot.flags|=2048,Pu(9,{destroy:void 0},n5.bind(null,w,d),null)),[g,R,s]}function n5(s,l){s.action=l}function nR(s){var l=pn(),d=Ht;if(d!==null)return tR(l,d,s);pn(),l=l.memoizedState,d=pn();var g=d.queue.dispatch;return d.memoizedState=s,[l,g,!1]}function Pu(s,l,d,g){return s={tag:s,create:d,deps:g,inst:l,next:null},l=ot.updateQueue,l===null&&(l=Ep(),ot.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(g=d.next,d.next=s,s.next=g,l.lastEffect=s),s}function rR(){return pn().memoizedState}function _p(s,l,d,g){var w=nr();ot.flags|=s,w.memoizedState=Pu(1|l,{destroy:void 0},d,g===void 0?null:g)}function Tp(s,l,d,g){var w=pn();g=g===void 0?null:g;var R=w.memoizedState.inst;Ht!==null&&g!==null&&ov(g,Ht.memoizedState.deps)?w.memoizedState=Pu(l,R,d,g):(ot.flags|=s,w.memoizedState=Pu(1|l,R,d,g))}function iR(s,l){_p(8390656,8,s,l)}function mv(s,l){Tp(2048,8,s,l)}function r5(s){ot.flags|=4;var l=ot.updateQueue;if(l===null)l=Ep(),ot.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function oR(s){var l=pn().memoizedState;return r5({ref:l,nextImpl:s}),function(){if(($t&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function sR(s,l){return Tp(4,2,s,l)}function aR(s,l){return Tp(4,4,s,l)}function lR(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function uR(s,l,d){d=d!=null?d.concat([s]):null,Tp(4,4,lR.bind(null,l,s),d)}function gv(){}function cR(s,l){var d=pn();l=l===void 0?null:l;var g=d.memoizedState;return l!==null&&ov(l,g[1])?g[0]:(d.memoizedState=[s,l],s)}function fR(s,l){var d=pn();l=l===void 0?null:l;var g=d.memoizedState;if(l!==null&&ov(l,g[1]))return g[0];if(g=s(),nl){Xe(!0);try{s()}finally{Xe(!1)}}return d.memoizedState=[g,l],g}function yv(s,l,d){return d===void 0||(xo&1073741824)!==0&&(wt&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=d_(),ot.lanes|=s,Es|=s,d)}function dR(s,l,d,g){return $r(d,l)?d:Mu.current!==null?(s=yv(s,d,g),$r(s,l)||(wn=!0),s):(xo&42)===0||(xo&1073741824)!==0&&(wt&261930)===0?(wn=!0,s.memoizedState=d):(s=d_(),ot.lanes|=s,Es|=s,l)}function hR(s,l,d,g,w){var R=U.p;U.p=R!==0&&8>R?R:8;var P=F.T,V={};F.T=V,xv(s,!1,l,d);try{var Q=w(),de=F.S;if(de!==null&&de(V,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=ZB(Q,g);qf(s,l,be,Fr(s))}else qf(s,l,g,Fr(s))}catch(Ee){qf(s,l,{then:function(){},status:"rejected",reason:Ee},Fr())}finally{U.p=R,P!==null&&V.types!==null&&(P.types=V.types),F.T=P}}function i5(){}function bv(s,l,d,g){if(s.tag!==5)throw Error(r(476));var w=pR(s).queue;hR(s,w,l,q,d===null?i5:function(){return mR(s),d(g)})}function pR(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:q},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function mR(s){var l=pR(s);l.next===null&&(l=s.alternate.memoizedState),qf(s,l.next.queue,{},Fr())}function vv(){return zn(ud)}function gR(){return pn().memoizedState}function yR(){return pn().memoizedState}function o5(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Fr();s=bs(d);var g=vs(l,s,d);g!==null&&(br(g,l,d),Bf(g,l,d)),l={cache:Wb()},s.payload=l;return}l=l.return}}function s5(s,l,d){var g=Fr();d={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Ap(s)?vR(l,d):(d=Lb(s,l,d,g),d!==null&&(br(d,s,g),xR(d,l,g)))}function bR(s,l,d){var g=Fr();qf(s,l,d,g)}function qf(s,l,d,g){var w={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Ap(s))vR(l,w);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var P=l.lastRenderedState,V=R(P,d);if(w.hasEagerState=!0,w.eagerState=V,$r(V,P))return up(s,l,w,0),Yt===null&&lp(),!1}catch{}finally{}if(d=Lb(s,l,w,g),d!==null)return br(d,s,g),xR(d,l,g),!0}return!1}function xv(s,l,d,g){if(g={lane:2,revertLane:Zv(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Ap(s)){if(l)throw Error(r(479))}else l=Lb(s,d,g,2),l!==null&&br(l,s,2)}function Ap(s){var l=s.alternate;return s===ot||l!==null&&l===ot}function vR(s,l){Ou=Sp=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function xR(s,l,d){if((d&4194048)!==0){var g=l.lanes;g&=s.pendingLanes,d|=g,l.lanes=d,fs(s,d)}}var Yf={readContext:zn,use:kp,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};Yf.useEffectEvent=sn;var wR={readContext:zn,use:kp,useCallback:function(s,l){return nr().memoizedState=[s,l===void 0?null:l],s},useContext:zn,useEffect:iR,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,_p(4194308,4,lR.bind(null,l,s),d)},useLayoutEffect:function(s,l){return _p(4194308,4,s,l)},useInsertionEffect:function(s,l){_p(4,2,s,l)},useMemo:function(s,l){var d=nr();l=l===void 0?null:l;var g=s();if(nl){Xe(!0);try{s()}finally{Xe(!1)}}return d.memoizedState=[g,l],g},useReducer:function(s,l,d){var g=nr();if(d!==void 0){var w=d(l);if(nl){Xe(!0);try{d(l)}finally{Xe(!1)}}}else w=l;return g.memoizedState=g.baseState=w,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:w},g.queue=s,s=s.dispatch=s5.bind(null,ot,s),[g.memoizedState,s]},useRef:function(s){var l=nr();return s={current:s},l.memoizedState=s},useState:function(s){s=hv(s);var l=s.queue,d=bR.bind(null,ot,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:gv,useDeferredValue:function(s,l){var d=nr();return yv(d,s,l)},useTransition:function(){var s=hv(!1);return s=hR.bind(null,ot,s.queue,!0,!1),nr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var g=ot,w=nr();if(Et){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Yt===null)throw Error(r(349));(wt&127)!==0||Uk(g,l,d)}w.memoizedState=d;var R={value:d,getSnapshot:l};return w.queue=R,iR(Gk.bind(null,g,R,s),[s]),g.flags|=2048,Pu(9,{destroy:void 0},Hk.bind(null,g,R,d,l),null),d},useId:function(){var s=nr(),l=Yt.identifierPrefix;if(Et){var d=Vi,g=Gi;d=(g&~(1<<32-Ne(g)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Cp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=JB++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:vv,useFormState:Jk,useActionState:Jk,useOptimistic:function(s){var l=nr();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=xv.bind(null,ot,!0,d),d.dispatch=l,[s,l]},useMemoCache:cv,useCacheRefresh:function(){return nr().memoizedState=o5.bind(null,ot)},useEffectEvent:function(s){var l=nr(),d={impl:s};return l.memoizedState=d,function(){if(($t&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},wv={readContext:zn,use:kp,useCallback:cR,useContext:zn,useEffect:mv,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:aR,useMemo:fR,useReducer:Rp,useRef:rR,useState:function(){return Rp(wo)},useDebugValue:gv,useDeferredValue:function(s,l){var d=pn();return dR(d,Ht.memoizedState,s,l)},useTransition:function(){var s=Rp(wo)[0],l=pn().memoizedState;return[typeof s=="boolean"?s:Vf(s),l]},useSyncExternalStore:Bk,useId:gR,useHostTransitionStatus:vv,useFormState:eR,useActionState:eR,useOptimistic:function(s,l){var d=pn();return Yk(d,Ht,s,l)},useMemoCache:cv,useCacheRefresh:yR};wv.useEffectEvent=oR;var SR={readContext:zn,use:kp,useCallback:cR,useContext:zn,useEffect:mv,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:aR,useMemo:fR,useReducer:dv,useRef:rR,useState:function(){return dv(wo)},useDebugValue:gv,useDeferredValue:function(s,l){var d=pn();return Ht===null?yv(d,s,l):dR(d,Ht.memoizedState,s,l)},useTransition:function(){var s=dv(wo)[0],l=pn().memoizedState;return[typeof s=="boolean"?s:Vf(s),l]},useSyncExternalStore:Bk,useId:gR,useHostTransitionStatus:vv,useFormState:nR,useActionState:nR,useOptimistic:function(s,l){var d=pn();return Ht!==null?Yk(d,Ht,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:cv,useCacheRefresh:yR};SR.useEffectEvent=oR;function Sv(s,l,d,g){l=s.memoizedState,d=d(g,l),d=d==null?l:p({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Cv={enqueueSetState:function(s,l,d){s=s._reactInternals;var g=Fr(),w=bs(g);w.payload=l,d!=null&&(w.callback=d),l=vs(s,w,g),l!==null&&(br(l,s,g),Bf(l,s,g))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var g=Fr(),w=bs(g);w.tag=1,w.payload=l,d!=null&&(w.callback=d),l=vs(s,w,g),l!==null&&(br(l,s,g),Bf(l,s,g))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Fr(),g=bs(d);g.tag=2,l!=null&&(g.callback=l),l=vs(s,g,d),l!==null&&(br(l,s,d),Bf(l,s,d))}};function CR(s,l,d,g,w,R,P){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(g,R,P):l.prototype&&l.prototype.isPureReactComponent?!$f(d,g)||!$f(w,R):!0}function ER(s,l,d,g){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,g),l.state!==s&&Cv.enqueueReplaceState(l,l.state,null)}function rl(s,l){var d=l;if("ref"in l){d={};for(var g in l)g!=="ref"&&(d[g]=l[g])}if(s=s.defaultProps){d===l&&(d=p({},d));for(var w in s)d[w]===void 0&&(d[w]=s[w])}return d}function kR(s){ap(s)}function RR(s){console.error(s)}function _R(s){ap(s)}function Dp(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function TR(s,l,d){try{var g=s.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function Ev(s,l,d){return d=bs(d),d.tag=3,d.payload={element:null},d.callback=function(){Dp(s,l)},d}function AR(s){return s=bs(s),s.tag=3,s}function DR(s,l,d,g){var w=d.type.getDerivedStateFromError;if(typeof w=="function"){var R=g.value;s.payload=function(){return w(R)},s.callback=function(){TR(l,d,g)}}var P=d.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(s.callback=function(){TR(l,d,g),typeof w!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var V=g.stack;this.componentDidCatch(g.value,{componentStack:V!==null?V:""})})}function a5(s,l,d,g,w){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=d.alternate,l!==null&&Ru(l,d,w,!0),d=Nr.current,d!==null){switch(d.tag){case 31:case 13:return ai===null?Up():d.alternate===null&&an===0&&(an=3),d.flags&=-257,d.flags|=65536,d.lanes=w,g===yp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([g]):l.add(g),Kv(s,g,w)),!1;case 22:return d.flags|=65536,g===yp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([g]):d.add(g)),Kv(s,g,w)),!1}throw Error(r(435,d.tag))}return Kv(s,g,w),Up(),!1}if(Et)return l=Nr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,g!==Hb&&(s=Error(r(422),{cause:g}),If(ri(s,d)))):(g!==Hb&&(l=Error(r(423),{cause:g}),If(ri(l,d))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,g=ri(g,d),w=Ev(s.stateNode,g,w),ev(s,w),an!==4&&(an=2)),!1;var R=Error(r(520),{cause:g});if(R=ri(R,d),td===null?td=[R]:td.push(R),an!==4&&(an=2),l===null)return!0;g=ri(g,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=w&-w,d.lanes|=s,s=Ev(d.stateNode,g,s),ev(d,s),!1;case 1:if(l=d.type,R=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(ks===null||!ks.has(R))))return d.flags|=65536,w&=-w,d.lanes|=w,w=AR(w),DR(w,s,d,g),ev(d,w),!1}d=d.return}while(d!==null);return!1}var kv=Error(r(461)),wn=!1;function Bn(s,l,d,g){l.child=s===null?Pk(l,null,d,g):tl(l,s.child,d,g)}function MR(s,l,d,g,w){d=d.render;var R=l.ref;if("ref"in g){var P={};for(var V in g)V!=="ref"&&(P[V]=g[V])}else P=g;return Qa(l),g=sv(s,l,d,P,R,w),V=av(),s!==null&&!wn?(lv(s,l,w),So(s,l,w)):(Et&&V&&Bb(l),l.flags|=1,Bn(s,l,g,w),l.child)}function OR(s,l,d,g,w){if(s===null){var R=d.type;return typeof R=="function"&&!jb(R)&&R.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=R,$R(s,l,R,g,w)):(s=fp(d.type,null,g,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(R=s.child,!$v(s,w)){var P=R.memoizedProps;if(d=d.compare,d=d!==null?d:$f,d(P,g)&&s.ref===l.ref)return So(s,l,w)}return l.flags|=1,s=go(R,g),s.ref=l.ref,s.return=l,l.child=s}function $R(s,l,d,g,w){if(s!==null){var R=s.memoizedProps;if($f(R,g)&&s.ref===l.ref)if(wn=!1,l.pendingProps=g=R,$v(s,w))(s.flags&131072)!==0&&(wn=!0);else return l.lanes=s.lanes,So(s,l,w)}return Rv(s,l,d,g,w)}function PR(s,l,d,g){var w=g.children,R=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(R=R!==null?R.baseLanes|d:d,s!==null){for(g=l.child=s.child,w=0;g!==null;)w=w|g.lanes|g.childLanes,g=g.sibling;g=w&~R}else g=0,l.child=null;return NR(s,l,R,d,g)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&mp(l,R!==null?R.cachePool:null),R!==null?Lk(l,R):nv(),jk(l);else return g=l.lanes=536870912,NR(s,l,R!==null?R.baseLanes|d:d,d,g)}else R!==null?(mp(l,R.cachePool),Lk(l,R),ws(),l.memoizedState=null):(s!==null&&mp(l,null),nv(),ws());return Bn(s,l,w,d),l.child}function Wf(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function NR(s,l,d,g,w){var R=Xb();return R=R===null?null:{parent:vn._currentValue,pool:R},l.memoizedState={baseLanes:d,cachePool:R},s!==null&&mp(l,null),nv(),jk(l),s!==null&&Ru(s,l,g,!0),l.childLanes=w,null}function Mp(s,l){return l=$p({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function IR(s,l,d){return tl(l,s.child,null,d),s=Mp(l,l.pendingProps),s.flags|=2,Ir(l),l.memoizedState=null,s}function l5(s,l,d){var g=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Et){if(g.mode==="hidden")return s=Mp(l,g),l.lanes=536870912,Wf(null,s);if(iv(l),(s=Qt)?(s=W_(s,si),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},d=vk(s),d.return=l,l.child=d,Fn=l,Qt=null)):s=null,s===null)throw ms(l);return l.lanes=536870912,null}return Mp(l,g)}var R=s.memoizedState;if(R!==null){var P=R.dehydrated;if(iv(l),w)if(l.flags&256)l.flags&=-257,l=IR(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(wn||Ru(s,l,d,!1),w=(d&s.childLanes)!==0,wn||w){if(g=Yt,g!==null&&(P=Ri(g,d),P!==0&&P!==R.retryLane))throw R.retryLane=P,Ya(s,P),br(g,s,P),kv;Up(),l=IR(s,l,d)}else s=R.treeContext,Qt=li(P.nextSibling),Fn=l,Et=!0,ps=null,si=!1,s!==null&&Sk(l,s),l=Mp(l,g),l.flags|=4096;return l}return s=go(s.child,{mode:g.mode,children:g.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Op(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Rv(s,l,d,g,w){return Qa(l),d=sv(s,l,d,g,void 0,w),g=av(),s!==null&&!wn?(lv(s,l,w),So(s,l,w)):(Et&&g&&Bb(l),l.flags|=1,Bn(s,l,d,w),l.child)}function LR(s,l,d,g,w,R){return Qa(l),l.updateQueue=null,d=zk(l,g,d,w),Fk(s),g=av(),s!==null&&!wn?(lv(s,l,R),So(s,l,R)):(Et&&g&&Bb(l),l.flags|=1,Bn(s,l,d,R),l.child)}function jR(s,l,d,g,w){if(Qa(l),l.stateNode===null){var R=Su,P=d.contextType;typeof P=="object"&&P!==null&&(R=zn(P)),R=new d(g,R),l.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=Cv,l.stateNode=R,R._reactInternals=l,R=l.stateNode,R.props=g,R.state=l.memoizedState,R.refs={},Zb(l),P=d.contextType,R.context=typeof P=="object"&&P!==null?zn(P):Su,R.state=l.memoizedState,P=d.getDerivedStateFromProps,typeof P=="function"&&(Sv(l,d,P,g),R.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(P=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),P!==R.state&&Cv.enqueueReplaceState(R,R.state,null),Hf(l,g,R,w),Uf(),R.state=l.memoizedState),typeof R.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(s===null){R=l.stateNode;var V=l.memoizedProps,Q=rl(d,V);R.props=Q;var de=R.context,be=d.contextType;P=Su,typeof be=="object"&&be!==null&&(P=zn(be));var Ee=d.getDerivedStateFromProps;be=typeof Ee=="function"||typeof R.getSnapshotBeforeUpdate=="function",V=l.pendingProps!==V,be||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(V||de!==P)&&ER(l,R,g,P),ys=!1;var pe=l.memoizedState;R.state=pe,Hf(l,g,R,w),Uf(),de=l.memoizedState,V||pe!==de||ys?(typeof Ee=="function"&&(Sv(l,d,Ee,g),de=l.memoizedState),(Q=ys||CR(l,d,Q,g,pe,de,P))?(be||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=de),R.props=g,R.state=de,R.context=P,g=Q):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{R=l.stateNode,Jb(s,l),P=l.memoizedProps,be=rl(d,P),R.props=be,Ee=l.pendingProps,pe=R.context,de=d.contextType,Q=Su,typeof de=="object"&&de!==null&&(Q=zn(de)),V=d.getDerivedStateFromProps,(de=typeof V=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==Ee||pe!==Q)&&ER(l,R,g,Q),ys=!1,pe=l.memoizedState,R.state=pe,Hf(l,g,R,w),Uf();var ye=l.memoizedState;P!==Ee||pe!==ye||ys||s!==null&&s.dependencies!==null&&hp(s.dependencies)?(typeof V=="function"&&(Sv(l,d,V,g),ye=l.memoizedState),(be=ys||CR(l,d,be,g,pe,ye,Q)||s!==null&&s.dependencies!==null&&hp(s.dependencies))?(de||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(g,ye,Q),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(g,ye,Q)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=ye),R.props=g,R.state=ye,R.context=Q,g=be):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),g=!1)}return R=g,Op(s,l),g=(l.flags&128)!==0,R||g?(R=l.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:R.render(),l.flags|=1,s!==null&&g?(l.child=tl(l,s.child,null,w),l.child=tl(l,null,d,w)):Bn(s,l,d,w),l.memoizedState=R.state,s=l.child):s=So(s,l,w),s}function FR(s,l,d,g){return Ka(),l.flags|=256,Bn(s,l,d,g),l.child}var _v={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tv(s){return{baseLanes:s,cachePool:Tk()}}function Av(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=jr),s}function zR(s,l,d){var g=l.pendingProps,w=!1,R=(l.flags&128)!==0,P;if((P=R)||(P=s!==null&&s.memoizedState===null?!1:(hn.current&2)!==0),P&&(w=!0,l.flags&=-129),P=(l.flags&32)!==0,l.flags&=-33,s===null){if(Et){if(w?xs(l):ws(),(s=Qt)?(s=W_(s,si),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},d=vk(s),d.return=l,l.child=d,Fn=l,Qt=null)):s=null,s===null)throw ms(l);return f0(s)?l.lanes=32:l.lanes=536870912,null}var V=g.children;return g=g.fallback,w?(ws(),w=l.mode,V=$p({mode:"hidden",children:V},w),g=Wa(g,w,d,null),V.return=l,g.return=l,V.sibling=g,l.child=V,g=l.child,g.memoizedState=Tv(d),g.childLanes=Av(s,P,d),l.memoizedState=_v,Wf(null,g)):(xs(l),Dv(l,V))}var Q=s.memoizedState;if(Q!==null&&(V=Q.dehydrated,V!==null)){if(R)l.flags&256?(xs(l),l.flags&=-257,l=Mv(s,l,d)):l.memoizedState!==null?(ws(),l.child=s.child,l.flags|=128,l=null):(ws(),V=g.fallback,w=l.mode,g=$p({mode:"visible",children:g.children},w),V=Wa(V,w,d,null),V.flags|=2,g.return=l,V.return=l,g.sibling=V,l.child=g,tl(l,s.child,null,d),g=l.child,g.memoizedState=Tv(d),g.childLanes=Av(s,P,d),l.memoizedState=_v,l=Wf(null,g));else if(xs(l),f0(V)){if(P=V.nextSibling&&V.nextSibling.dataset,P)var de=P.dgst;P=de,g=Error(r(419)),g.stack="",g.digest=P,If({value:g,source:null,stack:null}),l=Mv(s,l,d)}else if(wn||Ru(s,l,d,!1),P=(d&s.childLanes)!==0,wn||P){if(P=Yt,P!==null&&(g=Ri(P,d),g!==0&&g!==Q.retryLane))throw Q.retryLane=g,Ya(s,g),br(P,s,g),kv;c0(V)||Up(),l=Mv(s,l,d)}else c0(V)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Qt=li(V.nextSibling),Fn=l,Et=!0,ps=null,si=!1,s!==null&&Sk(l,s),l=Dv(l,g.children),l.flags|=4096);return l}return w?(ws(),V=g.fallback,w=l.mode,Q=s.child,de=Q.sibling,g=go(Q,{mode:"hidden",children:g.children}),g.subtreeFlags=Q.subtreeFlags&65011712,de!==null?V=go(de,V):(V=Wa(V,w,d,null),V.flags|=2),V.return=l,g.return=l,g.sibling=V,l.child=g,Wf(null,g),g=l.child,V=s.child.memoizedState,V===null?V=Tv(d):(w=V.cachePool,w!==null?(Q=vn._currentValue,w=w.parent!==Q?{parent:Q,pool:Q}:w):w=Tk(),V={baseLanes:V.baseLanes|d,cachePool:w}),g.memoizedState=V,g.childLanes=Av(s,P,d),l.memoizedState=_v,Wf(s.child,g)):(xs(l),d=s.child,s=d.sibling,d=go(d,{mode:"visible",children:g.children}),d.return=l,d.sibling=null,s!==null&&(P=l.deletions,P===null?(l.deletions=[s],l.flags|=16):P.push(s)),l.child=d,l.memoizedState=null,d)}function Dv(s,l){return l=$p({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function $p(s,l){return s=Pr(22,s,null,l),s.lanes=0,s}function Mv(s,l,d){return tl(l,s.child,null,d),s=Dv(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function BR(s,l,d){s.lanes|=l;var g=s.alternate;g!==null&&(g.lanes|=l),qb(s.return,l,d)}function Ov(s,l,d,g,w,R){var P=s.memoizedState;P===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:w,treeForkCount:R}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=g,P.tail=d,P.tailMode=w,P.treeForkCount=R)}function UR(s,l,d){var g=l.pendingProps,w=g.revealOrder,R=g.tail;g=g.children;var P=hn.current,V=(P&2)!==0;if(V?(P=P&1|2,l.flags|=128):P&=1,H(hn,P),Bn(s,l,g,d),g=Et?Nf:0,!V&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&BR(s,d,l);else if(s.tag===19)BR(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(d=l.child,w=null;d!==null;)s=d.alternate,s!==null&&wp(s)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),Ov(l,!1,w,d,R,g);break;case"backwards":case"unstable_legacy-backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&wp(s)===null){l.child=w;break}s=w.sibling,w.sibling=d,d=w,w=s}Ov(l,!0,d,null,R,g);break;case"together":Ov(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function So(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Es|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Ru(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,d=go(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=go(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function $v(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&hp(s)))}function u5(s,l,d){switch(l.tag){case 3:Re(l,l.stateNode.containerInfo),gs(l,vn,s.memoizedState.cache),Ka();break;case 27:case 5:Ie(l);break;case 4:Re(l,l.stateNode.containerInfo);break;case 10:gs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,iv(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(xs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?zR(s,l,d):(xs(l),s=So(s,l,d),s!==null?s.sibling:null);xs(l);break;case 19:var w=(s.flags&128)!==0;if(g=(d&l.childLanes)!==0,g||(Ru(s,l,d,!1),g=(d&l.childLanes)!==0),w){if(g)return UR(s,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),H(hn,hn.current),g)break;return null;case 22:return l.lanes=0,PR(s,l,d,l.pendingProps);case 24:gs(l,vn,s.memoizedState.cache)}return So(s,l,d)}function HR(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)wn=!0;else{if(!$v(s,d)&&(l.flags&128)===0)return wn=!1,u5(s,l,d);wn=(s.flags&131072)!==0}else wn=!1,Et&&(l.flags&1048576)!==0&&wk(l,Nf,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(s=Ja(l.elementType),l.type=s,typeof s=="function")jb(s)?(g=rl(s,g),l.tag=1,l=jR(null,l,s,g,d)):(l.tag=0,l=Rv(null,l,s,g,d));else{if(s!=null){var w=s.$$typeof;if(w===T){l.tag=11,l=MR(null,l,s,g,d);break e}else if(w===O){l.tag=14,l=OR(null,l,s,g,d);break e}}throw l=G(s)||s,Error(r(306,l,""))}}return l;case 0:return Rv(s,l,l.type,l.pendingProps,d);case 1:return g=l.type,w=rl(g,l.pendingProps),jR(s,l,g,w,d);case 3:e:{if(Re(l,l.stateNode.containerInfo),s===null)throw Error(r(387));g=l.pendingProps;var R=l.memoizedState;w=R.element,Jb(s,l),Hf(l,g,null,d);var P=l.memoizedState;if(g=P.cache,gs(l,vn,g),g!==R.cache&&Yb(l,[vn],d,!0),Uf(),g=P.element,R.isDehydrated)if(R={element:g,isDehydrated:!1,cache:P.cache},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){l=FR(s,l,g,d);break e}else if(g!==w){w=ri(Error(r(424)),l),If(w),l=FR(s,l,g,d);break e}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Qt=li(s.firstChild),Fn=l,Et=!0,ps=null,si=!0,d=Pk(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Ka(),g===w){l=So(s,l,d);break e}Bn(s,l,g,d)}l=l.child}return l;case 26:return Op(s,l),s===null?(d=eT(l.type,null,l.pendingProps,null))?l.memoizedState=d:Et||(d=l.type,s=l.pendingProps,g=Kp(he.current).createElement(d),g[on]=l,g[jn]=s,Un(g,d,s),On(g),l.stateNode=g):l.memoizedState=eT(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Ie(l),s===null&&Et&&(g=l.stateNode=Q_(l.type,l.pendingProps,he.current),Fn=l,si=!0,w=Qt,As(l.type)?(d0=w,Qt=li(g.firstChild)):Qt=w),Bn(s,l,l.pendingProps.children,d),Op(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Et&&((w=g=Qt)&&(g=F5(g,l.type,l.pendingProps,si),g!==null?(l.stateNode=g,Fn=l,Qt=li(g.firstChild),si=!1,w=!0):w=!1),w||ms(l)),Ie(l),w=l.type,R=l.pendingProps,P=s!==null?s.memoizedProps:null,g=R.children,a0(w,R)?g=null:P!==null&&a0(w,P)&&(l.flags|=32),l.memoizedState!==null&&(w=sv(s,l,e5,null,null,d),ud._currentValue=w),Op(s,l),Bn(s,l,g,d),l.child;case 6:return s===null&&Et&&((s=d=Qt)&&(d=z5(d,l.pendingProps,si),d!==null?(l.stateNode=d,Fn=l,Qt=null,s=!0):s=!1),s||ms(l)),null;case 13:return zR(s,l,d);case 4:return Re(l,l.stateNode.containerInfo),g=l.pendingProps,s===null?l.child=tl(l,null,g,d):Bn(s,l,g,d),l.child;case 11:return MR(s,l,l.type,l.pendingProps,d);case 7:return Bn(s,l,l.pendingProps,d),l.child;case 8:return Bn(s,l,l.pendingProps.children,d),l.child;case 12:return Bn(s,l,l.pendingProps.children,d),l.child;case 10:return g=l.pendingProps,gs(l,l.type,g.value),Bn(s,l,g.children,d),l.child;case 9:return w=l.type._context,g=l.pendingProps.children,Qa(l),w=zn(w),g=g(w),l.flags|=1,Bn(s,l,g,d),l.child;case 14:return OR(s,l,l.type,l.pendingProps,d);case 15:return $R(s,l,l.type,l.pendingProps,d);case 19:return UR(s,l,d);case 31:return l5(s,l,d);case 22:return PR(s,l,d,l.pendingProps);case 24:return Qa(l),g=zn(vn),s===null?(w=Xb(),w===null&&(w=Yt,R=Wb(),w.pooledCache=R,R.refCount++,R!==null&&(w.pooledCacheLanes|=d),w=R),l.memoizedState={parent:g,cache:w},Zb(l),gs(l,vn,w)):((s.lanes&d)!==0&&(Jb(s,l),Hf(l,null,null,d),Uf()),w=s.memoizedState,R=l.memoizedState,w.parent!==g?(w={parent:g,cache:g},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),gs(l,vn,g)):(g=R.cache,gs(l,vn,g),g!==w.cache&&Yb(l,[vn],d,!0))),Bn(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Co(s){s.flags|=4}function Pv(s,l,d,g,w){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(w&335544128)===w)if(s.stateNode.complete)s.flags|=8192;else if(g_())s.flags|=8192;else throw el=yp,Qb}else s.flags&=-16777217}function GR(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!oT(l))if(g_())s.flags|=8192;else throw el=yp,Qb}function Pp(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?Ei():536870912,s.lanes|=l,ju|=l)}function Kf(s,l){if(!Et)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function Zt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,g=0;if(l)for(var w=s.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags&65011712,g|=w.flags&65011712,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=g,s.childLanes=d,l}function c5(s,l,d){var g=l.pendingProps;switch(Ub(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(l),null;case 1:return Zt(l),null;case 3:return d=l.stateNode,g=null,s!==null&&(g=s.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),vo(vn),ce(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(ku(l)?Co(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Gb())),Zt(l),null;case 26:var w=l.type,R=l.memoizedState;return s===null?(Co(l),R!==null?(Zt(l),GR(l,R)):(Zt(l),Pv(l,w,null,g,d))):R?R!==s.memoizedState?(Co(l),Zt(l),GR(l,R)):(Zt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==g&&Co(l),Zt(l),Pv(l,w,s,g,d)),null;case 27:if(We(l),d=he.current,w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}s=ie.current,ku(l)?Ck(l):(s=Q_(w,g,d),l.stateNode=s,Co(l))}return Zt(l),null;case 5:if(We(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}if(R=ie.current,ku(l))Ck(l);else{var P=Kp(he.current);switch(R){case 1:R=P.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:R=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":R=P.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":R=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":R=P.createElement("div"),R.innerHTML="<script><\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof g.is=="string"?P.createElement("select",{is:g.is}):P.createElement("select"),g.multiple?R.multiple=!0:g.size&&(R.size=g.size);break;default:R=typeof g.is=="string"?P.createElement(w,{is:g.is}):P.createElement(w)}}R[on]=l,R[jn]=g;e:for(P=l.child;P!==null;){if(P.tag===5||P.tag===6)R.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===l)break e;for(;P.sibling===null;){if(P.return===null||P.return===l)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}l.stateNode=R;e:switch(Un(R,w,g),w){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Co(l)}}return Zt(l),Pv(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(s=he.current,ku(l)){if(s=l.stateNode,d=l.memoizedProps,g=null,w=Fn,w!==null)switch(w.tag){case 27:case 5:g=w.memoizedProps}s[on]=l,s=!!(s.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||z_(s.nodeValue,d)),s||ms(l,!0)}else s=Kp(s).createTextNode(g),s[on]=l,l.stateNode=s}return Zt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(g=ku(l),d!==null){if(s===null){if(!g)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[on]=l}else Ka(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),s=!1}else d=Gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Ir(l),l):(Ir(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Zt(l),null;case 13:if(g=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=ku(l),g!==null&&g.dehydrated!==null){if(s===null){if(!w)throw Error(r(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[on]=l}else Ka(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),w=!1}else w=Gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(Ir(l),l):(Ir(l),null)}return Ir(l),(l.flags&128)!==0?(l.lanes=d,l):(d=g!==null,s=s!==null&&s.memoizedState!==null,d&&(g=l.child,w=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(w=g.alternate.memoizedState.cachePool.pool),R=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(R=g.memoizedState.cachePool.pool),R!==w&&(g.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Pp(l,l.updateQueue),Zt(l),null);case 4:return ce(),s===null&&n0(l.stateNode.containerInfo),Zt(l),null;case 10:return vo(l.type),Zt(l),null;case 19:if(J(hn),g=l.memoizedState,g===null)return Zt(l),null;if(w=(l.flags&128)!==0,R=g.rendering,R===null)if(w)Kf(g,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(R=wp(s),R!==null){for(l.flags|=128,Kf(g,!1),s=R.updateQueue,l.updateQueue=s,Pp(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)bk(d,s),d=d.sibling;return H(hn,hn.current&1|2),Et&&yo(l,g.treeForkCount),l.child}s=s.sibling}g.tail!==null&&_e()>Fp&&(l.flags|=128,w=!0,Kf(g,!1),l.lanes=4194304)}else{if(!w)if(s=wp(R),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,Pp(l,s),Kf(g,!0),g.tail===null&&g.tailMode==="hidden"&&!R.alternate&&!Et)return Zt(l),null}else 2*_e()-g.renderingStartTime>Fp&&d!==536870912&&(l.flags|=128,w=!0,Kf(g,!1),l.lanes=4194304);g.isBackwards?(R.sibling=l.child,l.child=R):(s=g.last,s!==null?s.sibling=R:l.child=R,g.last=R)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=_e(),s.sibling=null,d=hn.current,H(hn,w?d&1|2:d&1),Et&&yo(l,g.treeForkCount),s):(Zt(l),null);case 22:case 23:return Ir(l),rv(),g=l.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(d&536870912)!==0&&(l.flags&128)===0&&(Zt(l),l.subtreeFlags&6&&(l.flags|=8192)):Zt(l),d=l.updateQueue,d!==null&&Pp(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048),s!==null&&J(Za),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),vo(vn),Zt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function f5(s,l){switch(Ub(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return vo(vn),ce(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return We(l),null;case 31:if(l.memoizedState!==null){if(Ir(l),l.alternate===null)throw Error(r(340));Ka()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Ir(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ka()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(hn),null;case 4:return ce(),null;case 10:return vo(l.type),null;case 22:case 23:return Ir(l),rv(),s!==null&&J(Za),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return vo(vn),null;case 25:return null;default:return null}}function VR(s,l){switch(Ub(l),l.tag){case 3:vo(vn),ce();break;case 26:case 27:case 5:We(l);break;case 4:ce();break;case 31:l.memoizedState!==null&&Ir(l);break;case 13:Ir(l);break;case 19:J(hn);break;case 10:vo(l.type);break;case 22:case 23:Ir(l),rv(),s!==null&&J(Za);break;case 24:vo(vn)}}function Xf(s,l){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var w=g.next;d=w;do{if((d.tag&s)===s){g=void 0;var R=d.create,P=d.inst;g=R(),P.destroy=g}d=d.next}while(d!==w)}}catch(V){Ft(l,l.return,V)}}function Ss(s,l,d){try{var g=l.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var R=w.next;g=R;do{if((g.tag&s)===s){var P=g.inst,V=P.destroy;if(V!==void 0){P.destroy=void 0,w=l;var Q=d,de=V;try{de()}catch(be){Ft(w,Q,be)}}}g=g.next}while(g!==R)}}catch(be){Ft(l,l.return,be)}}function qR(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{Ik(l,d)}catch(g){Ft(s,s.return,g)}}}function YR(s,l,d){d.props=rl(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(g){Ft(s,l,g)}}function Qf(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof d=="function"?s.refCleanup=d(g):d.current=g}}catch(w){Ft(s,l,w)}}function qi(s,l){var d=s.ref,g=s.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(w){Ft(s,l,w)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(w){Ft(s,l,w)}else d.current=null}function WR(s){var l=s.type,d=s.memoizedProps,g=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(w){Ft(s,s.return,w)}}function Nv(s,l,d){try{var g=s.stateNode;$5(g,s.type,d,l),g[jn]=l}catch(w){Ft(s,s.return,w)}}function KR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&As(s.type)||s.tag===4}function Iv(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||KR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&As(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Lv(s,l,d){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=po));else if(g!==4&&(g===27&&As(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Lv(s,l,d),s=s.sibling;s!==null;)Lv(s,l,d),s=s.sibling}function Np(s,l,d){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(g!==4&&(g===27&&As(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Np(s,l,d),s=s.sibling;s!==null;)Np(s,l,d),s=s.sibling}function XR(s){var l=s.stateNode,d=s.memoizedProps;try{for(var g=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Un(l,g,d),l[on]=s,l[jn]=d}catch(R){Ft(s,s.return,R)}}var Eo=!1,Sn=!1,jv=!1,QR=typeof WeakSet=="function"?WeakSet:Set,$n=null;function d5(s,l){if(s=s.containerInfo,o0=nm,s=uk(s),Mb(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var w=g.anchorOffset,R=g.focusNode;g=g.focusOffset;try{d.nodeType,R.nodeType}catch{d=null;break e}var P=0,V=-1,Q=-1,de=0,be=0,Ee=s,pe=null;t:for(;;){for(var ye;Ee!==d||w!==0&&Ee.nodeType!==3||(V=P+w),Ee!==R||g!==0&&Ee.nodeType!==3||(Q=P+g),Ee.nodeType===3&&(P+=Ee.nodeValue.length),(ye=Ee.firstChild)!==null;)pe=Ee,Ee=ye;for(;;){if(Ee===s)break t;if(pe===d&&++de===w&&(V=P),pe===R&&++be===g&&(Q=P),(ye=Ee.nextSibling)!==null)break;Ee=pe,pe=Ee.parentNode}Ee=ye}d=V===-1||Q===-1?null:{start:V,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(s0={focusedElem:s,selectionRange:d},nm=!1,$n=l;$n!==null;)if(l=$n,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,$n=s;else for(;$n!==null;){switch(l=$n,R=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)w=s[d],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&R!==null){s=void 0,d=l,w=R.memoizedProps,R=R.memoizedState,g=d.stateNode;try{var Be=rl(d.type,w);s=g.getSnapshotBeforeUpdate(Be,R),g.__reactInternalSnapshotBeforeUpdate=s}catch(et){Ft(d,d.return,et)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)u0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":u0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=l.sibling,s!==null){s.return=l.return,$n=s;break}$n=l.return}}function ZR(s,l,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:Ro(s,d),g&4&&Xf(5,d);break;case 1:if(Ro(s,d),g&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(P){Ft(d,d.return,P)}else{var w=rl(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(P){Ft(d,d.return,P)}}g&64&&qR(d),g&512&&Qf(d,d.return);break;case 3:if(Ro(s,d),g&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Ik(s,l)}catch(P){Ft(d,d.return,P)}}break;case 27:l===null&&g&4&&XR(d);case 26:case 5:Ro(s,d),l===null&&g&4&&WR(d),g&512&&Qf(d,d.return);break;case 12:Ro(s,d);break;case 31:Ro(s,d),g&4&&t_(s,d);break;case 13:Ro(s,d),g&4&&n_(s,d),g&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=w5.bind(null,d),B5(s,d))));break;case 22:if(g=d.memoizedState!==null||Eo,!g){l=l!==null&&l.memoizedState!==null||Sn,w=Eo;var R=Sn;Eo=g,(Sn=l)&&!R?_o(s,d,(d.subtreeFlags&8772)!==0):Ro(s,d),Eo=w,Sn=R}break;case 30:break;default:Ro(s,d)}}function JR(s){var l=s.alternate;l!==null&&(s.alternate=null,JR(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&pb(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var nn=null,pr=!1;function ko(s,l,d){for(d=d.child;d!==null;)e_(s,l,d),d=d.sibling}function e_(s,l,d){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Ot,d)}catch{}switch(d.tag){case 26:Sn||qi(d,l),ko(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Sn||qi(d,l);var g=nn,w=pr;As(d.type)&&(nn=d.stateNode,pr=!1),ko(s,l,d),sd(d.stateNode),nn=g,pr=w;break;case 5:Sn||qi(d,l);case 6:if(g=nn,w=pr,nn=null,ko(s,l,d),nn=g,pr=w,nn!==null)if(pr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(R){Ft(d,l,R)}else try{nn.removeChild(d.stateNode)}catch(R){Ft(d,l,R)}break;case 18:nn!==null&&(pr?(s=nn,q_(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),qu(s)):q_(nn,d.stateNode));break;case 4:g=nn,w=pr,nn=d.stateNode.containerInfo,pr=!0,ko(s,l,d),nn=g,pr=w;break;case 0:case 11:case 14:case 15:Ss(2,d,l),Sn||Ss(4,d,l),ko(s,l,d);break;case 1:Sn||(qi(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"&&YR(d,l,g)),ko(s,l,d);break;case 21:ko(s,l,d);break;case 22:Sn=(g=Sn)||d.memoizedState!==null,ko(s,l,d),Sn=g;break;default:ko(s,l,d)}}function t_(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{qu(s)}catch(d){Ft(l,l.return,d)}}}function n_(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{qu(s)}catch(d){Ft(l,l.return,d)}}function h5(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new QR),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new QR),l;default:throw Error(r(435,s.tag))}}function Ip(s,l){var d=h5(s);l.forEach(function(g){if(!d.has(g)){d.add(g);var w=S5.bind(null,s,g);g.then(w,w)}})}function mr(s,l){var d=l.deletions;if(d!==null)for(var g=0;g<d.length;g++){var w=d[g],R=s,P=l,V=P;e:for(;V!==null;){switch(V.tag){case 27:if(As(V.type)){nn=V.stateNode,pr=!1;break e}break;case 5:nn=V.stateNode,pr=!1;break e;case 3:case 4:nn=V.stateNode.containerInfo,pr=!0;break e}V=V.return}if(nn===null)throw Error(r(160));e_(R,P,w),nn=null,pr=!1,R=w.alternate,R!==null&&(R.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)r_(l,s),l=l.sibling}var Ti=null;function r_(s,l){var d=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:mr(l,s),gr(s),g&4&&(Ss(3,s,s.return),Xf(3,s),Ss(5,s,s.return));break;case 1:mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),g&64&&Eo&&(s=s.updateQueue,s!==null&&(g=s.callbacks,g!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var w=Ti;if(mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),g&4){var R=d!==null?d.memoizedState:null;if(g=s.memoizedState,d===null)if(g===null)if(s.stateNode===null){e:{g=s.type,d=s.memoizedProps,w=w.ownerDocument||w;t:switch(g){case"title":R=w.getElementsByTagName("title")[0],(!R||R[Ef]||R[on]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=w.createElement(g),w.head.insertBefore(R,w.querySelector("head > title"))),Un(R,g,d),R[on]=s,On(R),g=R;break e;case"link":var P=rT("link","href",w).get(g+(d.href||""));if(P){for(var V=0;V<P.length;V++)if(R=P[V],R.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&R.getAttribute("rel")===(d.rel==null?null:d.rel)&&R.getAttribute("title")===(d.title==null?null:d.title)&&R.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){P.splice(V,1);break t}}R=w.createElement(g),Un(R,g,d),w.head.appendChild(R);break;case"meta":if(P=rT("meta","content",w).get(g+(d.content||""))){for(V=0;V<P.length;V++)if(R=P[V],R.getAttribute("content")===(d.content==null?null:""+d.content)&&R.getAttribute("name")===(d.name==null?null:d.name)&&R.getAttribute("property")===(d.property==null?null:d.property)&&R.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&R.getAttribute("charset")===(d.charSet==null?null:d.charSet)){P.splice(V,1);break t}}R=w.createElement(g),Un(R,g,d),w.head.appendChild(R);break;default:throw Error(r(468,g))}R[on]=s,On(R),g=R}s.stateNode=g}else iT(w,s.type,s.stateNode);else s.stateNode=nT(w,g,s.memoizedProps);else R!==g?(R===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):R.count--,g===null?iT(w,s.type,s.stateNode):nT(w,g,s.memoizedProps)):g===null&&s.stateNode!==null&&Nv(s,s.memoizedProps,d.memoizedProps)}break;case 27:mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),d!==null&&g&4&&Nv(s,s.memoizedProps,d.memoizedProps);break;case 5:if(mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),s.flags&32){w=s.stateNode;try{mu(w,"")}catch(Be){Ft(s,s.return,Be)}}g&4&&s.stateNode!=null&&(w=s.memoizedProps,Nv(s,w,d!==null?d.memoizedProps:w)),g&1024&&(jv=!0);break;case 6:if(mr(l,s),gr(s),g&4){if(s.stateNode===null)throw Error(r(162));g=s.memoizedProps,d=s.stateNode;try{d.nodeValue=g}catch(Be){Ft(s,s.return,Be)}}break;case 3:if(Zp=null,w=Ti,Ti=Xp(l.containerInfo),mr(l,s),Ti=w,gr(s),g&4&&d!==null&&d.memoizedState.isDehydrated)try{qu(l.containerInfo)}catch(Be){Ft(s,s.return,Be)}jv&&(jv=!1,i_(s));break;case 4:g=Ti,Ti=Xp(s.stateNode.containerInfo),mr(l,s),gr(s),Ti=g;break;case 12:mr(l,s),gr(s);break;case 31:mr(l,s),gr(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Ip(s,g)));break;case 13:mr(l,s),gr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(jp=_e()),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Ip(s,g)));break;case 22:w=s.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,de=Eo,be=Sn;if(Eo=de||w,Sn=be||Q,mr(l,s),Sn=be,Eo=de,gr(s),g&8192)e:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(d===null||Q||Eo||Sn||il(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(R=Q.stateNode,w)P=R.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{V=Q.stateNode;var Ee=Q.memoizedProps.style,pe=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;V.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=w?"":Q.memoizedProps}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===18){if(d===null){Q=l;try{var ye=Q.stateNode;w?Y_(ye,!0):Y_(Q.stateNode,!1)}catch(Be){Ft(Q,Q.return,Be)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=s.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Ip(s,d))));break;case 19:mr(l,s),gr(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,Ip(s,g)));break;case 30:break;case 21:break;default:mr(l,s),gr(s)}}function gr(s){var l=s.flags;if(l&2){try{for(var d,g=s.return;g!==null;){if(KR(g)){d=g;break}g=g.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var w=d.stateNode,R=Iv(s);Np(s,R,w);break;case 5:var P=d.stateNode;d.flags&32&&(mu(P,""),d.flags&=-33);var V=Iv(s);Np(s,V,P);break;case 3:case 4:var Q=d.stateNode.containerInfo,de=Iv(s);Lv(s,de,Q);break;default:throw Error(r(161))}}catch(be){Ft(s,s.return,be)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function i_(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;i_(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ro(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)ZR(s,l.alternate,l),l=l.sibling}function il(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Ss(4,l,l.return),il(l);break;case 1:qi(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&YR(l,l.return,d),il(l);break;case 27:sd(l.stateNode);case 26:case 5:qi(l,l.return),il(l);break;case 22:l.memoizedState===null&&il(l);break;case 30:il(l);break;default:il(l)}s=s.sibling}}function _o(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,w=s,R=l,P=R.flags;switch(R.tag){case 0:case 11:case 15:_o(w,R,d),Xf(4,R);break;case 1:if(_o(w,R,d),g=R,w=g.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(de){Ft(g,g.return,de)}if(g=R,w=g.updateQueue,w!==null){var V=g.stateNode;try{var Q=w.shared.hiddenCallbacks;if(Q!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Q.length;w++)Nk(Q[w],V)}catch(de){Ft(g,g.return,de)}}d&&P&64&&qR(R),Qf(R,R.return);break;case 27:XR(R);case 26:case 5:_o(w,R,d),d&&g===null&&P&4&&WR(R),Qf(R,R.return);break;case 12:_o(w,R,d);break;case 31:_o(w,R,d),d&&P&4&&t_(w,R);break;case 13:_o(w,R,d),d&&P&4&&n_(w,R);break;case 22:R.memoizedState===null&&_o(w,R,d),Qf(R,R.return);break;case 30:break;default:_o(w,R,d)}l=l.sibling}}function Fv(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Lf(d))}function zv(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Lf(s))}function Ai(s,l,d,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)o_(s,l,d,g),l=l.sibling}function o_(s,l,d,g){var w=l.flags;switch(l.tag){case 0:case 11:case 15:Ai(s,l,d,g),w&2048&&Xf(9,l);break;case 1:Ai(s,l,d,g);break;case 3:Ai(s,l,d,g),w&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Lf(s)));break;case 12:if(w&2048){Ai(s,l,d,g),s=l.stateNode;try{var R=l.memoizedProps,P=R.id,V=R.onPostCommit;typeof V=="function"&&V(P,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){Ft(l,l.return,Q)}}else Ai(s,l,d,g);break;case 31:Ai(s,l,d,g);break;case 13:Ai(s,l,d,g);break;case 23:break;case 22:R=l.stateNode,P=l.alternate,l.memoizedState!==null?R._visibility&2?Ai(s,l,d,g):Zf(s,l):R._visibility&2?Ai(s,l,d,g):(R._visibility|=2,Nu(s,l,d,g,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Fv(P,l);break;case 24:Ai(s,l,d,g),w&2048&&zv(l.alternate,l);break;default:Ai(s,l,d,g)}}function Nu(s,l,d,g,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var R=s,P=l,V=d,Q=g,de=P.flags;switch(P.tag){case 0:case 11:case 15:Nu(R,P,V,Q,w),Xf(8,P);break;case 23:break;case 22:var be=P.stateNode;P.memoizedState!==null?be._visibility&2?Nu(R,P,V,Q,w):Zf(R,P):(be._visibility|=2,Nu(R,P,V,Q,w)),w&&de&2048&&Fv(P.alternate,P);break;case 24:Nu(R,P,V,Q,w),w&&de&2048&&zv(P.alternate,P);break;default:Nu(R,P,V,Q,w)}l=l.sibling}}function Zf(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,g=l,w=g.flags;switch(g.tag){case 22:Zf(d,g),w&2048&&Fv(g.alternate,g);break;case 24:Zf(d,g),w&2048&&zv(g.alternate,g);break;default:Zf(d,g)}l=l.sibling}}var Jf=8192;function Iu(s,l,d){if(s.subtreeFlags&Jf)for(s=s.child;s!==null;)s_(s,l,d),s=s.sibling}function s_(s,l,d){switch(s.tag){case 26:Iu(s,l,d),s.flags&Jf&&s.memoizedState!==null&&J5(d,Ti,s.memoizedState,s.memoizedProps);break;case 5:Iu(s,l,d);break;case 3:case 4:var g=Ti;Ti=Xp(s.stateNode.containerInfo),Iu(s,l,d),Ti=g;break;case 22:s.memoizedState===null&&(g=s.alternate,g!==null&&g.memoizedState!==null?(g=Jf,Jf=16777216,Iu(s,l,d),Jf=g):Iu(s,l,d));break;default:Iu(s,l,d)}}function a_(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function ed(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];$n=g,u_(g,s)}a_(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)l_(s),s=s.sibling}function l_(s){switch(s.tag){case 0:case 11:case 15:ed(s),s.flags&2048&&Ss(9,s,s.return);break;case 3:ed(s);break;case 12:ed(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Lp(s)):ed(s);break;default:ed(s)}}function Lp(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];$n=g,u_(g,s)}a_(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Ss(8,l,l.return),Lp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Lp(l));break;default:Lp(l)}s=s.sibling}}function u_(s,l){for(;$n!==null;){var d=$n;switch(d.tag){case 0:case 11:case 15:Ss(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:Lf(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,$n=g;else e:for(d=s;$n!==null;){g=$n;var w=g.sibling,R=g.return;if(JR(g),g===d){$n=null;break e}if(w!==null){w.return=R,$n=w;break e}$n=R}}}var p5={getCacheForType:function(s){var l=zn(vn),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return zn(vn).controller.signal}},m5=typeof WeakMap=="function"?WeakMap:Map,$t=0,Yt=null,yt=null,wt=0,jt=0,Lr=null,Cs=!1,Lu=!1,Bv=!1,To=0,an=0,Es=0,ol=0,Uv=0,jr=0,ju=0,td=null,yr=null,Hv=!1,jp=0,c_=0,Fp=1/0,zp=null,ks=null,En=0,Rs=null,Fu=null,Ao=0,Gv=0,Vv=null,f_=null,nd=0,qv=null;function Fr(){return($t&2)!==0&&wt!==0?wt&-wt:F.T!==null?Zv():Hi()}function d_(){if(jr===0)if((wt&536870912)===0||Et){var s=en;en<<=1,(en&3932160)===0&&(en=262144),jr=s}else jr=536870912;return s=Nr.current,s!==null&&(s.flags|=32),jr}function br(s,l,d){(s===Yt&&(jt===2||jt===9)||s.cancelPendingCommit!==null)&&(zu(s,0),_s(s,wt,jr,!1)),ki(s,d),(($t&2)===0||s!==Yt)&&(s===Yt&&(($t&2)===0&&(ol|=d),an===4&&_s(s,wt,jr,!1)),Yi(s))}function h_(s,l,d){if(($t&6)!==0)throw Error(r(327));var g=!d&&(l&127)===0&&(l&s.expiredLanes)===0||Jr(s,l),w=g?b5(s,l):Wv(s,l,!0),R=g;do{if(w===0){Lu&&!g&&_s(s,l,0,!1);break}else{if(d=s.current.alternate,R&&!g5(d)){w=Wv(s,l,!1),R=!1;continue}if(w===2){if(R=l,s.errorRecoveryDisabledLanes&R)var P=0;else P=s.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){l=P;e:{var V=s;w=td;var Q=V.current.memoizedState.isDehydrated;if(Q&&(zu(V,P).flags|=256),P=Wv(V,P,!1),P!==2){if(Bv&&!Q){V.errorRecoveryDisabledLanes|=R,ol|=R,w=4;break e}R=yr,yr=w,R!==null&&(yr===null?yr=R:yr.push.apply(yr,R))}w=P}if(R=!1,w!==2)continue}}if(w===1){zu(s,0),_s(s,l,0,!0);break}e:{switch(g=s,R=w,R){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:_s(g,l,jr,!Cs);break e;case 2:yr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(w=jp+300-_e(),10<w)){if(_s(g,l,jr,!Cs),bn(g,0,!0)!==0)break e;Ao=l,g.timeoutHandle=G_(p_.bind(null,g,d,yr,zp,Hv,l,jr,ol,ju,Cs,R,"Throttled",-0,0),w);break e}p_(g,d,yr,zp,Hv,l,jr,ol,ju,Cs,R,null,-0,0)}}break}while(!0);Yi(s)}function p_(s,l,d,g,w,R,P,V,Q,de,be,Ee,pe,ye){if(s.timeoutHandle=-1,Ee=l.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:po},s_(l,R,Ee);var Be=(R&62914560)===R?jp-_e():(R&4194048)===R?c_-_e():0;if(Be=e6(Ee,Be),Be!==null){Ao=R,s.cancelPendingCommit=Be(S_.bind(null,s,l,R,d,g,w,P,V,Q,be,Ee,null,pe,ye)),_s(s,R,P,!de);return}}S_(s,l,R,d,g,w,P,V,Q)}function g5(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var w=d[g],R=w.getSnapshot;w=w.value;try{if(!$r(R(),w))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function _s(s,l,d,g){l&=~Uv,l&=~ol,s.suspendedLanes|=l,s.pingedLanes&=~l,g&&(s.warmLanes|=l),g=s.expirationTimes;for(var w=l;0<w;){var R=31-Ne(w),P=1<<R;g[R]=-1,w&=~P}d!==0&&lu(s,d,l)}function Bp(){return($t&6)===0?(rd(0),!1):!0}function Yv(){if(yt!==null){if(jt===0)var s=yt.return;else s=yt,bo=Xa=null,uv(s),Du=null,Ff=0,s=yt;for(;s!==null;)VR(s.alternate,s),s=s.return;yt=null}}function zu(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,I5(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ao=0,Yv(),Yt=s,yt=d=go(s.current,null),wt=l,jt=0,Lr=null,Cs=!1,Lu=Jr(s,l),Bv=!1,ju=jr=Uv=ol=Es=an=0,yr=td=null,Hv=!1,(l&8)!==0&&(l|=l&32);var g=s.entangledLanes;if(g!==0)for(s=s.entanglements,g&=l;0<g;){var w=31-Ne(g),R=1<<w;l|=s[w],g&=~R}return To=l,lp(),d}function m_(s,l){ot=null,F.H=Yf,l===Au||l===gp?(l=Mk(),jt=3):l===Qb?(l=Mk(),jt=4):jt=l===kv?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Lr=l,yt===null&&(an=1,Dp(s,ri(l,s.current)))}function g_(){var s=Nr.current;return s===null?!0:(wt&4194048)===wt?ai===null:(wt&62914560)===wt||(wt&536870912)!==0?s===ai:!1}function y_(){var s=F.H;return F.H=Yf,s===null?Yf:s}function b_(){var s=F.A;return F.A=p5,s}function Up(){an=4,Cs||(wt&4194048)!==wt&&Nr.current!==null||(Lu=!0),(Es&134217727)===0&&(ol&134217727)===0||Yt===null||_s(Yt,wt,jr,!1)}function Wv(s,l,d){var g=$t;$t|=2;var w=y_(),R=b_();(Yt!==s||wt!==l)&&(zp=null,zu(s,l)),l=!1;var P=an;e:do try{if(jt!==0&&yt!==null){var V=yt,Q=Lr;switch(jt){case 8:Yv(),P=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(l=!0);var de=jt;if(jt=0,Lr=null,Bu(s,V,Q,de),d&&Lu){P=0;break e}break;default:de=jt,jt=0,Lr=null,Bu(s,V,Q,de)}}y5(),P=an;break}catch(be){m_(s,be)}while(!0);return l&&s.shellSuspendCounter++,bo=Xa=null,$t=g,F.H=w,F.A=R,yt===null&&(Yt=null,wt=0,lp()),P}function y5(){for(;yt!==null;)v_(yt)}function b5(s,l){var d=$t;$t|=2;var g=y_(),w=b_();Yt!==s||wt!==l?(zp=null,Fp=_e()+500,zu(s,l)):Lu=Jr(s,l);e:do try{if(jt!==0&&yt!==null){l=yt;var R=Lr;t:switch(jt){case 1:jt=0,Lr=null,Bu(s,l,R,1);break;case 2:case 9:if(Ak(R)){jt=0,Lr=null,x_(l);break}l=function(){jt!==2&&jt!==9||Yt!==s||(jt=7),Yi(s)},R.then(l,l);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:Ak(R)?(jt=0,Lr=null,x_(l)):(jt=0,Lr=null,Bu(s,l,R,7));break;case 5:var P=null;switch(yt.tag){case 26:P=yt.memoizedState;case 5:case 27:var V=yt;if(P?oT(P):V.stateNode.complete){jt=0,Lr=null;var Q=V.sibling;if(Q!==null)yt=Q;else{var de=V.return;de!==null?(yt=de,Hp(de)):yt=null}break t}}jt=0,Lr=null,Bu(s,l,R,5);break;case 6:jt=0,Lr=null,Bu(s,l,R,6);break;case 8:Yv(),an=6;break e;default:throw Error(r(462))}}v5();break}catch(be){m_(s,be)}while(!0);return bo=Xa=null,F.H=g,F.A=w,$t=d,yt!==null?0:(Yt=null,wt=0,lp(),an)}function v5(){for(;yt!==null&&!Oe();)v_(yt)}function v_(s){var l=HR(s.alternate,s,To);s.memoizedProps=s.pendingProps,l===null?Hp(s):yt=l}function x_(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=LR(d,l,l.pendingProps,l.type,void 0,wt);break;case 11:l=LR(d,l,l.pendingProps,l.type.render,l.ref,wt);break;case 5:uv(l);default:VR(d,l),l=yt=bk(l,To),l=HR(d,l,To)}s.memoizedProps=s.pendingProps,l===null?Hp(s):yt=l}function Bu(s,l,d,g){bo=Xa=null,uv(l),Du=null,Ff=0;var w=l.return;try{if(a5(s,w,l,d,wt)){an=1,Dp(s,ri(d,s.current)),yt=null;return}}catch(R){if(w!==null)throw yt=w,R;an=1,Dp(s,ri(d,s.current)),yt=null;return}l.flags&32768?(Et||g===1?s=!0:Lu||(wt&536870912)!==0?s=!1:(Cs=s=!0,(g===2||g===9||g===3||g===6)&&(g=Nr.current,g!==null&&g.tag===13&&(g.flags|=16384))),w_(l,s)):Hp(l)}function Hp(s){var l=s;do{if((l.flags&32768)!==0){w_(l,Cs);return}s=l.return;var d=c5(l.alternate,l,To);if(d!==null){yt=d;return}if(l=l.sibling,l!==null){yt=l;return}yt=l=s}while(l!==null);an===0&&(an=5)}function w_(s,l){do{var d=f5(s.alternate,s);if(d!==null){d.flags&=32767,yt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){yt=s;return}yt=s=d}while(s!==null);an=6,yt=null}function S_(s,l,d,g,w,R,P,V,Q){s.cancelPendingCommit=null;do Gp();while(En!==0);if(($t&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(R=l.lanes|l.childLanes,R|=Ib,au(s,d,R,P,V,Q),s===Yt&&(yt=Yt=null,wt=0),Fu=l,Rs=s,Ao=d,Gv=R,Vv=w,f_=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,C5(ke,function(){return __(),null})):(s.callbackNode=null,s.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=F.T,F.T=null,w=U.p,U.p=2,P=$t,$t|=4;try{d5(s,l,d)}finally{$t=P,U.p=w,F.T=g}}En=1,C_(),E_(),k_()}}function C_(){if(En===1){En=0;var s=Rs,l=Fu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=F.T,F.T=null;var g=U.p;U.p=2;var w=$t;$t|=4;try{r_(l,s);var R=s0,P=uk(s.containerInfo),V=R.focusedElem,Q=R.selectionRange;if(P!==V&&V&&V.ownerDocument&&lk(V.ownerDocument.documentElement,V)){if(Q!==null&&Mb(V)){var de=Q.start,be=Q.end;if(be===void 0&&(be=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(be,V.value.length);else{var Ee=V.ownerDocument||document,pe=Ee&&Ee.defaultView||window;if(pe.getSelection){var ye=pe.getSelection(),Be=V.textContent.length,et=Math.min(Q.start,Be),Vt=Q.end===void 0?et:Math.min(Q.end,Be);!ye.extend&&et>Vt&&(P=Vt,Vt=et,et=P);var se=ak(V,et),ee=ak(V,Vt);if(se&&ee&&(ye.rangeCount!==1||ye.anchorNode!==se.node||ye.anchorOffset!==se.offset||ye.focusNode!==ee.node||ye.focusOffset!==ee.offset)){var fe=Ee.createRange();fe.setStart(se.node,se.offset),ye.removeAllRanges(),et>Vt?(ye.addRange(fe),ye.extend(ee.node,ee.offset)):(fe.setEnd(ee.node,ee.offset),ye.addRange(fe))}}}}for(Ee=[],ye=V;ye=ye.parentNode;)ye.nodeType===1&&Ee.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ee.length;V++){var we=Ee[V];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}nm=!!o0,s0=o0=null}finally{$t=w,U.p=g,F.T=d}}s.current=l,En=2}}function E_(){if(En===2){En=0;var s=Rs,l=Fu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=F.T,F.T=null;var g=U.p;U.p=2;var w=$t;$t|=4;try{ZR(s,l.alternate,l)}finally{$t=w,U.p=g,F.T=d}}En=3}}function k_(){if(En===4||En===3){En=0,Te();var s=Rs,l=Fu,d=Ao,g=f_;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?En=5:(En=0,Fu=Rs=null,R_(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(ks=null),Ba(d),l=l.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Ot,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=F.T,w=U.p,U.p=2,F.T=null;try{for(var R=s.onRecoverableError,P=0;P<g.length;P++){var V=g[P];R(V.value,{componentStack:V.stack})}}finally{F.T=l,U.p=w}}(Ao&3)!==0&&Gp(),Yi(s),w=s.pendingLanes,(d&261930)!==0&&(w&42)!==0?s===qv?nd++:(nd=0,qv=s):nd=0,rd(0)}}function R_(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Lf(l)))}function Gp(){return C_(),E_(),k_(),__()}function __(){if(En!==5)return!1;var s=Rs,l=Gv;Gv=0;var d=Ba(Ao),g=F.T,w=U.p;try{U.p=32>d?32:d,F.T=null,d=Vv,Vv=null;var R=Rs,P=Ao;if(En=0,Fu=Rs=null,Ao=0,($t&6)!==0)throw Error(r(331));var V=$t;if($t|=4,l_(R.current),o_(R,R.current,P,d),$t=V,rd(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Ot,R)}catch{}return!0}finally{U.p=w,F.T=g,R_(s,l)}}function T_(s,l,d){l=ri(d,l),l=Ev(s.stateNode,l,2),s=vs(s,l,2),s!==null&&(ki(s,2),Yi(s))}function Ft(s,l,d){if(s.tag===3)T_(s,s,d);else for(;l!==null;){if(l.tag===3){T_(l,s,d);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(ks===null||!ks.has(g))){s=ri(d,s),d=AR(2),g=vs(l,d,2),g!==null&&(DR(d,g,l,s),ki(g,2),Yi(g));break}}l=l.return}}function Kv(s,l,d){var g=s.pingCache;if(g===null){g=s.pingCache=new m5;var w=new Set;g.set(l,w)}else w=g.get(l),w===void 0&&(w=new Set,g.set(l,w));w.has(d)||(Bv=!0,w.add(d),s=x5.bind(null,s,l,d),l.then(s,s))}function x5(s,l,d){var g=s.pingCache;g!==null&&g.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,Yt===s&&(wt&d)===d&&(an===4||an===3&&(wt&62914560)===wt&&300>_e()-jp?($t&2)===0&&zu(s,0):Uv|=d,ju===wt&&(ju=0)),Yi(s)}function A_(s,l){l===0&&(l=Ei()),s=Ya(s,l),s!==null&&(ki(s,l),Yi(s))}function w5(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),A_(s,d)}function S5(s,l){var d=0;switch(s.tag){case 31:case 13:var g=s.stateNode,w=s.memoizedState;w!==null&&(d=w.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),A_(s,d)}function C5(s,l){return me(s,l)}var Vp=null,Uu=null,Xv=!1,qp=!1,Qv=!1,Ts=0;function Yi(s){s!==Uu&&s.next===null&&(Uu===null?Vp=Uu=s:Uu=Uu.next=s),qp=!0,Xv||(Xv=!0,k5())}function rd(s,l){if(!Qv&&qp){Qv=!0;do for(var d=!1,g=Vp;g!==null;){if(s!==0){var w=g.pendingLanes;if(w===0)var R=0;else{var P=g.suspendedLanes,V=g.pingedLanes;R=(1<<31-Ne(42|s)+1)-1,R&=w&~(P&~V),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(d=!0,$_(g,R))}else R=wt,R=bn(g,g===Yt?R:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(R&3)===0||Jr(g,R)||(d=!0,$_(g,R));g=g.next}while(d);Qv=!1}}function E5(){D_()}function D_(){qp=Xv=!1;var s=0;Ts!==0&&N5()&&(s=Ts);for(var l=_e(),d=null,g=Vp;g!==null;){var w=g.next,R=M_(g,l);R===0?(g.next=null,d===null?Vp=w:d.next=w,w===null&&(Uu=d)):(d=g,(s!==0||(R&3)!==0)&&(qp=!0)),g=w}En!==0&&En!==5||rd(s),Ts!==0&&(Ts=0)}function M_(s,l){for(var d=s.suspendedLanes,g=s.pingedLanes,w=s.expirationTimes,R=s.pendingLanes&-62914561;0<R;){var P=31-Ne(R),V=1<<P,Q=w[P];Q===-1?((V&d)===0||(V&g)!==0)&&(w[P]=ja(V,l)):Q<=l&&(s.expiredLanes|=V),R&=~V}if(l=Yt,d=wt,d=bn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g=s.callbackNode,d===0||s===l&&(jt===2||jt===9)||s.cancelPendingCommit!==null)return g!==null&&g!==null&&ae(g),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||Jr(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(g!==null&&ae(g),Ba(d)){case 2:case 8:d=Se;break;case 32:d=ke;break;case 268435456:d=Le;break;default:d=ke}return g=O_.bind(null,s),d=me(d,g),s.callbackPriority=l,s.callbackNode=d,l}return g!==null&&g!==null&&ae(g),s.callbackPriority=2,s.callbackNode=null,2}function O_(s,l){if(En!==0&&En!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(Gp()&&s.callbackNode!==d)return null;var g=wt;return g=bn(s,s===Yt?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g===0?null:(h_(s,g,l),M_(s,_e()),s.callbackNode!=null&&s.callbackNode===d?O_.bind(null,s):null)}function $_(s,l){if(Gp())return null;h_(s,l,!0)}function k5(){L5(function(){($t&6)!==0?me(ue,E5):D_()})}function Zv(){if(Ts===0){var s=_u;s===0&&(s=Rt,Rt<<=1,(Rt&261888)===0&&(Rt=256)),Ts=s}return Ts}function P_(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:ep(""+s)}function N_(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function R5(s,l,d,g,w){if(l==="submit"&&d&&d.stateNode===w){var R=P_((w[jn]||null).action),P=g.submitter;P&&(l=(l=P[jn]||null)?P_(l.formAction):P.getAttribute("formAction"),l!==null&&(R=l,P=null));var V=new ip("action","action",null,g,w);s.push({event:V,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Ts!==0){var Q=P?N_(w,P):new FormData(w);bv(d,{pending:!0,data:Q,method:w.method,action:R},null,Q)}}else typeof R=="function"&&(V.preventDefault(),Q=P?N_(w,P):new FormData(w),bv(d,{pending:!0,data:Q,method:w.method,action:R},R,Q))},currentTarget:w}]})}}for(var Jv=0;Jv<Nb.length;Jv++){var e0=Nb[Jv],_5=e0.toLowerCase(),T5=e0[0].toUpperCase()+e0.slice(1);_i(_5,"on"+T5)}_i(dk,"onAnimationEnd"),_i(hk,"onAnimationIteration"),_i(pk,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(GB,"onTransitionRun"),_i(VB,"onTransitionStart"),_i(qB,"onTransitionCancel"),_i(mk,"onTransitionEnd"),hu("onMouseEnter",["mouseout","mouseover"]),hu("onMouseLeave",["mouseout","mouseover"]),hu("onPointerEnter",["pointerout","pointerover"]),hu("onPointerLeave",["pointerout","pointerover"]),Ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ha("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var id="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(" "),A5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(id));function I_(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var g=s[d],w=g.event;g=g.listeners;e:{var R=void 0;if(l)for(var P=g.length-1;0<=P;P--){var V=g[P],Q=V.instance,de=V.currentTarget;if(V=V.listener,Q!==R&&w.isPropagationStopped())break e;R=V,w.currentTarget=de;try{R(w)}catch(be){ap(be)}w.currentTarget=null,R=Q}else for(P=0;P<g.length;P++){if(V=g[P],Q=V.instance,de=V.currentTarget,V=V.listener,Q!==R&&w.isPropagationStopped())break e;R=V,w.currentTarget=de;try{R(w)}catch(be){ap(be)}w.currentTarget=null,R=Q}}}}function bt(s,l){var d=l[uu];d===void 0&&(d=l[uu]=new Set);var g=s+"__bubble";d.has(g)||(L_(l,s,2,!1),d.add(g))}function t0(s,l,d){var g=0;l&&(g|=4),L_(d,s,g,l)}var Yp="_reactListening"+Math.random().toString(36).slice(2);function n0(s){if(!s[Yp]){s[Yp]=!0,DE.forEach(function(d){d!=="selectionchange"&&(A5.has(d)||t0(d,!1,s),t0(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Yp]||(l[Yp]=!0,t0("selectionchange",!1,l))}}function L_(s,l,d,g){switch(dT(l)){case 2:var w=r6;break;case 8:w=i6;break;default:w=y0}d=w.bind(null,l,d,s),w=void 0,!Sb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),g?w!==void 0?s.addEventListener(l,d,{capture:!0,passive:w}):s.addEventListener(l,d,!0):w!==void 0?s.addEventListener(l,d,{passive:w}):s.addEventListener(l,d,!1)}function r0(s,l,d,g,w){var R=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var V=g.stateNode.containerInfo;if(V===w)break;if(P===4)for(P=g.return;P!==null;){var Q=P.tag;if((Q===3||Q===4)&&P.stateNode.containerInfo===w)return;P=P.return}for(;V!==null;){if(P=cu(V),P===null)return;if(Q=P.tag,Q===5||Q===6||Q===26||Q===27){g=R=P;continue e}V=V.parentNode}}g=g.return}UE(function(){var de=R,be=xb(d),Ee=[];e:{var pe=gk.get(s);if(pe!==void 0){var ye=ip,Be=s;switch(s){case"keypress":if(np(d)===0)break e;case"keydown":case"keyup":ye=SB;break;case"focusin":Be="focus",ye=Rb;break;case"focusout":Be="blur",ye=Rb;break;case"beforeblur":case"afterblur":ye=Rb;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=VE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=cB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=kB;break;case dk:case hk:case pk:ye=hB;break;case mk:ye=_B;break;case"scroll":case"scrollend":ye=lB;break;case"wheel":ye=AB;break;case"copy":case"cut":case"paste":ye=mB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=YE;break;case"toggle":case"beforetoggle":ye=MB}var et=(l&4)!==0,Vt=!et&&(s==="scroll"||s==="scrollend"),se=et?pe!==null?pe+"Capture":null:pe;et=[];for(var ee=de,fe;ee!==null;){var we=ee;if(fe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||fe===null||se===null||(we=Rf(ee,se),we!=null&&et.push(od(ee,we,fe))),Vt)break;ee=ee.return}0<et.length&&(pe=new ye(pe,Be,null,d,be),Ee.push({event:pe,listeners:et}))}}if((l&7)===0){e:{if(pe=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",pe&&d!==vb&&(Be=d.relatedTarget||d.fromElement)&&(cu(Be)||Be[fo]))break e;if((ye||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ye?(Be=d.relatedTarget||d.toElement,ye=de,Be=Be?cu(Be):null,Be!==null&&(Vt=o(Be),et=Be.tag,Be!==Vt||et!==5&&et!==27&&et!==6)&&(Be=null)):(ye=null,Be=de),ye!==Be)){if(et=VE,we="onMouseLeave",se="onMouseEnter",ee="mouse",(s==="pointerout"||s==="pointerover")&&(et=YE,we="onPointerLeave",se="onPointerEnter",ee="pointer"),Vt=ye==null?pe:kf(ye),fe=Be==null?pe:kf(Be),pe=new et(we,ee+"leave",ye,d,be),pe.target=Vt,pe.relatedTarget=fe,we=null,cu(be)===de&&(et=new et(se,ee+"enter",Be,d,be),et.target=fe,et.relatedTarget=Vt,we=et),Vt=we,ye&&Be)t:{for(et=D5,se=ye,ee=Be,fe=0,we=se;we;we=et(we))fe++;we=0;for(var Qe=ee;Qe;Qe=et(Qe))we++;for(;0<fe-we;)se=et(se),fe--;for(;0<we-fe;)ee=et(ee),we--;for(;fe--;){if(se===ee||ee!==null&&se===ee.alternate){et=se;break t}se=et(se),ee=et(ee)}et=null}else et=null;ye!==null&&j_(Ee,pe,ye,et,!1),Be!==null&&Vt!==null&&j_(Ee,Vt,Be,et,!0)}}e:{if(pe=de?kf(de):window,ye=pe.nodeName&&pe.nodeName.toLowerCase(),ye==="select"||ye==="input"&&pe.type==="file")var At=tk;else if(JE(pe))if(nk)At=BB;else{At=FB;var qe=jB}else ye=pe.nodeName,!ye||ye.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?de&&bb(de.elementType)&&(At=tk):At=zB;if(At&&(At=At(s,de))){ek(Ee,At,d,be);break e}qe&&qe(s,pe,de),s==="focusout"&&de&&pe.type==="number"&&de.memoizedProps.value!=null&&yb(pe,"number",pe.value)}switch(qe=de?kf(de):window,s){case"focusin":(JE(qe)||qe.contentEditable==="true")&&(vu=qe,Ob=de,Pf=null);break;case"focusout":Pf=Ob=vu=null;break;case"mousedown":$b=!0;break;case"contextmenu":case"mouseup":case"dragend":$b=!1,ck(Ee,d,be);break;case"selectionchange":if(HB)break;case"keydown":case"keyup":ck(Ee,d,be)}var at;if(Tb)e:{switch(s){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else bu?QE(s,d)&&(St="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(St="onCompositionStart");St&&(WE&&d.locale!=="ko"&&(bu||St!=="onCompositionStart"?St==="onCompositionEnd"&&bu&&(at=HE()):(ds=be,Cb="value"in ds?ds.value:ds.textContent,bu=!0)),qe=Wp(de,St),0<qe.length&&(St=new qE(St,s,null,d,be),Ee.push({event:St,listeners:qe}),at?St.data=at:(at=ZE(d),at!==null&&(St.data=at)))),(at=$B?PB(s,d):NB(s,d))&&(St=Wp(de,"onBeforeInput"),0<St.length&&(qe=new qE("onBeforeInput","beforeinput",null,d,be),Ee.push({event:qe,listeners:St}),qe.data=at)),R5(Ee,s,de,d,be)}I_(Ee,l)})}function od(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Wp(s,l){for(var d=l+"Capture",g=[];s!==null;){var w=s,R=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||R===null||(w=Rf(s,d),w!=null&&g.unshift(od(s,w,R)),w=Rf(s,l),w!=null&&g.push(od(s,w,R))),s.tag===3)return g;s=s.return}return[]}function D5(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function j_(s,l,d,g,w){for(var R=l._reactName,P=[];d!==null&&d!==g;){var V=d,Q=V.alternate,de=V.stateNode;if(V=V.tag,Q!==null&&Q===g)break;V!==5&&V!==26&&V!==27||de===null||(Q=de,w?(de=Rf(d,R),de!=null&&P.unshift(od(d,de,Q))):w||(de=Rf(d,R),de!=null&&P.push(od(d,de,Q)))),d=d.return}P.length!==0&&s.push({event:l,listeners:P})}var M5=/\r\n?/g,O5=/\u0000|\uFFFD/g;function F_(s){return(typeof s=="string"?s:""+s).replace(M5,`
|
|
50
|
+
`).replace(O5,"")}function z_(s,l){return l=F_(l),F_(s)===l}function Gt(s,l,d,g,w,R){switch(d){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||mu(s,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&mu(s,""+g);break;case"className":Zh(s,"class",g);break;case"tabIndex":Zh(s,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":Zh(s,d,g);break;case"style":zE(s,g,R);break;case"data":if(l!=="object"){Zh(s,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(d);break}g=ep(""+g),s.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){s.setAttribute(d,"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 R=="function"&&(d==="formAction"?(l!=="input"&&Gt(s,l,"name",w.name,w,null),Gt(s,l,"formEncType",w.formEncType,w,null),Gt(s,l,"formMethod",w.formMethod,w,null),Gt(s,l,"formTarget",w.formTarget,w,null)):(Gt(s,l,"encType",w.encType,w,null),Gt(s,l,"method",w.method,w,null),Gt(s,l,"target",w.target,w,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(d);break}g=ep(""+g),s.setAttribute(d,g);break;case"onClick":g!=null&&(s.onclick=po);break;case"onScroll":g!=null&&bt("scroll",s);break;case"onScrollEnd":g!=null&&bt("scrollend",s);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":s.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){s.removeAttribute("xlink:href");break}d=ep(""+g),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,""+g):s.removeAttribute(d);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":g&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":g===!0?s.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,g):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?s.setAttribute(d,g):s.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?s.removeAttribute(d):s.setAttribute(d,g);break;case"popover":bt("beforetoggle",s),bt("toggle",s),Qh(s,"popover",g);break;case"xlinkActuate":ho(s,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":ho(s,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":ho(s,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":ho(s,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":ho(s,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":ho(s,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":ho(s,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":ho(s,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":ho(s,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Qh(s,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=sB.get(d)||d,Qh(s,d,g))}}function i0(s,l,d,g,w,R){switch(d){case"style":zE(s,g,R);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof g=="string"?mu(s,g):(typeof g=="number"||typeof g=="bigint")&&mu(s,""+g);break;case"onScroll":g!=null&&bt("scroll",s);break;case"onScrollEnd":g!=null&&bt("scrollend",s);break;case"onClick":g!=null&&(s.onclick=po);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ME.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(w=d.endsWith("Capture"),l=d.slice(2,w?d.length-7:void 0),R=s[jn]||null,R=R!=null?R[d]:null,typeof R=="function"&&s.removeEventListener(l,R,w),typeof g=="function")){typeof R!="function"&&R!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,g,w);break e}d in s?s[d]=g:g===!0?s.setAttribute(d,""):Qh(s,d,g)}}}function Un(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",s),bt("load",s);var g=!1,w=!1,R;for(R in d)if(d.hasOwnProperty(R)){var P=d[R];if(P!=null)switch(R){case"src":g=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Gt(s,l,R,P,d,null)}}w&&Gt(s,l,"srcSet",d.srcSet,d,null),g&&Gt(s,l,"src",d.src,d,null);return;case"input":bt("invalid",s);var V=R=P=w=null,Q=null,de=null;for(g in d)if(d.hasOwnProperty(g)){var be=d[g];if(be!=null)switch(g){case"name":w=be;break;case"type":P=be;break;case"checked":Q=be;break;case"defaultChecked":de=be;break;case"value":R=be;break;case"defaultValue":V=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,l));break;default:Gt(s,l,g,be,d,null)}}IE(s,R,V,Q,de,P,w,!1);return;case"select":bt("invalid",s),g=P=R=null;for(w in d)if(d.hasOwnProperty(w)&&(V=d[w],V!=null))switch(w){case"value":R=V;break;case"defaultValue":P=V;break;case"multiple":g=V;default:Gt(s,l,w,V,d,null)}l=R,d=P,s.multiple=!!g,l!=null?pu(s,!!g,l,!1):d!=null&&pu(s,!!g,d,!0);return;case"textarea":bt("invalid",s),R=w=g=null;for(P in d)if(d.hasOwnProperty(P)&&(V=d[P],V!=null))switch(P){case"value":g=V;break;case"defaultValue":w=V;break;case"children":R=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:Gt(s,l,P,V,d,null)}jE(s,g,w,R);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(g=d[Q],g!=null))switch(Q){case"selected":s.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:Gt(s,l,Q,g,d,null)}return;case"dialog":bt("beforetoggle",s),bt("toggle",s),bt("cancel",s),bt("close",s);break;case"iframe":case"object":bt("load",s);break;case"video":case"audio":for(g=0;g<id.length;g++)bt(id[g],s);break;case"image":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"embed":case"source":case"link":bt("error",s),bt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in d)if(d.hasOwnProperty(de)&&(g=d[de],g!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Gt(s,l,de,g,d,null)}return;default:if(bb(l)){for(be in d)d.hasOwnProperty(be)&&(g=d[be],g!==void 0&&i0(s,l,be,g,d,void 0));return}}for(V in d)d.hasOwnProperty(V)&&(g=d[V],g!=null&&Gt(s,l,V,g,d,null))}function $5(s,l,d,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,R=null,P=null,V=null,Q=null,de=null,be=null;for(ye in d){var Ee=d[ye];if(d.hasOwnProperty(ye)&&Ee!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":Q=Ee;default:g.hasOwnProperty(ye)||Gt(s,l,ye,null,g,Ee)}}for(var pe in g){var ye=g[pe];if(Ee=d[pe],g.hasOwnProperty(pe)&&(ye!=null||Ee!=null))switch(pe){case"type":R=ye;break;case"name":w=ye;break;case"checked":de=ye;break;case"defaultChecked":be=ye;break;case"value":P=ye;break;case"defaultValue":V=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,l));break;default:ye!==Ee&&Gt(s,l,pe,ye,g,Ee)}}gb(s,P,V,Q,de,be,R,w);return;case"select":ye=P=V=pe=null;for(R in d)if(Q=d[R],d.hasOwnProperty(R)&&Q!=null)switch(R){case"value":break;case"multiple":ye=Q;default:g.hasOwnProperty(R)||Gt(s,l,R,null,g,Q)}for(w in g)if(R=g[w],Q=d[w],g.hasOwnProperty(w)&&(R!=null||Q!=null))switch(w){case"value":pe=R;break;case"defaultValue":V=R;break;case"multiple":P=R;default:R!==Q&&Gt(s,l,w,R,g,Q)}l=V,d=P,g=ye,pe!=null?pu(s,!!d,pe,!1):!!g!=!!d&&(l!=null?pu(s,!!d,l,!0):pu(s,!!d,d?[]:"",!1));return;case"textarea":ye=pe=null;for(V in d)if(w=d[V],d.hasOwnProperty(V)&&w!=null&&!g.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Gt(s,l,V,null,g,w)}for(P in g)if(w=g[P],R=d[P],g.hasOwnProperty(P)&&(w!=null||R!=null))switch(P){case"value":pe=w;break;case"defaultValue":ye=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==R&&Gt(s,l,P,w,g,R)}LE(s,pe,ye);return;case"option":for(var Be in d)if(pe=d[Be],d.hasOwnProperty(Be)&&pe!=null&&!g.hasOwnProperty(Be))switch(Be){case"selected":s.selected=!1;break;default:Gt(s,l,Be,null,g,pe)}for(Q in g)if(pe=g[Q],ye=d[Q],g.hasOwnProperty(Q)&&pe!==ye&&(pe!=null||ye!=null))switch(Q){case"selected":s.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Gt(s,l,Q,pe,g,ye)}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 et in d)pe=d[et],d.hasOwnProperty(et)&&pe!=null&&!g.hasOwnProperty(et)&&Gt(s,l,et,null,g,pe);for(de in g)if(pe=g[de],ye=d[de],g.hasOwnProperty(de)&&pe!==ye&&(pe!=null||ye!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,l));break;default:Gt(s,l,de,pe,g,ye)}return;default:if(bb(l)){for(var Vt in d)pe=d[Vt],d.hasOwnProperty(Vt)&&pe!==void 0&&!g.hasOwnProperty(Vt)&&i0(s,l,Vt,void 0,g,pe);for(be in g)pe=g[be],ye=d[be],!g.hasOwnProperty(be)||pe===ye||pe===void 0&&ye===void 0||i0(s,l,be,pe,g,ye);return}}for(var se in d)pe=d[se],d.hasOwnProperty(se)&&pe!=null&&!g.hasOwnProperty(se)&&Gt(s,l,se,null,g,pe);for(Ee in g)pe=g[Ee],ye=d[Ee],!g.hasOwnProperty(Ee)||pe===ye||pe==null&&ye==null||Gt(s,l,Ee,pe,g,ye)}function B_(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function P5(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),g=0;g<d.length;g++){var w=d[g],R=w.transferSize,P=w.initiatorType,V=w.duration;if(R&&V&&B_(P)){for(P=0,V=w.responseEnd,g+=1;g<d.length;g++){var Q=d[g],de=Q.startTime;if(de>V)break;var be=Q.transferSize,Ee=Q.initiatorType;be&&B_(Ee)&&(Q=Q.responseEnd,P+=be*(Q<V?1:(V-de)/(Q-de)))}if(--g,l+=8*(R+P)/(w.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var o0=null,s0=null;function Kp(s){return s.nodeType===9?s:s.ownerDocument}function U_(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H_(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function a0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var l0=null;function N5(){var s=window.event;return s&&s.type==="popstate"?s===l0?!1:(l0=s,!0):(l0=null,!1)}var G_=typeof setTimeout=="function"?setTimeout:void 0,I5=typeof clearTimeout=="function"?clearTimeout:void 0,V_=typeof Promise=="function"?Promise:void 0,L5=typeof queueMicrotask=="function"?queueMicrotask:typeof V_<"u"?function(s){return V_.resolve(null).then(s).catch(j5)}:G_;function j5(s){setTimeout(function(){throw s})}function As(s){return s==="head"}function q_(s,l){var d=l,g=0;do{var w=d.nextSibling;if(s.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"||d==="/&"){if(g===0){s.removeChild(w),qu(l);return}g--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")g++;else if(d==="html")sd(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,sd(d);for(var R=d.firstChild;R;){var P=R.nextSibling,V=R.nodeName;R[Ef]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&R.rel.toLowerCase()==="stylesheet"||d.removeChild(R),R=P}}else d==="body"&&sd(s.ownerDocument.body);d=w}while(d);qu(l)}function Y_(s,l){var d=s;s=0;do{var g=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),g&&g.nodeType===8)if(d=g.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=g}while(d)}function u0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":u0(d),pb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function F5(s,l,d,g){for(;s.nodeType===1;){var w=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(g){if(!s[Ef])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(R=s.getAttribute("rel"),R==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(R!==w.rel||s.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||s.getAttribute("title")!==(w.title==null?null:w.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(R=s.getAttribute("src"),(R!==(w.src==null?null:w.src)||s.getAttribute("type")!==(w.type==null?null:w.type)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&R&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var R=w.name==null?null:""+w.name;if(w.type==="hidden"&&s.getAttribute("name")===R)return s}else return s;if(s=li(s.nextSibling),s===null)break}return null}function z5(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=li(s.nextSibling),s===null))return null;return s}function W_(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=li(s.nextSibling),s===null))return null;return s}function c0(s){return s.data==="$?"||s.data==="$~"}function f0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function B5(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var g=function(){l(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),s._reactRetry=g}}function li(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var d0=null;function K_(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return li(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function X_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function Q_(s,l,d){switch(l=Kp(d),s){case"html":if(s=l.documentElement,!s)throw Error(r(452));return s;case"head":if(s=l.head,!s)throw Error(r(453));return s;case"body":if(s=l.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function sd(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);pb(s)}var ui=new Map,Z_=new Set;function Xp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Do=U.d;U.d={f:U5,r:H5,D:G5,C:V5,L:q5,m:Y5,X:K5,S:W5,M:X5};function U5(){var s=Do.f(),l=Bp();return s||l}function H5(s){var l=fu(s);l!==null&&l.tag===5&&l.type==="form"?mR(l):Do.r(s)}var Hu=typeof document>"u"?null:document;function J_(s,l,d){var g=Hu;if(g&&typeof l=="string"&&l){var w=ti(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof d=="string"&&(w+='[crossorigin="'+d+'"]'),Z_.has(w)||(Z_.add(w),s={rel:s,crossOrigin:d,href:l},g.querySelector(w)===null&&(l=g.createElement("link"),Un(l,"link",s),On(l),g.head.appendChild(l)))}}function G5(s){Do.D(s),J_("dns-prefetch",s,null)}function V5(s,l){Do.C(s,l),J_("preconnect",s,l)}function q5(s,l,d){Do.L(s,l,d);var g=Hu;if(g&&s&&l){var w='link[rel="preload"][as="'+ti(l)+'"]';l==="image"&&d&&d.imageSrcSet?(w+='[imagesrcset="'+ti(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(w+='[imagesizes="'+ti(d.imageSizes)+'"]')):w+='[href="'+ti(s)+'"]';var R=w;switch(l){case"style":R=Gu(s);break;case"script":R=Vu(s)}ui.has(R)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),ui.set(R,s),g.querySelector(w)!==null||l==="style"&&g.querySelector(ad(R))||l==="script"&&g.querySelector(ld(R))||(l=g.createElement("link"),Un(l,"link",s),On(l),g.head.appendChild(l)))}}function Y5(s,l){Do.m(s,l);var d=Hu;if(d&&s){var g=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+ti(g)+'"][href="'+ti(s)+'"]',R=w;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Vu(s)}if(!ui.has(R)&&(s=p({rel:"modulepreload",href:s},l),ui.set(R,s),d.querySelector(w)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(ld(R)))return}g=d.createElement("link"),Un(g,"link",s),On(g),d.head.appendChild(g)}}}function W5(s,l,d){Do.S(s,l,d);var g=Hu;if(g&&s){var w=du(g).hoistableStyles,R=Gu(s);l=l||"default";var P=w.get(R);if(!P){var V={loading:0,preload:null};if(P=g.querySelector(ad(R)))V.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=ui.get(R))&&h0(s,d);var Q=P=g.createElement("link");On(Q),Un(Q,"link",s),Q._p=new Promise(function(de,be){Q.onload=de,Q.onerror=be}),Q.addEventListener("load",function(){V.loading|=1}),Q.addEventListener("error",function(){V.loading|=2}),V.loading|=4,Qp(P,l,g)}P={type:"stylesheet",instance:P,count:1,state:V},w.set(R,P)}}}function K5(s,l){Do.X(s,l);var d=Hu;if(d&&s){var g=du(d).hoistableScripts,w=Vu(s),R=g.get(w);R||(R=d.querySelector(ld(w)),R||(s=p({src:s,async:!0},l),(l=ui.get(w))&&p0(s,l),R=d.createElement("script"),On(R),Un(R,"link",s),d.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(w,R))}}function X5(s,l){Do.M(s,l);var d=Hu;if(d&&s){var g=du(d).hoistableScripts,w=Vu(s),R=g.get(w);R||(R=d.querySelector(ld(w)),R||(s=p({src:s,async:!0,type:"module"},l),(l=ui.get(w))&&p0(s,l),R=d.createElement("script"),On(R),Un(R,"link",s),d.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(w,R))}}function eT(s,l,d,g){var w=(w=he.current)?Xp(w):null;if(!w)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Gu(d.href),d=du(w).hoistableStyles,g=d.get(l),g||(g={type:"style",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Gu(d.href);var R=du(w).hoistableStyles,P=R.get(s);if(P||(w=w.ownerDocument||w,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(s,P),(R=w.querySelector(ad(s)))&&!R._p&&(P.instance=R,P.state.loading=5),ui.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ui.set(s,d),R||Q5(w,s,d,P.state))),l&&g===null)throw Error(r(528,""));return P}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Vu(d),d=du(w).hoistableScripts,g=d.get(l),g||(g={type:"script",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Gu(s){return'href="'+ti(s)+'"'}function ad(s){return'link[rel="stylesheet"]['+s+"]"}function tT(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function Q5(s,l,d,g){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=s.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Un(l,"link",d),On(l),s.head.appendChild(l))}function Vu(s){return'[src="'+ti(s)+'"]'}function ld(s){return"script[async]"+s}function nT(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var g=s.querySelector('style[data-href~="'+ti(d.href)+'"]');if(g)return l.instance=g,On(g),g;var w=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),On(g),Un(g,"style",w),Qp(g,d.precedence,s),l.instance=g;case"stylesheet":w=Gu(d.href);var R=s.querySelector(ad(w));if(R)return l.state.loading|=4,l.instance=R,On(R),R;g=tT(d),(w=ui.get(w))&&h0(g,w),R=(s.ownerDocument||s).createElement("link"),On(R);var P=R;return P._p=new Promise(function(V,Q){P.onload=V,P.onerror=Q}),Un(R,"link",g),l.state.loading|=4,Qp(R,d.precedence,s),l.instance=R;case"script":return R=Vu(d.src),(w=s.querySelector(ld(R)))?(l.instance=w,On(w),w):(g=d,(w=ui.get(R))&&(g=p({},d),p0(g,w)),s=s.ownerDocument||s,w=s.createElement("script"),On(w),Un(w,"link",g),s.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,Qp(g,d.precedence,s));return l.instance}function Qp(s,l,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=g.length?g[g.length-1]:null,R=w,P=0;P<g.length;P++){var V=g[P];if(V.dataset.precedence===l)R=V;else if(R!==w)break}R?R.parentNode.insertBefore(s,R.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function h0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function p0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Zp=null;function rT(s,l,d){if(Zp===null){var g=new Map,w=Zp=new Map;w.set(d,g)}else w=Zp,g=w.get(d),g||(g=new Map,w.set(d,g));if(g.has(s))return g;for(g.set(s,null),d=d.getElementsByTagName(s),w=0;w<d.length;w++){var R=d[w];if(!(R[Ef]||R[on]||s==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var P=R.getAttribute(l)||"";P=s+P;var V=g.get(P);V?V.push(R):g.set(P,[R])}}return g}function iT(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function Z5(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function oT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function J5(s,l,d,g){if(d.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var w=Gu(g.href),R=l.querySelector(ad(w));if(R){l=R._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Jp.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=R,On(R);return}R=l.ownerDocument||l,g=tT(g),(w=ui.get(w))&&h0(g,w),R=R.createElement("link"),On(R);var P=R;P._p=new Promise(function(V,Q){P.onload=V,P.onerror=Q}),Un(R,"link",g),d.instance=R}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=Jp.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var m0=0;function e6(s,l){return s.stylesheets&&s.count===0&&tm(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var g=setTimeout(function(){if(s.stylesheets&&tm(s,s.stylesheets),s.unsuspend){var R=s.unsuspend;s.unsuspend=null,R()}},6e4+l);0<s.imgBytes&&m0===0&&(m0=62500*P5());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&tm(s,s.stylesheets),s.unsuspend)){var R=s.unsuspend;s.unsuspend=null,R()}},(s.imgBytes>m0?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(w)}}:null}function Jp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tm(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var em=null;function tm(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,em=new Map,l.forEach(t6,s),em=null,Jp.call(s))}function t6(s,l){if(!(l.state.loading&4)){var d=em.get(s);if(d)var g=d.get(null);else{d=new Map,em.set(s,d);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<w.length;R++){var P=w[R];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(d.set(P.dataset.precedence,P),g=P)}g&&d.set(null,g)}w=l.instance,P=w.getAttribute("data-precedence"),R=d.get(P)||g,R===g&&d.set(null,w),d.set(P,w),this.count++,g=Jp.bind(this),w.addEventListener("load",g),w.addEventListener("error",g),R?R.parentNode.insertBefore(w,R.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(w,s.firstChild)),l.state.loading|=4}}var ud={$$typeof:k,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function n6(s,l,d,g,w,R,P,V,Q){this.tag=1,this.containerInfo=s,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=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=g,this.onUncaughtError=w,this.onCaughtError=R,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function sT(s,l,d,g,w,R,P,V,Q,de,be,Ee){return s=new n6(s,l,d,P,Q,de,be,Ee,V),l=1,R===!0&&(l|=24),R=Pr(3,null,null,l),s.current=R,R.stateNode=s,l=Wb(),l.refCount++,s.pooledCache=l,l.refCount++,R.memoizedState={element:g,isDehydrated:d,cache:l},Zb(R),s}function aT(s){return s?(s=Su,s):Su}function lT(s,l,d,g,w,R){w=aT(w),g.context===null?g.context=w:g.pendingContext=w,g=bs(l),g.payload={element:d},R=R===void 0?null:R,R!==null&&(g.callback=R),d=vs(s,g,l),d!==null&&(br(d,s,l),Bf(d,s,l))}function uT(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function g0(s,l){uT(s,l),(s=s.alternate)&&uT(s,l)}function cT(s){if(s.tag===13||s.tag===31){var l=Ya(s,67108864);l!==null&&br(l,s,67108864),g0(s,67108864)}}function fT(s){if(s.tag===13||s.tag===31){var l=Fr();l=za(l);var d=Ya(s,l);d!==null&&br(d,s,l),g0(s,l)}}var nm=!0;function r6(s,l,d,g){var w=F.T;F.T=null;var R=U.p;try{U.p=2,y0(s,l,d,g)}finally{U.p=R,F.T=w}}function i6(s,l,d,g){var w=F.T;F.T=null;var R=U.p;try{U.p=8,y0(s,l,d,g)}finally{U.p=R,F.T=w}}function y0(s,l,d,g){if(nm){var w=b0(g);if(w===null)r0(s,l,g,rm,d),hT(s,g);else if(s6(w,s,l,d,g))g.stopPropagation();else if(hT(s,g),l&4&&-1<o6.indexOf(s)){for(;w!==null;){var R=fu(w);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var P=tn(R.pendingLanes);if(P!==0){var V=R;for(V.pendingLanes|=2,V.entangledLanes|=2;P;){var Q=1<<31-Ne(P);V.entanglements[1]|=Q,P&=~Q}Yi(R),($t&6)===0&&(Fp=_e()+500,rd(0))}}break;case 31:case 13:V=Ya(R,2),V!==null&&br(V,R,2),Bp(),g0(R,2)}if(R=b0(g),R===null&&r0(s,l,g,rm,d),R===w)break;w=R}w!==null&&g.stopPropagation()}else r0(s,l,g,null,d)}}function b0(s){return s=xb(s),v0(s)}var rm=null;function v0(s){if(rm=null,s=cu(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=a(l),s!==null)return s;s=null}else if(d===31){if(s=u(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return rm=s,null}function dT(s){switch(s){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(De()){case ue:return 2;case Se:return 8;case ke:case Pe:return 32;case Le:return 268435456;default:return 32}default:return 32}}var x0=!1,Ds=null,Ms=null,Os=null,cd=new Map,fd=new Map,$s=[],o6="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 hT(s,l){switch(s){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":Ms=null;break;case"mouseover":case"mouseout":Os=null;break;case"pointerover":case"pointerout":cd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":fd.delete(l.pointerId)}}function dd(s,l,d,g,w,R){return s===null||s.nativeEvent!==R?(s={blockedOn:l,domEventName:d,eventSystemFlags:g,nativeEvent:R,targetContainers:[w]},l!==null&&(l=fu(l),l!==null&&cT(l)),s):(s.eventSystemFlags|=g,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function s6(s,l,d,g,w){switch(l){case"focusin":return Ds=dd(Ds,s,l,d,g,w),!0;case"dragenter":return Ms=dd(Ms,s,l,d,g,w),!0;case"mouseover":return Os=dd(Os,s,l,d,g,w),!0;case"pointerover":var R=w.pointerId;return cd.set(R,dd(cd.get(R)||null,s,l,d,g,w)),!0;case"gotpointercapture":return R=w.pointerId,fd.set(R,dd(fd.get(R)||null,s,l,d,g,w)),!0}return!1}function pT(s){var l=cu(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){s.blockedOn=l,Ua(s.priority,function(){fT(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,Ua(s.priority,function(){fT(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function im(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=b0(s.nativeEvent);if(d===null){d=s.nativeEvent;var g=new d.constructor(d.type,d);vb=g,d.target.dispatchEvent(g),vb=null}else return l=fu(d),l!==null&&cT(l),s.blockedOn=d,!1;l.shift()}return!0}function mT(s,l,d){im(s)&&d.delete(l)}function a6(){x0=!1,Ds!==null&&im(Ds)&&(Ds=null),Ms!==null&&im(Ms)&&(Ms=null),Os!==null&&im(Os)&&(Os=null),cd.forEach(mT),fd.forEach(mT)}function om(s,l){s.blockedOn===l&&(s.blockedOn=null,x0||(x0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,a6)))}var sm=null;function gT(s){sm!==s&&(sm=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){sm===s&&(sm=null);for(var l=0;l<s.length;l+=3){var d=s[l],g=s[l+1],w=s[l+2];if(typeof g!="function"){if(v0(g||d)===null)continue;break}var R=fu(d);R!==null&&(s.splice(l,3),l-=3,bv(R,{pending:!0,data:w,method:d.method,action:g},g,w))}}))}function qu(s){function l(Q){return om(Q,s)}Ds!==null&&om(Ds,s),Ms!==null&&om(Ms,s),Os!==null&&om(Os,s),cd.forEach(l),fd.forEach(l);for(var d=0;d<$s.length;d++){var g=$s[d];g.blockedOn===s&&(g.blockedOn=null)}for(;0<$s.length&&(d=$s[0],d.blockedOn===null);)pT(d),d.blockedOn===null&&$s.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var w=d[g],R=d[g+1],P=w[jn]||null;if(typeof R=="function")P||gT(d);else if(P){var V=null;if(R&&R.hasAttribute("formAction")){if(w=R,P=R[jn]||null)V=P.formAction;else if(v0(w)!==null)continue}else V=P.action;typeof V=="function"?d[g+1]=V:(d.splice(g,3),g-=3),gT(d)}}}function yT(){function s(R){R.canIntercept&&R.info==="react-transition"&&R.intercept({handler:function(){return new Promise(function(P){return w=P})},focusReset:"manual",scroll:"manual"})}function l(){w!==null&&(w(),w=null),g||setTimeout(d,20)}function d(){if(!g&&!navigation.transition){var R=navigation.currentEntry;R&&R.url!=null&&navigation.navigate(R.url,{state:R.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,w=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){g=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),w!==null&&(w(),w=null)}}}function w0(s){this._internalRoot=s}am.prototype.render=w0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,g=Fr();lT(d,g,s,l,null,null)},am.prototype.unmount=w0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;lT(s.current,2,null,s,null,null),Bp(),l[fo]=null}};function am(s){this._internalRoot=s}am.prototype.unstable_scheduleHydration=function(s){if(s){var l=Hi();s={blockedOn:null,target:s,priority:l};for(var d=0;d<$s.length&&l!==0&&l<$s[d].priority;d++);$s.splice(d,0,s),d===0&&pT(s)}};var bT=t.version;if(bT!=="19.2.5")throw Error(r(527,bT,"19.2.5"));U.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var l6={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lm.isDisabled&&lm.supportsFiber)try{Ot=lm.inject(l6),Me=lm}catch{}}return pd.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,g="",w=kR,R=RR,P=_R;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(R=l.onCaughtError),l.onRecoverableError!==void 0&&(P=l.onRecoverableError)),l=sT(s,1,!1,null,null,d,g,null,w,R,P,yT),s[fo]=l.current,n0(s),new w0(l)},pd.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var g=!1,w="",R=kR,P=RR,V=_R,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onUncaughtError!==void 0&&(R=d.onUncaughtError),d.onCaughtError!==void 0&&(P=d.onCaughtError),d.onRecoverableError!==void 0&&(V=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=sT(s,1,!0,l,d??null,g,w,Q,R,P,V,yT),l.context=aT(null),d=l.current,g=Fr(),g=za(g),w=bs(g),w.callback=null,vs(d,w,g),d=g,l.current.lanes=d,ki(l,d),Yi(l),s[fo]=l.current,n0(s),new am(l)},pd.version="19.2.5",pd}var DT;function S6(){if(DT)return k0.exports;DT=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(),k0.exports=w6(),k0.exports}var C6=S6(),tf=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(){}},wl,Ys,Cc,wO,E6=(wO=class extends tf{constructor(){super();He(this,wl);He(this,Ys);He(this,Cc);$e(this,Cc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,Ys)||this.setEventListener(K(this,Cc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ys))==null||t.call(this),$e(this,Ys,void 0))}setEventListener(t){var n;$e(this,Cc,t),(n=K(this,Ys))==null||n.call(this),$e(this,Ys,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,wl)!==t&&($e(this,wl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,wl)=="boolean"?K(this,wl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wl=new WeakMap,Ys=new WeakMap,Cc=new WeakMap,wO),Jw=new E6,k6={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,Qw,SO,R6=(SO=class{constructor(){He(this,Ws,k6);He(this,Qw,!1)}setTimeoutProvider(e){$e(this,Ws,e)}setTimeout(e,t){return K(this,Ws).setTimeout(e,t)}clearTimeout(e){K(this,Ws).clearTimeout(e)}setInterval(e,t){return K(this,Ws).setInterval(e,t)}clearInterval(e){K(this,Ws).clearInterval(e)}},Ws=new WeakMap,Qw=new WeakMap,SO),ml=new R6;function _6(e){setTimeout(e,0)}var T6=typeof window>"u"||"Deno"in globalThis;function ir(){}function A6(e,t){return typeof e=="function"?e(t):e}function o1(e){return typeof e=="number"&&e>=0&&e!==1/0}function $O(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ca(e,t){return typeof e=="function"?e(t):e}function pi(e,t){return typeof e=="function"?e(t):e}function MT(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==eS(a,t.options))return!1}else if(!Kd(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function OT(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Fl(t.options.mutationKey)!==Fl(o))return!1}else if(!Kd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function eS(e,t){return((t==null?void 0:t.queryKeyHashFn)||Fl)(e)}function Fl(e){return JSON.stringify(e,(t,n)=>s1(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Kd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kd(e[n],t[n])):!1}var D6=Object.prototype.hasOwnProperty;function PO(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=$T(e)&&$T(t);if(!r&&!(s1(e)&&s1(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:a[h],m=e[p],y=t[p];if(m===y){c[p]=m,(r?h<o:D6.call(e,p))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const b=PO(m,y,n+1);c[p]=b,b===m&&f++}return o===u&&f===o?e:c}function Sg(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 $T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function s1(e){if(!PT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!PT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function PT(e){return Object.prototype.toString.call(e)==="[object Object]"}function M6(e){return new Promise(t=>{ml.setTimeout(t,e)})}function a1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?PO(e,t):t}function Ch(e){return e}function O6(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $6(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tS=Symbol();function NO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===tS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nS(e,t){return typeof e=="function"?e(...t):!!e}function P6(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Xd=(()=>{let e=()=>T6;return{isServer(){return e()},setIsServer(t){e=t}}})();function l1(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});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 N6=_6;function I6(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=N6;const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var _n=I6(),Ec,Ks,kc,CO,L6=(CO=class extends tf{constructor(){super();He(this,Ec,!0);He(this,Ks);He(this,kc);$e(this,kc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,Ks)||this.setEventListener(K(this,kc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ks))==null||t.call(this),$e(this,Ks,void 0))}setEventListener(t){var n;$e(this,kc,t),(n=K(this,Ks))==null||n.call(this),$e(this,Ks,t(this.setOnline.bind(this)))}setOnline(t){K(this,Ec)!==t&&($e(this,Ec,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,Ec)}},Ec=new WeakMap,Ks=new WeakMap,kc=new WeakMap,CO),Cg=new L6;function j6(e){return Math.min(1e3*2**e,3e4)}function IO(e){return(e??"online")==="online"?Cg.isOnline():!0}var u1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LO(e){let t=!1,n=0,r;const i=l1(),o=()=>i.status!=="pending",a=v=>{var S;if(!o()){const x=new u1(v);m(x),(S=e.onCancel)==null||S.call(e,x)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>Jw.isFocused()&&(e.networkMode==="always"||Cg.isOnline())&&e.canRun(),h=()=>IO(e.networkMode)&&e.canRun(),p=v=>{o()||(r==null||r(),i.resolve(v))},m=v=>{o()||(r==null||r(),i.reject(v))},y=()=>new Promise(v=>{var S;r=x=>{(o()||f())&&v(x)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(o())return;let v;const S=n===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(p).catch(x=>{var D;if(o())return;const _=e.retry??(Xd.isServer()?0:3),k=e.retryDelay??j6,T=typeof k=="function"?k(n,x):k,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,x);if(t||!A){m(x);return}n++,(D=e.onFail)==null||D.call(e,n,x),M6(T).then(()=>f()?void 0:y()).then(()=>{t?m(x):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?b():y().then(b),i)}}var Sl,EO,jO=(EO=class{constructor(){He(this,Sl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),o1(this.gcTime)&&$e(this,Sl,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xd.isServer()?1/0:300*1e3))}clearGcTimeout(){K(this,Sl)!==void 0&&(ml.clearTimeout(K(this,Sl)),$e(this,Sl,void 0))}},Sl=new WeakMap,EO),Cl,Rc,di,El,Pn,gh,kl,Hr,FO,No,kO,F6=(kO=class extends jO{constructor(t){super();He(this,Hr);He(this,Cl);He(this,Rc);He(this,di);He(this,El);He(this,Pn);He(this,gh);He(this,kl);$e(this,kl,!1),$e(this,gh,t.defaultOptions),this.setOptions(t.options),this.observers=[],$e(this,El,t.client),$e(this,di,K(this,El).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$e(this,Cl,IT(this.options)),this.state=t.state??K(this,Cl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,Pn))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,gh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=IT(this.options);n.data!==void 0&&(this.setState(NT(n.data,n.dataUpdatedAt)),$e(this,Cl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,di).remove(this)}setData(t,n){const r=a1(this.state.data,t,this.options);return rt(this,Hr,No).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){rt(this,Hr,No).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=K(this,Pn))==null?void 0:r.promise;return(i=K(this,Pn))==null||i.cancel(t),n?n.then(ir).catch(ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return K(this,Cl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>pi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ca(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$O(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Pn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Pn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,di).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(K(this,Pn)&&(K(this,kl)||rt(this,Hr,FO).call(this)?K(this,Pn).cancel({revert:!0}):K(this,Pn).cancelRetry()),this.scheduleGc()),K(this,di).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Hr,No).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,m,y,b,v,S,x,_,k;if(this.state.fetchStatus!=="idle"&&((c=K(this,Pn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,Pn))return K(this,Pn).continueRetry(),K(this,Pn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(A=>A.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,i=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>($e(this,kl,!0),r.signal)})},o=()=>{const T=NO(this.options,n),D=(()=>{const O={client:K(this,El),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return $e(this,kl,!1),this.options.persister?this.options.persister(T,D,this):T(D)},u=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,El),state:this.state,fetchFn:o};return i(T),T})();(f=this.options.behavior)==null||f.onFetch(u,this),$e(this,Rc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&rt(this,Hr,No).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),$e(this,Pn,LO({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof u1&&T.revert&&this.setState({...K(this,Rc),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{rt(this,Hr,No).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{rt(this,Hr,No).call(this,{type:"pause"})},onContinue:()=>{rt(this,Hr,No).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await K(this,Pn).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(m=K(this,di).config).onSuccess)==null||y.call(m,T,this),(v=(b=K(this,di).config).onSettled)==null||v.call(b,T,this.state.error,this),T}catch(T){if(T instanceof u1){if(T.silent)return K(this,Pn).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw rt(this,Hr,No).call(this,{type:"error",error:T}),(x=(S=K(this,di).config).onError)==null||x.call(S,T,this),(k=(_=K(this,di).config).onSettled)==null||k.call(_,this.state.data,T,this),T}finally{this.scheduleGc()}}},Cl=new WeakMap,Rc=new WeakMap,di=new WeakMap,El=new WeakMap,Pn=new WeakMap,gh=new WeakMap,kl=new WeakMap,Hr=new WeakSet,FO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},No=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...zO(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...NT(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return $e(this,Rc,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_n.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,di).notify({query:this,type:"updated",action:t})})},kO);function zO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NT(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IT(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 wr,kt,yh,rr,Rl,_c,jo,Xs,bh,Tc,Ac,_l,Tl,Qs,Dc,Lt,Dd,c1,f1,d1,h1,p1,m1,g1,BO,RO,z6=(RO=class extends tf{constructor(t,n){super();He(this,Lt);He(this,wr);He(this,kt);He(this,yh);He(this,rr);He(this,Rl);He(this,_c);He(this,jo);He(this,Xs);He(this,bh);He(this,Tc);He(this,Ac);He(this,_l);He(this,Tl);He(this,Qs);He(this,Dc,new Set);this.options=n,$e(this,wr,t),$e(this,Xs,null),$e(this,jo,l1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,kt).addObserver(this),LT(K(this,kt),this.options)?rt(this,Lt,Dd).call(this):this.updateResult(),rt(this,Lt,h1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return y1(K(this,kt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return y1(K(this,kt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,Lt,p1).call(this),rt(this,Lt,m1).call(this),K(this,kt).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,kt);if(this.options=K(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pi(this.options.enabled,K(this,kt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,Lt,g1).call(this),K(this,kt).setOptions(this.options),n._defaulted&&!Sg(this.options,n)&&K(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,kt),observer:this});const i=this.hasListeners();i&&jT(K(this,kt),r,this.options,n)&&rt(this,Lt,Dd).call(this),this.updateResult(),i&&(K(this,kt)!==r||pi(this.options.enabled,K(this,kt))!==pi(n.enabled,K(this,kt))||ca(this.options.staleTime,K(this,kt))!==ca(n.staleTime,K(this,kt)))&&rt(this,Lt,c1).call(this);const o=rt(this,Lt,f1).call(this);i&&(K(this,kt)!==r||pi(this.options.enabled,K(this,kt))!==pi(n.enabled,K(this,kt))||o!==K(this,Qs))&&rt(this,Lt,d1).call(this,o)}getOptimisticResult(t){const n=K(this,wr).getQueryCache().build(K(this,wr),t),r=this.createResult(n,t);return U6(this,r)&&($e(this,rr,r),$e(this,_c,this.options),$e(this,Rl,K(this,kt).state)),r}getCurrentResult(){return K(this,rr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&K(this,jo).status==="pending"&&K(this,jo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){K(this,Dc).add(t)}getCurrentQuery(){return K(this,kt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,wr).defaultQueryOptions(t),r=K(this,wr).getQueryCache().build(K(this,wr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return rt(this,Lt,Dd).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,rr)))}createResult(t,n){var B;const r=K(this,kt),i=this.options,o=K(this,rr),a=K(this,Rl),u=K(this,_c),f=t!==r?t.state:K(this,yh),{state:h}=t;let p={...h},m=!1,y;if(n._optimisticResults){const L=this.hasListeners(),N=!L&<(t,n),M=L&&jT(t,r,n,i);(N||M)&&(p={...p,...zO(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:S}=p;y=p.data;let x=!1;if(n.placeholderData!==void 0&&y===void 0&&S==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(L=o.data,x=!0):L=typeof n.placeholderData=="function"?n.placeholderData((B=K(this,Ac))==null?void 0:B.state.data,K(this,Ac)):n.placeholderData,L!==void 0&&(S="success",y=a1(o==null?void 0:o.data,L,n),m=!0)}if(n.select&&y!==void 0&&!x)if(o&&y===(a==null?void 0:a.data)&&n.select===K(this,bh))y=K(this,Tc);else try{$e(this,bh,n.select),y=n.select(y),y=a1(o==null?void 0:o.data,y,n),$e(this,Tc,y),$e(this,Xs,null)}catch(L){$e(this,Xs,L)}K(this,Xs)&&(b=K(this,Xs),y=K(this,Tc),v=Date.now(),S="error");const _=p.fetchStatus==="fetching",k=S==="pending",T=S==="error",A=k&&_,D=y!==void 0,$={status:S,fetchStatus:p.fetchStatus,isPending:k,isSuccess:S==="success",isError:T,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!k,isLoadingError:T&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:T&&D,isStale:rS(t,n),refetch:this.refetch,promise:K(this,jo),isEnabled:pi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=$.data!==void 0,N=$.status==="error"&&!L,M=j=>{N?j.reject($.error):L&&j.resolve($.data)},z=()=>{const j=$e(this,jo,$.promise=l1());M(j)},G=K(this,jo);switch(G.status){case"pending":t.queryHash===r.queryHash&&M(G);break;case"fulfilled":(N||$.data!==G.value)&&z();break;case"rejected":(!N||$.error!==G.reason)&&z();break}}return $}updateResult(){const t=K(this,rr),n=this.createResult(K(this,kt),this.options);if($e(this,Rl,K(this,kt).state),$e(this,_c,this.options),K(this,Rl).data!==void 0&&$e(this,Ac,K(this,kt)),Sg(n,t))return;$e(this,rr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!K(this,Dc).size)return!0;const a=new Set(o??K(this,Dc));return this.options.throwOnError&&a.add("error"),Object.keys(K(this,rr)).some(u=>{const c=u;return K(this,rr)[c]!==t[c]&&a.has(c)})};rt(this,Lt,BO).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,Lt,h1).call(this)}},wr=new WeakMap,kt=new WeakMap,yh=new WeakMap,rr=new WeakMap,Rl=new WeakMap,_c=new WeakMap,jo=new WeakMap,Xs=new WeakMap,bh=new WeakMap,Tc=new WeakMap,Ac=new WeakMap,_l=new WeakMap,Tl=new WeakMap,Qs=new WeakMap,Dc=new WeakMap,Lt=new WeakSet,Dd=function(t){rt(this,Lt,g1).call(this);let n=K(this,kt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ir)),n},c1=function(){rt(this,Lt,p1).call(this);const t=ca(this.options.staleTime,K(this,kt));if(Xd.isServer()||K(this,rr).isStale||!o1(t))return;const r=$O(K(this,rr).dataUpdatedAt,t)+1;$e(this,_l,ml.setTimeout(()=>{K(this,rr).isStale||this.updateResult()},r))},f1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,kt)):this.options.refetchInterval)??!1},d1=function(t){rt(this,Lt,m1).call(this),$e(this,Qs,t),!(Xd.isServer()||pi(this.options.enabled,K(this,kt))===!1||!o1(K(this,Qs))||K(this,Qs)===0)&&$e(this,Tl,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||Jw.isFocused())&&rt(this,Lt,Dd).call(this)},K(this,Qs)))},h1=function(){rt(this,Lt,c1).call(this),rt(this,Lt,d1).call(this,rt(this,Lt,f1).call(this))},p1=function(){K(this,_l)!==void 0&&(ml.clearTimeout(K(this,_l)),$e(this,_l,void 0))},m1=function(){K(this,Tl)!==void 0&&(ml.clearInterval(K(this,Tl)),$e(this,Tl,void 0))},g1=function(){const t=K(this,wr).getQueryCache().build(K(this,wr),this.options);if(t===K(this,kt))return;const n=K(this,kt);$e(this,kt,t),$e(this,yh,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},BO=function(t){_n.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,rr))}),K(this,wr).getQueryCache().notify({query:K(this,kt),type:"observerResultsUpdated"})})},RO);function B6(e,t){return pi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function LT(e,t){return B6(e,t)||e.state.data!==void 0&&y1(e,t,t.refetchOnMount)}function y1(e,t,n){if(pi(t.enabled,e)!==!1&&ca(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&rS(e,t)}return!1}function jT(e,t,n,r){return(e!==t||pi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rS(e,n)}function rS(e,t){return pi(t.enabled,e)!==!1&&e.isStaleByTime(ca(t.staleTime,e))}function U6(e,t){return!Sg(e.getCurrentResult(),t)}function FT(e){return{onFetch:(t,n)=>{var h,p,m,y,b;const r=t.options,i=(m=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let v=!1;const S=k=>{P6(k,()=>t.signal,()=>v=!0)},x=NO(t.options,t.fetchOptions),_=async(k,T,A)=>{if(v)return Promise.reject();if(T==null&&k.pages.length)return Promise.resolve(k);const O=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:T,direction:A?"backward":"forward",meta:t.options.meta};return S(N),N})(),$=await x(O),{maxPages:B}=t.options,L=A?$6:O6;return{pages:L(k.pages,$,B),pageParams:L(k.pageParams,T,B)}};if(i&&o.length){const k=i==="backward",T=k?H6:zT,A={pages:o,pageParams:a},D=T(r,A);u=await _(A,D,k)}else{const k=e??o.length;do{const T=c===0?a[0]??r.initialPageParam:zT(r,u);if(c>0&&T==null)break;u=await _(u,T),c++}while(c<k)}return u};t.options.persister?t.fetchFn=()=>{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function zT(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 H6(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var vh,Ji,Kn,Al,eo,Fs,_O,G6=(_O=class extends jO{constructor(t){super();He(this,eo);He(this,vh);He(this,Ji);He(this,Kn);He(this,Al);$e(this,vh,t.client),this.mutationId=t.mutationId,$e(this,Kn,t.mutationCache),$e(this,Ji,[]),this.state=t.state||UO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,Ji).includes(t)||(K(this,Ji).push(t),this.clearGcTimeout(),K(this,Kn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$e(this,Ji,K(this,Ji).filter(n=>n!==t)),this.scheduleGc(),K(this,Kn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Ji).length||(this.state.status==="pending"?this.scheduleGc():K(this,Kn).remove(this))}continue(){var t;return((t=K(this,Al))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,c,f,h,p,m,y,b,v,S,x,_,k,T,A,D,O;const n=()=>{rt(this,eo,Fs).call(this,{type:"continue"})},r={client:K(this,vh),meta:this.options.meta,mutationKey:this.options.mutationKey};$e(this,Al,LO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:($,B)=>{rt(this,eo,Fs).call(this,{type:"failed",failureCount:$,error:B})},onPause:()=>{rt(this,eo,Fs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Kn).canRun(this)}));const i=this.state.status==="pending",o=!K(this,Al).canStart();try{if(i)n();else{rt(this,eo,Fs).call(this,{type:"pending",variables:t,isPaused:o}),K(this,Kn).config.onMutate&&await K(this,Kn).config.onMutate(t,this,r);const B=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));B!==this.state.context&&rt(this,eo,Fs).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const $=await K(this,Al).start();return await((f=(c=K(this,Kn).config).onSuccess)==null?void 0:f.call(c,$,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,$,t,this.state.context,r)),await((y=(m=K(this,Kn).config).onSettled)==null?void 0:y.call(m,$,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,$,null,t,this.state.context,r)),rt(this,eo,Fs).call(this,{type:"success",data:$}),$}catch($){try{await((x=(S=K(this,Kn).config).onError)==null?void 0:x.call(S,$,t,this.state.context,this,r))}catch(B){Promise.reject(B)}try{await((k=(_=this.options).onError)==null?void 0:k.call(_,$,t,this.state.context,r))}catch(B){Promise.reject(B)}try{await((A=(T=K(this,Kn).config).onSettled)==null?void 0:A.call(T,void 0,$,this.state.variables,this.state.context,this,r))}catch(B){Promise.reject(B)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,$,t,this.state.context,r))}catch(B){Promise.reject(B)}throw rt(this,eo,Fs).call(this,{type:"error",error:$}),$}finally{K(this,Kn).runNext(this)}}},vh=new WeakMap,Ji=new WeakMap,Kn=new WeakMap,Al=new WeakMap,eo=new WeakSet,Fs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_n.batch(()=>{K(this,Ji).forEach(r=>{r.onMutationUpdate(t)}),K(this,Kn).notify({mutation:this,type:"updated",action:t})})},_O);function UO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fo,Oi,xh,TO,V6=(TO=class extends tf{constructor(t={}){super();He(this,Fo);He(this,Oi);He(this,xh);this.config=t,$e(this,Fo,new Set),$e(this,Oi,new Map),$e(this,xh,0)}build(t,n,r){const i=new G6({client:t,mutationCache:this,mutationId:++um(this,xh)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,Fo).add(t);const n=cm(t);if(typeof n=="string"){const r=K(this,Oi).get(n);r?r.push(t):K(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,Fo).delete(t)){const n=cm(t);if(typeof n=="string"){const r=K(this,Oi).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&K(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=cm(t);if(typeof n=="string"){const r=K(this,Oi).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=cm(t);if(typeof n=="string"){const i=(r=K(this,Oi).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_n.batch(()=>{K(this,Fo).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,Fo).clear(),K(this,Oi).clear()})}getAll(){return Array.from(K(this,Fo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>OT(n,r))}findAll(t={}){return this.getAll().filter(n=>OT(t,n))}notify(t){_n.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _n.batch(()=>Promise.all(t.map(n=>n.continue().catch(ir))))}},Fo=new WeakMap,Oi=new WeakMap,xh=new WeakMap,TO);function cm(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zo,Zs,Sr,Bo,es,Zm,b1,AO,q6=(AO=class extends tf{constructor(n,r){super();He(this,es);He(this,zo);He(this,Zs);He(this,Sr);He(this,Bo);$e(this,zo,n),this.setOptions(r),this.bindMethods(),rt(this,es,Zm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=K(this,zo).defaultMutationOptions(n),Sg(this.options,r)||K(this,zo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,Sr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Fl(r.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((i=K(this,Sr))==null?void 0:i.state.status)==="pending"&&K(this,Sr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,Sr))==null||n.removeObserver(this)}onMutationUpdate(n){rt(this,es,Zm).call(this),rt(this,es,b1).call(this,n)}getCurrentResult(){return K(this,Zs)}reset(){var n;(n=K(this,Sr))==null||n.removeObserver(this),$e(this,Sr,void 0),rt(this,es,Zm).call(this),rt(this,es,b1).call(this)}mutate(n,r){var i;return $e(this,Bo,r),(i=K(this,Sr))==null||i.removeObserver(this),$e(this,Sr,K(this,zo).getMutationCache().build(K(this,zo),this.options)),K(this,Sr).addObserver(this),K(this,Sr).execute(n)}},zo=new WeakMap,Zs=new WeakMap,Sr=new WeakMap,Bo=new WeakMap,es=new WeakSet,Zm=function(){var r;const n=((r=K(this,Sr))==null?void 0:r.state)??UO();$e(this,Zs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},b1=function(n){_n.batch(()=>{var r,i,o,a,u,c,f,h;if(K(this,Bo)&&this.hasListeners()){const p=K(this,Zs).variables,m=K(this,Zs).context,y={client:K(this,zo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=K(this,Bo)).onSuccess)==null||i.call(r,n.data,p,m,y)}catch(b){Promise.reject(b)}try{(a=(o=K(this,Bo)).onSettled)==null||a.call(o,n.data,null,p,m,y)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(u=K(this,Bo)).onError)==null||c.call(u,n.error,p,m,y)}catch(b){Promise.reject(b)}try{(h=(f=K(this,Bo)).onSettled)==null||h.call(f,void 0,n.error,p,m,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(K(this,Zs))})})},AO),to,DO,Y6=(DO=class extends tf{constructor(t={}){super();He(this,to);this.config=t,$e(this,to,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??eS(i,n);let a=this.get(o);return a||(a=new F6({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){K(this,to).has(t.queryHash)||(K(this,to).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,to).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,to).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_n.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,to).get(t)}getAll(){return[...K(this,to).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>MT(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>MT(t,r)):n}notify(t){_n.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_n.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_n.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},to=new WeakMap,DO),ln,Js,ea,Mc,Oc,ta,$c,Pc,MO,W6=(MO=class{constructor(e={}){He(this,ln);He(this,Js);He(this,ea);He(this,Mc);He(this,Oc);He(this,ta);He(this,$c);He(this,Pc);$e(this,ln,e.queryCache||new Y6),$e(this,Js,e.mutationCache||new V6),$e(this,ea,e.defaultOptions||{}),$e(this,Mc,new Map),$e(this,Oc,new Map),$e(this,ta,0)}mount(){um(this,ta)._++,K(this,ta)===1&&($e(this,$c,Jw.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onFocus())})),$e(this,Pc,Cg.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onOnline())})))}unmount(){var e,t;um(this,ta)._--,K(this,ta)===0&&((e=K(this,$c))==null||e.call(this),$e(this,$c,void 0),(t=K(this,Pc))==null||t.call(this),$e(this,Pc,void 0))}isFetching(e){return K(this,ln).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,Js).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,ln).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ca(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,ln).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=K(this,ln).get(r.queryHash),o=i==null?void 0:i.state.data,a=A6(t,o);if(a!==void 0)return K(this,ln).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _n.batch(()=>K(this,ln).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,ln);_n.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,ln);return _n.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_n.batch(()=>K(this,ln).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ir).catch(ir)}invalidateQueries(e,t={}){return _n.batch(()=>(K(this,ln).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_n.batch(()=>K(this,ln).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ir)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ir)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,ln).build(this,t);return n.isStaleByTime(ca(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ir).catch(ir)}fetchInfiniteQuery(e){return e.behavior=FT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ir).catch(ir)}ensureInfiniteQueryData(e){return e.behavior=FT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cg.isOnline()?K(this,Js).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,ln)}getMutationCache(){return K(this,Js)}getDefaultOptions(){return K(this,ea)}setDefaultOptions(e){$e(this,ea,e)}setQueryDefaults(e,t){K(this,Mc).set(Fl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,Mc).values()],n={};return t.forEach(r=>{Kd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,Oc).set(Fl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,Oc).values()],n={};return t.forEach(r=>{Kd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,ea).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eS(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===tS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,ea).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,ln).clear(),K(this,Js).clear()}},ln=new WeakMap,Js=new WeakMap,ea=new WeakMap,Mc=new WeakMap,Oc=new WeakMap,ta=new WeakMap,$c=new WeakMap,Pc=new WeakMap,MO),HO=C.createContext(void 0),iS=e=>{const t=C.useContext(HO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K6=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(HO.Provider,{value:e,children:t})),GO=C.createContext(!1),X6=()=>C.useContext(GO);GO.Provider;function Q6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z6=C.createContext(Q6()),J6=()=>C.useContext(Z6),e8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?nS(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},t8=e=>{C.useEffect(()=>{e.clearReset()},[e])},n8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||nS(n,[e.error,r])),r8=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))}},i8=(e,t)=>e.isLoading&&e.isFetching&&!t,o8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,BT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function s8(e,t,n){var m,y,b,v;const r=X6(),i=J6(),o=iS(),a=o.defaultQueryOptions(e);(y=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||y.call(m,a);const u=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",r8(a),e8(a,i,u),t8(i);const c=!o.getQueryCache().get(a.queryHash),[f]=C.useState(()=>new t(o,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const x=p?f.subscribe(_n.batchCalls(S)):ir;return f.updateResult(),x},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(a)},[a,f]),o8(a,h))throw BT(a,f,i);if(n8({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;if((v=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||v.call(b,a,h),a.experimental_prefetchInRender&&!Xd.isServer()&&i8(h,r)){const S=c?BT(a,f,i):u==null?void 0:u.promise;S==null||S.catch(ir).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function Si(e,t){return s8(e,z6)}function UT(e,t){const n=iS(),[r]=C.useState(()=>new q6(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(a=>r.subscribe(_n.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((a,u)=>{r.mutate(a,u).catch(ir)},[r]);if(i.error&&nS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var Md=typeof window<"u"?C.useLayoutEffect:C.useEffect;function A0(e){const t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function a8(e,t,n={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function l8(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}var VO=!1;function Qd(e){return e[e.length-1]}function u8(e){return typeof e=="function"}function oa(e,t){return u8(e)?e(t):e}var c8=Object.prototype.hasOwnProperty,HT=Object.prototype.propertyIsEnumerable,f8=()=>Object.create(null),sl=(e,t)=>sa(e,t,f8);function sa(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=qT(e)&&qT(i);if(!o&&!(Nc(e)&&Nc(i)))return i;const a=o?e:GT(e);if(!a)return i;const u=o?i:GT(i);if(!u)return i;const c=a.length,f=u.length,h=o?new Array(f):n();let p=0;for(let m=0;m<f;m++){const y=o?m:u[m],b=e[y],v=i[y];if(b===v){h[y]=b,(o?m<c:c8.call(e,y))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[y]=v;continue}const S=sa(b,v,n,r+1);h[y]=S,S===b&&p++}return c===f&&p===c?e:h}function GT(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!HT.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!HT.call(e,i))return!1;r.push(i)}return r}function Nc(e){if(!VT(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!VT(n)||!n.hasOwnProperty("isPrototypeOf"))}function VT(e){return Object.prototype.toString.call(e)==="[object Object]"}function qT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ol(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(!Ol(e[r],t[r],n))return!1;return!0}if(Nc(e)&&Nc(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Ol(e[a],t[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&i++;let o=0;for(const a in t)if((!r||t[a]!==void 0)&&(o++,o>i||!Ol(e[a],t[a],n)))return!1;return i===o}return!1}function Ic(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function Zd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function d8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function YT(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return d8(t)}var h8=["http:","https:","mailto:","tel:"];function Eg(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function md(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=YT(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+YT(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function p8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function m8(e,t){if(e===t)return!0;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 Wo(){throw new Error("Invariant failed")}function Jd(e){const t=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=t.get(o);if(a)return i(a),a.value},set(o,a){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 u=t.get(o);if(u)u.value=a,i(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(o,c)}},clear(){t.clear(),n=void 0,r=void 0}}}var gl=4,qO=5;function g8(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function oS(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,o=e.substring(t,i);if(!o||!o.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(o==="$"){const u=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const a=g8(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const h=u+3,p=c;if(h<p)return n[0]=3,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=i,n}}else if(f===36){const h=u+1,p=u+2;return p===c?(n[0]=2,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+u,n[2]=t+p,n[3]=t+c,n[4]=t+c+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Ey(e,t,n,r,i,o,a){var c,f,h,p,m,y,b,v,S,x,_,k,T;a==null||a(n);let u=r;{const A=n.fullPath??n.from,D=A.length,O=((c=n.options)==null?void 0:c.caseSensitive)??e,$=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((m=(p=n.options)==null?void 0:p.skipRouteOnParseError)!=null&&m.params));for(;u<D;){const L=oS(A,u,t);let N;const M=u,z=L[5];switch(u=z+1,o++,L[0]){case 0:{const G=A.substring(L[2],L[3]);if(O){const j=(y=i.static)==null?void 0:y.get(G);if(j)N=j;else{i.static??(i.static=new Map);const F=yl(n.fullPath??n.from);F.parent=i,F.depth=o,N=F,i.static.set(G,F)}}else{const j=G.toLowerCase(),F=(b=i.staticInsensitive)==null?void 0:b.get(j);if(F)N=F;else{i.staticInsensitive??(i.staticInsensitive=new Map);const U=yl(n.fullPath??n.from);U.parent=i,U.depth=o,N=U,i.staticInsensitive.set(j,U)}}break}case 1:{const G=A.substring(M,L[1]),j=A.substring(L[4],z),F=O&&!!(G||j),U=G?F?G:G.toLowerCase():void 0,q=j?F?j:j.toLowerCase():void 0,W=!$&&((v=i.dynamic)==null?void 0:v.find(I=>!I.skipOnParamError&&I.caseSensitive===F&&I.prefix===U&&I.suffix===q));if(W)N=W;else{const I=M0(1,n.fullPath??n.from,F,U,q);N=I,I.depth=o,I.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(I)}break}case 3:{const G=A.substring(M,L[1]),j=A.substring(L[4],z),F=O&&!!(G||j),U=G?F?G:G.toLowerCase():void 0,q=j?F?j:j.toLowerCase():void 0,W=!$&&((S=i.optional)==null?void 0:S.find(I=>!I.skipOnParamError&&I.caseSensitive===F&&I.prefix===U&&I.suffix===q));if(W)N=W;else{const I=M0(3,n.fullPath??n.from,F,U,q);N=I,I.parent=i,I.depth=o,i.optional??(i.optional=[]),i.optional.push(I)}break}case 2:{const G=A.substring(M,L[1]),j=A.substring(L[4],z),F=O&&!!(G||j),U=G?F?G:G.toLowerCase():void 0,q=j?F?j:j.toLowerCase():void 0,W=M0(2,n.fullPath??n.from,F,U,q);N=W,W.parent=i,W.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=N}if($&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const L=yl(n.fullPath??n.from);L.kind=qO,L.parent=i,o++,L.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(L),i=L}const B=(n.path||!n.children)&&!n.isRoot;if(B&&A.endsWith("/")){const L=yl(n.fullPath??n.from);L.kind=gl,L.parent=i,o++,L.depth=o,i.index=L,i=L}i.parse=((_=(x=n.options)==null?void 0:x.params)==null?void 0:_.parse)??null,i.skipOnParamError=$,i.parsingPriority=((T=(k=n.options)==null?void 0:k.skipRouteOnParseError)==null?void 0:T.priority)??0,B&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const A of n.children)Ey(e,t,A,u,i,o,a)}function D0(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 Hs(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Hs(i);if(e.static)for(const i of e.static.values())Hs(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Hs(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(D0);for(const i of e.dynamic)Hs(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(D0);for(const i of e.optional)Hs(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(D0);for(const i of e.wildcard)Hs(i)}}function yl(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function M0(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function y8(e,t){const n=yl("/"),r=new Uint16Array(6);for(const i of e)Ey(!1,r,i,1,n,0);Hs(n),t.masksTree=n,t.flatCache=Jd(1e3)}function b8(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=sS(e,t.masksTree);return t.flatCache.set(e,r),r}function v8(e,t,n,r,i){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let a=i.singleCache.get(o);return a||(a=yl("/"),Ey(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),sS(r,a,n)}function x8(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let o;try{o=sS(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=C8(o.route)),t.matchCache.set(r,o),o}function w8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function S8(e,t=!1,n){const r=yl(e.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return Ey(t,i,e,1,r,0,c=>{if(n==null||n(c,u),c.id in o&&Wo(),o[c.id]=c,u!==0&&c.path){const f=w8(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Hs(r),{processedTree:{segmentTree:r,singleCache:Jd(1e3),matchCache:Jd(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function sS(e,t,n=!1){const r=e.split("/"),i=k8(e,r,t,n);if(!i)return null;const[o]=YO(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function YO(e,t,n){var h,p,m,y,b,v,S,x,_,k;const r=E8(n.node);let i=null;const o=Object.create(null);let a=((h=n.extract)==null?void 0:h.part)??0,u=((p=n.extract)==null?void 0:p.node)??0,c=((m=n.extract)==null?void 0:m.path)??0,f=((y=n.extract)==null?void 0:y.segment)??0;for(;u<r.length;a++,u++,c++,f++){const T=r[u];if(T.kind===gl)break;if(T.kind===qO){f--,a--,c--;continue}const A=t[a],D=c;if(A&&(c+=A.length),T.kind===1){i??(i=n.node.fullPath.split("/"));const O=i[f],$=((b=T.prefix)==null?void 0:b.length)??0;if(O.charCodeAt($)===123){const B=((v=T.suffix)==null?void 0:v.length)??0,L=O.substring($+2,O.length-B-1),N=A.substring($,A.length-B);o[L]=decodeURIComponent(N)}else{const B=O.substring(1);o[B]=decodeURIComponent(A)}}else if(T.kind===3){if(n.skipped&1<<u){a--,c=D-1;continue}i??(i=n.node.fullPath.split("/"));const O=i[f],$=((S=T.prefix)==null?void 0:S.length)??0,B=((x=T.suffix)==null?void 0:x.length)??0,L=O.substring($+3,O.length-B-1),N=T.suffix||T.prefix?A.substring($,A.length-B):A;N&&(o[L]=decodeURIComponent(N))}else if(T.kind===2){const O=T,$=e.substring(D+(((_=O.prefix)==null?void 0:_.length)??0),e.length-(((k=O.suffix)==null?void 0:k.length)??0)),B=decodeURIComponent($);o["*"]=B,o._splat=B;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function C8(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function E8(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function k8(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Qd(t),o=i&&e!=="/",a=t.length-(i?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,f=null,h=null;for(;u.length;){const p=u.pop(),{node:m,index:y,skipped:b,depth:v,statics:S,dynamics:x,optionals:_}=p;let{extract:k,rawParams:T,parsedParams:A}=p;if(m.skipOnParamError){if(!O0(e,t,p))continue;T=p.rawParams,k=p.extract,A=p.parsedParams}r&&m.route&&m.kind!==gl&&gd(f,p)&&(f=p);const D=y===a;if(D&&(m.route&&!o&&gd(h,p)&&(h=p),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const O=D?void 0:t[y];let $;if(D&&m.index){const B={node:m.index,index:y,skipped:b,depth:v+1,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A};let L=!0;if(m.index.skipOnParamError&&(O0(e,t,B)||(L=!1)),L){if(S===a&&!x&&!_&&!b)return B;gd(h,B)&&(h=B)}}if(m.wildcard&&gd(c,p))for(const B of m.wildcard){const{prefix:L,suffix:N}=B;if(L&&(D||!(B.caseSensitive?O:$??($=O.toLowerCase())).startsWith(L)))continue;if(N){if(D)continue;const z=t.slice(y).join("/").slice(-N.length);if((B.caseSensitive?z:z.toLowerCase())!==N)continue}const M={node:B,index:a,skipped:b,depth:v,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A};if(!(B.skipOnParamError&&!O0(e,t,M))){c=M;break}}if(m.optional){const B=b|1<<v,L=v+1;for(let N=m.optional.length-1;N>=0;N--){const M=m.optional[N];u.push({node:M,index:y,skipped:B,depth:L,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D)for(let N=m.optional.length-1;N>=0;N--){const M=m.optional[N],{prefix:z,suffix:G}=M;if(z||G){const j=M.caseSensitive?O:$??($=O.toLowerCase());if(z&&!j.startsWith(z)||G&&!j.endsWith(G))continue}u.push({node:M,index:y+1,skipped:b,depth:L,statics:S,dynamics:x,optionals:_+1,extract:k,rawParams:T,parsedParams:A})}}if(!D&&m.dynamic&&O)for(let B=m.dynamic.length-1;B>=0;B--){const L=m.dynamic[B],{prefix:N,suffix:M}=L;if(N||M){const z=L.caseSensitive?O:$??($=O.toLowerCase());if(N&&!z.startsWith(N)||M&&!z.endsWith(M))continue}u.push({node:L,index:y+1,skipped:b,depth:v+1,statics:S,dynamics:x+1,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&m.staticInsensitive){const B=m.staticInsensitive.get($??($=O.toLowerCase()));B&&u.push({node:B,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&m.static){const B=m.static.get(O);B&&u.push({node:B,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(m.pathless){const B=v+1;for(let L=m.pathless.length-1;L>=0;L--){const N=m.pathless[L];u.push({node:N,index:y,skipped:b,depth:B,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}}}if(h&&c)return gd(c,h)?h:c;if(h)return h;if(c)return c;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const m=p===e.length?"/":e.slice(p);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(m),f}return null}function O0(e,t,n){try{const[r,i]=YO(e,t,n);n.rawParams=r,n.extract=i;const o=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,o),!0}catch{return null}}function gd(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.kind===gl)>(e.node.kind===gl)||t.node.kind===gl==(e.node.kind===gl)&&t.depth>e.depth))):!0}function Jm(e){return aS(e.filter(t=>t!==void 0).join("/"))}function aS(e){return e.replace(/\/{2,}/g,"/")}function WO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fa(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function KO(e){return fa(WO(e))}function kg(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function R8(e,t,n){return kg(e,n)===kg(t,n)}function _8({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),o=!i&&t===".";let a;if(r){a=i?t:o?e:e+"\0"+t;const p=r.get(a);if(p)return p}let u;if(o)u=e.split("/");else if(i)u=t.split("/");else{for(u=e.split("/");u.length>1&&Qd(u)==="";)u.pop();const p=t.split("/");for(let m=0,y=p.length;m<y;m++){const b=p[m];b===""?m?m===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Qd(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let c,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const m=u[p];if(!m)continue;c=oS(m,0,c);const y=c[0];if(y===0){f+=m;continue}const b=c[5],v=m.substring(0,c[1]),S=m.substring(c[4],b),x=m.substring(c[2],c[3]);y===1?f+=v||S?`${v}{$${x}}${S}`:`$${x}`:y===2?f+=v||S?`${v}{$}${S}`:"$":f+=`${v}{-$${x}}${S}`}f=aS(f);const h=f||"/";return a&&r&&r.set(a,h),h}function T8(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,o=>t.get(o)??o)}function $0(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>KT(i,n)).join("/"):KT(r,n)}function WT({path:e,params:t,decoder:n,...r}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const a=e.length;let u=0,c,f="";for(;u<a;){const h=u;c=oS(e,h,c);const p=c[5];if(u=p+1,h===p)continue;const m=c[0];if(m===0){f+="/"+e.substring(h,p);continue}if(m===2){const y=t._splat;o._splat=y,o["*"]=y;const b=e.substring(h,c[1]),v=e.substring(c[4],p);if(!y){i=!0,(b||v)&&(f+="/"+b+v);continue}const S=$0("_splat",t,n);f+="/"+b+S+v;continue}if(m===1){const y=e.substring(c[2],c[3]);!i&&!(y in t)&&(i=!0),o[y]=t[y];const b=e.substring(h,c[1]),v=e.substring(c[4],p),S=$0(y,t,n)??"undefined";f+="/"+b+S+v;continue}if(m===3){const y=e.substring(c[2],c[3]),b=t[y];if(b==null)continue;o[y]=b;const v=e.substring(h,c[1]),S=e.substring(c[4],p),x=$0(y,t,n)??"";f+="/"+v+x+S;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function KT(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Jn(e){return(e==null?void 0:e.isNotFound)===!0}function A8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var D8="tsr-scroll-restoration-v1_3";function M8(){const e=A8();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Nc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=oa(r,t)||t},persist:()=>{try{e.setItem(D8,JSON.stringify(t))}catch{}}}}var XT=M8(),O8=e=>e.state.__TSR_key||e.href;function $8(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()}var fm=!1,yd="window",QT="data-scroll-restoration-id";function P8(e,t){if(!XT)return;const n=XT;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,fm=!1;const r=e.options.getScrollRestorationKey||O8,i=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!(fm||!e.isScrollRestoring))if(u.target===document||u.target===window)i.set(yd,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=u.target;i.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},a=u=>{var f;if(!e.isScrollRestoring||!u||i.size===0||!n)return;const c=(f=n.state)[u]||(f[u]={});for(const[h,p]of i){let m;if(h===yd)m=yd;else if(h.isConnected){const y=h.getAttribute(QT);m=y?`[${QT}="${y}"]`:$8(h)}m&&(c[m]=p)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",u=>{a(u.fromLocation?r(u.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{a(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",u=>{var p;const c=r(u.toLocation),f=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){fm=!0;try{const m=e.isScrollRestoring?n.state[c]:void 0;let y=!1;if(m)for(const b in m){const v=m[b];if(!Nc(v))continue;const{scrollX:S,scrollY:x}=v;if(!(!Number.isFinite(S)||!Number.isFinite(x))){if(b===yd)window.scrollTo({top:x,left:S,behavior:f}),y=!0;else if(b){let _;try{_=document.querySelector(b)}catch{continue}_&&(_.scrollLeft=S,_.scrollTop=x,y=!0)}}}if(!y){const b=e.history.location.hash.slice(1);if(b){const v=((p=window.history.state)==null?void 0:p.__hashScrollIntoViewOptions)??!0;if(v){const S=document.getElementById(b);S&&S.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:f};if(window.scrollTo(v),h)for(const S of h){if(S===yd)continue;const x=typeof S=="function"?S():document.querySelector(S);x&&x.scrollTo(v)}}}}finally{fm=!1}e.isScrollRestoring&&n.set(m=>(m[c]||(m[c]={}),m))}})}function N8(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 P0(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function I8(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const o=n[r];o==null?n[r]=P0(i):Array.isArray(o)?o.push(P0(i)):n[r]=[o,P0(i)]}return n}var L8=F8(JSON.parse),j8=z8(JSON.stringify,JSON.parse);function F8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=I8(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function z8(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 o=N8(i,r);return o?`?${o}`:""}}var $l="__root__";function B8(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!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 kr(e){return e instanceof Response&&!!e.options}function U8(e){return{input:({url:t})=>{for(const n of e)t=v1(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=XO(e[n],t);return t}}}function H8(e){const t=KO(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const u=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return u===i?a.pathname="/":u.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=Jm(["/",t,a.pathname]),a)}}function v1(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function XO(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function G8(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:o}=t,a=new Map,u=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),p=n(e.isLoading),m=n(e.isTransitioning),y=n(e.location),b=n(e.resolvedLocation),v=n(e.statusCode),S=n(e.redirect),x=n([]),_=n([]),k=n([]),T=r(()=>N0(a,x.get())),A=r(()=>N0(u,_.get())),D=r(()=>N0(c,k.get())),O=r(()=>x.get()[0]),$=r(()=>x.get().some(U=>{var q;return((q=a.get(U))==null?void 0:q.get().status)==="pending"})),B=r(()=>{var U;return{locationHref:y.get().href,resolvedLocationHref:(U=b.get())==null?void 0:U.href,status:f.get()}}),L=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:m.get(),matches:T.get(),location:y.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:S.get()})),N=Jd(64);function M(U){let q=N.get(U);return q||(q=r(()=>{const W=x.get();for(const I of W){const Y=a.get(I);if(Y&&Y.routeId===U)return Y.get()}}),N.set(U,q)),q}const z={status:f,loadedAt:h,isLoading:p,isTransitioning:m,location:y,resolvedLocation:b,statusCode:v,redirect:S,matchesId:x,pendingIds:_,cachedIds:k,matches:T,pendingMatches:A,cachedMatches:D,firstId:O,hasPending:$,matchRouteDeps:B,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:L,getRouteMatchStore:M,setMatches:G,setPending:j,setCached:F};G(e.matches),o==null||o(z);function G(U){I0(U,a,x,n,i)}function j(U){I0(U,u,_,n,i)}function F(U){I0(U,c,k,n,i)}return z}function N0(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function I0(e,t,n,r,i){const o=e.map(u=>u.id),a=new Set(o);i(()=>{for(const u of t.keys())a.has(u)||t.delete(u);for(const u of e){const c=t.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,t.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}m8(n.get(),o)||n.set(o)})}var x1=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},V8=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),ky=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Pl=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let o=0;o<=i;o++){const a=e.matches[o];if(!a)continue;const u=e.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},ZT=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),i=r>=0?r:0;let o=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let a=o;a>=0;a--){const u=e.matches[a];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:i},aa=(e,t,n)=>{var r,i,o;if(!(!kr(n)&&!Jn(n)))throw kr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:kr(n)?"redirected":Jn(n)?"notFound":a.status==="pending"?"success":a.status,context:Pl(e,t.index),isFetching:!1,error:n})),Jn(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),kr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},QO=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},JT=(e,t,n)=>{const r=Pl(e,n);e.updateMatch(t,i=>({...i,context:r}))},bd=(e,t,n,r)=>{var u,c;const{id:i,routeId:o}=e.matches[t],a=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),aa(e,e.router.getMatch(i),n);try{(c=(u=a.options).onError)==null||c.call(u,n)}catch(f){n=f,aa(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var h,p;return(h=f._nonReactive.beforeLoadPromise)==null||h.resolve(),f._nonReactive.beforeLoadPromise=void 0,(p=f._nonReactive.loadPromise)==null||p.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!kr(n)&&!Jn(n)&&(e.serialError??(e.serialError=n))},ZO=(e,t,n,r)=>{var o;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ky(e,t)&&(n.options.loader||n.options.beforeLoad||e$(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{x1(e)},i);r._nonReactive.pendingTimeout=a}},q8=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ZO(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&aa(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Y8=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ic(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&bd(e,n,a,"PARSE_PARAMS"),u&&bd(e,n,u,"VALIDATE_SEARCH"),ZO(e,t,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:c})))},p=()=>{var T;(T=i._nonReactive.beforeLoadPromise)==null||T.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,A=>({...A,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),p()});return}i._nonReactive.beforeLoadPromise=Ic();const m={...Pl(e,n,!1),...i.__routeContext},{search:y,params:b,cause:v}=i,S=ky(e,t),x={search:y,abortController:c,params:b,preload:S,context:m,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:S?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=T=>{if(T===void 0){e.router.batch(()=>{h(),p()});return}(kr(T)||Jn(T))&&(h(),bd(e,n,T,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,A=>({...A,__beforeLoadContext:T})),p()})};let k;try{if(k=r.options.beforeLoad(x),Zd(k))return h(),k.catch(T=>{bd(e,n,T,"BEFORE_LOAD")}).then(_)}catch(T){h(),bd(e,n,T,"BEFORE_LOAD")}_(k)},W8=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>u(),a=()=>Y8(e,n,t,i),u=()=>{if(QO(e,n))return;const c=q8(e,n,i);return Zd(c)?c.then(a):a()};return o()},K8=(e,t,n)=>{var o,a,u,c,f,h;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(a=(o=n.options).head)==null?void 0:a.call(o,i),(c=(u=n.options).scripts)==null?void 0:c.call(u,i),(h=(f=n.options).headers)==null?void 0:h.call(f,i)]).then(([p,m,y])=>({meta:p==null?void 0:p.meta,links:p==null?void 0:p.links,headScripts:p==null?void 0:p.scripts,headers:y,scripts:m,styles:p==null?void 0:p.styles}))},JO=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=Pl(e,r),p=ky(e,n);return{params:a,deps:u,preload:!!p,parentMatchPromise:o,abortController:c,context:h,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:p?"preload":f,route:i,...e.router.options.additionalContext}},eA=async(e,t,n,r,i)=>{var o,a,u,c,f;try{const h=e.router.getMatch(n);try{(!(VO??e.router.isServer)||h.ssr===!0)&&eh(i);const p=i.options.loader,m=typeof p=="function"?p:p==null?void 0:p.handler,y=m==null?void 0:m(JO(e,t,n,r,i)),b=!!m&&Zd(y);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,S=>({...S,isFetching:"loader"})),m){const S=b?await y:y;aa(e,e.router.getMatch(n),S),S!==void 0&&e.updateMatch(n,x=>({...x,loaderData:S}))}i._lazyPromise&&await i._lazyPromise;const v=h._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,S=>({...S,error:void 0,context:Pl(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(p){let m=p;if((m==null?void 0:m.name)==="AbortError"){if(h.abortController.signal.aborted){(o=h._nonReactive.loaderPromise)==null||o.resolve(),h._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Pl(e,r)}));return}const y=h._nonReactive.minPendingPromise;y&&await y,Jn(p)&&await((u=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:u.call(a)),aa(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){m=b,aa(e,e.router.getMatch(n),b)}!kr(m)&&!Jn(m)&&await eh(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:m,context:Pl(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),aa(e,p,h)}},X8=async(e,t,n)=>{var y,b,v,S;async function r(x,_,k,T,A){const D=Date.now()-_.updatedAt,O=x?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,$=A.options.shouldReload,B=typeof $=="function"?$(JO(e,t,i,n,A)):$,{status:L,invalid:N}=T,M=D>=O&&(!!e.forceStaleReload||T.cause==="enter"||k!==void 0&&k!==T.id);a=L==="success"&&(N||(B??M)),x&&A.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{var z,G;try{await eA(e,t,i,n,A);const j=e.router.getMatch(i);(z=j._nonReactive.loaderPromise)==null||z.resolve(),(G=j._nonReactive.loadPromise)==null||G.resolve(),j._nonReactive.loaderPromise=void 0,j._nonReactive.loadPromise=void 0}catch(j){kr(j)&&await e.router.navigate(j.options)}})()):L!=="success"||a?await eA(e,t,i,n,A):JT(e,i,n))}const{id:i,routeId:o}=e.matches[n];let a=!1,u=!1;const c=e.router.looseRoutesById[o],f=c.options.loader,h=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(QO(e,i)){if(!e.router.getMatch(i))return e.matches[n];JT(e,i,n)}else{const x=e.router.getMatch(i),_=e.router.stores.matchesId.get()[n],k=((y=_&&e.router.stores.matchStores.get(_)||null)==null?void 0:y.routeId)===o?_:(b=e.router.stores.matches.get().find(A=>A.routeId===o))==null?void 0:b.id,T=ky(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload&&h)return x;await x._nonReactive.loaderPromise;const A=e.router.getMatch(i),D=A._nonReactive.error||A.error;D&&aa(e,A,D),A.status==="pending"&&await r(T,x,k,A,c)}else{const A=T&&!e.router.stores.matchStores.has(i),D=e.router.getMatch(i);D._nonReactive.loaderPromise=Ic(),A!==D.preload&&e.updateMatch(i,O=>({...O,preload:A})),await r(T,x,k,D,c)}}const p=e.router.getMatch(i);u||((v=p._nonReactive.loaderPromise)==null||v.resolve(),(S=p._nonReactive.loadPromise)==null||S.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,u||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const m=u?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:m,invalid:!1})),e.router.getMatch(i)):p};async function tA(e){var m,y;const t=e,n=[];V8(t.router)&&x1(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=W8(t,b);Zd(v)&&await v}catch(v){if(kr(v))throw v;if(Jn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?ZT(t,r):void 0,a=r&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let u,c;for(let b=0;b<a;b++)n.push(X8(t,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const v of b){if(v.status!=="rejected")continue;const S=v.reason;if(kr(S))throw S;Jn(S)?u??(u=S):c??(c=S)}if(c!==void 0)throw c}const f=u??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const b=ZT(t,f);b===void 0&&Wo();const v=t.matches[b],S=t.router.looseRoutesById[v.routeId],x=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!S.options.notFoundComponent&&x&&(S.options.notFoundComponent=x),f.routeId=v.routeId;const _=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,k=>({...k,..._?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=b,await eh(S,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(y=t.router.getMatch(b.id))!=null&&y.globalNotFound&&t.updateMatch(b.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await eh(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:S}=t.matches[b],x=t.router.looseRoutesById[S];try{const _=K8(t,v,x);if(_){const k=await _;t.updateMatch(v,T=>({...T,...k}))}}catch(_){console.error(`Error executing head for route ${S}:`,_)}}const p=x1(t);if(Zd(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function nA(e,t){const n=t.map(r=>{var i,o;return(o=(i=e.options[r])==null?void 0:i.preload)==null?void 0:o.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function eh(e,t=eg){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...o}=r.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===eg?(()=>{if(e._componentsPromise===void 0){const r=nA(e,eg);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():nA(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function e$(e){var t;for(const n of eg)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var eg=["component","errorComponent","pendingComponent","notFoundComponent"],da="__TSR_index",rA="popstate",iA="beforeunload";function Q8(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{var p,m;if((u==null?void 0:u.ignoreBlocker)??!1){a();return}const f=((p=e.getBlockers)==null?void 0:p.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const y of f){const b=Rg(c.path,c.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:c.type})){(m=e.onBlocked)==null||m.call(e);return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=t.state[da];u=oA(f+1,u),o({task:()=>{e.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=t.state[da];u=oA(f,u),o({task:()=>{e.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[da]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...u,a]),()=>{var h,p;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(p=e.setBlockers)==null||p.call(e,f.filter(m=>m!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function oA(e,t){t||(t={});const n=lS();return{...t,key:n,__TSR_key:n,[da]:e}}function Z8(e){var $,B;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=L=>i=L,u=(L=>L),c=(()=>Rg(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!(($=t.history.state)!=null&&$.__TSR_key)&&!((B=t.history.state)!=null&&B.key)){const L=lS();t.history.replaceState({[da]:0,key:L,__TSR_key:L},"")}let f=c(),h,p=!1,m=!1,y=!1,b=!1;const v=()=>f;let S,x;const _=()=>{S&&(O._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),O._ignoreSubscribers=!1,S=void 0,x=void 0,h=void 0)},k=(L,N,M)=>{const z=u(N);x||(h=f),f=Rg(N,M),S={href:z,state:M,isPush:(S==null?void 0:S.isPush)||L==="push"},x||(x=Promise.resolve().then(()=>_()))},T=L=>{f=c(),O.notify({type:L})},A=async()=>{if(m){m=!1;return}const L=c(),N=L.state[da]-f.state[da],M=N===1,z=N===-1,G=!M&&!z||p;p=!1;const j=G?"GO":z?"BACK":"FORWARD",F=G?{type:"GO",index:N}:{type:z?"BACK":"FORWARD"};if(y)y=!1;else{const U=o();if(typeof document<"u"&&U.length){for(const q of U)if(await q.blockerFn({currentLocation:f,nextLocation:L,action:j})){m=!0,t.history.go(1),O.notify(F);return}}}f=c(),O.notify(F)},D=L=>{if(b){b=!1;return}let N=!1;const M=o();if(typeof document<"u"&&M.length)for(const z of M){const G=z.enableBeforeUnload??!0;if(G===!0){N=!0;break}if(typeof G=="function"&&G()===!0){N=!0;break}}if(N)return L.preventDefault(),L.returnValue=""},O=Q8({getLocation:v,getLength:()=>t.history.length,pushState:(L,N)=>k("push",L,N),replaceState:(L,N)=>k("replace",L,N),back:L=>(L&&(y=!0),b=!0,t.history.back()),forward:L=>{L&&(y=!0),b=!0,t.history.forward()},go:L=>{p=!0,t.history.go(L)},createHref:L=>u(L),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(iA,D,{capture:!0}),t.removeEventListener(rA,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(iA,D,{capture:!0}),t.addEventListener(rA,A),t.history.pushState=function(...L){const N=n.apply(t.history,L);return O._ignoreSubscribers||T("PUSH"),N},t.history.replaceState=function(...L){const N=r.apply(t.history,L);return O._ignoreSubscribers||T("REPLACE"),N},O}function J8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Rg(e,t){const n=J8(e),r=n.indexOf("#"),i=n.indexOf("?"),o=lS();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[da]:0,key:o,__TSR_key:o}}}function lS(){return(Math.random()+1).toString(36).substring(7)}function cc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var e9=class{constructor(e,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=>{var h;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=T8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Z8()),this.origin=this.options.origin,this.origin||(window!=null&&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;let p;this.resolvePathCache=Jd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=G8(n9(this.latestLocation),p),P8(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const p=[],m=KO(c);m&&m!=="/"&&p.push(H8({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:U8(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.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 n=S8(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&y8(this.options.routeMasks,n.processedTree),n},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=({pathname:c,search:f,hash:h,href:p,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const x=this.options.parseSearch(f),_=this.options.stringifySearch(x);return{href:c+_+h,publicHref:c+_+h,pathname:md(c).path,external:!1,searchStr:_,search:sl(r==null?void 0:r.search,x),hash:md(h.slice(1)).path,state:sa(r==null?void 0:r.state,m)}}const y=new URL(p,this.origin),b=v1(this.rewrite,y),v=this.options.parseSearch(b.search),S=this.options.stringifySearch(v);return b.search=S,{href:b.href.replace(b.origin,""),publicHref:p,pathname:md(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:S,search:sl(r==null?void 0:r.search,v),hash:md(b.hash.slice(1)).path,state:sa(r==null?void 0:r.state,m)}},o=i(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>_8({base:n,to:aS(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=>r9({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=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{var L,N;const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=this.resolvePathWithBase(c,"."),h=u.search,p=Object.assign(Object.create(null),u.params),m=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),y=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?p:Object.assign(p,oa(o.params,p)),b=this.getMatchedRoutes(m);let v=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(y).length>0)for(const M of v){const z=((L=M.options.params)==null?void 0:L.stringify)??M.options.stringifyParams;if(z)try{Object.assign(y,z(y))}catch{}}const S=n.leaveParams?m:md(WT({path:m,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&((N=this.options.search)!=null&&N.strict)){const M={};v.forEach(z=>{if(z.options.validateSearch)try{Object.assign(M,tg(z.options.validateSearch,{...M,...x}))}catch{}}),x=M}x=i9({search:x,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=sl(h,x);const _=this.options.stringifySearch(x),k=o.hash===!0?a.hash:o.hash?oa(o.hash,a.hash):void 0,T=k?`#${k}`:"";let A=o.state===!0?a.state:o.state?oa(o.state,a.state):{};A=sa(a.state,A);const D=`${S}${_}${T}`;let O,$,B=!1;if(this.rewrite){const M=new URL(D,this.origin),z=XO(this.rewrite,M);O=M.href.replace(M.origin,""),z.origin!==this.origin?($=z.href,B=!0):$=z.pathname+z.search+z.hash}else O=p8(D),$=O;return{publicHref:$,href:O,pathname:S,search:x,searchStr:_,state:A,hash:k??"",external:B,unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=b8(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:p,params:m,...y}=h.route,b=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,oa(m,f));a={from:n.from,...y,params:b},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const f=Ol(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=fa(this.latestLocation.href)===fa(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=Ic(()=>{u==null||u.resolve(),u=void 0}),a&&o())this.load();else{let{maskedLocation:c,hashScrollIntoView:f,...h}=i;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](h.publicHref,h.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:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const p=this.history.location.state.__TSR_index,m=Rg(u,{__TSR_index:n?p:p+1}),y=new URL(m.pathname,this.origin);c.to=v1(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:o,...a})=>{var c,f;let u=!1;if(i)try{new URL(`${i}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!i){const p=this.buildLocation({to:n,...a});i=i??p.publicHref,o=o??p.publicHref}const h=!u&&o?o:i;if(Eg(h,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const p=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const m of p)if(m!=null&&m.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...a,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(o=>o.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,o;const a=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const h=this.latestLocation,p=cc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await tA({router:this,sync:n==null?void 0:n.sync,forceStaleReload:a.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var S,x;let m=null,y=null,b=null,v=null;this.batch(()=>{const _=this.stores.pendingMatches.get(),k=_.length,T=this.stores.matches.get();m=k?T.filter(O=>!this.stores.pendingMatchStores.has(O.id)):null;const A=new Set;for(const O of this.stores.pendingMatchStores.values())O.routeId&&A.add(O.routeId);const D=new Set;for(const O of this.stores.matchStores.values())O.routeId&&D.add(O.routeId);y=k?T.filter(O=>!A.has(O.routeId)):null,b=k?_.filter(O=>!D.has(O.routeId)):null,v=k?_.filter(O=>D.has(O.routeId)):T,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),k&&(this.stores.setMatches(_),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(O=>O.status!=="error"&&O.status!=="notFound"&&O.status!=="redirected")]),this.clearExpiredCache())});for(const[_,k]of[[y,"onLeave"],[b,"onEnter"],[v,"onStay"]])if(_)for(const T of _)(x=(S=this.looseRoutesById[T.routeId].options)[k])==null||x.call(S,T)})})}})}catch(h){kr(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Jn(h)&&(i=h);const p=r?r.status:i?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(c=>c.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(cc(o,a)):r.types;if(u===!1){n();return}i={update:n,types:u}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>{var r,i,o;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((o=this.stores.matchStores.get(n))==null?void 0:o.get())},this.invalidate=n=>{const r=i=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(i);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&Eg(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const a=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=eh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=i.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return i=await tA({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(kr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Jn(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=v8(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!u||n.params&&!Ol(u.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ol(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??j8,parseSearch:e.parseSearch??L8,protocolAllowlist:e.protocolAllowlist??h8}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var p,m;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n;let{matchedRoutes:a}=n,u=!1;(r?r.path!=="/"&&i["**"]:fa(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:u=!0);const c=u?s9(this.options.notFoundMode,a):void 0,f=new Array(a.length),h=new Map;for(const y of this.stores.matchStores.values())y.routeId&&h.set(y.routeId,y.get());for(let y=0;y<a.length;y++){const b=a[y],v=f[y-1];let S,x,_;{const j=(v==null?void 0:v.search)??e.search,F=(v==null?void 0:v._strictSearch)??void 0;try{const U=tg(b.options.validateSearch,{...j})??void 0;S={...j,...U},x={...F,...U},_=void 0}catch(U){let q=U;if(U instanceof _g||(q=new _g(U.message,{cause:U})),t!=null&&t.throwOnError)throw q;S=j,x={},_=q}}const k=((m=(p=b.options).loaderDeps)==null?void 0:m.call(p,{search:S}))??"",T=k?JSON.stringify(k):"",{interpolatedPath:A,usedParams:D}=WT({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=b.id+A+T,$=this.getMatch(O),B=h.get(b.id),L=($==null?void 0:$._strictParams)??D;let N;if(!$)try{sA(b,D,o,L)}catch(j){if(Jn(j)||kr(j)?N=j:N=new t9(j.message,{cause:j}),t!=null&&t.throwOnError)throw N}Object.assign(i,L);const M=B?"stay":"enter";let z;if($)z={...$,cause:M,params:(B==null?void 0:B.params)??i,_strictParams:L,search:sl(B?B.search:$.search,S),_strictSearch:x};else{const j=b.options.loader||b.options.beforeLoad||b.lazyFn||e$(b)?"pending":"success";z={id:O,ssr:b.options.ssr,index:y,routeId:b.id,params:(B==null?void 0:B.params)??i,_strictParams:L,pathname:A,updatedAt:Date.now(),search:B?sl(B.search,S):S,_strictSearch:x,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:N,__routeContext:void 0,_nonReactive:{loadPromise:Ic()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:B?sa(B.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(z.globalNotFound=c===b.id),z.searchError=_;const G=this.getParentContext(v);z.context={...G,...z.__routeContext,...z.__beforeLoadContext},f[y]=z}for(let y=0;y<f.length;y++){const b=f[y],v=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),x=h.get(b.routeId);if(b.params=x?sl(x.params,i):i,!S){const _=f[y-1],k=this.getParentContext(_);if(v.options.context){const T={deps:b.loaderDeps,params:b.params,context:k??{},location:e,navigate:A=>this.navigate({...A,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:v.id};b.__routeContext=v.options.context(T)??void 0}b.context={...k,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=Qd(t),o={...e.search};for(const p of t)try{Object.assign(o,tg(p.options.validateSearch,o))}catch{}const a=Qd(this.stores.matchesId.get()),u=a&&((h=this.stores.matchStores.get(a))==null?void 0:h.get()),c=u&&u.routeId===i.id&&u.pathname===e.pathname;let f;if(c)f=u.params;else{const p=Object.assign(Object.create(null),n);for(const m of t)try{sA(m,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},_g=class extends Error{},t9=class extends Error{};function n9(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function tg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new _g("Async validation not supported");if(n.issues)throw new _g(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 r9({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=fa(e);let o,a;const u=x8(i,n,!0);return u&&(o=u.route,Object.assign(r,u.rawParams),a=Object.assign(Object.create(null),u.parsedParams)),{matchedRoutes:(u==null?void 0:u.branch)||[t.__root__],routeParams:r,foundRoute:o,parsedParams:a}}function i9({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return o9(n)(e,t,r??!1)}function o9(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(i=o.options.search)!=null&&i.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const a=({search:u,next:c})=>{let f=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((p,m)=>m(p),u));const h=c(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,m)=>m(p),h):h};t.middlewares.push(a)}if(o.options.validateSearch){const a=({search:u,next:c})=>{const f=c(u);if(!t._includeValidateSearch)return f;try{return{...f,...tg(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(a)}}const n=({search:o})=>{const a=t.dest;return a.search?a.search===!0?o:oa(a.search,o):{}};t.middlewares.push(n);const r=(o,a,u)=>{if(o>=u.length)return a;const c=u[o];return c({search:a,next:h=>r(o+1,h,u)})};return function(a,u,c){return t.dest=u,t._includeValidateSearch=c,r(0,a,t.middlewares)}}function s9(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return $l}function sA(e,t,n,r){var o;const i=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const a in t)a in n&&(r[a]=n[a]);else{const a=i(r);Object.assign(r,a)}}var a9="Error preloading route! ☝️",t$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var c,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(c=this.options).getParentRoute)==null?void 0:f.call(c),r?this._path=$l:this.parentRoute||Wo();let i=r?$l:n==null?void 0:n.path;i&&i!=="/"&&(i=WO(i));const o=(n==null?void 0:n.id)||i;let a=r?$l:Jm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Jm(["/",a]));const u=a==="__root__"?"/":Jm([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=fa(u)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>B8({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},l9=class extends t${constructor(e){super(e)}};function u9(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function uS(e){const t=e.errorComponent??cS;return E.jsx(c9,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var c9=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function cS({error:e}){const[t,n]=C.useState(!1);return E.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[E.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),E.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"})]}),E.jsx("div",{style:{height:".25rem"}}),t?E.jsx("div",{children:E.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?E.jsx("code",{children:e.message}):null})}):null]})}function f9({children:e,fallback:t=null}){return n$()?E.jsx(Ca.Fragment,{children:e}):E.jsx(Ca.Fragment,{children:t})}function n$(){return Ca.useSyncExternalStore(d9,()=>!0,()=>!1)}function d9(){return()=>{}}var r$=C.createContext(null);function Zr(e){return C.useContext(r$)}var Ry=C.createContext(void 0),h9=C.createContext(void 0),rn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(rn||{});function p9({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,p){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:h.deps;if(y!==void 0&&y.dep===f){y.version=p,h.depsTail=y;return}const b=f.subsTail;if(b!==void 0&&b.version===p&&b.sub===h)return;const v=h.depsTail=f.subsTail={version:p,dep:f,sub:h,prevDep:m,nextDep:y,prevSub:b,nextSub:void 0};y!==void 0&&(y.prevDep=v),m!==void 0?m.nextDep=v:h.deps=v,b!==void 0?b.nextSub=v:f.subs=v}function i(f,h=f.sub){const p=f.dep,m=f.prevDep,y=f.nextDep,b=f.nextSub,v=f.prevSub;return y!==void 0?y.prevDep=m:h.depsTail=m,m!==void 0?m.nextDep=y:h.deps=y,b!==void 0?b.prevSub=v:p.subsTail=v,v!==void 0?v.nextSub=b:(p.subs=b)===void 0&&n(p),y}function o(f){let h=f.nextSub,p;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&t(m),y&1){const b=m.subs;if(b!==void 0){const v=(f=b).nextSub;v!==void 0&&(p={value:h,prev:p},h=v);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;p!==void 0;)if(f=p.value,p=p.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let p,m=0,y=!1;e:do{const b=f.dep,v=b.flags;if(h.flags&16)y=!0;else if((v&17)===17){if(e(b)){const S=b.subs;S.nextSub!==void 0&&u(S),y=!0}}else if((v&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(p={value:f,prev:p}),f=b.deps,h=b,++m;continue}if(!y){const S=f.nextDep;if(S!==void 0){f=S;continue}}for(;m--;){const S=h.subs,x=S.nextSub!==void 0;if(x?(f=p.value,p=p.prev):f=S,y){if(e(h)){x&&u(S),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const _=f.nextDep;if(_!==void 0){f=_;continue e}}return y}while(!0)}function u(f){do{const h=f.sub,p=h.flags;(p&48)===32&&(h.flags=p|16,(p&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let p=h.depsTail;for(;p!==void 0;){if(p===f)return!0;p=p.prevDep}return!1}}function m9(e,t,n){var o,a,u;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(u=r?e.complete:n)==null?void 0:u.bind(i)}}const w1=[];let ng=0;const{link:aA,unlink:g9,propagate:y9,checkDirty:i$,shallowPropagate:lA}=p9({update(e){return e._update()},notify(e){w1[S1++]=e,e.flags&=~rn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=rn.Mutable|rn.Dirty,Tg(e))}});let dm=0,S1=0,Xi,C1=0;function o$(e){try{++C1,e()}finally{--C1||s$()}}function Tg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=g9(n,e)}function s$(){if(!(C1>0)){for(;dm<S1;){const e=w1[dm];w1[dm++]=void 0,e.notify()}dm=0,S1=0}}function uA(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return Xi!==void 0&&aA(i,Xi,ng),i._snapshot},subscribe(o){const a=m9(o),u={current:!1},c=b9(()=>{var f;i.get(),u.current?(f=a.next)==null||f.call(a,i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Xi,u=(t==null?void 0:t.compare)??Object.is;if(n)Xi=i,++ng,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=rn.Mutable|rn.RecursedCheck);try{const c=i._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{Xi=a,n&&(i.flags&=~rn.RecursedCheck),Tg(i)}}};return n?(i.flags=rn.Mutable|rn.Dirty,i.get=function(){const o=i.flags;if(o&rn.Dirty||o&rn.Pending&&i$(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&lA(a)}}else o&rn.Pending&&(i.flags=o&~rn.Pending);return Xi!==void 0&&aA(i,Xi,ng),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(y9(a),lA(a),s$())}},i}function b9(e){const t=()=>{const r=Xi;Xi=n,++ng,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return e()}finally{Xi=r,n.flags&=~rn.RecursedCheck,Tg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&i$(this.deps,this)?t():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Tg(this)}};return t(),n}var L0={exports:{}},j0={},F0={exports:{}},z0={};/**
|
|
51
|
+
* @license React
|
|
52
|
+
* use-sync-external-store-shim.production.js
|
|
53
|
+
*
|
|
54
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the MIT license found in the
|
|
57
|
+
* LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/var cA;function v9(){if(cA)return z0;cA=1;var e=Sh();function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,m){var y=m(),b=r({inst:{value:y,getSnapshot:m}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=m,c(v)&&S({inst:v})},[p,y,m]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return z0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,z0}var fA;function a$(){return fA||(fA=1,F0.exports=v9()),F0.exports}/**
|
|
59
|
+
* @license React
|
|
60
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/var dA;function x9(){if(dA)return j0;dA=1;var e=Sh(),t=a$();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return j0.useSyncExternalStoreWithSelector=function(f,h,p,m,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,k=D,D=m(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(k,D))return O;var $=m(D);return y!==void 0&&y(O,$)?(k=D,O):(k=D,T=$)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,m,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},j0}var hA;function w9(){return hA||(hA=1,L0.exports=x9()),L0.exports}var l$=w9();function S9(e,t){return e===t}function _r(e,t,n=S9){const r=C.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(a);return u},[e]),i=C.useCallback(()=>e==null?void 0:e.get(),[e]);return l$.useSyncExternalStoreWithSelector(r,i,i,t,n)}var C9={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ra(e){const t=Zr(),n=C.useContext(e.from?h9:Ry),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=C.useRef(void 0);return _r(i??C9,a=>{if((e.shouldThrow??!0)&&!a&&Wo(),a===void 0)return;const u=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=sa(o.current,u);return o.current=c,c}return u})}function u$(e){return Ra({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function c$(e){const{select:t,...n}=e;return Ra({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function f$(e){return Ra({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 d$(e){return Ra({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function h$(e){const t=Zr();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function p$(e){return Ra({...e,select:t=>e.select?e.select(t.context):t.context})}var yn=OO();function E9(e,t){const n=Zr(),r=l8(t),{activeProps:i,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:p,replace:m,startTransition:y,resetScroll:b,viewTransition:v,children:S,target:x,disabled:_,style:k,className:T,onClick:A,onBlur:D,onFocus:O,onMouseEnter:$,onMouseLeave:B,onTouchStart:L,ignoreBlocker:N,params:M,search:z,hash:G,state:j,mask:F,reloadDocument:U,unsafeRelative:q,from:W,_fromLocation:I,...Y}=e,J=n$(),H=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=_r(n.stores.location,De=>De,(De,ue)=>De.href===ue.href),re=C.useMemo(()=>{const De={_fromLocation:ie,...H};return n.buildLocation(De)},[n,ie,H]),he=re.maskedLocation?re.maskedLocation.publicHref:re.publicHref,ve=re.maskedLocation?re.maskedLocation.external:re.external,Re=C.useMemo(()=>D9(he,ve,n.history,_),[_,ve,he,n.history]),ce=C.useMemo(()=>{if(Re!=null&&Re.external)return Eg(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!M9(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Eg(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Re,n.protocolAllowlist]),Ie=C.useMemo(()=>{if(ce)return!1;if(a!=null&&a.exact){if(!R8(ie.pathname,re.pathname,n.basepath))return!1}else{const De=kg(ie.pathname,n.basepath),ue=kg(re.pathname,n.basepath);if(!(De.startsWith(ue)&&(De.length===ue.length||De[ue.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!Ol(ie.search,re.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?J&&ie.hash===re.hash:!0},[a==null?void 0:a.exact,a==null?void 0:a.explicitUndefined,a==null?void 0:a.includeHash,a==null?void 0:a.includeSearch,ie,ce,J,re.hash,re.pathname,re.search,n.basepath]),We=Ie?oa(i,{})??k9:B0,X=Ie?B0:oa(o,{})??B0,Z=[T,We.className,X.className].filter(Boolean).join(" "),ne=(k||We.style||X.style)&&{...k,...We.style,...X.style},[xe,ge]=C.useState(!1),Ce=C.useRef(!1),le=e.reloadDocument||ce?!1:c??n.options.defaultPreload,oe=f??n.options.defaultPreloadDelay??0,me=C.useCallback(()=>{n.preloadRoute({...H,_builtLocation:re}).catch(De=>{console.warn(De),console.warn(a9)})},[n,H,re]);a8(r,C.useCallback(De=>{De!=null&&De.isIntersecting&&me()},[me]),A9,{disabled:!!_||le!=="viewport"}),C.useEffect(()=>{Ce.current||!_&&le==="render"&&(me(),Ce.current=!0)},[_,me,le]);const ae=De=>{const ue=De.currentTarget.getAttribute("target"),Se=x!==void 0?x:ue;if(!_&&!O9(De)&&!De.defaultPrevented&&(!Se||Se==="_self")&&De.button===0){De.preventDefault(),yn.flushSync(()=>{ge(!0)});const ke=n.subscribe("onResolved",()=>{ke(),ge(!1)});n.navigate({...H,replace:m,resetScroll:b,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:N})}};if(ce)return{...Y,ref:r,href:ce,...S&&{children:S},...x&&{target:x},..._&&{disabled:_},...k&&{style:k},...T&&{className:T},...A&&{onClick:A},...D&&{onBlur:D},...O&&{onFocus:O},...$&&{onMouseEnter:$},...B&&{onMouseLeave:B},...L&&{onTouchStart:L}};const Oe=De=>{if(_||le!=="intent")return;if(!oe){me();return}const ue=De.currentTarget;if(vd.has(ue))return;const Se=setTimeout(()=>{vd.delete(ue),me()},oe);vd.set(ue,Se)},Te=De=>{_||le!=="intent"||me()},_e=De=>{if(_||!le||!oe)return;const ue=De.currentTarget,Se=vd.get(ue);Se&&(clearTimeout(Se),vd.delete(ue))};return{...Y,...We,...X,href:Re==null?void 0:Re.href,ref:r,onClick:Yu([A,ae]),onBlur:Yu([D,_e]),onFocus:Yu([O,Oe]),onMouseEnter:Yu([$,Oe]),onMouseLeave:Yu([B,_e]),onTouchStart:Yu([L,Te]),disabled:!!_,target:x,...ne&&{style:ne},...Z&&{className:Z},..._&&R9,...Ie&&_9,...J&&xe&&T9}}var B0={},k9={className:"active"},R9={role:"link","aria-disabled":!0},_9={"data-status":"active","aria-current":"page"},T9={"data-transitioning":"transitioning"},vd=new WeakMap,A9={rootMargin:"100px"},Yu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function D9(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function M9(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ql=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=E9(r,t),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return C.createElement("a",c,a)}return C.createElement(n,o,a)});function O9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var $9=class extends t${constructor(t){super(t),this.useMatch=n=>Ra({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>p$({...n,from:this.id}),this.useSearch=n=>d$({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>f$({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>c$({...n,from:this.id}),this.useLoaderData=n=>u$({...n,from:this.id}),this.useNavigate=()=>h$({from:this.fullPath}),this.Link=Ca.forwardRef((n,r)=>E.jsx(Ql,{ref:r,from:this.fullPath,...n}))}};function P9(e){return new $9(e)}var N9=class extends l9{constructor(e){super(e),this.useMatch=t=>Ra({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>p$({...t,from:this.id}),this.useSearch=t=>d$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>f$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>c$({...t,from:this.id}),this.useLoaderData=t=>u$({...t,from:this.id}),this.useNavigate=()=>h$({from:this.fullPath}),this.Link=Ca.forwardRef((t,n)=>E.jsx(Ql,{ref:n,from:this.fullPath,...t}))}};function I9(e){return new N9(e)}function Eh(e){return new L9(e,{silent:!0}).createRoute}var L9=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=P9(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function j9(e){const t=Zr(),n=`not-found-${_r(t.stores.location,r=>r.pathname)}-${_r(t.stores.status,r=>r)}`;return E.jsx(uS,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(Jn(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Jn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function F9(){return E.jsx("p",{children:"Not Found"})}function ec(e){return E.jsx(E.Fragment,{children:e.children})}function m$(e,t,n){return t.options.notFoundComponent?E.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?E.jsx(e.options.defaultNotFoundComponent,{...n}):E.jsx(F9,{})}function z9(e){return null}function B9(){return z9(Zr()),null}var g$=C.memo(function({matchId:t}){const n=Zr(),r=n.stores.matchStores.get(t);r||Wo();const i=_r(n.stores.loadedAt,a=>a),o=_r(r,a=>a);return E.jsx(U9,{router:n,matchId:t,resetKey:i,matchState:C.useMemo(()=>{var c;const a=o.routeId,u=(c=n.routesById[a].parentRoute)==null?void 0:c.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function U9({router:e,matchId:t,resetKey:n,matchState:r}){var b,v;const i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,a=o?E.jsx(o,{}):null,u=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??o??(((v=i.options.errorComponent)==null?void 0:v.preload)||h))?C.Suspense:ec,m=u?uS:ec,y=f?j9:ec;return E.jsxs(i.isRoot?i.options.shellComponent??ec:ec,{children:[E.jsx(Ry.Provider,{value:t,children:E.jsx(p,{fallback:a,children:E.jsx(m,{getResetKey:()=>n,errorComponent:u||cS,onCatch:(S,x)=>{if(Jn(S))throw S.routeId??(S.routeId=r.routeId),S;c==null||c(S,x)},children:E.jsx(y,{fallback:S=>{if(S.routeId??(S.routeId=r.routeId),!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!i.isRoot)throw S;return C.createElement(f,S)},children:h||r._displayPending?E.jsx(f9,{fallback:a,children:E.jsx(pA,{matchId:t})}):E.jsx(pA,{matchId:t})})})})}),r.parentRouteId===$l?E.jsxs(E.Fragment,{children:[E.jsx(H9,{resetKey:n}),e.options.scrollRestoration&&VO?E.jsx(B9,{}):null]}):null]})}function H9({resetKey:e}){const t=Zr(),n=C.useRef(void 0);return Md(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...cc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var pA=C.memo(function({matchId:t}){const n=Zr(),r=(h,p)=>{var m;return((m=n.getMatch(h.id))==null?void 0:m._nonReactive[p])??h._nonReactive[p]},i=n.stores.matchStores.get(t);i||Wo();const o=_r(i,h=>h),a=o.routeId,u=n.routesById[a],c=C.useMemo(()=>{var p;const h=(p=n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:p({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=C.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?E.jsx(h,{},c):E.jsx(fS,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const m=Ic();p._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Jn(o.error)||Wo(),m$(n,u,o.error);if(o.status==="redirected")throw kr(o.error)||Wo(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),fS=C.memo(function(){const t=Zr(),n=C.useContext(Ry);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=_r(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=_r(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?E.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Wo(),m$(t,a,void 0);if(!o)return null;const c=E.jsx(g$,{matchId:o});return r===$l?E.jsx(C.Suspense,{fallback:u,children:c}):c});function G9(){const e=Zr(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=_r(e.stores.isLoading,p=>p),o=_r(e.stores.hasPending,p=>p),a=A0(i),u=i||n||o,c=A0(u),f=i||o,h=A0(f);return e.startTransition=p=>{r(!0),C.startTransition(()=>{p(),r(!1)})},C.useEffect(()=>{const p=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fa(e.latestLocation.publicHref)!==fa(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{p()}},[e,e.history]),Md(()=>{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(m){console.error(m)}})()},[e]),Md(()=>{a&&!i&&e.emit({type:"onLoad",...cc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),Md(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...cc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),Md(()=>{if(c&&!u){const p=cc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),o$(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&u9(e)}},[u,c,e]),null}function V9(){const e=Zr(),t=e.routesById[$l].options.pendingComponent??e.options.defaultPendingComponent,n=t?E.jsx(t,{}):null,r=E.jsxs(typeof document<"u"&&e.ssr?ec:C.Suspense,{fallback:n,children:[E.jsx(G9,{}),E.jsx(q9,{})]});return e.options.InnerWrap?E.jsx(e.options.InnerWrap,{children:r}):r}function q9(){const e=Zr(),t=_r(e.stores.firstId,i=>i),n=_r(e.stores.loadedAt,i=>i),r=t?E.jsx(g$,{matchId:t}):null;return E.jsx(Ry.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:E.jsx(uS,{getResetKey:()=>n,errorComponent:cS,onCatch:void 0,children:r})})}var Y9=e=>({createMutableStore:uA,createReadonlyStore:uA,batch:o$}),W9=e=>new K9(e),K9=class extends e9{constructor(e){super(e,Y9)}};function X9({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=E.jsx(r$.Provider,{value:e,children:t});return e.options.Wrap?E.jsx(e.options.Wrap,{children:r}):r}function Q9({router:e,...t}){return E.jsx(X9,{router:e,...t,children:E.jsx(V9,{})})}function Z9(e){const t=Zr({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return _r(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=sa(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function y$(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=y$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function U0(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=y$(e))&&(r&&(r+=" "),r+=t);return r}const mA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,J9=e=>{const t=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var u,c;return typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u["cx:done"])<"u"?e==null?void 0:e.hooks["cx:done"](U0(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(U0(o)):U0(o)};return{compose:function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return u=>{const c=Object.fromEntries(Object.entries(u||{}).filter(f=>{let[h]=f;return!["class","className"].includes(h)}));return t(o.map(f=>f(c)),u==null?void 0:u.class,u==null?void 0:u.className)}},cva:i=>o=>{var a;if((i==null?void 0:i.variants)==null)return t(i==null?void 0:i.base,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:c}=i,f=Object.keys(u).map(m=>{const y=o==null?void 0:o[m],b=c==null?void 0:c[m],v=mA(y)||mA(b);return u[m][v]}),h={...c,...o&&Object.entries(o).reduce((m,y)=>{let[b,v]=y;return typeof v>"u"?m:{...m,[b]:v}},{})},p=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((m,y)=>{let{class:b,className:v,...S}=y;return Object.entries(S).every(x=>{let[_,k]=x;const T=h[_];return Array.isArray(k)?k.includes(T):T===k})?[...m,b,v]:m},[]);return t(i==null?void 0:i.base,f,p,o==null?void 0:o.class,o==null?void 0:o.className)},cx:t}},eU=(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},tU=(e,t)=>({classGroupId:e,validator:t}),b$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ag="-",gA=[],nU="arbitrary..",rU=e=>{const t=oU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return iU(a);const u=a.split(Ag),c=u[0]===""&&u.length>1?1:0;return v$(u,c,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?eU(f,c):c:f||gA}return n[a]||gA}}},v$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=v$(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(Ag):e.slice(t).join(Ag),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},iU=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?nU+r:void 0})(),oU=e=>{const{theme:t,classGroups:n}=e;return sU(n,t)},sU=(e,t)=>{const n=b$();for(const r in e){const i=e[r];dS(i,n,r,t)}return n},dS=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];aU(a,t,n,r)}},aU=(e,t,n,r)=>{if(typeof e=="string"){lU(e,t,n);return}if(typeof e=="function"){uU(e,t,n,r);return}cU(e,t,n,r)},lU=(e,t,n)=>{const r=e===""?t:x$(t,e);r.classGroupId=n},uU=(e,t,n,r)=>{if(fU(e)){dS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(tU(n,e))},cU=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];dS(c,x$(t,u),n,r)}},x$=(e,t)=>{let n=e;const r=t.split(Ag),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=b$(),n.nextPart.set(a,u)),n=u}return n},fU=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,dU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},E1="!",yA=":",hU=[],bA=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,u=0,c=0,f;const h=i.length;for(let v=0;v<h;v++){const S=i[v];if(a===0&&u===0){if(S===yA){o.push(i.slice(c,v)),c=v+1;continue}if(S==="/"){f=v;continue}}S==="["?a++:S==="]"?a--:S==="("?u++:S===")"&&u--}const p=o.length===0?i:i.slice(c);let m=p,y=!1;p.endsWith(E1)?(m=p.slice(0,-1),y=!0):p.startsWith(E1)&&(m=p.slice(1),y=!0);const b=f&&f>c?f-c:void 0;return bA(o,y,m,b)};if(t){const i=t+yA,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):bA(hU,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},mU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],u=a[0]==="[",c=t.has(a);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},gU=e=>({cache:dU(e.cacheSize),parseClassName:pU(e),sortModifiers:mU(e),...rU(e)}),yU=/\s+/,bU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],u=e.trim().split(yU);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:m,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:v}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let S=!!v,x=r(S?b.substring(0,v):b);if(!x){if(!S){c=h+(c.length>0?" "+c:c);continue}if(x=r(b),!x){c=h+(c.length>0?" "+c:c);continue}S=!1}const _=m.length===0?"":m.length===1?m[0]:o(m).join(":"),k=y?_+E1:_,T=k+x;if(a.indexOf(T)>-1)continue;a.push(T);const A=i(x,S);for(let D=0;D<A.length;++D){const O=A[D];a.push(k+O)}c=h+(c.length>0?" "+c:c)}return c},vU=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=w$(n))&&(i&&(i+=" "),i+=r);return i},w$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=w$(e[r]))&&(n&&(n+=" "),n+=t);return n},xU=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=gU(f),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=bU(c,n);return i(c,h),h};return o=a,(...c)=>o(vU(...c))},wU=[],kn=e=>{const t=n=>n[e]||wU;return t.isThemeGetter=!0,t},S$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,C$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,SU=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,CU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EU=/\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$/,kU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,RU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_U=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=e=>SU.test(e),dt=e=>!!e&&!Number.isNaN(Number(e)),Is=e=>!!e&&Number.isInteger(Number(e)),H0=e=>e.endsWith("%")&&dt(e.slice(0,-1)),Mo=e=>CU.test(e),E$=()=>!0,TU=e=>EU.test(e)&&!kU.test(e),hS=()=>!1,AU=e=>RU.test(e),DU=e=>_U.test(e),MU=e=>!Ue(e)&&!Ge(e),OU=e=>_a(e,_$,hS),Ue=e=>S$.test(e),al=e=>_a(e,T$,TU),vA=e=>_a(e,zU,dt),$U=e=>_a(e,D$,E$),PU=e=>_a(e,A$,hS),xA=e=>_a(e,k$,hS),NU=e=>_a(e,R$,DU),hm=e=>_a(e,M$,AU),Ge=e=>C$.test(e),xd=e=>Zl(e,T$),IU=e=>Zl(e,A$),wA=e=>Zl(e,k$),LU=e=>Zl(e,_$),jU=e=>Zl(e,R$),pm=e=>Zl(e,M$,!0),FU=e=>Zl(e,D$,!0),_a=(e,t,n)=>{const r=S$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zl=(e,t,n=!1)=>{const r=C$.exec(e);return r?r[1]?t(r[1]):n:!1},k$=e=>e==="position"||e==="percentage",R$=e=>e==="image"||e==="url",_$=e=>e==="length"||e==="size"||e==="bg-size",T$=e=>e==="length",zU=e=>e==="number",A$=e=>e==="family-name",D$=e=>e==="number"||e==="weight",M$=e=>e==="shadow",BU=()=>{const e=kn("color"),t=kn("font"),n=kn("text"),r=kn("font-weight"),i=kn("tracking"),o=kn("leading"),a=kn("breakpoint"),u=kn("container"),c=kn("spacing"),f=kn("radius"),h=kn("shadow"),p=kn("inset-shadow"),m=kn("text-shadow"),y=kn("drop-shadow"),b=kn("blur"),v=kn("perspective"),S=kn("aspect"),x=kn("ease"),_=kn("animate"),k=()=>["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"],A=()=>[...T(),Ge,Ue],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],$=()=>[Ge,Ue,c],B=()=>[Ns,"full","auto",...$()],L=()=>[Is,"none","subgrid",Ge,Ue],N=()=>["auto",{span:["full",Is,Ge,Ue]},Is,Ge,Ue],M=()=>[Is,"auto",Ge,Ue],z=()=>["auto","min","max","fr",Ge,Ue],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...$()],U=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],q=()=>[Ns,"screen","full","dvw","lvw","svw","min","max","fit",...$()],W=()=>[Ns,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],I=()=>[e,Ge,Ue],Y=()=>[...T(),wA,xA,{position:[Ge,Ue]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",LU,OU,{size:[Ge,Ue]}],ie=()=>[H0,xd,al],re=()=>["","none","full",f,Ge,Ue],he=()=>["",dt,xd,al],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[dt,H0,wA,xA],Ie=()=>["","none",b,Ge,Ue],We=()=>["none",dt,Ge,Ue],X=()=>["none",dt,Ge,Ue],Z=()=>[dt,Ge,Ue],ne=()=>[Ns,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mo],breakpoint:[Mo],color:[E$],container:[Mo],"drop-shadow":[Mo],ease:["in","out","in-out"],font:[MU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mo],shadow:[Mo],spacing:["px",dt],text:[Mo],"text-shadow":[Mo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,Ue,Ge,S]}],container:["container"],columns:[{columns:[dt,Ue,Ge,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Is,"auto",Ge,Ue]}],basis:[{basis:[Ns,"full","auto",u,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,Ns,"auto","initial","none",Ue]}],grow:[{grow:["",dt,Ge,Ue]}],shrink:[{shrink:["",dt,Ge,Ue]}],order:[{order:[Is,"first","last","none",Ge,Ue]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[u,"screen",...U()]}],"min-w":[{"min-w":[u,"screen","none",...U()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,xd,al]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,FU,$U]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",H0,Ue]}],"font-family":[{font:[IU,PU,t]}],"font-features":[{"font-features":[Ue]}],"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,Ge,Ue]}],"line-clamp":[{"line-clamp":[dt,"none",Ge,vA]}],leading:[{leading:[o,...$()]}],"list-image":[{"list-image":["none",Ge,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",Ge,al]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[dt,"auto",Ge,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ge,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Is,Ge,Ue],radial:["",Ge,Ue],conic:[Is,Ge,Ue]},jU,NU]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,Ge,Ue]}],"outline-w":[{outline:["",dt,xd,al]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",h,pm,hm]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",p,pm,hm]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[dt,al]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",m,pm,hm]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[dt,Ge,Ue]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"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":[dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ge,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":[dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Ue]}],filter:[{filter:["","none",Ge,Ue]}],blur:[{blur:Ie()}],brightness:[{brightness:[dt,Ge,Ue]}],contrast:[{contrast:[dt,Ge,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,pm,hm]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",dt,Ge,Ue]}],"hue-rotate":[{"hue-rotate":[dt,Ge,Ue]}],invert:[{invert:["",dt,Ge,Ue]}],saturate:[{saturate:[dt,Ge,Ue]}],sepia:[{sepia:["",dt,Ge,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Ue]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[dt,Ge,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[dt,Ge,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,Ge,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,Ge,Ue]}],"backdrop-invert":[{"backdrop-invert":["",dt,Ge,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[dt,Ge,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[dt,Ge,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,Ge,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",Ge,Ue]}],ease:[{ease:["linear","initial",x,Ge,Ue]}],delay:[{delay:[dt,Ge,Ue]}],animate:[{animate:["none",_,Ge,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ge,Ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:We()}],"rotate-x":[{"rotate-x":We()}],"rotate-y":[{"rotate-y":We()}],"rotate-z":[{"rotate-z":We()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Ge,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ge,Ue]}],"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":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ge,Ue]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[dt,xd,al,vA]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},UU=xU(BU),O$=J9({hooks:{onComplete:e=>UU(e)}}),Dn=O$.cva;function ze(...e){const t=O$.cx(...e);return t.trim()?t:void 0}const $$=({render:e,children:t,props:n,fallbackElement:r="div"})=>C.isValidElement(e)?C.cloneElement(e,{...n,children:t??e.props.children,className:ze(e.props.className,n.className),style:{...e.props.style,...n.style}}):C.createElement(r,n,t);function SA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function HU(...e){return t=>{let n=!1;const r=e.map(i=>{const o=SA(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():SA(e[i],null)}}}}function GU(...e){return C.useCallback(t=>HU(...e)(t),e)}const VU=["evenly","fullwidth","fullheight","fullscreen"],qU=["ax","ay","direction"],YU={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},WU={property:"alignItems",values:["baseline","center","end","start","stretch"]},KU={property:"flexDirection",values:["column","row"]},XU=["b","bx","bl","br","by","bt","bb"],QU={property:"borderWidth"},ZU={property:"borderInlineWidth"},JU={property:"borderInlineStartWidth"},e7={property:"borderInlineEndWidth"},t7={property:"borderBlockWidth"},n7={property:"borderBlockStartWidth"},r7={property:"borderBlockEndWidth"},i7=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],o7={property:"gap",unit:{variable:"--spacing-unit"}},s7={property:"margin",unit:{variable:"--spacing-unit"}},a7={property:"marginInline",unit:{variable:"--spacing-inline"}},l7={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},u7={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},c7={property:"marginBlock",unit:{variable:"--spacing-block"}},f7={property:"marginBlockStart",unit:{variable:"--spacing-block"}},d7={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},h7={property:"padding",unit:{variable:"--spacing-unit"}},p7={property:"paddingInline",unit:{variable:"--spacing-inline"}},m7={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},g7={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},y7={property:"paddingBlock",unit:{variable:"--spacing-block"}},b7={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},v7={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},x7=["w","minw","maxw","h","minh","maxh"],w7={property:"width"},S7={property:"minWidth"},C7={property:"maxWidth"},E7={property:"height"},k7={property:"minHeight"},R7={property:"maxHeight"},P$={b:QU,bx:ZU,bl:JU,br:e7,by:t7,bt:n7,bb:r7,ax:YU,ay:WU,direction:KU,gap:o7,m:s7,mx:a7,ml:l7,mr:u7,my:c7,mt:f7,mb:d7,p:h7,px:p7,pl:m7,pr:g7,py:y7,pt:b7,pb:v7,w:w7,minw:S7,maxw:C7,h:E7,minh:k7,maxh:R7},_7=Object.keys(P$);({...Object.fromEntries(i7.map(e=>[e,"spacing"])),...Object.fromEntries(qU.map(e=>[e,"layout"])),...Object.fromEntries(x7.map(e=>[e,"sizing"])),...Object.fromEntries(XU.map(e=>[e,"border"])),...Object.fromEntries(VU.map(e=>[e,"toggle"]))});function N$({componentName:e,props:t,styleProps:n=[]}){const r={"data-slot":e},i={},o={};for(const[u,c]of Object.entries(t))if(n.includes(u)&&c!==void 0){const f=P$[u];if(f&&c!=null)if("unit"in f&&f.unit&&typeof c=="number"){const h="suffix"in f.unit&&f.unit.suffix||"",p=`calc(${c} * var(${f.unit.variable}))${h}`;o[f.property]=p}else typeof c=="number"?o[f.property]=`${c}px`:o[f.property]=c}else i[u]=c;const a=Object.keys(o).length>0?{...o,...i.style||{}}:i.style;return{...r,...i,...a&&{style:a}}}const T7="_box_1f7bt_1",zs={box:T7,"toggle-evenly":"_toggle-evenly_1f7bt_8","toggle-fullheight":"_toggle-fullheight_1f7bt_15","toggle-fullwidth":"_toggle-fullwidth_1f7bt_20","toggle-fullscreen":"_toggle-fullscreen_1f7bt_26","toggle-rounded":"_toggle-rounded_1f7bt_31","toggle-square":"_toggle-square_1f7bt_35","toggle-bordered":"_toggle-bordered_1f7bt_39"},A7=Dn({variants:{bordered:{true:zs["toggle-bordered"]},evenly:{true:zs["toggle-evenly"]},rounded:{true:zs["toggle-rounded"]},square:{true:zs["toggle-square"]},fullheight:{true:zs["toggle-fullheight"]},fullwidth:{true:zs["toggle-fullwidth"]},fullscreen:{true:zs["toggle-fullscreen"]}}}),Ko=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:u,className:c,children:f,...h})=>{const p=N$({componentName:"box",styleProps:_7,props:h});return $$({fallbackElement:"div",props:{...p,className:ze(zs.box,A7({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:u,children:f})};Ko.displayName="Box";function er({condition:e,render:t,children:n}){if(!e||!t)return E.jsx(E.Fragment,{children:n});const r=n??t.props.children;return C.cloneElement(t,void 0,r)}er.displayName="ConditionalRender";const D7="_group_h0evt_1",M7={group:D7},Ze=({className:e,...t})=>E.jsx(Ko,{"data-slot":"group",className:ze(M7.group,e),...t});Ze.displayName="Group";const O7="_layer_1akt0_1",$7={layer:O7},pS=({offset:e,className:t,style:n,children:r,...i})=>{const o=C.Children.count(r),a={...n,...e&&{paddingInlineEnd:e.x?e.x*(o-1):void 0,paddingBlockEnd:e.y?e.y*(o-1):void 0}},u=e?C.Children.map(r,(c,f)=>{if(!C.isValidElement(c))return c;const h=e.x?e.x*f:0,p=e.y?e.y*f:0;return E.jsx("div",{style:{transform:`translate(${h}px, ${p}px)`},children:c})}):r;return E.jsx(Ko,{"data-slot":"layer",className:ze($7.layer,t),style:a,...i,children:u})};pS.displayName="Layer";const P7="_text_vscxe_3",N7="_colored_vscxe_112",Ct={text:P7,"text-size--1":"_text-size--1_vscxe_17","text-size-0":"_text-size-0_vscxe_22","text-size-1":"_text-size-1_vscxe_27","text-size-2":"_text-size-2_vscxe_32","text-size-3":"_text-size-3_vscxe_37","text-size-4":"_text-size-4_vscxe_42","text-size-5":"_text-size-5_vscxe_47","text-size-6":"_text-size-6_vscxe_52","shade-background":"_shade-background_vscxe_58","shade-surface":"_shade-surface_vscxe_61","shade-accent":"_shade-accent_vscxe_64","shade-halftone":"_shade-halftone_vscxe_67","shade-muted":"_shade-muted_vscxe_70","shade-foreground":"_shade-foreground_vscxe_73","color-red":"_color-red_vscxe_78","color-orange":"_color-orange_vscxe_82","color-yellow":"_color-yellow_vscxe_86","color-green":"_color-green_vscxe_90","color-blue":"_color-blue_vscxe_94","color-indigo":"_color-indigo_vscxe_98","color-purple":"_color-purple_vscxe_102","color-neutral":"_color-neutral_vscxe_106",colored:N7,"toggle-underline":"_toggle-underline_vscxe_127","toggle-no-underline":"_toggle-no-underline_vscxe_131","toggle-strikethrough":"_toggle-strikethrough_vscxe_135","toggle-balance":"_toggle-balance_vscxe_139","family-mono":"_family-mono_vscxe_143","family-serif":"_family-serif_vscxe_147","family-sans":"_family-sans_vscxe_151","weight-bold":"_weight-bold_vscxe_155","weight-normal":"_weight-normal_vscxe_158","weight-light":"_weight-light_vscxe_161","weight-thin":"_weight-thin_vscxe_164"},mS={red:Ct["color-red"],orange:Ct["color-orange"],yellow:Ct["color-yellow"],green:Ct["color-green"],blue:Ct["color-blue"],indigo:Ct["color-indigo"],purple:Ct["color-purple"],neutral:Ct["color-neutral"]},I7=Ct.colored,L7=Object.fromEntries(Object.entries(mS).map(([e,t])=>[e,`${t} ${I7}`])),j7=Dn({variants:{strikethrough:{true:Ct["toggle-strikethrough"]},balance:{true:Ct["toggle-balance"]},mono:{true:Ct["toggle-mono"]},underline:{true:Ct["toggle-underline"],false:Ct["toggle-no-underline"]},family:{mono:Ct["family-mono"],serif:Ct["family-serif"],sans:Ct["family-sans"]},weight:{bold:Ct["weight-bold"],normal:Ct["weight-normal"],light:Ct["weight-light"],thin:Ct["weight-thin"]},shade:{background:Ct["shade-background"],surface:Ct["shade-surface"],accent:Ct["shade-accent"],halftone:Ct["shade-halftone"],muted:Ct["shade-muted"],foreground:Ct["shade-foreground"]},color:L7,size:{[-1]:Ct["text-size--1"],0:Ct["text-size-0"],1:Ct["text-size-1"],2:Ct["text-size-2"],3:Ct["text-size-3"],4:Ct["text-size-4"],5:Ct["text-size-5"],6:Ct["text-size-6"]}}}),F7=0,z7="sans",Fe=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,size:a=F7,family:u=z7,render:c,className:f,children:h,...p})=>{const m=N$({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:p});return $$({fallbackElement:"span",props:{...m,className:ze(Ct.text,j7({shade:e,color:t,size:a,weight:n,family:u,balance:o,underline:r,strikethrough:i}),f)},render:c,children:h})},B7="_stack_1svur_1",U7={stack:B7},Ye=({ax:e,ay:t,className:n,...r})=>E.jsx(Ko,{"data-slot":"stack",ax:t,ay:e,className:ze(U7.stack,n),...r});Ye.displayName="Stack";const nf=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return E.jsx(E.Fragment,{children:n});const o=n??i.props.children;return C.cloneElement(i,r,o)};nf.displayName="SwitchRender";const H7="_separator_1u3u3_1",G7="_line_1u3u3_34",hi={separator:H7,"shade-background":"_shade-background_1u3u3_5","shade-surface":"_shade-surface_1u3u3_8","shade-accent":"_shade-accent_1u3u3_11","shade-halftone":"_shade-halftone_1u3u3_14","shade-muted":"_shade-muted_1u3u3_17","shade-foreground":"_shade-foreground_1u3u3_20","orientation-horizontal":"_orientation-horizontal_1u3u3_24","orientation-vertical":"_orientation-vertical_1u3u3_28",line:G7,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},CA=Dn({variants:{orientation:{horizontal:hi["orientation-horizontal"],vertical:hi["orientation-vertical"]},shade:{background:hi["shade-background"],surface:hi["shade-surface"],accent:hi["shade-accent"],halftone:hi["shade-halftone"],muted:hi["shade-muted"],foreground:hi["shade-foreground"]}}}),EA={};function I$(e,t){const n=C.useRef(EA);return n.current===EA&&(n.current=e(t)),n}function kA(e,t,n,r){const i=I$(L$).current;return q7(i,e,t,n,r)&&j$(i,[e,t,n,r]),i.callback}function V7(e){const t=I$(L$).current;return Y7(t,e)&&j$(t,e),t.callback}function L$(){return{callback:null,cleanup:null,refs:[]}}function q7(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Y7(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function j$(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const W7=parseInt(C.version,10);function K7(e){return W7>=e}function RA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(K7(19)?n==null?void 0:n.ref:t.ref)??null}function k1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function X7(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Q7(e,t){return typeof e=="function"?e(t):e}function Z7(e,t){return typeof e=="function"?e(t):e}const tc=Object.freeze({}),$d={};function J7(e,t,n,r,i){let o={...R1(e,$d)};return t&&(o=F$(o,t)),o}function eH(e){if(e.length===0)return $d;if(e.length===1)return R1(e[0],$d);let t={...R1(e[0],$d)};for(let n=1;n<e.length;n+=1)t=F$(t,e[n]);return t}function F$(e,t){return z$(t)?t(e):tH(e,t)}function tH(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=k1(e.style,r);break}case"className":{e[n]=B$(e.className,r);break}default:nH(n,r)?e[n]=rH(e[n],r):e[n]=r}}return e}function nH(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 z$(e){return typeof e=="function"}function R1(e,t){return z$(e)?e(t):e??$d}function rH(e,t){return t?e?n=>{if(oH(n)){const i=n;iH(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function iH(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function B$(e,t){return t?e?t+" "+e:t:e}function oH(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function sH(e,t,n={}){const r=t.render,i=aH(t,n);if(n.enabled===!1)return null;const o=n.state??tc;return uH(e,r,i,o)}function aH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=tc,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Q7(n,o):void 0,p=f?Z7(r,o):void 0,m=f?X7(o,c):tc,y=f?k1(m,Array.isArray(u)?eH(u):u)??tc:tc;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=V7([y.ref,RA(i),...a]):y.ref=kA(y.ref,RA(i),a):kA(null,null)),f?(h!==void 0&&(y.className=B$(y.className,h)),p!==void 0&&(y.style=k1(y.style,p)),y):tc}const lH=Symbol.for("react.lazy");function uH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=J7(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===lH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}return cH(e,n)}function cH(e,t){return C.createElement(e,t)}const fH=C.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return sH("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),U$=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=ze(hi.separator,hi.line,hi[`line-${t}`],CA({shade:e}));return E.jsxs(nf,{condition:t==="horizontal",render:{true:E.jsx(Ze,{ay:"center",gap:2,fullwidth:!0}),false:E.jsx(Ye,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[E.jsx(Ko,{className:a}),E.jsx(er,{condition:typeof r=="string",render:E.jsx(Fe,{shade:"muted",weight:"bold"}),children:r}),E.jsx(Ko,{className:a})]})}return E.jsx(fH,{"data-slot":"separator",render:i??E.jsx(Ko,{}),className:ze(hi.separator,CA({shade:e,orientation:t}),n),"data-orientation":t,...o})};U$.displayName="Separator";const dH="_button_1m9vv_3",hH="_fullwidth_1m9vv_141",xr={button:dH,"button-content-container":"_button-content-container_1m9vv_49","button-spinner":"_button-spinner_1m9vv_61","variant-subtle":"_variant-subtle_1m9vv_75","variant-ghost":"_variant-ghost_1m9vv_84","variant-inverted":"_variant-inverted_1m9vv_94","size-xsmall":"_size-xsmall_1m9vv_104","size-small":"_size-small_1m9vv_110","size-medium":"_size-medium_1m9vv_115","size-large":"_size-large_1m9vv_120","shape-pill":"_shape-pill_1m9vv_126","shape-square":"_shape-square_1m9vv_130","shape-circle":"_shape-circle_1m9vv_135",fullwidth:hH},pH="medium",mH=Dn({variants:{shape:{pill:xr["shape-pill"],square:xr["shape-square"],circle:xr["shape-circle"]},fullwidth:{true:xr.fullwidth},variant:{subtle:xr["variant-subtle"],ghost:xr["variant-ghost"],inverted:xr["variant-inverted"]},size:{xsmall:xr["size-xsmall"],small:xr["size-small"],medium:xr["size-medium"],large:xr["size-large"]}},defaultVariants:{size:pH}}),H$=({loading:e,children:t,...n})=>E.jsx(Ze,{"data-slot":"button-content-container",className:xr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});H$.displayName="ButtonContentContainer";function gH(){return typeof window<"u"}function yH(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bH(e){return gH()?e instanceof HTMLElement||e instanceof yH(e).HTMLElement:!1}const _A={};function gS(e,t){const n=C.useRef(_A);return n.current===_A&&(n.current=e(t)),n}const G0=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],vH=G0&&G0!==C.useLayoutEffect?G0:e=>e();function _1(e){const t=gS(xH).current;return t.next=e,vH(t.effect),t.trampoline}function xH(){const e={next:void 0,callback:wH,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function wH(){}const SH={...as},CH=()=>{},T1=typeof document<"u"?C.useLayoutEffect:CH;function yS(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const EH=C.createContext(void 0);function G$(e=!1){const t=C.useContext(EH);if(t===void 0&&!e)throw new Error(yS(16));return t}function kH(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function A1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Pd={};function V$(e,t,n,r,i){let o={...D1(e,Pd)};return t&&(o=rg(o,t)),n&&(o=rg(o,n)),r&&(o=rg(o,r)),o}function RH(e){if(e.length===0)return Pd;if(e.length===1)return D1(e[0],Pd);let t={...D1(e[0],Pd)};for(let n=1;n<e.length;n+=1)t=rg(t,e[n]);return t}function rg(e,t){return q$(t)?t(e):_H(e,t)}function _H(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=A1(e.style,r);break}case"className":{e[n]=Y$(e.className,r);break}default:TH(n,r)?e[n]=AH(e[n],r):e[n]=r}}return e}function TH(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 q$(e){return typeof e=="function"}function D1(e,t){return q$(e)?e(t):e??Pd}function AH(e,t){return t?e?n=>{if(DH(n)){const i=n;M1(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function M1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Y$(e,t){return t?e?t+" "+e:t:e}function DH(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function W$(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=G$(!0)!==void 0,u=_1(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=kH({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;MH(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);T1(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return V$({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(M1(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(M1(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=_1(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function MH(e){return bH(e)&&e.tagName==="BUTTON"}function O1(e,t,n,r){const i=gS(K$).current;return $H(i,e,t,n,r)&&X$(i,[e,t,n,r]),i.callback}function OH(e){const t=gS(K$).current;return PH(t,e)&&X$(t,e),t.callback}function K$(){return{callback:null,cleanup:null,refs:[]}}function $H(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function PH(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function X$(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const NH=parseInt(C.version,10);function IH(e){return NH>=e}function TA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(IH(19)?n==null?void 0:n.ref:t.ref)??null}function LH(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function jH(e,t){return typeof e=="function"?e(t):e}function FH(e,t){return typeof e=="function"?e(t):e}const AA=Object.freeze([]),Vs=Object.freeze({});function bS(e,t,n={}){const r=t.render,i=zH(t,n);if(n.enabled===!1)return null;const o=n.state??Vs;return UH(e,r,i,o)}function zH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Vs,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?jH(n,o):void 0,p=f?FH(r,o):void 0,m=f?LH(o,c):Vs,y=f?A1(m,Array.isArray(u)?RH(u):u)??Vs:Vs;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=OH([y.ref,TA(i),...a]):y.ref=O1(y.ref,TA(i),a):O1(null,null)),f?(h!==void 0&&(y.className=Y$(y.className,h)),p!==void 0&&(y.style=A1(y.style,p)),y):Vs}const BH=Symbol.for("react.lazy");function UH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=V$(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===BH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return HH(e,n);throw new Error(yS(8))}function HH(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const GH=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...u}=e,{getButtonProps:c,buttonRef:f}=W$({disabled:i,focusableWhenDisabled:o,native:a});return bS("button",e,{state:{disabled:i},ref:[t,f],props:[u,c]})});/**
|
|
67
|
+
* @license lucide-react v0.564.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Q$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
72
|
+
* @license lucide-react v0.564.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const VH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
77
|
+
* @license lucide-react v0.564.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const qH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
82
|
+
* @license lucide-react v0.564.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const DA=e=>{const t=qH(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
87
|
+
* @license lucide-react v0.564.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/var YH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
92
|
+
* @license lucide-react v0.564.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const WH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
97
|
+
* @license lucide-react v0.564.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const KH=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},c)=>C.createElement("svg",{ref:c,...YH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Q$("lucide",i),...!o&&!WH(u)&&{"aria-hidden":"true"},...u},[...a.map(([f,h])=>C.createElement(f,h)),...Array.isArray(o)?o:[o]]));/**
|
|
102
|
+
* @license lucide-react v0.564.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const pt=(e,t)=>{const n=C.forwardRef(({className:r,...i},o)=>C.createElement(KH,{ref:o,iconNode:t,className:Q$(`lucide-${VH(DA(e))}`,`lucide-${e}`,r),...i}));return n.displayName=DA(e),n};/**
|
|
107
|
+
* @license lucide-react v0.564.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const XH=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],QH=pt("archive-restore",XH);/**
|
|
112
|
+
* @license lucide-react v0.564.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const ZH=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],JH=pt("archive",ZH);/**
|
|
117
|
+
* @license lucide-react v0.564.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const eG=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],tG=pt("arrow-left-right",eG);/**
|
|
122
|
+
* @license lucide-react v0.564.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const nG=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],rG=pt("case-sensitive",nG);/**
|
|
127
|
+
* @license lucide-react v0.564.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const iG=[["path",{d:"M10 6h8",key:"zvc2xc"}],["path",{d:"M12 16h6",key:"yi5mkt"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 11h7",key:"wz2hg0"}]],oG=pt("chart-gantt",iG);/**
|
|
132
|
+
* @license lucide-react v0.564.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const sG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kh=pt("check",sG);/**
|
|
137
|
+
* @license lucide-react v0.564.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const aG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Z$=pt("chevron-right",aG);/**
|
|
142
|
+
* @license lucide-react v0.564.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const lG=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],J$=pt("chevrons-down-up",lG);/**
|
|
147
|
+
* @license lucide-react v0.564.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const uG=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],_y=pt("chevrons-up-down",uG);/**
|
|
152
|
+
* @license lucide-react v0.564.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const cG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],eP=pt("clock",cG);/**
|
|
157
|
+
* @license lucide-react v0.564.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const fG=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Rh=pt("copy",fG);/**
|
|
162
|
+
* @license lucide-react v0.564.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const dG=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],hG=pt("cpu",dG);/**
|
|
167
|
+
* @license lucide-react v0.564.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const pG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],tP=pt("ellipsis-vertical",pG);/**
|
|
172
|
+
* @license lucide-react v0.564.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const mG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],gG=pt("ellipsis",mG);/**
|
|
177
|
+
* @license lucide-react v0.564.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const yG=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],bG=pt("external-link",yG);/**
|
|
182
|
+
* @license lucide-react v0.564.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const vG=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xG=pt("eye-off",vG);/**
|
|
187
|
+
* @license lucide-react v0.564.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const wG=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],SG=pt("eye",wG);/**
|
|
192
|
+
* @license lucide-react v0.564.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const CG=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],nP=pt("file-diff",CG);/**
|
|
197
|
+
* @license lucide-react v0.564.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const EG=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],rP=pt("files",EG);/**
|
|
202
|
+
* @license lucide-react v0.564.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const kG=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],RG=pt("folder-open",kG);/**
|
|
207
|
+
* @license lucide-react v0.564.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const _G=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],TG=pt("gauge",_G);/**
|
|
212
|
+
* @license lucide-react v0.564.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const AG=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],DG=pt("git-pull-request",AG);/**
|
|
217
|
+
* @license lucide-react v0.564.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const MG=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],OG=pt("grip-vertical",MG);/**
|
|
222
|
+
* @license lucide-react v0.564.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const $G=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],PG=pt("group",$G);/**
|
|
227
|
+
* @license lucide-react v0.564.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const NG=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],IG=pt("handshake",NG);/**
|
|
232
|
+
* @license lucide-react v0.564.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const LG=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],jG=pt("hourglass",LG);/**
|
|
237
|
+
* @license lucide-react v0.564.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const FG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M8 11h.01",key:"1dfujw"}]],zG=pt("message-square-more",FG);/**
|
|
242
|
+
* @license lucide-react v0.564.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const BG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],UG=pt("message-square-text",BG);/**
|
|
247
|
+
* @license lucide-react v0.564.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const HG=[["path",{d:"M5 12h14",key:"1ays0h"}]],GG=pt("minus",HG);/**
|
|
252
|
+
* @license lucide-react v0.564.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const VG=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],qG=pt("monitor",VG);/**
|
|
257
|
+
* @license lucide-react v0.564.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const YG=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],WG=pt("moon",YG);/**
|
|
262
|
+
* @license lucide-react v0.564.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const KG=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],XG=pt("panel-right",KG);/**
|
|
267
|
+
* @license lucide-react v0.564.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const QG=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ZG=pt("search",QG);/**
|
|
272
|
+
* @license lucide-react v0.564.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const JG=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],eV=pt("shield-off",JG);/**
|
|
277
|
+
* @license lucide-react v0.564.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const tV=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],nV=pt("sun",tV);/**
|
|
282
|
+
* @license lucide-react v0.564.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const rV=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],iV=pt("tags",rV);/**
|
|
287
|
+
* @license lucide-react v0.564.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const oV=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],sV=pt("trash-2",oV);/**
|
|
292
|
+
* @license lucide-react v0.564.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const aV=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lV=pt("triangle-alert",aV);/**
|
|
297
|
+
* @license lucide-react v0.564.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const uV=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],cV=pt("wrench",uV),iP=({size:e=14,fill:t="currentColor",...n})=>E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[E.jsx("path",{d:"M12 1a11 11 0 1 0 11 11A11 11 0 0 0 12 1Zm0 19a8 8 0 1 1 8-8 8 8 0 0 1-8 8Z",opacity:.25}),E.jsx("path",{d:"M10.72 19.9a8 8 0 0 1-6.5-9.79 7.77 7.77 0 0 1 6.18-5.95 8 8 0 0 1 9.49 6.52A1.54 1.54 0 0 0 21.38 12h.13a1.37 1.37 0 0 0 1.38-1.54 11 11 0 1 0-12.7 12.39A1.54 1.54 0 0 0 12 21.34a1.47 1.47 0 0 0-1.28-1.44Z",children:E.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});iP.displayName="LoadingSpinner";const oP=({loading:e,...t})=>E.jsx(iP,{"data-slot":"button-spinner",className:xr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});oP.displayName="ButtonSpinner";const sP=18,fV=2,dV=3,hV="_card_fipan_3",Qi={card:hV,"card-thumbnail":"_card-thumbnail_fipan_39","card-action":"_card-action_fipan_51","toggle-inverted":"_toggle-inverted_fipan_62","toggle-trimmed":"_toggle-trimmed_fipan_67","toggle-ghost":"_toggle-ghost_fipan_72","toggle-transparent":"_toggle-transparent_fipan_79","size-small":"_size-small_fipan_83","size-medium":"_size-medium_fipan_87","size-large":"_size-large_fipan_91"},pV=Dn({variants:{inverted:{true:Qi["toggle-inverted"]},trimmed:{true:Qi["toggle-trimmed"]},transparent:{true:Qi["toggle-transparent"]},ghost:{true:Qi["toggle-ghost"]},size:{small:Qi["size-small"],medium:Qi["size-medium"],large:Qi["size-large"]}}}),aP=({gap:e=dV,trimmed:t,transparent:n,ghost:r,inverted:i,size:o,className:a,children:u,...c})=>E.jsx(Ye,{"data-slot":"card-container",gap:e,className:ze(Qi.card,pV({trimmed:t,transparent:n,ghost:r,inverted:i,size:o}),a),...c,children:u});aP.displayName="CardContainer";const lP=({className:e,children:t,...n})=>E.jsx(Ye,{"data-slot":"card-thumbnail",className:ze(Qi["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});lP.displayName="CardThumbnail";const uP=({icon:e,render:t,className:n})=>E.jsx(er,{condition:!!t,render:t,children:e?E.jsx(e,{size:sP,strokeWidth:fV,className:n}):null});uP.displayName="CardIcon";const cP=({children:e,style:t,...n})=>E.jsx(Fe,{"data-slot":"card-title",render:E.jsx("h3",{}),style:{minHeight:`${sP}px`,alignContent:"center",...t},size:1,weight:"bold",...n,children:e});cP.displayName="CardTitle";const fP=({children:e,className:t,...n})=>E.jsx(Ze,{"data-slot":"card-action",className:ze(Qi["card-action"],t),gap:2,...n,children:e});fP.displayName="CardAction";const dP=({children:e,...t})=>E.jsx(Ze,{"data-slot":"card-header",ay:"center",gap:2,fullwidth:!0,...t,children:e});dP.displayName="CardHeader";const hP=({children:e,...t})=>E.jsx(Fe,{"data-slot":"card-description",render:E.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});hP.displayName="CardDescription";const pP=({children:e,...t})=>E.jsx(Ze,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e});pP.displayName="CardFooter";const zt=({title:e,description:t,thumbnail:n,icon:r,action:i,footer:o,size:a,ContainerProps:u,HeaderProps:c,TitleProps:f,DescriptionProps:h,IconProps:p,ActionProps:m,FooterProps:y,ThumbnailProps:b,children:v,...S})=>{const x=(h==null?void 0:h.children)||t,_=(f==null?void 0:f.children)||e,k=(m==null?void 0:m.children)||i,T=(p==null?void 0:p.icon)||r;return E.jsxs(aP,{size:a,...S,...u,children:[n&&E.jsx(lP,{mb:2,...b,children:n}),E.jsxs(er,{condition:!!(e||r||i),render:E.jsx(dP,{...c}),children:[T&&E.jsx(uP,{icon:T,...p}),_&&E.jsx(cP,{...f,children:_}),k&&E.jsx(fP,{...m,children:k})]}),x&&E.jsx(hP,{...h,children:x}),v,o&&E.jsx(pP,{mt:4,...y,children:o})]})};zt.displayName="Card";const MA={};function fr(e,t){const n=C.useRef(MA);return n.current===MA&&(n.current=e(t)),n}function vS(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const V0=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],mV=V0&&V0!==C.useLayoutEffect?V0:e=>e();function tt(e){const t=fr(gV).current;return t.next=e,mV(t.effect),t.trampoline}function gV(){const e={next:void 0,callback:yV,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function yV(){}function Ty(){return typeof window<"u"}function Ta(e){return xS(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lo(e){var t;return(t=(xS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xS(e){return Ty()?e instanceof Node||e instanceof fn(e).Node:!1}function Nt(e){return Ty()?e instanceof Element||e instanceof fn(e).Element:!1}function gn(e){return Ty()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function $1(e){return!Ty()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}const bV=new Set(["inline","contents"]);function Aa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!bV.has(i)}const vV=new Set(["table","td","th"]);function xV(e){return vV.has(Ta(e))}const wV=[":popover-open",":modal"];function Ay(e){return wV.some(t=>{try{return e.matches(t)}catch{return!1}})}const SV=["transform","translate","scale","rotate","perspective"],CV=["transform","translate","scale","rotate","perspective","filter"],EV=["paint","layout","strict","content"];function wS(e){const t=Dy(),n=Nt(e)?Qr(e):e;return SV.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)||CV.some(r=>(n.willChange||"").includes(r))||EV.some(r=>(n.contain||"").includes(r))}function kV(e){let t=ts(e);for(;gn(t)&&!Xo(t);){if(wS(t))return t;if(Ay(t))return null;t=ts(t)}return null}function Dy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const RV=new Set(["html","body","#document"]);function Xo(e){return RV.has(Ta(e))}function Qr(e){return fn(e).getComputedStyle(e)}function My(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(Ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$1(e)&&e.host||lo(e);return $1(t)?t.host:t}function mP(e){const t=ts(e);return Xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:gn(t)&&Aa(t)?t:mP(t)}function ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mP(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=fn(i);if(o){const u=P1(a);return t.concat(a,a.visualViewport||[],Aa(i)?i:[],u&&n?ha(u):[])}return t.concat(i,ha(i,[],n))}function P1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const rf=typeof navigator<"u",q0=TV(),gP=DV(),yP=AV(),bP=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),vP=q0.platform==="MacIntel"&&q0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(q0.platform),xP=rf&&/apple/i.test(navigator.vendor),N1=rf&&/android/i.test(gP)||/android/i.test(yP),_V=rf&&gP.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,wP=yP.includes("jsdom/");function TV(){if(!rf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function AV(){if(!rf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function DV(){if(!rf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}const MV=()=>{},gt=typeof document<"u"?C.useLayoutEffect:MV,OV=[];function _h(e){C.useEffect(e,OV)}const wd=0;let zi=class SP{constructor(){te(this,"currentId",wd);te(this,"clear",()=>{this.currentId!==wd&&(clearTimeout(this.currentId),this.currentId=wd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new SP}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=wd,n()},t)}isStarted(){return this.currentId!==wd}};function Ea(){const e=fr(zi.create).current;return _h(e.disposeEffect),e}const mm=null;let $V=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(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 gm=new $V;let Gs=class CP{constructor(){te(this,"currentId",mm);te(this,"cancel",()=>{this.currentId!==mm&&(gm.cancel(this.currentId),this.currentId=mm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new CP}static request(t){return gm.request(t)}static cancel(t){return gm.cancel(t)}request(t){this.cancel(),this.currentId=gm.request(()=>{this.currentId=mm,t()})}};function SS(){const e=fr(Gs.create).current;return _h(e.disposeEffect),e}function EP(){}const Cr=Object.freeze({});let OA={},$A={},PA="";function PV(e){if(typeof document>"u")return!1;const t=Mt(e);return fn(t).innerWidth-t.documentElement.clientWidth>0}function NV(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Mt(e),n=t.documentElement,r=t.body,i=Aa(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const u=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,u===c}function IV(e){const t=Mt(e),n=t.documentElement,r=t.body,i=Aa(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function LV(e){var m;const t=Mt(e),n=t.documentElement,r=t.body,i=fn(n);let o=0,a=0,u=!1;const c=Gs.create();if(bP&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),v=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,OA={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},PA=n.style.scrollBehavior,$A={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 S=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||b.overflowY==="scroll",k=y.overflowX==="scroll"||b.overflowX==="scroll",T=Math.max(0,i.innerWidth-r.clientWidth),A=Math.max(0,i.innerHeight-r.clientHeight),D=parseFloat(b.marginTop)+parseFloat(b.marginBottom),O=parseFloat(b.marginLeft)+parseFloat(b.marginRight),$=Aa(n)?n:r;if(u=NV(e),u){n.style.scrollbarGutter=v,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(S||_)&&(n.style.overflowY="scroll"),(x||k)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||A?`calc(100dvh - ${D+A}px)`:"100dvh",width:O||T?`calc(100vw - ${O+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,OA),Object.assign(r.style,$A),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=PA)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let jV=class{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",zi.create());te(this,"timeoutUnlock",zi.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Mt(t).documentElement,r=fn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=EP;return}const i=vP||!PV(t);this.restore=i?IV(t):LV(t)}};const FV=new jV;function kP(e=!0,t=null){gt(()=>{if(e)return FV.acquire(t)},[e,t])}function zV(e){const t=C.useRef(""),n=C.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:C.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function RP(e){const[t,n]=C.useState(null),r=tt((u,c)=>{e||n(c||(vP?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=zV(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function qt(e,t,n,r){let i=!1,o=!1;const a=Cr;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function BV(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),gt(()=>{if(!e&&o&&r!=="ending"&&n){const u=Gs.request(()=>{i("ending")});return()=>{Gs.cancel(u)}}},[e,o,r,n]),gt(()=>{if(!e||t)return;const u=Gs.request(()=>{i(void 0)});return()=>{Gs.cancel(u)}},[t,e]),gt(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Gs.request(()=>{i("idle")});return()=>{Gs.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Io(e){return e==null?e:"current"in e?e.current:e}let th=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const UV={[th.startingStyle]:""},HV={[th.endingStyle]:""},of={transitionStatus(e){return e==="starting"?UV:e==="ending"?HV:null}};function _P(e,t=!1,n=!0){const r=SS();return tt((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=Io(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=th.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function Th(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=tt(i),a=_P(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function GV(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function CS(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=GV(e,n),a=tt(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return gt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function ES(e){const t=e.useState("open");gt(()=>{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 kS(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=BV(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=tt(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Th({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const VV={...as};let NA=0;function qV(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(NA+=1,r(`${t}-${NA}`))},[n,t]),i}const IA=VV.useId;function Jl(e,t){if(IA!==void 0){const n=IA();return e??(t?`${t}-${n}`:n)}return qV(e,t)}function TP(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}let YV=class{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",TP())}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 AP=C.createContext(null),DP=C.createContext(null),eu=()=>{var e;return((e=C.useContext(AP))==null?void 0:e.id)||null},sf=e=>{const t=C.useContext(DP);return e??t};function WV(e){const t=Jl(),n=sf(e),r=eu();return gt(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function KV(e){const{children:t,id:n}=e,r=eu();return E.jsx(AP.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function XV(e){const{children:t,externalTree:n}=e,r=fr(()=>n??new YV).current;return E.jsx(DP.Provider,{value:r,children:t})}var Y0={exports:{}},W0={},LA;function QV(){if(LA)return W0;LA=1;var e=Ca;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,m){var y=m(),b=r({inst:{value:y,getSnapshot:m}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=m,c(v)&&S({inst:v})},[p,y,m]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return W0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,W0}var jA;function MP(){return jA||(jA=1,Y0.exports=QV()),Y0.exports}var OP=MP(),K0={exports:{}},X0={},FA;function ZV(){if(FA)return X0;FA=1;var e=Ca,t=MP();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return X0.useSyncExternalStoreWithSelector=function(f,h,p,m,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,k=D,D=m(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(k,D))return O;var $=m(D);return y!==void 0&&y(O,$)?(k=D,O):(k=D,T=$)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,m,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},X0}var zA;function JV(){return zA||(zA=1,K0.exports=ZV()),K0.exports}var eq=JV();const tq=parseInt(C.version,10);function RS(e){return tq>=e}const I1=[];let L1;function nq(){return L1}function rq(e){I1.push(e)}function $P(e){const t=(n,r)=>{const i=fr(oq).current;let o;try{L1=i;for(const a of I1)a.before(i);o=e(n,r);for(const a of I1)a.after(i);i.didInitialize=!0}finally{L1=void 0}return o};return t.displayName=e.displayName||e.name,t}function iq(e){return C.forwardRef($P(e))}function oq(){return{didInitialize:!1}}const sq=RS(19),aq=sq?uq:cq;function PP(e,t,n,r,i){return aq(e,t,n,r,i)}function lq(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return OP.useSyncExternalStore(e.subscribe,o,o)}rq({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),OP.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function uq(e,t,n,r,i){const o=nq();if(!o)return lq(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function cq(e,t,n,r,i){return eq.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let fq=class{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}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])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return PP(this,t,n,r,i)}},Ah=class extends fq{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),gt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;gt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);gt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;gt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),PP(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=tt(n??EP);this.context[t]=r}useStateSetter(t){const n=C.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(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}};function dq(e){e.preventDefault(),e.stopPropagation()}function hq(e){return"nativeEvent"in e}function pq(e){return e.pointerType===""&&e.isTrusted?!0:N1&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function mq(e){return wP?!1:!N1&&e.width===0&&e.height===0||N1&&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 zl(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function NP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function An(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}var Dg=Symbol("NOT_FOUND");function gq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function yq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function bq(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 BA=e=>Array.isArray(e)?e:[e];function vq(e){const t=Array.isArray(e[0])?e[0]:e;return bq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function xq(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function wq(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Dg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Sq(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return Dg}function i(u,c){r(u)===Dg&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var Cq=(e,t)=>e===t;function Eq(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function kq(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Cq,maxSize:i=1,resultEqualityCheck:o}=n,a=Eq(r);let u=0;const c=i<=1?wq(a):Sq(i,a);function f(){let h=c.get(arguments);if(h===Dg){if(h=e.apply(null,arguments),u++,o){const p=c.getEntries().find(m=>o(m.value,h));p&&(h=p.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var Rq=class{constructor(t){this.value=t}deref(){return this.value}},_q=typeof WeakRef<"u"?WeakRef:Rq,Tq=0,UA=1;function ym(){return{s:Tq,v:void 0,o:null,p:null}}function IP(e,t={}){let n=ym();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let m=0,y=c;m<y;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=ym(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=ym(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===UA)h=u.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new _q(h):h}return f.s=UA,f.v=h,h}return a.clearCache=()=>{n=ym(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function LP(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),gq(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:y=IP,argsMemoizeOptions:b=[]}=h,v=BA(m),S=BA(b),x=vq(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const T=xq(x,arguments);return u=_.apply(null,T),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var Aq=LP(IP),Dq=Object.assign((e,t=Aq)=>{yq(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(i=>e[i]);return t(r,(...i)=>i.reduce((o,a,u)=>(o[n[u]]=a,o),{}))},{withTypes:()=>Dq});const Mq=LP({memoize:kq,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Ke=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(An(1));let u;if(e&&t)u=(c,f,h,p)=>{const m=e(c,f,h,p);return t(m,f,h,p)};else if(e)u=e;else throw new Error("Missing arguments");return u},Oq=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=r.length-i;if(o>3)throw new Error(An(2));return(a,u,c,f)=>{let h=a.__cacheKey__;h||(h={id:n},a.__cacheKey__=h,n+=1);let p=t.get(h);if(!p){let m=e;const y=[void 0,void 0,void 0];switch(o){case 0:break;case 1:{m=[...e.slice(0,-1),()=>y[0],r];break}case 2:{m=[...e.slice(0,-1),()=>y[0],()=>y[1],r];break}case 3:{m=[...e.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],r];break}default:throw new Error(An(2))}p=Mq(...m),p.selectorArgs=y,t.set(h,p)}switch(p.selectorArgs[0]=u,p.selectorArgs[1]=c,p.selectorArgs[2]=f,o){case 0:return p(a);case 1:return p(a,u);case 2:return p(a,u,c);case 3:return p(a,u,c,f);default:throw new Error("unreachable")}}},$q={open:Ke(e=>e.open),domReferenceElement:Ke(e=>e.domReferenceElement),referenceElement:Ke(e=>e.positionReference??e.referenceElement),floatingElement:Ke(e=>e.floatingElement),floatingId:Ke(e=>e.floatingId)};let _S=class extends Ah{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:TP(),nested:r,noEmit:i,triggerElements:a},$q);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||NP(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}};function TS(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Jl(),a=eu()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=fr(()=>new _S({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return gt(()=>{const m={open:u,floatingId:o,referenceElement:c,floatingElement:f};Nt(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const j1="data-base-ui-focusable",jP="active",FP="selected",zP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Gr(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ct(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&$1(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Mg(e,t){if(!Nt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ct(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Di(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 Pq(e){return e.matches("html,body")}function Oy(e){return gn(e)&&e.matches(zP)}function HA(e){return e?e.getAttribute("role")==="combobox"&&Oy(e):!1}function Og(e){if(!e||wP)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function F1(e){return e?e.hasAttribute(j1)?e:e.querySelector(`[${j1}]`)||e:null}const Nq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function BP(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=Jl(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var x;return((x=F1(a))==null?void 0:x.id)||i},[a,i]),p=Nq.get(u)??u,m=eu()!=null,y=C.useMemo(()=>p==="tooltip"||u==="label"?Cr:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&m&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,m,u]),b=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...y,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,y]),v=C.useMemo(()=>{const x={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?x:{...x,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),S=C.useCallback(({active:x,selected:_})=>{const k={role:"option",...x&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...k,"aria-selected":_}}return{}},[h,u]);return C.useMemo(()=>({reference:b,floating:v,item:S,trigger:y}),[b,v,y,S])}function Lc(e){return`data-base-ui-${e}`}function Nl(e,t,n=!0){return e.filter(r=>{var i;return r.parentId===t&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...Nl(e,r.id,n)])}function GA(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}const AS="none",ka="trigger-press",Xn="trigger-hover",ig="trigger-focus",UP="outside-press",nh="focus-out",$y="escape-key",Iq="disabled",DS="imperative-action",Lq={intentional:"onClick",sloppy:"onPointerDown"};function jq(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function MS(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=sf(x),k=tt(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=jq(S),$=C.useRef(null),B=Ea(),L=Ea(),N=tt(()=>{L.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),z=C.useRef(""),G=tt(X=>{z.current=X.pointerType}),j=tt(()=>{const X=z.current,Z=X==="pen"||!X?"mouse":X,ne=typeof m=="function"?m():m;return typeof ne=="string"?ne:ne[Z]}),F=tt(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?Nl(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=hq(X)?X.nativeEvent:X,ge=qt($y,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=tt(X=>{const Z=j();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),q=tt(()=>{c.current.insideReactTree=!0,L.start(0,N)}),W=tt((X,Z=!1)=>{var Oe;if(U(X)){N();return}if(c.current.insideReactTree){N();return}if(j()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=Vn(X),xe=`[${Lc("inert")}]`,ge=Mt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>ct(Te,ne))))return;let le=Nt(ne)?ne:null;for(;le&&!Xo(le);){const Te=ts(le);if(Xo(Te)||!Nt(Te))break;le=Te}if(ge.length&&Nt(ne)&&!Pq(ne)&&!ct(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ct(le,Te)))return;if(gn(ne)&&!("touches"in X)){const Te=Xo(ne),_e=Qr(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Ut=ke&&X.offsetY>ne.clientHeight;if(st||Ut)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Nl(_.nodesRef.current,oe).some(Te=>{var _e;return Di(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||me)return;const ae=_?Nl(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,qt(UP,X)),N()}),I=tt(X=>{j()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||W(X)}),Y=tt(X=>{if(j()!=="sloppy"||!n.select("open")||!f||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=tt(X=>{const Z=Vn(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=tt(X=>{const Z=A.current;if(A.current=!1,B.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=Vn(X);function xe(){X.type==="pointerdown"?I(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=tt(X=>{if(j()!=="sloppy"||!$.current||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),B.clear(),$.current=null)}),re=tt(X=>{const Z=Vn(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=tt(X=>{j()!=="sloppy"||!$.current||Di(X,n.select("floatingElement"))||Di(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),B.clear(),$.current=null)}),ve=tt(X=>{const Z=Vn(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new zi;function Z(le){n.setOpen(!1,qt(AS,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(Dy()?5:0,()=>{M.current=!1})}const ge=Mt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(Nt(a)&&(Ce=ha(a)),Nt(i)&&(Ce=Ce.concat(ha(i))),!Nt(o)&&o&&o.contextElement&&(Ce=Ce.concat(ha(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,I,J,re,ve,G,n]),C.useEffect(N,[T,N]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[Lq[b]]:X=>{n.setOpen(!1,qt(ka,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,qt(ka,X.nativeEvent))}}}}),[F,n,y,b]),ce=tt(X=>{const Z=Vn(X.nativeEvent);!ct(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=tt(X=>{!r||!f||X.button!==0||(A.current=!0)}),We=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:q,onMouseDownCapture(X){q(),Ie(X)},onPointerDownCapture(X){q(),Ie(X)},onMouseUpCapture:q,onTouchEndCapture:q,onTouchMoveCapture:q}),[F,ce,q,Ie]);return C.useMemo(()=>f?{reference:Re,floating:We,trigger:Re}:{},[f,Re,We])}function Dh(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>bm(f,e,"reference"),t),a=C.useCallback(f=>bm(f,e,"floating"),n),u=C.useCallback(f=>bm(f,e,"item"),r),c=C.useCallback(f=>bm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function bm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[j1]="");for(const u in e)i&&e&&(u===jP||u===FP)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&VA(o,c,i,r)}return VA(o,e,i,r),o}function VA(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===jP||o===FP)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}function Fq(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),o=t.useState("disablePointerDismissal"),a=t.useState("modal"),u=t.useState("popupElement"),{openMethod:c,triggerProps:f,reset:h}=RP(i);ES(t);const{forceUnmount:p}=kS(i,t,()=>{h()}),m=tt(L=>{const N=qt(L);return N.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},N}),y=C.useCallback(()=>{t.setOpen(!1,m(DS))},[t,m]);C.useImperativeHandle(r,()=>({unmount:p,close:y}),[p,y]);const b=TS({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),x=v===0,_=BP(b),k=MS(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(L){if(!t.context.outsidePressEnabledRef.current||"button"in L&&L.button!==0||"touches"in L&&L.touches.length!==1)return!1;const N=Vn(L);if(x&&!o){const M=N;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||ct(M,u)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:x});kP(i&&a===!0,u);const{getReferenceProps:T,getFloatingProps:A,getTriggerProps:D}=Dh([_,k]);t.useContextCallback("onNestedDialogOpen",L=>{S(L+1)}),t.useContextCallback("onNestedDialogClose",()=>{S(0)}),C.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&i&&n.onNestedDialogOpen(v),n!=null&&n.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,v]);const O=C.useMemo(()=>T(f),[T,f]),$=C.useMemo(()=>D(f),[D,f]),B=C.useMemo(()=>A(),[A]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:$,popupProps:B,floatingRootContext:b,nestedOpenDialogCount:v})}const HP=C.createContext(void 0);function Mh(e){const t=C.useContext(HP);if(e===!1&&t===void 0)throw new Error(An(27));return t}let Oh=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function zq(){return new _S({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Oh,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function OS(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:zq(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Cr,inactiveTriggerProps:Cr,popupProps:Cr}}const vm=Ke(e=>e.triggerIdProp??e.activeTriggerId),$S={open:Ke(e=>e.openProp??e.open),mounted:Ke(e=>e.mounted),transitionStatus:Ke(e=>e.transitionStatus),floatingRootContext:Ke(e=>e.floatingRootContext),preventUnmountingOnClose:Ke(e=>e.preventUnmountingOnClose),payload:Ke(e=>e.payload),activeTriggerId:vm,activeTriggerElement:Ke(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Ke((e,t)=>t!==void 0&&vm(e)===t),isOpenedByTrigger:Ke((e,t)=>t!==void 0&&vm(e)===t&&e.open),isMountedByTrigger:Ke((e,t)=>t!==void 0&&vm(e)===t&&e.mounted),triggerProps:Ke((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Ke(e=>e.popupProps),popupElement:Ke(e=>e.popupElement),positionerElement:Ke(e=>e.positionerElement)},Bq={...$S,modal:Ke(e=>e.modal),nested:Ke(e=>e.nested),nestedOpenDialogCount:Ke(e=>e.nestedOpenDialogCount),disablePointerDismissal:Ke(e=>e.disablePointerDismissal),openMethod:Ke(e=>e.openMethod),descriptionElementId:Ke(e=>e.descriptionElementId),titleElementId:Ke(e=>e.titleElementId),viewportElement:Ke(e=>e.viewportElement),role:Ke(e=>e.role)};let Uq=class extends Ah{constructor(n){super(Hq(n),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Oh,onOpenChange:void 0,onOpenChangeComplete:void 0},Bq);te(this,"setOpen",(n,r)=>{var u,c,f,h;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(c=(u=this.context).onOpenChange)==null||c.call(u,n,r),r.isCanceled)return;const i={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};(f=this.state.floatingRootContext.context.events)==null||f.emit("openchange",i);const o={open:n},a=((h=r.trigger)==null?void 0:h.id)??null;(a||n)&&(o.activeTriggerId=a,o.activeTriggerElement=r.trigger??null),this.update(o)})}};function Hq(e={}){return{...OS(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function Gq(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,disablePointerDismissal:a=!1,modal:u=!0,actionsRef:c,handle:f,triggerId:h,defaultTriggerId:p=null}=e,m=Mh(!0),y=!!m,b=fr(()=>(f==null?void 0:f.store)??new Uq({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:u,disablePointerDismissal:a,nested:y})).current;vS(()=>{n===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:p})}),b.useControlledProp("openProp",n),b.useControlledProp("triggerIdProp",h),b.useSyncedValues({disablePointerDismissal:a,nested:y,modal:u}),b.useContextCallback("onOpenChange",i),b.useContextCallback("onOpenChangeComplete",o);const v=b.useState("payload");Fq({store:b,actionsRef:c,parentContext:m==null?void 0:m.store.context});const S=C.useMemo(()=>({store:b}),[b]);return E.jsx(HP.Provider,{value:S,children:typeof t=="function"?t({payload:v}):t})}const Vq=C.createContext(void 0);function qq(e=!1){const t=C.useContext(Vq);if(t===void 0&&!e)throw new Error(An(16));return t}function Yq(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function z1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Nd={};function GP(e,t,n,r,i){let o={...B1(e,Nd)};return t&&(o=og(o,t)),n&&(o=og(o,n)),r&&(o=og(o,r)),o}function Wq(e){if(e.length===0)return Nd;if(e.length===1)return B1(e[0],Nd);let t={...B1(e[0],Nd)};for(let n=1;n<e.length;n+=1)t=og(t,e[n]);return t}function og(e,t){return VP(t)?t(e):Kq(e,t)}function Kq(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=z1(e.style,r);break}case"className":{e[n]=qP(e.className,r);break}default:Xq(n,r)?e[n]=Qq(e[n],r):e[n]=r}}return e}function Xq(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 VP(e){return typeof e=="function"}function B1(e,t){return VP(e)?e(t):e??Nd}function Qq(e,t){return t?e?n=>{if(Zq(n)){const i=n;U1(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function U1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function qP(e,t){return t?e?t+" "+e:t:e}function Zq(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function YP(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=qq(!0)!==void 0,u=tt(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=Yq({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;Jq(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);gt(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return GP({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(U1(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(U1(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=tt(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function Jq(e){return gn(e)&&e.tagName==="BUTTON"}function $g(e,t,n,r){const i=fr(WP).current;return tY(i,e,t,n,r)&&KP(i,[e,t,n,r]),i.callback}function eY(e){const t=fr(WP).current;return nY(t,e)&&KP(t,e),t.callback}function WP(){return{callback:null,cleanup:null,refs:[]}}function tY(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function nY(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function KP(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}function qA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(RS(19)?n==null?void 0:n.ref:t.ref)??null}function rY(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function iY(e,t){return typeof e=="function"?e(t):e}function oY(e,t){return typeof e=="function"?e(t):e}function Dr(e,t,n={}){const r=t.render,i=sY(t,n);if(n.enabled===!1)return null;const o=n.state??Cr;return lY(e,r,i,o)}function sY(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Cr,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?iY(n,o):void 0,p=f?oY(r,o):void 0,m=f?rY(o,c):Cr,y=f?z1(m,Array.isArray(u)?Wq(u):u)??Cr:Cr;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=eY([y.ref,qA(i),...a]):y.ref=$g(y.ref,qA(i),a):$g(null,null)),f?(h!==void 0&&(y.className=qP(y.className,h)),p!==void 0&&(y.style=z1(y.style,p)),y):Cr}const aY=Symbol.for("react.lazy");function lY(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=GP(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===aY&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return uY(e,n);throw new Error(An(8))}function uY(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}let bl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=th.startingStyle]="startingStyle",e[e.endingStyle=th.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Pg=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const cY={[Pg.popupOpen]:""},fY={[Pg.popupOpen]:"",[Pg.pressed]:""},dY={[bl.open]:""},hY={[bl.closed]:""},pY={[bl.anchorHidden]:""},PS={open(e){return e?cY:null}},mY={open(e){return e?fY:null}},tu={open(e){return e?dY:hY},anchorHidden(e){return e?pY:null}},gY=500,yY={style:{transition:"none"}},NS="data-base-ui-click-trigger",XP={fallbackAxisSide:"end"},bY={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function IS(e){return Jl(e,"base-ui")}function QP(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=ka}=t,p=C.useRef(void 0),m=SS(),y=Ea(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||zl(S,!0)&&u)return;const k=r.current.openEvent,T=k==null?void 0:k.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(k&&c)||T==="click"||T==="mousedown"));if(Oy(x.target)){const $=qt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;m.request(()=>{const $=qt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(zl(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=x&&k||!(x&&a&&(!(_&&c)||NP(_))),A=qt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,m,y,f,h]);return C.useMemo(()=>i?{reference:b}:Cr,[i,b])}const vY=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,id:a,payload:u,handle:c,...f}=e,h=Mh(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(An(79));const m=IS(a),y=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",m),v=C.useRef(null),{registerTrigger:S,isMountedByThisTrigger:x}=CS(m,v,p,{payload:u}),{getButtonProps:_,buttonRef:k}=YP({disabled:i,native:o}),T=QP(y,{enabled:y!=null}),A=Dh([T]),D={disabled:i,open:b},O=p.useState("triggerProps",x);return Dr("button",e,{state:D,ref:[k,t,S,v],props:[A.getReferenceProps(),O,{[NS]:"",id:m},f,_],stateAttributesMapping:PS})});function LS(e){return RS(19)?e:e?"true":void 0}const ZP=C.createContext(void 0);function xY(){const e=C.useContext(ZP);if(e===void 0)throw new Error(An(26));return e}const JP=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
|
|
302
|
+
0% 0%,
|
|
303
|
+
100% 0%,
|
|
304
|
+
100% 100%,
|
|
305
|
+
0% 100%,
|
|
306
|
+
0% 0%,
|
|
307
|
+
${o.left}px ${o.top}px,
|
|
308
|
+
${o.left}px ${o.bottom}px,
|
|
309
|
+
${o.right}px ${o.bottom}px,
|
|
310
|
+
${o.right}px ${o.top}px,
|
|
311
|
+
${o.left}px ${o.top}px
|
|
312
|
+
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),wY={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},jS={...wY,position:"fixed",top:0,left:0},Qo=C.forwardRef(function(e,t){const[n,r]=C.useState();return gt(()=>{xP&&r("button")},[]),E.jsx("span",{...e,ref:t,style:jS,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var SY=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ng=SY.join(","),eN=typeof Element>"u",jc=eN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ig=!eN&&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==null?void 0:e.ownerDocument},Lg=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=r===""||r==="true",o=i||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Lg(e.parentNode));return o},CY=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},tN=function(e,t,n){if(Lg(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ng));return t&&jc.call(e,Ng)&&r.unshift(e),r=r.filter(n),r},jg=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Lg(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=jg(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=jc.call(o,Ng);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Lg(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var m=jg(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:o,candidates:m})}else i.unshift.apply(i,o.children)}}return r},nN=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rN=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||CY(e))&&!nN(e)?0:e.tabIndex},EY=function(e,t){var n=rN(e);return n<0&&t&&!nN(e)?0:n},kY=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},iN=function(e){return e.tagName==="INPUT"},RY=function(e){return iN(e)&&e.type==="hidden"},_Y=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},TY=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},AY=function(e){if(!e.name)return!0;var t=e.form||Ig(e),n=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(o){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",o.message),!1}var i=TY(r,e.form);return!i||i===e},DY=function(e){return iN(e)&&e.type==="radio"},MY=function(e){return DY(e)&&!AY(e)},OY=function(e){var t,n=e&&Ig(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var o,a,u;for(i=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!i&&r;){var c,f,h;n=Ig(r),r=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=r)!==null&&f!==void 0&&(h=f.ownerDocument)!==null&&h!==void 0&&h.contains(r))}}return i},YA=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},$Y=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var i=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(e).visibility==="hidden")return!0;var o=jc.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(jc.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var u=e;e;){var c=e.parentElement,f=Ig(e);if(c&&!c.shadowRoot&&r(c)===!0)return YA(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(OY(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return YA(e);return!1},PY=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return jc.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},H1=function(e,t){return!(t.disabled||RY(t)||$Y(t,e)||_Y(t)||PY(t))},G1=function(e,t){return!(MY(t)||rN(t)<0||!H1(e,t))},NY=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},oN=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=EY(a,o),c=o?oN(r.candidates):a;u===0?o?t.push.apply(t,c):t.push(a):n.push({documentOrder:i,tabIndex:u,item:r,isScope:o,content:c})}),n.sort(kY).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},$h=function(e,t){t=t||{};var n;return t.getShadowRoot?n=jg([e],t.includeContainer,{filter:G1.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:NY}):n=tN(e,t.includeContainer,G1.bind(null,t)),oN(n)},IY=function(e,t){t=t||{};var n;return t.getShadowRoot?n=jg([e],t.includeContainer,{filter:H1.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=tN(e,t.includeContainer,H1.bind(null,t)),n},sN=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return jc.call(e,Ng)===!1?!1:G1(t,e)};const af=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function aN(e,t){const n=$h(e,af()),r=n.length;if(r===0)return;const i=Gr(Mt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function FS(e){return aN(Mt(e).body,1)||e}function lN(e){return aN(Mt(e).body,-1)||e}function uN(e,t){if(!e)return null;const n=$h(Mt(e).body,af()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function LY(e){return uN(e,1)}function jY(e){return uN(e,-1)}function fc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ct(n,r)}function FY(e){$h(e,af()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function WA(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const cN=C.createContext(null),fN=()=>C.useContext(cN),zY=Lc("portal");function dN(e={}){var b;const{ref:t,container:n,componentProps:r=Cr,elementProps:i}=e,o=Jl(),a=(b=fN())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=tt(v=>{v!==null&&h(v)}),m=C.useRef(null);gt(()=>{if(n===null){m.current&&(m.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(xS(n)?n:n.current))??a??document.body;if(v==null){m.current&&(m.current=null,h(null),c(null));return}m.current!==v&&(m.current=v,h(null),c(v))},[n,a,o]);const y=Dr("div",r,{ref:[t,p],props:[{id:o,[zY]:""},i]});return{portalNode:f,portalSubtree:u&&y?yn.createPortal(y,u):null}}const hN=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=dN({container:r,ref:t,componentProps:e,elementProps:u}),h=C.useRef(null),p=C.useRef(null),m=C.useRef(null),y=C.useRef(null),[b,v]=C.useState(null),S=b==null?void 0:b.modal,x=b==null?void 0:b.open,_=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||S)return;function T(A){c&&A.relatedTarget&&fc(A)&&(A.type==="focusin"?WA:FY)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,S]),C.useEffect(()=>{!c||x||WA(c)},[x,c]);const k=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return E.jsxs(C.Fragment,{children:[f,E.jsxs(cN.Provider,{value:k,children:[_&&c&&E.jsx(Qo,{"data-type":"outside",ref:h,onFocus:T=>{var A,D;if(fc(T,c))(A=m.current)==null||A.focus();else{const O=b?b.domReference:null;(D=lN(O))==null||D.focus()}}}),_&&c&&E.jsx("span",{"aria-owns":c.id,style:bY}),c&&yn.createPortal(n,c),_&&c&&E.jsx(Qo,{"data-type":"outside",ref:p,onFocus:T=>{var A,D;if(fc(T,c))(A=y.current)==null||A.focus();else{const O=b?b.domReference:null;(D=FS(O))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,qt(nh,T.nativeEvent)))}}})]})]})}),BY=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=Mh(),o=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return o||n?E.jsx(ZP.Provider,{value:n,children:E.jsxs(hN,{ref:t,...r,children:[o&&a===!0&&E.jsx(JP,{ref:i.context.internalBackdropRef,inert:LS(!u)}),e.children]})}):null}),UY={...tu,...of},HY=C.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=Mh(),u=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return Dr("div",e,{state:{open:u,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:UY,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let GY=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),VY=(function(e){return e[e.open=bl.open]="open",e[e.closed=bl.closed]="closed",e[e.startingStyle=bl.startingStyle]="startingStyle",e[e.endingStyle=bl.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const pN="ArrowUp",mN="ArrowDown",gN="ArrowLeft",yN="ArrowRight",qY="Home",YY=new Set([gN,yN]),WY=new Set([pN,mN]),KY=new Set([...YY,...WY]);[...KY];const bN=new Set([pN,mN,gN,yN,qY,"End"]);function ro(e){const t=fr(XY,e).current;return t.next=e,gt(t.effect),t}function XY(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let KA=0;function Q0(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(KA);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():KA=requestAnimationFrame(o)}const dc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function XA(e){return e==="inert"?dc.inert:e==="aria-hidden"?dc["aria-hidden"]:dc.none}let xm=new WeakSet,wm={},Z0=0;const vN=e=>e&&(e.host||vN(e.parentNode)),QY=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=vN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ZY(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=QY(t,e),u=new Set,c=new Set(a),f=[];wm[i]||(wm[i]=new WeakMap);const h=wm[i];a.forEach(p),m(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function m(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(Ta(b)!=="script")if(u.has(b))m(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=XA(o),_=(x.get(b)||0)+1,k=(h.get(b)||0)+1;x.set(b,_),h.set(b,k),f.push(b),_===1&&S&&xm.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Z0+=1,()=>{f.forEach(y=>{const b=XA(o),v=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,v),h.set(y,S),v||(!xm.has(y)&&o&&y.removeAttribute(o),xm.delete(y)),S||y.removeAttribute(i)}),Z0-=1,Z0||(dc.inert=new WeakMap,dc["aria-hidden"]=new WeakMap,dc.none=new WeakMap,xm=new WeakSet,wm={})}}function JY(e,t=!1,n=!1){const r=Mt(e[0]).body;return ZY(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function eW(e,t){const n=fn(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 QA=20;let la=[];function zS(){la=la.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function tW(e){zS(),e&&Ta(e)!=="body"&&(la.push(new WeakRef(e)),la.length>QA&&(la=la.slice(-QA)))}function J0(){var e;return zS(),(e=la[la.length-1])==null?void 0:e.deref()}function nW(e){if(!e)return null;const t=af();return sN(e,t)?e:$h(e,t)[0]||e}function rW(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Qr(e).display!=="none"}function ZA(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=af(),r=IY(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return sN(a,n)||a.hasAttribute("data-tabindex")&&!u.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function xN(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:k}=b.context,T=tt(()=>{var Z;return(Z=k.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=HA(S)&&A,O=C.useRef(["content"]),$=ro(i),B=ro(o),L=ro(f),N=sf(y),M=fN(),z=C.useRef(null),G=C.useRef(null),j=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),q=C.useRef(-1),W=C.useRef(""),I=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=$g(Y,m,M==null?void 0:M.beforeInsideRef),ie=$g(J,M==null?void 0:M.afterInsideRef),re=Ea(),he=Ea(),ve=SS(),Re=M!=null,ce=F1(x),Ie=tt((Z=ce)=>Z?$h(Z,af()):[]),We=tt(Z=>{const ne=Ie(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ct(ce,Gr(Mt(ce)))&&Ie().length===0&&!D&&dq(xe)}const ne=Mt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,Ie,We]),C.useEffect(()=>{if(r||!v)return;const Z=Mt(ce);function ne(){U.current=!1}function xe(Ce){const le=Vn(Ce),oe=ct(x,le)||ct(S,le)||ct(M==null?void 0:M.portalNode,le);U.current=!oe,I.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${NS}]`)&&(F.current=!0)}function ge(){I.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Mt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=Vn(me),Oe=Ie().indexOf(ae);Oe!==-1&&(q.current=Oe)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Vn(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Lc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h)].includes(ae),Se=!(ct(S,ae)||ct(x,ae)||ct(ae,x)||ct(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ct(ke,ae))||ue||N&&(Nl(N.nodesRef.current,_e).find(ke=>{var Pe,Le;return ct((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||ct((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||GA(N.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,F1((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&ZA(ce,O),a&&Oe!==S&&!rW(Te)&&Gr(Z)===Z.body){if(gn(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=q.current,Pe=Ie(),Le=Pe[ke]||Pe[Pe.length-1]||ce;gn(Le)&&Le.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==J0())&&(j.current=!0,b.setOpen(!1,qt(nh,me)))})}function Ce(){U.current||(k.current.insideReactTree=!0,re.start(0,()=>{k.current.insideReactTree=!1}))}const le=gn(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,N,M,b,c,a,Ie,D,T,O,k,re,he,ve,h,p]),C.useEffect(()=>{var ge,Ce,le;if(r||!x||!v)return;const Z=Array.from(((ge=M==null?void 0:M.portalNode)==null?void 0:ge.querySelectorAll(`[${Lc("portal")}]`))||[]),ne=(le=(Ce=(N?GA(N.nodesRef.current,T()):[]).find(oe=>{var me;return HA(((me=oe.context)==null?void 0:me.elements.domReference)||null)}))==null?void 0:Ce.context)==null?void 0:le.elements.domReference,xe=[x,ne,...Z,z.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h),D?S:null].filter(oe=>oe!=null);return JY(xe,u||D)},[v,r,S,x,u,O,M,D,N,T,h,p]),gt(()=>{if(!v||r||!gn(ce))return;const Z=Mt(ce),ne=Gr(Z);queueMicrotask(()=>{const xe=We(ce),ge=$.current,Ce=typeof ge=="function"?ge(L.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=Io(Ce),le=le||xe[0]||ce,!ct(ce,ne)&&Q0(le,{preventScroll:le===ce})})},[r,v,ce,A,We,$,L]),gt(()=>{if(r||!ce)return;const Z=Mt(ce),ne=Gr(Z);tW(ne);function xe(le){if(le.open||(W.current=eW(le.nativeEvent,I.current)),le.reason===Xn&&le.nativeEvent.type==="mouseleave"&&(j.current=!0),le.reason===UP)if(le.nested)j.current=!1;else if(pq(le.nativeEvent)||mq(le.nativeEvent))j.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?j.current=!1:j.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,jS),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=B.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||J0();return ae&&ae.isConnected?ae:ge}const me=S||J0()||ge;return Io(oe)||me}return()=>{_.off("openchange",xe);const le=Gr(Z),oe=ct(x,le)||N&&Nl(N.nodesRef.current,T(),!1).some(ae=>{var Oe;return ct((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=nW(me),Oe=typeof B.current!="boolean";B.current&&!j.current&&gn(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),j.current=!1})}},[r,x,ce,B,k,_,N,Re,S,T]),gt(()=>{if(!bP||v||!x)return;const Z=Gr(Mt(x));!gn(Z)||!Oy(Z)||ct(x,Z)&&Z.blur()},[v,x]),gt(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),gt(()=>{if(!(r||!ce))return ZA(ce,O),()=>{queueMicrotask(zS)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Qo,{"data-type":"inside",ref:H,onFocus:Z=>{var ne,xe;if(u){const ge=We();Q0(ge[ge.length-1])}else M!=null&&M.portalNode&&(j.current=!1,fc(Z,M.portalNode)?(ne=FS(S))==null||ne.focus():(xe=Io(p??M.beforeOutsideRef))==null||xe.focus())}}),n,X&&E.jsx(Qo,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne,xe;u?Q0(We()[0]):M!=null&&M.portalNode&&(c&&(j.current=!0),fc(Z,M.portalNode)?(ne=lN(S))==null||ne.focus():(xe=Io(h??M.afterOutsideRef))==null||xe.focus())}})]})}const iW={...tu,...of,nestedDialogOpen(e){return e?{[VY.nestedDialogOpen]:""}:null}},oW=C.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:u}=Mh(),c=u.useState("descriptionElementId"),f=u.useState("disablePointerDismissal"),h=u.useState("floatingRootContext"),p=u.useState("popupProps"),m=u.useState("modal"),y=u.useState("mounted"),b=u.useState("nested"),v=u.useState("nestedOpenDialogCount"),S=u.useState("open"),x=u.useState("openMethod"),_=u.useState("titleElementId"),k=u.useState("transitionStatus"),T=u.useState("role");xY(),Th({open:S,ref:u.context.popupRef,onComplete(){var B,L;S&&((L=(B=u.context).onOpenChangeComplete)==null||L.call(B,!0))}});function A(B){return B==="touch"?u.context.popupRef.current:!0}const D=i===void 0?A:i,O=v>0,$=Dr("div",e,{state:{open:S,nested:b,transitionStatus:k,nestedDialogOpen:O},props:[p,{"aria-labelledby":_??void 0,"aria-describedby":c??void 0,role:T,tabIndex:-1,hidden:!y,onKeyDown(B){bN.has(B.key)&&B.stopPropagation()},style:{[GY.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:iW});return E.jsx(xN,{context:h,openInteractionType:x,disabled:!y,closeOnFocusOut:!f,initialFocus:D,returnFocus:r,modal:m!==!1,restoreFocus:"popup",children:$})}),wN=C.createContext(void 0);function lf(e){const t=C.useContext(wN);if(t===void 0&&!e)throw new Error(An(47));return t}function sW(){return{...OS(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const aW={...$S,disabled:Ke(e=>e.disabled),instantType:Ke(e=>e.instantType),openMethod:Ke(e=>e.openMethod),openChangeReason:Ke(e=>e.openChangeReason),modal:Ke(e=>e.modal),stickIfOpen:Ke(e=>e.stickIfOpen),titleElementId:Ke(e=>e.titleElementId),descriptionElementId:Ke(e=>e.descriptionElementId),openOnHover:Ke(e=>e.openOnHover),closeDelay:Ke(e=>e.closeDelay),hasViewport:Ke(e=>e.hasViewport)};let lW=class SN extends Ah{constructor(n){const r={...sW(),...n};r.open&&(n==null?void 0:n.mounted)===void 0&&(r.mounted=!0);super(r,{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),stickIfOpenTimeout:new zi,triggerElements:new Oh},aW);te(this,"setOpen",(n,r)=>{var f,h,p;const i=r.reason===Xn,o=r.reason===ka&&r.event.detail===0,a=!n&&(r.reason===$y||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const u={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};(p=this.state.floatingRootContext.context.events)==null||p.emit("openchange",u);const c=()=>{var b;const m={open:n,openChangeReason:r.reason},y=((b=r.trigger)==null?void 0:b.id)??null;(y||n)&&(m.activeTriggerId=y,m.activeTriggerElement=r.trigger??null),this.update(m)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(gY,()=>{this.set("stickIfOpen",!1)}),yn.flushSync(c)):c(),o||a?this.set("instantType",o?"click":"dismiss"):r.reason===nh?this.set("instantType","focus"):this.set("instantType",void 0)});te(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(n,r){const i=fr(()=>new SN(r)).current,o=n??i;return _h(i.disposeEffect),o}};function JA({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,modal:a=!1,handle:u,triggerId:c,defaultTriggerId:f=null}=e,h=lW.useStore(u==null?void 0:u.store,{modal:a,open:r,openProp:n,activeTriggerId:f,triggerIdProp:c});vS(()=>{n===void 0&&h.state.open===!1&&r===!0&&h.update({open:!0,activeTriggerId:f})}),h.useControlledProp("openProp",n),h.useControlledProp("triggerIdProp",c);const p=h.useState("open"),m=h.useState("positionerElement"),y=h.useState("payload"),b=h.useState("openChangeReason");h.useContextCallback("onOpenChange",i),h.useContextCallback("onOpenChangeComplete",o);const{openMethod:v,triggerProps:S,reset:x}=RP(p);ES(h);const{forceUnmount:_}=kS(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),x()});kP(p&&a===!0&&b!==Xn&&v!=="touch",m),C.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const k=C.useCallback(j=>{const F=qt(j);return F.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},F},[h]),T=C.useCallback(()=>{h.setOpen(!1,k(DS))},[h,k]);C.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:T}),[_,T]);const A=TS({popupStore:h,onOpenChange:h.setOpen}),D=MS(A,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=BP(A),{getReferenceProps:$,getFloatingProps:B,getTriggerProps:L}=Dh([D,O]),N=C.useMemo(()=>$(S),[$,S]),M=C.useMemo(()=>L(S),[L,S]),z=C.useMemo(()=>B(),[B]);h.useSyncedValues({modal:a,openMethod:v,activeTriggerProps:N,inactiveTriggerProps:M,popupProps:z,floatingRootContext:A,nested:eu()!=null});const G=C.useMemo(()=>({store:h}),[h]);return E.jsx(wN.Provider,{value:G,children:typeof t=="function"?t({payload:y}):t})}function uW(e){return lf(!0)?E.jsx(JA,{props:e}):E.jsx(XV,{children:E.jsx(JA,{props:e})})}const CN=({children:e,...t})=>E.jsx(uW,{"data-slot":"popover-root",...t,children:e});CN.displayName="PopoverRoot";const cW=300;function sg(e,t,n){if(n&&!zl(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const V1=Lc("safe-polygon"),fW=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${zP}`;function dW(e){return e?!!e.closest(fW):!1}let hW=class EN{constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new zi,this.restTimeout=new zi,this.handleCloseOptions=void 0}static create(){return new EN}};function kN(e){const t=fr(hW.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),_h(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function ex(e){return typeof e=="function"?e():e}const pW={current:null};function RN(e,t={}){var L;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=pW,externalTree:m,isActiveTrigger:y=!0}=t,b=sf(m),v=kN(n),S=ro(u),x=ro(a),_=ro(f),k=ro(o);y&&(v.handleCloseOptions=(L=S.current)==null?void 0:L.__options);const T=tt(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=tt(N=>Mg(N,n.context.triggerElements)),D=C.useCallback((N,M=!0)=>{const z=sg(x.current,"close",v.pointerType);z&&!v.handler?v.openChangeTimeout.start(z,()=>n.setOpen(!1,qt(Xn,N))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,qt(Xn,N)))},[x,n,v]),O=tt(()=>{v.unbindMouseMove(),v.handler=void 0}),$=tt(()=>{if(v.performedPointerEventsMutation){const N=Mt(n.select("domReferenceElement")).body;N.style.pointerEvents="",N.removeAttribute(V1),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function N(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[o,i,v]);const B=tt(N=>{var z;if(T()||!r.current.floatingContext||A(N.relatedTarget))return;const M=p.current;(z=S.current)==null||z.call(S,{...r.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(N)}})(N)});return C.useEffect(()=>{if(!o)return;const N=p.current??(y?n.select("domReferenceElement"):null);if(!Nt(N))return;function M(j){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!zl(v.pointerType)||ex(_.current)>0&&!sg(x.current,"open"))return;const F=sg(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),q=n.context.triggerElements,W=(q.hasElement(j.target)||q.hasMatchingElement(H=>ct(H,j.target)))&&(!U||!ct(U,j.target)),I=j.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,qt(Xn,j,I)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,qt(Xn,j,I))}):J&&n.setOpen(!0,qt(Xn,j,I))}function z(j){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Mt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!A(j.relatedTarget)){if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const q=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:j.clientX,y:j.clientY,onClose(){$(),O(),k.current&&!T()&&q===n.select("domReferenceElement")&&D(j,!0)}});const W=v.handler;W(j),U.addEventListener("mousemove",W),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",W)};return}(v.pointerType!=="touch"||!ct(n.select("floatingElement"),j.relatedTarget))&&D(j)}}function G(j){B(j)}return n.select("open")&&N.addEventListener("mouseleave",G),h&&N.addEventListener("mousemove",M,{once:!0}),N.addEventListener("mouseenter",M),N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",G),h&&N.removeEventListener("mousemove",M),N.removeEventListener("mouseenter",M),N.removeEventListener("mouseleave",z)}},[O,$,r,x,D,n,o,S,B,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function N(M){v.pointerType=M.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(M){const{nativeEvent:z}=M,G=M.currentTarget,j=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),q=(F.hasElement(M.target)||F.hasMatchingElement(I=>ct(I,M.target)))&&(!j||!ct(j,M.target));if(c&&!zl(v.pointerType)||U&&!q||ex(_.current)===0||!q&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const I=n.select("open");!v.blockMouseMove&&(!I||q)&&n.setOpen(!0,qt(Xn,z,G))}v.pointerType==="touch"?yn.flushSync(()=>{W()}):q&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(ex(_.current),W))}}},[o,v,T,c,n,_])}function eD(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function mW(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function _N(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new zi;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=m,c=y,null;const v=p-a,S=m-u,x=Math.sqrt(v*v+S*S)/b;return a=p,u=m,c=y,x}const h=({x:p,y:m,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(_){function k(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||m==null)return;const{clientX:T,clientY:A}=_,D=[T,A],O=Vn(_),$=_.type==="mouseleave",B=ct(b.floating,O),L=ct(b.domReference,O),N=b.domReference.getBoundingClientRect(),M=b.floating.getBoundingClientRect(),z=y.split("-")[0],G=p>M.right-M.width/2,j=m>M.bottom-M.height/2,F=mW(D,N),U=M.width>N.width,q=M.height>N.height,W=(U?N:M).left,I=(U?N:M).right,Y=(q?N:M).top,J=(q?N:M).bottom;if(B&&(o=!0,!$))return;if(L&&(o=!1),L&&!$){o=!0;return}if($&&Nt(_.relatedTarget)&&ct(b.floating,_.relatedTarget)||x&&Nl(x.nodesRef.current,S).some(({context:re})=>re==null?void 0:re.open))return;if(z==="top"&&m>=N.bottom-1||z==="bottom"&&m<=N.top+1||z==="left"&&p>=N.right-1||z==="right"&&p<=N.left+1)return k();let H=[];switch(z){case"top":H=[[W,N.top+1],[W,M.bottom-1],[I,M.bottom-1],[I,N.top+1]];break;case"bottom":H=[[W,M.top+1],[W,N.bottom-1],[I,N.bottom-1],[I,M.top+1]];break;case"left":H=[[M.right-1,J],[M.right-1,Y],[N.left+1,Y],[N.left+1,J]];break;case"right":H=[[N.right-1,J],[N.right-1,Y],[M.left+1,Y],[M.left+1,J]];break}function ie([re,he]){switch(z){case"top":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he+t+1],Re=[U?re-t/2:G?re+t*4:re-t*4,he+t+1],ce=[[M.left,G||U?M.bottom-t:M.top],[M.right,G?U?M.bottom-t:M.top:M.bottom-t]];return[ve,Re,...ce]}case"bottom":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he-t],Re=[U?re-t/2:G?re+t*4:re-t*4,he-t],ce=[[M.left,G||U?M.top+t:M.bottom],[M.right,G?U?M.top+t:M.bottom:M.top+t]];return[ve,Re,...ce]}case"left":{const ve=[re+t+1,q?he+t/2:j?he+t*4:he-t*4],Re=[re+t+1,q?he-t/2:j?he+t*4:he-t*4];return[[j||q?M.right-t:M.left,M.top],[j?q?M.right-t:M.left:M.right-t,M.bottom],ve,Re]}case"right":{const ve=[re-t,q?he+t/2:j?he+t*4:he-t*4],Re=[re-t,q?he-t/2:j?he+t*4:he-t*4],ce=[[j||q?M.left+t:M.right,M.top],[j?q?M.left+t:M.right:M.left+t,M.bottom]];return[ve,Re,...ce]}default:return[]}}if(!eD([T,A],H)){if(o&&!F)return k();if(!$&&r){const re=f(_.clientX,_.clientY);if(re!==null&&re<.1)return k()}eD([T,A],ie([p,m]))?!o&&r&&i.start(40,k):k()}};return h.__options={blockPointerEvents:n},h}const gW=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,handle:a,payload:u,openOnHover:c=!1,delay:f=cW,closeDelay:h=0,id:p,...m}=e,y=lf(!0),b=(a==null?void 0:a.store)??(y==null?void 0:y.store);if(!b)throw new Error(An(74));const v=IS(p),S=b.useState("isTriggerActive",v),x=b.useState("floatingRootContext"),_=b.useState("isOpenedByTrigger",v),k=C.useRef(null),{registerTrigger:T,isMountedByThisTrigger:A}=CS(v,k,b,{payload:u,disabled:i,openOnHover:c,closeDelay:h}),D=b.useState("openChangeReason"),O=b.useState("stickIfOpen"),$=b.useState("openMethod"),B=RN(x,{enabled:x!=null&&c&&($!=="touch"||D!==ka),mouseOnly:!0,move:!1,handleClose:_N(),restMs:f,delay:{close:h},triggerElementRef:k,isActiveTrigger:S}),L=QP(x,{enabled:x!=null,stickIfOpen:O}),N=Dh([L]),M=b.useState("triggerProps",A),z={disabled:i,open:_},{getButtonProps:G,buttonRef:j}=YP({disabled:i,native:o}),F=C.useMemo(()=>({open(Y){return Y&&D===ka?mY.open(Y):PS.open(Y)}}),[D]),U=Dr("button",e,{state:z,ref:[j,t,T,k],props:[N.getReferenceProps(),B,M,{[NS]:"",id:v},m,G],stateAttributesMapping:F}),q=C.useRef(null),W=tt(Y=>{var J;yn.flushSync(()=>{b.setOpen(!1,qt(nh,Y.nativeEvent,Y.currentTarget))}),(J=jY(q.current))==null||J.focus()}),I=tt(Y=>{var H;const J=b.select("positionerElement");if(J&&fc(Y,J))(H=b.context.beforeContentFocusGuardRef.current)==null||H.focus();else{yn.flushSync(()=>{b.setOpen(!1,qt(nh,Y.nativeEvent,Y.currentTarget))});let ie=LY(b.context.triggerFocusTargetRef.current||k.current);for(;ie!==null&&ct(J,ie);){const re=ie;if(ie=FS(ie),ie===re)break}ie==null||ie.focus()}});return S?E.jsxs(C.Fragment,{children:[E.jsx(Qo,{ref:q,onFocus:W}),E.jsx(C.Fragment,{children:U},v),E.jsx(Qo,{ref:b.context.triggerFocusTargetRef,onFocus:I})]}):E.jsx(C.Fragment,{children:U},v)}),TN=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(gW,{"data-slot":"popover-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t})};TN.displayName="PopoverTrigger";const AN=C.createContext(void 0);function yW(){const e=C.useContext(AN);if(e===void 0)throw new Error(An(45));return e}const bW=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=lf();return i.useState("mounted")||n?E.jsx(AN.Provider,{value:n,children:E.jsx(hN,{ref:t,...r})}):null}),DN=({children:e,...t})=>E.jsx(bW,{"data-slot":"popover-portal",...t,children:e});DN.displayName="PopoverPortal";const vW={...tu,...of},xW=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o}=lf(),a=o.useState("open"),u=o.useState("mounted"),c=o.useState("transitionStatus"),f=o.useState("openChangeReason");return Dr("div",e,{state:{open:a,transitionStatus:c},ref:[o.context.backdropRef,t],props:[{role:"presentation",hidden:!u,style:{pointerEvents:f===Xn?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:vW})}),MN=({...e})=>E.jsx(xW,{"data-slot":"popover-backdrop",...e});MN.displayName="PopoverBackdrop";const ON=C.createContext(void 0);function wW(){const e=C.useContext(ON);if(!e)throw new Error(An(46));return e}const SW=["top","right","bottom","left"],Fc=Math.min,Vr=Math.max,Fg=Math.round,Sm=Math.floor,io=e=>({x:e,y:e}),CW={left:"right",right:"left",bottom:"top",top:"bottom"},EW={start:"end",end:"start"};function q1(e,t,n){return Vr(e,Fc(t,n))}function ns(e,t){return typeof e=="function"?e(t):e}function Rr(e){return e.split("-")[0]}function Da(e){return e.split("-")[1]}function BS(e){return e==="x"?"y":"x"}function US(e){return e==="y"?"height":"width"}const kW=new Set(["top","bottom"]);function vi(e){return kW.has(Rr(e))?"y":"x"}function HS(e){return BS(vi(e))}function RW(e,t,n){n===void 0&&(n=!1);const r=Da(e),i=HS(e),o=US(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=zg(a)),[a,zg(a)]}function _W(e){const t=zg(e);return[Y1(e),t,Y1(t)]}function Y1(e){return e.replace(/start|end/g,t=>EW[t])}const tD=["left","right"],nD=["right","left"],TW=["top","bottom"],AW=["bottom","top"];function DW(e,t,n){switch(e){case"top":case"bottom":return n?t?nD:tD:t?tD:nD;case"left":case"right":return t?TW:AW;default:return[]}}function MW(e,t,n,r){const i=Da(e);let o=DW(Rr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Y1)))),o}function zg(e){return e.replace(/left|right|bottom|top/g,t=>CW[t])}function OW(e){return{top:0,right:0,bottom:0,left:0,...e}}function $N(e){return typeof e!="number"?OW(e):{top:e,right:e,bottom:e,left:e}}function Bg(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}}const $W=C.createContext(void 0);function PW(){var e;return((e=C.useContext($W))==null?void 0:e.direction)??"ltr"}const NW=e=>({name:"arrow",options:e,async fn(t){var W,I;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=ns(e,t)||{};if(f==null)return{};const m=$N(h),y={x:n,y:r},b=HS(i),v=US(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",k=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((I=a.isElement)==null?void 0:I.call(a,O)))&&($=u.floating[T]||o.floating[v]);const B=A/2-D/2,L=$/2-S[v]/2-1,N=Math.min(m[_],L),M=Math.min(m[k],L),z=N,G=$-S[v]-M,j=$/2-S[v]/2+B,F=q1(z,j,G),U=!c.arrow&&Da(i)!=null&&j!==F&&o.reference[v]/2-(j<z?N:M)-S[v]/2<0,q=U?j<z?j-z:j-G:0;return{[b]:y[b]+q,data:{[b]:F,centerOffset:j-F-q,...U&&{alignmentOffset:q}},reset:U}}}),IW=(e,t)=>({...NW(e),options:[e,t]});function rD(e,t,n){let{reference:r,floating:i}=e;const o=vi(t),a=HS(t),u=US(a),c=Rr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Da(t)){case"start":y[a]-=m*(n&&f?-1:1);break;case"end":y[a]+=m*(n&&f?-1:1);break}return y}async function LW(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=ns(t,e),b=$N(y),v=u[m?p==="floating"?"reference":"floating":p],S=Bg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),x=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),k=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},T=Bg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:x,offsetParent:_,strategy:c}):x);return{top:(S.top-T.top+b.top)/k.y,bottom:(T.bottom-S.bottom+b.bottom)/k.y,left:(S.left-T.left+b.left)/k.x,right:(T.right-S.right+b.right)/k.x}}const jW=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=rD(f,r,c),m=r,y={},b=0;for(let S=0;S<u.length;S++){var v;const{name:x,fn:_}=u[S],{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:LW},elements:{reference:e,floating:t}});h=k??h,p=T??p,y={...y,[x]:{...y[x],...A}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=rD(f,m,c)),S=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:y}},FW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=ns(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Rr(i),_=vi(u),k=Rr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=m||(k||!v?[zg(u)]:_W(u)),D=b!=="none";!m&&D&&A.push(...MW(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),B=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&B.push($[x]),p){const G=RW(i,a,T);B.push($[G[0]],$[G[1]])}if(L=[...L,{placement:i,overflows:B}],!B.every(G=>G<=0)){var N,M;const G=(((N=o.flip)==null?void 0:N.index)||0)+1,j=O[G];if(j&&(!(p==="alignment"&&_!==vi(j))||L.every(U=>vi(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:G,overflows:L},reset:{placement:j}};let F=(M=L.filter(U=>U.overflows[0]<=0).sort((U,q)=>U.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var z;const U=(z=L.filter(q=>{if(D){const W=vi(q.placement);return W===_||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,I)=>W+I,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:z[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function iD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oD(e){return SW.some(t=>e[t]>=0)}const zW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ns(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=iD(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:oD(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=iD(a,n.floating);return{data:{escapedOffsets:u,escaped:oD(u)}}}default:return{}}}}},PN=new Set(["left","top"]);async function BW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Rr(n),u=Da(n),c=vi(n)==="y",f=PN.has(a)?-1:1,h=o&&c?-1:1,p=ns(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:m*f}:{x:m*f,y:y*h}}const UW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await BW(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},HW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:k}=x;return{x:_,y:k}}},...f}=ns(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=vi(Rr(i)),y=BS(m);let b=h[y],v=h[m];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[x],T=b-p[_];b=q1(k,b,T)}if(u){const x=m==="y"?"top":"left",_=m==="y"?"bottom":"right",k=v+p[x],T=v-p[_];v=q1(k,v,T)}const S=c.fn({...t,[y]:b,[m]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[m]:u}}}}}},GW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=ns(e,t),h={x:n,y:r},p=vi(i),m=BS(p);let y=h[m],b=h[p];const v=ns(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=m==="y"?"height":"width",T=o.reference[m]-o.floating[k]+S.mainAxis,A=o.reference[m]+o.reference[k]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const k=m==="y"?"width":"height",T=PN.has(Rr(i)),A=o.reference[p]-o.floating[k]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[m]:y,[p]:b}}}},VW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=ns(e,t),h=await a.detectOverflow(t,f),p=Rr(i),m=Da(i),y=vi(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=m==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=Fc(v-h[S],_),A=Fc(b-h[x],k),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!m){const L=Vr(h.left,0),N=Vr(h.right,0),M=Vr(h.top,0),z=Vr(h.bottom,0);y?$=b-2*(L!==0||N!==0?L+N:Vr(h.left,h.right)):O=v-2*(M!==0||z!==0?M+z:Vr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const B=await a.getDimensions(u.floating);return b!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function NN(e){const t=Qr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=gn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=Fg(n)!==o||Fg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function GS(e){return Nt(e)?e:e.contextElement}function hc(e){const t=GS(e);if(!gn(t))return io(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=NN(t);let a=(o?Fg(n.width):n.width)/r,u=(o?Fg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const qW=io(0);function IN(e){const t=fn(e);return!Dy()||!t.visualViewport?qW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Bl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=GS(e);let a=io(1);t&&(r?Nt(r)&&(a=hc(r)):a=hc(e));const u=YW(o,n,r)?IN(o):io(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=fn(o),y=r&&Nt(r)?fn(r):r;let b=m,v=P1(b);for(;v&&r&&y!==b;){const S=hc(v),x=v.getBoundingClientRect(),_=Qr(v),k=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=T,b=fn(v),v=P1(b)}}return Bg({width:h,height:p,x:c,y:f})}function Py(e,t){const n=My(e).scrollLeft;return t?t.left+n:Bl(lo(e)).left+n}function LN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Py(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function WW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=lo(r),u=t?Ay(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=io(1);const h=io(0),p=gn(r);if((p||!p&&!o)&&((Ta(r)!=="body"||Aa(a))&&(c=My(r)),gn(r))){const y=Bl(r);f=hc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=a&&!p&&!o?LN(a,c):io(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function KW(e){return Array.from(e.getClientRects())}function XW(e){const t=lo(e),n=My(e),r=e.ownerDocument.body,i=Vr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Vr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Py(e);const u=-n.scrollTop;return Qr(r).direction==="rtl"&&(a+=Vr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const sD=25;function QW(e,t){const n=fn(e),r=lo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=Dy();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Py(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=sD&&(o-=b)}else f<=sD&&(o+=f);return{width:o,height:a,x:u,y:c}}const ZW=new Set(["absolute","fixed"]);function JW(e,t){const n=Bl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=gn(e)?hc(e):io(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function aD(e,t,n){let r;if(t==="viewport")r=QW(e,n);else if(t==="document")r=XW(lo(e));else if(Nt(t))r=JW(t,n);else{const i=IN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Bg(r)}function jN(e,t){const n=ts(e);return n===t||!Nt(n)||Xo(n)?!1:Qr(n).position==="fixed"||jN(n,t)}function eK(e,t){const n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(u=>Nt(u)&&Ta(u)!=="body"),i=null;const o=Qr(e).position==="fixed";let a=o?ts(e):e;for(;Nt(a)&&!Xo(a);){const u=Qr(a),c=wS(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&ZW.has(i.position)||Aa(a)&&!c&&jN(e,a))?r=r.filter(f=>f!==a):i=u,a=ts(a)}return t.set(e,r),r}function tK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Ay(t)?[]:eK(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=aD(t,f,i);return c.top=Vr(h.top,c.top),c.right=Fc(h.right,c.right),c.bottom=Fc(h.bottom,c.bottom),c.left=Vr(h.left,c.left),c},aD(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function nK(e){const{width:t,height:n}=NN(e);return{width:t,height:n}}function rK(e,t,n){const r=gn(t),i=lo(t),o=n==="fixed",a=Bl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=io(0);function f(){c.x=Py(i)}if(r||!r&&!o)if((Ta(t)!=="body"||Aa(i))&&(u=My(t)),r){const y=Bl(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?LN(i,u):io(0),p=a.left+u.scrollLeft-c.x-h.x,m=a.top+u.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function tx(e){return Qr(e).position==="static"}function lD(e,t){if(!gn(e)||Qr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lo(e)===n&&(n=n.ownerDocument.body),n}function FN(e,t){const n=fn(e);if(Ay(e))return n;if(!gn(e)){let i=ts(e);for(;i&&!Xo(i);){if(Nt(i)&&!tx(i))return i;i=ts(i)}return n}let r=lD(e,t);for(;r&&xV(r)&&tx(r);)r=lD(r,t);return r&&Xo(r)&&tx(r)&&!wS(r)?n:r||kV(e)||n}const iK=async function(e){const t=this.getOffsetParent||FN,n=this.getDimensions,r=await n(e.floating);return{reference:rK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oK(e){return Qr(e).direction==="rtl"}const sK={convertOffsetParentRelativeRectToViewportRelativeRect:WW,getDocumentElement:lo,getClippingRect:tK,getOffsetParent:FN,getElementRects:iK,getClientRects:KW,getDimensions:nK,getScale:hc,isElement:Nt,isRTL:oK};function zN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aK(e,t){let n=null,r;const i=lo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:y}=f;if(u||t(),!m||!y)return;const b=Sm(p),v=Sm(i.clientWidth-(h+m)),S=Sm(i.clientHeight-(p+y)),x=Sm(h),_={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Vr(0,Fc(1,c))||1};let k=!0;function T(A){const D=A[0].intersectionRatio;if(D!==c){if(!k)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!zN(f,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(e)}return a(!0),o}function uD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=GS(e),h=i||o?[...f?ha(f):[],...ha(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?aK(f,n):null;let m=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?Bl(e):null;c&&S();function S(){const x=Bl(e);v&&!zN(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const lK=UW,uK=HW,cK=FW,fK=VW,dK=zW,hK=GW,pK=(e,t,n)=>{const r=new Map,i={platform:sK,...n},o={...i.platform,_c:r};return jW(e,t,{...i,platform:o})};var mK=typeof document<"u",gK=function(){},ag=mK?C.useLayoutEffect:gK;function Ug(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(!Ug(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ug(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function BN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cD(e,t){const n=BN(e);return Math.round(t*n)/n}function nx(e){const t=C.useRef(e);return ag(()=>{t.current=e}),t}function yK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=C.useState(r);Ug(m,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(q=>{q!==D.current&&(D.current=q,v(q))},[]),k=C.useCallback(q=>{q!==O.current&&(O.current=q,x(q))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),B=c!=null,L=nx(c),N=nx(i),M=nx(f),z=C.useCallback(()=>{if(!D.current||!O.current)return;const q={placement:t,strategy:n,middleware:m};N.current&&(q.platform=N.current),pK(D.current,O.current,q).then(W=>{const I={...W,isPositioned:M.current!==!1};G.current&&!Ug($.current,I)&&($.current=I,yn.flushSync(()=>{p(I)}))})},[m,t,n,N,M]);ag(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[f]);const G=C.useRef(!1);ag(()=>(G.current=!0,()=>{G.current=!1}),[]),ag(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(L.current)return L.current(T,A,z);z()}},[T,A,z,L,B]);const j=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!F.floating)return q;const W=cD(F.floating,h.x),I=cD(F.floating,h.y);return u?{...q,transform:"translate("+W+"px, "+I+"px)",...BN(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:z,refs:j,elements:F,floatingStyles:U}),[h,z,j,F,U])}const bK=(e,t)=>({...lK(e),options:[e,t]}),vK=(e,t)=>({...uK(e),options:[e,t]}),xK=(e,t)=>({...hK(e),options:[e,t]}),wK=(e,t)=>({...cK(e),options:[e,t]}),SK=(e,t)=>({...fK(e),options:[e,t]}),CK=(e,t)=>({...dK(e),options:[e,t]}),EK={name:"hide",async fn(e){var a;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((a=(await CK().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},lg={sideX:"left",sideY:"top"},UN={name:"adaptiveOrigin",async fn(e){var x,_;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:u}=e,c=fn(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:lg};const h=await((x=o.getOffsetParent)==null?void 0:x.call(o,i));let p={width:0,height:0};if(a==="fixed"&&(c!=null&&c.visualViewport))p={width:c.visualViewport.width,height:c.visualViewport.height};else if(h===c){const k=Mt(i);p={width:k.documentElement.clientWidth,height:k.documentElement.clientHeight}}else await((_=o.isElement)==null?void 0:_.call(o,h))&&(p=await o.getDimensions(h));const m=Rr(u);let y=t,b=n;m==="left"&&(y=p.width-(t+r.width)),m==="top"&&(b=p.height-(n+r.height));const v=m==="left"?"right":lg.sideX,S=m==="top"?"bottom":lg.sideY;return{x:y,y:b,data:{sideX:v,sideY:S}}}};function kK(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Jl(),o=eu()!=null,a=fr(()=>new _S({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Oh,floatingId:i,nested:o,noEmit:!1})).current;return gt(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Nt(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function RK(e={}){const{nodeId:t,externalTree:n}=e,r=kK(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=sf(n);gt(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=yK({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=Nt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[m,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",Nt(m)?m:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(Nt(O)||O===null)&&(c.current=O,y(O)),(Nt(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Nt(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:k,nodeId:t,rootStore:i}),[h,_,k,t,i,T,A]);return gt(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function HN(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 fD(e,t,n){const{rects:r,placement:i}=e;return{side:HN(t,Rr(i),n),align:Da(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function GN(e){var Me,Xe;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",B=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,N=tt(L),M=L?N:t,z=ro(t),G=PW()==="rtl",j=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"}[r],F=o==="center"?j:`${j}-${o}`;let U=c;const q=1,W=r==="bottom"?q:0,I=r==="top"?q:0,Y=r==="right"?q:0,J=r==="left"?q:0;typeof U=="number"?U={top:U+W,right:U+J,bottom:U+I,left:U+Y}:U&&(U={top:(U.top||0)+W,right:(U.right||0)+J,bottom:(U.bottom||0)+I,left:(U.left||0)+Y});const H={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:U},ie=C.useRef(null),re=ro(i),he=ro(a),ve=[bK(Ne=>{const Tt=fD(Ne,r,G),ft=typeof re.current=="function"?re.current(Tt):re.current,ut=typeof he.current=="function"?he.current(Tt):he.current;return{mainAxis:ft,crossAxis:ut,alignmentAxis:ut}},[typeof i!="function"?i:0,typeof a!="function"?a:0,G,r])],Re=$==="none"&&O!=="shift",ce=!Re&&(f||S||O==="shift"),Ie=O==="none"?null:wK({...H,padding:{top:U.top+q,right:U.right+q,bottom:U.bottom+q,left:U.left+q},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),We=Re?null:vK(Ne=>{const Tt=Mt(Ne.elements.floating).documentElement;return{...H,rootBoundary:S?{x:0,y:0,width:Tt.clientWidth,height:Tt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:ce,limiter:f||S?void 0:xK(ft=>{if(!ie.current)return{};const{width:ut,height:Rt}=ie.current.getBoundingClientRect(),en=vi(Rr(ft.placement)),Xt=en==="y"?ut:Rt,tn=en==="y"?U.left+U.right:U.top+U.bottom;return{offset:Xt/2+tn/2}})}},[H,f,S,U,$]);O==="shift"||$==="shift"||o==="center"?ve.push(We,Ie):ve.push(Ie,We),ve.push(SK({...H,apply({elements:{floating:Ne},rects:{reference:Tt},availableWidth:ft,availableHeight:ut}){const Rt=Ne.style;Rt.setProperty("--available-width",`${ft}px`),Rt.setProperty("--available-height",`${ut}px`),Rt.setProperty("--anchor-width",`${Tt.width}px`),Rt.setProperty("--anchor-height",`${Tt.height}px`)}}),IW(()=>({element:ie.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ne){var Ua,Or,on;const{elements:Tt,middlewareData:ft,placement:ut,rects:Rt,y:en}=Ne,Xt=Rr(ut),tn=vi(Xt),bn=ie.current,Jr=((Ua=ft.arrow)==null?void 0:Ua.x)||0,ja=((Or=ft.arrow)==null?void 0:Or.y)||0,Ei=(bn==null?void 0:bn.clientWidth)||0,Fa=(bn==null?void 0:bn.clientHeight)||0,ki=Jr+Ei/2,au=ja+Fa/2,lu=Math.abs(((on=ft.shift)==null?void 0:on.y)||0),fs=Rt.reference.height/2,Ri=typeof i=="function"?i(fD(Ne,r,G)):i,za=lu>Ri,Ba={top:`${ki}px calc(100% + ${Ri}px)`,bottom:`${ki}px ${-Ri}px`,left:`calc(100% + ${Ri}px) ${au}px`,right:`${-Ri}px ${au}px`}[Xt],Hi=`${ki}px ${Rt.reference.y+fs-en}px`;return Tt.floating.style.setProperty("--transform-origin",ce&&tn==="y"&&za?Hi:Ba),{}}},EK,_),gt(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const X=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:Z,elements:ne,x:xe,y:ge,middlewareData:Ce,update:le,placement:oe,context:me,isPositioned:ae,floatingStyles:Oe}=RK({rootContext:y,placement:F,middleware:ve,strategy:n,whileElementsMounted:m?void 0:(...Ne)=>uD(...Ne,X),nodeId:x,externalTree:T}),{sideX:Te,sideY:_e}=Ce.adaptiveOrigin||lg,De=ae?n:"fixed",ue=C.useMemo(()=>{const Ne=_?{position:De,[Te]:xe,[_e]:ge}:{position:De,...Oe};return ae||(Ne.opacity=0),Ne},[_,De,Te,xe,_e,ge,Oe,ae]),Se=C.useRef(null);gt(()=>{if(!b)return;const Ne=z.current,Tt=typeof Ne=="function"?Ne():Ne,ft=(dD(Tt)?Tt.current:Tt)||null||null;ft!==Se.current&&(Z.setPositionReference(ft),Se.current=ft)},[b,Z,M,z]),C.useEffect(()=>{if(!b)return;const Ne=z.current;typeof Ne!="function"&&dD(Ne)&&Ne.current!==Se.current&&(Z.setPositionReference(Ne.current),Se.current=Ne.current)},[b,Z,M,z]),C.useEffect(()=>{if(m&&b&&ne.domReference&&ne.floating)return uD(ne.domReference,ne.floating,le,X)},[m,b,ne,le,X]);const ke=Rr(oe),Pe=HN(r,ke,G),Le=Da(oe)||"center",st=!!((Me=Ce.hide)!=null&&Me.referenceHidden);gt(()=>{k&&b&&ae&&D(ke)},[k,b,ae,ke]);const Ut=C.useMemo(()=>{var Ne,Tt;return{position:"absolute",top:(Ne=Ce.arrow)==null?void 0:Ne.y,left:(Tt=Ce.arrow)==null?void 0:Tt.x}},[Ce.arrow]),Ot=((Xe=Ce.arrow)==null?void 0:Xe.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:ue,arrowStyles:Ut,arrowRef:ie,arrowUncentered:Ot,side:Pe,align:Le,physicalSide:ke,anchorHidden:st,refs:Z,context:me,isPositioned:ae,update:le}),[ue,Ut,ie,Ot,Pe,Le,ke,st,Z,me,ae,le])}function dD(e){return e!=null&&"current"in e}function Ny(e){return e==="starting"?yY:Cr}const _K=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="bottom",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=XP,...S}=e,{store:x}=lf(),_=yW(),k=WV(),T=x.useState("floatingRootContext"),A=x.useState("mounted"),D=x.useState("open"),O=x.useState("openChangeReason"),$=x.useState("activeTriggerElement"),B=x.useState("modal"),L=x.useState("positionerElement"),N=x.useState("instantType"),M=x.useState("transitionStatus"),z=x.useState("hasViewport"),G=C.useRef(null),j=_P(L,!1,!1),F=GN({anchor:i,floatingRootContext:T,positionMethod:o,mounted:A,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:y,disableAnchorTracking:b,keepMounted:_,nodeId:k,collisionAvoidance:v,adaptiveOrigin:z?UN:void 0}),U=C.useMemo(()=>{const H={};return D||(H.pointerEvents="none"),{role:"presentation",hidden:!A,style:{...F.positionerStyles,...H}}},[D,A,F.positionerStyles]),q=C.useMemo(()=>({props:U,...F}),[U,F]),W=T.useState("domReferenceElement");gt(()=>{const H=W,ie=G.current;if(H&&(G.current=H),ie&&H&&H!==ie){x.set("instantType",void 0);const re=new AbortController;return j(()=>{x.set("instantType","trigger-change")},re.signal),()=>{re.abort()}}},[W,j,x]);const I={open:D,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:N},Y=C.useCallback(H=>{x.set("positionerElement",H)},[x]),J=Dr("div",e,{state:I,props:[q.props,Ny(M),S],ref:[t,Y],stateAttributesMapping:tu});return E.jsxs(ON.Provider,{value:q,children:[A&&B===!0&&O!==Xn&&E.jsx(JP,{ref:x.context.internalBackdropRef,inert:LS(!D),cutout:$}),E.jsx(KV,{id:k,children:J})]})}),VN=({children:e,...t})=>E.jsx(_K,{"data-slot":"popover-positioner",...t,children:e});VN.displayName="PopoverPositioner";const TK={"popover-popup":"_popover-popup_hjuwr_3"},AK=C.createContext(void 0);function DK(e){return C.useContext(AK)}const MK=new Set(["click","mousedown"]);function qN(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=kN(n),h=sf(),p=eu(),m=tt(()=>f.interactedInside?!0:a.current.openEvent?MK.has(a.current.openEvent.type):!1),y=tt(()=>{var T;const k=(T=a.current.openEvent)==null?void 0:T.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=tt(k=>Mg(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=OK(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,qt(Xn,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,qt(Xn,k)))},[c,n,f]),S=tt(()=>{f.unbindMouseMove(),f.handler=void 0}),x=tt(()=>{if(f.performedPointerEventsMutation){const k=Mt(i).body;k.style.pointerEvents="",k.removeAttribute(V1),f.performedPointerEventsMutation=!1}}),_=tt(k=>{const T=Vn(k);if(!dW(T)){f.interactedInside=!1;return}f.interactedInside=!0});gt(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),gt(()=>{var k,T,A;if(u&&r&&((k=f.handleCloseOptions)!=null&&k.blockPointerEvents)&&y()&&Nt(o)&&i){f.performedPointerEventsMutation=!0;const D=Mt(i).body;D.setAttribute(V1,"");const O=o,$=i,B=(A=(T=h==null?void 0:h.nodesRef.current.find(L=>L.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return B&&(B.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){m()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),m()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){m()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",k),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",k),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,m,b,v,x,S,_,f])}function OK(e,t){return t&&!zl(t)?0:typeof e=="function"?e():e}const $K={...tu,...of},PK=C.forwardRef(function(e,t){const{className:n,render:r,initialFocus:i,finalFocus:o,...a}=e,{store:u}=lf(),c=wW(),f=DK()!=null,h=u.useState("open"),p=u.useState("openMethod"),m=u.useState("instantType"),y=u.useState("transitionStatus"),b=u.useState("popupProps"),v=u.useState("titleElementId"),S=u.useState("descriptionElementId"),x=u.useState("modal"),_=u.useState("mounted"),k=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),A=u.useState("floatingRootContext");Th({open:h,ref:u.context.popupRef,onComplete(){var G,j;h&&((j=(G=u.context).onOpenChangeComplete)==null||j.call(G,!0))}});const D=u.useState("disabled"),O=u.useState("openOnHover"),$=u.useState("closeDelay");qN(A,{enabled:O&&!D,closeDelay:$});function B(G){return G==="touch"?u.context.popupRef.current:!0}const L=i===void 0?B:i,N={open:h,side:c.side,align:c.align,instant:m,transitionStatus:y},M=C.useCallback(G=>{u.set("popupElement",G)},[u]),z=Dr("div",e,{state:N,ref:[t,u.context.popupRef,M],props:[b,{"aria-labelledby":v,"aria-describedby":S,onKeyDown(G){f&&bN.has(G.key)&&G.stopPropagation()}},Ny(y),a],stateAttributesMapping:$K});return E.jsx(xN,{context:A,openInteractionType:p,modal:x==="trap-focus",disabled:!_||k===Xn,initialFocus:L,returnFocus:o,restoreFocus:"popup",previousFocusableElement:gn(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:z})}),YN=({title:e,description:t,icon:n,action:r,footer:i,children:o,className:a,...u})=>E.jsx(PK,{"data-slot":"popover-popup",render:E.jsx(zt,{title:e,description:t,icon:n,action:r,footer:i,children:o}),className:ze(TK["popover-popup"],a),"data-is-popup":!0,...u,children:o});YN.displayName="PopoverPopup";const WN=({trigger:e,open:t,onOpenChange:n,title:r,description:i,icon:o,action:a,footer:u,RootProps:c,TriggerProps:f,PortalProps:h,BackdropProps:p,PositionerProps:m={sideOffset:4,collisionPadding:16},PopupProps:y,children:b})=>E.jsxs(CN,{open:t,onOpenChange:n,...c,children:[E.jsx(TN,{...f,children:e}),E.jsxs(DN,{...h,children:[E.jsx(MN,{...p}),E.jsx(VN,{...m,children:E.jsx(YN,{title:r,description:i,icon:o,action:a,footer:u,...y,children:b})})]})]});WN.displayName="Popover";const KN=({children:e,...t})=>E.jsx(Gq,{"data-slot":"sheet-root",...t,children:e});KN.displayName="SheetRoot";const XN=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(vY,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};XN.displayName="SheetTrigger";const QN=({children:e,...t})=>E.jsx(BY,{"data-slot":"sheet-portal",...t,children:e});QN.displayName="SheetPortal";const sc={"sheet-backdrop":"_sheet-backdrop_1hzld_3","sheet-popup":"_sheet-popup_1hzld_17","side-right":"_side-right_1hzld_41","side-left":"_side-left_1hzld_50","side-top":"_side-top_1hzld_59","side-bottom":"_side-bottom_1hzld_68"},ZN=({className:e,...t})=>E.jsx(HY,{"data-slot":"sheet-backdrop",className:ze(sc["sheet-backdrop"],e),...t});ZN.displayName="SheetBackdrop";const NK=Dn({variants:{side:{top:sc["side-top"],right:sc["side-right"],bottom:sc["side-bottom"],left:sc["side-left"]}}}),JN=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:u,...c})=>E.jsx(oW,{render:E.jsx(zt,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:ze(sc["sheet-popup"],NK({side:e}),a),...c,children:u});JN.displayName="SheetPopup";const eI=({side:e="right",title:t,description:n,icon:r,action:i,footer:o,RootProps:a,TriggerProps:u,PortalProps:c,BackdropProps:f,PopupProps:h,trigger:p,open:m,onOpenChange:y,children:b})=>E.jsxs(KN,{open:m,onOpenChange:y,...a,children:[E.jsx(XN,{...u,children:p??(u==null?void 0:u.children)}),E.jsxs(QN,{...c,children:[E.jsx(ZN,{...f}),E.jsx(JN,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});eI.displayName="Sheet";const IK="_toast_ornow_1",tI={"toast-viewport":"_toast-viewport_ornow_1",toast:IK},VS=C.createContext(void 0);function nI(){const e=C.useContext(VS);if(!e)throw new Error(An(73));return e}let hD=0;function LK(e){return hD+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${hD}`}function rx(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const Cm=Oq(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((i,o)=>{const a=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:o,visibleIndex:a?-1:n,offsetY:r}),r+=i.height||0,a||(n+=1)}),t}),Oo={toasts:Ke(e=>e.toasts),isEmpty:Ke(e=>e.toasts.length===0),toast:Ke(Cm,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:Ke(Cm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:Ke(Cm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:Ke(Cm,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:Ke(e=>e.hovering),focused:Ke(e=>e.focused),expanded:Ke(e=>e.hovering||e.focused),expandedOrOutOfFocus:Ke(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Ke(e=>e.prevFocusElement)};let jK=class extends Ah{constructor(n){super(n,{},Oo);te(this,"timers",new Map);te(this,"areTimersPaused",!1);te(this,"setViewport",n=>{this.set("viewport",n)});te(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});te(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||LK("toast"),u={...n,id:a,transitionStatus:"starting"},c=[u,...r],f=c.filter(p=>p.transitionStatus!=="ending");if(f.length>o){const p=f.length-o,m=f.slice(-p),y=new Set(m.map(b=>b.id));this.setToasts(c.map(b=>{const v=y.has(b.id);return b.limited!==v?{...b,limited:v}:b}))}else this.setToasts(c.map(p=>p.limited?{...p,limited:!1}:p));const h=u.timeout??i;return u.type!=="loading"&&h>0&&this.scheduleTimer(a,h,()=>this.closeToast(a)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});te(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});te(this,"updateToastInternal",(n,r)=>{var v,S,x;const{timeout:i,toasts:o}=this.state,a=Oo.toast(this.state,n)??null;if(!a||a.transitionStatus==="ending")return;const u={...a,...r};this.setToasts(o.map(_=>_.id===n?{..._,...r}:_));const c=u.timeout??i,f=(a==null?void 0:a.timeout)??i,h=Object.hasOwn(r,"timeout"),p=u.transitionStatus!=="ending"&&u.type!=="loading"&&c>0,m=this.timers.has(n),y=f!==c,b=(a==null?void 0:a.type)==="loading";if(!p&&m){(S=(v=this.timers.get(n))==null?void 0:v.timeout)==null||S.clear(),this.timers.delete(n);return}if(p&&(!m||y||h||b)){const _=this.timers.get(n);_&&((x=_.timeout)==null||x.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});te(this,"closeToast",n=>{var c,f;(f=(c=Oo.toast(this.state,n))==null?void 0:c.onClose)==null||f.call(c);const{limit:r,toasts:i}=this.state;let o=0;const a=i.map(h=>{if(h.id===n)return{...h,transitionStatus:"ending",height:0};if(h.transitionStatus==="ending")return h;const p=o>=r;return o+=1,h.limited!==p?{...h,limited:p}:h}),u=this.timers.get(n);u&&u.timeout&&(u.timeout.clear(),this.timers.delete(n)),this.handleFocusManagement(n),this.setToasts(a)});te(this,"promiseToast",(n,r)=>{const i=rx(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(u=>{const c=rx(r.success,u);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),u}).catch(u=>{const c=rx(r.error,u);return this.updateToast(o,{...c,type:"error",timeout:c.timeout}),Promise.reject(u)});return{}.hasOwnProperty.call(r,"setPromise")&&r.setPromise(a),a});te(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=Vn(n);ct(this.state.viewport,r)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))})}setFocused(n){this.set("focused",n)}setHovering(n){this.set("hovering",n)}setIsWindowFocused(n){this.set("isWindowFocused",n)}setPrevFocusElement(n){this.set("prevFocusElement",n)}removeToast(n){var o,a;const r=Oo.toastIndex(this.state,n);if(r===-1)return;(a=(o=this.state.toasts[r])==null?void 0:o.onRemove)==null||a.call(o);const i=[...this.state.toasts];i.splice(r,1),this.setToasts(i)}pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(n=>{if(n.timeout){n.timeout.clear();const r=Date.now()-n.start,i=n.delay-r;n.remaining=i>0?i:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((n,r)=>{n.remaining=n.remaining>0?n.remaining:n.delay,n.timeout??(n.timeout=zi.create()),n.timeout.start(n.remaining,()=>{this.timers.delete(r),n.callback()}),n.start=Date.now()}))}restoreFocusToPrevElement(){var n;(n=this.state.prevFocusElement)==null||n.focus({preventScroll:!0})}scheduleTimer(n,r,i){const o=Date.now(),a=!Oo.expandedOrOutOfFocus(this.state),u=a?zi.create():void 0;u==null||u.start(r,()=>{this.timers.delete(n),i()}),this.timers.set(n,{timeout:u,start:a?o:0,delay:r,remaining:r,callback:i})}setToasts(n){const r={toasts:n};n.length===0&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(n){var c,f;const r=Gr(Mt(this.state.viewport));if(!this.state.viewport||!ct(this.state.viewport,r)||!Og(r))return;const i=Oo.toasts(this.state),o=Oo.toastIndex(this.state,n);let a=null,u=o+1;for(;u<i.length;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u+=1}if(!a)for(u=o-1;u>=0;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u-=1}a?(f=(c=a.ref)==null?void 0:c.current)==null||f.focus():this.restoreFocusToPrevElement()}};const FK=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=fr(()=>new jK({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return _h(o.disposeEffect),C.useEffect(function(){return i?i[" subscribe"](({action:a,options:u})=>{const c=u.id;a==="promise"&&u.promise?o.promiseToast(u.promise,u):a==="update"&&c?o.updateToast(c,u):a==="close"&&c?o.closeToast(c):o.addToast(u)}):void 0},[o,n,i]),o.useSyncedValues({timeout:n,limit:r}),E.jsx(VS.Provider,{value:o,children:t})};function zK(){const e=C.useContext(VS);if(!e)throw new Error(An(73));const t=e.useState("toasts");return C.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const BK=FK,rI=zK,iI=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:u,portalSubtree:c}=dN({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!u?null:E.jsxs(C.Fragment,{children:[c,u&&yn.createPortal(n,u)]})}),UK=iI;let HK=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const GK=C.forwardRef(function(e,t){var N;const{render:n,className:r,children:i,...o}=e,a=nI(),u=Ea(),c=C.useRef(!1),f=C.useRef(!1),h=a.useState("isEmpty"),p=a.useState("toasts"),m=a.useState("focused"),y=a.useState("expanded"),b=a.useState("prevFocusElement"),v=((N=p[0])==null?void 0:N.height)??0,S=C.useMemo(()=>p.some(M=>M.transitionStatus==="ending"),[p]);C.useEffect(()=>{const M=a.state.viewport;if(!M)return;function z(j){h||j.key==="F6"&&j.target!==M&&(j.preventDefault(),a.setPrevFocusElement(Gr(Mt(M))),M==null||M.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const G=fn(M);return G.addEventListener("keydown",z),()=>{G.removeEventListener("keydown",z)}},[a,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const z=fn(M);function G(F){F.target===z&&(a.setIsWindowFocused(!1),a.pauseTimers())}function j(F){if(F.relatedTarget||F.target===z)return;const U=Vn(F),q=Gr(Mt(M));(!ct(M,U)||!Og(q))&&a.resumeTimers(),u.start(0,()=>a.setIsWindowFocused(!0))}return z.addEventListener("blur",G,!0),z.addEventListener("focus",j,!0),()=>{z.removeEventListener("blur",G,!0),z.removeEventListener("focus",j,!0)}},[a,u,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const z=Mt(M);return z.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{z.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function x(M){var G,j,F;const z=a.state.viewport;z&&(c.current=!0,M.relatedTarget===z?(F=(j=(G=p[0])==null?void 0:G.ref)==null?void 0:j.current)==null||F.focus():a.restoreFocusToPrevElement())}function _(M){M.key==="Tab"&&M.shiftKey&&M.target===a.state.viewport&&(M.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}C.useEffect(()=>{!a.state.isWindowFocused||S||!f.current||(a.resumeTimers(),a.setHovering(!1),f.current=!1)},[S,a]);function k(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function T(){S?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function A(){if(c.current){c.current=!1;return}m||Og(Mt(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function D(M){!m||ct(a.state.viewport,M.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const O={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:k,onMouseMove:k,onMouseLeave:T,onFocus:A,onBlur:D,onKeyDown:_,onClick:A},$={expanded:y},B=Dr("div",e,{ref:[t,a.setViewport],state:$,props:[O,{style:{[HK.frontmostHeight]:v?`${v}px`:void 0}},o,{children:E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),i,!h&&b&&E.jsx(Qo,{onFocus:x})]})}]}),L=C.useMemo(()=>p.filter(M=>M.priority==="high"),[p]);return E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),B,!m&&L.length>0&&E.jsx("div",{style:jS,children:L.map(M=>E.jsxs("div",{role:"alert","aria-atomic":!0,children:[E.jsx("div",{children:M.title}),E.jsx("div",{children:M.description})]},M.id))})]})}),oI=C.createContext(void 0);function VK(){const e=C.useContext(oI);if(!e)throw new Error(An(66));return e}let ll=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const qK={...of,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Sd=40,YK=10,Ls=.5,WK=1;function pD(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function KK(e){const t=window.getComputedStyle(e).transform;let n=0,r=0,i=1;if(t&&t!=="none"){const o=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(o){const a=o[1].split(", ").map(parseFloat);a.length===6?(n=a[4],r=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(n=a[12],r=a[13],i=a[0])}}return{x:n,y:r,scale:i}}const XK=C.forwardRef(function(e,t){var le;const{toast:n,render:r,className:i,swipeDirection:o=["down","right"],...a}=e,u=((le=n.positionerProps)==null?void 0:le.anchor)!==void 0;let c=[];u||(c=Array.isArray(o)?o:[o]);const f=c.length>0,h=nI(),[p,m]=C.useState(void 0),[y,b]=C.useState(!1),[v,S]=C.useState(!1),[x,_]=C.useState(!1),[k,T]=C.useState({x:0,y:0}),[A,D]=C.useState({x:0,y:0,scale:1}),[O,$]=C.useState(),[B,L]=C.useState(),[N,M]=C.useState(null),z=C.useRef(null),G=C.useRef({x:0,y:0}),j=C.useRef({x:0,y:0,scale:1}),F=C.useRef(void 0),U=C.useRef(0),q=C.useRef(!1),W=C.useRef({x:0,y:0}),I=C.useRef(!1),Y=h.useState("toastIndex",n.id),J=h.useState("toastVisibleIndex",n.id),H=h.useState("toastOffsetY",n.id),ie=h.useState("focused"),re=h.useState("expanded");Th({open:n.transitionStatus!=="ending",ref:z,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const he=tt((oe=!1)=>{const me=z.current;if(!me)return;const ae=me.style.height;me.style.height="auto";const Oe=me.offsetHeight;me.style.height=ae;function Te(){h.updateToastInternal(n.id,{ref:z,height:Oe,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?yn.flushSync(Te):Te()});gt(he,[he]);function ve(oe,me){let ae=oe,Oe=me;return!c.includes("left")&&!c.includes("right")?ae=oe>0?oe**Ls:-(Math.abs(oe)**Ls):(!c.includes("right")&&oe>0&&(ae=oe**Ls),!c.includes("left")&&oe<0&&(ae=-(Math.abs(oe)**Ls))),!c.includes("up")&&!c.includes("down")?Oe=me>0?me**Ls:-(Math.abs(me)**Ls):(!c.includes("down")&&me>0&&(Oe=me**Ls),!c.includes("up")&&me<0&&(Oe=-(Math.abs(me)**Ls))),{x:ae,y:Oe}}function Re(oe){var ae;if(oe.button!==0)return;oe.pointerType==="touch"&&h.pauseTimers();const me=Vn(oe.nativeEvent);if(!(me&&me.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(q.current=!1,F.current=void 0,U.current=0,G.current={x:oe.clientX,y:oe.clientY},W.current=G.current,z.current){const Oe=KK(z.current);j.current=Oe,D(Oe),T({x:Oe.x,y:Oe.y})}h.setHovering(!0),b(!0),S(!1),M(null),I.current=!0,(ae=z.current)==null||ae.setPointerCapture(oe.pointerId)}}function ce(oe){if(!y)return;oe.preventDefault(),I.current&&(G.current={x:oe.clientX,y:oe.clientY},I.current=!1);const{clientY:me,clientX:ae,movementX:Oe,movementY:Te}=oe;(Te<0&&me>W.current.y||Te>0&&me<W.current.y)&&(W.current={x:W.current.x,y:me}),(Oe<0&&ae>W.current.x||Oe>0&&ae<W.current.x)&&(W.current={x:ae,y:W.current.y});const _e=ae-G.current.x,De=me-G.current.y,ue=me-W.current.y,Se=ae-W.current.x;if(!v&&Math.sqrt(_e*_e+De*De)>=WK&&(S(!0),N===null)){const Ut=c.includes("left")||c.includes("right"),Ot=c.includes("up")||c.includes("down");if(Ut&&Ot){const Me=Math.abs(_e),Xe=Math.abs(De);M(Me>Xe?"horizontal":"vertical")}}let ke;if(!F.current)N==="vertical"?De>0?ke="down":De<0&&(ke="up"):N==="horizontal"?_e>0?ke="right":_e<0&&(ke="left"):Math.abs(_e)>=Math.abs(De)?ke=_e>0?"right":"left":ke=De>0?"down":"up",ke&&c.includes(ke)&&(F.current=ke,U.current=pD(ke,_e,De),m(ke));else{const Ut=F.current,Ot=pD(Ut,Se,ue);Ot>Sd?(q.current=!1,m(Ut)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&U.current-Ot>=YK&&(q.current=!0)}const Pe=ve(_e,De);let Le=j.current.x,st=j.current.y;N==="horizontal"?(c.includes("left")||c.includes("right"))&&(Le+=Pe.x):(N==="vertical"||(c.includes("left")||c.includes("right"))&&(Le+=Pe.x),(c.includes("up")||c.includes("down"))&&(st+=Pe.y)),T({x:Le,y:st})}function Ie(oe){var _e;if(!y)return;if(b(!1),S(!1),M(null),(_e=z.current)==null||_e.releasePointerCapture(oe.pointerId),q.current){T({x:A.x,y:A.y}),m(void 0);return}let me=!1;const ae=k.x-A.x,Oe=k.y-A.y;let Te;for(const De of c){switch(De){case"right":ae>Sd&&(me=!0,Te="right");break;case"left":ae<-Sd&&(me=!0,Te="left");break;case"down":Oe>Sd&&(me=!0,Te="down");break;case"up":Oe<-Sd&&(me=!0,Te="up");break}if(me)break}me?(m(Te),_(!0),h.closeToast(n.id)):(T({x:A.x,y:A.y}),m(void 0))}function We(oe){if(oe.key==="Escape"){if(!z.current||!ct(z.current,Gr(Mt(z.current))))return;h.closeToast(n.id)}}C.useEffect(()=>{if(!f)return;const oe=z.current;if(!oe)return;function me(ae){ct(oe,ae.target)&&ae.preventDefault()}return oe.addEventListener("touchmove",me,{passive:!1}),()=>{oe.removeEventListener("touchmove",me)}},[f]);function X(){if(!y&&k.x===A.x&&k.y===A.y&&!x)return{[ll.swipeMovementX]:"0px",[ll.swipeMovementY]:"0px"};const oe=k.x-A.x,me=k.y-A.y;return{transition:y?"none":void 0,transform:y?`translateX(${k.x}px) translateY(${k.y}px) scale(${A.scale})`:void 0,[ll.swipeMovementX]:`${oe}px`,[ll.swipeMovementY]:`${me}px`}}const Z=n.priority==="high",ne={role:Z?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":O,"aria-describedby":B,"aria-hidden":Z&&!ie?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?ce:void 0,onPointerUp:f?Ie:void 0,onKeyDown:We,inert:LS(n.limited),style:{...X(),[ll.index]:n.transitionStatus==="ending"?Y:J,[ll.offsetY]:`${H}px`,[ll.height]:n.height?`${n.height}px`:void 0}},xe=C.useMemo(()=>({rootRef:z,toast:n,titleId:O,setTitleId:$,descriptionId:B,setDescriptionId:L,swiping:y,swipeDirection:p,recalculateHeight:he,index:Y,visibleIndex:J,expanded:re}),[n,O,B,y,p,he,Y,J,re]),ge={transitionStatus:n.transitionStatus,expanded:re,limited:n.limited||!1,type:n.type,swiping:xe.swiping,swipeDirection:xe.swipeDirection},Ce=Dr("div",e,{ref:[t,xe.rootRef],state:ge,stateAttributesMapping:qK,props:[ne,a]});return E.jsx(oI.Provider,{value:xe,children:Ce})}),QK=C.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:u,setDescriptionId:c}=VK(),f=o??u.description,h=!!f,p=Jl(i);gt(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const m={type:u.type},y=Dr("p",e,{ref:t,state:m,props:{...a,id:p,children:f}});return h?y:null}),sI=()=>{const{toasts:e}=rI();return e.map(t=>E.jsx(XK,{toast:t,className:tI.toast,render:E.jsx(zt,{"data-slot":"toast",children:E.jsx(Fe,{size:0,shade:"muted",render:E.jsx(QK,{})})})},t.id))};sI.displayName="ToastList";const aI=({position:e="bottom"})=>E.jsx(UK,{children:E.jsx(GK,{className:tI["toast-viewport"],"data-position":e,children:E.jsx(sI,{})})});aI.displayName="Toaster";const lI=C.createContext(void 0);function ZK(){return C.useContext(lI)}const uI=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new zi,currentIdRef:{current:null},currentContextRef:{current:null}});function JK(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=C.useRef(n),o=C.useRef(n),a=C.useRef(null),u=C.useRef(null),c=Ea();return E.jsx(uI.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:u,timeout:c}),[r,c]),children:t})}function eX(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=C.useContext(uI),{currentIdRef:a,delayRef:u,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:m}=o,[y,b]=C.useState(!1);return gt(()=>{function v(){var S;b(!1),(S=h.current)==null||S.setIsInstantPhase(!1),a.current=null,h.current=null,u.current=f.current}if(a.current&&!i&&a.current===r){if(b(!1),c){const S=r;return m.start(c,()=>{n.select("open")||a.current&&a.current!==S||v()}),()=>{m.clear()}}v()}},[i,r,a,u,c,f,h,m,n]),gt(()=>{if(!i)return;const v=h.current,S=a.current;m.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,u.current={open:0,close:sg(f.current,"close")},S!==null&&S!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,qt(AS))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,u,c,f,h,m]),gt(()=>()=>{h.current=null},[h]),C.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:y}),[p,u,y])}const tX=function(e){const{delay:t,closeDelay:n,timeout:r=400}=e,i=C.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),o=C.useMemo(()=>({open:t,close:n}),[t,n]);return E.jsx(lI.Provider,{value:i,children:E.jsx(JK,{delay:o,timeoutMs:r,children:e.children})})},cI=({children:e,...t})=>E.jsx(tX,{"data-slot":"tooltip-provider",...t,children:e});cI.displayName="TooltipProvider";const fI=C.createContext(void 0);function Iy(e){const t=C.useContext(fI);if(t===void 0&&!e)throw new Error(An(72));return t}const nX={...$S,disabled:Ke(e=>e.disabled),instantType:Ke(e=>e.instantType),isInstantPhase:Ke(e=>e.isInstantPhase),trackCursorAxis:Ke(e=>e.trackCursorAxis),disableHoverablePopup:Ke(e=>e.disableHoverablePopup),lastOpenChangeReason:Ke(e=>e.openChangeReason),closeDelay:Ke(e=>e.closeDelay),hasViewport:Ke(e=>e.hasViewport)};let rX=class dI extends Ah{constructor(n){super({...iX(),...n},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Oh},nX);te(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===Xn,a=n&&i===ig,u=!n&&(i===ka||i===$y);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const c=()=>{var y;const p={open:n,openChangeReason:i};a?p.instantType="focus":u?p.instantType="dismiss":i===Xn&&(p.instantType=void 0);const m=((y=r.trigger)==null?void 0:y.id)??null;(m||n)&&(p.activeTriggerId=m,p.activeTriggerElement=r.trigger??null),this.update(p)};o?yn.flushSync(c):c()})}static useStore(n,r){const i=fr(()=>new dI(r)).current,o=n??i,a=TS({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function iX(){return{...OS(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function oX(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var y;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",u=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((y=t.dataRef.current.openEvent)==null?void 0:y.type)||"")&&t.pointerType!=="touch";let f=o.width,h=o.height,p=o.x,m=o.y;return n==null&&t.x&&a&&(n=o.x-t.x),r==null&&t.y&&u&&(r=o.y-t.y),p-=n||0,m-=r||0,f=0,h=0,!i||c?(f=t.axis==="y"?o.width:0,h=t.axis==="x"?o.height:0,p=a&&t.x!=null?t.x:p,m=u&&t.y!=null?t.y:m):i&&!c&&(h=t.axis==="x"?o.height:h,f=t.axis==="y"?o.width:f),i=!0,{width:f,height:h,x:p,y:m,top:m,right:p+f,bottom:m+h,left:p}}}}function mD(e){return e!=null&&e.clientX!=null}function sX(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:u=!0,axis:c="both"}=t,f=C.useRef(!1),h=C.useRef(null),[p,m]=C.useState(),[y,b]=C.useState([]),v=tt((T,A,D)=>{f.current||a.current.openEvent&&!mD(a.current.openEvent)||n.set("positionReference",oX(D??o,{x:T,y:A,axis:c,dataRef:a,pointerType:p}))}),S=tt(T=>{r?h.current||b([]):v(T.clientX,T.clientY,T.currentTarget)}),x=zl(p)?i:r,_=C.useCallback(()=>{if(!x||!u)return;const T=fn(i);function A(D){const O=Vn(D);ct(i,O)?(T.removeEventListener("mousemove",A),h.current=null):v(D.clientX,D.clientY)}if(!a.current.openEvent||mD(a.current.openEvent)){T.addEventListener("mousemove",A);const D=()=>{T.removeEventListener("mousemove",A),h.current=null};return h.current=D,D}n.set("positionReference",o)},[x,u,i,a,o,n,v]);C.useEffect(()=>_(),[_,y]),C.useEffect(()=>{u&&!i&&(f.current=!1)},[u,i]),C.useEffect(()=>{!u&&r&&(f.current=!0)},[u,r]);const k=C.useMemo(()=>{function T(A){m(A.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:S,onMouseEnter:S}},[S]);return C.useMemo(()=>u?{reference:k,trigger:k}:{},[u,k])}const aX=$P(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:o="none",actionsRef:a,onOpenChange:u,onOpenChangeComplete:c,handle:f,triggerId:h,defaultTriggerId:p=null,children:m}=e,y=rX.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});vS(()=>{r===void 0&&y.state.open===!1&&n===!0&&y.update({open:!0,activeTriggerId:p})}),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",h),y.useContextCallback("onOpenChange",u),y.useContextCallback("onOpenChangeComplete",c);const b=y.useState("open"),v=!t&&b,S=y.useState("activeTriggerId"),x=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),gt(()=>{b&&t&&y.setOpen(!1,qt(Iq))},[b,t,y]),y.useSyncedValue("disabled",t),ES(y);const{forceUnmount:_,transitionStatus:k}=kS(v,y),T=y.useState("isInstantPhase"),A=y.useState("instantType"),D=y.useState("lastOpenChangeReason"),O=C.useRef(null);gt(()=>{k==="ending"&&D===AS||k!=="ending"&&T?(A!=="delay"&&(O.current=A),y.set("instantType","delay")):O.current!==null&&(y.set("instantType",O.current),O.current=null)},[k,T,D,A,y]),gt(()=>{v&&S==null&&y.set("payload",void 0)},[y,S,v]);const $=C.useCallback(()=>{y.setOpen(!1,lX(y,DS))},[y]);C.useImperativeHandle(a,()=>({unmount:_,close:$}),[_,$]);const B=y.useState("floatingRootContext"),L=MS(B,{enabled:!t,referencePress:!0}),N=sX(B,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:M,getFloatingProps:z,getTriggerProps:G}=Dh([L,N]),j=C.useMemo(()=>M(),[M]),F=C.useMemo(()=>G(),[G]),U=C.useMemo(()=>z(),[z]);return y.useSyncedValues({activeTriggerProps:j,inactiveTriggerProps:F,popupProps:U}),E.jsx(fI.Provider,{value:y,children:typeof m=="function"?m({payload:x}):m})});function lX(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const hI=({children:e,...t})=>E.jsx(aX,{"data-slot":"tooltip-root",...t,children:e});hI.displayName="TooltipRoot";let uX=(function(e){return e[e.popupOpen=Pg.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const cX=600,ix=_V&&xP;function fX(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=Ea(),h=C.useRef(!0);C.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const y=fn(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&gn(x)&&x===Gr(Mt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),ix&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),ix&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function m(y){if(y.reason===ka||y.reason===$y){const b=n.select("domReferenceElement");Nt(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(m){const y=m.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Vn(m.nativeEvent);if(Nt(b)){if(ix&&!m.relatedTarget){if(!h.current&&!Oy(b))return}else if(!Og(b))return}const v=Mg(m.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=m,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,qt(ig,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,qt(ig,S,x))})},onBlur(m){u.current=!1,c.current=null;const y=m.relatedTarget,b=m.nativeEvent,v=Nt(y)&&y.hasAttribute(Lc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var _;const S=n.select("domReferenceElement"),x=Gr(S?S.ownerDocument:document);!y&&x===S||ct((_=i.current.floatingContext)==null?void 0:_.refs.floating.current,x)||ct(S,x)||v||Mg(y??x,n.context.triggerElements)||n.setOpen(!1,qt(ig,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const dX=iq(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:u,closeDelay:c,id:f,...h}=e,p=Iy(!0),m=(i==null?void 0:i.store)??p;if(!m)throw new Error(An(82));const y=IS(f),b=m.useState("isTriggerActive",y),v=m.useState("isOpenedByTrigger",y),S=m.useState("floatingRootContext"),x=C.useRef(null),_=u??cX,k=c??0,{registerTrigger:T,isMountedByThisTrigger:A}=CS(y,x,m,{payload:o,closeDelay:k}),D=ZK(),{delayRef:O,isInstantPhase:$,hasProvider:B}=eX(S,{open:v});m.useSyncedValue("isInstantPhase",$);const L=m.useState("disabled"),N=a??L,M=m.useState("trackCursorAxis"),z=m.useState("disableHoverablePopup"),G=RN(S,{enabled:!N,mouseOnly:!0,move:!1,handleClose:!z&&M!=="both"?_N():null,restMs(){const q=D==null?void 0:D.delay,W=typeof O.current=="object"?O.current.open:void 0;let I=_;return B&&(W!==0?I=u??q??_:I=0),I},delay(){const q=typeof O.current=="object"?O.current.close:void 0;let W=k;return c==null&&B&&(W=q),{close:W}},triggerElementRef:x,isActiveTrigger:b}),j=fX(S,{enabled:!N}).reference,F={open:v},U=m.useState("triggerProps",A);return Dr("button",e,{state:F,ref:[t,T,x],props:[G,j,U,{id:y,[uX.triggerDisabled]:N?"":void 0},h],stateAttributesMapping:PS})}),pI=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(dX,{"data-slot":"tooltip-trigger",render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};pI.displayName="TooltipTrigger";const mI=C.createContext(void 0);function hX(){const e=C.useContext(mI);if(e===void 0)throw new Error(An(70));return e}const pX=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Iy().useState("mounted")||n?E.jsx(mI.Provider,{value:n,children:E.jsx(iI,{ref:t,...r})}):null}),gI=({children:e,...t})=>E.jsx(pX,{"data-slot":"tooltip-portal",...t,children:e});gI.displayName="TooltipPortal";const yI=C.createContext(void 0);function mX(){const e=C.useContext(yI);if(e===void 0)throw new Error(An(71));return e}const gX=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="top",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=XP,...S}=e,x=Iy(),_=hX(),k=x.useState("open"),T=x.useState("mounted"),A=x.useState("trackCursorAxis"),D=x.useState("disableHoverablePopup"),O=x.useState("floatingRootContext"),$=x.useState("instantType"),B=x.useState("transitionStatus"),L=x.useState("hasViewport"),N=GN({anchor:i,positionMethod:o,floatingRootContext:O,mounted:T,side:a,sideOffset:c,align:u,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:y,arrowPadding:m,disableAnchorTracking:b,keepMounted:_,collisionAvoidance:v,adaptiveOrigin:L?UN:void 0}),M=C.useMemo(()=>{const F={};return(!k||A==="both"||D)&&(F.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...N.positionerStyles,...F}}},[k,A,D,T,N.positionerStyles]),z=C.useMemo(()=>({open:k,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:A!=="none"?"tracking-cursor":$}),[k,N.side,N.align,N.anchorHidden,A,$]),G=C.useMemo(()=>({...z,arrowRef:N.arrowRef,arrowStyles:N.arrowStyles,arrowUncentered:N.arrowUncentered}),[z,N.arrowRef,N.arrowStyles,N.arrowUncentered]),j=Dr("div",e,{state:z,props:[M,Ny(B),S],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:tu});return E.jsx(yI.Provider,{value:G,children:j})}),bI=({children:e,...t})=>E.jsx(gX,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});bI.displayName="TooltipPositioner";const yX={...tu,...of},bX=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=Iy(),{side:a,align:u}=mX(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),m=o.useState("floatingRootContext");Th({open:c,ref:o.context.popupRef,onComplete(){var v,S;c&&((S=(v=o.context).onOpenChangeComplete)==null||S.call(v,!0))}});const y=o.useState("disabled"),b=o.useState("closeDelay");return qN(m,{enabled:!y,closeDelay:b}),Dr("div",e,{state:{open:c,side:a,align:u,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,Ny(h),i],stateAttributesMapping:yX})}),vI=({children:e,...t})=>E.jsx(bX,{"data-slot":"tooltip-popup",render:E.jsx(zt,{py:2,px:2,inverted:!0}),"data-is-popup":!0,...t,children:E.jsx(Fe,{size:-1,children:e})});vI.displayName="TooltipPopup";const Il=({trigger:e,delay:t,open:n,onOpenChange:r,ProviderProps:i,RootProps:o,TriggerProps:a,PortalProps:u,PositionerProps:c={sideOffset:8,collisionPadding:16},PopupProps:f,children:h})=>E.jsx(cI,{delay:t,...i,children:E.jsxs(hI,{open:n,onOpenChange:r,...o,children:[E.jsx(pI,{...a,children:e}),E.jsx(gI,{...u,children:E.jsx(bI,{...c,children:E.jsx(vI,{...f,children:h})})})]})});Il.displayName="Tooltip";const xI=({tooltip:e,children:t})=>E.jsx(Il,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:E.jsx("div",{})},delay:300,children:e});xI.displayName="ButtonTooltipWrapper";const Ui=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:u,...c})=>E.jsx(er,{condition:!!e,render:E.jsx(xI,{tooltip:e}),children:E.jsx(GH,{nativeButton:!c.render,"data-slot":"button",className:ze(xr.button,mH({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:E.jsxs(pS,{ay:"center",ax:"center",children:[E.jsx(H$,{loading:o,children:u}),E.jsx(oP,{loading:o})]})})});Ui.displayName="Button";function vX({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}let gD=0;function xX(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(gD+=1,r(`${t}-${gD}`))},[n,t]),i}const yD=SH.useId;function wX(e,t){if(yD!==void 0){const n=yD();return e??`${t}-${n}`}return xX(e,t)}function SX(e){return wX(e,"base-ui")}const CX=C.createContext(void 0);function EX(e=!0){const t=C.useContext(CX);if(t===void 0&&!e)throw new Error(yS(7));return t}const kX=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function RX(){return C.useContext(kX)}let _X=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function TX(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=RX(),m=C.useRef(-1),[y,b]=C.useState(o??(i===_X.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return T1(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),T1(()=>{if(o==null)return c(x=>{var k;const _=v.current?(k=x.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}function AX(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=G$(),{ref:i,index:o}=TX(e),a=n===o,u=C.useRef(null),c=O1(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const f=u.current;if(!t||!f)return;const h=f.hasAttribute("disabled")||f.ariaDisabled==="true";!a&&!h&&f.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function DX(e){const{render:t,className:n,state:r=Vs,props:i=AA,refs:o=AA,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=AX({metadata:a});return bS(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function MX(e,t,n,r){let i=!1,o=!1;const a=Vs;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const OX="none",$X=C.forwardRef(function(e,t){const{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:a,pressed:u,render:c,type:f,value:h,nativeButton:p=!0,...m}=e,y=SX(h||void 0),b=EX(),v=(b==null?void 0:b.value)??[],S=b?void 0:r,x=(i||(b==null?void 0:b.disabled))??!1,[_,k]=vX({controlled:b?y!==void 0&&v.indexOf(y)>-1:u,default:S,name:"Toggle",state:"pressed"}),T=_1((N,M)=>{var z;y&&((z=b==null?void 0:b.setGroupValue)==null||z.call(b,y,N,M)),a==null||a(N,M)}),{getButtonProps:A,buttonRef:D}=W$({disabled:x,native:p}),O={disabled:x,pressed:_},$=[D,t],B=[{"aria-pressed":_,onClick(N){const M=!_,z=MX(OX,N.nativeEvent);T(M,z),!z.isCanceled&&k(M)}},m,A],L=bS("button",e,{enabled:!b,state:O,ref:$,props:B});return b?E.jsx(DX,{tag:"button",render:c,className:n,state:O,refs:$,props:B}):L}),rh=({text:e,icon:t,children:n,...r})=>E.jsx($X,{...r,render:(i,o)=>{const a=o.pressed?e==null?void 0:e.pressed:e==null?void 0:e.unpressed,u=o.pressed?t==null?void 0:t.pressed:t==null?void 0:t.unpressed;return E.jsxs(Ui,{...i,children:[u,a??n]})}});rh.displayName="ToggleButton";const PX="_badge_qf71h_3",NX="_colored_qf71h_32",pc={badge:PX,"size-small":"_size-small_qf71h_21","size-medium":"_size-medium_qf71h_24","size-large":"_size-large_qf71h_27",colored:NX},IX=pc.colored,qS=Object.fromEntries(Object.entries(mS).map(([e,t])=>[e,`${t} ${IX}`])),LX=Dn({variants:{size:{small:pc["size-small"],medium:pc["size-medium"],large:pc["size-large"]},color:qS},defaultVariants:{size:"medium"}}),cn=({size:e,color:t,className:n,children:r,...i})=>E.jsx(Ze,{"data-slot":"badge",className:ze(pc.badge,LX({size:e,color:t}),n),ay:"center",gap:1,...i,children:E.jsx(Fe,{"data-slot":"badge-text",className:pc["badge-text"],size:-1,weight:"bold",children:r})});cn.displayName="Badge";const jX="_status_iof57_1",Hg={status:jX,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},FX=Dn({variants:{inverted:{true:Hg["toggle-inverted"]},pulse:{true:Hg["toggle-pulse"]},color:mS}}),Ly=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>E.jsxs(er,{condition:!!i,render:E.jsx(Ze,{"data-slot":"status",className:ze(Hg.status,r),ay:"center",gap:2,...o}),children:[E.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:ze(Hg["status-dot"],FX({pulse:e,inverted:t,color:n}))}),i&&E.jsx(Fe,{"data-slot":"status-text",size:0,children:i})]});Ly.displayName="Status";const bD={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},zX={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function BX(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();bD[i]?t.add(bD[i]):n=i}return{modifiers:t,key:n}}function UX(e,t){const{modifiers:n,key:r}=BX(t);return n.has("Meta")!==e.metaKey||n.has("Control")!==e.ctrlKey||n.has("Alt")!==e.altKey||n.has("Shift")!==e.shiftKey?!1:r?e.key.toLowerCase()===r:n.has(e.key)}function HX(e){return e.map(t=>zX[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const GX="_kbd_19d6z_1",VX={kbd:GX},wI=({className:e,active:t,hotkey:n,...r})=>{const[i,o]=C.useState(!1);return C.useEffect(()=>{if(!n||t!==void 0)return;const a=f=>{UX(f,n)&&o(!0)},u=()=>o(!1),c=()=>o(!1);return window.addEventListener("keydown",a),window.addEventListener("keyup",u),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",u),window.removeEventListener("blur",c)}},[n,t]),E.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:ze(VX.kbd,e),...r,children:n?HX(n):null})};wI.displayName="Kbd";const qX="_progress_ttyvd_1",qs={progress:qX,"progress-label":"_progress-label_ttyvd_11","progress-value":"_progress-value_ttyvd_18","progress-track":"_progress-track_ttyvd_27","progress-indicator":"_progress-indicator_ttyvd_35","size-small":"_size-small_ttyvd_43","size-medium":"_size-medium_ttyvd_46","size-large":"_size-large_ttyvd_49"},YX=Dn({variants:{size:{small:qs["size-small"],medium:qs["size-medium"],large:qs["size-large"]},color:qS},defaultVariants:{size:"medium"}}),WX=()=>{},SI=typeof document<"u"?C.useLayoutEffect:WX,vD={};function YS(e,t){const n=C.useRef(vD);return n.current===vD&&(n.current=e(t)),n}function KX(e){const t=YS(XX,e).current;return t.next=e,SI(t.effect),t}function XX(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const xD=new Map;function QX(e,t){const n=JSON.stringify({locale:e,options:t}),r=xD.get(n);if(r)return r;const i=new Intl.NumberFormat(e,t);return xD.set(n,i),i}function wD(e,t,n){return e==null?"":QX(t,n).format(e)}function ZX(e,t,n){return e==null?"":n?wD(e,t,n):wD(e/100,t,{style:"percent"})}function CI(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function SD(e,t,n,r){const i=YS(EI).current;return eQ(i,e,t,n,r)&&kI(i,[e,t,n,r]),i.callback}function JX(e){const t=YS(EI).current;return tQ(t,e)&&kI(t,e),t.callback}function EI(){return{callback:null,cleanup:null,refs:[]}}function eQ(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function tQ(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function kI(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const nQ=parseInt(C.version,10);function rQ(e){return nQ>=e}function CD(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(rQ(19)?n==null?void 0:n.ref:t.ref)??null}function W1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function iQ(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function oQ(e,t){return typeof e=="function"?e(t):e}function sQ(e,t){return typeof e=="function"?e(t):e}const nc=Object.freeze({}),Id={};function aQ(e,t,n,r,i){let o={...K1(e,Id)};return t&&(o=RI(o,t)),o}function lQ(e){if(e.length===0)return Id;if(e.length===1)return K1(e[0],Id);let t={...K1(e[0],Id)};for(let n=1;n<e.length;n+=1)t=RI(t,e[n]);return t}function RI(e,t){return _I(t)?t(e):uQ(e,t)}function uQ(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=W1(e.style,r);break}case"className":{e[n]=TI(e.className,r);break}default:cQ(n,r)?e[n]=fQ(e[n],r):e[n]=r}}return e}function cQ(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 _I(e){return typeof e=="function"}function K1(e,t){return _I(e)?e(t):e??Id}function fQ(e,t){return t?e?n=>{if(hQ(n)){const i=n;dQ(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function dQ(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function TI(e,t){return t?e?t+" "+e:t:e}function hQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Ph(e,t,n={}){const r=t.render,i=pQ(t,n);if(n.enabled===!1)return null;const o=n.state??nc;return gQ(e,r,i,o)}function pQ(e,t={}){const{className:n,style:r,render:i}=e,{state:o=nc,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?oQ(n,o):void 0,p=f?sQ(r,o):void 0,m=f?iQ(o,c):nc,y=f?W1(m,Array.isArray(u)?lQ(u):u)??nc:nc;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=JX([y.ref,CD(i),...a]):y.ref=SD(y.ref,CD(i),a):SD(null,null)),f?(h!==void 0&&(y.className=TI(y.className,h)),p!==void 0&&(y.style=W1(y.style,p)),y):nc}const mQ=Symbol.for("react.lazy");function gQ(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=aQ(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===mQ&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return yQ(e,n);throw new Error(CI(8))}function yQ(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const AI=C.createContext(void 0);function jy(){const e=C.useContext(AI);if(e===void 0)throw new Error(CI(51));return e}let ox=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const Nh={status(e){return e==="progressing"?{[ox.progressing]:""}:e==="complete"?{[ox.complete]:""}:e==="indeterminate"?{[ox.indeterminate]:""}:null}};function bQ(e,t){return t==null?"indeterminate progress":e||`${t}%`}const vQ=C.forwardRef(function(e,t){const{format:n,getAriaValueText:r=bQ,locale:i,max:o=100,min:a=0,value:u,render:c,className:f,...h}=e,[p,m]=C.useState(),y=KX(n);let b="indeterminate";Number.isFinite(u)&&(b=u===o?"complete":"progressing");const v=ZX(u,i,y.current),S=C.useMemo(()=>({status:b}),[b]),x={"aria-labelledby":p,"aria-valuemax":o,"aria-valuemin":a,"aria-valuenow":u??void 0,"aria-valuetext":r(v,u),role:"progressbar"},_=C.useMemo(()=>({formattedValue:v,max:o,min:a,setLabelId:m,state:S,status:b,value:u}),[v,o,a,m,S,b,u]),k=Ph("div",e,{state:S,ref:t,props:[x,h],stateAttributesMapping:Nh});return E.jsx(AI.Provider,{value:_,children:k})}),xQ={...as};let ED=0;function wQ(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(ED+=1,r(`${t}-${ED}`))},[n,t]),i}const kD=xQ.useId;function SQ(e,t){if(kD!==void 0){const n=kD();return e??`${t}-${n}`}return wQ(e,t)}function CQ(e){return SQ(e,"base-ui")}const EQ=C.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,a=CQ(i),{setLabelId:u,state:c}=jy();return SI(()=>(u(a),()=>u(void 0)),[a,u]),Ph("span",e,{state:c,ref:t,props:[{id:a},o],stateAttributesMapping:Nh})}),kQ=C.forwardRef(function(e,t){const{className:n,render:r,children:i,...o}=e,{value:a,formattedValue:u,state:c}=jy(),f=a==null?"indeterminate":u,h=a==null?null:u;return Ph("span",e,{state:c,ref:t,props:[{"aria-hidden":!0,children:typeof i=="function"?i(f,a):h},o],stateAttributesMapping:Nh})}),RQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{state:o}=jy();return Ph("div",e,{state:o,ref:t,props:i,stateAttributesMapping:Nh})});function _Q(e,t,n){return(e-t)*100/(n-t)}const TQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{max:o,min:a,value:u,state:c}=jy(),f=Number.isFinite(u)&&u!==null?_Q(u,a,o):null,h=C.useCallback(()=>f==null?{}:{insetInlineStart:0,height:"inherit",width:`${f}%`},[f]);return Ph("div",e,{state:c,ref:t,props:[{style:h()},i],stateAttributesMapping:Nh})}),WS=({value:e=0,label:t,size:n,color:r,className:i,RootProps:o,TrackProps:a,IndicatorProps:u,ValueProps:c,LabelProps:f})=>E.jsxs(vQ,{"data-slot":"progress",className:ze(qs.progress,YX({size:n,color:r}),i),value:e,...o,children:[t&&E.jsx(EQ,{"data-slot":"progress-label",className:qs["progress-label"],...f,children:t}),E.jsx(kQ,{"data-slot":"progress-value",className:qs["progress-value"],...c}),E.jsx(RQ,{"data-slot":"progress-track",className:qs["progress-track"],...a,children:E.jsx(TQ,{"data-slot":"progress-indicator",className:qs["progress-indicator"],...u})})]});WS.displayName="Progress";const KS="Timeline",X1="TimelineItem",AQ="TimelineDot",RD="TimelineConnector",DQ="TimelineContent",MQ="vertical",XS=C.createContext(null);function OQ(e){const t=C.useContext(XS);if(!t)throw new Error(`\`${e}\` must be used within \`${KS}\``);return t}const DI=C.createContext(null);function MI(e){const t=C.useContext(DI);if(!t)throw new Error(`\`${e}\` must be used within \`${KS}\``);return t}const OI=C.createContext(null);function QS(e){const t=C.useContext(OI);if(!t)throw new Error(`\`${e}\` must be used within \`${X1}\``);return t}const $Q=typeof window<"u"?C.useLayoutEffect:C.useEffect;function _D(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t}function $I(e){const t=C.useContext(XS);if(!t)throw new Error(`\`useStore\` must be used within \`${KS}\``);const n=C.useCallback(()=>e(t),[t,e]);return C.useSyncExternalStore(t.subscribe,n,n)}function PI(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function TD(e){return e.sort((t,n)=>{const r=t[1].current,i=n[1].current;if(!r||!i)return 0;const o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}const PQ="_timeline_vzu9j_1",NQ="_completed_vzu9j_40",Ii={timeline:PQ,"timeline-item":"_timeline-item_vzu9j_7","timeline-dot":"_timeline-dot_vzu9j_12","timeline-connector":"_timeline-connector_vzu9j_35",completed:NQ,"orientation-vertical":"_orientation-vertical_vzu9j_48","orientation-horizontal":"_orientation-horizontal_vzu9j_55"},NI=Dn({variants:{color:qS}}),IQ=Dn({base:Ii["timeline-item"]}),LQ=Dn({base:Ii["timeline-dot"],variants:{status:{completed:Ii["status-completed"],active:Ii["status-active"],pending:Ii["status-pending"]}},defaultVariants:{status:"pending"}}),jQ=Dn({base:Ii["timeline-connector"],variants:{isCompleted:{true:Ii.completed},orientation:{vertical:Ii["orientation-vertical"],horizontal:Ii["orientation-horizontal"]}},defaultVariants:{isCompleted:!1,orientation:"vertical"}}),FQ=C.createContext(void 0);function zQ(){var e;return((e=C.useContext(FQ))==null?void 0:e.direction)??"ltr"}const II=({className:e,id:t,ref:n,color:r,children:i,...o})=>{const{dir:a,orientation:u,activeIndex:c}=MI(X1),f=OQ(X1),h=C.useId(),p=t??h,m=C.useRef(null),y=GU(n,m),b=$I(_=>_.getItemIndex(p)),v=C.useMemo(()=>PI(b,c),[c,b]);$Q(()=>(f.onItemRegister(p,m),()=>{f.onItemUnregister(p)}),[t,f]);const S=C.useMemo(()=>({id:p,status:v}),[p,v]),x={role:"listitem","aria-current":v==="active"?"step":void 0,"data-slot":"timeline-item","data-status":v,"data-orientation":u,id:p,dir:a,ref:y,className:ze(IQ(),NI({color:r}),e),...o};return E.jsx(OI.Provider,{value:S,children:u==="vertical"?E.jsx(Ze,{gap:3,pb:4,...x,children:i}):E.jsx(Ye,{gap:3,...x,children:i})})};II.displayName="TimelineItem";const LI=({className:e,children:t,...n})=>{const{status:r}=QS(AQ);return E.jsx("div",{"data-slot":"timeline-dot","data-status":r,className:ze(LQ({status:r}),e),...n,children:t})};LI.displayName="TimelineDot";const jI=({forceMount:e,className:t,children:n,...r})=>{const{orientation:i,activeIndex:o}=MI(RD),{id:a,status:u}=QS(RD),c=$I(h=>h.getNextItemStatus(a,o));if(!e&&c===void 0)return null;const f=c==="completed"||c==="active";return E.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-completed":f?"":void 0,"data-status":u,"data-orientation":i,className:ze(jQ({isCompleted:f,orientation:i}),t),...r,children:n})};jI.displayName="TimelineConnector";const FI=({variant:e,children:t,...n})=>{const{status:r}=QS(DQ);return E.jsx(er,{condition:e==="card",render:E.jsx(zt,{}),children:E.jsx(Ye,{"data-slot":"timeline-content","data-status":r,gap:3,pb:2,pr:4,...n,children:t})})};FI.displayName="TimelineContent";const zI=({className:e,children:t,...n})=>E.jsx(Fe,{"data-slot":"timeline-title",className:ze(Ii["timeline-title"],e),size:1,weight:"bold",...n,children:t});zI.displayName="TimelineTitle";const BI=({children:e,...t})=>E.jsx(Fe,{"data-slot":"timeline-time",render:E.jsx("time",{}),shade:"muted",size:-1,...t,children:e});BI.displayName="TimelineTime";const UI=({children:e,...t})=>E.jsx(Fe,{"data-slot":"timeline-description",shade:"muted",mt:1,...t,children:e});UI.displayName="TimelineDescription";function HI({orientation:e=MQ,dir:t,activeIndex:n,color:r,items:i,ItemProps:o,DotProps:a,ConnectorProps:u,ContentProps:c,TitleProps:f,DescriptionProps:h,TimeProps:p,className:m,children:y,...b}){const v=zQ(),S=t??v??"ltr",x=_D(()=>new Set),_=_D(()=>({items:new Map})),k=C.useMemo(()=>({subscribe:A=>(x.current.add(A),()=>x.current.delete(A)),getState:()=>_.current,notify:()=>{for(const A of x.current)A()},onItemRegister:(A,D)=>{_.current.items.set(A,D),k.notify()},onItemUnregister:A=>{_.current.items.delete(A),k.notify()},getNextItemStatus:(A,D)=>{const O=Array.from(_.current.items.entries()),$=TD(O),B=$.findIndex(([N])=>N===A);if(B===-1||B===$.length-1)return;const L=B+1;return PI(L,D)},getItemIndex:A=>{const D=Array.from(_.current.items.entries());return TD(D).findIndex(([O])=>O===A)}}),[x,_]),T=C.useMemo(()=>({dir:S,orientation:e,activeIndex:n}),[S,e,n]);return E.jsx(XS.Provider,{value:k,children:E.jsx(DI.Provider,{value:T,children:E.jsx(nf,{"data-slot":"timeline",role:"list",className:ze(Ii.timeline,NI({color:r}),m),render:{true:E.jsx(Ye,{gap:2}),false:E.jsx(Ze,{gap:2})},condition:e==="vertical","aria-orientation":e,"data-orientation":e,dir:S,...b,children:i?i.map(({title:A,description:D,time:O,color:$,content:B},L)=>E.jsxs(II,{color:$,...o,children:[E.jsx(LI,{...a}),E.jsx(jI,{...u}),E.jsxs(FI,{...c,children:[E.jsx(zI,{...f,children:A}),O&&E.jsx(BI,{...p,children:O}),D&&E.jsx(UI,{...h,children:D}),B]})]},L)):y})})})}HI.displayName="Timeline";const BQ="typescript",GI=!1,UQ=!0,HQ="",VI={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},Em={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},GQ=Dn({base:[Em["code-typography"],Em["shiki-theme"],Em["shiki-reset"]],variants:{showLineNumbers:{true:Em["line-numbers"]}},defaultVariants:{showLineNumbers:GI}}),VQ="modulepreload",qQ=function(e){return"/"+e},AD={},Ur=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=a(n.map(f=>{if(f=qQ(f),f in AD)return;AD[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":VQ,h||(m.as="script"),m.crossOrigin="",m.href=f,c&&m.setAttribute("nonce",c),document.head.appendChild(m),h)return new Promise((y,b)=>{m.addEventListener("load",y),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};let Nn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function YQ(e){return ZS(e)}function ZS(e){return Array.isArray(e)?WQ(e):e instanceof RegExp?e:typeof e=="object"?KQ(e):e}function WQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ZS(e[n]);return t}function KQ(e){let t={};for(let n in e)t[n]=ZS(e[n]);return t}function qI(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function YI(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?YI(e.substring(0,e.length-1)):e.substr(~t+1)}var sx=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,km=class{static hasCaptures(e){return e===null?!1:(sx.lastIndex=0,sx.test(e))}static replaceCaptures(e,t,n){return e.replace(sx,(r,i,o,a)=>{let u=n[parseInt(i||o,10)];if(u){let c=t.substring(u.start,u.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function WI(e,t){return e<t?-1:e>t?1:0}function KI(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 o=WI(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function DD(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 XI(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var QI=class{constructor(e){te(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Gg=class{constructor(e,t,n){te(this,"_cachedMatchRoot",new QI(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ZQ(e),t)}static createFromParsedTheme(e,t){return eZ(e,t)}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=>XQ(e.parent,i.parentScopes));return r?new ZI(r.fontStyle,r.foreground,r.background):null}},ax=class ug{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ug(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ug(n,t[r]);return n}push(t){return new ug(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 XQ(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&&!QQ(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function QQ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ZI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ZQ(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];if(!a.settings)continue;let u;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),u=p.split(",")}else Array.isArray(a.scope)?u=a.scope:u=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let p=a.settings.fontStyle.split(" ");for(let m=0,y=p.length;m<y;m++)switch(p[m]){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 f=null;typeof a.settings.foreground=="string"&&DD(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&DD(a.settings.background)&&(h=a.settings.background);for(let p=0,m=u.length;p<m;p++){let b=u[p].trim().split(" "),v=b[b.length-1],S=null;b.length>1&&(S=b.slice(0,b.length-1),S.reverse()),n[r++]=new JQ(v,S,i,c,f,h)}}return n}var JQ=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},Qn=(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))(Qn||{});function eZ(e,t){e.sort((c,f)=>{let h=WI(c.scope,f.scope);return h!==0||(h=KI(c.parentScopes,f.parentScopes),h!==0)?h:c.index-f.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 o=new tZ(t),a=new ZI(n,o.getId(r),o.getId(i)),u=new rZ(new Q1(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let h=e[c];u.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new Gg(o,a,u)}var tZ=class{constructor(e){te(this,"_isFrozen");te(this,"_lastColorId");te(this,"_id2color");te(this,"_color2id");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)}},nZ=Object.freeze([]),Q1=class JI{constructor(t,n,r,i,o){te(this,"scopeDepth");te(this,"parentScopes");te(this,"fontStyle");te(this,"foreground");te(this,"background");this.scopeDepth=t,this.parentScopes=n||nZ,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new JI(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)}},rZ=class Z1{constructor(t,n=[],r={}){te(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}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 o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Z1._cmpBySpecificity),n}insert(t,n,r,i,o,a){if(n===""){this._doInsertHere(t,r,i,o,a);return}let u=n.indexOf("."),c,f;u===-1?(c=n,f=""):(c=n.substring(0,u),f=n.substring(u+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new Z1(this._mainRule.clone(),Q1.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(t+1,f,r,i,o,a)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let a=0,u=this._rulesWithParentScopes.length;a<u;a++){let c=this._rulesWithParentScopes[a];if(KI(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Q1(t,n,r,i,o))}},zc=class ci{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=ci.getLanguageId(t),r=ci.getTokenType(t),i=ci.getFontStyle(t),o=ci.getForeground(t),a=ci.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:a})}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,o,a,u){let c=ci.getLanguageId(t),f=ci.getTokenType(t),h=ci.containsBalancedBrackets(t)?1:0,p=ci.getFontStyle(t),m=ci.getForeground(t),y=ci.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(p=o),a!==0&&(m=a),u!==0&&(y=u),(c<<0|f<<8|h<<10|p<<11|m<<15|y<<24)>>>0}};function Vg(e,t){const n=[],r=iZ(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 f=a();if(n.push({matcher:f,priority:c}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const c=o();return f=>!!c&&!c(f)}if(i==="("){i=r.next();const c=u();return i===")"&&(i=r.next()),c}if(MD(i)){const c=[];do c.push(i),i=r.next();while(MD(i));return f=>t(c,f)}return null}function a(){const c=[];let f=o();for(;f;)c.push(f),f=o();return h=>c.every(p=>p(h))}function u(){const c=[];let f=a();for(;f&&(c.push(f),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");f=a()}return h=>c.some(p=>p(h))}}function MD(e){return!!e&&!!e.match(/[\w\.:]+/)}function iZ(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 eL(e){typeof e.dispose=="function"&&e.dispose()}var ih=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},oZ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},sZ=class{constructor(){te(this,"_references",[]);te(this,"_seenReferenceKeys",new Set);te(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},aZ=class{constructor(e,t){te(this,"seenFullScopeRequests",new Set);te(this,"seenPartialScopeRequests",new Set);te(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ih(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new sZ;for(const n of e)lZ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof ih){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 lZ(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 o=n.lookup(t);e instanceof ih?cg({baseGrammar:o,selfGrammar:i},r):J1(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const u of a)r.add(new ih(u))}function J1(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];qg([r],t,n)}}function cg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&qg(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&qg(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function qg(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?qI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&qg(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=tL(o);switch(a.kind){case 0:cg({...t,selfGrammar:t.baseGrammar},n);break;case 1:cg(t,n);break;case 2:J1(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const u=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const c={baseGrammar:t.baseGrammar,selfGrammar:u,repository:i};a.kind===4?J1(a.ruleName,c,n):cg(c,n)}else a.kind===4?n.add(new oZ(a.scopeName,a.ruleName)):n.add(new ih(a.scopeName));break}}}var uZ=class{constructor(){te(this,"kind",0)}},cZ=class{constructor(){te(this,"kind",1)}},fZ=class{constructor(e){te(this,"kind",2);this.ruleName=e}},dZ=class{constructor(e){te(this,"kind",3);this.scopeName=e}},hZ=class{constructor(e,t){te(this,"kind",4);this.scopeName=e,this.ruleName=t}};function tL(e){if(e==="$base")return new uZ;if(e==="$self")return new cZ;const t=e.indexOf("#");if(t===-1)return new dZ(e);if(t===0)return new fZ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new hZ(n,r)}}var pZ=/\\(\d+)/,OD=/\\(\d+)/g,mZ=-1,nL=-2;var Ih=class{constructor(e,t,n,r){te(this,"$location");te(this,"id");te(this,"_nameIsCapturing");te(this,"_name");te(this,"_contentNameIsCapturing");te(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=km.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=km.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${YI(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:km.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:km.replaceCaptures(this._contentName,e,t)}},gZ=class extends Ih{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},yZ=class extends Ih{constructor(t,n,r,i,o){super(t,n,r,null);te(this,"_match");te(this,"captures");te(this,"_cachedCompiledPatterns");this._match=new oh(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},$D=class extends Ih{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sh,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ew=class extends Ih{constructor(t,n,r,i,o,a,u,c,f,h){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"_end");te(this,"endHasBackReferences");te(this,"endCaptures");te(this,"applyEndPatternLast");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this._begin=new oh(o,this.id),this.beginCaptures=a,this._end=new oh(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.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(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sh;for(const r of this.patterns)t.getRule(r).collectPatterns(t,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,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Yg=class extends Ih{constructor(t,n,r,i,o,a,u,c,f){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"whileCaptures");te(this,"_while");te(this,"whileHasBackReferences");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");te(this,"_cachedCompiledWhilePatterns");this._begin=new oh(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new oh(u,nL),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.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(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sh;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sh,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},rL=class Wn{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new gZ(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new yZ(t.$vscodeTextmateLocation,t.id,t.name,t.match,Wn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=qI({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new $D(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Wn._compilePatterns(o,n,r))}return t.while?new Yg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Wn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Wn._compileCaptures(t.whileCaptures||t.captures,n,r),Wn._compilePatterns(t.patterns,n,r)):new ew(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Wn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Wn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Wn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);u>o&&(o=u)}for(let a=0;a<=o;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);let c=0;t[a].patterns&&(c=Wn.getCompiledRuleId(t[a],n,r)),i[u]=Wn.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,a=t.length;o<a;o++){const u=t[o];let c=-1;if(u.include){const f=tL(u.include);switch(f.kind){case 0:case 1:c=Wn.getCompiledRuleId(r[u.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=Wn.getCompiledRuleId(h,n,r));break;case 3:case 4:const p=f.scopeName,m=f.kind===4?f.ruleName:null,y=n.getExternalGrammar(p,r);if(y)if(m){let b=y.repository[m];b&&(c=Wn.getCompiledRuleId(b,n,y.repository))}else c=Wn.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else c=Wn.getCompiledRuleId(u,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof $D||f instanceof ew||f instanceof Yg)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},oh=class iL{constructor(t,n){te(this,"source");te(this,"ruleId");te(this,"hasAnchor");te(this,"hasBackReferences");te(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],a=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(f==="A"||f==="G")&&(a=!0),u++}this.hasAnchor=a,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.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=pZ.test(this.source):this.hasBackReferences=!1}clone(){return new iL(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 OD.lastIndex=0,this.source.replace(OD,(i,o)=>XI(r[parseInt(o,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=[],o,a,u,c;for(o=0,a=this.source.length;o<a;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,i[o]=u,u==="\\"&&o+1<a&&(c=this.source.charAt(o+1),c==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):c==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(t[o+1]=c,n[o+1]=c,r[o+1]=c,i[o+1]=c),o++);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}},sh=class{constructor(){te(this,"_items");te(this,"_hasAnchors");te(this,"_cached");te(this,"_anchorCache");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 PD(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 PD(e,r,this._items.map(i=>i.ruleId))}},PD=class{constructor(e,t,n){te(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}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(`
|
|
313
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},lx=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Vo,bZ=(Vo=class{constructor(t,n){te(this,"_defaultAttributes");te(this,"_embeddedLanguagesMatcher");te(this,"_getBasicScopeAttributes",new QI(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new lx(n,r)}));this._defaultAttributes=new lx(t,8),this._embeddedLanguagesMatcher=new vZ(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Vo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Vo.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!")}},te(Vo,"_NULL_SCOPE_METADATA",new lx(0,0)),te(Vo,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Vo),vZ=class{constructor(e){te(this,"values");te(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>XI(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])}},ND=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function oL(e,t,n,r,i,o,a,u){const c=t.content.length;let f=!1,h=-1;if(a){const y=xZ(e,t,n,r,i,o);i=y.stack,r=y.linePos,n=y.isFirstLine,h=y.anchorPosition}const p=Date.now();for(;!f;){if(u!==0&&Date.now()-p>u)return new ND(i,!0);m()}return new ND(i,!1);function m(){const y=wZ(e,t,n,r,i,h);if(!y){o.produce(i,c),f=!0;return}const b=y.captureIndices,v=y.matchedRuleId,S=b&&b.length>0?b[0].end>r:!1;if(v===mZ){const x=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),Od(e,t,n,i,o,x.endCaptures,b),o.produce(i,b[0].end);const _=i;if(i=i.parent,h=_.getAnchorPos(),!S&&_.getEnterPos()===r){i=_,o.produce(i,c),f=!0;return}}else{const x=e.getRule(v);o.produce(i,b[0].start);const _=i,k=x.getName(t.content,b),T=i.contentNameScopesList.pushAttributed(k,e);if(i=i.push(v,r,h,b[0].end===c,null,T,T),x instanceof ew){const A=x;Od(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(x instanceof Yg){const A=x;Od(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(Od(e,t,n,i,o,x.captures,b),o.produce(i,b[0].end),i=i.pop(),!S){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function xZ(e,t,n,r,i,o){let a=i.beginRuleCapturedEOL?0:-1;const u=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof Yg&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=EZ(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==nL){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),Od(e,t,n,c.stack,o,c.rule.whileCaptures,p.captureIndices),o.produce(c.stack,p.captureIndices[0].end),a=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function wZ(e,t,n,r,i,o){const a=SZ(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return a;const c=CZ(u,e,t,n,r,i,o);if(!c)return a;if(!a)return c;const f=a.captureIndices[0].start,h=c.captureIndices[0].start;return h<f||c.priorityMatch&&h===f?c:a}function SZ(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:u,findOptions:c}=sL(a,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function CZ(e,t,n,r,i,o,a){let u=Number.MAX_VALUE,c=null,f,h=0;const p=o.contentNameScopesList.getScopeNames();for(let m=0,y=e.length;m<y;m++){const b=e[m];if(!b.matcher(p))continue;const v=t.getRule(b.ruleId),{ruleScanner:S,findOptions:x}=sL(v,t,null,r,i===a),_=S.findNextMatchSync(n,i,x);if(!_)continue;const k=_.captureIndices[0].start;if(!(k>=u)&&(u=k,c=_.captureIndices,f=_.ruleId,h=b.priority,u===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function sL(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function EZ(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Od(e,t,n,r,i,o,a){if(o.length===0)return;const u=t.content,c=Math.min(o.length,a.length),f=[],h=a[0].end;for(let p=0;p<c;p++){const m=o[p];if(m===null)continue;const y=a[p];if(y.length===0)continue;if(y.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=y.start;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?i.produceFromScopes(f[f.length-1].scopes,y.start):i.produce(r,y.start),m.retokenizeCapturedWithRuleId){const v=m.getName(u,a),S=r.contentNameScopesList.pushAttributed(v,e),x=m.getContentName(u,a),_=S.pushAttributed(x,e),k=r.push(m.retokenizeCapturedWithRuleId,y.start,-1,!1,null,S,_),T=e.createOnigString(u.substring(0,y.end));oL(e,T,n&&y.start===0,y.start,k,i,!1,0),eL(T);continue}const b=m.getName(u,a);if(b!==null){const S=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new kZ(S,y.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var kZ=class{constructor(e,t){te(this,"scopes");te(this,"endPos");this.scopes=e,this.endPos=t}};function RZ(e,t,n,r,i,o,a,u){return new TZ(e,t,n,r,i,o,a,u)}function ID(e,t,n,r,i){const o=Vg(t,Wg),a=rL.getCompiledRuleId(n,r,i.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:a,grammar:i,priority:u.priority})}function Wg(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(_Z(t[i],r))return n=i+1,!0;return!1})}function _Z(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 TZ=class{constructor(e,t,n,r,i,o,a,u){te(this,"_rootId");te(this,"_lastRuleId");te(this,"_ruleId2desc");te(this,"_includedGrammars");te(this,"_grammarRepository");te(this,"_grammar");te(this,"_injections");te(this,"_basicScopeAttributesProvider");te(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new bZ(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=LD(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=Vg(c,Wg);for(const h of f)this._tokenTypeMatchers.push({matcher:h.matcher,type:i[c]})}}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 a in i)ID(t,a,i[a],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(a=>{const u=this.getExternalGrammar(a);if(u){const c=u.injectionSelector;c&&ID(t,c,u,this,u)}})}return t.sort((i,o)=>i.priority-o.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]=LD(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=rL.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===tw.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=zc.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),m=this.getRule(this._rootId).getName(null,null);let y;m?y=Ld.createRootAndLookUpScopeName(m,p,this):y=Ld.createRoot("unknown",p),t=new tw(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
|
|
314
|
+
`;const o=this.createOnigString(e),a=o.content.length,u=new DZ(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=oL(this,o,i,0,t,u,!0,r);return eL(o),{lineLength:a,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function LD(e,t){return e=YQ(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 Ld=class Wi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const o of n)i=ax.push(i,o.scopeNames),r=new Wi(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Wi(null,new ax(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new ax(null,t),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(n,i,a);return new Wi(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Wi.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,o=0,a=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,a=r.backgroundId),zc.set(t,n.languageId,n.tokenType,null,i,o,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Wi._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Wi._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(t.tokenAttributes,i,a);return new Wi(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},yi,tw=(yi=class{constructor(t,n,r,i,o,a,u,c){te(this,"_stackElementBrand");te(this,"_enterPos");te(this,"_anchorPos");te(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=u,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:yi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ld.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(){yi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,u){return new yi(this,t,n,r,i,o,a,u)}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){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.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 yi(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(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Ld.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new yi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ld.fromExtension(r,n.contentNameScopesList))}},te(yi,"NULL",new yi(null,0,0,0,!1,null,null,null)),yi),AZ=class{constructor(e,t){te(this,"balancedBracketScopes");te(this,"unbalancedBracketScopes");te(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Vg(n,Wg).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Vg(n,Wg).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}},DZ=class{constructor(e,t,n,r){te(this,"_emitBinaryTokens");te(this,"_lineText");te(this,"_tokens");te(this,"_binaryTokens");te(this,"_lastTokenEndIndex");te(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(a)&&(i=zc.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=zc.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0: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}},MZ=class{constructor(e,t){te(this,"_grammars",new Map);te(this,"_rawGrammars",new Map);te(this,"_injectionGrammars",new Map);te(this,"_theme");this._onigLib=t,this._theme=e}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 o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,RZ(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},OZ=class{constructor(t){te(this,"_options");te(this,"_syncRegistry");te(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new MZ(Gg.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Gg.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 AZ(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new aZ(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(u=>this._loadSingleGrammar(u.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_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,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},nw=tw.NULL;const $Z=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Lh{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Lh.prototype.normal={};Lh.prototype.property={};Lh.prototype.space=void 0;function aL(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Lh(n,r,t)}function rw(e){return e.toLowerCase()}class Mr{constructor(t,n){this.attribute=n,this.property=t}}Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let PZ=0;const lt=nu(),Cn=nu(),iw=nu(),Ae=nu(),Kt=nu(),mc=nu(),zr=nu();function nu(){return 2**++PZ}const ow=Object.freeze(Object.defineProperty({__proto__:null,boolean:lt,booleanish:Cn,commaOrSpaceSeparated:zr,commaSeparated:mc,number:Ae,overloadedBoolean:iw,spaceSeparated:Kt},Symbol.toStringTag,{value:"Module"})),ux=Object.keys(ow);class JS extends Mr{constructor(t,n,r,i){let o=-1;if(super(t,n),jD(this,"space",i),typeof r=="number")for(;++o<ux.length;){const a=ux[o];jD(this,ux[o],(r&ow[a])===ow[a])}}}JS.prototype.defined=!0;function jD(e,t,n){n&&(e[t]=n)}function uf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new JS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[rw(r)]=r,n[rw(o.attribute)]=r}return new Lh(t,n,e.space)}const lL=uf({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Kt,ariaCurrent:null,ariaDescribedBy:Kt,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Kt,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Kt,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Kt,ariaLevel:Ae,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Kt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Kt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Cn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uL(e,t){return t in e?e[t]:t}function cL(e,t){return uL(e,t.toLowerCase())}const NZ=uf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mc,acceptCharset:Kt,accessKey:Kt,action:null,allow:null,allowFullScreen:lt,allowPaymentRequest:lt,allowUserMedia:lt,alt:null,as:null,async:lt,autoCapitalize:null,autoComplete:Kt,autoFocus:lt,autoPlay:lt,blocking:Kt,capture:null,charSet:null,checked:lt,cite:null,className:Kt,cols:Ae,colSpan:null,content:null,contentEditable:Cn,controls:lt,controlsList:Kt,coords:Ae|mc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lt,defer:lt,dir:null,dirName:null,disabled:lt,download:iw,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lt,formTarget:null,headers:Kt,height:Ae,hidden:iw,high:Ae,href:null,hrefLang:null,htmlFor:Kt,httpEquiv:Kt,id:null,imageSizes:null,imageSrcSet:null,inert:lt,inputMode:null,integrity:null,is:null,isMap:lt,itemId:null,itemProp:Kt,itemRef:Kt,itemScope:lt,itemType:Kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lt,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:lt,muted:lt,name:null,nonce:null,noModule:lt,noValidate:lt,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:lt,optimum:Ae,pattern:null,ping:Kt,placeholder:null,playsInline:lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lt,referrerPolicy:null,rel:Kt,required:lt,reversed:lt,rows:Ae,rowSpan:Ae,sandbox:Kt,scope:null,scoped:lt,seamless:lt,selected:lt,shadowRootClonable:lt,shadowRootDelegatesFocus:lt,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:lt,useMap:null,value:Cn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Kt,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lt,declare:lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:lt,noHref:lt,noShade:lt,noWrap:lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:lt,disableRemotePlayback:lt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:cL}),IZ=uf({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:zr,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Kt,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:mc,g2:mc,glyphName:mc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zr,rev:zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zr,requiredFeatures:zr,requiredFonts:zr,requiredFormats:zr,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zr,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uL}),fL=uf({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()}}),dL=uf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cL}),hL=uf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),LZ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jZ=/[A-Z]/g,FD=/-[a-z]/g,FZ=/^data[-\w.:]+$/i;function pL(e,t){const n=rw(t);let r=t,i=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&FZ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(FD,BZ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!FD.test(o)){let a=o.replace(jZ,zZ);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=JS}return new i(r,t)}function zZ(e){return"-"+e.toLowerCase()}function BZ(e){return e.charAt(1).toUpperCase()}const mL=aL([lL,NZ,fL,dL,hL],"html"),jh=aL([lL,IZ,fL,dL,hL],"svg"),zD={}.hasOwnProperty;function UZ(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const u=r.handlers;if(i&&zD.call(i,e)){const c=String(i[e]);a=zD.call(u,c)?u[c]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const HZ=/["&'<>`]/g,GZ=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,VZ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,qZ=/[|\\{}()[\]^$+*?.]/g,BD=new WeakMap;function YZ(e,t){if(e=e.replace(t.subset?WZ(t.subset):HZ,r),t.subset||t.escapeOnly)return e;return e.replace(GZ,n).replace(VZ,r);function n(i,o,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),t)}function r(i,o,a){return t.format(i.charCodeAt(0),a.charCodeAt(o+1),t)}}function WZ(e){let t=BD.get(e);return t||(t=KZ(e),BD.set(e,t)),t}function KZ(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(qZ,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const XZ=/[\dA-Fa-f]/;function QZ(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!XZ.test(String.fromCharCode(t))?r:r+";"}const ZZ=/\d/;function JZ(e,t,n){const r="&#"+String(e);return n&&t&&!ZZ.test(String.fromCharCode(t))?r:r+";"}const eJ=["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"],cx={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:"€"},tJ=["cent","copy","divide","gt","lt","not","para","times"],gL={}.hasOwnProperty,sw={};let Rm;for(Rm in cx)gL.call(cx,Rm)&&(sw[cx[Rm]]=Rm);const nJ=/[^\dA-Za-z]/;function rJ(e,t,n,r){const i=String.fromCharCode(e);if(gL.call(sw,i)){const o=sw[i],a="&"+o;return n&&eJ.includes(o)&&!tJ.includes(o)&&(!r||t&&t!==61&&nJ.test(String.fromCharCode(t)))?a:a+";"}return""}function iJ(e,t,n){let r=QZ(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=rJ(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=JZ(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function gc(e,t){return YZ(e,Object.assign({format:iJ},t))}const oJ=/^>|^->|<!--|-->|--!>|<!-$/g,sJ=[">"],aJ=["<",">"];function lJ(e,t,n,r){return r.settings.bogusComments?"<?"+gc(e.value,Object.assign({},r.settings.characterReferences,{subset:sJ}))+">":"<!--"+e.value.replace(oJ,i)+"-->";function i(o){return gc(o,Object.assign({},r.settings.characterReferences,{subset:aJ}))}}function uJ(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Kg(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 yL(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function bL(e){return e.join(" ").trim()}const cJ=/[ \t\n\f\r]/g;function Fy(e){return typeof e=="object"?e.type==="text"?UD(e.value):!1:UD(e)}function UD(e){return e.replace(cJ,"")===""}const Mn=xL(1),vL=xL(-1),fJ=[];function xL(e){return t;function t(n,r,i){const o=n?n.children:fJ;let a=(r||0)+e,u=o[a];if(!i)for(;u&&Fy(u);)a+=e,u=o[a];return u}}const dJ={}.hasOwnProperty;function wL(e){return t;function t(n,r,i){return dJ.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const eC=wL({body:pJ,caption:fx,colgroup:fx,dd:bJ,dt:yJ,head:fx,html:hJ,li:gJ,optgroup:vJ,option:xJ,p:mJ,rp:HD,rt:HD,tbody:SJ,td:GD,tfoot:CJ,th:GD,thead:wJ,tr:EJ});function fx(e,t,n){const r=Mn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Fy(r.value.charAt(0)))}function hJ(e,t,n){const r=Mn(n,t);return!r||r.type!=="comment"}function pJ(e,t,n){const r=Mn(n,t);return!r||r.type!=="comment"}function mJ(e,t,n){const r=Mn(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 gJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function yJ(e,t,n){const r=Mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function bJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function HD(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function vJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function xJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function wJ(e,t,n){const r=Mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function SJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function CJ(e,t,n){return!Mn(n,t)}function EJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function GD(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const kJ=wL({body:TJ,colgroup:AJ,head:_J,html:RJ,tbody:DJ});function RJ(e){const t=Mn(e,-1);return!t||t.type!=="comment"}function _J(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 TJ(e){const t=Mn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Fy(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function AJ(e,t,n){const r=vL(n,t),i=Mn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&eC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function DJ(e,t,n){const r=vL(n,t),i=Mn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&eC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const _m={name:[[`
|
|
315
|
+
\f\r &/=>`.split(""),`
|
|
316
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
317
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
318
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
319
|
+
\f\r &>`.split(""),`\0
|
|
320
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
321
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
322
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function MJ(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=jh);const f=OJ(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!kJ(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=f.charAt(f.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(h),!a&&(!o||!eC(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function OJ(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=$J(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function $J(e,t,n){const r=pL(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let a=e.quote,u;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=gc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:_m.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?yL:bL)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=gc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:_m.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&Kg(n,a)>Kg(n,e.alternative)&&(a=e.alternative),u=a+gc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?_m.single:_m.double)[i][o],attribute:!0}))+a),c+(u&&"="+u))}const PJ=["<","&"];function SL(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:gc(e.value,Object.assign({},r.settings.characterReferences,{subset:PJ}))}function NJ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:SL(e,t,n,r)}function IJ(e,t,n,r){return r.all(e)}const LJ=UZ("type",{invalid:jJ,unknown:FJ,handlers:{comment:lJ,doctype:uJ,element:MJ,raw:NJ,root:IJ,text:SL}});function jJ(e){throw new Error("Expected node, not `"+e+"`")}function FJ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const zJ={},BJ={},UJ=[];function HJ(e,t){const n=t||zJ,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:GJ,all:VJ,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||$Z,characterReferences:n.characterReferences||BJ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?jh:mL,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function GJ(e,t,n){return LJ(e,t,n,this)}function VJ(e){const t=[],n=e&&e.children||UJ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Xg(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function pa(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function qJ(e){return Array.isArray(e)?e:[e]}async function CL(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function tC(e){return!e||["plaintext","txt","text","plain"].includes(e)}function YJ(e){return e==="ansi"||tC(e)}function nC(e){return e==="none"}function WJ(e){return nC(e)}function EL(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.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 i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function zy(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let a=0;a<n.length;a+=2){const u=t?n[a]+(n[a+1]||""):n[a];i.push([u,r]),r+=n[a].length,r+=((o=n[a+1])==null?void 0:o.length)||0}return i}function KJ(e){const t=zy(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=i,a=0;for(const u of t){if(o<u.length)break;o-=u.length,a++}return{line:a,character:o}}function r(i,o){let a=0;for(let u=0;u<i;u++)a+=t[u].length;return a+=o,a}return{lines:t,indexToPos:n,posToIndex:r}}const rC="light-dark()",XJ=["color","background-color"];function QJ(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 ZJ(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 o=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,u)=>a-u);return o.length?QJ(i,o):i})):e}function JJ(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>Qg(e.variants[h])),u=new Set(a.flatMap(h=>Object.keys(h))),c={},f=(h,p)=>{const m=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[h]+(p==="color"?"":m)};return a.forEach((h,p)=>{for(const m of u){const y=h[m]||"inherit";if(p===0&&r&&XJ.includes(m))if(r===rC&&a.length>1){const b=t.findIndex(_=>_==="light"),v=t.findIndex(_=>_==="dark");if(b===-1||v===-1)throw new Nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=a[b][m]||"inherit",x=a[v][m]||"inherit";c[m]=`light-dark(${S}, ${x})`,i==="css-vars"&&(c[f(p,m)]=y)}else c[m]=y;else i==="css-vars"&&(c[f(p,m)]=y)}}),o.htmlStyle=c,o}function Qg(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Qn.Italic&&(t["font-style"]="italic"),e.fontStyle&Qn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Qn.Underline&&n.push("underline"),e.fontStyle&Qn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function aw(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const kL=new WeakMap;function By(e,t){kL.set(e,t)}function ah(e){return kL.get(e)}class cf{constructor(...t){te(this,"_stacks",{});te(this,"lang");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}}}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 cf(Object.fromEntries(qJ(n).map(r=>[r,nw])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return eee(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function eee(e){const t=[],n=new Set;function r(i){var a;if(n.has(i))return;n.add(i);const o=(a=i==null?void 0:i.nameScopesList)==null?void 0:a.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function tee(e,t){if(!(e instanceof cf))throw new Nn("Invalid grammar state");return e.getInternalStack(t)}function nee(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Nn(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const u=i.lines[a.line];if(u===void 0)throw new Nn(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);let c=a.character;if(c<0&&(c=u.length+c),c<0||c>u.length)throw new Nn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${u.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=KJ(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));ree(o),e.set(n.meta,{decorations:o,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var a;if(!((a=this.options.decorations)!=null&&a.length))return;const i=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return ZJ(n,i)},code(n){var h;if(!((h=this.options.decorations)!=null&&h.length))return;const r=t(this),i=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new Nn(`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 o(p,m,y,b){const v=i[p];let S="",x=-1,_=-1;if(m===0&&(x=0),y===0&&(_=0),y===Number.POSITIVE_INFINITY&&(_=v.children.length),x===-1||_===-1)for(let T=0;T<v.children.length;T++)S+=RL(v.children[T]),x===-1&&S.length===m&&(x=T+1),_===-1&&S.length===y&&(_=T+1);if(x===-1)throw new Nn(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(_===-1)throw new Nn(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const k=v.children.slice(x,_);if(!b.alwaysWrap&&k.length===v.children.length)u(v,b,"line");else if(!b.alwaysWrap&&k.length===1&&k[0].type==="element")u(k[0],b,"token");else{const T={type:"element",tagName:"span",properties:{},children:k};u(T,b,"wrapper"),v.children.splice(x,k.length,T)}}function a(p,m){i[p]=u(i[p],m,"line")}function u(p,m,y){var S;const b=m.properties||{},v=m.transform||(x=>x);return p.tagName=m.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(S=m.properties)!=null&&S.class&&EL(p,m.properties.class),p=v(p,y)||p,p}const c=[],f=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:y}=p;if(m.line===y.line)o(m.line,m.character,y.character,p);else if(m.line<y.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let b=m.line+1;b<y.line;b++)c.unshift(()=>a(b,p));o(y.line,0,y.character,p)}}c.forEach(p=>p())}}}function ree(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Nn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,u=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(o||a||u||c){if(o&&a||u&&c||u&&n.start.offset===n.end.offset||a&&i.start.offset===i.end.offset)continue;throw new Nn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function RL(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(RL).join(""):""}const iee=[nee()];function Zg(e){const t=oee(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...iee]}function oee(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 vl=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],dx={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function see(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 VD(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 aee(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)dx[r]&&t.push({type:"setDecoration",value:dx[r]});else if(r<=29){const i=dx[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:vl[r-30]}});else if(r===38){const i=VD(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:vl[r-40]}});else if(r===48){const i=VD(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:vl[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:vl[r-100+8]}})}return t}function lee(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=see(r,o),u=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(u.length>0&&i.push({value:u,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=aee(a.sequence);for(const f of c)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of c)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=a.position}while(o<r.length);return i}}}var uee={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 cee(e=uee){function t(u){return e[u]}function n(u){return`#${u.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 f=0;f<vl.length;f++)r.push(t(vl[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let h=0;h<6;h++)for(let p=0;p<6;p++)r.push(n([u[f],u[h],u[p]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function o(u){return i()[u]}function a(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:a}}const fee={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 dee(e,t,n){const r=Xg(e,n),i=zy(t),o=Object.fromEntries(vl.map(c=>{var p;const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,h=(p=e.colors)==null?void 0:p[f];return[c,h||fee[c]]})),a=cee(o),u=lee();return i.map(c=>u.parse(c[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?a.value(f.background):e.bg,p=f.foreground?a.value(f.foreground):e.fg):(h=f.foreground?a.value(f.foreground):e.fg,p=f.background?a.value(f.background):void 0),h=pa(h,r),p=pa(p,r),f.decorations.has("dim")&&(h=hee(h));let m=Qn.None;return f.decorations.has("bold")&&(m|=Qn.Bold),f.decorations.has("italic")&&(m|=Qn.Italic),f.decorations.has("underline")&&(m|=Qn.Underline),f.decorations.has("strikethrough")&&(m|=Qn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function hee(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],o=r[1],a=r[2],u=r[3],c=Math.round(Number.parseInt(`${u}${u}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${a}${a}${c}`}else if(r.length===3){const i=r[0],o=r[1],a=r[2];return`#${i}${i}${o}${o}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function iC(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(tC(i)||nC(r))return zy(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return dee(o,t,n);const u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new Nn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Nn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return mee(t,u,o,a,n)}function pee(...e){if(e.length===2)return ah(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(tC(i)||nC(o))throw new Nn("Plain language does not have grammar state");if(i==="ansi")throw new Nn("ANSI language does not have grammar state");const{theme:a,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new cf(oC(n,c,a,u,r).stateStack,c.name,a.name)}function mee(e,t,n,r,i){const o=oC(e,t,n,r,i),a=new cf(o.stateStack,t.name,n.name);return By(o.tokens,a),o.tokens}function oC(e,t,n,r,i){const o=Xg(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:u=500}=i,c=zy(e);let f=i.grammarState?tee(i.grammarState,n.name)??nw:i.grammarContextCode!=null?oC(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:nw,h=[];const p=[];for(let m=0,y=c.length;m<y;m++){const[b,v]=c[m];if(b===""){h=[],p.push([]);continue}if(a>0&&b.length>=a){h=[],p.push([{content:b,offset:v,color:"",fontStyle:0}]);continue}let S,x,_;i.includeExplanation&&(S=t.tokenizeLine(b,f,u),x=S.tokens,_=0);const k=t.tokenizeLine2(b,f,u),T=k.tokens.length/2;for(let A=0;A<T;A++){const D=k.tokens[2*A],O=A+1<T?k.tokens[2*A+2]:b.length;if(D===O)continue;const $=k.tokens[2*A+1],B=pa(r[zc.getForeground($)],o),L=zc.getFontStyle($),N={content:b.substring(D,O),offset:v+D,color:B,fontStyle:L};if(i.includeExplanation){const M=[];if(i.includeExplanation!=="scopeName")for(const G of n.settings){let j;switch(typeof G.scope){case"string":j=G.scope.split(/,/).map(F=>F.trim());break;case"object":j=G.scope;break;default:continue}M.push({settings:G,selectors:j.map(F=>F.split(/ /))})}N.explanation=[];let z=0;for(;D+z<O;){const G=x[_],j=b.substring(G.startIndex,G.endIndex);z+=j.length,N.explanation.push({content:j,scopes:i.includeExplanation==="scopeName"?gee(G.scopes):yee(M,G.scopes)}),_+=1}}h.push(N)}p.push(h),h=[],f=k.ruleStack}return{tokens:p,stateStack:f}}function gee(e){return e.map(t=>({scopeName:t}))}function yee(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:vee(e,o,t.slice(0,r))}}return n}function qD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function bee(e,t,n){if(!qD(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)qD(e[r],n[i])&&(r-=1),i-=1;return r===-1}function vee(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(bee(a,t,n)){r.push(o);break}return r}function _L(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 f=iC(e,t,{...n,theme:c.theme}),h=ah(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=xee(...i.map(c=>c.tokens)),a=o[0].map((c,f)=>c.map((h,p)=>{const m={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=h.explanation),o.forEach((y,b)=>{const{content:v,explanation:S,offset:x,..._}=y[f][p];m.variants[r[b].color]=_}),m})),u=i[0].state?new cf(Object.fromEntries(i.map(c=>{var f;return[c.theme,(f=c.state)==null?void 0:f.getInternalStack(c.theme)]})),i[0].state.lang):void 0;return u&&By(a,u),a}function xee(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),o=t.map(()=>[]);t.forEach((c,f)=>c.push(o[f]));const a=i.map(()=>0),u=i.map(c=>c[0]);for(;u.every(c=>c);){const c=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const h=u[f];h.content.length===c?(o[f].push(h),a[f]+=1,u[f]=i[f][a[f]]):(o[f].push({...h,content:h.content.slice(0,c)}),u[f]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}function Jg(e,t,n){let r,i,o,a,u,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:p="css-vars"}=n,m=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,_)=>x.color===f?-1:_.color===f?1:0);if(m.length===0)throw new Nn("`themes` option must not be empty");const y=_L(e,t,n);if(c=ah(y),f&&rC!==f&&!m.find(x=>x.color===f))throw new Nn(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=m.map(x=>e.getTheme(x.theme)),v=m.map(x=>x.color);o=y.map(x=>x.map(_=>JJ(_,v,h,f,p))),c&&By(o,c);const S=m.map(x=>Xg(x.theme,n));i=YD(m,b,S,h,f,"fg",p),r=YD(m,b,S,h,f,"bg",p),a=`shiki-themes ${b.map(x=>x.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=Xg(n.theme,n);o=iC(e,t,n);const h=e.getTheme(n.theme);r=pa(h.bg,f),i=pa(h.fg,f),a=h.name,c=ah(o)}else throw new Nn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:u,grammarState:c}}function YD(e,t,n,r,i,o,a){return e.map((u,c)=>{const f=pa(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===rC&&e.length>1){const p=e.findIndex(v=>v.color==="light"),m=e.findIndex(v=>v.color==="dark");if(p===-1||m===-1)throw new Nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=pa(t[p][o],n[p])||"inherit",b=pa(t[m][o],n[m])||"inherit";return`light-dark(${y}, ${b});${h}`}return f}return a==="css-vars"?h:null}).filter(u=>!!u).join(";")}function ey(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>ey(e,i,o),codeToTokens:(i,o)=>Jg(e,i,o)}){var b,v;let i=t;for(const S of Zg(n))i=((b=S.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:a,bg:u,themeName:c,rootStyle:f,grammarState:h}=Jg(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:m=!1}=n;p===!0?o=See(o):p==="never"&&(o=Cee(o)),m&&(o=Eee(o));const y={...r,get source(){return i}};for(const S of Zg(n))o=((v=S.tokens)==null?void 0:v.call(y,o))||o;return wee(o,{...n,fg:a,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,h)}function wee(e,t,n,r=ah(e)){var v,S,x,_;const i=Zg(t),o=[],a={type:"root",children:[]},{structure:u="classic",tabindex:c="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(f.tabindex=c.toString());for(const[k,T]of Object.entries(t.meta||{}))k.startsWith("_")||(f[k]=T);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const m=[],y={...n,structure:u,addClassToHast:EL,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return h},get code(){return p},get lines(){return m}};if(e.forEach((k,T)=>{var O,$;T&&(u==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
323
|
+
`}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const B of k){let L={type:"element",tagName:"span",properties:{...B.htmlAttrs},children:[{type:"text",value:B.content}]};const N=aw(B.htmlStyle||Qg(B));N&&(L.properties.style=N);for(const M of i)L=((O=M==null?void 0:M.span)==null?void 0:O.call(y,L,T+1,D,A,B))||L;u==="inline"?a.children.push(L):u==="classic"&&A.children.push(L),D+=B.content.length}if(u==="classic"){for(const B of i)A=(($=B==null?void 0:B.line)==null?void 0:$.call(y,A,T+1))||A;m.push(A),o.push(A)}else u==="inline"&&m.push(A)}),u==="classic"){for(const k of i)p=((v=k==null?void 0:k.code)==null?void 0:v.call(y,p))||p;h.children.push(p);for(const k of i)h=((S=k==null?void 0:k.pre)==null?void 0:S.call(y,h))||h;a.children.push(h)}else if(u==="inline"){const k=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const O of a.children)O.type==="element"&&O.tagName==="br"?(k.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(O.type==="element"||O.type==="text")&&T.children.push(O);k.push(T);let D={type:"element",tagName:"code",properties:{},children:k};for(const O of i)D=((x=O==null?void 0:O.code)==null?void 0:x.call(y,D))||D;a.children=[];for(let O=0;O<D.children.length;O++){O>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=D.children[O];$.type==="element"&&a.children.push(...$.children)}}let b=a;for(const k of i)b=((_=k==null?void 0:k.root)==null?void 0:_.call(y,b))||b;return r&&By(b,r),b}function See(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,a)=>{const c=!(o.fontStyle&&(o.fontStyle&Qn.Underline||o.fontStyle&Qn.Strikethrough));c&&o.content.match(/^\s+$/)&&t[a+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function Cee(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,o,a]=r;if(!i&&!a)return n;const u=[{...n,offset:n.offset+i.length,content:o}];return i&&u.unshift({content:i,offset:n.offset}),a&&u.push({content:a,offset:n.offset+i.length+o.length}),u}))}function Eee(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],o=aw(i.htmlStyle||Qg(i)),a=aw(r.htmlStyle||Qg(r)),u=i.fontStyle&&(i.fontStyle&Qn.Underline||i.fontStyle&Qn.Strikethrough),c=r.fontStyle&&(r.fontStyle&Qn.Underline||r.fontStyle&Qn.Strikethrough);!u&&!c&&o===a?i.content+=r.content:n.push({...r})}return n})}const kee=HJ;function Ree(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,u)=>ey(e,a,u),codeToTokens:(a,u)=>Jg(e,a,u)};let i=kee(ey(e,t,n,r));for(const a of Zg(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const WD={light:"#333333",dark:"#bbbbbb"},KD={light:"#fffffe",dark:"#1e1e1e"},XD="__shiki_resolved";function sC(e){var u,c,f,h,p;if(e!=null&&e[XD])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const m=t.settings?t.settings.find(y=>!y.name&&!y.scope):void 0;(u=m==null?void 0:m.settings)!=null&&u.foreground&&(r=m.settings.foreground),(c=m==null?void 0:m.settings)!=null&&c.background&&(n=m.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((h=t==null?void 0:t.colors)!=null&&h["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?WD.light:WD.dark),n||(n=t.type==="light"?KD.light:KD.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 o=new Map;function a(m){var b;if(o.has(m))return o.get(m);i+=1;const y=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${y}`]?a(m):(o.set(m,y),y)}t.settings=t.settings.map(m=>{var S,x;const y=((S=m.settings)==null?void 0:S.foreground)&&!m.settings.foreground.startsWith("#"),b=((x=m.settings)==null?void 0:x.background)&&!m.settings.background.startsWith("#");if(!y&&!b)return m;const v={...m,settings:{...m.settings}};if(y){const _=a(m.settings.foreground);t.colorReplacements[_]=m.settings.foreground,v.settings.foreground=_}if(b){const _=a(m.settings.background);t.colorReplacements[_]=m.settings.background,v.settings.background=_}return v});for(const m of Object.keys(t.colors||{}))if((m==="editor.foreground"||m==="editor.background"||m.startsWith("terminal.ansi"))&&!((p=t.colors[m])!=null&&p.startsWith("#"))){const y=a(t.colors[m]);t.colorReplacements[y]=t.colors[m],t.colors[m]=y}return Object.defineProperty(t,XD,{enumerable:!1,writable:!1,value:!0}),t}async function TL(e){return Array.from(new Set((await Promise.all(e.filter(t=>!YJ(t)).map(async t=>await CL(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function AL(e){return(await Promise.all(e.map(async n=>WJ(n)?null:sC(await CL(n))))).filter(n=>!!n)}let _ee=3;function Tee(e,t=3){t>_ee||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class ac extends Error{constructor(t){super(t),this.name="ShikiError"}}function DL(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 ac(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class Aee extends OZ{constructor(n,r,i,o={}){super(n);te(this,"_resolvedThemes",new Map);te(this,"_resolvedGrammars",new Map);te(this,"_langMap",new Map);te(this,"_langGraph",new Map);te(this,"_textmateThemeCache",new WeakMap);te(this,"_loadedThemesCache",null);te(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=o,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=sC(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Gg.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=DL(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var a,u,c,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(h=>{var p;return(p=h.embeddedLangsLazy)==null?void 0:p.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(h=>{this._alias[h]=n.name}),this._loadedLanguagesCache=null,r.size)for(const h of r)this._resolvedGrammars.delete(h.name),this._loadedLanguagesCache=null,(u=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||u.delete(h.scopeName),(f=(c=this._syncRegistry)==null?void 0:c._grammars)==null||f.delete(h.scopeName),this.loadLanguage(this._langMap.get(h.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),i=r.filter(([o,a])=>!a);if(i.length){const o=r.filter(([a,u])=>{if(!u)return!1;const c=u.embeddedLanguages||u.embeddedLangs;return c==null?void 0:c.some(f=>i.map(([h])=>h).includes(f))}).filter(a=>!i.includes(a));throw new ac(`Missing languages ${i.map(([a])=>`\`${a}\``).join(", ")}, required by ${o.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[o,a]of r)this._resolver.addLanguage(a);for(const[o,a]of r)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class Dee{constructor(t,n){te(this,"_langs",new Map);te(this,"_scopeToLang",new Map);te(this,"_injections",new Map);te(this,"_onigLib");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 o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Cd=0;function Mee(e){Cd+=1,e.warnings!==!1&&Cd>=10&&Cd%10===0&&console.warn(`[Shiki] ${Cd} 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 ac("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(sC),i=new Dee(e.engine,n),o=new Aee(i,r,n,e.langAlias);let a;function u(k){return DL(k,e.langAlias)}function c(k){x();const T=o.getGrammar(typeof k=="string"?k:k.name);if(!T)throw new ac(`Language \`${k}\` not found, you may need to load it first`);return T}function f(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const T=o.getTheme(k);if(!T)throw new ac(`Theme \`${k}\` not found, you may need to load it first`);return T}function h(k){x();const T=f(k);a!==k&&(o.setTheme(T),a=k);const A=o.getColorMap();return{theme:T,colorMap:A}}function p(){return x(),o.getLoadedThemes()}function m(){return x(),o.getLoadedLanguages()}function y(...k){x(),o.loadLanguages(k.flat(1))}async function b(...k){return y(await TL(k))}function v(...k){x();for(const T of k.flat(1))o.loadTheme(T)}async function S(...k){return x(),v(await AL(k))}function x(){if(t)throw new ac("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),Cd-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:S,loadThemeSync:v,dispose:_,[Symbol.dispose]:_}}async function Oee(e){e.engine||Tee("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([AL(e.themes||[]),TL(e.langs||[]),e.engine]);return Mee({...e,themes:t,langs:n,engine:r})}async function $ee(e){const t=await Oee(e);return{getLastGrammarState:(...n)=>pee(t,...n),codeToTokensBase:(n,r)=>iC(t,n,r),codeToTokensWithThemes:(n,r)=>_L(t,n,r),codeToTokens:(n,r)=>Jg(t,n,r),codeToHast:(n,r)=>ey(t,n,r),codeToHtml:(n,r)=>Ree(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ff(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Pee(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const aC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),In=String.raw;function df(e,t){if(e==null)throw new Error(t??"Value expected");return e}const ML=In`\[\^?`,OL=`c.? | C(?:-.?)?|${In`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${In`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${In`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${In`o\{[^\}]*\}?`}|${In`\d{1,3}`}`,lC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Tm=new RegExp(In`
|
|
324
|
+
\\ (?:
|
|
325
|
+
${OL}
|
|
326
|
+
| [gk]<[^>]*>?
|
|
327
|
+
| [gk]'[^']*'?
|
|
328
|
+
| .
|
|
329
|
+
)
|
|
330
|
+
| \( (?:
|
|
331
|
+
\? (?:
|
|
332
|
+
[:=!>({]
|
|
333
|
+
| <[=!]
|
|
334
|
+
| <[^>]*>
|
|
335
|
+
| '[^']*'
|
|
336
|
+
| ~\|?
|
|
337
|
+
| #(?:[^)\\]|\\.?)*
|
|
338
|
+
| [^:)]*[:)]
|
|
339
|
+
)?
|
|
340
|
+
| \*[^\)]*\)?
|
|
341
|
+
)?
|
|
342
|
+
| (?:${lC.source})+
|
|
343
|
+
| ${ML}
|
|
344
|
+
| .
|
|
345
|
+
`.replace(/\s+/g,""),"gsu"),hx=new RegExp(In`
|
|
346
|
+
\\ (?:
|
|
347
|
+
${OL}
|
|
348
|
+
| .
|
|
349
|
+
)
|
|
350
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
351
|
+
| ${ML}
|
|
352
|
+
| &&
|
|
353
|
+
| .
|
|
354
|
+
`.replace(/\s+/g,""),"gsu");function Nee(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=ete(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(p){i.push(p)},replaceCurrentModX(p){i[i.length-1]=p},singleline:n.rules.singleline};let a=[],u;for(Tm.lastIndex=0;u=Tm.exec(e);){const p=Iee(o,e,u[0],Tm.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(Tm.lastIndex=p.lastIndex)}const c=[];let f=0;a.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++f:p.raw==="("&&c.push(p)}),f||c.forEach((p,m)=>{p.kind="capturing",p.number=m+1});const h=f||c.length;return{tokens:a.map(p=>p.type==="EscapedNumber"?nte(p,h):p).flat(),flags:r}}function Iee(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=Lee(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:QD(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Yee(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:PL(n)}}if(o==="K")return{token:NL("keep",n)};if(o==="N"||o==="R")return{token:xl("newline",n,{negate:o==="N"})};if(o==="O")return{token:xl("any",n)};if(o==="X")return{token:xl("text_segment",n)};const a=$L(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:Qee(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Xee(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:rc("group",n)};if(n==="(?>")return{token:rc("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:rc(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:rc("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:rc("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Gee(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
355
|
+
`,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:xl("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":In`\A`,$:In`\Z`}[n]:n;return{token:QD(a,n)}}return n==="|"?{token:Fee(n)}:lC.test(n)?{tokens:rte(n)}:{token:qo(ff(n),n)}}function Lee(e,t,n){const r=[ZD(t[1]==="^",t)];let i=1,o;for(hx.lastIndex=n;o=hx.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(ZD(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(qo(93,a));else if(i--,r.push(zee(a)),!i)break}else{const u=jee(a);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:hx.lastIndex||e.length}}function jee(e){if(e[0]==="\\")return $L(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!aC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return xl("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Bee(e):e==="&&"?Uee(e):qo(ff(e),e)}function $L(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Kee(e);if("dDhHsSwW".includes(n))return Zee(e);if(e.startsWith(In`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Jee(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(a=>{const u=[...o.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return qo(ff(a),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return qo(tte(e),e);if(JD.has(n))return qo(JD.get(n),e);if(/\d/.test(n))return Hee(t,e);if(e==="\\")throw new Error(In`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return qo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Fee(e){return{type:"Alternator",raw:e}}function QD(e,t){return{type:"Assertion",kind:e,raw:t}}function PL(e){return{type:"Backreference",raw:e}}function qo(e,t){return{type:"Character",value:e,raw:t}}function zee(e){return{type:"CharacterClassClose",raw:e}}function Bee(e){return{type:"CharacterClassHyphen",raw:e}}function Uee(e){return{type:"CharacterClassIntersector",raw:e}}function ZD(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function xl(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function NL(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:df(n.flags),raw:t}}function Hee(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Gee(e){return{type:"GroupClose",raw:e}}function rc(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Vee(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function qee(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Yee(e){return{type:"Subroutine",raw:e}}const Wee=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),JD=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Kee(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return qo(ff(t.toUpperCase())-64,e)}function Xee(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=tM(n),a=tM(r),u={};if(o&&(u.enable=o),a&&(u.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),NL("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,rc("group",e,{...(o||a)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function Qee(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[a,u,c]=o,f=Wee.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(o.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return Vee(f,r??null,(i==null?void 0:i.split(","))??null,e)}function eM(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+i>a||o&&+o>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return qee(t,n,r,e)}function Zee(e){const t=e[1].toLowerCase();return xl({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Jee(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xl("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function tM(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function ete(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function tte(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function nte(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[PL(n)];const o=[],a=i.match(/^[0-7]+|\d/g);for(let u=0;u<a.length;u++){const c=a[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(In`Octal encoded byte above 177 unsupported "${n}"`)}else f=ff(c);o.push(qo(f,(u===0?"\\":"")+c))}return o}function rte(e){const t=[],n=new RegExp(lC,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:a,max:u}=o.groups;if(+a>+u&&i.endsWith("?")){n.lastIndex--,t.push(eM(i.slice(0,-1)));continue}}}t.push(eM(i))}return t}function IL(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function ite(e){return ote.has(e.type)}const ote=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function LL(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Nee(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(m,y)=>{const b=r.tokens[o.nextIndex];switch(o.parent=m,o.nextIndex++,b.type){case"Alternator":return Ul();case"Assertion":return ste(b);case"Backreference":return ate(b,o);case"Character":return Uy(b.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return lte(b,o,y);case"CharacterClassOpen":return ute(b,o,y);case"CharacterSet":return cte(b,o);case"Directive":return gte(b.kind,{flags:b.flags});case"GroupOpen":return fte(b,o,y);case"NamedCallout":return bte(b.kind,b.tag,b.arguments);case"Quantifier":return dte(b,o);case"Subroutine":return hte(b,o);default:throw new Error(`Unexpected token type "${b.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},a=xte(yte(r.flags));let u=a.body[0];for(;o.nextIndex<r.tokens.length;){const m=i(u,{});m.type==="Alternative"?(a.body.push(m),u=m):u.body.push(m)}const{capturingGroups:c,hasNumberedRef:f,namedGroupsByName:h,subroutines:p}=o;if(f&&h.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:m}of p)if(typeof m=="number"){if(m>c.length)throw new Error("Subroutine uses a group number that's not defined");m&&(c[m-1].isSubroutined=!0)}else if(h.has(m)){if(h.get(m).length>1)throw new Error(In`Subroutine uses a duplicate group name "\g<${m}>"`);h.get(m)[0].isSubroutined=!0}else throw new Error(In`Subroutine uses a group name that's not defined "\g<${m}>"`);return a}function ste({kind:e}){return lw(df({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===In`\B`||e===In`\Y`})}function ate({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,a=!1)=>{const u=t.capturingGroups.length;let c=!1;if(o>u)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,uw(a?u+1-o:o,{orphan:c})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return uw(r)}return i(+r)}function lte(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,a=o.body.at(-1),u=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&u&&u.type!=="CharacterClassOpen"&&u.type!=="CharacterClassClose"&&u.type!=="CharacterClassIntersector"){const c=i(o,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return o.body.pop(),mte(a,c);throw new Error("Invalid character class range")}return Uy(ff("-"))}function ute({negate:e},t,n){const{tokens:r,walk:i}=t,o=[fg()],a=r[t.nextIndex];let u=iM(a);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(fg()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=iM(r[t.nextIndex],a)}const c=fg({negate:e});return o.length===1?c.body=o[0].body:(c.kind="intersection",c.body=o.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,c}function cte({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const u=Hy(n);if(aC.has(u)&&!(a!=null&&a.has(u)))e="posix",n=u;else return ic(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?vte(n,{negate:t}):cw(e,{negate:t})}function fte(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:u}=t,c=wte(e),f=c.type==="AbsenceFunction",h=rM(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Pee(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let m=oM(r[t.nextIndex]);for(;m.type!=="GroupClose";){if(m.type==="Alternator")c.body.push(Ul()),t.nextIndex++;else{const y=c.body.at(-1),b=u(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(y.body.push(b),(h||n.isInLookbehind)&&!a){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(nM(b)||b.type==="CapturingGroup")throw new Error(v)}else if(nM(b)||rM(b)&&b.negate)throw new Error(v)}}m=oM(r[t.nextIndex])}return t.nextIndex++,c}function dte({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!ite(o))throw new Error("Quantifier requires a repeatable token");const a=FL(e,t,n,o);return i.body.pop(),a}function hte({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const u=+o.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":u,"+":c+u,"-":c+1-u}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=zL(i);return r.push(a),a}function pte(e,t){return{type:"AbsenceFunction",kind:e,body:Fh(t==null?void 0:t.body)}}function Ul(e){return{type:"Alternative",body:BL(e==null?void 0:e.body)}}function lw(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function uw(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function jL(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Ste(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Fh(t==null?void 0:t.body)}}function Uy(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function fg(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:BL(e==null?void 0:e.body)}}function mte(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function cw(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function gte(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:df(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function yte(e){return{type:"Flags",...e}}function $i(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Fh(e==null?void 0:e.body)}}function pl(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Fh(e==null?void 0:e.body)}}function bte(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function vte(e,t){const n=!!(t!=null&&t.negate);if(!aC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function FL(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function xte(e,t){return{type:"Regex",body:Fh(t==null?void 0:t.body),flags:e}}function zL(e){return{type:"Subroutine",ref:e}}function ic(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(Hy(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Cte(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(In`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function wte({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return pte("repeater");case"atomic":return $i({atomic:!0});case"capturing":return jL(i,{name:n});case"group":return $i({flags:e});case"lookahead":case"lookbehind":return pl({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Fh(e){if(e===void 0)e=[Ul()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function BL(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function nM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function rM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Ste(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Cte(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Hy(e){return e.replace(/[- _]+/g,"").toLowerCase()}function iM(e,t){const n=t;return df(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function oM(e){return df(e,"Unclosed group")}function jd(e,t,n=null){function r(o,a){for(let u=0;u<o.length;u++){const c=i(o[u],a,u,o);u=Math.max(-1,u+c)}}function i(o,a=null,u=null,c=null){var x,_;let f=0,h=!1;const p={node:o,parent:a,key:u,container:c,root:e,remove(){Am(c).splice(Math.max(0,Wu(u)+f),1),f--,h=!0},removeAllNextSiblings(){return Am(c).splice(Wu(u)+1)},removeAllPrevSiblings(){const k=Wu(u)+f;return f-=k,Am(c).splice(0,Math.max(0,k))},replaceWith(k,T={}){const A=!!T.traverse;c?c[Math.max(0,Wu(u)+f)]=k:df(a,"Can't replace root node")[u]=k,A&&i(k,a,u,c),h=!0},replaceWithMultiple(k,T={}){const A=!!T.traverse;if(Am(c).splice(Math.max(0,Wu(u)+f),1,...k),f+=k.length-1,A){let D=0;for(let O=0;O<k.length;O++)D+=i(k[O],a,Wu(u)+O+D,c)}h=!0},skip(){h=!0}},{type:m}=o,y=t["*"],b=t[m],v=typeof y=="function"?y:y==null?void 0:y.enter,S=typeof b=="function"?b:b==null?void 0:b.enter;if(v==null||v(p,n),S==null||S(p,n),!h)switch(m){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${m}"`)}return(x=b==null?void 0:b.exit)==null||x.call(b,p,n),(_=y==null?void 0:y.exit)==null||_.call(y,p,n),f}return i(e),e}function Am(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Wu(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Ete=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function kte(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Rte(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const xi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function uC(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let a=0,u="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:h}}=c;if(!h&&(!r||r===xi.DEFAULT==!a)){n instanceof Function?u+=n(c,{context:a?xi.CHAR_CLASS:xi.DEFAULT,negated:o[o.length-1]}):u+=n;continue}f[0]==="["?(a++,o.push(f[1]==="^")):f==="]"&&a&&(a--,o.pop()),u+=f}return u}function UL(e,t,n,r){uC(e,t,n,r)}function _te(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,a;for(;a=i.exec(e);){const{0:u,groups:{$skip:c}}=a;if(!c&&(!r||r===xi.DEFAULT==!o))return a;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function Dm(e,t,n){return!!_te(e,t,0,n)}function Tte(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,a;for(;a=n.exec(e);){const[u]=a;if(u==="[")i++;else if(i)u==="]"&&i--;else if(u==="(")o++;else if(u===")"&&(o--,!o)){r=a.index;break}}return e.slice(t,r)}const sM=new RegExp(String.raw`(?<noncapturingStart>${Ete})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Ate(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",a=[0],u=[];let c=0,f=0,h=NaN,p;do{p=!1;let m=0,y=0,b=!1,v;for(sM.lastIndex=Number.isNaN(h)?0:h+o.length;v=sM.exec(e);){const{0:S,index:x,groups:{capturingStart:_,noncapturingStart:k}}=v;if(S==="[")m++;else if(m)S==="]"&&m--;else if(S===i&&!b)h=x,b=!0;else if(b&&k)y++;else if(_)b?y++:(c++,a.push(c+f));else if(S===")"&&b){if(!y){f++;const T=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,x)}))<$$${T}>)${e.slice(x+1)}`,p=!0,u.push(T),kte(n,T),r.size){const A=new Map;r.forEach((D,O)=>{A.set(O>=T?O+1:O,D.map($=>$>=T?$+1:$))}),r=A}break}y--}}}while(p);return n.push(...u),e=uC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:m,groups:{backrefNum:y,wrappedBackrefNum:b}})=>{if(y){const v=+y;if(v>a.length-1)throw new Error(`Backref "${m}" greater than number of captures`);return`\\${a[v]}`}return`\\${b}`},xi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const HL=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,px=new RegExp(String.raw`
|
|
356
|
+
\\(?: \d+
|
|
357
|
+
| c[A-Za-z]
|
|
358
|
+
| [gk]<[^>]+>
|
|
359
|
+
| [pPu]\{[^\}]+\}
|
|
360
|
+
| u[A-Fa-f\d]{4}
|
|
361
|
+
| x[A-Fa-f\d]{2}
|
|
362
|
+
)
|
|
363
|
+
| \((?: \? (?: [:=!>]
|
|
364
|
+
| <(?:[=!]|[^>]+>)
|
|
365
|
+
| [A-Za-z\-]+:
|
|
366
|
+
| \(DEFINE\)
|
|
367
|
+
))?
|
|
368
|
+
| (?<qBase>${HL})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
369
|
+
| \\?.
|
|
370
|
+
`.replace(/\s+/g,""),"gsu");function Dte(e){if(!new RegExp(`${HL}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(px.lastIndex=0;a=px.exec(e);){const{0:u,index:c,groups:{qBase:f,qMod:h,invalidQ:p}}=a;if(u==="[")o||(r=c),o++;else if(u==="]")o?o--:r=null;else if(!o)if(h==="+"&&i&&!i.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${u}"`);let m=-1;if(/^\{\d+\}$/.test(f))e=Rte(e,c+f.length,h,"");else{if(i===")"||i==="]"){const y=i===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,y)}(?>${e.slice(y,c)}${f})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+u.length)}`;m+=4}px.lastIndex+=m}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const bi=String.raw,Mte=bi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,fw=bi`\(\?R=(?<rDepth>[^\)]+)\)|${Mte}`,Gy=bi`\(\?<(?![=!])(?<captureName>[^>]+)>`,GL=bi`${Gy}|(?<unnamed>\()(?!\?)`,ul=new RegExp(bi`${Gy}|${fw}|\(\?|\\?.`,"gsu"),mx="Cannot use multiple overlapping recursions";function Ote(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(fw,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Dm(e,bi`\(\?\(DEFINE\)`,xi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=Dm(e,bi`\\[1-9]`,xi.DEFAULT),u=new Map,c=[];let f=!1,h=0,p=0,m;for(ul.lastIndex=0;m=ul.exec(e);){const{0:y,groups:{captureName:b,rDepth:v,gRNameOrNum:S,gRDepth:x}}=m;if(y==="[")h++;else if(h)y==="]"&&h--;else if(v){if(aM(v),f)throw new Error(mx);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,m.index),k=e.slice(ul.lastIndex);if(Dm(k,fw,xi.DEFAULT))throw new Error(mx);const T=+v-1;e=lM(_,k,T,!1,n,o,p),i=cM(i,_,T,o.length,0,p);break}else if(S){aM(x);let _=!1;for(const M of c)if(M.name===S||M.num===+S){if(_=!0,M.hasRecursedWithin)throw new Error(mx);break}if(!_)throw new Error(bi`Recursive \g cannot be used outside the referenced group "${r==="external"?S:bi`\g<${S}&R=${x}>`}"`);const k=u.get(S),T=Tte(e,k);if(a&&Dm(T,bi`${Gy}|\((?!\?)`,xi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(k,m.index),D=T.slice(A.length+y.length),O=o.length,$=+x-1,B=lM(A,D,$,!0,n,o,p);i=cM(i,A,$,o.length-O,O,p);const L=e.slice(0,k),N=e.slice(k+T.length);e=`${L}${B}${N}`,ul.lastIndex+=B.length-y.length-A.length-D.length,c.forEach(M=>M.hasRecursedWithin=!0),f=!0}else if(b)p++,u.set(String(p),ul.lastIndex),u.set(b,ul.lastIndex),c.push({num:p,name:b});else if(y[0]==="("){const _=y==="(";_&&(p++,u.set(String(p),ul.lastIndex)),c.push(_?{num:p}:{})}else y===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function aM(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function lM(e,t,n,r,i,o,a){const u=new Set;r&&UL(e+t,Gy,({groups:{captureName:f}})=>{u.add(f)},xi.DEFAULT);const c=[n,r?u:null,i,o,a];return`${e}${uM(`(?:${e}`,"forward",...c)}(?:)${uM(`${t})`,"backward",...c)}${t}`}function uM(e,t,n,r,i,o,a){const c=h=>t==="forward"?h+2:n-h+2-1;let f="";for(let h=0;h<n;h++){const p=c(h);f+=uC(e,bi`${GL}|\\k<(?<backref>[^>]+)>`,({0:m,groups:{captureName:y,unnamed:b,backref:v}})=>{if(v&&r&&!r.has(v))return m;const S=`_$${p}`;if(b||y){const x=a+o.length+1;return o.push(x),$te(i,x),b?m:`(?<${y}${S}>`}return bi`\k<${v}${S}>`},xi.DEFAULT)}return f}function $te(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function cM(e,t,n,r,i,o){if(e.size&&r){let a=0;UL(t,GL,()=>a++,xi.DEFAULT);const u=o-a+i,c=new Map;return e.forEach((f,h)=>{const p=(r-a*n)/n,m=a*n,y=h>u+a?h+r:h,b=[];for(const v of f)if(v<=u)b.push(v);else if(v>u+a+p)b.push(v+r);else if(v<=u+a)for(let S=0;S<=n;S++)b.push(v+a*S);else for(let S=0;S<=n;S++)b.push(v+m+p*S);c.set(y,b)}),c}return e}var Rn=String.fromCodePoint,it=String.raw,ji={},Vy=globalThis.RegExp;ji.flagGroups=(()=>{try{new Vy("(?i:)")}catch{return!1}return!0})();ji.unicodeSets=(()=>{try{new Vy("[[]]","v")}catch{return!1}return!0})();ji.bugFlagVLiteralHyphenIsRange=ji.unicodeSets?(()=>{try{new Vy(it`[\d\-a]`,"v")}catch{return!0}return!1})():!1;ji.bugNestedClassIgnoresNegation=ji.unicodeSets&&new Vy("[[^a]]","v").test("a");function ty(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function lh(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function dw(e,t){return fM[e]>=fM[t]}function Pte(e,t){if(e==null)throw new Error(t??"Value expected");return e}var fM={ES2025:2025,ES2024:2024,ES2018:2018},Nte={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function VL(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Nte[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=ji.flagGroups?"ES2025":ji.unicodeSets?"ES2024":"ES2018"),t}var Ite="[ -\r ]",Lte=new Set([Rn(304),Rn(305)]),$o=it`[\p{L}\p{M}\p{N}\p{Pc}]`;function qL(e){if(Lte.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=zte.get(n),o=jte.get(n),a=Fte.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var cC=new Map(`C Other
|
|
371
|
+
Cc Control cntrl
|
|
372
|
+
Cf Format
|
|
373
|
+
Cn Unassigned
|
|
374
|
+
Co Private_Use
|
|
375
|
+
Cs Surrogate
|
|
376
|
+
L Letter
|
|
377
|
+
LC Cased_Letter
|
|
378
|
+
Ll Lowercase_Letter
|
|
379
|
+
Lm Modifier_Letter
|
|
380
|
+
Lo Other_Letter
|
|
381
|
+
Lt Titlecase_Letter
|
|
382
|
+
Lu Uppercase_Letter
|
|
383
|
+
M Mark Combining_Mark
|
|
384
|
+
Mc Spacing_Mark
|
|
385
|
+
Me Enclosing_Mark
|
|
386
|
+
Mn Nonspacing_Mark
|
|
387
|
+
N Number
|
|
388
|
+
Nd Decimal_Number digit
|
|
389
|
+
Nl Letter_Number
|
|
390
|
+
No Other_Number
|
|
391
|
+
P Punctuation punct
|
|
392
|
+
Pc Connector_Punctuation
|
|
393
|
+
Pd Dash_Punctuation
|
|
394
|
+
Pe Close_Punctuation
|
|
395
|
+
Pf Final_Punctuation
|
|
396
|
+
Pi Initial_Punctuation
|
|
397
|
+
Po Other_Punctuation
|
|
398
|
+
Ps Open_Punctuation
|
|
399
|
+
S Symbol
|
|
400
|
+
Sc Currency_Symbol
|
|
401
|
+
Sk Modifier_Symbol
|
|
402
|
+
Sm Math_Symbol
|
|
403
|
+
So Other_Symbol
|
|
404
|
+
Z Separator
|
|
405
|
+
Zl Line_Separator
|
|
406
|
+
Zp Paragraph_Separator
|
|
407
|
+
Zs Space_Separator
|
|
408
|
+
ASCII
|
|
409
|
+
ASCII_Hex_Digit AHex
|
|
410
|
+
Alphabetic Alpha
|
|
411
|
+
Any
|
|
412
|
+
Assigned
|
|
413
|
+
Bidi_Control Bidi_C
|
|
414
|
+
Bidi_Mirrored Bidi_M
|
|
415
|
+
Case_Ignorable CI
|
|
416
|
+
Cased
|
|
417
|
+
Changes_When_Casefolded CWCF
|
|
418
|
+
Changes_When_Casemapped CWCM
|
|
419
|
+
Changes_When_Lowercased CWL
|
|
420
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
421
|
+
Changes_When_Titlecased CWT
|
|
422
|
+
Changes_When_Uppercased CWU
|
|
423
|
+
Dash
|
|
424
|
+
Default_Ignorable_Code_Point DI
|
|
425
|
+
Deprecated Dep
|
|
426
|
+
Diacritic Dia
|
|
427
|
+
Emoji
|
|
428
|
+
Emoji_Component EComp
|
|
429
|
+
Emoji_Modifier EMod
|
|
430
|
+
Emoji_Modifier_Base EBase
|
|
431
|
+
Emoji_Presentation EPres
|
|
432
|
+
Extended_Pictographic ExtPict
|
|
433
|
+
Extender Ext
|
|
434
|
+
Grapheme_Base Gr_Base
|
|
435
|
+
Grapheme_Extend Gr_Ext
|
|
436
|
+
Hex_Digit Hex
|
|
437
|
+
IDS_Binary_Operator IDSB
|
|
438
|
+
IDS_Trinary_Operator IDST
|
|
439
|
+
ID_Continue IDC
|
|
440
|
+
ID_Start IDS
|
|
441
|
+
Ideographic Ideo
|
|
442
|
+
Join_Control Join_C
|
|
443
|
+
Logical_Order_Exception LOE
|
|
444
|
+
Lowercase Lower
|
|
445
|
+
Math
|
|
446
|
+
Noncharacter_Code_Point NChar
|
|
447
|
+
Pattern_Syntax Pat_Syn
|
|
448
|
+
Pattern_White_Space Pat_WS
|
|
449
|
+
Quotation_Mark QMark
|
|
450
|
+
Radical
|
|
451
|
+
Regional_Indicator RI
|
|
452
|
+
Sentence_Terminal STerm
|
|
453
|
+
Soft_Dotted SD
|
|
454
|
+
Terminal_Punctuation Term
|
|
455
|
+
Unified_Ideograph UIdeo
|
|
456
|
+
Uppercase Upper
|
|
457
|
+
Variation_Selector VS
|
|
458
|
+
White_Space space
|
|
459
|
+
XID_Continue XIDC
|
|
460
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Hy(e),e])),jte=new Map([["s",Rn(383)],[Rn(383),"s"]]),Fte=new Map([[Rn(223),Rn(7838)],[Rn(107),Rn(8490)],[Rn(229),Rn(8491)],[Rn(969),Rn(8486)]]),zte=new Map([Bs(453),Bs(456),Bs(459),Bs(498),...gx(8072,8079),...gx(8088,8095),...gx(8104,8111),Bs(8124),Bs(8140),Bs(8188)]),Bte=new Map([["alnum",it`[\p{Alpha}\p{Nd}]`],["alpha",it`\p{Alpha}`],["ascii",it`\p{ASCII}`],["blank",it`[\p{Zs}\t]`],["cntrl",it`\p{Cc}`],["digit",it`\p{Nd}`],["graph",it`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",it`\p{Lower}`],["print",it`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",it`[\p{P}\p{S}]`],["space",it`\p{space}`],["upper",it`\p{Upper}`],["word",it`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",it`\p{AHex}`]]);function Ute(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Bs(e){const t=Rn(e);return[t.toLowerCase(),t]}function gx(e,t){return Ute(e,t).map(n=>Bs(n))}var YL=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Hte(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};WL(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:dw(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};jd(e,Gte,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};jd(e,Vte,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return jd(e,qte,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var Gte={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=$i();o.body[0].body.push(pl({negate:!0,body:r}),ic("Any"));const a=$i();a.body[0].body.push(FL("greedy",0,1/0,o)),n(mn(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const a=t.body[o];lh(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=XL(t.get(e));if(r){const i=$i({flags:r});i.body[0].body=e.body,e.body=[mn(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:a},u){const{kind:c,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:p,supportedGNodes:m,wordIsAscii:y}=u;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")a(mn(pl({body:[Ul({body:[lw("string_end")]}),Ul({body:[Uy(10)]})]}),t));else if(c==="line_start")a(mn(Po(it`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(m.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&Zte(b))a(mn(pl({negate:!0}),t));else{if(p)throw new Error(it`Uses "\G" in a way that requires a subclass`);a(Us(lw("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(mn(Po(it`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!y&&!h){const b=`(?:(?<=${$o})(?!${$o})|(?<!${$o})(?=${$o}))`,v=`(?:(?<=${$o})(?=${$o})|(?<!${$o})(?!${$o}))`;a(mn(Po(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!bx(n)&&(n=yx(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!bx(r)&&(r=yx(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=fg({body:[e]});n(mn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:u}){const{kind:c,negate:f,value:h}=e;if(o&&(c==="digit"||h==="digit")){n(Us(cw("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(mn(vx(Po(Ite),f),t));return}if(u&&(c==="word"||h==="word")){n(Us(cw("word",{negate:f}),t));return}if(c==="any")n(Us(ic("Any"),t));else if(c==="digit")n(Us(ic("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(it`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",m=it`\p{RI}{2}|${p}(?:\u200D${p})*`;n(mn(Po(it`(?>\r\n|${i?it`\p{RGI_Emoji}`:m}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(Us(ic("AHex",{negate:f}),t));else if(c==="newline")n(mn(Po(f?`[^
|
|
461
|
+
]`:`(?>\r
|
|
462
|
+
?|[
|
|
463
|
+
\v\f
\u2028\u2029])`),t));else if(c==="posix")if(!i&&(h==="graph"||h==="print")){if(r==="strict")throw new Error(`POSIX class "${h}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[h];f&&(p=`\0-${Rn(p.codePointAt(0)-1)}${Rn(p.codePointAt(2)+1)}-`),n(mn(Po(`[${p}]`),t))}else n(mn(vx(Po(Bte.get(h)),f),t));else if(c==="property")cC.has(Hy(h))||(e.key="sc");else if(c==="space")n(Us(ic("space",{negate:f}),t));else if(c==="word")n(mn(vx(Po($o),f),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:a}){const{kind:u,flags:c}=e;if(u==="flags")if(!c.enable&&!c.disable)r();else{const f=$i({flags:c});f.body[0].body=a(),i(mn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],p=n.body.length===1&&IL(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(it`Uses "\K" in a way that's unsupported`);const m=pl({behind:!0});m.body[0].body=o(),i(mn(m,t))}else throw new Error(`Unexpected directive kind "${u}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(mn(pl({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=$i();t.body[0].body.push(e.body),e.body=mn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const a=ZL(o.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(it`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!bx(n)&&(n=yx(n,t),e.ref=n)}},Vte={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:a,openRefs:u,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&u.has(e.number)){const p=Us(dM(e.number),t);c.set(p,u.get(e.number)),n(p);return}u.set(e.number,e),a.set(e.number,[]),e.name&&lh(a,e.name,[]);const h=a.get(e.name??e.number);for(let p=0;p<h.length;p++){const m=h[p];if(f===m.node||f&&f===m.origin||e===m.origin){h.splice(p,1);break}}if(a.get(e.number).push({node:e,origin:f}),e.name&&a.get(e.name).push({node:e,origin:f}),e.name){const p=lh(o,e.name,new Map);let m=!1;if(f)m=!0;else for(const y of p.values())if(!y.hasDuplicateNameToRemove){m=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:m})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=ty(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let h=t;for(;(h=h.parent)&&!(h.type==="CapturingGroup"&&(h.name===o||h.number===o)););r.reffedNodesByReferencer.set(e,h);return}const a=r.subroutineRefMap.get(o),u=o===0,c=u?dM(0):KL(a,r.groupOriginByCopy,null);let f=c;if(!u){const h=XL(Kte(a,m=>m.type==="Group"&&!!m.flags)),p=h?ty(r.globalFlags,h):r.globalFlags;Yte(p,r.currentFlags)||(f=$i({flags:Xte(p)}),f.body[0].body.push(c))}n(mn(f,t),{traverse:!u})}},qte={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(a=>Wte(a,e));if(!o.length)n(mn(pl({negate:!0}),t));else if(o.length>1){const a=$i({atomic:!0,body:o.reverse().map(u=>Ul({body:[uw(u.number)]}))});n(mn(a,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=jL();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function WL(e){jd(e,{"*"({node:t,parent:n}){t.parent=n}})}function Yte(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Wte(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=QL(n.parent);for(const i of r){if(i===n)break;if(i===e||JL(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function KL(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,a]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[o]=KL(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function dM(e){const t=zL(e);return t.isRecursive=!0,t}function Kte(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function yx(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function XL(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var o,a;(o=r.enable)!=null&&o[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Xte({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function QL(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function ZL(e){const t=e.find(n=>n.kind==="search_start"||Jte(n,{negate:!1})||!Qte(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=ZL(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function JL(e,t){const n=QL(e)??[];for(const r of n)if(r===t||JL(r,t))return!0;return!1}function Qte({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Zte(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Jte(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&IL(e.body[0],{type:"Assertion",kind:"search_start"})}function bx(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Po(e,t){const r=LL(e,{...t,unicodePropertyMap:cC}).body;return r.length>1||r[0].body.length>1?$i({body:r}):r[0].body[0]}function vx(e,t){return e.negate=t,e}function Us(e,t){return e.parent=t,e}function mn(e,t){return WL(e),e.parent=t,e}function ene(e,t){const n=VL(t),r=dw(n.target,"ES2024"),i=dw(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,u=null;if(!i){const y=[e.flags.ignoreCase];jd(e,tne,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(b){y.push(b)},setHasCasedChar(){y.at(-1)?a=!0:u=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!u)};let f=e;const h={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&a&&u),useFlagMods:i,useFlagV:r,verbose:n.verbose};function p(y){return h.lastNode=f,f=y,Pte(nne[y.type],`Unexpected node type "${y.type}"`)(y,h,p)}const m={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete m.options.force.v,m.options.disable.v=!0,m.options.unicodeSetsPlugin=null),m._captureTransfers=new Map,m._hiddenCaptures=[],h.captureMap.forEach((y,b)=>{y.hidden&&m._hiddenCaptures.push(b),y.transferTo&&lh(m._captureTransfers,y.transferTo,[]).push(b)}),m}var tne={"*":{enter({node:e},t){if(pM(e)){const n=t.getCurrentModI();t.pushModI(e.flags?ty({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){pM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){fC(Rn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),ej(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&YL.has(e.value)&&t.setHasCasedChar()}},nne={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?it`\B`:it`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,a={ignoreCase:t.currentFlags.ignoreCase},u=t.originMap.get(e);return u&&(a.hidden=!0,o>u.number&&(a.transferTo=u.number)),t.captureMap.set(o,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Rn(e),r=Ku(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&fC(n)){const i=qL(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");ji.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(mM)&&(a=[Uy(45),...a.filter(f=>!mM(f))]);const u=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||ji.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=$i(),m=p.body[0];return p.parent=o,m.parent=p,a=a.filter(y=>!h.includes(y)),e.body=a,a.length?(e.parent=m,m.body.push(e)):p.body.pop(),h.forEach(y=>{const b=Ul({body:[y]});y.parent=b,b.parent=p,p.body.push(b)}),n(p)}}t.inCharClass=!0;const f=u();return t.inCharClass=!1,f}const c=a[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(ji.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&a.length===1&&c.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return u()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Ku(n,i),a=Ku(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=ej(e);ane(c).forEach(h=>{u.add(Array.isArray(h)?`${Ku(h[0],i)}-${Ku(h[1],i)}`:Ku(h,i))})}return`${o}-${a}${[...u].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":it`[^\n]`;if(e==="digit")return t?it`\D`:it`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&YL.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?it`\P`:it`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?it`\W`:it`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const a=i.currentFlags;n&&(i.currentFlags=ty(a,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${lne(e,n,i.useFlagMods)}${u})`;return i.currentFlags=a,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+une(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:it`\g<${t}&R=${r}>`}},rne=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),ine=new Set(["-","\\","]","^","["]),one=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),hM=new Map([[9,it`\t`],[10,it`\n`],[11,it`\v`],[12,it`\f`],[13,it`\r`],[8232,it`\u2028`],[8233,it`\u2029`],[65279,it`\uFEFF`]]),sne=new RegExp("^\\p{Cased}$","u");function fC(e){return sne.test(e)}function ej(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let a=r;a<=i;a++){const u=Rn(a);if(!fC(u))continue;const c=qL(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Ku(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(hM.has(e))return hM.get(e);if(e<32||e>126&&e<160||e>262143||t&&cne(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?one:ine:rne,o=Rn(e);return(i.has(o)?"\\":"")+o}function ane(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function lne(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function une({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function pM({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function cne(e){return e>47&&e<58}function mM({type:e,value:t}){return e==="Character"&&t===45}var na,Uo,Dl,ra,Ml,wh,hw,Sa,fne=(Sa=class extends RegExp{constructor(n,r,i){var t=(...bve)=>(super(...bve),He(this,wh),He(this,na,new Map),He(this,Uo,null),He(this,Dl),He(this,ra,null),He(this,Ml,null),te(this,"rawOptions",{}),this);const o=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),$e(this,Dl,a.source),a instanceof Sa&&($e(this,na,K(a,na)),$e(this,ra,K(a,ra)),$e(this,Ml,K(a,Ml)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),$e(this,Dl,n),$e(this,na,hne(a.hiddenCaptures,a.transfers)),$e(this,Ml,a.strategy),this.rawOptions=i??{}}o||$e(this,Uo,this)}get source(){return K(this,Dl)||"(?:)"}exec(n){if(!K(this,Uo)){const{lazyCompile:o,...a}=this.rawOptions;$e(this,Uo,new Sa(K(this,Dl),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(K(this,Ml)==="clip_search"&&r&&i){this.lastIndex=0;const o=rt(this,wh,hw).call(this,n.slice(i));return o&&(dne(o,i,n,this.hasIndices),this.lastIndex+=i),o}return rt(this,wh,hw).call(this,n)}},na=new WeakMap,Uo=new WeakMap,Dl=new WeakMap,ra=new WeakMap,Ml=new WeakMap,wh=new WeakSet,hw=function(n){K(this,Uo).lastIndex=this.lastIndex;const r=xT(Sa.prototype,this,"exec").call(K(this,Uo),n);if(this.lastIndex=K(this,Uo).lastIndex,!r||!K(this,na).size)return r;const i=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const a=[0];for(let u=1;u<i.length;u++){const{hidden:c,transferTo:f}=K(this,na).get(u)??{};if(c?a.push(null):(a.push(r.length),r.push(i[u]),this.hasIndices&&r.indices.push(o[u])),f&&i[u]!==void 0){const h=a[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=i[u],this.hasIndices&&(r.indices[h]=o[u]),r.groups){K(this,ra)||$e(this,ra,pne(this.source));const p=K(this,ra).get(f);p&&(r.groups[p]=i[u],this.hasIndices&&(r.indices.groups[p]=o[u]))}}}return r},Sa);function dne(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const u=i[a];u&&(i[a]=[u[0]+t,u[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(a=>{const u=o[a];u&&(o[a]=[u[0]+t,u[1]+t])})}}function hne(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)lh(n,o,{}).transferTo=r;return n}function pne(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:a,groups:{capture:u,name:c}}=o;a==="["?r++:r?a==="]"&&r--:u&&(i++,c&&n.set(i,c))}return n}function mne(e,t){const n=gne(e,t);return n.options?new fne(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function gne(e,t){const n=VL(t),r=LL(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:cC}),i=Hte(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=ene(i,n),a=Ote(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=Dte(a.pattern),c=Ate(u.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),f={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const h=c.hiddenCaptures.sort((b,v)=>b-v),p=Array.from(c.captureTransfers),m=i._strategy,y=f.pattern.length>=n.lazyCompileLength;(h.length||p.length||m||y)&&(f.options={...h.length&&{hiddenCaptures:h},...p.length&&{transfers:p},...m&&{strategy:m},...y&&{lazyCompile:y}})}return f}const gM=4294967295;class yne{constructor(t,n={}){te(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const u=i==null?void 0:i.get(a);if(u){if(u instanceof RegExp)return u;if(r)return null;throw u}try{const c=o(a);return i==null||i.set(a,c),c}catch(c){if(i==null||i.set(a,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,o=[];function a(u,c,f=0){return{index:u,captureIndices:c.indices.map(h=>h==null?{start:gM,end:gM,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let u=0;u<this.regexps.length;u++){const c=this.regexps[u];if(c)try{c.lastIndex=n;const f=c.exec(i);if(!f)continue;if(f.index===n)return a(u,f,0);o.push([u,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(o.length){const u=Math.min(...o.map(c=>c[1].index));for(const[c,f,h]of o)if(f.index===u)return a(c,f,h)}return null}}function bne(e,t){return mne(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function vne(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>bne(n,{target:t.target})),{createScanner(n){return new yne(n,t)},createString(n){return{content:n}}}}const xne=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function wne(e,t,n){const r=[];for(const i of e){if(n==="v3"){const u=i.children.flatMap((c,f)=>{if(c.type!=="element")return c;const h=c.children[0];if(h.type!=="text")return c;const p=f===i.children.length-1;if(!xx(h.value,p))return c;const y=h.value.split(/(\s+\/\/)/);if(y.length<=1)return c;let b=[y[0]];for(let v=1;v<y.length;v+=2)b.push(y[v]+(y[v+1]||""));return b=b.filter(Boolean),b.length<=1?c:b.map(v=>({...c,children:[{type:"text",value:v}]}))});u.length!==i.children.length&&(i.children=u)}const o=i.children;let a=o.length-1;n==="v1"?a=0:t&&(a=o.length-2);for(let u=Math.max(a,0);u<o.length;u++){const c=o[u];if(c.type!=="element")continue;const f=c.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const h=u===o.length-1;let p=xx(f.value,h),m;if(!p&&u>0&&f.value.trim().startsWith("[!code")){const y=o[u-1];if((y==null?void 0:y.type)==="element"){const b=y.children.at(0);if((b==null?void 0:b.type)==="text"&&b.value.includes("//")){const v=b.value+f.value,S=xx(v,h);if(S){p=S,r.push({info:S,line:i,token:y,isLineCommentOnly:o.length===2&&y.children.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:[c]});continue}}}}if(p)if(t&&!h&&u!==0){const y=yM(o[u-1],"{")&&yM(o[u+1],"}");r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===3&&c.children.length===1,isJsxStyle:y,additionalTokens:m})}else r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:m})}}return r}function yM(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function xx(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const i=e.length-n.length-r;for(const[o,a]of xne){if(a&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(i):void 0]}}function Sne(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function Cne(e,t,n,r){return r==null&&(r="v3"),{name:e,code(i){const o=i.children.filter(f=>f.type==="element"),a=[];i.data??(i.data={});const u=i.data;u._shiki_notation??(u._shiki_notation=wne(o,["jsx","tsx"].includes(this.options.lang),r));const c=u._shiki_notation;for(const f of c){if(f.info[1].length===0)continue;let h=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&h++;let p=!1;if(f.info[1]=f.info[1].replace(t,(...y)=>n.call(this,y,f.line,f.token,o,h)?(p=!0,""):y[0]),!p)continue;r==="v1"&&(f.info[1]=Sne(f.info[1]));const m=f.info[1].trim().length===0;if(m&&(f.info[1]=""),m&&f.isLineCommentOnly)a.push(f.line);else if(m&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(m){if(f.additionalTokens)for(let y=f.additionalTokens.length-1;y>=0;y--){const b=f.additionalTokens[y],v=f.line.children.indexOf(b);v!==-1&&f.line.children.splice(v,1)}f.line.children.splice(f.line.children.indexOf(f.token),1)}else{const y=f.token.children[0];if(y.type==="text"&&(y.value=f.info.join(""),f.additionalTokens))for(const b of f.additionalTokens){const v=b.children[0];(v==null?void 0:v.type)==="text"&&(v.value="")}}}for(const f of a){const h=i.children.indexOf(f),p=i.children[h+1];let m=1;(p==null?void 0:p.type)==="text"&&(p==null?void 0:p.value)===`
|
|
464
|
+
`&&(m=2),i.children.splice(h,m)}}}}function Ene(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const i=r.split("-").map(o=>Number.parseInt(o,10));return i.length===1?[i[0]]:Array.from({length:i[1]-i[0]+1},(o,a)=>i[0]+a)}):null}const Mm=Symbol("highlighted-lines");function kne(e={}){const{className:t="highlighted",zeroIndexed:n=!1}=e;return{name:"@shikijs/transformers:meta-highlight",line(r,i){var c;if(!((c=this.options.meta)!=null&&c.__raw))return;const o=this.meta;o[Mm]??(o[Mm]=Ene(this.options.meta.__raw));const a=o[Mm]??[],u=n?i-1:i;return a.includes(u)&&this.addClassToHast(r,t),r}}}function Rne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tj(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return Cne(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Rne).join("|")})(:\\d+)?\\]`,"gi"),function([o,a,u=":1"],c,f,h,p){const m=Number.parseInt(u.slice(1),10);for(let y=p;y<Math.min(p+m,h.length);y++)this.addClassToHast(h[y],n[a]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}function _ne(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return tj({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Tne(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return tj({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const Ane="vitesse-black",Dne="vitesse-light",Mne={javascript:()=>Ur(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>Ur(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>Ur(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>Ur(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>Ur(()=>import("./json-Cp-IABpG.js"),[]),css:()=>Ur(()=>import("./css-DPfMkruS.js"),[]),html:()=>Ur(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>Ur(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>Ur(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>Ur(()=>import("./python-B6aJPvgy.js"),[])},One=()=>Ur(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),$ne=()=>Ur(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let wx=null,Sx=null;const bM=new Set;async function dC(){return wx||Sx||(Sx=$ee({themes:[One,$ne],langs:[],engine:vne()}),wx=await Sx,wx)}async function nj(e){if(bM.has(e))return;const t=Mne[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await dC(),r=await t();await n.loadLanguage(r),bM.add(e)}async function Pne(e,t="typescript",n={}){await nj(t);const r=await dC(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:Dne,dark:Ane},defaultColor:!1,...o&&{meta:o},transformers:[_ne(),Tne(),kne()]})}function rj(e,t="typescript",n={}){var p;const[r,i]=C.useState(""),[o,a]=C.useState(!0),[u,c]=C.useState(null),f=C.useRef(0),h=((p=n.highlightLines)==null?void 0:p.join(","))??"";return C.useEffect(()=>{const m=++f.current;Pne(e,t,{highlightLines:n.highlightLines}).then(y=>{f.current===m&&(i(y),a(!1),c(null))}).catch(y=>{f.current===m&&(c(y),a(!1))})},[e,t,h]),{html:r,loading:o,error:u}}const yc={"code-block":"_code-block_5ek21_1","code-block-header":"_code-block-header_5ek21_9","code-block-copy-button":"_code-block-copy-button_5ek21_16","code-block-content":"_code-block-content_5ek21_21","code-block-loading":"_code-block-loading_5ek21_72","code-block-error":"_code-block-error_5ek21_76"},ij=({code:e,className:t,children:n,...r})=>{const[i,o]=C.useState(!1),a=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy code:",u)}},[e]);return E.jsxs(Ui,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",className:ze(yc["code-block-copy-button"],t),onClick:a,size:"xsmall",variant:"inverted",...r,children:[i?E.jsx(kh,{}):E.jsx(Rh,{}),n??(i?"Copied":"Copy")]})};ij.displayName="CodeBlockCopyButton";const oj=({filename:e,copyable:t=UQ,code:n=HQ,className:r,CopyButtonProps:i,children:o,...a})=>E.jsxs(Ze,{"data-slot":"code-block-header",className:ze(yc["code-block-header"],r),ay:"center",ax:"space-between",gap:4,py:2,px:4,fullwidth:!0,...a,children:[E.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:e}),o,E.jsx(ij,{code:n,disabled:!t||!n,...i})]});oj.displayName="CodeBlockHeader";const sj=({html:e,showLineNumbers:t=GI,className:n,...r})=>E.jsx(Ye,{"data-slot":"code-block-content","data-line-numbers":t||void 0,className:ze(yc["code-block-content"],GQ({showLineNumbers:t}),n),dangerouslySetInnerHTML:{__html:e},ax:"stretch",fullwidth:!0,...r});sj.displayName="CodeBlockContent";const hC=({code:e,language:t=BQ,filename:n,showLineNumbers:r,copyable:i=!0,highlightLines:o,rows:a,html:u,className:c,HeaderProps:f,CopyButtonProps:h,...p})=>{const{html:m,loading:y,error:b}=rj(e,t,{highlightLines:o}),v=u||m,S=n||i,x=a?{maxHeight:`calc(${a} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`,overflowY:"auto"}:void 0;return E.jsxs("div",{"data-slot":"code-block",className:ze(yc["code-block"],c),...p,children:[S&&E.jsx(oj,{filename:n,copyable:i,code:e,CopyButtonProps:h,...f}),y&&!u&&E.jsx(Ye,{ay:"center",ax:"center",className:yc["code-block-loading"]}),b&&!u&&E.jsxs(Ye,{ay:"center",ax:"center",className:yc["code-block-error"],children:["Error highlighting code: ",b.message]}),v&&E.jsx(sj,{html:v,showLineNumbers:r,style:x})]})};hC.displayName="CodeBlock";const Cx={"code-inline":"_code-inline_h7rdt_1"},aj=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=rj(o,e||"typescript");if(!e)return E.jsx("code",{"data-slot":"code-inline",className:ze(Cx["code-inline"],n),...i,children:r});const u=t||a;if(u){const c=u.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return E.jsx("code",{"data-slot":"code-inline",className:ze(Cx["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return E.jsx("code",{"data-slot":"code-inline",className:ze(Cx["code-inline"],n),...i,children:r})};aj.displayName="CodeInline";const vM={};function Ma(e,t){const n=C.useRef(vM);return n.current===vM&&(n.current=e(t)),n}const Ex=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Nne=Ex&&Ex!==C.useLayoutEffect?Ex:e=>e();function lr(e){const t=Ma(Ine).current;return t.next=e,Nne(t.effect),t.trampoline}function Ine(){const e={next:void 0,callback:Lne,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Lne(){}function lj({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const jne=()=>{},qn=typeof document<"u"?C.useLayoutEffect:jne;function pw(e,t,n,r){const i=Ma(uj).current;return zne(i,e,t,n,r)&&cj(i,[e,t,n,r]),i.callback}function Fne(e){const t=Ma(uj).current;return Bne(t,e)&&cj(t,e),t.callback}function uj(){return{callback:null,cleanup:null,refs:[]}}function zne(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Bne(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function cj(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const fj={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Une={...fj,position:"fixed",top:0,left:0},Hne={...fj,position:"absolute"};function Er(){}const Pi=Object.freeze({});function dj(e,t,n,r){let i=!1,o=!1;const a=Pi;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function hf(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Gne=[];function hj(e){C.useEffect(e,Gne)}const Om=null;let Vne=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(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 $m=new Vne;let hl=class pj{constructor(){te(this,"currentId",Om);te(this,"cancel",()=>{this.currentId!==Om&&($m.cancel(this.currentId),this.currentId=Om)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new pj}static request(t){return $m.request(t)}static cancel(t){return $m.cancel(t)}request(t){this.cancel(),this.currentId=$m.request(()=>{this.currentId=Om,t()})}};function qne(){const e=Ma(hl.create).current;return hj(e.disposeEffect),e}function Yne(e){return e==null?e:"current"in e?e.current:e}let pC=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Wne={[pC.startingStyle]:""},Kne={[pC.endingStyle]:""},mj={transitionStatus(e){return e==="starting"?Wne:e==="ending"?Kne:null}};function Xne(e,t=!1,n=!0){const r=qne();return lr((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=Yne(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=pC.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function gj(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=lr(i),a=Xne(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}let xM=(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 qy={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ru={valid(e){return e===null?null:e?{[xM.valid]:""}:{[xM.invalid]:""}}},yj=C.createContext({invalid:void 0,name:void 0,validityData:{state:qy,errors:[],error:"",value:"",initialValue:null},setValidityData:Er,disabled:void 0,touched:!1,setTouched:Er,dirty:!1,setDirty:Er,filled:!1,setFilled:Er,focused:!1,setFocused:Er,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=Pi)=>e,getInputValidationProps:(e=Pi)=>e,inputRef:{current:null},commit:async()=>{}}});function pf(e=!0){const t=C.useContext(yj);if(t.setValidityData===Er&&!e)throw new Error(hf(28));return t}function mw(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Qne=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Er,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function zh(){return C.useContext(Qne)}function bj(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:u}=zh(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=pf(),m=lr(e.getValue);qn(()=>{if(!t)return;let y=n;y===void 0&&(y=m()),h.initialValue===null&&y!==null&&p(b=>({...b,initialValue:y}))},[t,p,n,h.initialValue,m]),qn(()=>{!t||!r||u.current.fields.set(r,{getValue:m,name:i,controlRef:o,validityData:mw(h,c),validate(y=!0){let b=n;b===void 0&&(b=m()),f.current=!0,y?yn.flushSync(()=>a(b)):a(b)}})},[a,o,t,u,m,r,c,f,i,h,n]),qn(()=>{const y=u.current.fields;return()=>{r&&y.delete(r)}},[u,r])}function vj(){return typeof window<"u"}function xj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zne(e){return vj()?e instanceof Element||e instanceof xj(e).Element:!1}function wj(e){return vj()?e instanceof HTMLElement||e instanceof xj(e).HTMLElement:!1}const Jne={...as};let wM=0;function ere(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(wM+=1,r(`${t}-${wM}`))},[n,t]),i}const SM=Jne.useId;function tre(e,t){if(SM!==void 0){const n=SM();return e??`${t}-${n}`}return ere(e,t)}function Hl(e){return tre(e,"base-ui")}const Sj=C.createContext({controlId:void 0,registerControlId:Er,labelId:void 0,setLabelId:Er,messageIds:[],setMessageIds:Er,getDescriptionProps:e=>e});function Oa(){return C.useContext(Sj)}function nre(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=Oa(),a=Hl(t),u=n?i:void 0,c=Ma(()=>Symbol("labelable-control")),f=C.useRef(!1),h=C.useRef(t!=null),p=lr(()=>{!f.current||o===Er||(f.current=!1,o(c.current,void 0))});return qn(()=>{if(o===Er)return;let m;if(n){const y=r==null?void 0:r.current;Zne(y)&&y.closest("label")!=null?m=t??null:m=u??a}else if(t!=null)h.current=!0,m=t;else if(h.current)m=a;else{p();return}if(m===void 0){p();return}f.current=!0,o(c.current,m)},[t,r,u,o,n,a,c,p]),C.useEffect(()=>p,[p]),i??a}function Cj(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),qn(()=>{if(!e&&o&&r!=="ending"&&n){const u=hl.request(()=>{i("ending")});return()=>{hl.cancel(u)}}},[e,o,r,n]),qn(()=>{if(!e||t)return;const u=hl.request(()=>{i(void 0)});return()=>{hl.cancel(u)}},[t,e]),qn(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=hl.request(()=>{i("idle")});return()=>{hl.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function rre(e,t){const n=C.useRef(e),r=lr(t);qn(()=>{n.current!==e&&r(n.current)},[e,r]),qn(()=>{n.current=e},[e])}const ire=parseInt(C.version,10);function ore(e){return ire>=e}function sre(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function are(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Ed=0;let lre=class Ej{constructor(){te(this,"currentId",Ed);te(this,"clear",()=>{this.currentId!==Ed&&(clearTimeout(this.currentId),this.currentId=Ed)});te(this,"disposeEffect",()=>this.clear)}static create(){return new Ej}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ed,n()},t)}isStarted(){return this.currentId!==Ed}};function ure(){const e=Ma(lre.create).current;return hj(e.disposeEffect),e}const kj="none";function Rj(e){return(e==null?void 0:e.ownerDocument)||document}const Ll={"field-label-group":"_field-label-group_1bag1_3","field-label":"_field-label_1bag1_3","field-root-floating":"_field-root-floating_1bag1_15","field-hint":"_field-hint_1bag1_19","field-error-tooltip":"_field-error-tooltip_1bag1_20","field-error-absolute":"_field-error-absolute_1bag1_31"},_j=50,Tj=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?E.jsxs("span",{"data-slot":"field-hint",className:ze(Ll["field-hint"],r),...i,children:[E.jsx(Il,{trigger:E.jsx(e,{}),delay:_j,TriggerProps:{render:E.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&E.jsx(Fe,{size:-1,children:t})]}):E.jsxs("span",{"data-slot":"field-hint",className:ze(Ll["field-hint"],r),...i,children:[e&&E.jsx(e,{}),t&&E.jsx(Fe,{size:-1,children:t})]});Tj.displayName="FieldHint";const cre=C.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function fre(e=!1){const t=C.useContext(cre);if(!t&&!e)throw new Error(hf(86));return t}function CM(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(ore(19)?n==null?void 0:n.ref:t.ref)??null}function gw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function dre(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function hre(e,t){return typeof e=="function"?e(t):e}function pre(e,t){return typeof e=="function"?e(t):e}const Fd={};function Bc(e,t,n,r,i){let o={...yw(e,Fd)};return t&&(o=dg(o,t)),n&&(o=dg(o,n)),r&&(o=dg(o,r)),o}function mre(e){if(e.length===0)return Fd;if(e.length===1)return yw(e[0],Fd);let t={...yw(e[0],Fd)};for(let n=1;n<e.length;n+=1)t=dg(t,e[n]);return t}function dg(e,t){return Aj(t)?t(e):gre(e,t)}function gre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=gw(e.style,r);break}case"className":{e[n]=Dj(e.className,r);break}default:yre(n,r)?e[n]=bre(e[n],r):e[n]=r}}return e}function yre(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 Aj(e){return typeof e=="function"}function yw(e,t){return Aj(e)?e(t):e??Fd}function bre(e,t){return t?e?n=>{if(vre(n)){const i=n;bw(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function bw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Dj(e,t){return t?e?t+" "+e:t:e}function vre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function iu(e,t,n={}){const r=t.render,i=xre(t,n);if(n.enabled===!1)return null;const o=n.state??Pi;return Sre(e,r,i,o)}function xre(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Pi,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?hre(n,o):void 0,p=f?pre(r,o):void 0,m=f?dre(o,c):Pi,y=f?gw(m,Array.isArray(u)?mre(u):u)??Pi:Pi;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Fne([y.ref,CM(i),...a]):y.ref=pw(y.ref,CM(i),a):pw(null,null)),f?(h!==void 0&&(y.className=Dj(y.className,h)),p!==void 0&&(y.style=gw(y.style,p)),y):Pi}const wre=Symbol.for("react.lazy");function Sre(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Bc(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===wre&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Cre(e,n);throw new Error(hf(8))}function Cre(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const hg=Object.keys(qy);function Ere(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of hg)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function kre(e){const{formRef:t,clearErrors:n}=zh(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:u,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:m,getDescriptionProps:y}=Oa(),b=ure(),v=C.useRef(null),S=lr(async(k,T=!1)=>{const A=v.current;if(!A)return;if(T){if(f.valid!==!1)return;const z=A.validity;if(!z.valueMissing){const j={value:k,state:{...qy,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(A.setCustomValidity(""),m){const F=t.current.fields.get(m);F&&t.current.fields.set(m,{...F,...mw(j,!1)})}r(j);return}const G=hg.reduce((j,F)=>(j[F]=z[F],j),{});if(!G.valid&&!Ere(G))return}function D(z){const G=hg.reduce((F,U)=>(F[U]=z.validity[U],F),{});let j=!1;for(const F of hg)if(F!=="valid"){if(F==="valueMissing"&&G[F])j=!0;else if(G[F])return G}return j&&!c.current&&(G.valid=!0,G.valueMissing=!1),G}b.clear();let O=null,$=[];const B=D(A);let L;const N=p();if(A.validationMessage&&!N)L=A.validationMessage,$=[A.validationMessage];else{const z=Array.from(t.current.fields.values()).reduce((j,F)=>(F.name&&(j[F.name]=F.getValue()),j),{}),G=i(k,z);typeof G=="object"&&G!==null&&"then"in G?O=await G:O=G,O!==null?(B.valid=!1,B.customError=!0,Array.isArray(O)?($=O,A.setCustomValidity(O.join(`
|
|
465
|
+
`))):O&&($=[O],A.setCustomValidity(O))):N&&(A.setCustomValidity(""),B.customError=!1,A.validationMessage?(L=A.validationMessage,$=[A.validationMessage]):A.validity.valid&&!B.valid&&(B.valid=!0))}const M={value:k,state:B,error:L??(Array.isArray(O)?O[0]:O??""),errors:$,initialValue:o.initialValue};if(m){const z=t.current.fields.get(m);z&&t.current.fields.set(m,{...z,...mw(M,u)})}r(M)}),x=C.useCallback((k={})=>Bc(y,f.valid===!1?{"aria-invalid":!0}:Pi,k),[y,f.valid]),_=C.useCallback((k={})=>Bc({onChange(T){if(T.nativeEvent.defaultPrevented)return;if(n(h),!p()){S(T.currentTarget.value,!0);return}if(u)return;const A=T.currentTarget;if(A.value===""){S(A.value);return}b.clear(),a?b.start(a,()=>{S(A.value)}):S(A.value)}},x(k)),[x,n,h,b,S,u,a,p]);return C.useMemo(()=>({getValidationProps:x,getInputValidationProps:_,inputRef:v,commit:S}),[x,_,S])}const Rre=function(e){const t=Hl(),[n,r]=C.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=C.useState(void 0),[a,u]=C.useState([]),c=Ma(()=>new Map),{messageIds:f}=Oa(),h=lr((y,b)=>{const v=c.current;if(b===void 0){v.delete(y);return}v.set(y,b),r(S=>{if(v.size===0)return;let x;for(const _ of v.values()){if(S!==void 0&&_===S)return S;x===void 0&&(x=_)}return x})}),p=C.useCallback(y=>Bc({"aria-describedby":f.concat(a).join(" ")||void 0},y),[f,a]),m=C.useMemo(()=>({controlId:n,registerControlId:h,labelId:i,setLabelId:o,messageIds:a,setMessageIds:u,getDescriptionProps:p}),[n,h,i,o,a,u,p]);return E.jsx(Sj.Provider,{value:m,children:e.children})},_re=C.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=zh(),{render:o,className:a,validate:u,validationDebounceTime:c=0,validationMode:f=r,name:h,disabled:p=!1,invalid:m,dirty:y,touched:b,actionsRef:v,...S}=e,{disabled:x}=fre(),_=lr(u||(()=>null)),k=x||p,[T,A]=C.useState(!1),[D,O]=C.useState(!1),[$,B]=C.useState(!1),[L,N]=C.useState(!1),M=y??D,z=b??T,G=C.useRef(!1),j=lr(ve=>{y===void 0&&(ve&&(G.current=!0),O(ve))}),F=lr(ve=>{b===void 0&&A(ve)}),U=lr(()=>f==="onChange"||f==="onSubmit"&&i.current),q=!!(m||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[W,I]=C.useState({state:qy,error:"",errors:[],value:null,initialValue:null}),Y=!q&&W.state.valid,J=C.useMemo(()=>({disabled:k,touched:z,dirty:M,valid:Y,filled:$,focused:L}),[k,z,M,Y,$,L]),H=kre({setValidityData:I,validate:_,validityData:W,validationDebounceTime:c,invalid:q,markedDirtyRef:G,state:J,name:h,shouldValidateOnChange:U}),ie=C.useCallback(()=>{G.current=!0,H.commit(W.value)},[H,W]);C.useImperativeHandle(v,()=>({validate:ie}),[ie]);const re=C.useMemo(()=>({invalid:q,name:h,validityData:W,setValidityData:I,disabled:k,touched:z,setTouched:F,dirty:M,setDirty:j,filled:$,setFilled:B,focused:L,setFocused:N,validate:_,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:U,state:J,markedDirtyRef:G,validation:H}),[q,h,W,k,z,F,M,j,$,B,L,N,_,f,c,U,J,H]),he=iu("div",e,{ref:t,state:J,props:S,stateAttributesMapping:ru});return E.jsx(yj.Provider,{value:re,children:he})}),Tre=C.forwardRef(function(e,t){return E.jsx(Rre,{children:E.jsx(_re,{...e,ref:t})})}),mC=({children:e,fullwidth:t,...n})=>E.jsx(Tre,{"data-slot":"field-root",render:E.jsx(Ye,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});mC.displayName="FieldRoot";const Are=C.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,u=pf(!1),{controlId:c,setLabelId:f,labelId:h}=Oa(),p=Hl(i),m=C.useRef(null),y=lr(b=>{var S;if((S=are(b.nativeEvent))!=null&&S.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=Rj(b.currentTarget).getElementById(c);wj(v)&&v.focus({focusVisible:!0})});return qn(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),iu("label",e,{ref:[t,m],state:u.state,props:[{id:h},o?{htmlFor:c??void 0,onMouseDown:y}:{onClick:y,onPointerDown(b){b.preventDefault()}},a],stateAttributesMapping:ru})}),gC=({required:e,weight:t="bold",className:n,children:r,...i})=>E.jsx(Are,{"data-slot":"field-label","data-required":e??void 0,render:E.jsx(Fe,{render:E.jsx("label",{}),weight:t}),className:ze(Ll["field-label"],n),...i,children:r});gC.displayName="FieldLabel";const Dre={...ru,...mj},Mj=C.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,u=Hl(r),{validityData:c,state:f,name:h}=pf(!1),{setMessageIds:p}=Oa(),{errors:m}=zh(),y=h?m[h]:null;let b=!1;y||o===!0?b=!0:o?b=!!c.state[o]:b=c.state.valid===!1;const{mounted:v,transitionStatus:S,setMounted:x}=Cj(b);qn(()=>{if(!(!b||!u))return p(N=>N.concat(u)),()=>{p(N=>N.filter(M=>M!==u))}},[b,u,p]);const _=C.useRef(null),[k,T]=C.useState(null),[A,D]=C.useState(null),O=y||(c.errors.length>1?E.jsx("ul",{children:c.errors.map(N=>E.jsx("li",{children:N},N))}):c.error);let $=c.error;y!=null?$=Array.isArray(y)?JSON.stringify(y):y:c.errors.length>1&&($=JSON.stringify(c.errors)),b&&$!==A&&(D($),T(O)),gj({open:b,ref:_,onComplete(){b||x(!1)}});const B={...f,transitionStatus:S},L=iu("div",e,{ref:[t,_],state:B,props:[{id:u,children:b?O:k},a],stateAttributesMapping:Dre,enabled:v});return v?L:null}),Oj=e=>E.jsx(Mj,{"data-slot":"field-error-tooltip",render:E.jsx(Il,{delay:_j,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:E.jsx("span",{className:Ll["field-error-tooltip"],children:E.jsx(lV,{color:"var(--shade-foreground)"})})}),...e});Oj.displayName="FieldErrorTooltip";const ny=e=>E.jsx(Mj,{"data-slot":"field-error",render:E.jsx(Fe,{shade:"foreground"}),...e});ny.displayName="FieldError";const Mre=C.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=Hl(r),u=pf(!1),{setMessageIds:c}=Oa();return qn(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),iu("p",e,{ref:t,state:u.state,props:[{id:a},o],stateAttributesMapping:ru})}),yC=({children:e,...t})=>E.jsx(Mre,{"data-slot":"field-description",render:E.jsx(Fe,{shade:"muted"}),...t,children:e});yC.displayName="FieldDescription";const $j=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:u,HintProps:c,DescriptionProps:f,children:h,...p})=>E.jsxs(mC,{...p,...o,className:ze(n==="absolute"&&Ll["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&E.jsxs(Ze,{className:Ll["field-label-group"],ax:"space-between",ay:"center",children:[e&&E.jsx(gC,{required:i,...a,children:e}),E.jsxs(Ze,{ay:"center",children:[n==="tooltip"&&E.jsx(Oj,{...u}),t&&E.jsx(Tj,{...t,...c})]})]}),h,n==="absolute"&&E.jsx(ny,{className:Ll["field-error-absolute"],...u}),n==="inline"&&E.jsx(ny,{...u}),r&&E.jsx(yC,{...f,children:r})]});$j.displayName="Field";const Ore="_input_jh1b5_3",Ni={input:Ore,"size-small":"_size-small_jh1b5_49","size-medium":"_size-medium_jh1b5_54","size-large":"_size-large_jh1b5_59","toggle-fullwidth":"_toggle-fullwidth_jh1b5_65","toggle-ghost":"_toggle-ghost_jh1b5_70","input-wrapper":"_input-wrapper_jh1b5_89","input-inner":"_input-inner_jh1b5_112","input-slot":"_input-slot_jh1b5_131"},$re="medium",Pj=Dn({variants:{fullwidth:{true:Ni["toggle-fullwidth"]},ghost:{true:Ni["toggle-ghost"]},size:{small:Ni["size-small"],medium:Ni["size-medium"],large:Ni["size-large"]}},defaultVariants:{size:$re}}),Nj=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?E.jsx(E.Fragment,{children:a}):E.jsxs(Ze,{"data-slot":"input-wrapper",ay:"center",className:ze(Ni.input,Ni["input-wrapper"],Pj({size:n,fullwidth:r,ghost:i}),o),children:[e&&E.jsx("span",{"data-slot":"input-before",className:Ni["input-slot"],children:e}),a,t&&E.jsx("span",{"data-slot":"input-after",className:Ni["input-slot"],children:t})]});Nj.displayName="InputWrapper";const Pre=C.forwardRef(function(e,t){const{render:n,className:r,id:i,name:o,value:a,disabled:u=!1,onValueChange:c,defaultValue:f,autoFocus:h=!1,...p}=e,{state:m,name:y,disabled:b,setTouched:v,setDirty:S,validityData:x,setFocused:_,setFilled:k,validationMode:T,validation:A}=pf(),D=b||u,O=y??o,$={...m,disabled:D},{labelId:B}=Oa(),L=nre({id:i});qn(()=>{var F;const j=a!=null;(F=A.inputRef.current)!=null&&F.value||j&&a!==""?k(!0):j&&a===""&&k(!1)},[A.inputRef,k,a]);const N=C.useRef(null);qn(()=>{h&&N.current===sre(Rj(N.current))&&_(!0)},[h,_]);const[M]=lj({controlled:a,default:f,name:"FieldControl",state:"value"}),z=a!==void 0,G=z?M:void 0;return bj({id:L,name:O,commit:A.commit,value:G,getValue:()=>{var j;return(j=A.inputRef.current)==null?void 0:j.value},controlRef:A.inputRef}),iu("input",e,{ref:[t,N],state:$,props:[{id:L,disabled:D,name:O,ref:A.inputRef,"aria-labelledby":B,autoFocus:h,...z?{value:G}:{defaultValue:f},onChange(j){const F=j.currentTarget.value;c==null||c(F,dj(kj,j.nativeEvent)),S(F!==x.initialValue),k(F!=="")},onFocus(){_(!0)},onBlur(j){v(!0),_(!1),T==="onBlur"&&A.commit(j.currentTarget.value)},onKeyDown(j){j.currentTarget.tagName==="INPUT"&&j.key==="Enter"&&(v(!0),A.commit(j.currentTarget.value))}},A.getInputValidationProps(),p],stateAttributesMapping:ru})}),Nre=C.forwardRef(function(e,t){return E.jsx(Pre,{ref:t,...e})}),Ij=({label:e,description:t,required:n,name:r,size:i,fullwidth:o,ghost:a,before:u,after:c,FieldProps:f,className:h,ref:p,...m})=>{const y=!!(u||c);return E.jsx(er,{condition:!!(e||t),render:E.jsx($j,{name:r,label:e,description:t,required:n,...f}),children:E.jsx(Nj,{before:u,after:c,size:i,fullwidth:o,ghost:a,children:E.jsx(Nre,{"data-slot":"input",ref:p,name:r,className:ze(Ni.input,y?Ni["input-inner"]:Pj({size:i,fullwidth:o,ghost:a}),h),...m})})})};Ij.displayName="Input";const Lj=16,Ire=12,Lre="medium",jre="none",Fre="column",zre="_list_10sxx_3",Ho={list:zre,"list-item-group-collapsible-trigger":"_list-item-group-collapsible-trigger_10sxx_53","list-item-group":"_list-item-group_10sxx_53","list-item-group-category":"_list-item-group-category_10sxx_86","list-item-panel":"_list-item-panel_10sxx_92","list-item":"_list-item_10sxx_53","list-text-label":"_list-text-label_10sxx_129","list-text-description":"_list-text-description_10sxx_141"};function Bh({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const EM={};function Tr(e,t){const n=C.useRef(EM);return n.current===EM&&(n.current=e(t)),n}const kx=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Bre=kx&&kx!==C.useLayoutEffect?kx:e=>e();function je(e){const t=Tr(Ure).current;return t.next=e,Bre(t.effect),t.trampoline}function Ure(){const e={next:void 0,callback:Hre,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Hre(){}const Gre=()=>{},Ve=typeof document<"u"?C.useLayoutEffect:Gre,jj=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Vre(){return C.useContext(jj)}function Yy(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=je(i),a=C.useRef(0),u=Tr(Yre).current,c=Tr(qre).current,[f,h]=C.useState(0),p=C.useRef(f),m=je((x,_)=>{c.set(x,_??null),p.current+=1,h(p.current)}),y=je(x=>{c.delete(x),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const x=new Map;return Array.from(c.keys()).filter(k=>k.isConnected).sort(Wre).forEach((k,T)=>{const A=c.get(k)??{};x.set(k,{...A,index:T})}),x},[c,f]);Ve(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(_=>{const k=new Set,T=A=>k.has(A)?k.delete(A):k.add(A);_.forEach(A=>{A.removedNodes.forEach(T),A.addedNodes.forEach(T)}),k.size===0&&(p.current+=1,h(p.current))});return b.forEach((_,k)=>{k.parentElement&&x.observe(k.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),Ve(()=>{p.current===f&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),a.current=b.size),o(b)},[o,b,n,r,f]),Ve(()=>()=>{n.current=[]},[n]),Ve(()=>()=>{r&&(r.current=[])},[r]);const v=je(x=>(u.add(x),()=>{u.delete(x)}));Ve(()=>{u.forEach(x=>x(b))},[u,b]);const S=C.useMemo(()=>({register:m,unregister:y,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[m,y,v,n,r,a]);return E.jsx(jj.Provider,{value:S,children:t})}function qre(){return new Map}function Yre(){return new Set}function Wre(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 Kre=C.createContext(void 0);function Uh(){const e=C.useContext(Kre);return(e==null?void 0:e.direction)??"ltr"}function dr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Fj=C.createContext(void 0);function bC(){const e=C.useContext(Fj);if(e===void 0)throw new Error(dr(10));return e}function rs(e,t,n,r){const i=Tr(zj).current;return Qre(i,e,t,n,r)&&Bj(i,[e,t,n,r]),i.callback}function Xre(e){const t=Tr(zj).current;return Zre(t,e)&&Bj(t,e),t.callback}function zj(){return{callback:null,cleanup:null,refs:[]}}function Qre(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Zre(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Bj(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 o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const Jre=parseInt(C.version,10);function vC(e){return Jre>=e}function kM(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(vC(19)?n==null?void 0:n.ref:t.ref)??null}function vw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eie(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function tie(e,t){return typeof e=="function"?e(t):e}function nie(e,t){return typeof e=="function"?e(t):e}const zd={};function uh(e,t,n,r,i){let o={...xw(e,zd)};return t&&(o=pg(o,t)),n&&(o=pg(o,n)),r&&(o=pg(o,r)),o}function rie(e){if(e.length===0)return zd;if(e.length===1)return xw(e[0],zd);let t={...xw(e[0],zd)};for(let n=1;n<e.length;n+=1)t=pg(t,e[n]);return t}function pg(e,t){return Uj(t)?t(e):iie(e,t)}function iie(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=vw(e.style,r);break}case"className":{e[n]=Hj(e.className,r);break}default:oie(n,r)?e[n]=sie(e[n],r):e[n]=r}}return e}function oie(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 Uj(e){return typeof e=="function"}function xw(e,t){return Uj(e)?e(t):e??zd}function sie(e,t){return t?e?n=>{if(aie(n)){const i=n;ww(i);const o=t(i);return i.baseUIHandlerPrevented||e==null||e(i),o}const r=t(n);return e==null||e(n),r}:t:e}function ww(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Hj(e,t){return t?e?t+" "+e:t:e}function aie(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Gj(){}const Uc=Object.freeze([]),Tn=Object.freeze({}),lie=500,uie=500,cie={style:{transition:"none"}},fie="data-base-ui-click-trigger",die={fallbackAxisSide:"none"},hie={fallbackAxisSide:"end"},pie={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function dn(e,t,n={}){const r=t.render,i=mie(t,n);if(n.enabled===!1)return null;const o=n.state??Tn;return yie(e,r,i,o)}function mie(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Tn,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?tie(n,o):void 0,p=f?nie(r,o):void 0,m=f?eie(o,c):Tn,y=f?vw(m,Array.isArray(u)?rie(u):u)??Tn:Tn;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Xre([y.ref,kM(i),...a]):y.ref=rs(y.ref,kM(i),a):rs(null,null)),f?(h!==void 0&&(y.className=Hj(y.className,h)),p!==void 0&&(y.style=vw(y.style,p)),y):Tn}const gie=Symbol.for("react.lazy");function yie(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=uh(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===gie&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return bie(e,n);throw new Error(dr(8))}function bie(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const Hc="none",Gc="trigger-press",qr="trigger-hover",Bd="trigger-focus",xC="outside-press",Vj="item-press",Vc="focus-out",wC="escape-key",mg="list-navigation",vie="cancel-open",gg="sibling-open",xie="imperative-action";function mt(e,t,n,r){let i=!1,o=!1;const a=r??Tn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const wie={value:()=>null},Sie=C.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,hiddenUntilFound:a,keepMounted:u,loopFocus:c=!0,onValueChange:f,multiple:h=!1,orientation:p="vertical",value:m,defaultValue:y,...b}=t,v=Uh(),S=C.useMemo(()=>{if(m===void 0)return y??[]},[m,y]),x=je(f),_=C.useRef([]),[k,T]=Bh({controlled:m,default:S,name:"Accordion",state:"value"}),A=je((B,L)=>{const N=mt(Hc);if(h)if(L){const M=k.slice();if(M.push(B),x(M,N),N.isCanceled)return;T(M)}else{const M=k.filter(z=>z!==B);if(x(M,N),N.isCanceled)return;T(M)}else{const M=k[0]===B?[]:[B];if(x(M,N),N.isCanceled)return;T(M)}}),D=C.useMemo(()=>({value:k,disabled:o,orientation:p}),[k,o,p]),O=C.useMemo(()=>({accordionItemRefs:_,direction:v,disabled:o,handleValueChange:A,hiddenUntilFound:a??!1,keepMounted:u??!1,loopFocus:c,orientation:p,state:D,value:k}),[v,o,A,a,u,c,p,D,k]),$=dn("div",t,{state:D,ref:n,props:[{dir:v,role:"region"},b],stateAttributesMapping:wie});return E.jsx(Fj.Provider,{value:O,children:E.jsx(Yy,{elementsRef:_,children:$})})}),Cie={...as};let RM=0;function Eie(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(RM+=1,r(`${t}-${RM}`))},[n,t]),i}const _M=Cie.useId;function ou(e,t){if(_M!==void 0){const n=_M();return e??(t?`${t}-${n}`:n)}return Eie(e,t)}function is(e){return ou(e,"base-ui")}const kie=[];function Hh(e){C.useEffect(e,kie)}const Pm=null;class Rie{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(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 Nm=new Rie;class un{constructor(){te(this,"currentId",Pm);te(this,"cancel",()=>{this.currentId!==Pm&&(Nm.cancel(this.currentId),this.currentId=Pm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new un}static request(t){return Nm.request(t)}static cancel(t){return Nm.cancel(t)}request(t){this.cancel(),this.currentId=Nm.request(()=>{this.currentId=Pm,t()})}}function Wy(){const e=Tr(un.create).current;return Hh(e.disposeEffect),e}function Lo(e){return e==null?e:"current"in e?e.current:e}let Gl=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const _ie={[Gl.startingStyle]:""},Tie={[Gl.endingStyle]:""},Gh={transitionStatus(e){return e==="starting"?_ie:e==="ending"?Tie:null}};function qj(e,t=!1,n=!0){const r=Wy();return je((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=Lo(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const y=Gl.startingStyle;if(!c.hasAttribute(y)){r.request(m);return}const b=new MutationObserver(()=>{c.hasAttribute(y)||(b.disconnect(),m())});b.observe(c,{attributes:!0,attributeFilter:[y]}),o==null||o.addEventListener("abort",()=>b.disconnect(),{once:!0})},m=function(){Promise.all(c.getAnimations().map(y=>y.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const y=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else y.length>0&&y.some(b=>b.pending||b.playState!=="finished")&&m()})};var f=p,h=m;if(t){p();return}r.request(m)}})}function SC(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),Ve(()=>{if(!e&&o&&r!=="ending"&&n){const u=un.request(()=>{i("ending")});return()=>{un.cancel(u)}}},[e,o,r,n]),Ve(()=>{if(!e||t)return;const u=un.request(()=>{i(void 0)});return()=>{un.cancel(u)}},[t,e]),Ve(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=un.request(()=>{i("idle")});return()=>{un.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Yj(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,o=t!==void 0,[a,u]=Bh({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:h}=SC(a,!0,!0),[p,m]=C.useState(a),[{height:y,width:b},v]=C.useState({height:void 0,width:void 0}),S=is(),[x,_]=C.useState(),k=x??S,[T,A]=C.useState(!1),[D,O]=C.useState(!1),$=C.useRef(null),B=C.useRef(null),L=C.useRef(null),N=C.useRef(null),M=qj(N,!1),z=je(G=>{const j=!a,F=mt(Gc,G.nativeEvent);if(r(j,F),F.isCanceled)return;const U=N.current;B.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!T&&!D&&(B.current!=null&&B.current!=="css-animation"&&!c&&j&&f(!0),B.current==="css-animation"&&(!p&&j&&m(!0),!c&&j&&f(!0))),u(j),B.current==="none"&&c&&!j&&f(!1)});return Ve(()=>{o&&B.current==="none"&&!D&&!a&&f(!1)},[o,D,a,t,f]),C.useMemo(()=>({abortControllerRef:$,animationTypeRef:B,disabled:i,handleTrigger:z,height:y,mounted:c,open:a,panelId:k,panelRef:N,runOnceAnimationsFinish:M,setDimensions:v,setHiddenUntilFound:A,setKeepMounted:O,setMounted:f,setOpen:u,setPanelIdState:_,setVisible:m,transitionDimensionRef:L,transitionStatus:h,visible:p,width:b}),[$,B,i,z,y,c,a,k,N,M,v,A,O,f,u,m,L,h,p,b])}const CC=C.createContext(void 0);function Ky(){const e=C.useContext(CC);if(e===void 0)throw new Error(dr(15));return e}let Aie=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Vh(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=Vre(),m=C.useRef(-1),[y,b]=C.useState(o??(i===Aie.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return Ve(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),Ve(()=>{if(o==null)return c(x=>{var k;const _=v.current?(k=x.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}const Wj=C.createContext(void 0);function EC(){const e=C.useContext(Wj);if(e===void 0)throw new Error(dr(9));return e}let Ud=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Gl.startingStyle]="startingStyle",e[e.endingStyle=Gl.endingStyle]="endingStyle",e})({}),Die=(function(e){return e.panelOpen="data-panel-open",e})({});const Mie={[Ud.open]:""},Oie={[Ud.closed]:""},Kj={open(e){return e?{[Die.panelOpen]:""}:null}},Xj={open(e){return e?Mie:Oie}};let $ie=(function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e})({});const kC={...Xj,index:e=>Number.isInteger(e)?{[$ie.index]:String(e)}:null,...Gh,value:()=>null},Pie=C.forwardRef(function(t,n){const{className:r,disabled:i=!1,onOpenChange:o,render:a,value:u,...c}=t,{ref:f,index:h}=Vh(),p=rs(n,f),{disabled:m,handleValueChange:y,state:b,value:v}=bC(),S=is(),x=u??S,_=i||m,k=C.useMemo(()=>{if(!v)return!1;for(let z=0;z<v.length;z+=1)if(v[z]===x)return!0;return!1},[v,x]),T=je((z,G)=>{o==null||o(z,G),!G.isCanceled&&y(x,z)}),A=Yj({open:k,onOpenChange:T,disabled:_}),D=C.useMemo(()=>({open:A.open,disabled:A.disabled,hidden:!A.mounted,transitionStatus:A.transitionStatus}),[A.open,A.disabled,A.mounted,A.transitionStatus]),O=C.useMemo(()=>({...A,onOpenChange:T,state:D}),[A,D,T]),$=C.useMemo(()=>({...b,index:h,disabled:_,open:k}),[_,h,k,b]),[B,L]=C.useState(is()),N=C.useMemo(()=>({open:k,state:$,setTriggerId:L,triggerId:B}),[k,$,L,B]),M=dn("div",t,{state:$,ref:p,props:c,stateAttributesMapping:kC});return E.jsx(CC.Provider,{value:O,children:E.jsx(Wj.Provider,{value:N,children:M})})}),Nie=C.forwardRef(function(t,n){const{render:r,className:i,...o}=t,{state:a}=EC();return dn("h3",t,{state:a,ref:n,props:o,stateAttributesMapping:kC})});function Sw(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Xy(){return typeof window<"u"}function $a(e){return RC(e)?(e.nodeName||"").toLowerCase():"#document"}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(RC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function RC(e){return Xy()?e instanceof Node||e instanceof Ln(e).Node:!1}function It(e){return Xy()?e instanceof Element||e instanceof Ln(e).Element:!1}function Jt(e){return Xy()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function Cw(e){return!Xy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function Pa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Iie(e){return/^(table|td|th)$/.test($a(e))}function Qy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Lie=/transform|translate|scale|rotate|perspective|filter/,jie=/paint|layout|strict|content/,cl=e=>!!e&&e!=="none";let Rx;function _C(e){const t=It(e)?Ar(e):e;return cl(t.transform)||cl(t.translate)||cl(t.scale)||cl(t.rotate)||cl(t.perspective)||!Zy()&&(cl(t.backdropFilter)||cl(t.filter))||Lie.test(t.willChange||"")||jie.test(t.contain||"")}function Fie(e){let t=ao(e);for(;Jt(t)&&!oo(t);){if(_C(t))return t;if(Qy(t))return null;t=ao(t)}return null}function Zy(){return Rx==null&&(Rx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Rx}function oo(e){return/^(html|body|#document)$/.test($a(e))}function Ar(e){return Ln(e).getComputedStyle(e)}function Jy(e){return It(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ao(e){if($a(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cw(e)&&e.host||uo(e);return Cw(t)?t.host:t}function Qj(e){const t=ao(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jt(t)&&Pa(t)?t:Qj(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qj(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ln(i);if(o){const u=Ew(a);return t.concat(a,a.visualViewport||[],Pa(i)?i:[],u&&n?ma(u):[])}else return t.concat(i,ma(i,[],n))}function Ew(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Zj=C.createContext(void 0);function TC(e=!1){const t=C.useContext(Zj);if(t===void 0&&!e)throw new Error(dr(16));return t}function zie(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=i,!o&&n&&(f.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||u)&&(f.disabled=n),f},[r,n,t,a,u,o,i])}}function mf(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=TC(!0)!==void 0,u=je(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=zie({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;Bie(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);Ve(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return uh({type:i?"button":void 0,onClick(T){if(t){T.preventDefault();return}y==null||y(T)},onMouseDown(T){t||b==null||b(T)},onKeyDown(T){if(t||(ww(T),S==null||S(T)),T.baseUIHandlerPrevented)return;const A=T.target===T.currentTarget&&!i&&!u()&&!t,D=T.key==="Enter",O=T.key===" ";A&&((O||D)&&T.preventDefault(),D&&(y==null||y(T)))},onKeyUp(T){t||(ww(T),v==null||v(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!i&&!t&&T.key===" "&&(y==null||y(T))},onPointerDown(T){if(t){T.preventDefault();return}x==null||x(T)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=je(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function Bie(e){return Jt(e)&&e.tagName==="BUTTON"}const gf=typeof navigator<"u",_x=Hie(),Jj=Vie(),eF=Gie(),tF=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),nF=_x.platform==="MacIntel"&&_x.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_x.platform),rF=gf&&/apple/i.test(navigator.vendor),kw=gf&&/android/i.test(Jj)||/android/i.test(eF),Uie=gf&&Jj.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,iF=eF.includes("jsdom/");function Hie(){if(!gf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Gie(){if(!gf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Vie(){if(!gf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Rw="data-base-ui-focusable",oF="active",sF="selected",aF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ga="ArrowLeft",ya="ArrowRight",AC="ArrowUp",qh="ArrowDown";function mi(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Cw(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ry(e,t){if(!It(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mi(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 qie(e){return e.matches("html,body")}function eb(e){return Jt(e)&&e.matches(aF)}function _w(e){return e?e.getAttribute("role")==="combobox"&&eb(e):!1}function Yie(e){if(!e||iF)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function iy(e){return e?e.hasAttribute(Rw)?e:e.querySelector(`[${Rw}]`)||e:null}function jl(e,t,n=!0){return e.filter(i=>{var o;return i.parentId===t&&(!n||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...jl(e,i.id,n)])}function TM(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function Gn(e){e.preventDefault(),e.stopPropagation()}function Wie(e){return"nativeEvent"in e}function lF(e){return e.pointerType===""&&e.isTrusted?!0:kw&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uF(e){return iF?!1:!kw&&e.width===0&&e.height===0||kw&&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 qc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function cF(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Kie=["top","right","bottom","left"],Yc=Math.min,Wr=Math.max,Wc=Math.round,lc=Math.floor,so=e=>({x:e,y:e}),Xie={left:"right",right:"left",bottom:"top",top:"bottom"};function Tw(e,t,n){return Wr(e,Yc(t,n))}function os(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Na(e){return e.split("-")[1]}function DC(e){return e==="x"?"y":"x"}function MC(e){return e==="y"?"height":"width"}function wi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function OC(e){return DC(wi(e))}function Qie(e,t,n){n===void 0&&(n=!1);const r=Na(e),i=OC(e),o=MC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=oy(a)),[a,oy(a)]}function Zie(e){const t=oy(e);return[Aw(e),t,Aw(t)]}function Aw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AM=["left","right"],DM=["right","left"],Jie=["top","bottom"],eoe=["bottom","top"];function toe(e,t,n){switch(e){case"top":case"bottom":return n?t?DM:AM:t?AM:DM;case"left":case"right":return t?Jie:eoe;default:return[]}}function noe(e,t,n,r){const i=Na(e);let o=toe(Kr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Aw)))),o}function oy(e){const t=Kr(e);return Xie[t]+e.slice(t.length)}function roe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fF(e){return typeof e!="number"?roe(e):{top:e,right:e,bottom:e,left:e}}function sy(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 Im(e,t,n){return Math.floor(e/t)!==n}function bc(e,t){return t<0||t>=e.current.length}function yg(e,t){return Hn(e,{disabledIndices:t})}function Dw(e,t){return Hn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Hn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.current.length-1&&ba(e,o,r));return o}function dF(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:u,maxIndex:c,prevIndex:f,stopEvent:h=!1}){let p=f;const m=[],y={};let b=!1;{let x=null,_=-1;e.current.forEach((k,T)=>{if(k==null)return;const A=k.closest('[role="row"]');A&&(b=!0),(A!==x||_===-1)&&(x=A,_+=1,m[_]=[]),m[_].push(T),y[T]=_})}const v=b&&m.length>0&&m.some(x=>x.length!==o);function S(x){if(!v||f===-1)return;const _=y[f];if(_==null)return;const k=m[_].indexOf(f);let T=x==="up"?_-1:_+1;r&&(T<0?T=m.length-1:T>=m.length&&(T=0));const A=new Set;for(;T>=0&&T<m.length&&!A.has(T);){A.add(T);const D=m[T];if(D.length===0){T=x==="up"?T-1:T+1;continue}const O=Math.min(k,D.length-1);for(let $=O;$>=0;$-=1){const B=D[$];if(!ba(e,B,a))return B}T=x==="up"?T-1:T+1,r&&(T<0?T=m.length-1:T>=m.length&&(T=0))}}if(t.key===AC){const x=S("up");if(x!==void 0)h&&Gn(t),p=x;else{if(h&&Gn(t),f===-1)p=c;else if(p=Hn(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<u||p<0)){const _=f%o,k=c%o,T=c-(k-_);k===_?p=c:p=k>_?T:T-o}bc(e,p)&&(p=f)}}if(t.key===qh){const x=S("down");x!==void 0?(h&&Gn(t),p=x):(h&&Gn(t),f===-1?p=u:(p=Hn(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Hn(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),bc(e,p)&&(p=f))}if(n==="both"){const x=lc(f/o);t.key===(i?ga:ya)&&(h&&Gn(t),f%o!==o-1?(p=Hn(e,{startingIndex:f,disabledIndices:a}),r&&Im(p,o,x)&&(p=Hn(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Hn(e,{startingIndex:f-f%o-1,disabledIndices:a})),Im(p,o,x)&&(p=f)),t.key===(i?ya:ga)&&(h&&Gn(t),f%o!==0?(p=Hn(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&Im(p,o,x)&&(p=Hn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Hn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),Im(p,o,x)&&(p=f));const _=lc(c/o)===x;bc(e,p)&&(r&&_?p=t.key===(i?ya:ga)?c:Hn(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function hF(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},u)=>{let c=!1;for(n&&(i=0);!c;){const f=[];for(let h=0;h<o;h+=1)for(let p=0;p<a;p+=1)f.push(i+h+p*t);i%t+o<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=u}),c=!0):i+=1}}),[...r]}function pF(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function mF(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ba(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}/*!
|
|
466
|
+
* tabbable 6.4.0
|
|
467
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
468
|
+
*/var ioe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ay=ioe.join(","),gF=typeof Element>"u",Kc=gF?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ly=!gF&&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==null?void 0:e.ownerDocument},uy=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"),o=i===""||i==="true",a=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):uy(t.parentNode));return a},ooe=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yF=function(t,n,r){if(uy(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ay));return n&&Kc.call(t,ay)&&i.unshift(t),i=i.filter(r),i},cy=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!uy(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,f=cy(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var h=Kc.call(a,ay);h&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!uy(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var y=cy(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,y):i.push({scopeParent:a,candidates:y})}else o.unshift.apply(o,a.children)}}return i},bF=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vF=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ooe(t))&&!bF(t)?0:t.tabIndex},soe=function(t,n){var r=vF(t);return r<0&&n&&!bF(t)?0:r},aoe=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xF=function(t){return t.tagName==="INPUT"},loe=function(t){return xF(t)&&t.type==="hidden"},uoe=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},coe=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},foe=function(t){if(!t.name)return!0;var n=t.form||ly(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},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(a){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",a.message),!1}var o=coe(i,t.form);return!o||o===t},doe=function(t){return xF(t)&&t.type==="radio"},hoe=function(t){return doe(t)&&!foe(t)},poe=function(t){var n,r=t&&ly(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,u,c;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var f,h,p;r=ly(i),i=(f=r)===null||f===void 0?void 0:f.host,o=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},MM=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},moe=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Kc.call(t,"details>summary:first-of-type"),u=a?t.parentElement:t;if(Kc.call(u,"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 f=t.parentElement,h=ly(t);if(f&&!f.shadowRoot&&i(f)===!0)return MM(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(poe(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return MM(t);return!1},goe=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 Kc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Mw=function(t,n){return!(n.disabled||loe(n)||moe(n,t)||uoe(n)||goe(n))},Ow=function(t,n){return!(hoe(n)||vF(n)<0||!Mw(t,n))},yoe=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},wF=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=soe(u,a),f=a?wF(i.candidates):u;c===0?a?n.push.apply(n,f):n.push(u):r.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:f})}),r.sort(aoe).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Yh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=cy([t],n.includeContainer,{filter:Ow.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:yoe}):r=yF(t,n.includeContainer,Ow.bind(null,n)),wF(r)},boe=function(t,n){n=n||{};var r;return n.getShadowRoot?r=cy([t],n.includeContainer,{filter:Mw.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=yF(t,n.includeContainer,Mw.bind(null,n)),r},SF=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Kc.call(t,ay)===!1?!1:Ow(n,t)};function Pt(e){return(e==null?void 0:e.ownerDocument)||document}const yf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function CF(e,t){const n=Yh(e,yf()),r=n.length;if(r===0)return;const i=mi(Pt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function $C(e){return CF(Pt(e).body,1)||e}function EF(e){return CF(Pt(e).body,-1)||e}function kF(e,t){if(!e)return null;const n=Yh(Pt(e).body,yf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function voe(e){return kF(e,1)}function xoe(e){return kF(e,-1)}function vc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function woe(e){Yh(e,yf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function OM(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const va="ArrowUp",Yo="ArrowDown",Vl="ArrowLeft",xa="ArrowRight",bf="Home",vf="End",RF=new Set([Vl,xa]),Soe=new Set([Vl,xa,bf,vf]),_F=new Set([va,Yo]),Coe=new Set([va,Yo,bf,vf]),TF=new Set([...RF,..._F]),Eoe=new Set([...TF,bf,vf]),koe=new Set([va,Yo,Vl,xa,bf,vf]),Roe="Shift",_oe="Control",Toe="Alt",Aoe="Meta",Doe=new Set([Roe,_oe,Toe,Aoe]);function Moe(e){return Jt(e)&&e.tagName==="INPUT"}function $M(e){return!!(Moe(e)&&e.selectionStart!=null||Jt(e)&&e.tagName==="TEXTAREA")}function PM(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const a=e.clientWidth<e.scrollWidth,u=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const c=NM(e,t,"left"),f=Lm(e),h=Lm(t);n==="ltr"&&(c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:c-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(i=c-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(c-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?i=c-h.scrollMarginLeft-f.scrollPaddingLeft:c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(u&&r!=="horizontal"){const c=NM(e,t,"top"),f=Lm(e),h=Lm(t);c-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?o=c-h.scrollMarginTop-f.scrollPaddingTop:c+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(o=c+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:i,top:o,behavior:"auto"})}function NM(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 Lm(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 Ooe=new Set([Yo,va,xa,Vl,bf,vf]);function $oe(e){const{current:t}=e,n=[];for(let r=0;r<t.length;r+=1){const i=t[r];if(!Sw(i)){const o=i==null?void 0:i.querySelector('[type="button"], [role="button"]');o&&!Sw(o)&&n.push(o)}}return n}const Poe=C.forwardRef(function(t,n){const{disabled:r,className:i,id:o,render:a,nativeButton:u=!0,...c}=t,{panelId:f,open:h,handleTrigger:p,disabled:m}=Ky(),y=r??m,{getButtonProps:b,buttonRef:v}=mf({disabled:y,focusableWhenDisabled:!0,native:u}),{accordionItemRefs:S,direction:x,loopFocus:_,orientation:k}=bC(),T=x==="rtl",A=k==="horizontal",{state:D,setTriggerId:O,triggerId:$}=EC();Ve(()=>(o&&O(o),()=>{O(void 0)}),[o,O]);const B=C.useMemo(()=>({"aria-controls":h?f:void 0,"aria-expanded":h,id:$,onClick:p,onKeyDown(N){if(!Ooe.has(N.key))return;Gn(N);const M=$oe(S),G=M.length-1;let j=-1;const F=M.indexOf(N.target);function U(){_?j=F+1>G?0:F+1:j=Math.min(F+1,G)}function q(){_?j=F===0?G:F-1:j=F-1}switch(N.key){case Yo:A||U();break;case va:A||q();break;case xa:A&&(T?q():U());break;case Vl:A&&(T?U():q());break;case"Home":j=0;break;case"End":j=G;break}j>-1&&M[j].focus()}}),[S,p,$,A,T,_,h,f]);return dn("button",t,{state:D,ref:[n,v],props:[B,c,b],stateAttributesMapping:Kj})});let Noe=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function AF(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:o,keepMounted:a,id:u,mounted:c,onOpenChange:f,open:h,panelRef:p,runOnceAnimationsFinish:m,setDimensions:y,setMounted:b,setOpen:v,setVisible:S,transitionDimensionRef:x,visible:_,width:k}=e,T=C.useRef(!1),A=C.useRef(null),D=C.useRef(h),O=C.useRef(h),$=Wy(),B=C.useMemo(()=>n.current==="css-animation"?!_:!h&&!c,[h,c,_,n]),L=je(M=>{if(!M)return;if(n.current==null||x.current==null){const j=getComputedStyle(M),F=j.animationName!=="none"&&j.animationName!=="",U=j.transitionDuration!=="0s"&&j.transitionDuration!=="";F&&U||(j.animationName==="none"&&j.transitionDuration!=="0s"?n.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(Noe.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?x.current="width":x.current="height"}if(n.current!=="css-transition")return;(i===void 0||k===void 0)&&(y({height:M.scrollHeight,width:M.scrollWidth}),O.current&&M.style.setProperty("transition-duration","0s"));let z=-1,G=-1;return z=un.request(()=>{O.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{un.cancel(z),un.cancel(G)}}),N=rs(r,p,L);return Ve(()=>{if(n.current!=="css-transition")return;const M=p.current;if(!M)return;let z=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const G={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(G).forEach(j=>{M.style.setProperty(j,"initial","important")}),!O.current&&!a&&M.setAttribute(Ud.startingStyle,""),y({height:M.scrollHeight,width:M.scrollWidth}),z=un.request(()=>{Object.entries(G).forEach(([j,F])=>{F===""?M.style.removeProperty(j):M.style.setProperty(j,F)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;y({height:M.scrollHeight,width:M.scrollWidth});const G=new AbortController;t.current=G;const j=G.signal;let F=null;const U=Ud.endingStyle;return F=new MutationObserver(q=>{q.some(I=>I.type==="attributes"&&I.attributeName===U)&&(F==null||F.disconnect(),F=null,m(()=>{y({height:0,width:0}),M.style.removeProperty("content-visibility"),b(!1),t.current===G&&(t.current=null)},j))}),F.observe(M,{attributes:!0,attributeFilter:[U]}),()=>{F==null||F.disconnect(),$.cancel(),t.current===G&&(G.abort(),t.current=null)}}return()=>{un.cancel(z)}},[t,n,$,o,a,c,h,p,m,y,b]),Ve(()=>{if(n.current!=="css-animation")return;const M=p.current;M&&(A.current=M.style.animationName||A.current,M.style.setProperty("animation-name","none"),y({height:M.scrollHeight,width:M.scrollWidth}),!D.current&&!T.current&&M.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),b(!0),S(!0)):(t.current=new AbortController,m(()=>{b(!1),S(!1),t.current=null},t.current.signal)))},[t,n,h,p,m,y,b,S,_]),Hh(()=>{const M=un.request(()=>{D.current=!1});return()=>un.cancel(M)}),Ve(()=>{if(!o)return;const M=p.current;if(!M)return;let z=-1,G=-1;return h&&T.current&&(M.style.transitionDuration="0s",y({height:M.scrollHeight,width:M.scrollWidth}),z=un.request(()=>{T.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{un.cancel(z),un.cancel(G)}},[o,h,p,y]),Ve(()=>{const M=p.current;M&&o&&B&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(Ud.startingStyle,""))},[o,B,n,p]),C.useEffect(function(){const z=p.current;if(!z)return;function G(j){T.current=!0,v(!0),f(!0,mt(Hc,j))}return z.addEventListener("beforematch",G),()=>{z.removeEventListener("beforematch",G)}},[f,p,v]),C.useMemo(()=>({props:{hidden:B,id:u,ref:N}}),[B,u,N])}let IM=(function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e})({});function Wh(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=je(i),a=qj(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}const Ioe=C.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:o,id:a,render:u,...c}=t,{hiddenUntilFound:f,keepMounted:h}=bC(),{abortControllerRef:p,animationTypeRef:m,height:y,mounted:b,onOpenChange:v,open:S,panelId:x,panelRef:_,runOnceAnimationsFinish:k,setDimensions:T,setHiddenUntilFound:A,setKeepMounted:D,setMounted:O,setOpen:$,setVisible:B,transitionDimensionRef:L,visible:N,width:M,setPanelIdState:z,transitionStatus:G}=Ky(),j=i??f,F=o??h;Ve(()=>{if(a)return z(a),()=>{z(void 0)}},[a,z]),Ve(()=>{A(j)},[A,j]),Ve(()=>{D(F)},[D,F]),Wh({open:S&&G==="idle",ref:_,onComplete(){S&&T({width:void 0,height:void 0})}});const{props:U}=AF({abortControllerRef:p,animationTypeRef:m,externalRef:n,height:y,hiddenUntilFound:j,id:a??x,keepMounted:F,mounted:b,onOpenChange:v,open:S,panelRef:_,runOnceAnimationsFinish:k,setDimensions:T,setMounted:O,setOpen:$,setVisible:B,transitionDimensionRef:L,visible:N,width:M}),{state:q,triggerId:W}=EC(),I=C.useMemo(()=>({...q,transitionStatus:G}),[q,G]),Y=dn("div",t,{state:I,ref:[n,_],props:[U,{"aria-labelledby":W,role:"region",style:{[IM.accordionPanelHeight]:y===void 0?"auto":`${y}px`,[IM.accordionPanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:kC});return F||j||!F&&b?Y:null}),kd=0;class ss{constructor(){te(this,"currentId",kd);te(this,"clear",()=>{this.currentId!==kd&&(clearTimeout(this.currentId),this.currentId=kd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=kd,n()},t)}isStarted(){return this.currentId!==kd}}function Bi(){const e=Tr(ss.create).current;return Hh(e.disposeEffect),e}let LM={},jM={},FM="";function Loe(e){if(typeof document>"u")return!1;const t=Pt(e);return Ln(t).innerWidth-t.documentElement.clientWidth>0}function joe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Pt(e),r=n.documentElement,i=n.body,o=Pa(r)?r:i,a=o.style.overflowY,u=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const c=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=u,c===f}function Foe(e){const t=Pt(e),n=t.documentElement,r=t.body,i=Pa(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function zoe(e){var m;const t=Pt(e),n=t.documentElement,r=t.body,i=Ln(n);let o=0,a=0,u=!1;const c=un.create();if(tF&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),x=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,LM={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},FM=n.style.scrollBehavior,jM={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 _=n.scrollHeight>n.clientHeight,k=n.scrollWidth>n.clientWidth,T=y.overflowY==="scroll"||b.overflowY==="scroll",A=y.overflowX==="scroll"||b.overflowX==="scroll",D=Math.max(0,i.innerWidth-r.clientWidth),O=Math.max(0,i.innerHeight-r.clientHeight),$=parseFloat(b.marginTop)+parseFloat(b.marginBottom),B=parseFloat(b.marginLeft)+parseFloat(b.marginRight),L=Pa(n)?n:r;if(u=joe(e),u){n.style.scrollbarGutter=x,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(_||T)&&(n.style.overflowY="scroll"),(k||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||O?`calc(100dvh - ${$+O}px)`:"100dvh",width:B||D?`calc(100vw - ${B+D}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,LM),Object.assign(r.style,jM),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=FM)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Boe{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",ss.create());te(this,"timeoutUnlock",ss.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Pt(t).documentElement,i=Ln(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=Gj;return}const o=nF||!Loe(t);this.restore=o?Foe(t):zoe(t)}}const Uoe=new Boe;function Hoe(e=!0,t=null){Ve(()=>{if(e)return Uoe.acquire(t)},[e,t])}function sr(e){const t=Tr(Goe,e).current;return t.next=e,Ve(t.effect),t}function Goe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function DF(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class PC{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",DF())}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 MF=C.createContext(null),OF=C.createContext(null),ls=()=>{var e;return((e=C.useContext(MF))==null?void 0:e.id)||null},Ia=e=>{const t=C.useContext(OF);return e??t};function $F(e){const t=ou(),n=Ia(e),r=ls();return Ve(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Voe(e){const{children:t,id:n}=e,r=ls();return E.jsx(MF.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function qoe(e){const{children:t,externalTree:n}=e,r=Tr(()=>n??new PC).current;return E.jsx(OF.Provider,{value:r,children:t})}function Xc(e){return`data-base-ui-${e}`}function Tx(e,t,n){if(n&&!qc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const Yoe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},PF={...Yoe,position:"fixed",top:0,left:0},Qc=C.forwardRef(function(t,n){const[r,i]=C.useState();Ve(()=>{rF&&i("button")},[]);const o={tabIndex:0,role:r};return E.jsx("span",{...t,ref:n,style:PF,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let zM=0;function Hd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(zM);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():zM=requestAnimationFrame(o)}const xc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function BM(e){return e==="inert"?xc.inert:e==="aria-hidden"?xc["aria-hidden"]:xc.none}let jm=new WeakSet,Fm={},Ax=0;const NF=e=>e&&(e.host||NF(e.parentNode)),Woe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=NF(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Koe(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Woe(t,e),u=new Set,c=new Set(a),f=[];Fm[i]||(Fm[i]=new WeakMap);const h=Fm[i];a.forEach(p),m(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function m(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if($a(b)!=="script")if(u.has(b))m(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=BM(o),_=(x.get(b)||0)+1,k=(h.get(b)||0)+1;x.set(b,_),h.set(b,k),f.push(b),_===1&&S&&jm.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Ax+=1,()=>{f.forEach(y=>{const b=BM(o),S=(b.get(y)||0)-1,x=(h.get(y)||0)-1;b.set(y,S),h.set(y,x),S||(!jm.has(y)&&o&&y.removeAttribute(o),jm.delete(y)),x||y.removeAttribute(i)}),Ax-=1,Ax||(xc.inert=new WeakMap,xc["aria-hidden"]=new WeakMap,xc.none=new WeakMap,jm=new WeakSet,Fm={})}}function Xoe(e,t=!1,n=!1){const r=Pt(e[0]).body;return Koe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const IF=C.createContext(null),LF=()=>C.useContext(IF),Qoe=Xc("portal");function Zoe(e={}){const{ref:t,container:n,componentProps:r=Tn,elementProps:i}=e,o=ou(),a=LF(),u=a==null?void 0:a.portalNode,[c,f]=C.useState(null),[h,p]=C.useState(null),m=je(S=>{S!==null&&p(S)}),y=C.useRef(null);Ve(()=>{if(n===null){y.current&&(y.current=null,p(null),f(null));return}if(o==null)return;const S=(n&&(RC(n)?n:n.current))??u??document.body;if(S==null){y.current&&(y.current=null,p(null),f(null));return}y.current!==S&&(y.current=S,p(null),f(S))},[n,u,o]);const b=dn("div",r,{ref:[t,m],props:[{id:o,[Qoe]:""},i]});return{portalNode:h,portalSubtree:c&&b?yn.createPortal(b,c):null}}const Joe=C.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:u,...c}=t,{portalNode:f,portalSubtree:h}=Zoe({container:i,ref:n,componentProps:t,elementProps:c}),p=C.useRef(null),m=C.useRef(null),y=C.useRef(null),b=C.useRef(null),[v,S]=C.useState(null),x=v==null?void 0:v.modal,_=v==null?void 0:v.open,k=typeof u=="boolean"?u:!!v&&!v.modal&&v.open&&!!f;C.useEffect(()=>{if(!f||x)return;function A(D){f&&D.relatedTarget&&vc(D)&&(D.type==="focusin"?OM:woe)(f)}return f.addEventListener("focusin",A,!0),f.addEventListener("focusout",A,!0),()=>{f.removeEventListener("focusin",A,!0),f.removeEventListener("focusout",A,!0)}},[f,x]),C.useEffect(()=>{!f||_||OM(f)},[_,f]);const T=C.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:y,afterInsideRef:b,portalNode:f,setFocusManagerState:S}),[f]);return E.jsxs(C.Fragment,{children:[h,E.jsxs(IF.Provider,{value:T,children:[k&&f&&E.jsx(Qc,{"data-type":"outside",ref:p,onFocus:A=>{var D;if(vc(A,f))(D=y.current)==null||D.focus();else{const O=v?v.domReference:null,$=EF(O);$==null||$.focus()}}}),k&&f&&E.jsx("span",{"aria-owns":f.id,style:pie}),f&&yn.createPortal(r,f),k&&f&&E.jsx(Qc,{"data-type":"outside",ref:m,onFocus:A=>{var D;if(vc(A,f))(D=b.current)==null||D.focus();else{const O=v?v.domReference:null,$=$C(O);$==null||$.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,mt(Vc,A.nativeEvent)))}}})]})]})});function ese(e,t){const n=Ln(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 UM=20;let ua=[];function NC(){ua=ua.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function tse(e){NC(),e&&$a(e)!=="body"&&(ua.push(new WeakRef(e)),ua.length>UM&&(ua=ua.slice(-UM)))}function Dx(){var e;return NC(),(e=ua[ua.length-1])==null?void 0:e.deref()}function nse(e){if(!e)return null;const t=yf();return SF(e,t)?e:Yh(e,t)[0]||e}function rse(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ar(e).display!=="none"}function HM(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=yf(),i=boe(e,n).filter(u=>{const c=u.getAttribute("data-tabindex")||"";return SF(u,n)||u.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ise(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:k}=b.context,T=je(()=>{var Z;return(Z=k.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=_w(S)&&A,O=C.useRef(["content"]),$=sr(i),B=sr(o),L=sr(f),N=Ia(y),M=LF(),z=C.useRef(null),G=C.useRef(null),j=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),q=C.useRef(-1),W=C.useRef(""),I=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=rs(Y,m,M==null?void 0:M.beforeInsideRef),ie=rs(J,M==null?void 0:M.afterInsideRef),re=Bi(),he=Bi(),ve=Wy(),Re=M!=null,ce=iy(x),Ie=je((Z=ce)=>Z?Yh(Z,yf()):[]),We=je(Z=>{const ne=Ie(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ht(ce,mi(Pt(ce)))&&Ie().length===0&&!D&&Gn(xe)}const ne=Pt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,Ie,We]),C.useEffect(()=>{if(r||!v)return;const Z=Pt(ce);function ne(){U.current=!1}function xe(Ce){const le=Yr(Ce),oe=ht(x,le)||ht(S,le)||ht(M==null?void 0:M.portalNode,le);U.current=!oe,I.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${fie}]`)&&(F.current=!0)}function ge(){I.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Pt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=Yr(me),Te=Ie().indexOf(ae);Te!==-1&&(q.current=Te)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Yr(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Xc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Lo(p),Lo(h)].includes(ae),Se=!(ht(S,ae)||ht(x,ae)||ht(ae,x)||ht(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ht(ke,ae))||ue||N&&(jl(N.nodesRef.current,_e).find(ke=>{var Pe,Le;return ht((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||ht((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||TM(N.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,iy((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&HM(ce,O),a&&Oe!==S&&!rse(Te)&&mi(Z)===Z.body){if(Jt(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=q.current,Pe=Ie(),Le=Pe[ke]||Pe[Pe.length-1]||ce;Jt(Le)&&Le.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==Dx())&&(j.current=!0,b.setOpen(!1,mt(Vc,me)))})}function Ce(){U.current||(k.current.insideReactTree=!0,re.start(0,()=>{k.current.insideReactTree=!1}))}const le=Jt(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,N,M,b,c,a,Ie,D,T,O,k,re,he,ve,h,p]),C.useEffect(()=>{var Ce,le,oe;if(r||!x||!v)return;const Z=Array.from(((Ce=M==null?void 0:M.portalNode)==null?void 0:Ce.querySelectorAll(`[${Xc("portal")}]`))||[]),xe=(oe=(le=(N?TM(N.nodesRef.current,T()):[]).find(me=>{var ae;return _w(((ae=me.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:le.context)==null?void 0:oe.elements.domReference,ge=[x,xe,...Z,z.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Lo(p),Lo(h),D?S:null].filter(me=>me!=null);return Xoe(ge,u||D)},[v,r,S,x,u,O,M,D,N,T,h,p]),Ve(()=>{if(!v||r||!Jt(ce))return;const Z=Pt(ce),ne=mi(Z);queueMicrotask(()=>{const xe=We(ce),ge=$.current,Ce=typeof ge=="function"?ge(L.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=Lo(Ce),le=le||xe[0]||ce,!ht(ce,ne)&&Hd(le,{preventScroll:le===ce})})},[r,v,ce,A,We,$,L]),Ve(()=>{if(r||!ce)return;const Z=Pt(ce),ne=mi(Z);tse(ne);function xe(le){if(le.open||(W.current=ese(le.nativeEvent,I.current)),le.reason===qr&&le.nativeEvent.type==="mouseleave"&&(j.current=!0),le.reason===xC)if(le.nested)j.current=!1;else if(lF(le.nativeEvent)||uF(le.nativeEvent))j.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?j.current=!1:j.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,PF),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=B.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||Dx();return ae&&ae.isConnected?ae:ge}const me=S||Dx()||ge;return Lo(oe)||me}return()=>{_.off("openchange",xe);const le=mi(Z),oe=ht(x,le)||N&&jl(N.nodesRef.current,T(),!1).some(ae=>{var Oe;return ht((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=nse(me),Oe=typeof B.current!="boolean";B.current&&!j.current&&Jt(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),j.current=!1})}},[r,x,ce,B,k,_,N,Re,S,T]),Ve(()=>{if(!tF||v||!x)return;const Z=mi(Pt(x));!Jt(Z)||!eb(Z)||ht(x,Z)&&Z.blur()},[v,x]),Ve(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),Ve(()=>{if(!(r||!ce))return HM(ce,O),()=>{queueMicrotask(NC)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Qc,{"data-type":"inside",ref:H,onFocus:Z=>{var ne;if(u){const xe=We();Hd(xe[xe.length-1])}else if(M!=null&&M.portalNode)if(j.current=!1,vc(Z,M.portalNode)){const xe=$C(S);xe==null||xe.focus()}else(ne=Lo(p??M.beforeOutsideRef))==null||ne.focus()}}),n,X&&E.jsx(Qc,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne;if(u)Hd(We()[0]);else if(M!=null&&M.portalNode)if(c&&(j.current=!0),vc(Z,M.portalNode)){const xe=EF(S);xe==null||xe.focus()}else(ne=Lo(h??M.afterOutsideRef))==null||ne.focus()}})]})}function jF(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=Gc}=t,p=C.useRef(void 0),m=Wy(),y=Bi(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||qc(S,!0)&&u)return;const k=r.current.openEvent,T=k==null?void 0:k.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(k&&c)||T==="click"||T==="mousedown"));if(eb(x.target)){const $=mt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;m.request(()=>{const $=mt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(qc(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=x&&k||!(x&&a&&(!(_&&c)||cF(_))),A=mt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,m,y,f,h]);return C.useMemo(()=>i?{reference:b}:Tn,[i,b])}function GM(e,t,n){let{reference:r,floating:i}=e;const o=wi(t),a=OC(t),u=MC(a),c=Kr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Na(t)){case"start":y[a]-=m*(n&&f?-1:1);break;case"end":y[a]+=m*(n&&f?-1:1);break}return y}async function ose(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=os(t,e),b=fF(y),S=u[m?p==="floating"?"reference":"floating":p],x=sy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),_=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),T=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},A=sy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:k,strategy:c}):_);return{top:(x.top-A.top+b.top)/T.y,bottom:(A.bottom-x.bottom+b.bottom)/T.y,left:(x.left-A.left+b.left)/T.x,right:(A.right-x.right+b.right)/T.x}}const sse=50,ase=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:ose},c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=GM(f,r,c),m=r,y=0;const b={};for(let v=0;v<o.length;v++){const S=o[v];if(!S)continue;const{name:x,fn:_}=S,{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});h=k??h,p=T??p,b[x]={...b[x],...A},D&&y<sse&&(y++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=GM(f,m,c)),v=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:b}},lse=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=os(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Kr(i),_=wi(u),k=Kr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=m||(k||!v?[oy(u)]:Zie(u)),D=b!=="none";!m&&D&&A.push(...noe(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),B=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&B.push($[x]),p){const G=Qie(i,a,T);B.push($[G[0]],$[G[1]])}if(L=[...L,{placement:i,overflows:B}],!B.every(G=>G<=0)){var N,M;const G=(((N=o.flip)==null?void 0:N.index)||0)+1,j=O[G];if(j&&(!(p==="alignment"?_!==wi(j):!1)||L.every(q=>wi(q.placement)===_?q.overflows[0]>0:!0)))return{data:{index:G,overflows:L},reset:{placement:j}};let F=(M=L.filter(U=>U.overflows[0]<=0).sort((U,q)=>U.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var z;const U=(z=L.filter(q=>{if(D){const W=wi(q.placement);return W===_||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,I)=>W+I,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:z[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function VM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qM(e){return Kie.some(t=>e[t]>=0)}const use=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=os(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=VM(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:qM(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=VM(a,n.floating);return{data:{escapedOffsets:u,escaped:qM(u)}}}default:return{}}}}},FF=new Set(["left","top"]);async function cse(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Kr(n),u=Na(n),c=wi(n)==="y",f=FF.has(a)?-1:1,h=o&&c?-1:1,p=os(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:m*f}:{x:m*f,y:y*h}}const fse=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await cse(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},dse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:k}=x;return{x:_,y:k}}},...f}=os(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=wi(Kr(i)),y=DC(m);let b=h[y],v=h[m];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[x],T=b-p[_];b=Tw(k,b,T)}if(u){const x=m==="y"?"top":"left",_=m==="y"?"bottom":"right",k=v+p[x],T=v-p[_];v=Tw(k,v,T)}const S=c.fn({...t,[y]:b,[m]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[m]:u}}}}}},hse=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=os(e,t),h={x:n,y:r},p=wi(i),m=DC(p);let y=h[m],b=h[p];const v=os(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=m==="y"?"height":"width",T=o.reference[m]-o.floating[k]+S.mainAxis,A=o.reference[m]+o.reference[k]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const k=m==="y"?"width":"height",T=FF.has(Kr(i)),A=o.reference[p]-o.floating[k]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[m]:y,[p]:b}}}},pse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=os(e,t),h=await a.detectOverflow(t,f),p=Kr(i),m=Na(i),y=wi(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=m==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=Yc(v-h[S],_),A=Yc(b-h[x],k),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!m){const L=Wr(h.left,0),N=Wr(h.right,0),M=Wr(h.top,0),z=Wr(h.bottom,0);y?$=b-2*(L!==0||N!==0?L+N:Wr(h.left,h.right)):O=v-2*(M!==0||z!==0?M+z:Wr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const B=await a.getDimensions(u.floating);return b!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function zF(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=Wc(n)!==o||Wc(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function IC(e){return It(e)?e:e.contextElement}function wc(e){const t=IC(e);if(!Jt(t))return so(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=zF(t);let a=(o?Wc(n.width):n.width)/r,u=(o?Wc(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const mse=so(0);function BF(e){const t=Ln(e);return!Zy()||!t.visualViewport?mse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ln(e)?!1:t}function ql(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=IC(e);let a=so(1);t&&(r?It(r)&&(a=wc(r)):a=wc(e));const u=gse(o,n,r)?BF(o):so(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=Ln(o),y=r&&It(r)?Ln(r):r;let b=m,v=Ew(b);for(;v&&r&&y!==b;){const S=wc(v),x=v.getBoundingClientRect(),_=Ar(v),k=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=T,b=Ln(v),v=Ew(b)}}return sy({width:h,height:p,x:c,y:f})}function tb(e,t){const n=Jy(e).scrollLeft;return t?t.left+n:ql(uo(e)).left+n}function UF(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-tb(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function yse(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=uo(r),u=t?Qy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=so(1);const h=so(0),p=Jt(r);if((p||!p&&!o)&&(($a(r)!=="body"||Pa(a))&&(c=Jy(r)),p)){const y=ql(r);f=wc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=a&&!p&&!o?UF(a,c):so(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function bse(e){return Array.from(e.getClientRects())}function vse(e){const t=uo(e),n=Jy(e),r=e.ownerDocument.body,i=Wr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Wr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tb(e);const u=-n.scrollTop;return Ar(r).direction==="rtl"&&(a+=Wr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const YM=25;function xse(e,t){const n=Ln(e),r=uo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=Zy();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=tb(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=YM&&(o-=b)}else f<=YM&&(o+=f);return{width:o,height:a,x:u,y:c}}function wse(e,t){const n=ql(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Jt(e)?wc(e):so(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function WM(e,t,n){let r;if(t==="viewport")r=xse(e,n);else if(t==="document")r=vse(uo(e));else if(It(t))r=wse(t,n);else{const i=BF(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return sy(r)}function HF(e,t){const n=ao(e);return n===t||!It(n)||oo(n)?!1:Ar(n).position==="fixed"||HF(n,t)}function Sse(e,t){const n=t.get(e);if(n)return n;let r=ma(e,[],!1).filter(u=>It(u)&&$a(u)!=="body"),i=null;const o=Ar(e).position==="fixed";let a=o?ao(e):e;for(;It(a)&&!oo(a);){const u=Ar(a),c=_C(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Pa(a)&&!c&&HF(e,a))?r=r.filter(h=>h!==a):i=u,a=ao(a)}return t.set(e,r),r}function Cse(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Qy(t)?[]:Sse(t,this._c):[].concat(n),r],u=WM(t,a[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let m=1;m<a.length;m++){const y=WM(t,a[m],i);c=Wr(y.top,c),f=Yc(y.right,f),h=Yc(y.bottom,h),p=Wr(y.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function Ese(e){const{width:t,height:n}=zF(e);return{width:t,height:n}}function kse(e,t,n){const r=Jt(t),i=uo(t),o=n==="fixed",a=ql(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=so(0);function f(){c.x=tb(i)}if(r||!r&&!o)if(($a(t)!=="body"||Pa(i))&&(u=Jy(t)),r){const y=ql(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?UF(i,u):so(0),p=a.left+u.scrollLeft-c.x-h.x,m=a.top+u.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function Mx(e){return Ar(e).position==="static"}function KM(e,t){if(!Jt(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function GF(e,t){const n=Ln(e);if(Qy(e))return n;if(!Jt(e)){let i=ao(e);for(;i&&!oo(i);){if(It(i)&&!Mx(i))return i;i=ao(i)}return n}let r=KM(e,t);for(;r&&Iie(r)&&Mx(r);)r=KM(r,t);return r&&oo(r)&&Mx(r)&&!_C(r)?n:r||Fie(e)||n}const Rse=async function(e){const t=this.getOffsetParent||GF,n=this.getDimensions,r=await n(e.floating);return{reference:kse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _se(e){return Ar(e).direction==="rtl"}const Tse={convertOffsetParentRelativeRectToViewportRelativeRect:yse,getDocumentElement:uo,getClippingRect:Cse,getOffsetParent:GF,getElementRects:Rse,getClientRects:bse,getDimensions:Ese,getScale:wc,isElement:It,isRTL:_se};function VF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ase(e,t){let n=null,r;const i=uo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:y}=f;if(u||t(),!m||!y)return;const b=lc(p),v=lc(i.clientWidth-(h+m)),S=lc(i.clientHeight-(p+y)),x=lc(h),k={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Wr(0,Yc(1,c))||1};let T=!0;function A(D){const O=D[0].intersectionRatio;if(O!==c){if(!T)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!VF(f,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(A,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,k)}n.observe(e)}return a(!0),o}function XM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=IC(e),h=i||o?[...f?ma(f):[],...t?ma(t):[]]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?Ase(f,n):null;let m=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),t&&y.observe(t));let b,v=c?ql(e):null;c&&S();function S(){const x=ql(e);v&&!VF(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const Dse=fse,Mse=dse,Ose=lse,$se=pse,Pse=use,Nse=hse,Ise=(e,t,n)=>{const r=new Map,i={platform:Tse,...n},o={...i.platform,_c:r};return ase(e,t,{...i,platform:o})};var Lse=typeof document<"u",jse=function(){},bg=Lse?C.useLayoutEffect:jse;function fy(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(!fy(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!fy(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function qF(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QM(e,t){const n=qF(e);return Math.round(t*n)/n}function Ox(e){const t=C.useRef(e);return bg(()=>{t.current=e}),t}function Fse(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=C.useState(r);fy(m,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(q=>{q!==D.current&&(D.current=q,v(q))},[]),k=C.useCallback(q=>{q!==O.current&&(O.current=q,x(q))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),B=c!=null,L=Ox(c),N=Ox(i),M=Ox(f),z=C.useCallback(()=>{if(!D.current||!O.current)return;const q={placement:t,strategy:n,middleware:m};N.current&&(q.platform=N.current),Ise(D.current,O.current,q).then(W=>{const I={...W,isPositioned:M.current!==!1};G.current&&!fy($.current,I)&&($.current=I,yn.flushSync(()=>{p(I)}))})},[m,t,n,N,M]);bg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[f]);const G=C.useRef(!1);bg(()=>(G.current=!0,()=>{G.current=!1}),[]),bg(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(L.current)return L.current(T,A,z);z()}},[T,A,z,L,B]);const j=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!F.floating)return q;const W=QM(F.floating,h.x),I=QM(F.floating,h.y);return u?{...q,transform:"translate("+W+"px, "+I+"px)",...qF(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:z,refs:j,elements:F,floatingStyles:U}),[h,z,j,F,U])}const zse=(e,t)=>{const n=Dse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bse=(e,t)=>{const n=Mse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Use=(e,t)=>({fn:Nse(e).fn,options:[e,t]}),Hse=(e,t)=>{const n=Ose(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gse=(e,t)=>{const n=$se(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vse=(e,t)=>{const n=Pse(e);return{name:n.name,fn:n.fn,options:[e,t]}},qse={intentional:"onClick",sloppy:"onPointerDown"};function Yse(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Wse(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=Ia(x),k=je(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=Yse(S),$=C.useRef(null),B=Bi(),L=Bi(),N=je(()=>{L.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),z=C.useRef(""),G=je(X=>{z.current=X.pointerType}),j=je(()=>{const X=z.current,Z=X==="pen"||!X?"mouse":X,ne=typeof m=="function"?m():m;return typeof ne=="string"?ne:ne[Z]}),F=je(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?jl(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=Wie(X)?X.nativeEvent:X,ge=mt(wC,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=je(X=>{const Z=j();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),q=je(()=>{c.current.insideReactTree=!0,L.start(0,N)}),W=je((X,Z=!1)=>{var Oe;if(U(X)){N();return}if(c.current.insideReactTree){N();return}if(j()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=Yr(X),xe=`[${Xc("inert")}]`,ge=Pt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>ht(Te,ne))))return;let le=It(ne)?ne:null;for(;le&&!oo(le);){const Te=ao(le);if(oo(Te)||!It(Te))break;le=Te}if(ge.length&&It(ne)&&!qie(ne)&&!ht(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ht(le,Te)))return;if(Jt(ne)&&!("touches"in X)){const Te=oo(ne),_e=Ar(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Ut=ke&&X.offsetY>ne.clientHeight;if(st||Ut)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&jl(_.nodesRef.current,oe).some(Te=>{var _e;return Mi(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||me)return;const ae=_?jl(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,mt(xC,X)),N()}),I=je(X=>{j()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||W(X)}),Y=je(X=>{if(j()!=="sloppy"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=je(X=>{const Z=Yr(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=je(X=>{const Z=A.current;if(A.current=!1,B.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=Yr(X);function xe(){X.type==="pointerdown"?I(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=je(X=>{if(j()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),B.clear(),$.current=null)}),re=je(X=>{const Z=Yr(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=je(X=>{j()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),B.clear(),$.current=null)}),ve=je(X=>{const Z=Yr(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new ss;function Z(le){n.setOpen(!1,mt(Hc,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(Zy()?5:0,()=>{M.current=!1})}const ge=Pt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(It(a)&&(Ce=ma(a)),It(i)&&(Ce=Ce.concat(ma(i))),!It(o)&&o&&o.contextElement&&(Ce=Ce.concat(ma(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,I,J,re,ve,G,n]),C.useEffect(N,[T,N]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[qse[b]]:X=>{n.setOpen(!1,mt(Gc,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,mt(Gc,X.nativeEvent))}}}}),[F,n,y,b]),ce=je(X=>{const Z=Yr(X.nativeEvent);!ht(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=je(X=>{!r||!f||X.button!==0||(A.current=!0)}),We=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:q,onMouseDownCapture(X){q(),Ie(X)},onPointerDownCapture(X){q(),Ie(X)},onMouseUpCapture:q,onTouchEndCapture:q,onTouchMoveCapture:q}),[F,ce,q,Ie]);return C.useMemo(()=>f?{reference:Re,floating:We,trigger:Re}:{},[f,Re,We])}var dy=Symbol("NOT_FOUND");function Kse(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xse(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Qse(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 ZM=e=>Array.isArray(e)?e:[e];function Zse(e){const t=Array.isArray(e[0])?e[0]:e;return Qse(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Jse(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function eae(e){let t;return{get(n){return t&&e(t.key,n)?t.value:dy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function tae(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return dy}function i(u,c){r(u)===dy&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var nae=(e,t)=>e===t;function rae(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function iae(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=nae,maxSize:i=1,resultEqualityCheck:o}=n,a=rae(r);let u=0;const c=i<=1?eae(a):tae(i,a);function f(){let h=c.get(arguments);if(h===dy){if(h=e.apply(null,arguments),u++,o){const m=c.getEntries().find(y=>o(y.value,h));m&&(h=m.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var oae=class{constructor(e){this.value=e}deref(){return this.value}},sae=typeof WeakRef<"u"?WeakRef:oae,aae=0,JM=1;function zm(){return{s:aae,v:void 0,o:null,p:null}}function YF(e,t={}){let n=zm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let m=0,y=c;m<y;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=zm(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=zm(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===JM)h=u.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new sae(h):h}return f.s=JM,f.v=h,h}return a.clearCache=()=>{n=zm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function WF(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),Kse(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:y=YF,argsMemoizeOptions:b=[]}=h,v=ZM(m),S=ZM(b),x=Zse(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const A=Jse(x,arguments);return u=_.apply(null,A),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var lae=WF(YF),uae=Object.assign((e,t=lae)=>{Xse(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(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,c)=>(a[n[c]]=u,a),{}))},{withTypes:()=>uae});WF({memoize:iae,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const vt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(dr(1));let u;if(e)u=e;else throw new Error("Missing arguments");return u};var KF=a$();const $w=[];let Pw;function cae(){return Pw}function fae(e){$w.push(e)}function XF(e){const t=(n,r)=>{const i=Tr(hae).current;let o;try{Pw=i;for(const a of $w)a.before(i);o=e(n,r);for(const a of $w)a.after(i);i.didInitialize=!0}finally{Pw=void 0}return o};return t.displayName=e.displayName||e.name,t}function dae(e){return C.forwardRef(XF(e))}function hae(){return{didInitialize:!1}}const pae=vC(19),mae=pae?yae:bae;function QF(e,t,n,r,i){return mae(e,t,n,r,i)}function gae(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return KF.useSyncExternalStore(e.subscribe,o,o)}fae({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),KF.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function yae(e,t,n,r,i){const o=cae();if(!o)return gae(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function bae(e,t,n,r,i){return l$.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class vae{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}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])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return QF(this,t,n,r,i)}}class ZF extends vae{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),Ve(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ve(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ve(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;Ve(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),QF(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=je(n??Gj);this.context[t]=r}useStateSetter(t){const n=C.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(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}}function xae(){const[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}const wae={open:vt(e=>e.open),domReferenceElement:vt(e=>e.domReferenceElement),referenceElement:vt(e=>e.positionReference??e.referenceElement),floatingElement:vt(e=>e.floatingElement),floatingId:vt(e=>e.floatingId)};class LC extends ZF{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:DF(),nested:r,noEmit:i,triggerElements:a},wae);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||cF(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}}function JF(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Sae(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=JF(e,n),a=je(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return Ve(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function Cae(e){const t=e.useState("open");Ve(()=>{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 Eae(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=SC(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=je(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Wh({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}class jC{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function kae(){return new LC({open:!1,floatingElement:null,referenceElement:null,triggerElements:new jC,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Rae(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:kae(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Tn,inactiveTriggerProps:Tn,popupProps:Tn}}const Bm=vt(e=>e.triggerIdProp??e.activeTriggerId),_ae={open:vt(e=>e.openProp??e.open),mounted:vt(e=>e.mounted),transitionStatus:vt(e=>e.transitionStatus),floatingRootContext:vt(e=>e.floatingRootContext),preventUnmountingOnClose:vt(e=>e.preventUnmountingOnClose),payload:vt(e=>e.payload),activeTriggerId:Bm,activeTriggerElement:vt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:vt((e,t)=>t!==void 0&&Bm(e)===t),isOpenedByTrigger:vt((e,t)=>t!==void 0&&Bm(e)===t&&e.open),isMountedByTrigger:vt((e,t)=>t!==void 0&&Bm(e)===t&&e.mounted),triggerProps:vt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:vt(e=>e.popupProps),popupElement:vt(e=>e.popupElement),positionerElement:vt(e=>e.positionerElement)};function Tae(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ou(),o=ls()!=null,a=Tr(()=>new LC({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new jC,floatingId:i,nested:o,noEmit:!1})).current;return Ve(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=It(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function Aae(e={}){const{nodeId:t,externalTree:n}=e,r=Tae(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=Ia(n);Ve(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=Fse({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=It(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[m,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",It(m)?m:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(It(O)||O===null)&&(c.current=O,y(O)),(It(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!It(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:k,nodeId:t,rootStore:i}),[h,_,k,t,i,T,A]);return Ve(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function Dae(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=ou(),a=ls()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=Tr(()=>new LC({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return Ve(()=>{const m={open:u,floatingId:o,referenceElement:c,floatingElement:f};It(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const $x=Uie&&rF;function Mae(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=Bi(),h=C.useRef(!0);C.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const y=Ln(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&Jt(x)&&x===mi(Pt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),$x&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),$x&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function m(y){if(y.reason===Gc||y.reason===wC){const b=n.select("domReferenceElement");It(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(m){const y=m.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Yr(m.nativeEvent);if(It(b)){if($x&&!m.relatedTarget){if(!h.current&&!eb(b))return}else if(!Yie(b))return}const v=ry(m.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=m,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,mt(Bd,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,mt(Bd,S,x))})},onBlur(m){u.current=!1,c.current=null;const y=m.relatedTarget,b=m.nativeEvent,v=It(y)&&y.hasAttribute(Xc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var k;const S=n.select("domReferenceElement"),x=mi(S?S.ownerDocument:document);!y&&x===S||ht((k=i.current.floatingContext)==null?void 0:k.refs.floating.current,x)||ht(S,x)||v||ry(y??x,n.context.triggerElements)||n.setOpen(!1,mt(Bd,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const Nw=Xc("safe-polygon"),Oae=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${aF}`;function $ae(e){return e?!!e.closest(Oae):!1}class FC{constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new ss,this.restTimeout=new ss,this.handleCloseOptions=void 0}static create(){return new FC}}function ez(e){const t=Tr(FC.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Hh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}const Pae=new Set(["click","mousedown"]);function Nae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=ez(n),h=Ia(),p=ls(),m=je(()=>f.interactedInside?!0:a.current.openEvent?Pae.has(a.current.openEvent.type):!1),y=je(()=>{var T;const k=(T=a.current.openEvent)==null?void 0:T.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=je(k=>ry(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=Iae(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,mt(qr,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,mt(qr,k)))},[c,n,f]),S=je(()=>{f.unbindMouseMove(),f.handler=void 0}),x=je(()=>{if(f.performedPointerEventsMutation){const k=Pt(i).body;k.style.pointerEvents="",k.removeAttribute(Nw),f.performedPointerEventsMutation=!1}}),_=je(k=>{const T=Yr(k);if(!$ae(T)){f.interactedInside=!1;return}f.interactedInside=!0});Ve(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),Ve(()=>{var k,T,A;if(u&&r&&(k=f.handleCloseOptions)!=null&&k.blockPointerEvents&&y()&&It(o)&&i){f.performedPointerEventsMutation=!0;const D=Pt(i).body;D.setAttribute(Nw,"");const O=o,$=i,B=(A=(T=h==null?void 0:h.nodesRef.current.find(L=>L.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return B&&(B.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){m()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),m()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){m()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",k),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",k),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,m,b,v,x,S,_,f])}function Iae(e,t){return t&&!qc(t)?0:typeof e=="function"?e():e}function Px(e){return typeof e=="function"?e():e}const Lae={current:null};function tz(e,t={}){var L;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=Lae,externalTree:m,isActiveTrigger:y=!0}=t,b=Ia(m),v=ez(n),S=sr(u),x=sr(a),_=sr(f),k=sr(o);y&&(v.handleCloseOptions=(L=S.current)==null?void 0:L.__options);const T=je(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=je(N=>ry(N,n.context.triggerElements)),D=C.useCallback((N,M=!0)=>{const z=Tx(x.current,"close",v.pointerType);z&&!v.handler?v.openChangeTimeout.start(z,()=>n.setOpen(!1,mt(qr,N))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,mt(qr,N)))},[x,n,v]),O=je(()=>{v.unbindMouseMove(),v.handler=void 0}),$=je(()=>{if(v.performedPointerEventsMutation){const N=Pt(n.select("domReferenceElement")).body;N.style.pointerEvents="",N.removeAttribute(Nw),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function N(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[o,i,v]);const B=je(N=>{var z;if(T()||!r.current.floatingContext||A(N.relatedTarget))return;const M=p.current;(z=S.current)==null||z.call(S,{...r.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(N)}})(N)});return C.useEffect(()=>{if(!o)return;const N=p.current??(y?n.select("domReferenceElement"):null);if(!It(N))return;function M(j){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!qc(v.pointerType)||Px(_.current)>0&&!Tx(x.current,"open"))return;const F=Tx(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),q=n.context.triggerElements,W=(q.hasElement(j.target)||q.hasMatchingElement(H=>ht(H,j.target)))&&(!U||!ht(U,j.target)),I=j.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,mt(qr,j,I)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,mt(qr,j,I))}):J&&n.setOpen(!0,mt(qr,j,I))}function z(j){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Pt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,A(j.relatedTarget))return;if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const W=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:j.clientX,y:j.clientY,onClose(){$(),O(),k.current&&!T()&&W===n.select("domReferenceElement")&&D(j,!0)}});const I=v.handler;I(j),U.addEventListener("mousemove",I),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",I)};return}(v.pointerType==="touch"?!ht(n.select("floatingElement"),j.relatedTarget):!0)&&D(j)}function G(j){B(j)}return n.select("open")&&N.addEventListener("mouseleave",G),h&&N.addEventListener("mousemove",M,{once:!0}),N.addEventListener("mouseenter",M),N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",G),h&&N.removeEventListener("mousemove",M),N.removeEventListener("mouseenter",M),N.removeEventListener("mouseleave",z)}},[O,$,r,x,D,n,o,S,B,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function N(M){v.pointerType=M.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(M){const{nativeEvent:z}=M,G=M.currentTarget,j=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),q=(F.hasElement(M.target)||F.hasMatchingElement(I=>ht(I,M.target)))&&(!j||!ht(j,M.target));if(c&&!qc(v.pointerType)||U&&!q||Px(_.current)===0||!q&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const I=n.select("open");!v.blockMouseMove&&(!I||q)&&n.setOpen(!0,mt(qr,z,G))}v.pointerType==="touch"?yn.flushSync(()=>{W()}):q&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(Px(_.current),W))}}},[o,v,T,c,n,_])}function zC(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>Um(f,e,"reference"),t),a=C.useCallback(f=>Um(f,e,"floating"),n),u=C.useCallback(f=>Um(f,e,"item"),r),c=C.useCallback(f=>Um(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function Um(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[Rw]="");for(const u in e)i&&e&&(u===oF||u===sF)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&e2(o,c,i,r)}return e2(o,e,i,r),o}function e2(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===oF||o===sF)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}const jae="Escape";function nb(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Hm(e,t){return nb(t,e===AC||e===qh,e===ga||e===ya)}function Nx(e,t,n){return nb(t,e===qh,n?e===ga:e===ya)||e==="Enter"||e===" "||e===""}function Fae(e,t,n){return nb(t,n?e===ga:e===ya,e===qh)}function zae(e,t,n,r){const i=n?e===ya:e===ga,o=e===AC;return t==="both"||t==="horizontal"&&r&&r>1?e===jae:nb(t,i,o)}function Bae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:u,activeIndex:c,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:m=!1,loopFocus:y=!1,nested:b=!1,rtl:v=!1,virtual:S=!1,focusItemOnOpen:x="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:k=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:D,cols:O=1,id:$,resetOnPointerLeave:B=!0,externalTree:L}=t,N=iy(i),M=sr(N),z=ls(),G=Ia(L);Ve(()=>{a.current.orientation=A},[a,A]);const j=_w(o),F=C.useRef(x),U=C.useRef(p??-1),q=C.useRef(null),W=C.useRef(!0),I=je(oe=>{f(U.current===-1?null:U.current,oe)}),Y=C.useRef(I),J=C.useRef(!!i),H=C.useRef(r),ie=C.useRef(!1),re=C.useRef(!1),he=sr(T),ve=sr(r),Re=sr(p),ce=sr(B),Ie=je(()=>{function oe(Te){S?G==null||G.events.emit("virtualfocus",Te):Hd(Te,{sync:ie.current,preventScroll:!0})}const me=u.current[U.current],ae=re.current;me&&oe(me),(ie.current?Te=>Te():requestAnimationFrame)(()=>{var De;const Te=u.current[U.current]||me;if(!Te)return;me||oe(Te),X&&(ae||!W.current)&&((De=Te.scrollIntoView)==null||De.call(Te,{block:"nearest",inline:"nearest"}))})});Ve(()=>{h&&(r&&i?(U.current=p??-1,F.current&&p!=null&&(re.current=!0,I())):J.current&&(U.current=-1,Y.current()))},[h,r,i,p,I]),Ve(()=>{if(h){if(!r){ie.current=!1;return}if(i)if(c==null){if(ie.current=!1,Re.current!=null)return;if(J.current&&(U.current=-1,Ie()),(!H.current||!J.current)&&F.current&&(q.current!=null||F.current===!0&&q.current==null)){let oe=0;const me=()=>{u.current[0]==null?(oe<2&&(oe?requestAnimationFrame:queueMicrotask)(me),oe+=1):(U.current=q.current==null||Nx(q.current,A,v)||b?yg(u):Dw(u),q.current=null,I())};me()}}else bc(u,c)||(U.current=c,Ie(),re.current=!1)}},[h,r,i,c,Re,b,u,A,v,I,Ie,he]),Ve(()=>{var Te,_e;if(!h||i||!G||S||!J.current)return;const oe=G.nodesRef.current,me=(_e=(Te=oe.find(De=>De.id===z))==null?void 0:Te.context)==null?void 0:_e.elements.floating,ae=mi(Pt(i)),Oe=oe.some(De=>De.context&&ht(De.context.elements.floating,ae));me&&!Oe&&W.current&&me.focus({preventScroll:!0})},[h,i,G,z,S]),Ve(()=>{Y.current=I,H.current=r,J.current=!!i}),Ve(()=>{r||(q.current=null,F.current=x)},[r,x]);const We=c!=null,X=C.useMemo(()=>{function oe(ae){if(!ve.current)return;const Oe=u.current.indexOf(ae.currentTarget);Oe!==-1&&U.current!==Oe&&(U.current=Oe,I(ae))}return{onFocus(ae){ie.current=!0,oe(ae)},onClick:({currentTarget:ae})=>ae.focus({preventScroll:!0}),onMouseMove(ae){ie.current=!0,re.current=!1,_&&oe(ae)},onPointerLeave(ae){var Te;if(!ve.current||!W.current||ae.pointerType==="touch")return;ie.current=!0;const Oe=ae.relatedTarget;!_||u.current.includes(Oe)||ce.current&&(Hd(null,{sync:!0}),U.current=-1,I(ae),S||(Te=M.current)==null||Te.focus({preventScroll:!0}))}}},[ve,M,_,u,I,ce,S]),Z=C.useCallback(()=>{var oe,me,ae;return D??((ae=(me=(oe=G==null?void 0:G.nodesRef.current.find(Oe=>Oe.id===z))==null?void 0:oe.context)==null?void 0:me.dataRef)==null?void 0:ae.current.orientation)},[z,G,D]),ne=je(oe=>{if(W.current=!1,ie.current=!0,oe.which===229||!ve.current&&oe.currentTarget===M.current)return;if(b&&zae(oe.key,A,v,O)){Hm(oe.key,Z())||Gn(oe),n.setOpen(!1,mt(mg,oe.nativeEvent)),Jt(o)&&(S?G==null||G.events.emit("virtualfocus",o):o.focus());return}const me=U.current,ae=yg(u,T),Oe=Dw(u,T);if(j||(oe.key==="Home"&&(Gn(oe),U.current=ae,I(oe)),oe.key==="End"&&(Gn(oe),U.current=Oe,I(oe))),O>1){const Te=Array.from({length:u.current.length},()=>({width:1,height:1})),_e=hF(Te,O,!1),De=_e.findIndex(ke=>ke!=null&&!ba(u,ke,T)),ue=_e.reduce((ke,Pe,Le)=>Pe!=null&&!ba(u,Pe,T)?Le:ke,-1),Se=_e[dF({current:_e.map(ke=>ke!=null?u.current[ke]:null)},{event:oe,orientation:A,loopFocus:y,rtl:v,cols:O,disabledIndices:mF([...(typeof T!="function"?T:null)||u.current.map((ke,Pe)=>ba(u,Pe,T)?Pe:void 0),void 0],_e),minIndex:De,maxIndex:ue,prevIndex:pF(U.current>Oe?ae:U.current,Te,_e,O,oe.key===qh?"bl":oe.key===(v?ga:ya)?"tr":"tl"),stopEvent:!0})];if(Se!=null&&(U.current=Se,I(oe)),A==="both")return}if(Hm(oe.key,A)){if(Gn(oe),r&&!S&&mi(oe.currentTarget.ownerDocument)===oe.currentTarget){U.current=Nx(oe.key,A,v)?ae:Oe,I(oe);return}Nx(oe.key,A,v)?y?me>=Oe?m&&me!==u.current.length?U.current=-1:(ie.current=!1,U.current=ae):U.current=Hn(u,{startingIndex:me,disabledIndices:T}):U.current=Math.min(Oe,Hn(u,{startingIndex:me,disabledIndices:T})):y?me<=ae?m&&me!==-1?U.current=u.current.length:(ie.current=!1,U.current=Oe):U.current=Hn(u,{startingIndex:me,decrement:!0,disabledIndices:T}):U.current=Math.max(ae,Hn(u,{startingIndex:me,decrement:!0,disabledIndices:T})),bc(u,U.current)&&(U.current=-1),I(oe)}}),xe=C.useMemo(()=>S&&r&&We&&{"aria-activedescendant":`${$}-${c}`},[S,r,We,$,c]),ge=C.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...j?{}:xe,onKeyDown(oe){if(oe.key==="Tab"&&oe.shiftKey&&r&&!S){const me=Yr(oe.nativeEvent);if(me&&!ht(M.current,me))return;Gn(oe),n.setOpen(!1,mt(Vc,oe.nativeEvent)),Jt(o)&&o.focus();return}ne(oe)},onPointerMove(){W.current=!0}}),[xe,ne,M,A,j,n,r,S,o]),Ce=C.useMemo(()=>{function oe(ae){x==="auto"&&lF(ae.nativeEvent)&&(F.current=!S)}function me(ae){F.current=x,x==="auto"&&uF(ae.nativeEvent)&&(F.current=!0)}return{onKeyDown(ae){const Oe=n.select("open");W.current=!1;const Te=ae.key.startsWith("Arrow"),_e=Fae(ae.key,Z(),v),De=Hm(ae.key,A),ue=(b?_e:De)||ae.key==="Enter"||ae.key.trim()==="";if(S&&Oe)return ne(ae);if(!(!Oe&&!k&&Te)){if(ue){const Se=Hm(ae.key,Z());q.current=b&&Se?null:ae.key}if(b){_e&&(Gn(ae),Oe?(U.current=yg(u,he.current),I(ae)):n.setOpen(!0,mt(mg,ae.nativeEvent,ae.currentTarget)));return}De&&(Re.current!=null&&(U.current=Re.current),Gn(ae),!Oe&&k?n.setOpen(!0,mt(mg,ae.nativeEvent,ae.currentTarget)):ne(ae),Oe&&I(ae))}},onFocus(ae){n.select("open")&&!S&&(U.current=-1,I(ae))},onPointerDown:me,onPointerEnter:me,onMouseDown:oe,onClick:oe}},[ne,he,x,u,b,I,n,k,A,Z,v,Re,S]),le=C.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return C.useMemo(()=>h?{reference:le,floating:ge,item:X,trigger:Ce}:{},[h,le,ge,Ce,X])}const Uae=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=ou(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var _;return((_=iy(a))==null?void 0:_.id)||i},[a,i]),p=Uae.get(u)??u,y=ls()!=null,b=C.useMemo(()=>p==="tooltip"||u==="label"?Tn:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&y&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,y,u]),v=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,b]),S=C.useMemo(()=>{const _={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),x=C.useCallback(({active:_,selected:k})=>{const T={role:"option",..._&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...T,"aria-selected":k}}return{}},[h,u]);return C.useMemo(()=>({reference:v,floating:S,item:x,trigger:b}),[v,S,b,x])}function Gae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:u,onTypingChange:c,enabled:f=!0,resetMs:h=750,selectedIndex:p=null}=t,m=Bi(),y=C.useRef(""),b=C.useRef(p??a??-1),v=C.useRef(null);Ve(()=>{!i&&p!==null||(m.clear(),v.current=null,y.current!==""&&(y.current=""))},[i,p,m]),Ve(()=>{i&&y.current===""&&(b.current=p??a??-1)},[i,p,a]);const S=je(A=>{A?r.current.typing||(r.current.typing=A,c==null||c(A)):r.current.typing&&(r.current.typing=A,c==null||c(A))}),x=je(A=>{function D(M,z,G){const j=z.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(G.toLocaleLowerCase()))===0);return j?M.indexOf(j):-1}const O=o.current;if(y.current.length>0&&y.current[0]!==" "&&(D(O,O,y.current)===-1?S(!1):A.key===" "&&Gn(A)),O==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(Gn(A),S(!0));const $=y.current==="";$&&(b.current=p??a??-1),O.every(M=>{var z,G;return M?((z=M[0])==null?void 0:z.toLocaleLowerCase())!==((G=M[1])==null?void 0:G.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",b.current=v.current),y.current+=A.key,m.start(h,()=>{y.current="",b.current=v.current,S(!1)});const L=$?p??a??-1:b.current,N=D(O,[...O.slice((L||0)+1),...O.slice(0,(L||0)+1)],y.current);N!==-1?(u==null||u(N),v.current=N):A.key!==" "&&(y.current="",S(!1))}),_=je(A=>{const D=A.relatedTarget,O=n.select("domReferenceElement"),$=n.select("floatingElement"),B=ht(O,D),L=ht($,D);B||L||(m.clear(),y.current="",b.current=v.current,S(!1))}),k=C.useMemo(()=>({onKeyDown:x,onBlur:_}),[x,_]),T=C.useMemo(()=>({onKeyDown:x,onKeyUp(A){A.key===" "&&S(!1)},onBlur:_}),[x,_,S]);return C.useMemo(()=>f?{reference:k,floating:T}:{},[f,k,T])}function t2(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function Vae(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function nz(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new ss;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=m,c=y,null;const v=p-a,S=m-u,_=Math.sqrt(v*v+S*S)/b;return a=p,u=m,c=y,_}const h=({x:p,y:m,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(k){function T(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||m==null)return;const{clientX:A,clientY:D}=k,O=[A,D],$=Yr(k),B=k.type==="mouseleave",L=ht(b.floating,$),N=ht(b.domReference,$),M=b.domReference.getBoundingClientRect(),z=b.floating.getBoundingClientRect(),G=y.split("-")[0],j=p>z.right-z.width/2,F=m>z.bottom-z.height/2,U=Vae(O,M),q=z.width>M.width,W=z.height>M.height,I=(q?M:z).left,Y=(q?M:z).right,J=(W?M:z).top,H=(W?M:z).bottom;if(L&&(o=!0,!B))return;if(N&&(o=!1),N&&!B){o=!0;return}if(B&&It(k.relatedTarget)&&ht(b.floating,k.relatedTarget)||x&&jl(x.nodesRef.current,S).some(({context:he})=>he==null?void 0:he.open))return;if(G==="top"&&m>=M.bottom-1||G==="bottom"&&m<=M.top+1||G==="left"&&p>=M.right-1||G==="right"&&p<=M.left+1)return T();let ie=[];switch(G){case"top":ie=[[I,M.top+1],[I,z.bottom-1],[Y,z.bottom-1],[Y,M.top+1]];break;case"bottom":ie=[[I,z.top+1],[I,M.bottom-1],[Y,M.bottom-1],[Y,z.top+1]];break;case"left":ie=[[z.right-1,H],[z.right-1,J],[M.left+1,J],[M.left+1,H]];break;case"right":ie=[[M.right-1,H],[M.right-1,J],[z.left+1,J],[z.left+1,H]];break}function re([he,ve]){switch(G){case"top":{const Re=[q?he+t/2:j?he+t*4:he-t*4,ve+t+1],ce=[q?he-t/2:j?he+t*4:he-t*4,ve+t+1],Ie=[[z.left,j||q?z.bottom-t:z.top],[z.right,j?q?z.bottom-t:z.top:z.bottom-t]];return[Re,ce,...Ie]}case"bottom":{const Re=[q?he+t/2:j?he+t*4:he-t*4,ve-t],ce=[q?he-t/2:j?he+t*4:he-t*4,ve-t],Ie=[[z.left,j||q?z.top+t:z.bottom],[z.right,j?q?z.top+t:z.bottom:z.top+t]];return[Re,ce,...Ie]}case"left":{const Re=[he+t+1,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he+t+1,W?ve-t/2:F?ve+t*4:ve-t*4];return[...[[F||W?z.right-t:z.left,z.top],[F?W?z.right-t:z.left:z.right-t,z.bottom]],Re,ce]}case"right":{const Re=[he-t,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he-t,W?ve-t/2:F?ve+t*4:ve-t*4],Ie=[[F||W?z.left+t:z.right,z.top],[F?W?z.left+t:z.right:z.left+t,z.bottom]];return[Re,ce,...Ie]}default:return[]}}if(!t2([A,D],ie)){if(o&&!U)return T();if(!B&&r){const he=f(k.clientX,k.clientY);if(he!==null&&he<.1)return T()}t2([A,D],re([p,m]))?!o&&r&&i.start(40,T):T()}};return h.__options={blockPointerEvents:n},h}function qae(e){const t=C.useRef(""),n=C.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:C.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 Yae(e){const[t,n]=C.useState(null),r=je((u,c)=>{e||n(c||(nF?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=qae(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let BC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Gl.startingStyle]="startingStyle",e[e.endingStyle=Gl.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Iw=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Wae={[Iw.popupOpen]:""},Kae={[Iw.popupOpen]:"",[Iw.pressed]:""},Xae={[BC.open]:""},Qae={[BC.closed]:""},Zae={[BC.anchorHidden]:""},Jae={open(e){return e?Wae:null}},n2={open(e){return e?Kae:null}},rz={open(e){return e?Xae:Qae},anchorHidden(e){return e?Zae:null}};function iz(e){return vC(19)?e:e?"true":void 0}const ele=C.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r==null?void 0:r.getBoundingClientRect();o=`polygon(
|
|
469
|
+
0% 0%,
|
|
470
|
+
100% 0%,
|
|
471
|
+
100% 100%,
|
|
472
|
+
0% 100%,
|
|
473
|
+
0% 0%,
|
|
474
|
+
${a.left}px ${a.top}px,
|
|
475
|
+
${a.left}px ${a.bottom}px,
|
|
476
|
+
${a.right}px ${a.bottom}px,
|
|
477
|
+
${a.right}px ${a.top}px,
|
|
478
|
+
${a.left}px ${a.top}px
|
|
479
|
+
)`}return E.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function tle(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}function nle(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 o=parseFloat(n.width)||0,a=parseFloat(n.height)||0,u=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=Math.max(t.width,o,u),h=Math.max(t.height,a,c),p=f-t.width,m=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-m/2,bottom:t.bottom+m/2}}const rle=e=>({name:"arrow",options:e,async fn(t){var W,I;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=os(e,t)||{};if(f==null)return{};const m=fF(h),y={x:n,y:r},b=OC(i),v=MC(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",k=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((I=a.isElement)==null?void 0:I.call(a,O)))&&($=u.floating[T]||o.floating[v]);const B=A/2-D/2,L=$/2-S[v]/2-1,N=Math.min(m[_],L),M=Math.min(m[k],L),z=N,G=$-S[v]-M,j=$/2-S[v]/2+B,F=Tw(z,j,G),U=!c.arrow&&Na(i)!=null&&j!==F&&o.reference[v]/2-(j<z?N:M)-S[v]/2<0,q=U?j<z?j-z:j-G:0;return{[b]:y[b]+q,data:{[b]:F,centerOffset:j-F-q,...U&&{alignmentOffset:q}},reset:U}}}),ile=(e,t)=>({...rle(e),options:[e,t]}),ole={name:"hide",async fn(e){var u;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((u=(await Vse().fn(e)).data)==null?void 0:u.referenceHidden)||o}}}},sle={sideX:"left",sideY:"top"};function oz(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 r2(e,t,n){const{rects:r,placement:i}=e;return{side:oz(t,Kr(i),n),align:Na(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function ale(e){var Tt,ft;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",B=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,N=je(L),M=L?N:t,z=sr(t),j=Uh()==="rtl",F=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],U=o==="center"?F:`${F}-${o}`;let q=c;const W=1,I=r==="bottom"?W:0,Y=r==="top"?W:0,J=r==="right"?W:0,H=r==="left"?W:0;typeof q=="number"?q={top:q+I,right:q+H,bottom:q+Y,left:q+J}:q&&(q={top:(q.top||0)+I,right:(q.right||0)+H,bottom:(q.bottom||0)+Y,left:(q.left||0)+J});const ie={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:q},re=C.useRef(null),he=sr(i),ve=sr(a),Ie=[zse(ut=>{const Rt=r2(ut,r,j),en=typeof he.current=="function"?he.current(Rt):he.current,Xt=typeof ve.current=="function"?ve.current(Rt):ve.current;return{mainAxis:en,crossAxis:Xt,alignmentAxis:Xt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,j,r])],We=$==="none"&&O!=="shift",X=!We&&(f||S||O==="shift"),Z=O==="none"?null:Hse({...ie,padding:{top:q.top+W,right:q.right+W,bottom:q.bottom+W,left:q.left+W},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),ne=We?null:Bse(ut=>{const Rt=Pt(ut.elements.floating).documentElement;return{...ie,rootBoundary:S?{x:0,y:0,width:Rt.clientWidth,height:Rt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:X,limiter:f||S?void 0:Use(en=>{if(!re.current)return{};const{width:Xt,height:tn}=re.current.getBoundingClientRect(),bn=wi(Kr(en.placement)),Jr=bn==="y"?Xt:tn,ja=bn==="y"?q.left+q.right:q.top+q.bottom;return{offset:Jr/2+ja/2}})}},[ie,f,S,q,$]);O==="shift"||$==="shift"||o==="center"?Ie.push(ne,Z):Ie.push(Z,ne),Ie.push(Gse({...ie,apply({elements:{floating:ut},rects:{reference:Rt},availableWidth:en,availableHeight:Xt}){const tn=ut.style;tn.setProperty("--available-width",`${en}px`),tn.setProperty("--available-height",`${Xt}px`),tn.setProperty("--anchor-width",`${Rt.width}px`),tn.setProperty("--anchor-height",`${Rt.height}px`)}}),ile(()=>({element:re.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ut){var jn,fo,uu;const{elements:Rt,middlewareData:en,placement:Xt,rects:tn,y:bn}=ut,Jr=Kr(Xt),ja=wi(Jr),Ei=re.current,Fa=((jn=en.arrow)==null?void 0:jn.x)||0,ki=((fo=en.arrow)==null?void 0:fo.y)||0,au=(Ei==null?void 0:Ei.clientWidth)||0,lu=(Ei==null?void 0:Ei.clientHeight)||0,fs=Fa+au/2,Ri=ki+lu/2,za=Math.abs(((uu=en.shift)==null?void 0:uu.y)||0),Ba=tn.reference.height/2,Hi=typeof i=="function"?i(r2(ut,r,j)):i,Ua=za>Hi,Or={top:`${fs}px calc(100% + ${Hi}px)`,bottom:`${fs}px ${-Hi}px`,left:`calc(100% + ${Hi}px) ${Ri}px`,right:`${-Hi}px ${Ri}px`}[Jr],on=`${fs}px ${tn.reference.y+Ba-bn}px`;return Rt.floating.style.setProperty("--transform-origin",X&&ja==="y"&&Ua?on:Or),{}}},ole,_),Ve(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const xe=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:ge,elements:Ce,x:le,y:oe,middlewareData:me,update:ae,placement:Oe,context:Te,isPositioned:_e,floatingStyles:De}=Aae({rootContext:y,placement:U,middleware:Ie,strategy:n,whileElementsMounted:m?void 0:(...ut)=>XM(...ut,xe),nodeId:x,externalTree:T}),{sideX:ue,sideY:Se}=me.adaptiveOrigin||sle,ke=_e?n:"fixed",Pe=C.useMemo(()=>{const ut=_?{position:ke,[ue]:le,[Se]:oe}:{position:ke,...De};return _e||(ut.opacity=0),ut},[_,ke,ue,le,Se,oe,De,_e]),Le=C.useRef(null);Ve(()=>{if(!b)return;const ut=z.current,Rt=typeof ut=="function"?ut():ut,Xt=(i2(Rt)?Rt.current:Rt)||null||null;Xt!==Le.current&&(ge.setPositionReference(Xt),Le.current=Xt)},[b,ge,M,z]),C.useEffect(()=>{if(!b)return;const ut=z.current;typeof ut!="function"&&i2(ut)&&ut.current!==Le.current&&(ge.setPositionReference(ut.current),Le.current=ut.current)},[b,ge,M,z]),C.useEffect(()=>{if(m&&b&&Ce.domReference&&Ce.floating)return XM(Ce.domReference,Ce.floating,ae,xe)},[m,b,Ce,ae,xe]);const st=Kr(Oe),Ut=oz(r,st,j),Ot=Na(Oe)||"center",Me=!!((Tt=me.hide)!=null&&Tt.referenceHidden);Ve(()=>{k&&b&&_e&&D(st)},[k,b,_e,st]);const Xe=C.useMemo(()=>{var ut,Rt;return{position:"absolute",top:(ut=me.arrow)==null?void 0:ut.y,left:(Rt=me.arrow)==null?void 0:Rt.x}},[me.arrow]),Ne=((ft=me.arrow)==null?void 0:ft.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:Pe,arrowStyles:Xe,arrowRef:re,arrowUncentered:Ne,side:Ut,align:Ot,physicalSide:st,anchorHidden:Me,refs:ge,context:Te,isPositioned:_e,update:ae}),[Pe,Xe,re,Ne,Ut,Ot,st,Me,ge,Te,_e,ae])}function i2(e){return e!=null&&"current"in e}function sz(e){return e==="starting"?cie:Tn}const az={...Xj,...Gh},lle=C.forwardRef(function(t,n){const{render:r,className:i,defaultOpen:o=!1,disabled:a=!1,onOpenChange:u,open:c,...f}=t,h=je(u),p=Yj({open:c,defaultOpen:o,onOpenChange:h,disabled:a}),m=C.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),y=C.useMemo(()=>({...p,onOpenChange:h,state:m}),[p,h,m]),b=dn("div",t,{state:m,ref:n,props:f,stateAttributesMapping:az});return E.jsx(CC.Provider,{value:y,children:b})}),ule={...Kj,...Gh},cle=C.forwardRef(function(t,n){const{panelId:r,open:i,handleTrigger:o,state:a,disabled:u}=Ky(),{className:c,disabled:f=u,id:h,render:p,nativeButton:m=!0,...y}=t,{getButtonProps:b,buttonRef:v}=mf({disabled:f,focusableWhenDisabled:!0,native:m}),S=C.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:o}),[r,i,o]);return dn("button",t,{state:a,ref:[n,v],props:[S,y,b],stateAttributesMapping:ule})});let o2=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const fle=C.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:o,render:a,id:u,...c}=t,{abortControllerRef:f,animationTypeRef:h,height:p,mounted:m,onOpenChange:y,open:b,panelId:v,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setHiddenUntilFound:k,setKeepMounted:T,setMounted:A,setPanelIdState:D,setOpen:O,setVisible:$,state:B,transitionDimensionRef:L,visible:N,width:M,transitionStatus:z}=Ky(),G=i??!1,j=o??!1;Ve(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),Ve(()=>{k(G)},[k,G]),Ve(()=>{T(j)},[T,j]);const{props:F}=AF({abortControllerRef:f,animationTypeRef:h,externalRef:n,height:p,hiddenUntilFound:G,id:v,keepMounted:j,mounted:m,onOpenChange:y,open:b,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setMounted:A,setOpen:O,setVisible:$,transitionDimensionRef:L,visible:N,width:M});Wh({open:b&&z==="idle",ref:S,onComplete(){b&&_({height:void 0,width:void 0})}});const U=C.useMemo(()=>({...B,transitionStatus:z}),[B,z]),q=dn("div",t,{state:U,ref:[n,S],props:[F,{style:{[o2.collapsiblePanelHeight]:p===void 0?"auto":`${p}px`,[o2.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:az});return j||G||!j&&m?q:null}),dle=C.createContext(void 0);function rb(e=!0){const t=C.useContext(dle);if(t===void 0&&!e)throw new Error(dr(25));return t}const lz=C.createContext(void 0);function UC(e){const t=C.useContext(lz);if(t===void 0&&!e)throw new Error(dr(33));return t}const uz=C.createContext(void 0);function us(e){const t=C.useContext(uz);if(t===void 0&&!e)throw new Error(dr(36));return t}function hle(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:o,itemRef:a,itemMetadata:u}=e,{events:c}=o.useState("floatingTreeRoot"),f=rb(!0),h=f!==void 0;return C.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onMouseMove(p){i&&c.emit("itemhover",{nodeId:i,target:p.currentTarget})},onClick(p){t&&c.emit("close",{domEvent:p,reason:Vj})},onMouseUp(p){if(f){const m=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,h&&m&&Math.abs(p.clientX-m.x)<=1&&Math.abs(p.clientY-m.y)<=1)return}a.current&&o.context.allowMouseUpTriggerRef.current&&(!h||p.button===2)&&(!u||u.type==="regular-item")&&a.current.click()}}),[t,n,r,c,i,o,a,f,h,u])}const ple={type:"regular-item"};function cz(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:o,nativeButton:a,itemMetadata:u,nodeId:c}=e,f=C.useRef(null),{getButtonProps:h,buttonRef:p}=mf({disabled:n,focusableWhenDisabled:!0,native:a}),m=hle({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:o,itemRef:f,itemMetadata:u}),y=C.useCallback(v=>uh(m,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(S){S.key===" "&&o.context.typingRef.current&&S.preventBaseUIHandler()}},v,h),[m,h,o,u]),b=rs(f,p);return C.useMemo(()=>({getItemProps:y,itemRef:b}),[y,b])}const mle=C.forwardRef(function(t,n){const{render:r,className:i,id:o,label:a,nativeButton:u=!1,disabled:c=!1,closeOnClick:f=!0,...h}=t,p=Vh({label:a}),m=UC(!0),y=is(o),{store:b}=us(),v=b.useState("isActive",p.index),S=b.useState("itemProps"),{getItemProps:x,itemRef:_}=cz({closeOnClick:f,disabled:c,highlighted:v,id:y,store:b,nativeButton:u,nodeId:m==null?void 0:m.nodeId,itemMetadata:ple});return dn("div",t,{state:{disabled:c,highlighted:v},props:[S,h,x],ref:[_,n,p.ref]})}),gle=C.createContext(void 0);function fz(e){return C.useContext(gle)}const yle={...rz,...Gh},ble=C.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:u}=us(),{side:c,align:f}=UC(),h=fz()!=null,p=u.useState("open"),m=u.useState("transitionStatus"),y=u.useState("popupProps"),b=u.useState("mounted"),v=u.useState("instantType"),S=u.useState("activeTriggerElement"),x=u.useState("parent"),_=u.useState("lastOpenChangeReason"),k=u.useState("rootId"),T=u.useState("floatingRootContext"),A=u.useState("floatingTreeRoot"),D=u.useState("closeDelay"),O=u.useState("activeTriggerElement"),$=x.type==="context-menu";Wh({open:p,ref:u.context.popupRef,onComplete(){var G,j;p&&((j=(G=u.context).onOpenChangeComplete)==null||j.call(G,!0))}}),C.useEffect(()=>{function G(j){u.setOpen(!1,mt(j.reason,j.domEvent))}return A.events.on("close",G),()=>{A.events.off("close",G)}},[A.events,u]);const B=u.useState("hoverEnabled"),L=u.useState("disabled");Nae(T,{enabled:B&&!L&&!$&&x.type!=="menubar",closeDelay:D});const N={transitionStatus:m,side:c,align:f,open:p,nested:x.type==="menu",instant:v},M=dn("div",t,{state:N,ref:[n,u.context.popupRef],stateAttributesMapping:yle,props:[y,{onKeyDown(G){h&&koe.has(G.key)&&G.stopPropagation()}},sz(m),a,{"data-rootownerid":k}]});let z=x.type===void 0||$;return(S||x.type==="menubar"&&_!==xC)&&(z=!0),E.jsx(ise,{context:T,modal:$,disabled:!b,returnFocus:o===void 0?z:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?A:void 0,previousFocusableElement:O,nextFocusableElement:x.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:M})}),dz=C.createContext(void 0);function vle(){const e=C.useContext(dz);if(e===void 0)throw new Error(dr(32));return e}const xle=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:o}=us();return o.useState("mounted")||r?E.jsx(dz.Provider,{value:r,children:E.jsx(Joe,{ref:n,...i})}):null}),wle=C.forwardRef(function(t,n){var We;const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:u,align:c,sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:m=5,arrowPadding:y=5,sticky:b=!1,disableAnchorTracking:v=!1,collisionAvoidance:S=die,...x}=t,{store:_}=us(),k=vle(),T=rb(!0),A=_.useState("parent"),D=_.useState("floatingRootContext"),O=_.useState("floatingTreeRoot"),$=_.useState("mounted"),B=_.useState("open"),L=_.useState("modal"),N=_.useState("activeTriggerElement"),M=_.useState("transitionStatus"),z=_.useState("lastOpenChangeReason"),G=_.useState("floatingNodeId"),j=_.useState("floatingParentNodeId");let F=r,U=f,q=h,W=c,I=S;A.type==="context-menu"&&(F=r??((We=A.context)==null?void 0:We.anchor),W=W??"start",!u&&W!=="center"&&(q=t.alignOffset??2,U=t.sideOffset??-5));let Y=u,J=W;A.type==="menu"?(Y=Y??"inline-end",J=J??"start",I=t.collisionAvoidance??hie):A.type==="menubar"&&(Y=Y??"bottom",J=J??"start");const H=A.type==="context-menu",ie=ale({anchor:F,floatingRootContext:D,positionMethod:T?"fixed":i,mounted:$,side:Y,sideOffset:U,align:J,alignOffset:q,arrowPadding:H?0:y,collisionBoundary:p,collisionPadding:m,sticky:b,nodeId:G,keepMounted:k,disableAnchorTracking:v,collisionAvoidance:I,shiftCrossAxis:H&&!("side"in I&&I.side==="flip"),externalTree:O}),re=C.useMemo(()=>{const X={};return B||(X.pointerEvents="none"),{role:"presentation",hidden:!$,style:{...ie.positionerStyles,...X}}},[B,$,ie.positionerStyles]);C.useEffect(()=>{function X(Z){Z.open&&(Z.parentNodeId===G&&_.set("hoverEnabled",!1),Z.nodeId!==G&&Z.parentNodeId===_.select("floatingParentNodeId")&&_.setOpen(!1,mt(gg)))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[_,O.events,G]),C.useEffect(()=>{if(_.select("floatingParentNodeId")==null)return;function X(Z){if(Z.open||Z.nodeId!==_.select("floatingParentNodeId"))return;const ne=Z.reason??gg;_.setOpen(!1,mt(ne))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[O.events,_]),C.useEffect(()=>{function X(Z){!B||Z.nodeId!==_.select("floatingParentNodeId")||Z.target&&N&&N!==Z.target&&_.setOpen(!1,mt(gg))}return O.events.on("itemhover",X),()=>{O.events.off("itemhover",X)}},[O.events,B,N,_]),C.useEffect(()=>{const X={open:B,nodeId:G,parentNodeId:j,reason:_.select("lastOpenChangeReason")};O.events.emit("menuopenchange",X)},[O.events,B,_,G,j]);const he={open:B,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:A.type==="menu"},ve=C.useMemo(()=>({side:ie.side,align:ie.align,arrowRef:ie.arrowRef,arrowUncentered:ie.arrowUncentered,arrowStyles:ie.arrowStyles,nodeId:ie.context.nodeId}),[ie.side,ie.align,ie.arrowRef,ie.arrowUncentered,ie.arrowStyles,ie.context.nodeId]),Re=dn("div",t,{state:he,stateAttributesMapping:rz,ref:[n,_.useStateSetter("positionerElement")],props:[re,sz(M),x]}),ce=$&&A.type!=="menu"&&(A.type!=="menubar"&&L&&z!==qr||A.type==="menubar"&&A.context.modal);let Ie=null;return A.type==="menubar"?Ie=A.context.contentElement:A.type===void 0&&(Ie=N),E.jsxs(lz.Provider,{value:ve,children:[ce&&E.jsx(ele,{ref:A.type==="context-menu"||A.type==="nested-context-menu"?A.context.internalBackdropRef:null,inert:iz(!B),cutout:Ie}),E.jsx(Voe,{id:G,children:E.jsx(Yy,{elementsRef:_.context.itemDomElements,labelsRef:_.context.itemLabels,children:Re})})]})}),Sle=C.createContext(null);function hz(e){return C.useContext(Sle)}const Cle={..._ae,disabled:vt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:vt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:vt(e=>e.allowMouseEnter),stickIfOpen:vt(e=>e.stickIfOpen),parent:vt(e=>e.parent),rootId:vt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:vt(e=>e.activeIndex),isActive:vt((e,t)=>e.activeIndex===t),hoverEnabled:vt(e=>e.hoverEnabled),instantType:vt(e=>e.instantType),lastOpenChangeReason:vt(e=>e.openChangeReason),floatingTreeRoot:vt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:vt(e=>e.floatingNodeId),floatingParentNodeId:vt(e=>e.floatingParentNodeId),itemProps:vt(e=>e.itemProps),closeDelay:vt(e=>e.closeDelay),keyboardEventRelay:vt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class HC extends ZF{constructor(n){super({...Ele(),...n},{positionerRef:C.createRef(),popupRef:C.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),onOpenChangeComplete:void 0,triggerElements:new jC},Cle);te(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",r=>{var i;if((i=this.unsubscribeParentListener)==null||i.call(this),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){const i=Tr(()=>new HC(r)).current;return n??i}}function Ele(){return{...Rae(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new PC,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Tn,keyboardEventRelay:void 0,closeDelay:0}}const pz=C.createContext(void 0);function mz(){return C.useContext(pz)}const gz=XF(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:u=!1,modal:c,loopFocus:f=!0,orientation:h="vertical",actionsRef:p,closeParentOnEsc:m=!1,handle:y,triggerId:b,defaultTriggerId:v=null,highlightItemOnHover:S=!0}=t,x=rb(!0),_=us(!0),k=hz(!0),T=mz(),A=C.useMemo(()=>T&&_?{type:"menu",store:_.store}:k?{type:"menubar",context:k}:x&&!_?{type:"context-menu",context:x}:{type:void 0},[x,_,k,T]),D=HC.useStore(y==null?void 0:y.store,{open:a,openProp:r,activeTriggerId:v,triggerIdProp:b,parent:A});tle(()=>{r===void 0&&D.state.open===!1&&a===!0&&D.update({open:!0,activeTriggerId:v})}),D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",b),D.useContextCallback("onOpenChangeComplete",o);const O=D.useState("floatingTreeRoot"),$=$F(O),B=ls();Ve(()=>{x&&!_?D.update({parent:{type:"context-menu",context:x},floatingNodeId:$,floatingParentNodeId:B}):_&&D.update({floatingNodeId:$,floatingParentNodeId:B})},[x,_,$,B,D]);const L=D.useState("open"),N=D.useState("activeTriggerElement"),M=D.useState("positionerElement"),z=D.useState("hoverEnabled"),G=D.useState("modal"),j=D.useState("disabled"),F=D.useState("lastOpenChangeReason"),U=D.useState("parent"),q=D.useState("activeIndex"),W=D.useState("payload"),I=D.useState("floatingParentNodeId"),Y=C.useRef(null),J=I!=null;let H;D.useSyncedValues({disabled:u,modal:U.type===void 0?c:void 0,rootId:ou()});const{openMethod:ie,triggerProps:re,reset:he}=Yae(L);Cae(D);const{forceUnmount:ve}=Eae(L,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),he()}),Re=C.useRef(U.type!=="context-menu"),ce=Bi();C.useEffect(()=>{if(L||(Y.current=null),U.type==="context-menu"){if(!L){ce.clear(),Re.current=!1;return}ce.start(500,()=>{Re.current=!0})}},[ce,L,U.type]),Hoe(L&&G&&F!==qr&&ie!=="touch",M),Ve(()=>{!L&&!z&&D.set("hoverEnabled",!0)},[L,z,D]);const Ie=C.useRef(!0),We=Bi(),X=je((Me,Xe)=>{var tn;const Ne=Xe.reason;if(L===Me&&Xe.trigger===N&&F===Ne||(Xe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Me&&Xe.trigger==null&&(Xe.trigger=N??void 0),i==null||i(Me,Xe),Xe.isCanceled))return;const Tt={open:Me,nativeEvent:Xe.event,reason:Xe.reason,nested:J};H==null||H.emit("openchange",Tt);const ft=Xe.event;if(Me===!1&&(ft==null?void 0:ft.type)==="click"&&ft.pointerType==="touch"&&!Ie.current)return;if(!Me&&q!==null){const bn=D.context.itemDomElements.current[q];queueMicrotask(()=>{bn==null||bn.setAttribute("tabindex","-1")})}Me&&Ne===Bd?(Ie.current=!1,We.start(300,()=>{Ie.current=!0})):(Ie.current=!0,We.clear());const ut=(Ne===Gc||Ne===Vj)&&ft.detail===0&&(ft==null?void 0:ft.isTrusted),Rt=!Me&&(Ne===wC||Ne==null),en={open:Me,openChangeReason:Ne};Y.current=Xe.event??null;const Xt=((tn=Xe.trigger)==null?void 0:tn.id)??null;(Xt||Me)&&(en.activeTriggerId=Xt,en.activeTriggerElement=Xe.trigger??null),D.update(en),U.type==="menubar"&&(Ne===Bd||Ne===Vc||Ne===qr||Ne===mg||Ne===gg)?D.set("instantType","group"):ut||Rt?D.set("instantType",ut?"click":"dismiss"):D.set("instantType",void 0)}),Z=C.useCallback(Me=>{const Xe=mt(Me);return Xe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},Xe},[D]),ne=C.useCallback(()=>{D.setOpen(!1,Z(xie))},[D,Z]);C.useImperativeHandle(p,()=>({unmount:ve,close:ne}),[ve,ne]);let xe;U.type==="context-menu"&&(xe=U.context),C.useImperativeHandle(xe==null?void 0:xe.positionerRef,()=>M,[M]),C.useImperativeHandle(xe==null?void 0:xe.actionsRef,()=>({setOpen:X}),[X]);const ge=Dae({popupStore:D,onOpenChange:X});H=ge.context.events,C.useEffect(()=>{const Me=({open:Xe,eventDetails:Ne})=>X(Xe,Ne);return H.on("setOpen",Me),()=>{H==null||H.off("setOpen",Me)}},[H,X]);const Ce=Wse(ge,{enabled:!j,bubbles:{escapeKey:m&&U.type==="menu"},outsidePress(){var Me;return U.type!=="context-menu"||((Me=Y.current)==null?void 0:Me.type)==="contextmenu"?!0:Re.current},externalTree:J?O:void 0}),le=Hae(ge,{role:"menu"}),oe=Uh(),me=C.useCallback(Me=>{D.select("activeIndex")!==Me&&D.set("activeIndex",Me)},[D]),ae=Bae(ge,{enabled:!j,listRef:D.context.itemDomElements,activeIndex:q,nested:U.type!==void 0,loopFocus:f,orientation:h,parentOrientation:U.type==="menubar"?U.context.orientation:void 0,rtl:oe==="rtl",disabledIndices:Uc,onNavigate:me,openOnArrowKeyDown:U.type!=="context-menu",externalTree:J?O:void 0,focusItemOnHover:S}),Oe=C.useCallback(Me=>{D.context.typingRef.current=Me},[D]),Te=Gae(ge,{listRef:D.context.itemLabels,activeIndex:q,resetMs:lie,onMatch:Me=>{L&&Me!==q&&D.set("activeIndex",Me)},onTypingChange:Oe}),{getReferenceProps:_e,getFloatingProps:De,getItemProps:ue,getTriggerProps:Se}=zC([Ce,le,ae,Te]),ke=C.useMemo(()=>{const Me=uh(_e(),{onMouseMove(){D.set("allowMouseEnter",!0)}},re);return delete Me.role,Me},[_e,D,re]),Pe=C.useMemo(()=>{const Me=Se();if(!Me)return Me;const Xe=uh(Me,re);return delete Xe.role,delete Xe["aria-controls"],Xe},[Se,re]),Le=C.useMemo(()=>De({onMouseMove(){D.set("allowMouseEnter",!0),U.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Me){const Xe=D.select("keyboardEventRelay");Xe&&!Me.isPropagationStopped()&&Xe(Me)}}),[De,U.type,D]),st=C.useMemo(()=>ue(),[ue]);D.useSyncedValues({floatingRootContext:ge,activeTriggerProps:ke,inactiveTriggerProps:Pe,popupProps:Le,itemProps:st});const Ut=C.useMemo(()=>({store:D,parent:A}),[D,A]),Ot=E.jsx(uz.Provider,{value:Ut,children:typeof n=="function"?n({payload:W}):n});return U.type===void 0||U.type==="context-menu"?E.jsx(qoe,{externalTree:O,children:Ot}):Ot});function kle(e){const t=us().store,n=C.useMemo(()=>({parentMenu:t}),[t]);return E.jsx(pz.Provider,{value:n,children:E.jsx(gz,{...e})})}function yz(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=TC(),{ref:i,index:o}=Vh(e),a=n===o,u=C.useRef(null),c=rs(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const h=u.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function bz(e){const{render:t,className:n,state:r=Tn,props:i=Uc,refs:o=Uc,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=yz({metadata:a});return dn(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function vz(e){if(Jt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!oo(e))return vz(ao(e))}function Rle(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=C.useRef(!1);return C.useMemo(()=>t?{onMouseDown:o=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Pt(o.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:o=>{i.current&&(i.current=!1,o.preventBaseUIHandler())}}:Tn,[t,n,r])}const Gm=2,_le=dae(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:u,openOnHover:c,delay:f=100,closeDelay:h=0,handle:p,payload:m,...y}=t,b=us(!0),v=(p==null?void 0:p.store)??(b==null?void 0:b.store);if(!v)throw new Error(dr(85));const S=is(u),x=v.useState("isTriggerActive",S),_=v.useState("floatingRootContext"),k=v.useState("isOpenedByTrigger",S),T=C.useRef(null),A=Ale(),D=TC(!0),O=Ia(),$=C.useMemo(()=>O??new PC,[O]),B=$F($),L=ls(),{registerTrigger:N,isMountedByThisTrigger:M}=Sae(S,T,v,{payload:m,closeDelay:h,parent:A,floatingTreeRoot:$,floatingNodeId:B,floatingParentNodeId:L,keyboardEventRelay:D==null?void 0:D.relayKeyboardEvent}),z=A.type==="menubar",G=v.useState("disabled"),j=o||G||z&&A.context.disabled,{getButtonProps:F,buttonRef:U}=mf({disabled:j,native:a});C.useEffect(()=>{!k&&A.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,k,A.type]);const q=C.useRef(null),W=Bi(),I=je(Ce=>{if(!q.current)return;W.clear(),v.context.allowMouseUpTriggerRef.current=!1;const le=Ce.target;if(ht(q.current,le)||ht(v.select("positionerElement"),le)||le===q.current||le!=null&&vz(le)===v.select("rootId"))return;const oe=nle(q.current);Ce.clientX>=oe.left-Gm&&Ce.clientX<=oe.right+Gm&&Ce.clientY>=oe.top-Gm&&Ce.clientY<=oe.bottom+Gm||$.events.emit("close",{domEvent:Ce,reason:vie})});C.useEffect(()=>{k&&v.select("lastOpenChangeReason")===qr&&Pt(q.current).addEventListener("mouseup",I,{once:!0})},[k,I,v]);const Y=z&&A.context.hasSubmenuOpen,H=tz(_,{enabled:(c??Y)&&!j&&A.type!=="context-menu"&&(!z||Y&&!M),handleClose:nz({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:A.type===void 0?f:void 0,delay:{close:h},triggerElementRef:T,externalTree:$,isActiveTrigger:x}),ie=Tle(k,v.select("lastOpenChangeReason")),re=jF(_,{enabled:!j&&A.type!=="context-menu",event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0?ie:!1}),he=Mae(_,{enabled:!j&&Y}),ve=Rle({open:k,enabled:z,mouseDownAction:"open"}),Re=zC([re,he]),ce={disabled:j,open:k},Ie=v.useState("triggerProps",M),We=[q,n,U,N,T],X=[Re.getReferenceProps(),H??Tn,Ie,{"aria-haspopup":"menu",id:S,onMouseDown:Ce=>{if(v.select("open"))return;W.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Pt(Ce.currentTarget).addEventListener("mouseup",I,{once:!0})}},z?{role:"menuitem"}:{},ve,y,F],Z=C.useRef(null),ne=je(Ce=>{yn.flushSync(()=>{v.setOpen(!1,mt(Vc,Ce.nativeEvent,Ce.currentTarget))});const le=xoe(Z.current);le==null||le.focus()}),xe=je(Ce=>{var oe;const le=v.select("positionerElement");if(le&&vc(Ce,le))(oe=v.context.beforeContentFocusGuardRef.current)==null||oe.focus();else{yn.flushSync(()=>{v.setOpen(!1,mt(Vc,Ce.nativeEvent,Ce.currentTarget))});let me=voe(v.context.triggerFocusTargetRef.current||T.current);for(;me!==null&&ht(le,me);){const ae=me;if(me=$C(me),me===ae)break}me==null||me.focus()}}),ge=dn("button",t,{enabled:!z,stateAttributesMapping:n2,state:ce,ref:We,props:X});return z?E.jsx(bz,{tag:"button",render:r,className:i,state:ce,refs:We,props:X,stateAttributesMapping:n2}):k?E.jsxs(C.Fragment,{children:[E.jsx(Qc,{ref:Z,onFocus:ne},`${S}-pre-focus-guard`),E.jsx(C.Fragment,{children:ge},S),E.jsx(Qc,{ref:v.context.triggerFocusTargetRef,onFocus:xe},`${S}-post-focus-guard`)]}):E.jsx(C.Fragment,{children:ge},S)});function Tle(e,t){const n=Bi(),[r,i]=C.useState(!1);return Ve(()=>{e&&t==="trigger-hover"?(i(!0),n.start(uie,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Ale(){const e=rb(!0),t=us(!0),n=hz();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const Dle=C.forwardRef(function(t,n){const{render:r,className:i,label:o,id:a,nativeButton:u=!1,openOnHover:c=!0,delay:f=100,closeDelay:h=0,disabled:p=!1,...m}=t,y=Vh(),b=UC(),{store:v}=us(),S=is(a),x=v.useState("open"),_=v.useState("floatingRootContext"),k=v.useState("floatingTreeRoot"),T=JF(S,v),A=C.useCallback(re=>{const he=T(re);return re!==null&&v.select("open")&&v.select("activeTriggerId")==null&&v.update({activeTriggerId:S,activeTriggerElement:re,closeDelay:h}),he},[T,h,v,S]),D=C.useRef(null),O=C.useCallback(re=>{D.current=re,v.set("activeTriggerElement",re)},[v]),$=mz();if(!($!=null&&$.parentMenu))throw new Error(dr(37));v.useSyncedValue("closeDelay",h);const B=$.parentMenu,L=B.useState("itemProps"),N=B.useState("isActive",y.index),M=C.useMemo(()=>({type:"submenu-trigger",setActive(){B.set("activeIndex",y.index)}}),[B,y.index]),z=v.useState("disabled"),G=p||z,{getItemProps:j,itemRef:F}=cz({closeOnClick:!1,disabled:G,highlighted:N,id:S,store:v,nativeButton:u,itemMetadata:M,nodeId:b==null?void 0:b.nodeId}),U=v.useState("hoverEnabled"),q=B.useState("allowMouseEnter"),W=tz(_,{enabled:U&&c&&!G,handleClose:nz({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:f,delay:q?{open:f,close:h}:0,triggerElementRef:D,externalTree:k}),I=jF(_,{enabled:!G,event:"mousedown",toggle:!c,ignoreMouse:c,stickIfOpen:!1}),Y=zC([I]),J=v.useState("triggerProps",!0);return delete J.id,dn("div",t,{state:{disabled:G,highlighted:N,open:x},stateAttributesMapping:Jae,props:[Y.getReferenceProps(),W,J,L,{tabIndex:x||N?0:-1,onBlur(){N&&B.set("activeIndex",null)}},m,j],ref:[n,y.ref,F,A,O]})}),Mle=C.createContext(void 0),Ole={disableStyleElements:!1};function $le(){return C.useContext(Mle)??Ole}const xz="data-composite-item-active",Ple=[];function Nle(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:o="both",direction:a,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:y=Ple}=e,[b,v]=C.useState(0),S=n>1,x=C.useRef(null),_=rs(x,f),k=C.useRef([]),T=C.useRef(!1),A=u??b,D=je((B,L=!1)=>{if((c??v)(B),L){const N=k.current[B];PM(x.current,N,a,o)}}),O=je(B=>{if(B.size===0||T.current)return;T.current=!0;const L=Array.from(B.keys()),N=L.find(z=>z==null?void 0:z.hasAttribute(xz))??null,M=N?L.indexOf(N):-1;M!==-1&&D(M),PM(x.current,N,a,o)}),$=C.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:_,onFocus(B){!x.current||!$M(B.target)||B.target.setSelectionRange(0,B.target.value.length??0)},onKeyDown(B){const L=h?Eoe:TF;if(!L.has(B.key)||Ile(B,y)||!x.current)return;const M=a==="rtl",z=M?Vl:xa,G={horizontal:z,vertical:Yo,both:z}[o],j=M?xa:Vl,F={horizontal:j,vertical:va,both:j}[o];if($M(B.target)&&!Sw(B.target)){const H=B.target.selectionStart,ie=B.target.selectionEnd,re=B.target.value??"";if(H==null||B.shiftKey||H!==ie||B.key!==F&&H<re.length||B.key!==G&&H>0)return}let U=A;const q=yg(k,m),W=Dw(k,m);if(S){const H=t||Array.from({length:k.current.length},()=>({width:1,height:1})),ie=hF(H,n,i),re=ie.findIndex(ve=>ve!=null&&!ba(k,ve,m)),he=ie.reduce((ve,Re,ce)=>Re!=null&&!ba(k,Re,m)?ce:ve,-1);U=ie[dF({current:ie.map(ve=>ve?k.current[ve]:null)},{event:B,orientation:o,loopFocus:r,cols:n,disabledIndices:mF([...m||k.current.map((ve,Re)=>ba(k,Re)?Re:void 0),void 0],ie),minIndex:re,maxIndex:he,prevIndex:pF(A>W?q:A,H,ie,n,B.key===Yo?"bl":B.key===xa?"tr":"tl"),rtl:M})]}const I={horizontal:[z],vertical:[Yo],both:[z,Yo]}[o],Y={horizontal:[j],vertical:[va],both:[j,va]}[o],J=S?L:{horizontal:h?Soe:RF,vertical:h?Coe:_F,both:L}[o];h&&(B.key===bf?U=q:B.key===vf&&(U=W)),U===A&&(I.includes(B.key)||Y.includes(B.key))&&(r&&U===W&&I.includes(B.key)?U=q:r&&U===q&&Y.includes(B.key)?U=W:U=Hn(k,{startingIndex:U,decrement:Y.includes(B.key),disabledIndices:m})),U!==A&&!bc(k,U)&&(p&&B.stopPropagation(),J.has(B.key)&&B.preventDefault(),D(U,!0),queueMicrotask(()=>{var H;(H=k.current[U])==null||H.focus()}))}}),[n,i,a,m,k,h,A,S,t,r,_,y,D,o,p]);return C.useMemo(()=>({props:$,highlightedIndex:A,onHighlightedIndexChange:D,elementsRef:k,disabledIndices:m,onMapChange:O,relayKeyboardEvent:$.onKeyDown}),[$,A,D,k,m,O])}function Ile(e,t){for(const n of Doe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function wz(e){const{render:t,className:n,refs:r=Uc,props:i=Uc,state:o=Tn,stateAttributesMapping:a,highlightedIndex:u,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:m,cols:y,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:S=!0,rootRef:x,disabledIndices:_,modifierKeys:k,highlightItemOnHover:T=!1,tag:A="div",...D}=e,O=Uh(),{props:$,highlightedIndex:B,onHighlightedIndexChange:L,elementsRef:N,onMapChange:M,relayKeyboardEvent:z}=Nle({itemSizes:p,cols:y,loopFocus:m,dense:h,orientation:f,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:x,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:O,disabledIndices:_,modifierKeys:k}),G=dn(A,e,{state:o,ref:r,props:[$,...i,D],stateAttributesMapping:a}),j=C.useMemo(()=>({highlightedIndex:B,onHighlightedIndexChange:L,highlightItemOnHover:T,relayKeyboardEvent:z}),[B,L,T,z]);return E.jsx(Zj.Provider,{value:j,children:E.jsx(Yy,{elementsRef:N,onMapChange:F=>{v==null||v(F),M(F)},children:G})})}function s2(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return(Wc(n)!==o||Wc(r)!==a)&&(n=o,r=a),{width:n,height:r}}const Sz=C.createContext(void 0);function ch(){const e=C.useContext(Sz);if(e===void 0)throw new Error(dr(64));return e}let Lle=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const ib={tabActivationDirection:e=>({[Lle.activationDirection]:e})},jle=C.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:u,value:c,...f}=t,h=Uh(),p=Object.hasOwn(t,"defaultValue"),m=C.useRef([]),[y,b]=C.useState(()=>new Map),[v,S]=Bh({controlled:c,default:i,name:"Tabs",state:"value"}),x=c!==void 0,[_,k]=C.useState(()=>new Map),[T,A]=C.useState("none"),D=je((U,q)=>{o==null||o(U,q),!q.isCanceled&&(S(U),A(q.activationDirection))}),O=je((U,q)=>{b(W=>{if(W.get(U)===q)return W;const I=new Map(W);return I.set(U,q),I})}),$=je((U,q)=>{b(W=>{if(!W.has(U)||W.get(U)!==q)return W;const I=new Map(W);return I.delete(U),I})}),B=C.useCallback(U=>y.get(U),[y]),L=C.useCallback(U=>{for(const q of _.values())if(U===(q==null?void 0:q.value))return q==null?void 0:q.id},[_]),N=C.useCallback(U=>{if(U===void 0)return null;for(const[q,W]of _.entries())if(W!=null&&U===(W.value??W.index))return q;return null},[_]),M=C.useMemo(()=>({direction:h,getTabElementBySelectedValue:N,getTabIdByPanelValue:L,getTabPanelIdByValue:B,onValueChange:D,orientation:a,registerMountedTabPanel:O,setTabMap:k,unregisterMountedTabPanel:$,tabActivationDirection:T,value:v}),[h,N,L,B,D,a,O,k,$,T,v]),z=C.useMemo(()=>{for(const U of _.values())if(U!=null&&U.value===v)return U},[_,v]),G=C.useMemo(()=>{for(const U of _.values())if(U!=null&&!U.disabled)return U.value},[_]);Ve(()=>{if(x||_.size===0)return;const U=z==null?void 0:z.disabled,q=z==null&&v!==null;if(p&&U&&v===i||!U&&!q)return;const I=G??null;v!==I&&(S(I),A("none"))},[i,G,p,x,z,A,S,_,v]);const F=dn("div",t,{state:{orientation:a,tabActivationDirection:T},ref:n,props:f,stateAttributesMapping:ib});return E.jsx(Sz.Provider,{value:M,children:E.jsx(Yy,{elementsRef:m,children:F})})}),Cz=C.createContext(void 0);function Ez(){const e=C.useContext(Cz);if(e===void 0)throw new Error(dr(65));return e}const Fle=C.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:a,id:u,nativeButton:c=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:m}=ch(),{activateOnFocus:y,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:S,tabsListElement:x}=Ez(),_=is(u),k=C.useMemo(()=>({disabled:i,id:_,value:a}),[i,_,a]),{compositeProps:T,compositeRef:A,index:D}=yz({metadata:k}),O=a===h,$=C.useRef(!1);Ve(()=>{if($.current){$.current=!1;return}if(!(O&&D>-1&&b!==D))return;const W=x;if(W!=null){const I=mi(Pt(W));if(I&&ht(W,I))return}i||S(D)},[O,D,b,S,i,x]);const{getButtonProps:B,buttonRef:L}=mf({disabled:i,native:c,focusableWhenDisabled:!0}),N=p(a),M=C.useRef(!1),z=C.useRef(!1);function G(W){O||i||v(a,mt(Hc,W.nativeEvent,void 0,{activationDirection:"none"}))}function j(W){O||(D>-1&&!i&&S(D),!i&&y&&(!M.current||M.current&&z.current)&&v(a,mt(Hc,W.nativeEvent,void 0,{activationDirection:"none"})))}function F(W){if(O||i)return;M.current=!0;function I(){M.current=!1,z.current=!1}(!W.button||W.button===0)&&(z.current=!0,Pt(W.currentTarget).addEventListener("pointerup",I,{once:!0}))}return dn("button",t,{state:{disabled:i,active:O,orientation:m},ref:[n,L,A],props:[T,{role:"tab","aria-controls":N,"aria-selected":O,id:_,onClick:G,onFocus:j,onPointerDown:F,[xz]:O?"":void 0,onKeyDownCapture(){$.current=!0}},f,B]})}),zle='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Xu=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Ble={...ib,activeTabPosition:()=>null,activeTabSize:()=>null},Ule=C.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:u}=$le(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=ch(),{tabsListElement:m}=Ez(),[y,b]=C.useState(!1),{value:v}=ch();Hh(()=>b(!0));const S=xae();C.useEffect(()=>{if(p!=null&&m!=null&&typeof ResizeObserver<"u"){const G=new ResizeObserver(S);return G.observe(m),()=>{G.disconnect()}}},[p,m,S]);let x=0,_=0,k=0,T=0,A=0,D=0,O=!1;if(p!=null&&m!=null){const G=c(p);if(O=!0,G!=null){const{width:j,height:F}=s2(G),{width:U,height:q}=s2(m),W=G.getBoundingClientRect(),I=m.getBoundingClientRect(),Y=U>0?I.width/U:1,J=q>0?I.height/q:1;if(Math.abs(Y)>Number.EPSILON&&Math.abs(J)>Number.EPSILON){const ie=W.left-I.left,re=W.top-I.top;x=ie/Y+m.scrollLeft-m.clientLeft,k=re/J+m.scrollTop-m.clientTop}else x=G.offsetLeft,k=G.offsetTop;A=j,D=F,_=m.scrollWidth-x-A,T=m.scrollHeight-k-D}}const $=C.useMemo(()=>O?{left:x,right:_,top:k,bottom:T}:null,[x,_,k,T,O]),B=C.useMemo(()=>O?{width:A,height:D}:null,[A,D,O]),L=C.useMemo(()=>{if(O)return{[Xu.activeTabLeft]:`${x}px`,[Xu.activeTabRight]:`${_}px`,[Xu.activeTabTop]:`${k}px`,[Xu.activeTabBottom]:`${T}px`,[Xu.activeTabWidth]:`${A}px`,[Xu.activeTabHeight]:`${D}px`}},[x,_,k,T,A,D,O]),N=O&&A>0&&D>0,z=dn("span",t,{state:{orientation:f,activeTabPosition:$,activeTabSize:B,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:L,hidden:!N},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Ble});return v==null?null:E.jsxs(C.Fragment,{children:[z,!y&&o&&E.jsx("script",{nonce:u,dangerouslySetInnerHTML:{__html:zle},suppressHydrationWarning:!0})]})});let Hle=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Gle={...ib,...Gh},Vle=C.forwardRef(function(t,n){const{className:r,value:i,render:o,keepMounted:a=!1,...u}=t,{value:c,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:m,unregisterMountedTabPanel:y}=ch(),b=is(),v=C.useMemo(()=>({id:b,value:i}),[b,i]),{ref:S,index:x}=Vh({metadata:v}),_=i===c,{mounted:k,transitionStatus:T,setMounted:A}=SC(_),D=!k,O=f(i),$={hidden:D,orientation:h,tabActivationDirection:p,transitionStatus:T},B=C.useRef(null),L=dn("div",t,{state:$,ref:[n,S,B],props:[{"aria-labelledby":O,hidden:D,id:b,role:"tabpanel",tabIndex:_?0:-1,inert:iz(!_),[Hle.index]:x},u],stateAttributesMapping:Gle});return Wh({open:_,ref:B,onComplete(){_||A(!1)}}),Ve(()=>{if(!(D&&!a)&&b!=null)return m(i,b),()=>{y(i,b)}},[D,a,i,b,m,y]),a||k?L:null}),qle=C.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:a,...u}=t,{getTabElementBySelectedValue:c,onValueChange:f,orientation:h,value:p,setTabMap:m,tabActivationDirection:y}=ch(),[b,v]=C.useState(0),[S,x]=C.useState(null),_=Yle(p,h,S,c),k=je((O,$)=>{if(O!==p){const B=_(O);$.activationDirection=B,f(O,$)}}),T={orientation:h,tabActivationDirection:y},A={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},D=C.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,onTabActivation:k,setHighlightedTabIndex:v,tabsListElement:S,value:p}),[r,b,k,v,S,p]);return E.jsx(Cz.Provider,{value:D,children:E.jsx(wz,{render:a,className:i,state:T,refs:[n,x],props:[A,u],stateAttributesMapping:ib,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:Uc})})});function a2(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:o}=t.getBoundingClientRect(),a=n-i,u=r-o;return{left:a,top:u}}function Yle(e,t,n,r){const[i,o]=C.useState(null);return Ve(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:u,top:c}=a2(a,n);o(t==="horizontal"?u:c)},[t,r,n,e]),C.useCallback(a=>{if(a===e)return"none";if(a==null)return o(null),"none";if(a!=null&&n!=null){const u=r(a);if(u!=null){const{left:c,top:f}=a2(u,n);if(i==null)return o(t==="horizontal"?c:f),"none";if(t==="horizontal"){if(c<i)return o(c),"left";if(c>i)return o(c),"right"}else{if(f<i)return o(f),"up";if(f>i)return o(f),"down"}}}return"none"},[r,t,i,n,e])}const kz=C.createContext(void 0);function Wle(e=!0){const t=C.useContext(kz);if(t===void 0&&!e)throw new Error(dr(7));return t}const Sc=C.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:o=!1,form:a,onPressedChange:u,pressed:c,render:f,type:h,value:p,nativeButton:m=!0,...y}=t,b=is(p||void 0),v=Wle(),S=(v==null?void 0:v.value)??[],x=v?void 0:i,_=(o||(v==null?void 0:v.disabled))??!1,[k,T]=Bh({controlled:v?b!==void 0&&S.indexOf(b)>-1:c,default:x,name:"Toggle",state:"pressed"}),A=je((M,z)=>{var G;b&&((G=v==null?void 0:v.setGroupValue)==null||G.call(v,b,M,z)),u==null||u(M,z)}),{getButtonProps:D,buttonRef:O}=mf({disabled:_,native:m}),$={disabled:_,pressed:k},B=[O,n],L=[{"aria-pressed":k,onClick(M){const z=!k,G=mt(Hc,M.nativeEvent);A(z,G),!G.isCanceled&&T(z)}},y,D],N=dn("button",t,{enabled:!v,state:$,ref:B,props:L});return v?E.jsx(bz,{tag:"button",render:f,className:r,state:$,refs:B,props:L}):N});let Kle=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const l2={multiple(e){return e?{[Kle.multiple]:""}:null}},Xle=C.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:o=!0,onValueChange:a,orientation:u="horizontal",multiple:c=!1,value:f,className:h,render:p,...m}=t,y=fz(),b=C.useMemo(()=>{if(f===void 0)return r??[]},[f,r]),v=C.useMemo(()=>f!==void 0||r!==void 0,[f,r]),S=((y==null?void 0:y.disabled)??!1)||i,[x,_]=Bh({controlled:f,default:b,name:"ToggleGroup",state:"value"}),k=je(($,B,L)=>{let N;if(c?(N=x.slice(),B?N.push($):N.splice(x.indexOf($),1)):N=B?[$]:[],Array.isArray(N)){if(a==null||a(N,L),L.isCanceled)return;_(N)}}),T={disabled:S,multiple:c,orientation:u},A=C.useMemo(()=>({disabled:S,orientation:u,setGroupValue:k,value:x,isValueInitialized:v}),[S,u,k,x,v]),D={role:"group"},O=dn("div",t,{enabled:!!y,state:T,ref:n,props:[D,m],stateAttributesMapping:l2});return E.jsx(kz.Provider,{value:A,children:y?O:E.jsx(wz,{render:p,className:h,state:T,refs:[n],props:[D,m],stateAttributesMapping:l2,loopFocus:o,enableHomeAndEndKeys:!0})})}),Rz=({className:e,children:t,...n})=>E.jsx(Fe,{"data-slot":"list-text-label",className:ze(Ho["list-text-label"],e),size:0,...n,children:t});Rz.displayName="ListLabel";const _z=({className:e,children:t,...n})=>E.jsx(Fe,{"data-slot":"list-text-description",className:ze(Ho["list-text-description"],e),size:0,...n,children:t});_z.displayName="ListDescription";const Tz=({label:e,description:t,...n})=>E.jsxs(er,{condition:!!t,render:E.jsx(Ye,{"data-slot":"list-text-block",gap:2,...n}),children:[E.jsx(Rz,{children:e}),t&&E.jsx(_z,{children:t})]});Tz.displayName="ListTextBlock";const Az=()=>E.jsx(kh,{size:Ire,strokeWidth:4,stroke:"var(--shade-foreground)",style:{marginInlineStart:"auto"}});Az.displayName="ListSelectedIcon";const GC=({disabled:e,selected:t,render:n,className:r,icon:i,label:o,description:a,content:u,action:c,...f})=>E.jsx(Ze,{"data-slot":"list-item",render:n??E.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:ze(Ho["list-item"],r),tabIndex:e?-1:0,"data-disabled":e?"":void 0,"data-selected":t?"":void 0,...f,children:E.jsxs(er,{condition:!!(i||t),render:E.jsx(Ze,{gap:3,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[i&&E.jsx(i,{"data-slot":"list-item-icon",size:Lj,style:{color:"var(--shade-foreground)"}}),E.jsxs(er,{condition:!!u,render:E.jsx(Ye,{fullwidth:!0,gap:1}),children:[E.jsxs(er,{condition:!!t||!!c,render:E.jsx(Ze,{fullwidth:!0,ay:"center",gap:2,ax:"space-between"}),children:[E.jsx(Tz,{"data-slot":"list-item-text",label:o,description:a}),t&&E.jsx(Az,{}),c]}),u]})]})});GC.displayName="ListItem";const VC=({category:e,collapsible:t,open:n,defaultOpen:r=!0,onOpenChange:i,icon:o,items:a})=>E.jsxs(Ye,{"data-slot":"list-item-group",ax:"stretch",fullwidth:!0,className:Ho["list-item-group"],render:t?E.jsx(lle,{render:E.jsx("li",{}),open:n,defaultOpen:r,onOpenChange:i}):E.jsx("li",{}),children:[e&&E.jsxs(Ze,{"data-slot":"list-item-group-collapsible-trigger",render:t?E.jsx(cle,{}):E.jsx("div",{}),className:Ho["list-item-group-collapsible-trigger"],ay:"center",ax:"start",gap:2,py:2,fullwidth:!0,children:[t&&E.jsx(_y,{size:14,strokeWidth:3}),o&&E.jsx(o,{"data-slot":"list-item-group-icon",size:Lj}),E.jsx(Fe,{"data-slot":"list-item-group-category-text",render:E.jsx("h3",{}),className:Ho["list-item-group-category"],mr:t?8:void 0,weight:"bold",size:0,"data-is-collapsible":t,children:e})]}),E.jsx(nf,{condition:!!t,render:{true:E.jsx(fle,{render:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})}),false:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})},children:a.map(u=>"items"in u?E.jsx(VC,{...u},u.id??u.category):E.jsx(GC,{...u},u.value))})]});VC.displayName="ListItemGroup";const Zc=({type:e=jre,direction:t=Fre,size:n=Lre,line:r,items:i,children:o,ItemProps:a,...u})=>{const c=e==="ordered"?E.jsx("ol",{}):E.jsx("ul",{}),f={"data-slot":"list","data-type":e,"data-size":n,"data-direction":t,"data-line":r?"true":void 0,className:Ho.list,...u};return E.jsx(nf,{condition:t==="row",p:0,m:0,...f,render:{true:E.jsx(Ze,{render:c,ay:"start",gap:4}),false:E.jsx(Ye,{render:c,ax:"stretch"})},children:i?i.map((h,p)=>"items"in h?E.jsx(VC,{"data-line":!0,...h},h.id??`${h.category??"group"}-${p}`):E.jsx(GC,{fullwidth:t==="column",...h,...a},h.value)):o})};Zc.displayName="List";const Qle=C.createContext(void 0);function Zle(e=!1){const t=C.useContext(Qle);if(t===void 0&&!e)throw new Error(hf(16));return t}function Jle(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function eue(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=Zle(!0)!==void 0,u=lr(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=Jle({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;tue(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);qn(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return Bc({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(bw(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(bw(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=lr(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function tue(e){return wj(e)&&e.tagName==="BUTTON"}const nue="_checkbox_1x4sv_3",Go={checkbox:nue,"checkbox-label":"_checkbox-label_1x4sv_51","checkbox-indicator":"_checkbox-indicator_1x4sv_56","size-small":"_size-small_1x4sv_65","checkbox-icon":"_checkbox-icon_1x4sv_68","size-medium":"_size-medium_1x4sv_73","size-large":"_size-large_1x4sv_81","toggle-bordered":"_toggle-bordered_1x4sv_90","toggle-reversed":"_toggle-reversed_1x4sv_107"},Dz=Dn({variants:{bordered:{true:Go["toggle-bordered"]},reversed:{true:Go["toggle-reversed"]},size:{small:Go["size-small"],medium:Go["size-medium"],large:Go["size-large"]}}}),Mz=({name:e,label:t,description:n,reversed:r,bordered:i,LabelProps:o,DescriptionProps:a,ErrorProps:u,className:c,children:f,...h})=>{const p=!!t,m=p&&!!n;return E.jsxs(er,{condition:p,render:E.jsx(Ze,{render:E.jsx("label",{}),className:ze(Go["checkbox-label"],Dz({reversed:r,bordered:i}),c),ay:m?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&E.jsx(mC,{name:e,children:E.jsxs(er,{condition:m,render:E.jsx(Ye,{gap:3}),children:[t&&E.jsx(gC,{weight:"normal",...o,children:t}),n&&E.jsx(yC,{...a,children:n}),E.jsx(ny,{...u})]})})]})};Mz.displayName="CheckboxField";const rue="small";let u2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",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 Oz(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[u2.checked]:""}:{[u2.unchecked]:""}},...ru}),[e.indeterminate])}const iue=C.createContext({disabled:!1});function oue(){return C.useContext(iue)}const sue=C.createContext(void 0);function aue(e=!0){const t=C.useContext(sue);if(t===void 0&&!e)throw new Error(hf(3));return t}const $z=C.createContext(void 0);function lue(){const e=C.useContext($z);if(e===void 0)throw new Error(hf(14));return e}const uue="data-parent",cue=C.forwardRef(function(e,t){const{checked:n,className:r,defaultChecked:i=!1,disabled:o=!1,id:a,indeterminate:u=!1,inputRef:c,name:f,onCheckedChange:h,parent:p=!1,readOnly:m=!1,render:y,required:b=!1,uncheckedValue:v,value:S,nativeButton:x=!1,..._}=e,{clearErrors:k}=zh(),{disabled:T,name:A,setDirty:D,setFilled:O,setFocused:$,setTouched:B,state:L,validationMode:N,validityData:M,shouldValidateOnChange:z,validation:G}=pf(),j=oue(),{labelId:F,controlId:U,registerControlId:q,getDescriptionProps:W}=Oa(),I=aue(),Y=I==null?void 0:I.parent,J=Y&&I.allValues,H=T||j.disabled||(I==null?void 0:I.disabled)||o,ie=A??f,re=S??ie,he=Hl(),ve=Hl();let Re=U;J?Re=p?ve:`${Y.id}-${re}`:a&&(Re=a);let ce={};J&&(p?ce=I.parent.getParentProps():re&&(ce=I.parent.getChildProps(re)));const Ie=lr(h),{checked:We=n,indeterminate:X=u,onCheckedChange:Z,...ne}=ce,xe=I==null?void 0:I.value,ge=I==null?void 0:I.setValue,Ce=I==null?void 0:I.defaultValue,le=C.useRef(null),oe=Ma(()=>Symbol("checkbox-control")),me=C.useRef(!1),{getButtonProps:ae,buttonRef:Oe}=eue({disabled:H,native:x}),Te=(I==null?void 0:I.validation)??G,[_e,De]=lj({controlled:re&&xe&&!p?xe.includes(re):We,default:re&&Ce&&!p?Ce.includes(re):i,name:"Checkbox",state:"checked"});qn(()=>{q!==Er&&(me.current=!0,q(oe.current,Re))},[Re,I,q,p,oe]),C.useEffect(()=>{const Me=oe.current;return()=>{!me.current||q===Er||(me.current=!1,q(Me,void 0))}},[q,oe]),bj({enabled:!I,id:he,commit:Te.commit,value:_e,controlRef:le,name:ie,getValue:()=>_e});const ue=C.useRef(null),Se=pw(c,ue,Te.inputRef);qn(()=>{ue.current&&(ue.current.indeterminate=X,_e&&O(!0))},[_e,X,O]),rre(_e,()=>{I&&!p||(k(ie),O(_e),D(_e!==M.initialValue),z()?Te.commit(_e):Te.commit(_e,!0))});const ke=Bc({checked:_e,disabled:H,name:p?void 0:ie,id:x?void 0:Re??void 0,required:b,ref:Se,style:ie?Hne:Une,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Me){if(Me.nativeEvent.defaultPrevented)return;const Xe=Me.target.checked,Ne=dj(kj,Me.nativeEvent);if(Z==null||Z(Xe,Ne),Ie(Xe,Ne),!Ne.isCanceled&&(De(Xe),re&&xe&&ge&&!p)){const Tt=Xe?[...xe,re]:xe.filter(ft=>ft!==re);ge(Tt,Ne)}},onFocus(){var Me;(Me=le.current)==null||Me.focus()}},S!==void 0?{value:(I?_e&&S:S)||""}:Pi,W,I?Te.getValidationProps:Te.getInputValidationProps),Pe=J?!!We:_e,Le=J&&X||u;C.useEffect(()=>{if(!Y||!re)return;const Me=Y.disabledStatesRef.current;return Me.set(re,H),()=>{Me.delete(re)}},[Y,H,re]);const st=C.useMemo(()=>({...L,checked:Pe,disabled:H,readOnly:m,required:b,indeterminate:Le}),[L,Pe,H,m,b,Le]),Ut=Oz(st),Ot=iu("span",e,{state:st,ref:[Oe,le,t,I==null?void 0:I.registerControlRef],props:[{id:x?Re??void 0:he,role:"checkbox","aria-checked":X?"mixed":_e,"aria-readonly":m||void 0,"aria-required":b||void 0,"aria-labelledby":F,[uue]:p?"":void 0,onFocus(){$(!0)},onBlur(){const Me=ue.current;Me&&(B(!0),$(!1),N==="onBlur"&&Te.commit(I?xe:Me.checked))},onClick(Me){var Xe;m||H||(Me.preventDefault(),(Xe=ue.current)==null||Xe.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Me.shiftKey,ctrlKey:Me.ctrlKey,altKey:Me.altKey,metaKey:Me.metaKey})))}},W,Te.getValidationProps,_,ne,ae],stateAttributesMapping:Ut});return E.jsxs($z.Provider,{value:st,children:[Ot,!_e&&!I&&ie&&!p&&v!==void 0&&E.jsx("input",{type:"hidden",name:ie,value:v}),E.jsx("input",{...ke})]})}),Pz=({size:e=rue,hideIndicator:t,className:n,...r})=>E.jsx(cue,{"data-slot":"checkbox","aria-label":"checkbox",className:ze(Go.checkbox,Dz({size:e}),n,{"sr-only":t}),...r});Pz.displayName="CheckboxRoot";const fue=C.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=lue(),u=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=Cj(u),p=C.useRef(null),m={...a,transitionStatus:f};gj({open:u,ref:p,onComplete(){u||h(!1)}});const y=Oz(a),b=C.useMemo(()=>({...y,...mj,...ru}),[y]),v=i||c,S=iu("span",e,{ref:[t,p],state:m,stateAttributesMapping:b,props:o});return v?S:null}),Nz=({indeterminate:e,className:t,...n})=>E.jsx(fue,{"data-slot":"checkbox-indicator",className:ze(Go["checkbox-indicator"],t),...n,children:E.jsx(nf,{condition:!!e,className:Go["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:E.jsx(GG,{strokeWidth:3}),false:E.jsx(kh,{strokeWidth:3})}})});Nz.displayName="CheckboxIndicator";const Iz=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:u,IndicatorProps:c,...f})=>E.jsx(Mz,{name:e,label:t,description:n,reversed:r,bordered:i,...u,children:E.jsx(Pz,{name:e,hideIndicator:a,...f,children:E.jsx(Nz,{indeterminate:o,...c})})});Iz.displayName="Checkbox";const Ci={"accordion-root":"_accordion-root_w24fh_3","accordion-item":"_accordion-item_w24fh_8","accordion-trigger":"_accordion-trigger_w24fh_20","accordion-panel":"_accordion-panel_w24fh_49","accordion-content":"_accordion-content_w24fh_61","toggle-ghost":"_toggle-ghost_w24fh_73","size-small":"_size-small_w24fh_80","size-medium":"_size-medium_w24fh_89","size-large":"_size-large_w24fh_98","panel-size-small":"_panel-size-small_w24fh_109","panel-size-medium":"_panel-size-medium_w24fh_115","panel-size-large":"_panel-size-large_w24fh_121"},Lz="medium",due=Dn({variants:{size:{small:Ci["size-small"],medium:Ci["size-medium"],large:Ci["size-large"]}},defaultVariants:{size:Lz}}),hue=Dn({variants:{size:{small:Ci["panel-size-small"],medium:Ci["panel-size-medium"],large:Ci["panel-size-large"]}},defaultVariants:{size:Lz}}),pue=Dn({variants:{ghost:{true:Ci["toggle-ghost"]}}}),jz=({children:e,className:t,ghost:n,...r})=>E.jsx(Sie,{"data-slot":"accordion-root","data-ghost":n||void 0,render:E.jsx(zt,{gap:0,trimmed:!0,fullwidth:!0,ghost:n}),className:ze(Ci["accordion-root"],pue({ghost:n}),t),...r,children:e});jz.displayName="AccordionRoot";const Fz=({children:e,className:t,...n})=>E.jsx(Pie,{"data-slot":"accordion-item",className:ze(Ci["accordion-item"],t),render:E.jsx(Ye,{ax:"stretch",fullwidth:!0}),...n,children:e});Fz.displayName="AccordionItem";const zz=({children:e,className:t,...n})=>E.jsx(Nie,{"data-slot":"accordion-header",className:ze(t),...n,children:e});zz.displayName="AccordionHeader";const Bz=({icon:e,size:t,className:n,children:r,...i})=>{const o=e;return E.jsxs(Poe,{"data-slot":"accordion-trigger",className:ze(Ci["accordion-trigger"],due({size:t}),n),...i,children:[E.jsxs(er,{condition:!!e,render:E.jsx(Ze,{ay:"center",gap:1}),children:[o&&E.jsx(o,{}),E.jsx(Fe,{shade:"muted",size:0,weight:"bold",children:r})]}),E.jsx(_y,{})]})};Bz.displayName="AccordionTrigger";const Uz=({children:e,size:t,className:n,...r})=>E.jsx(Ioe,{"data-slot":"accordion-panel",className:ze(Ci["accordion-panel"],hue({size:t}),n),...r,children:e});Uz.displayName="AccordionPanel";const Hz=({children:e,...t})=>E.jsx(Ye,{"data-slot":"accordion-content",className:Ci["accordion-content"],...t,children:e});Hz.displayName="AccordionContent";const qC=({items:e,defaultValue:t,value:n,onValueChange:r,disabled:i,orientation:o,multiple:a,fullwidth:u,ghost:c,size:f,RootProps:h,ItemProps:p,HeaderProps:m,TriggerProps:y,PanelProps:b,ContentProps:v})=>E.jsx(jz,{fullwidth:u,ghost:c,defaultValue:t,value:n,onValueChange:r,disabled:i,orientation:o,multiple:a,...h,children:e.map(S=>E.jsxs(Fz,{value:S.value,disabled:S.disabled,...p,children:[E.jsx(zz,{...m,children:E.jsx(Bz,{icon:S.icon,size:f,...y,children:S.trigger})}),E.jsx(Uz,{size:f,...b,children:E.jsx(Hz,{...v,children:S.content})})]},S.value))});qC.displayName="Accordion";const YC=({children:e,...t})=>E.jsx(gz,{...t,children:e});YC.displayName="MenuRoot";const WC=({children:e,...t})=>{const n=C.isValidElement(e),r=!!t.render;return E.jsx(_le,{"data-slot":"menu-trigger",...!r&&{render:E.jsx("div",{tabIndex:n?-1:0}),nativeButton:!1},...t,children:e})};WC.displayName="MenuTrigger";const hy=({children:e,...t})=>E.jsx(xle,{"data-slot":"menu-portal",...t,children:e});hy.displayName="MenuPortal";const mue="_positioner_12j95_1",gue="_popup_12j95_5",yue="_item_12j95_23",ob={positioner:mue,popup:gue,item:yue,"submenu-trigger":"_submenu-trigger_12j95_24"},py=({className:e,children:t,...n})=>E.jsx(wle,{"data-slot":"menu-positioner",className:ze(ob.positioner,e),sideOffset:4,collisionPadding:16,...n,children:t});py.displayName="MenuPositioner";const my=({className:e,children:t,...n})=>E.jsx(ble,{"data-slot":"menu-popup",className:ze(ob.popup,e),...n,children:t});my.displayName="MenuPopup";const Gz=({children:e,...t})=>E.jsx(kle,{"data-slot":"submenu-root",...t,children:e});Gz.displayName="SubmenuRoot";const Vz=({className:e,children:t,...n})=>E.jsx(Dle,{"data-slot":"submenu-trigger",render:E.jsx(Ze,{gap:4,ay:"center",ax:"space-between"}),className:ze(ob["submenu-trigger"],e),...n,children:t});Vz.displayName="SubmenuTrigger";const fh=({className:e,children:t,...n})=>E.jsx(mle,{"data-slot":"menu-item",className:ze(ob.item,e),...n,children:t});fh.displayName="MenuItem";const qz=({items:e,trigger:t,align:n,side:r,RootProps:i,TriggerProps:o,PopupProps:a,PositionerProps:u,ItemProps:c,SubmenuRootProps:f,SubmenuTriggerProps:h})=>E.jsxs(YC,{...i,children:[E.jsx(WC,{...o,children:t}),E.jsx(hy,{children:E.jsx(py,{side:r,align:n,...u,children:E.jsx(my,{...a,children:e.map(p=>{const m=p.items;return m?E.jsxs(Gz,{...f,children:[E.jsxs(Vz,{...h,children:[p.label,E.jsx(Z$,{size:12})]}),E.jsx(hy,{children:E.jsx(py,{children:E.jsx(my,{children:m.map(y=>E.jsx(fh,{children:y.label},y.value))})})})]},p.value):E.jsx(fh,{...c,children:p.label},p.value)})})})})]});qz.displayName="Menu";const Yz=({children:e,...t})=>E.jsx(jle,{"data-slot":"tabs-root",render:E.jsx(Ye,{}),...t,children:e});Yz.displayName="TabsRoot";const bue="_tab_4eh43_3",sb={"tabs-list":"_tabs-list_4eh43_3",tab:bue,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},Wz=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>E.jsx(qle,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:E.jsx(Ze,{gap:4,ay:"center",fullwidth:n}),className:ze(sb["tabs-list"],r),...o,children:i});Wz.displayName="TabsList";const Kz=({className:e,children:t,...n})=>E.jsx(Fle,{"data-slot":"tabs-tab",className:ze(sb.tab,e),...n,children:t});Kz.displayName="TabsTab";const Xz=({className:e,...t})=>E.jsx(Ule,{"data-slot":"tabs-indicator",className:ze(sb["tabs-indicator"],e),...t});Xz.displayName="TabsIndicator";const Qz=({className:e,children:t,...n})=>E.jsx(Vle,{"data-slot":"tabs-panel",render:E.jsx(Ye,{ay:"center",ax:"center",fullwidth:!0}),className:ze(sb["tabs-panel"],e),tabIndex:-1,...n,children:t});Qz.displayName="TabsPanel";const KC=({items:e,defaultValue:t,value:n,onValueChange:r,keepMounted:i,size:o,ghost:a,fullwidth:u,RootProps:c,ListProps:f,TabProps:h,IndicatorProps:p,PanelProps:m,ContainerProps:y})=>E.jsxs(Yz,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[E.jsxs(Wz,{size:o,ghost:a,fullwidth:u,...f,children:[e.map(b=>E.jsx(Kz,{value:b.value,...h,children:b.label},b.value)),E.jsx(Xz,{...p})]}),E.jsx(pS,{"data-slot":"tabs-container",...y,children:e.map(b=>E.jsx(Qz,{value:b.value,keepMounted:i,...m,children:b.render},b.value))})]});KC.displayName="Tabs";const vue=(e,t,n)=>{const r=C.useRef(null),i=C.useRef(new Map),o=C.useCallback(()=>{const a=(e??t)[0],u=a?i.current.get(String(a)):null,c=r.current;if(u&&c){const f=n==="vertical",h=u.getBoundingClientRect(),p=c.getBoundingClientRect();f?(c.style.setProperty("--active-toggle-top",`${h.top-p.top-1}px`),c.style.setProperty("--active-toggle-height",`${h.height}px`)):(c.style.setProperty("--active-toggle-left",`${h.left-p.left-1}px`),c.style.setProperty("--active-toggle-width",`${h.width}px`))}},[e,t,n]);return C.useEffect(()=>{o();const a=r.current,u=(e??t)[0],c=u?i.current.get(String(u)):null;if(!a)return;const f=new ResizeObserver(()=>{o()});return f.observe(a),c&&f.observe(c),()=>{f.disconnect()}},[e,t,n,o]),{panelRef:r,buttonsRef:i}},Ix={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},XC=({size:e="md",ghost:t,orientation:n,value:r,defaultValue:i,onValueChange:o,children:a,...u})=>{const[c,f]=C.useState(i?[...i]:[]),{panelRef:h,buttonsRef:p}=vue(r,c,n),m=b=>{f(b),o==null||o(b)},y=C.Children.map(a,b=>{if(C.isValidElement(b)){const v=b.props.value,S=b.props.className||"";return C.cloneElement(b,{className:`${Ix["toggle-group-button"]} ${S}`.trim(),ref:x=>{x&&v&&p.current.set(v,x)}})}return b});return E.jsxs(Xle,{ref:h,value:r,defaultValue:i,onValueChange:m,className:Ix["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?E.jsx(Ye,{}):E.jsx(Ze,{}),...u,children:[E.jsx("div",{"data-slot":"toggle-group-indicator",className:Ix["toggle-group-indicator"]}),y]})};XC.displayName="ToggleGroup";function xue(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function wue(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function Sue(e){return e/100*window.innerHeight}function Cue(e){return e/100*window.innerWidth}function Eue(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 Vm({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=Eue(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=wue(t,i);break}case"em":{r=xue(t,i);break}case"vh":{r=Sue(i);break}case"vw":{r=Cue(i);break}}return r}function Li(e){return parseFloat(e.toFixed(3))}function Jc({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 Lw(e){const{panels:t}=e,n=Jc({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:i,panelConstraints:o}=r;let a=0;if(o.collapsedSize!==void 0){const h=Vm({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=Li(h/n*100)}let u;if(o.defaultSize!==void 0){const h=Vm({groupSize:n,panelElement:i,styleProp:o.defaultSize});u=Li(h/n*100)}let c=0;if(o.minSize!==void 0){const h=Vm({groupSize:n,panelElement:i,styleProp:o.minSize});c=Li(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=Vm({groupSize:n,panelElement:i,styleProp:o.maxSize});f=Li(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:u,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function Bt(e,t="Assertion error"){if(!e)throw Error(t)}function jw(e,t){return Array.from(t).sort(e==="horizontal"?kue:Rue)}function kue(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Rue(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Zz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(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 _ue({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let i,o=Number.MAX_VALUE;for(const a of t){const{x:u,y:c}=Jz(r,a),f=e==="horizontal"?u:c;f<o&&(o=f,i=a)}return Bt(i,"No rect found"),i}let qm;function Tue(){return qm===void 0&&(typeof matchMedia=="function"?qm=!!matchMedia("(pointer:coarse)").matches:qm=!1),qm}function e4(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=jw(n,Array.from(t.children).filter(Zz).map(b=>({element:b}))).map(({element:b})=>b),a=[];let u=!1,c=!1,f=-1,h=-1,p=0,m,y=[];{let b=-1;for(const v of o)v.hasAttribute("data-panel")&&(b++,v.ariaDisabled===null&&(p++,f===-1&&(f=b),h=b))}if(p>1){let b=-1;for(const v of o)if(v.hasAttribute("data-panel")){b++;const S=r.find(x=>x.element===v);if(S){if(m){const x=m.element.getBoundingClientRect(),_=v.getBoundingClientRect();let k;if(c){const T=n==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),A=n==="horizontal"?new DOMRect(_.left,_.top,0,_.height):new DOMRect(_.left,_.top,_.width,0);switch(y.length){case 0:{k=[T,A];break}case 1:{const D=y[0],O=_ue({orientation:n,rects:[x,_],targetRect:D.element.getBoundingClientRect()});k=[D,O===x?A:T];break}default:{k=y;break}}}else y.length?k=y:k=[n==="horizontal"?new DOMRect(x.right,_.top,_.left-x.right,_.height):new DOMRect(_.left,x.bottom,_.width,_.top-x.bottom)];for(const T of k){let A="width"in T?T:T.element.getBoundingClientRect();const D=Tue()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(A.width<D){const $=D-A.width;A=new DOMRect(A.x-$/2,A.y,A.width+$,A.height)}if(A.height<D){const $=D-A.height;A=new DOMRect(A.x,A.y-$/2,A.width,A.height+$)}const O=b<=f||b>h;!u&&!O&&a.push({group:e,groupSize:Jc({group:e}),panels:[m,S],separator:"width"in T?void 0:T,rect:A}),u=!1}}c=!1,m=S,y=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(u=!0);const S=i.find(x=>x.element===v);S?y.push(S):(m=void 0,y=[])}else c=!0}return a}var ia;class Aue{constructor(){He(this,ia,{})}addListener(t,n){const r=K(this,ia)[t];return r===void 0?K(this,ia)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,ia)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let i=!1,o=null;const a=Array.from(r);for(let u=0;u<a.length;u++){const c=a[u];try{c.call(null,n)}catch(f){o===null&&(i=!0,o=f)}}if(i)throw o}}removeAllListeners(){$e(this,ia,{})}removeListener(t,n){const r=K(this,ia)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}ia=new WeakMap;function or(e,t,n=0){return Math.abs(Li(e)-Li(t))<=n}let fi={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Zo=new Aue;function ur(){return fi}function cr(e){const t=typeof e=="function"?e(fi):e;if(fi===t)return fi;const n=fi;return fi={...fi,...t},t.cursorFlags!==void 0&&Zo.emit("cursorFlagsChange",fi.cursorFlags),t.interactionState!==void 0&&Zo.emit("interactionStateChange",fi.interactionState),t.mountedGroups!==void 0&&(fi.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const u=or(o.collapsedSize,r.layout[o.panelId]),c=or(o.collapsedSize,a[o.panelId]);u&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),Zo.emit("mountedGroupsChange",fi.mountedGroups)),fi}function Due(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=Jz(n,o.rect);switch(e){case"horizontal":{a.x<=i.x&&(r=o,i=a);break}case"vertical":{a.y<=i.y&&(r=o,i=a);break}}}return r?{distance:i,hitRegion:r}:void 0}function Mue(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Oue(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:d2(e),b:d2(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();Bt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:f2(c2(n.a)),b:f2(c2(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(i.a-i.b)}const $ue=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Pue(e){const t=getComputedStyle(t4(e)??e).display;return t==="flex"||t==="inline-flex"}function Nue(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Pue(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"||$ue.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function c2(e){let t=e.length;for(;t--;){const n=e[t];if(Bt(n,"Missing node"),Nue(n))return n}return null}function f2(e){return e&&Number(getComputedStyle(e).zIndex)||0}function d2(e){const t=[];for(;e;)t.push(e),e=t4(e);return t}function t4(e){const{parentNode:t}=e;return Mue(t)?t.host:t}function Iue(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 Lue({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Zz(n)||n.contains(e)||e.contains(n))return!0;if(Oue(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Iue(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function QC(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=e4(i),a=Due(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Lue({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function jue(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 Zi(e,t){return or(e,t)?0:e>t?1:-1}function uc({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:i=0,collapsible:o,disabled:a,maxSize:u=100,minSize:c=0}=t;if(a&&!e)return n;if(Zi(r,c)<0)if(o){const f=(i+c)/2;Zi(r,f)<0?r=i:r=c}else r=c;return r=Math.min(u,r),r=Li(r),r}function dh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(or(e,0))return t;const a=o==="imperative-api",u=Object.values(t),c=Object.values(i),f=[...u],[h,p]=r;Bt(h!=null,"Invalid first pivot index"),Bt(p!=null,"Invalid second pivot index");let m=0;switch(o){case"keyboard":{{const v=e<0?p:h,S=n[v];Bt(S,`Panel constraints not found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:k=0}=S;if(_){const T=u[v];if(Bt(T!=null,`Previous layout not found for panel index ${v}`),or(T,x)){const A=k-T;Zi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}{const v=e<0?h:p,S=n[v];Bt(S,`No panel constraints found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:k=0}=S;if(_){const T=u[v];if(Bt(T!=null,`Previous layout not found for panel index ${v}`),or(T,k)){const A=T-x;Zi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}break}default:{const v=e<0?p:h,S=n[v];Bt(S,`Panel constraints not found for index ${v}`);const x=u[v],{collapsible:_,collapsedSize:k,minSize:T}=S;if(_&&Zi(x,T)<0)if(e>0){const A=T-k,D=A/2,O=x+e;Zi(O,T)<0&&(e=Zi(e,D)<=0?0:A)}else{const A=T-k,D=100-A/2,O=x-e;Zi(O,T)<0&&(e=Zi(100+e,D)>0?0:-A)}break}}{const v=e<0?1:-1;let S=e<0?p:h,x=0;for(;;){const k=u[S];Bt(k!=null,`Previous layout not found for panel index ${S}`);const T=uc({overrideDisabledPanels:a,panelConstraints:n[S],prevSize:k,size:100})-k;if(x+=T,S+=v,S<0||S>=n.length)break}const _=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-_:_}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const S=Math.abs(e)-Math.abs(m),x=u[v];Bt(x!=null,`Previous layout not found for panel index ${v}`);const _=x-S,k=uc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:x,size:_});if(!or(x,k)&&(m+=x-k,f[v]=k,m.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(jue(c,f))return i;{const v=e<0?p:h,S=u[v];Bt(S!=null,`Previous layout not found for panel index ${v}`);const x=S+m,_=uc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:S,size:x});if(f[v]=_,!or(_,x)){let k=x-_,T=e<0?p:h;for(;T>=0&&T<n.length;){const A=f[T];Bt(A!=null,`Previous layout not found for panel index ${T}`);const D=A+k,O=uc({overrideDisabledPanels:a,panelConstraints:n[T],prevSize:A,size:D});if(or(A,O)||(k-=O-A,f[T]=O),or(k,0))break;e>0?T--:T++}}}const y=Object.values(f).reduce((v,S)=>S+v,0);if(!or(y,100,.1))return i;const b=Object.keys(i);return f.reduce((v,S,x)=>(v[b[x]]=S,v),{})}function Yl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Zi(e[n],t[n])!==0)return!1;return!0}function Wl({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],i=r.reduce((u,c)=>u+c,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(u=>`${u}%`).join(", ")}`);if(!or(i,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];Bt(c!=null,`No layout data found for index ${u}`);const f=100/i*c;r[u]=f}let o=0;for(let u=0;u<t.length;u++){const c=n[u];Bt(c!=null,`No layout data found for index ${u}`);const f=r[u];Bt(f!=null,`No layout data found for index ${u}`);const h=uc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});f!=h&&(o+=f-h,r[u]=h)}if(!or(o,0))for(let u=0;u<t.length;u++){const c=r[u];Bt(c!=null,`No layout data found for index ${u}`);const f=c+o,h=uc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[u]=h,or(o,0)))break}const a=Object.keys(e);return r.reduce((u,c,f)=>(u[a[f]]=c,u),{})}function n4({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=ur();for(const[c,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:m}]of u)if(c.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:c,layout:p,separatorToPanels:m};throw Error(`Group ${e} not found`)},r=()=>{const u=n().derivedPanelConstraints.find(c=>c.panelId===t);if(u!==void 0)return u;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{const u=n().group.panels.find(c=>c.id===t);if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},o=()=>{const u=n().layout[t];if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},a=u=>{const c=o();if(u===c)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:p,layout:m,separatorToPanels:y}=n(),b=p.panels.findIndex(_=>_.id===t),v=b===p.panels.length-1,S=dh({delta:v?c-u:u-c,initialLayout:m,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:m,trigger:"imperative-api"}),x=Wl({layout:S,panelConstraints:h});Yl(m,x)||cr(_=>({mountedGroups:new Map(_.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:x,separatorToPanels:y})}))};return{collapse:()=>{const{collapsible:u,collapsedSize:c}=r(),{mutableValues:f}=i(),h=o();u&&h!==c&&(f.expandToSize=h,a(c))},expand:()=>{const{collapsible:u,collapsedSize:c,minSize:f}=r(),{mutableValues:h}=i(),p=o();if(u&&p===c){let m=h.expandToSize??f;m===0&&(m=1),a(m)}},getSize:()=>{const{group:u}=n(),c=o(),{element:f}=i(),h=u.orientation==="horizontal"?f.offsetWidth:f.offsetHeight;return{asPercentage:c,inPixels:h}},isCollapsed:()=>{const{collapsible:u,collapsedSize:c}=r(),f=o();return u&&or(c,f)},resize:u=>{if(o()!==u){let c;switch(typeof u){case"number":{const{group:f}=n(),h=Jc({group:f});c=Li(u/h*100);break}case"string":{c=parseFloat(u);break}}a(c)}}}}function h2(e){if(e.defaultPrevented)return;const{mountedGroups:t}=ur();QC(e,t).forEach(n=>{if(n.separator){const r=n.panels.find(i=>i.panelConstraints.defaultSize!==void 0);if(r){const i=r.panelConstraints.defaultSize,o=n4({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function vg(e){const{mountedGroups:t}=ur();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function r4({groupId:e}){const t=()=>{const{mountedGroups:n}=ur();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:o,layout:a,separatorToPanels:u}=t(),c=Wl({layout:n,panelConstraints:i});if(r)return a;if(!Yl(a,c)){cr(h=>({mountedGroups:new Map(h.mountedGroups).set(o,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:c,separatorToPanels:u})}));const f=o.panels.map(({id:h})=>h).join(",");o.inMemoryLayouts[f]=c}return c}}}function i4(e){const{mountedGroups:t}=ur(),n=t.get(e);return Bt(n,`Mounted Group ${e.id} not found`),n}function fl(e,t){const n=vg(e),r=i4(n),i=n.separators.find(h=>h.element===e);Bt(i,"Matching separator not found");const o=r.separatorToPanels.get(i);Bt(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),u=r4({groupId:n.id}).getLayout(),c=dh({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:u,trigger:"keyboard"}),f=Wl({layout:c,panelConstraints:r.derivedPanelConstraints});Yl(u,f)||cr(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function p2(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=vg(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&fl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&fl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&fl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&fl(t,-5);break}case"End":{e.preventDefault(),fl(t,100);break}case"Enter":{e.preventDefault();const r=vg(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=i4(r),u=r.separators.find(p=>p.element===t);Bt(u,"Matching separator not found");const c=a.get(u);Bt(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(Bt(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],m=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;fl(t,m-p)}break}case"F6":{e.preventDefault();const r=vg(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);Bt(i!==null,"Index not found");const o=e.shiftKey?i>0?i-1:r.length-1:i+1<r.length?i+1:0;r[o].focus();break}case"Home":{e.preventDefault(),fl(t,-100);break}}}function m2(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=ur(),n=QC(e,t),r=new Map;let i=!1;n.forEach(o=>{o.separator&&(i||(i=!0,o.separator.element.focus()));const a=t.get(o.group);a&&r.set(o.group,a.layout)}),cr({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const Fue=e=>e,Lx=()=>{},o4=1,s4=2,a4=4,l4=8,g2=3,y2=12;let Ym;function b2(){return Ym===void 0&&(Ym=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Ym=!0)),Ym}function zue({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case"active":case"hover":t.forEach(o=>{if(!o.disableCursor)switch(o.orientation){case"horizontal":{r++;break}case"vertical":{i++;break}}})}if(!(r===0&&i===0)){switch(n){case"active":{if(e&&b2()){const o=(e&o4)!==0,a=(e&s4)!==0,u=(e&a4)!==0,c=(e&l4)!==0;if(o)return u?"se-resize":c?"ne-resize":"e-resize";if(a)return u?"sw-resize":c?"nw-resize":"w-resize";if(u)return"s-resize";if(c)return"n-resize"}break}}return b2()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const v2=new WeakMap;function ZC(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=v2.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=ur();switch(i.state){case"active":case"hover":{const o=zue({cursorFlags:r,groups:i.hitRegions.map(u=>u.group),state:i.state}),a=`*, *:hover {cursor: ${o} !important; }`;if(t===a)return;t=a,o?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}v2.set(e,{prevStyle:t,styleSheet:n})}function u4({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:o,prevCursorFlags:a}){let u=0;const c=new Map(i);n.forEach(h=>{const{group:p,groupSize:m}=h,{disableCursor:y,orientation:b,panels:v}=p;let S=0;o?b==="horizontal"?S=(t.clientX-o.x)/m*100:S=(t.clientY-o.y)/m*100:b==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const x=r.get(p),{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:T,separatorToPanels:A}=i.get(p)??{defaultLayoutDeferred:!1};if(k&&x&&T&&A){const D=dh({delta:S,initialLayout:x,panelConstraints:k,pivotIndices:h.panels.map(O=>v.indexOf(O)),prevLayout:T,trigger:"mouse-or-touch"});if(Yl(D,T)){if(S!==0&&!y)switch(b){case"horizontal":{u|=S<0?o4:s4;break}case"vertical":{u|=S<0?a4:l4;break}}}else{c.set(h.group,{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:D,separatorToPanels:A});const O=h.group.panels.map(({id:$})=>$).join(",");h.group.inMemoryLayouts[O]=D}}});let f=0;t.movementX===0?f|=a&g2:f|=u&g2,t.movementY===0?f|=a&y2:f|=u&y2,cr({cursorFlags:f,mountedGroups:c}),ZC(e)}function x2(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=ur();n.state==="active"&&u4({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function w2(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=ur();switch(n.state){case"active":{if(e.buttons===0){cr(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),cr(i=>({mountedGroups:new Map(i.mountedGroups)}));return}u4({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=QC(e,r);i.length===0?n.state!=="inactive"&&cr({interactionState:{state:"inactive"}}):cr({interactionState:{hitRegions:i,state:"hover"}}),ZC(e.currentTarget);break}}}function S2(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=ur();t.state==="hover"&&cr({interactionState:{state:"inactive"}})}}function C2(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=ur();t.state==="active"&&(cr({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(ZC(e.currentTarget),cr(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function E2(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=Li(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=Li((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function Bue(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=Jc({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,u={asPercentage:Li(o/i*100),inPixels:o};r.mutableValues.prevSize=u,r.onResize(u,r.id,a)}function Uue(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 Hue(e,t){const n=e.map(i=>i.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i))return!1;return!0}const Qu=new Map;function Gue(e){let t=!0;Bt(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,o=new n(b=>{for(const v of b){const{borderBoxSize:S,target:x}=v;if(x===e.element){if(t){if(Jc({group:e})===0)return;cr(_=>{const k=_.mountedGroups.get(e);if(k){const T=Lw(e),A=k.defaultLayoutDeferred?E2(T):k.layout,D=Wl({layout:A,panelConstraints:T});return!k.defaultLayoutDeferred&&Yl(A,D)&&Uue(k.derivedPanelConstraints,T)?_:{mountedGroups:new Map(_.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,layout:D,separatorToPanels:k.separatorToPanels})}}return _})}}else Bue(e,x,S)}});o.observe(e.element),e.panels.forEach(b=>{Bt(!r.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),r.add(b.id),b.onResize&&o.observe(b.element)});const a=Jc({group:e}),u=Lw(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(Hue(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??E2(u),p=Wl({layout:h,panelConstraints:u}),m=e4(e),y=e.element.ownerDocument;return cr(b=>{const v=new Map;return Qu.set(y,(Qu.get(y)??0)+1),m.forEach(S=>{S.separator&&v.set(S.separator,S.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:u,layout:p,separatorToPanels:v})}}),e.separators.forEach(b=>{Bt(!i.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.element.addEventListener("keydown",p2)}),Qu.get(y)===1&&(y.addEventListener("dblclick",h2,!0),y.addEventListener("pointerdown",m2,!0),y.addEventListener("pointerleave",x2),y.addEventListener("pointermove",w2),y.addEventListener("pointerout",S2),y.addEventListener("pointerup",C2,!0)),function(){t=!1,Qu.set(y,Math.max(0,(Qu.get(y)??0)-1)),cr(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",p2)}),Qu.get(y)||(y.removeEventListener("dblclick",h2,!0),y.removeEventListener("pointerdown",m2,!0),y.removeEventListener("pointerleave",x2),y.removeEventListener("pointermove",w2),y.removeEventListener("pointerout",S2),y.removeEventListener("pointerup",C2,!0)),o.disconnect()}}function Vue(){const[e,t]=C.useState({}),n=C.useCallback(()=>t({}),[]);return[e,n]}function JC(e){const t=C.useId();return`${e??t}`}const su=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Gd(e){const t=C.useRef(e);return su(()=>{t.current=e},[e]),C.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function eE(...e){return Gd(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function tE(e){const t=C.useRef({...e});return su(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const c4=C.createContext(null);function que(e,t){const n=C.useRef({getLayout:()=>({}),setLayout:Fue});C.useImperativeHandle(t,()=>n.current,[]),su(()=>{Object.assign(n.current,r4({groupId:e}))})}function f4({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:o,groupRef:a,id:u,onLayoutChange:c,onLayoutChanged:f,orientation:h="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:m,...y}){const b=C.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=Gd(N=>{Yl(b.current.onLayoutChange,N)||(b.current.onLayoutChange=N,c==null||c(N))}),S=Gd(N=>{Yl(b.current.onLayoutChanged,N)||(b.current.onLayoutChanged=N,f==null||f(N))}),x=JC(u),_=C.useRef(null),[k,T]=Vue(),A=C.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),D=eE(_,o);que(x,a);const O=Gd((N,M)=>{const{interactionState:z,mountedGroups:G}=ur();for(const j of G.keys())if(j.id===N){const F=G.get(j);if(F){let U=!1;return z.state==="active"&&(U=z.hitRegions.some(q=>q.group===j)),{flexGrow:F.layout[M]??1,pointerEvents:U?"none":void 0}}}return{flexGrow:(n==null?void 0:n[M])??1}}),$=tE({defaultLayout:n,disableCursor:r}),B=C.useMemo(()=>({get disableCursor(){return!!$.disableCursor},getPanelStyles:O,id:x,orientation:h,registerPanel:N=>{const M=A.current;return M.panels=jw(h,[...M.panels,N]),T(),()=>{M.panels=M.panels.filter(z=>z!==N),T()}},registerSeparator:N=>{const M=A.current;return M.separators=jw(h,[...M.separators,N]),T(),()=>{M.separators=M.separators.filter(z=>z!==N),T()}},togglePanelDisabled:(N,M)=>{const z=A.current.panels.find(j=>j.id===N);z&&(z.panelConstraints.disabled=M);const{mountedGroups:G}=ur();for(const j of G.keys())if(j.id===x){const F=G.get(j);F&&(F.derivedPanelConstraints=Lw(j))}},toggleSeparatorDisabled:(N,M)=>{const z=A.current.separators.find(G=>G.id===N);z&&(z.disabled=M)}}),[O,x,T,h,$]),L=C.useRef(null);return su(()=>{const N=_.current;if(N===null)return;const M=A.current;let z;if($.defaultLayout!==void 0&&Object.keys($.defaultLayout).length===M.panels.length){z={};for(const W of M.panels){const I=$.defaultLayout[W.id];I!==void 0&&(z[W.id]=I)}}const G={defaultLayout:z,disableCursor:!!$.disableCursor,disabled:!!i,element:N,id:x,inMemoryLastExpandedPanelSizes:A.current.lastExpandedPanelSizes,inMemoryLayouts:A.current.layouts,orientation:h,panels:M.panels,resizeTargetMinimumSize:M.resizeTargetMinimumSize,separators:M.separators};L.current=G;const j=Gue(G),F=ur().mountedGroups.get(G);if(F){const{defaultLayoutDeferred:W,derivedPanelConstraints:I,layout:Y}=F;!W&&I.length>0&&(v(Y),S(Y))}const U=Zo.addListener("interactionStateChange",W=>{W.state}),q=Zo.addListener("mountedGroupsChange",W=>{const I=W.get(G);if(I){const{defaultLayoutDeferred:Y,derivedPanelConstraints:J,layout:H}=I;if(Y||J.length===0)return;const{interactionState:ie}=ur(),re=ie.state!=="active";v(H),re&&S(H)}});return()=>{L.current=null,j(),U(),q()}},[i,x,S,v,h,k,$]),C.useEffect(()=>{const N=L.current;N&&(N.defaultLayout=n,N.disableCursor=!!r)}),E.jsx(c4.Provider,{value:B,children:E.jsx("div",{...y,className:t,"data-group":!0,"data-testid":x,id:x,ref:D,style:{height:"100%",width:"100%",overflow:"hidden",...m,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:h==="horizontal"?"pan-y":"pan-x"},children:e})})}f4.displayName="Group";function nE(){const e=C.useContext(c4);return Bt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Yue(e,t){const{id:n}=nE(),r=C.useRef({collapse:Lx,expand:Lx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Lx});C.useImperativeHandle(t,()=>r.current,[]),su(()=>{Object.assign(r.current,n4({groupId:n,panelId:e}))})}function d4({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:i,disabled:o,elementRef:a,id:u,maxSize:c="100%",minSize:f="0%",onResize:h,panelRef:p,style:m,...y}){const b=!!u,v=JC(u),S=tE({disabled:o}),x=C.useRef(null),_=eE(x,a),{getPanelStyles:k,id:T,orientation:A,registerPanel:D,togglePanelDisabled:O}=nE(),$=h!==null,B=Gd((N,M,z)=>{h==null||h(N,u,z)});su(()=>{const N=x.current;if(N!==null){const M={element:N,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:$?B:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:S.disabled,maxSize:c,minSize:f}};return D(M)}},[n,r,i,$,v,b,c,f,B,D,S]),C.useEffect(()=>{O(v,!!o)},[o,v,O]),Yue(v,p);const L=C.useSyncExternalStore(N=>(Zo.addListener("mountedGroupsChange",N),()=>{Zo.removeListener("mountedGroupsChange",N)}),()=>JSON.stringify(k(T,v)),()=>JSON.stringify(k(T,v)));return E.jsx("div",{...y,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:_,style:{...Wue,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(L)},children:E.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...m,touchAction:A==="horizontal"?"pan-y":"pan-x"},children:e})})}d4.displayName="Panel";const Wue={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Kue({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,o;const a=e[n],u=t.find(c=>c.panelId===n);if(u){const c=u.maxSize,f=u.collapsible?u.collapsedSize:u.minSize,h=[r,r+1];o=Wl({layout:dh({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Wl({layout:dh({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function h4({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const u=JC(i),c=tE({disabled:n}),[f,h]=C.useState({}),[p,m]=C.useState("inactive"),y=C.useRef(null),b=eE(y,r),{disableCursor:v,id:S,orientation:x,registerSeparator:_,toggleSeparatorDisabled:k}=nE(),T=x==="horizontal"?"vertical":"horizontal";su(()=>{const D=y.current;if(D!==null){const O={disabled:c.disabled,element:D,id:u},$=_(O),B=Zo.addListener("interactionStateChange",N=>{m(N.state!=="inactive"&&N.hitRegions.some(M=>M.separator===O)?N.state:"inactive")}),L=Zo.addListener("mountedGroupsChange",N=>{N.forEach(({derivedPanelConstraints:M,layout:z,separatorToPanels:G},j)=>{if(j.id===S){const F=G.get(O);if(F){const U=F[0],q=j.panels.indexOf(U);h(Kue({layout:z,panelConstraints:M,panelId:U.id,panelIndex:q}))}}})});return()=>{B(),L(),$()}}},[S,u,_,c]),C.useEffect(()=>{k(u,!!n)},[n,u,k]);let A;return n&&!v&&(A="not-allowed"),E.jsx("div",{...a,"aria-controls":f.valueControls,"aria-disabled":n||void 0,"aria-orientation":T,"aria-valuemax":f.valueMax,"aria-valuemin":f.valueMin,"aria-valuenow":f.valueNow,children:e,className:t,"data-separator":n?"disabled":p,"data-testid":u,id:u,ref:b,role:"separator",style:{flexBasis:"auto",cursor:A,...o,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}h4.displayName="Separator";const Xue="_resizable_uti8j_1",gy={resizable:Xue,"resizable-panel":"_resizable-panel_uti8j_15","resizable-handle":"_resizable-handle_uti8j_19","resizable-handle-grip":"_resizable-handle-grip_uti8j_48"},p4=({direction:e,className:t,children:n,...r})=>E.jsx(f4,{"data-slot":"resizable","data-direction":e,orientation:e,className:ze(gy.resizable,t),...r,children:n});p4.displayName="Resizable";const m4=({withHandle:e,className:t,children:n,disabled:r,...i})=>E.jsx(h4,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:ze(gy["resizable-handle"],t),...i,children:n??(e!==!1&&E.jsx("div",{className:gy["resizable-handle-grip"],children:E.jsx(OG,{size:10})}))});m4.displayName="ResizableHandle";const Fw=({className:e,children:t,...n})=>E.jsx(d4,{"data-slot":"resizable-panel",className:ze(gy["resizable-panel"],e),...n,children:t});Fw.displayName="ResizablePanel";const g4=({children:e,...t})=>E.jsx(Ko,{render:E.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});g4.displayName="BreadcrumbsContainer";const Que={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},y4=({className:e,...t})=>E.jsx("ol",{"data-slot":"breadcrumbs-list",className:ze(Que["breadcrumbs-list"],e),...t});y4.displayName="BreadcrumbsList";const Zue={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},b4=({className:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-item",className:ze(Zue["breadcrumbs-item"],e),...t});b4.displayName="BreadcrumbsItem";const v4=({children:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??E.jsx(Z$,{size:16})});v4.displayName="BreadcrumbsSeparator";const rE=({items:e,linkAs:t="a",...n})=>E.jsx(g4,{"data-slot":"breadcrumbs",...n,children:E.jsx(y4,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,u=E.jsxs(er,{condition:!!a,render:E.jsx(Ze,{gap:2,ay:"center"}),children:[a&&E.jsx(a,{size:14}),r.label]});return E.jsxs(C.Fragment,{children:[E.jsx(b4,{children:o?u:E.jsx(t,{href:r.value,children:u})}),!o&&E.jsx(v4,{})]},r.value)})})});rE.displayName="Breadcrumbs";const xf={"table-cell":"_table-cell_1oqmd_3","table-container":"_table-container_1oqmd_12","table-head":"_table-head_1oqmd_18","table-header":"_table-header_1oqmd_29","table-root":"_table-root_1oqmd_34","table-row":"_table-row_1oqmd_43"},iE=({children:e,className:t,...n})=>E.jsx("div",{"data-slot":"table-container",className:ze(xf["table-container"],t),...n,children:e});iE.displayName="TableContainer";const oE=({striped:e,bordered:t,className:n,children:r,...i})=>E.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,className:ze(xf["table-root"],n),...i,children:r});oE.displayName="TableRoot";const x4=({className:e,...t})=>E.jsx("thead",{"data-slot":"table-header",className:ze(xf["table-header"],e),...t});x4.displayName="TableHeader";const sE=({className:e,render:t=E.jsx("tr",{}),...n})=>E.jsx(Ko,{"data-slot":"table-row",className:ze(xf["table-row"],e),render:t,...n});sE.displayName="TableRow";const hh=({className:e,collapse:t,...n})=>E.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:ze(xf["table-cell"],e),...n});hh.displayName="TableCell";const w4=({className:e,collapse:t,...n})=>E.jsx("th",{"data-slot":"table-head","data-collapse":t,className:ze(xf["table-head"],e),...n});w4.displayName="TableHead";const aE=({...e})=>E.jsx("tbody",{"data-slot":"table-body",...e});aE.displayName="TableBody";const S4=({icon:e,tooltip:t="More options",items:n})=>E.jsx(qz,{align:"end",trigger:E.jsx(Ui,{tooltip:t,"aria-label":t,size:"small",variant:"ghost",shape:"square",children:e?E.jsx(e,{}):E.jsx(tP,{size:14})}),items:n});S4.displayName="TableCellDropdown";function Jue({wrapper:e,onClick:t,item:n,...r}){const i=E.jsx(Ui,{tooltip:r.tooltip,size:"small",variant:"ghost",shape:"square",onClick:t?()=>t(n):void 0,children:r.icon?E.jsx(r.icon,{}):E.jsx(tP,{size:14})},r.tooltip);return e?e(i,n):i}function C4({actions:e,item:t}){var n;return E.jsx(hh,{collapse:!0,children:E.jsxs(Ze,{ax:"end",children:[(n=e.primary)==null?void 0:n.map(r=>E.jsx(Jue,{item:t,...r},r.tooltip)),e.secondary&&E.jsx(S4,{...e.secondary})]})})}C4.displayName="TableCellActions";function ece(e={}){const{immediate:t=!1,onNeedReload:n,onNeedRefresh:r,onOfflineReady:i,onRegistered:o,onRegisteredSW:a,onRegisterError:u}=e;let c,f;const h=async(m=!0)=>{await f};async function p(){if("serviceWorker"in navigator){if(c=await Ur(async()=>{const{Workbox:m}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:m}},[]).then(({Workbox:m})=>new m("/sw.js",{scope:"/",type:"classic"})).catch(m=>{u==null||u(m)}),!c)return;c.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&(n?n():window.location.reload())}),c.addEventListener("installed",m=>{m.isUpdate||i==null||i()}),c.register({immediate:t}).then(m=>{a?a("/sw.js",m):o==null||o(m)}).catch(m=>{u==null||u(m)})}}return f=p(),h}const tce="bertrand:apiBase";function nce(){if(typeof window<"u")try{const e=window.localStorage.getItem(tce);if(e)return e.replace(/\/$/,"")}catch{}return""}function lE(e){return`${nce()}${e}`}async function wf(e){const t=await fetch(lE(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class E4 extends Error{constructor(n,r){super(n);te(this,"reason");this.name="ArchiveError",this.reason=r}}async function k4(e,t){const n=await fetch(lE(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new E4(r.error??n.statusText,r.reason??"unknown")}return n.json()}const k2=e=>k4(e,"archive"),R2=e=>k4(e,"unarchive"),Kl=(e={})=>({queryKey:["sessions",{includeArchived:!!e.includeArchived}],queryFn:()=>wf(e.includeArchived?"/api/sessions?excludeArchived=false":"/api/sessions"),refetchInterval:2e3,placeholderData:Ch}),rce=(e,t=!1)=>({queryKey:["events",e],queryFn:()=>wf(`/api/events/${e}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:Ch}),ice=(e,t=!1)=>({queryKey:["stats",e],queryFn:()=>wf(`/api/stats/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Ch}),oce=(e=!1)=>({queryKey:["stats"],queryFn:()=>wf("/api/stats"),refetchInterval:e?2e3:!1,placeholderData:Ch}),sce=(e,t=!1)=>({queryKey:["engagement",e],queryFn:()=>wf(`/api/engagement/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Ch}),ace={queryKey:["recaps"],queryFn:()=>wf("/api/recaps")},lce={"not-found":"Session not found",active:"End the session before archiving","already-archived":"Session is already archived","not-archived":"Session is not archived",unknown:"Something went wrong"};function jx(e){return e instanceof E4?lce[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function R4(e){const t=iS(),n=rI(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?k2:R2)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${jx(p)}`,priority:"high"})}),o=(f,h)=>{let p;const m=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:E.jsxs(Ze,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[E.jsxs(Fe,{children:[f," ",E.jsx("code",{children:e.slug})]}),E.jsx(Ui,{size:"small",onClick:m,children:"Undo"})]})})},a=UT({mutationFn:()=>k2(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${jx(f)}`,priority:"high"})}),u=UT({mutationFn:()=>R2(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${jx(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:QH,disabled:!1,loading:u.isPending,onClick:()=>u.mutate()};const c=e.status==="active"||e.status==="waiting";return{kind:"archive",label:"Archive",tooltip:c?"End the session before archiving":"Archive this session",Icon:JH,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const uce={"session.started":{category:"lifecycle",color:"blue",label:"session started"},"session.resumed":{category:"lifecycle",color:"blue",label:"session resumed"},"session.end":{category:"lifecycle",color:"neutral",label:"session ended"},"claude.started":{category:"lifecycle",color:"blue",label:"session started"},"claude.ended":{category:"lifecycle",color:"blue",label:"ended"},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded"},"session.waiting":{category:"interaction",color:"green",label:"waiting"},"session.answered":{category:"interaction",color:"green",label:"Q&A"},"permission.request":{category:"work",color:"orange",label:"permission"},"permission.resolve":{category:"work",color:"orange",label:"approved"},"worktree.entered":{category:"lifecycle",color:"indigo",label:"worktree"},"worktree.exited":{category:"lifecycle",color:"indigo",label:"worktree exited"},"gh.pr.created":{category:"milestone",color:"purple",label:"pull request"},"gh.pr.merged":{category:"milestone",color:"purple",label:"merged"},"linear.issue.read":{category:"integration",color:"purple",label:"Linear"},"notion.page.read":{category:"integration",color:"purple",label:"Notion"},"vercel.deploy":{category:"milestone",color:"purple",label:"deploy"},"user.prompt":{category:"interaction",color:"green",label:"prompt"},"context.snapshot":{category:"context",color:"neutral",label:"context"},"session.recap":{category:"lifecycle",color:"blue",label:"session recap"},"tool.work":{category:"work",color:"yellow",label:"tool work"},"tool.applied":{category:"work",color:"yellow",label:"applied"},"assistant.message":{category:"assistant",color:"indigo",label:"assistant"},"assistant.recap":{category:"assistant",color:"indigo",label:"thinking recap"}},cce={category:"lifecycle",color:"neutral",label:"unknown"};function uE(e){return uce[e]??cce}function fce(e){return uE(e).category}function dce(e){return uE(e).color}function hce(e){return uE(e).label}const pce={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function cE(e){return pce[e]}function Fx(e){if(e<1)return"0s";const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=Math.floor(e%60);return t>0?`${t}d ${n}h`:n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function ab(e){if(e)return e.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function Jo(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function no(e){const t=parseInt(e??"0",10);return Number.isFinite(t)?t:0}function _4(e){return e<=25?"red":e<=50?"yellow":"green"}function zw(e){const t=(Date.now()-new Date(e).getTime())/1e3;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(e).toLocaleDateString()}const mce=dce,gce=hce;function yce(e){const t=gce(e.event),n=e.meta;if(!n)return t;switch(e.event){case"session.answered":return n.question??t;case"tool.work":return e.summary??t;case"context.snapshot":{const r=n.remaining_pct;return r?`${r}% remaining`:t}case"claude.started":{const r=n.group_path,i=n.session_name,o=[r,i].filter(Boolean).join("/");return o?`created ${o}`:t}default:return t}}function bce(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const vce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wce={};function _2(e,t){return(wce.jsx?xce:vce).test(e)}var Zu={},zx,T2;function Sce(){if(T2)return zx;T2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
480
|
+
`,f="/",h="*",p="",m="comment",y="declaration";function b(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var _=1,k=1;function T(G){var j=G.match(t);j&&(_+=j.length);var F=G.lastIndexOf(c);k=~F?G.length-F:k+G.length}function A(){var G={line:_,column:k};return function(j){return j.position=new D(G),B(),j}}function D(G){this.start=G,this.end={line:_,column:k},this.source=x.source}D.prototype.content=S;function O(G){var j=new Error(x.source+":"+_+":"+k+": "+G);if(j.reason=G,j.filename=x.source,j.line=_,j.column=k,j.source=S,!x.silent)throw j}function $(G){var j=G.exec(S);if(j){var F=j[0];return T(F),S=S.slice(F.length),j}}function B(){$(n)}function L(G){var j;for(G=G||[];j=N();)j!==!1&&G.push(j);return G}function N(){var G=A();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var j=2;p!=S.charAt(j)&&(h!=S.charAt(j)||f!=S.charAt(j+1));)++j;if(j+=2,p===S.charAt(j-1))return O("End of comment missing");var F=S.slice(2,j-2);return k+=2,T(F),S=S.slice(j),k+=2,G({type:m,comment:F})}}function M(){var G=A(),j=$(r);if(j){if(N(),!$(i))return O("property missing ':'");var F=$(o),U=G({type:y,property:v(j[0].replace(e,p)),value:F?v(F[0].replace(e,p)):p});return $(a),U}}function z(){var G=[];L(G);for(var j;j=M();)j!==!1&&(G.push(j),L(G));return G}return B(),z()}function v(S){return S?S.replace(u,p):p}return zx=b,zx}var A2;function Cce(){if(A2)return Zu;A2=1;var e=Zu&&Zu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.default=n;const t=e(Sce());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;u?i(f,h,c):h&&(o=o||{},o[f]=h)}),o}return Zu}var Rd={},D2;function Ece(){if(D2)return Rd;D2=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},a=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),o(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,u):f=f.replace(r,u),f.replace(t,a))};return Rd.camelCase=c,Rd}var _d,M2;function kce(){if(M2)return _d;M2=1;var e=_d&&_d.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Cce()),n=Ece();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,c){u&&c&&(a[(0,n.camelCase)(u,o)]=c)}),a}return r.default=r,_d=r,_d}var Rce=kce();const _ce=Zw(Rce),T4=A4("end"),fE=A4("start");function A4(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Tce(e){const t=fE(e),n=T4(e);if(t&&n)return{start:t,end:n}}function Vd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?O2(e.position):"start"in e||"end"in e?O2(e):"line"in e||"column"in e?Bw(e):""}function Bw(e){return $2(e&&e.line)+":"+$2(e&&e.column)}function O2(e){return Bw(e&&e.start)+"-"+Bw(e&&e.end)}function $2(e){return e&&typeof e=="number"?e:1}class tr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Vd(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tr.prototype.file="";tr.prototype.name="";tr.prototype.reason="";tr.prototype.message="";tr.prototype.stack="";tr.prototype.column=void 0;tr.prototype.line=void 0;tr.prototype.ancestors=void 0;tr.prototype.cause=void 0;tr.prototype.fatal=void 0;tr.prototype.place=void 0;tr.prototype.ruleId=void 0;tr.prototype.source=void 0;const dE={}.hasOwnProperty,Ace=new Map,Dce=/[A-Z]/g,Mce=new Set(["table","tbody","thead","tfoot","tr"]),Oce=new Set(["td","th"]),D4="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $ce(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bce(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=zce(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jh:mL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=M4(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function M4(e,t,n){if(t.type==="element")return Pce(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nce(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Lce(e,t,n);if(t.type==="mdxjsEsm")return Ice(e,t);if(t.type==="root")return jce(e,t,n);if(t.type==="text")return Fce(e,t)}function Pce(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jh,e.schema=i),e.ancestors.push(t);const o=$4(e,t.tagName,!1),a=Uce(e,t);let u=pE(e,t);return Mce.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Fy(c):!0})),O4(e,a,o,t),hE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Nce(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ph(e,t.position)}function Ice(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ph(e,t.position)}function Lce(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jh,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:$4(e,t.name,!0),a=Hce(e,t),u=pE(e,t);return O4(e,a,o,t),hE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function jce(e,t,n){const r={};return hE(r,pE(e,t)),e.create(t,e.Fragment,r,n)}function Fce(e,t){return t.value}function O4(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zce(e,t,n){return r;function r(i,o,a,u){const f=Array.isArray(a.children)?n:t;return u?f(o,a,u):f(o,a)}}function Bce(e,t){return n;function n(r,i,o,a){const u=Array.isArray(o.children),c=fE(r);return t(i,o,a,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Uce(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dE.call(t.properties,i)){const o=Gce(e,i,t.properties[i]);if(o){const[a,u]=o;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Oce.has(t.tagName)?r=u:n[a]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Hce(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ph(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else ph(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pE(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ace;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const f=i.get(c)||0;a=c+"-"+f,i.set(c,f+1)}}const u=M4(e,o,a);u!==void 0&&n.push(u)}return n}function Gce(e,t,n){const r=pL(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?yL(n):bL(n)),r.property==="style"){let i=typeof n=="object"?n:Vce(e,String(n));return e.stylePropertyNameCase==="css"&&(i=qce(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?LZ[r.property]||r.property:r.attribute,n]}}function Vce(e,t){try{return _ce(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new tr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=D4+"#cannot-parse-style-attribute",i}}function $4(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const u=_2(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=a}else r=_2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dE.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ph(e)}function ph(e,t){const n=new tr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=D4+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qce(e){const t={};let n;for(n in e)dE.call(e,n)&&(t[Yce(n)]=e[n]);return t}function Yce(e){let t=e.replace(Dce,Wce);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wce(e){return"-"+e.toLowerCase()}const Bx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kce={};function mE(e,t){const n=Kce,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P4(e,r,i)}function P4(e,t,n){if(Xce(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return P2(e.children,t,n)}return Array.isArray(e)?P2(e,t,n):""}function P2(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=P4(e[i],t,n);return r.join("")}function Xce(e){return!!(e&&typeof e=="object")}const N2=document.createElement("i");function gE(e){const t="&"+e+";";N2.innerHTML=t;const n=N2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function gi(e,t){return e.length>0?(Xr(e,e.length,0,t),e):t}const I2={}.hasOwnProperty;function N4(e){const t={};let n=-1;for(;++n<e.length;)Qce(t,e[n]);return t}function Qce(e,t){let n;for(n in t){const i=(I2.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){I2.call(i,a)||(i[a]=[]);const u=o[a];Zce(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Zce(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xr(e,0,0,r)}function I4(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ar=La(/[A-Za-z]/),Zn=La(/[\dA-Za-z]/),Jce=La(/[#-'*+\--9=?A-Z^-~]/);function yy(e){return e!==null&&(e<32||e===127)}const Uw=La(/\d/),efe=La(/[\dA-Fa-f]/),tfe=La(/[!-/:-@[-`{-~]/);function Je(e){return e!==null&&e<-2}function Wt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const lb=La(new RegExp("\\p{P}|\\p{S}","u")),Xl=La(/\s/);function La(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Sf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Zn(e.charCodeAt(n+1))&&Zn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(a=String.fromCharCode(o,u),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _t(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return xt(c)?(e.enter(n),u(c)):t(c)}function u(c){return xt(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const nfe={tokenize:rfe};function rfe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),_t(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),o(u)}function o(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Je(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),a)}}const ife={tokenize:ofe},L2={tokenize:sfe};function ofe(e){const t=this,n=[];let r=0,i,o,a;return u;function u(k){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,f)(k)}return f(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let A=T,D;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){D=t.events[A][1].end;break}x(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...D},O++;return Xr(t.events,A+1,0,t.events.slice(T)),t.events.length=O,f(k)}return u(k)}function f(k){if(r===n.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(L2,h,p)(k)}function h(k){return i&&_(),x(r),m(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(k)}function m(k){return t.containerState={},e.attempt(L2,y,b)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function b(k){if(k===null){i&&_(),x(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(k)}function v(k){if(k===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Je(k)?(e.consume(k),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),v)}function S(k,T){const A=t.sliceStream(k);if(T&&A.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(A),t.parser.lazy[k.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;const O=t.events.length;let $=O,B,L;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){L=t.events[$][1].end;break}B=!0}for(x(r),D=O;D<t.events.length;)t.events[D][1].end={...L},D++;Xr(t.events,$+1,0,t.events.slice(O)),t.events.length=D}}function x(k){let T=n.length;for(;T-- >k;){const A=n[T];t.containerState=A[1],A[0].exit.call(t,e)}n.length=k}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sfe(e,t,n){return _t(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ef(e){if(e===null||Wt(e)||Xl(e))return 1;if(lb(e))return 2}function ub(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Hw={name:"attention",resolveAll:afe,tokenize:lfe};function afe(e,t){let n=-1,r,i,o,a,u,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[n][1].start};j2(p,-c),j2(m,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=gi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=gi(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=gi(f,ub(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=gi(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=gi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Xr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lfe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ef(r);let o;return a;function a(c){return o=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===o)return e.consume(c),u;const f=e.exit("attentionSequence"),h=ef(c),p=!h||h===2&&i||n.includes(c),m=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?p:p&&(i||!m)),f._close=!!(o===42?m:m&&(h||!p)),t(c)}}function j2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ufe={name:"autolink",tokenize:cfe};function cfe(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return ar(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Zn(y)?(r=1,u(y)):f(y)}function u(y){return y===58?(e.consume(y),r=0,c):(y===43||y===45||y===46||Zn(y))&&r++<32?(e.consume(y),u):(r=0,f(y))}function c(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yy(y)?n(y):(e.consume(y),c)}function f(y){return y===64?(e.consume(y),h):Jce(y)?(e.consume(y),f):n(y)}function h(y){return Zn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):m(y)}function m(y){if((y===45||Zn(y))&&r++<63){const b=y===45?m:p;return e.consume(y),b}return n(y)}}const Kh={partial:!0,tokenize:ffe};function ffe(e,t,n){return r;function r(o){return xt(o)?_t(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Je(o)?t(o):n(o)}}const L4={continuation:{tokenize:hfe},exit:pfe,name:"blockQuote",tokenize:dfe};function dfe(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function hfe(e,t,n){const r=this;return i;function i(a){return xt(a)?_t(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(L4,t,n)(a)}}function pfe(e){e.exit("blockQuote")}const j4={name:"characterEscape",tokenize:mfe};function mfe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return tfe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const F4={name:"characterReference",tokenize:gfe};function gfe(e,t,n){const r=this;let i=0,o,a;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,a=Zn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=efe,h):(e.enter("characterReferenceValue"),o=7,a=Uw,h(p))}function h(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===Zn&&!gE(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<o?(e.consume(p),h):n(p)}}const F2={partial:!0,tokenize:bfe},z2={concrete:!0,name:"codeFenced",tokenize:yfe};function yfe(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,a=0,u;return c;function c(D){return f(D)}function f(D){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,u=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(D)}function h(D){return D===u?(a++,e.consume(D),h):a<3?n(D):(e.exit("codeFencedFenceSequence"),xt(D)?_t(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Je(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(F2,v,T)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(D))}function m(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):xt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_t(e,y,"whitespace")(D)):D===96&&D===u?n(D):(e.consume(D),m)}function y(D){return D===null||Je(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===u?n(D):(e.consume(D),b)}function v(D){return e.attempt(i,T,S)(D)}function S(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x}function x(D){return o>0&&xt(D)?_t(e,_,"linePrefix",o+1)(D):_(D)}function _(D){return D===null||Je(D)?e.check(F2,v,T)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||Je(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),k)}function T(D){return e.exit("codeFenced"),t(D)}function A(D,O,$){let B=0;return L;function L(j){return D.enter("lineEnding"),D.consume(j),D.exit("lineEnding"),N}function N(j){return D.enter("codeFencedFence"),xt(j)?_t(D,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):M(j)}function M(j){return j===u?(D.enter("codeFencedFenceSequence"),z(j)):$(j)}function z(j){return j===u?(B++,D.consume(j),z):B>=a?(D.exit("codeFencedFenceSequence"),xt(j)?_t(D,G,"whitespace")(j):G(j)):$(j)}function G(j){return j===null||Je(j)?(D.exit("codeFencedFence"),O(j)):$(j)}}}function bfe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Ux={name:"codeIndented",tokenize:xfe},vfe={partial:!0,tokenize:wfe};function xfe(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),_t(e,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?c(f):Je(f)?e.attempt(vfe,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Je(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function wfe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_t(e,o,"linePrefix",5)(a)}function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):Je(a)?i(a):n(a)}}const Sfe={name:"codeText",previous:Efe,resolve:Cfe,tokenize:kfe};function Cfe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Efe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kfe(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(o=e.enter("codeTextSequence"),i=0,h(p)):Je(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Je(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",f(p))}}class Rfe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Td(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Td(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Td(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Td(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Td(this.left,n.reverse())}}}function Td(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function z4(e){const t={};let n=-1,r,i,o,a,u,c,f;const h=new Rfe(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_fe(h,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=h.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Xr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function _fe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,c=[],f={};let h,p,m=-1,y=n,b=0,v=0;const S=[v];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),p&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(v=m+1,S.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):S.pop(),m=S.length;m--;){const x=u.slice(S[m],S[m+1]),_=o.pop();c.push([_,_+x.length-1]),e.splice(_,2,x)}for(c.reverse(),m=-1;++m<c.length;)f[b+c[m][0]]=b+c[m][1],b+=c[m][1]-c[m][0]-1;return f}const Tfe={resolve:Dfe,tokenize:Mfe},Afe={partial:!0,tokenize:Ofe};function Dfe(e){return z4(e),e}function Mfe(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):Je(u)?e.check(Afe,a,o)(u):(e.consume(u),i)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ofe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_t(e,o,"linePrefix")}function o(a){if(a===null||Je(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function B4(e,t,n,r,i,o,a,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),m):x===null||x===32||x===41||yy(x)?n(x):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(x))}function m(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(u),m(x)):x===null||x===60||Je(x)?n(x):(e.consume(x),x===92?b:y)}function b(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!h&&(x===null||x===41||Wt(x))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(x)):h<f&&x===40?(e.consume(x),h++,v):x===41?(e.consume(x),h--,v):x===null||x===32||x===40||yy(x)?n(x):(e.consume(x),x===92?S:v)}function S(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function U4(e,t,n,r,i,o){const a=this;let u=0,c;return f;function f(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),h}function h(y){return u>999||y===null||y===91||y===93&&!c||y===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):Je(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||Je(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),c||(c=!xt(y)),y===92?m:p)}function m(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function H4(e,t,n,r,i,o){let a;return u;function u(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,c):n(m)}function c(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),f(m))}function f(m){return m===a?(e.exit(o),c(a)):m===null?n(m):Je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_t(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||Je(m)?(e.exit("chunkString"),f(m)):(e.consume(m),m===92?p:h)}function p(m){return m===a||m===92?(e.consume(m),h):h(m)}}function qd(e,t){let n;return r;function r(i){return Je(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xt(i)?_t(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $fe={name:"definition",tokenize:Nfe},Pfe={partial:!0,tokenize:Ife};function Nfe(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return U4.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return i=Fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),c):n(y)}function c(y){return Wt(y)?qd(e,f)(y):f(y)}function f(y){return B4(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Pfe,p,p)(y)}function p(y){return xt(y)?_t(e,m,"whitespace")(y):m(y)}function m(y){return y===null||Je(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function Ife(e,t,n){return r;function r(u){return Wt(u)?qd(e,i)(u):n(u)}function i(u){return H4(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return xt(u)?_t(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Je(u)?t(u):n(u)}}const Lfe={name:"hardBreakEscape",tokenize:jfe};function jfe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Je(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ffe={name:"headingAtx",resolve:zfe,tokenize:Bfe};function zfe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Bfe(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Wt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Je(h)?(e.exit("atxHeading"),t(h)):xt(h)?_t(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||Wt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const Ufe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],B2=["pre","script","style","textarea"],Hfe={concrete:!0,name:"htmlFlow",resolveTo:qfe,tokenize:Yfe},Gfe={partial:!0,tokenize:Kfe},Vfe={partial:!0,tokenize:Wfe};function qfe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yfe(e,t,n){const r=this;let i,o,a,u,c;return f;function f(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),p}function p(H){return H===33?(e.consume(H),m):H===47?(e.consume(H),o=!0,v):H===63?(e.consume(H),i=3,r.interrupt?t:I):ar(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function m(H){return H===45?(e.consume(H),i=2,y):H===91?(e.consume(H),i=5,u=0,b):ar(H)?(e.consume(H),i=4,r.interrupt?t:I):n(H)}function y(H){return H===45?(e.consume(H),r.interrupt?t:I):n(H)}function b(H){const ie="CDATA[";return H===ie.charCodeAt(u++)?(e.consume(H),u===ie.length?r.interrupt?t:M:b):n(H)}function v(H){return ar(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function S(H){if(H===null||H===47||H===62||Wt(H)){const ie=H===47,re=a.toLowerCase();return!ie&&!o&&B2.includes(re)?(i=1,r.interrupt?t(H):M(H)):Ufe.includes(a.toLowerCase())?(i=6,ie?(e.consume(H),x):r.interrupt?t(H):M(H)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(H):o?_(H):k(H))}return H===45||Zn(H)?(e.consume(H),a+=String.fromCharCode(H),S):n(H)}function x(H){return H===62?(e.consume(H),r.interrupt?t:M):n(H)}function _(H){return xt(H)?(e.consume(H),_):L(H)}function k(H){return H===47?(e.consume(H),L):H===58||H===95||ar(H)?(e.consume(H),T):xt(H)?(e.consume(H),k):L(H)}function T(H){return H===45||H===46||H===58||H===95||Zn(H)?(e.consume(H),T):A(H)}function A(H){return H===61?(e.consume(H),D):xt(H)?(e.consume(H),A):k(H)}function D(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),c=H,O):xt(H)?(e.consume(H),D):$(H)}function O(H){return H===c?(e.consume(H),c=null,B):H===null||Je(H)?n(H):(e.consume(H),O)}function $(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||Wt(H)?A(H):(e.consume(H),$)}function B(H){return H===47||H===62||xt(H)?k(H):n(H)}function L(H){return H===62?(e.consume(H),N):n(H)}function N(H){return H===null||Je(H)?M(H):xt(H)?(e.consume(H),N):n(H)}function M(H){return H===45&&i===2?(e.consume(H),F):H===60&&i===1?(e.consume(H),U):H===62&&i===4?(e.consume(H),Y):H===63&&i===3?(e.consume(H),I):H===93&&i===5?(e.consume(H),W):Je(H)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gfe,J,z)(H)):H===null||Je(H)?(e.exit("htmlFlowData"),z(H)):(e.consume(H),M)}function z(H){return e.check(Vfe,G,J)(H)}function G(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),j}function j(H){return H===null||Je(H)?z(H):(e.enter("htmlFlowData"),M(H))}function F(H){return H===45?(e.consume(H),I):M(H)}function U(H){return H===47?(e.consume(H),a="",q):M(H)}function q(H){if(H===62){const ie=a.toLowerCase();return B2.includes(ie)?(e.consume(H),Y):M(H)}return ar(H)&&a.length<8?(e.consume(H),a+=String.fromCharCode(H),q):M(H)}function W(H){return H===93?(e.consume(H),I):M(H)}function I(H){return H===62?(e.consume(H),Y):H===45&&i===2?(e.consume(H),I):M(H)}function Y(H){return H===null||Je(H)?(e.exit("htmlFlowData"),J(H)):(e.consume(H),Y)}function J(H){return e.exit("htmlFlow"),t(H)}}function Wfe(e,t,n){const r=this;return i;function i(a){return Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Kfe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Kh,t,n)}}const Xfe={name:"htmlText",tokenize:Qfe};function Qfe(e,t,n){const r=this;let i,o,a;return u;function u(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),A):I===63?(e.consume(I),k):ar(I)?(e.consume(I),$):n(I)}function f(I){return I===45?(e.consume(I),h):I===91?(e.consume(I),o=0,b):ar(I)?(e.consume(I),_):n(I)}function h(I){return I===45?(e.consume(I),y):n(I)}function p(I){return I===null?n(I):I===45?(e.consume(I),m):Je(I)?(a=p,U(I)):(e.consume(I),p)}function m(I){return I===45?(e.consume(I),y):p(I)}function y(I){return I===62?F(I):I===45?m(I):p(I)}function b(I){const Y="CDATA[";return I===Y.charCodeAt(o++)?(e.consume(I),o===Y.length?v:b):n(I)}function v(I){return I===null?n(I):I===93?(e.consume(I),S):Je(I)?(a=v,U(I)):(e.consume(I),v)}function S(I){return I===93?(e.consume(I),x):v(I)}function x(I){return I===62?F(I):I===93?(e.consume(I),x):v(I)}function _(I){return I===null||I===62?F(I):Je(I)?(a=_,U(I)):(e.consume(I),_)}function k(I){return I===null?n(I):I===63?(e.consume(I),T):Je(I)?(a=k,U(I)):(e.consume(I),k)}function T(I){return I===62?F(I):k(I)}function A(I){return ar(I)?(e.consume(I),D):n(I)}function D(I){return I===45||Zn(I)?(e.consume(I),D):O(I)}function O(I){return Je(I)?(a=O,U(I)):xt(I)?(e.consume(I),O):F(I)}function $(I){return I===45||Zn(I)?(e.consume(I),$):I===47||I===62||Wt(I)?B(I):n(I)}function B(I){return I===47?(e.consume(I),F):I===58||I===95||ar(I)?(e.consume(I),L):Je(I)?(a=B,U(I)):xt(I)?(e.consume(I),B):F(I)}function L(I){return I===45||I===46||I===58||I===95||Zn(I)?(e.consume(I),L):N(I)}function N(I){return I===61?(e.consume(I),M):Je(I)?(a=N,U(I)):xt(I)?(e.consume(I),N):B(I)}function M(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,z):Je(I)?(a=M,U(I)):xt(I)?(e.consume(I),M):(e.consume(I),G)}function z(I){return I===i?(e.consume(I),i=void 0,j):I===null?n(I):Je(I)?(a=z,U(I)):(e.consume(I),z)}function G(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Wt(I)?B(I):(e.consume(I),G)}function j(I){return I===47||I===62||Wt(I)?B(I):n(I)}function F(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function U(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),q}function q(I){return xt(I)?_t(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):W(I)}function W(I){return e.enter("htmlTextData"),a(I)}}const yE={name:"labelEnd",resolveAll:tde,resolveTo:nde,tokenize:rde},Zfe={tokenize:ide},Jfe={tokenize:ode},ede={tokenize:sde};function tde(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Xr(e,0,e.length,n),e}function nde(e,t){let n=e.length,r=0,i,o,a,u;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",c,t],["enter",f,t]],u=gi(u,e.slice(o+1,o+r+3)),u=gi(u,[["enter",h,t]]),u=gi(u,ub(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),u=gi(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=gi(u,e.slice(a+1)),u=gi(u,[["exit",c,t]]),Xr(e,o,e.length,u),e}function rde(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return u;function u(m){return o?o._inactive?p(m):(a=r.parser.defined.includes(Fi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(Zfe,h,a?h:p)(m):m===91?e.attempt(Jfe,h,a?f:p)(m):a?h(m):p(m)}function f(m){return e.attempt(ede,h,p)(m)}function h(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function ide(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Wt(p)?qd(e,o)(p):o(p)}function o(p){return p===41?h(p):B4(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Wt(p)?qd(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?H4(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Wt(p)?qd(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function ode(e,t,n){const r=this;return i;function i(u){return U4.call(r,e,o,a,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(Fi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function sde(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ade={name:"labelStartImage",resolveAll:yE.resolveAll,tokenize:lde};function lde(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ude={name:"labelStartLink",resolveAll:yE.resolveAll,tokenize:cde};function cde(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Hx={name:"lineEnding",tokenize:fde};function fde(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_t(e,t,"linePrefix")}}const xg={name:"thematicBreak",tokenize:dde};function dde(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),a(f)}function a(f){return i=f,u(f)}function u(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Je(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),xt(f)?_t(e,u,"whitespace")(f):u(f))}}const vr={continuation:{tokenize:gde},exit:bde,name:"list",tokenize:mde},hde={partial:!0,tokenize:vde},pde={partial:!0,tokenize:yde};function mde(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Uw(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(xg,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(y)}return n(y)}function c(y){return Uw(y)&&++a<10?(e.consume(y),c):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Kh,r.interrupt?n:h,e.attempt(hde,m,p))}function h(y){return r.containerState.initialBlankLine=!0,o++,m(y)}function p(y){return xt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),m):n(y)}function m(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function gde(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Kh,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_t(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!xt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pde,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,_t(e,e.attempt(vr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function yde(e,t,n){const r=this;return _t(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function bde(e){e.exit(this.containerState.type)}function vde(e,t,n){const r=this;return _t(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!xt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const U2={name:"setextUnderline",resolveTo:xde,tokenize:wde};function xde(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function wde(e,t,n){const r=this;let i;return o;function o(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===i?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),xt(f)?_t(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Je(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Sde={tokenize:Cde};function Cde(e){const t=this,n=e.attempt(Kh,r,e.attempt(this.parser.constructs.flowInitial,i,_t(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Tfe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ede={resolveAll:V4()},kde=G4("string"),Rde=G4("text");function G4(e){return{resolveAll:V4(e==="text"?_de:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,u);return a;function a(h){return f(h)?o(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const p=i[h];let m=-1;if(p)for(;++m<p.length;){const y=p[m];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function V4(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function _de(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,u=0,c;for(;o--;){const f=i[o];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(f===-2)c=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Tde={42:vr,43:vr,45:vr,48:vr,49:vr,50:vr,51:vr,52:vr,53:vr,54:vr,55:vr,56:vr,57:vr,62:L4},Ade={91:$fe},Dde={[-2]:Ux,[-1]:Ux,32:Ux},Mde={35:Ffe,42:xg,45:[U2,xg],60:Hfe,61:U2,95:xg,96:z2,126:z2},Ode={38:F4,92:j4},$de={[-5]:Hx,[-4]:Hx,[-3]:Hx,33:ade,38:F4,42:Hw,60:[ufe,Xfe],91:ude,92:[Lfe,j4],93:yE,95:Hw,96:Sfe},Pde={null:[Hw,Ede]},Nde={null:[42,95]},Ide={null:[]},Lde=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nde,contentInitial:Ade,disable:Ide,document:Tde,flow:Mde,flowInitial:Dde,insideSpan:Pde,string:Ode,text:$de},Symbol.toStringTag,{value:"Module"}));function jde(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],u=[];const c={attempt:O(A),check:O(D),consume:_,enter:k,exit:T,interrupt:O(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:m,sliceStream:y,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function p(N){return a=gi(a,N),S(),a[a.length-1]!==null?[]:($(t,0),f.events=ub(o,f.events,f),f.events)}function m(N,M){return zde(y(N),M)}function y(N){return Fde(a,N)}function b(){const{_bufferIndex:N,_index:M,line:z,column:G,offset:j}=r;return{_bufferIndex:N,_index:M,line:z,column:G,offset:j}}function v(N){i[N.line]=N.column,L()}function S(){let N;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<M.length;)x(M.charCodeAt(r._bufferIndex));else x(M)}}function x(N){h=h(N)}function _(N){Je(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,L()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=N}function k(N,M){const z=M||{};return z.type=N,z.start=b(),f.events.push(["enter",z,f]),u.push(z),z}function T(N){const M=u.pop();return M.end=b(),f.events.push(["exit",M,f]),M}function A(N,M){$(N,M.from)}function D(N,M){M.restore()}function O(N,M){return z;function z(G,j,F){let U,q,W,I;return Array.isArray(G)?J(G):"tokenize"in G?J([G]):Y(G);function Y(he){return ve;function ve(Re){const ce=Re!==null&&he[Re],Ie=Re!==null&&he.null,We=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return J(We)(Re)}}function J(he){return U=he,q=0,he.length===0?F:H(he[q])}function H(he){return ve;function ve(Re){return I=B(),W=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?re():he.tokenize.call(M?Object.assign(Object.create(f),M):f,c,ie,re)(Re)}}function ie(he){return N(W,I),j}function re(he){return I.restore(),++q<U.length?H(U[q]):F}}}function $(N,M){N.resolveAll&&!o.includes(N)&&o.push(N),N.resolve&&Xr(f.events,M,f.events.length-M,N.resolve(f.events.slice(M),f)),N.resolveTo&&(f.events=N.resolveTo(f.events,f))}function B(){const N=b(),M=f.previous,z=f.currentConstruct,G=f.events.length,j=Array.from(u);return{from:G,restore:F};function F(){r=N,f.previous=M,f.currentConstruct=z,f.events.length=G,u=j,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Fde(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function zde(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
481
|
+
`;break}case-3:{a=`\r
|
|
482
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Bde(e){const r={constructs:N4([Lde,...(e||{}).extensions||[]]),content:i(nfe),defined:[],document:i(ife),flow:i(Sde),lazy:{},string:i(kde),text:i(Rde)};return r;function i(o){return a;function a(u){return jde(r,o,u)}}}function Ude(e){for(;!z4(e););return e}const H2=/[\0\t\n\r]/g;function Hde(){let e=1,t="",n=!0,r;return i;function i(o,a,u){const c=[];let f,h,p,m,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(H2.lastIndex=p,f=H2.exec(o),m=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(m),!f){t=o.slice(p);break}if(y===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(o.slice(p,m)),e+=m-p),y){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Gde=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vde(e){return e.replace(Gde,qde)}function qde(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return I4(n.slice(o?2:1),o?16:10)}return gE(n)||e}const q4={}.hasOwnProperty;function Yde(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Wde(n)(Ude(Bde(n).document().write(Hde()(e,t,!0))))}function Wde(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(oe),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(xe),blockQuote:o(Ie),characterEscape:B,characterReference:B,codeFenced:o(We),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(We,a),codeText:o(X,a),codeTextData:B,data:B,codeFlowValue:B,definition:o(Z),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(ne),hardBreakEscape:o(ge),hardBreakTrailing:o(ge),htmlFlow:o(Ce,a),htmlFlowData:B,htmlText:o(Ce,a),htmlTextData:B,image:o(le),label:a,link:o(oe),listItem:o(ae),listItemValue:m,listOrdered:o(me,p),listUnordered:o(me),paragraph:o(Oe),reference:H,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(xe),strong:o(Te),thematicBreak:o(De)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ce,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:he,characterReference:ve,codeFenced:c(S),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:L,codeIndented:c(x),codeText:c(j),codeTextData:L,data:L,definition:c(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(z),htmlFlowData:L,htmlText:c(G),htmlTextData:L,image:c(U),label:W,labelText:q,lineEnding:N,link:c(F),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:I,resourceTitleString:Y,resource:J,setextHeading:c($),setextHeadingLineSequence:O,setextHeadingText:D,strong:c(),thematicBreak:c()}};Y4(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let Se={type:"root",children:[]};const ke={stack:[Se],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:h,data:n},Pe=[];let Le=-1;for(;++Le<ue.length;)if(ue[Le][1].type==="listOrdered"||ue[Le][1].type==="listUnordered")if(ue[Le][0]==="enter")Pe.push(Le);else{const st=Pe.pop();Le=i(ue,st,Le)}for(Le=-1;++Le<ue.length;){const st=t[ue[Le][0]];q4.call(st,ue[Le][1].type)&&st[ue[Le][1].type].call(Object.assign({sliceSerialize:ue[Le][2].sliceSerialize},ke),ue[Le][1])}if(ke.tokenStack.length>0){const st=ke.tokenStack[ke.tokenStack.length-1];(st[1]||G2).call(ke,void 0,st[0])}for(Se.position={start:js(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:js(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<t.transforms.length;)Se=t.transforms[Le](Se)||Se;return Se}function i(ue,Se,ke){let Pe=Se-1,Le=-1,st=!1,Ut,Ot,Me,Xe;for(;++Pe<=ke;){const Ne=ue[Pe];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?Le++:Le--,Xe=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(Ut&&!Xe&&!Le&&!Me&&(Me=Pe),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!Le&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||Le===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(Ut){let Tt=Pe;for(Ot=void 0;Tt--;){const ft=ue[Tt];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Ot&&(ue[Ot][1].type="lineEndingBlank",st=!0),ft[1].type="lineEnding",Ot=Tt}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}Me&&(!Ot||Me<Ot)&&(Ut._spread=!0),Ut.end=Object.assign({},Ot?ue[Ot][1].start:Ne[1].end),ue.splice(Ot||Pe,0,["exit",Ut,Ne[2]]),Pe++,ke++}if(Ne[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};Ut=Tt,ue.splice(Pe,0,["enter",Tt,Ne[2]]),Pe++,ke++,Me=void 0,Xe=!0}}}return ue[Se][1]._spread=st,ke}function o(ue,Se){return ke;function ke(Pe){u.call(this,ue(Pe),Pe),Se&&Se.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(ue,Se,ke){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Se,ke||void 0]),ue.position={start:js(Se.start),end:void 0}}function c(ue){return Se;function Se(ke){ue&&ue.call(this,ke),f.call(this,ke)}}function f(ue,Se){const ke=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ue.type&&(Se?Se.call(this,ue,Pe[0]):(Pe[1]||G2).call(this,ue,Pe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Vd({start:ue.start,end:ue.end})+"): it’s not open");ke.position.end=js(ue.end)}function h(){return mE(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ue){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=ue}function b(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=ue}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/(\r?\n|\r)$/g,"")}function _(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=Fi(this.sliceSerialize(ue)).toLowerCase()}function k(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function T(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function A(ue){const Se=this.stack[this.stack.length-1];if(!Se.depth){const ke=this.sliceSerialize(ue).length;Se.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const ke=this.stack[this.stack.length-1].children;let Pe=ke[ke.length-1];(!Pe||Pe.type!=="text")&&(Pe=_e(),Pe.position={start:js(ue.start),end:void 0},ke.push(Pe)),this.stack.push(Pe)}function L(ue){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ue),Se.position.end=js(ue.end)}function N(ue){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=Se.children[Se.children.length-1];ke.position.end=js(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Se.type)&&(B.call(this,ue),L.call(this,ue))}function M(){this.data.atHardBreak=!0}function z(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function G(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function j(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function F(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function U(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function q(ue){const Se=this.sliceSerialize(ue),ke=this.stack[this.stack.length-2];ke.label=Vde(Se),ke.identifier=Fi(Se).toLowerCase()}function W(){const ue=this.stack[this.stack.length-1],Se=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Pe=ue.children;ke.children=Pe}else ke.alt=Se}function I(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function Y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function J(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=Fi(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function re(ue){this.data.characterReferenceType=ue.type}function he(ue){const Se=this.sliceSerialize(ue),ke=this.data.characterReferenceType;let Pe;ke?(Pe=I4(Se,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=gE(Se);const Le=this.stack[this.stack.length-1];Le.value+=Pe}function ve(ue){const Se=this.stack.pop();Se.position.end=js(ue.end)}function Re(ue){L.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ue)}function ce(ue){L.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ue)}function Ie(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function ge(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function me(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ae(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function Te(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function De(){return{type:"thematicBreak"}}}function js(e){return{line:e.line,column:e.column,offset:e.offset}}function Y4(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Y4(e,r):Kde(e,r)}}function Kde(e,t){let n;for(n in t)if(q4.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function G2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vd({start:t.start,end:t.end})+") is still open")}function Xde(e){const t=this;t.parser=n;function n(r){return Yde(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Qde(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Zde(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
483
|
+
`}]}function Jde(e,t){const n=t.value?t.value+`
|
|
484
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ehe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function the(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nhe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Sf(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function rhe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ihe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function W4(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function ohe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W4(e,t);const i={src:Sf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function she(e,t){const n={src:Sf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ahe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function lhe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W4(e,t);const i={href:Sf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function uhe(e,t){const n={href:Sf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function che(e,t,n){const r=e.all(t),i=n?fhe(n):K4(t),o={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let p;h&&h.type==="element"&&h.tagName==="p"?p=h:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
|
|
485
|
+
`}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
486
|
+
`});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function fhe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=K4(n[r])}return t}function K4(e){const t=e.spread;return t??e.children.length>1}function dhe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hhe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function phe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mhe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ghe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=fE(t.children[1]),c=T4(t.children[t.children.length-1]);u&&c&&(a.position={start:u,end:c}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function yhe(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let c=-1;const f=[];for(;++c<u;){const p=t.children[c],m={},y=a?a[c]:void 0;y&&(m.align=y);let b={type:"element",tagName:o,properties:m,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function bhe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const V2=9,q2=32;function vhe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Y2(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Y2(t.slice(i),i>0,!1)),o.join("")}function Y2(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===V2||o===q2;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===V2||o===q2;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xhe(e,t){const n={type:"text",value:vhe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function whe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const She={blockquote:Qde,break:Zde,code:Jde,delete:ehe,emphasis:the,footnoteReference:nhe,heading:rhe,html:ihe,imageReference:ohe,image:she,inlineCode:ahe,linkReference:lhe,link:uhe,listItem:che,list:dhe,paragraph:hhe,root:phe,strong:mhe,table:ghe,tableCell:bhe,tableRow:yhe,text:xhe,thematicBreak:whe,toml:Wm,yaml:Wm,definition:Wm,footnoteDefinition:Wm};function Wm(){}const X4=-1,cb=0,Yd=1,by=2,bE=3,vE=4,xE=5,wE=6,Q4=7,Z4=8,W2=typeof self=="object"?self:globalThis,Che=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case cb:case X4:return n(a,i);case Yd:{const u=n([],i);for(const c of a)u.push(r(c));return u}case by:{const u=n({},i);for(const[c,f]of a)u[r(c)]=r(f);return u}case bE:return n(new Date(a),i);case vE:{const{source:u,flags:c}=a;return n(new RegExp(u,c),i)}case xE:{const u=n(new Map,i);for(const[c,f]of a)u.set(r(c),r(f));return u}case wE:{const u=n(new Set,i);for(const c of a)u.add(r(c));return u}case Q4:{const{name:u,message:c}=a;return n(new W2[u](c),i)}case Z4:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new W2[o](a),i)};return r},K2=e=>Che(new Map,e)(0),Ju="",{toString:Ehe}={},{keys:khe}=Object,Ad=e=>{const t=typeof e;if(t!=="object"||!e)return[cb,t];const n=Ehe.call(e).slice(8,-1);switch(n){case"Array":return[Yd,Ju];case"Object":return[by,Ju];case"Date":return[bE,Ju];case"RegExp":return[vE,Ju];case"Map":return[xE,Ju];case"Set":return[wE,Ju];case"DataView":return[Yd,n]}return n.includes("Array")?[Yd,n]:n.includes("Error")?[Q4,n]:[by,n]},Km=([e,t])=>e===cb&&(t==="function"||t==="symbol"),Rhe=(e,t,n,r)=>{const i=(a,u)=>{const c=r.push(a)-1;return n.set(u,c),c},o=a=>{if(n.has(a))return n.get(a);let[u,c]=Ad(a);switch(u){case cb:{let h=a;switch(c){case"bigint":u=Z4,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([X4],a)}return i([u,h],a)}case Yd:{if(c){let m=a;return c==="DataView"?m=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(a)),i([c,[...m]],a)}const h=[],p=i([u,h],a);for(const m of a)h.push(o(m));return p}case by:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const h=[],p=i([u,h],a);for(const m of khe(a))(e||!Km(Ad(a[m])))&&h.push([o(m),o(a[m])]);return p}case bE:return i([u,a.toISOString()],a);case vE:{const{source:h,flags:p}=a;return i([u,{source:h,flags:p}],a)}case xE:{const h=[],p=i([u,h],a);for(const[m,y]of a)(e||!(Km(Ad(m))||Km(Ad(y))))&&h.push([o(m),o(y)]);return p}case wE:{const h=[],p=i([u,h],a);for(const m of a)(e||!Km(Ad(m)))&&h.push(o(m));return p}}const{message:f}=a;return i([u,{name:c,message:f}],a)};return o},X2=(e,{json:t,lossy:n}={})=>{const r=[];return Rhe(!(t||n),!!t,new Map,r)(e),r},vy=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?K2(X2(e,t)):structuredClone(e):(e,t)=>K2(X2(e,t));function _he(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function The(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ahe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_he,r=e.options.footnoteBackLabel||The,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const h=e.all(f),p=String(f.identifier).toUpperCase(),m=Sf(p.toLowerCase());let y=0;const b=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++y<=v;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,y);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,y),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(f,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...vy(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
487
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
488
|
+
`}]}}const fb=(function(e){if(e==null)return $he;if(typeof e=="function")return db(e);if(typeof e=="object")return Array.isArray(e)?Dhe(e):Mhe(e);if(typeof e=="string")return Ohe(e);throw new Error("Expected function, string, or object as test")});function Dhe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fb(e[n]);return db(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Mhe(e){const t=e;return db(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ohe(e){return db(t);function t(n){return n&&n.type===e}}function db(e){return t;function t(n,r,i){return!!(Phe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $he(){return!0}function Phe(e){return e!==null&&typeof e=="object"&&"type"in e}const J4=[],Nhe=!0,Gw=!1,Ihe="skip";function e3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=fb(i),a=r?-1:1;u(e,void 0,[])();function u(c,f,h){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(y?"<"+y+">":""))+")"})}return m;function m(){let y=J4,b,v,S;if((!t||o(c,f,h[h.length-1]||void 0))&&(y=Lhe(n(c,h)),y[0]===Gw))return y;if("children"in c&&c.children){const x=c;if(x.children&&y[0]!==Ihe)for(v=(r?x.children.length:-1)+a,S=h.concat(x);v>-1&&v<x.children.length;){const _=x.children[v];if(b=u(_,v,S)(),b[0]===Gw)return b;v=typeof b[1]=="number"?b[1]:v+a}}return y}}}function Lhe(e){return Array.isArray(e)?e:typeof e=="number"?[Nhe,e]:e==null?J4:[e]}function hb(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),e3(e,o,u,i);function u(c,f){const h=f[f.length-1],p=h?h.children.indexOf(c):void 0;return a(c,p,h)}}const Vw={}.hasOwnProperty,jhe={};function Fhe(e,t){const n=t||jhe,r=new Map,i=new Map,o=new Map,a={...She,...n.handlers},u={all:f,applyData:Bhe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:zhe,wrap:Hhe};return hb(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:i,m=String(h.identifier).toUpperCase();p.has(m)||p.set(m,h)}}),u;function c(h,p){const m=h.type,y=u.handlers[m];if(Vw.call(u.handlers,m)&&y)return y(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in h){const{children:v,...S}=h,x=vy(S);return x.children=u.all(h),x}return vy(h)}return(u.options.unknownHandler||Uhe)(u,h,p)}function f(h){const p=[];if("children"in h){const m=h.children;let y=-1;for(;++y<m.length;){const b=u.one(m[y],h);if(b){if(y&&m[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Q2(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=Q2(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function zhe(e,t){e.position&&(t.position=Tce(e))}function Bhe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,vy(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Uhe(e,t){const n=t.data||{},r="value"in t&&!(Vw.call(n,"hProperties")||Vw.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Hhe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
489
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
490
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
491
|
+
`}),n}function Q2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Z2(e,t){const n=Fhe(e,t),r=n.one(e,void 0),i=Ahe(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
492
|
+
`},i),o}function Ghe(e,t){return e&&"run"in e?async function(n,r){const i=Z2(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Z2(n,{file:r,...e||t})}}function J2(e){if(e)throw e}var Gx,eO;function Vhe(){if(eO)return Gx;eO=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var m;for(m in f);return typeof m>"u"||e.call(f,m)},a=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Gx=function c(){var f,h,p,m,y,b,v=arguments[0],S=1,x=arguments.length,_=!1;for(typeof v=="boolean"&&(_=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<x;++S)if(f=arguments[S],f!=null)for(h in f)p=u(v,h),m=u(f,h),v!==m&&(_&&m&&(o(m)||(y=i(m)))?(y?(y=!1,b=p&&i(p)?p:[]):b=p&&o(p)?p:{},a(v,{name:h,newValue:c(_,b,m)})):typeof m<"u"&&a(v,{name:h,newValue:m}));return v},Gx}var qhe=Vhe();const Vx=Zw(qhe);function qw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yhe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(c,...f){const h=e[++o];let p=-1;if(c){a(c);return}for(;++p<i.length;)(f[p]===null||f[p]===void 0)&&(f[p]=i[p]);i=f,h?Whe(h,u)(...f):a(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Whe(e,t){let n;return r;function r(...a){const u=e.length>a.length;let c;u&&a.push(i);try{c=e.apply(this,a)}catch(f){const h=f;if(u&&n)throw h;return i(h)}u||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(a,...u){n||(n=!0,t(a,...u))}function o(a){i(null,a)}}const Ki={basename:Khe,dirname:Xhe,extname:Qhe,join:Zhe,sep:"/"};function Khe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xh(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Xhe(e){if(Xh(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Qhe(e){Xh(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Zhe(...e){let t=-1,n;for(;++t<e.length;)Xh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Jhe(n)}function Jhe(e){Xh(e);const t=e.codePointAt(0)===47;let n=epe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function epe(e,t){let n="",r=0,i=-1,o=0,a=-1,u,c;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else u===46&&o>-1?o++:o=-1}return n}function Xh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tpe={cwd:npe};function npe(){return"/"}function Yw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rpe(e){if(typeof e=="string")e=new URL(e);else if(!Yw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ipe(e)}function ipe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const qx=["history","path","basename","stem","extname","dirname"];class t3{constructor(t){let n;t?Yw(t)?n={path:t}:typeof t=="string"||ope(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tpe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qx.length;){const o=qx[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)qx.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){Wx(t,"basename"),Yx(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){tO(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(Yx(t,"extname"),tO(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Yw(t)&&(t=rpe(t)),Wx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){Wx(t,"stem"),Yx(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new tr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yx(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function Wx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tO(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ope(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const spe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),ape={}.hasOwnProperty;class SE extends spe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yhe()}copy(){const t=new SE;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Vx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Qx("data",this.frozen),this.namespace[t]=n,this):ape.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qx("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xm(t),r=this.parser||this.Parser;return Kx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Kx("process",this.parser||this.Parser),Xx("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const u=Xm(t),c=r.parse(u);r.run(c,u,function(h,p,m){if(h||!p||!m)return f(h);const y=p,b=r.stringify(y,m);cpe(b)?m.value=b:m.result=b,f(h,m)});function f(h,p){h||!p?a(h):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Kx("processSync",this.parser||this.Parser),Xx("processSync",this.compiler||this.Compiler),this.process(t,i),rO("processSync","process",n),r;function i(o,a){n=!0,J2(o),r=a}}run(t,n,r){nO(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,u){const c=Xm(n);i.run(t,c,f);function f(h,p,m){const y=p||t;h?u(h):a?a(y):r(void 0,y,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),rO("runSync","run",r),i;function o(a,u){J2(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Xm(n),i=this.compiler||this.Compiler;return Xx("stringify",i),nO(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Qx("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;c(h,p)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(i.settings=Vx(!0,i.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];o(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,h){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===f){m=p;break}if(m===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[m][1];qw(v)&&qw(y)&&(y=Vx(!0,v,y)),r[m]=[f,y,...b]}}}}const lpe=new SE().freeze();function Kx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nO(e){if(!qw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rO(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xm(e){return upe(e)?e:new t3(e)}function upe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cpe(e){return typeof e=="string"||fpe(e)}function fpe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dpe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",iO=[],oO={allowDangerousHtml:!0},hpe=/^(https?|ircs?|mailto|xmpp)$/i,ppe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mpe(e){const t=gpe(e),n=ype(e);return bpe(t.runSync(t.parse(n),n),e)}function gpe(e){const t=e.rehypePlugins||iO,n=e.remarkPlugins||iO,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oO}:oO;return lpe().use(Xde).use(n).use(Ghe,r).use(t)}function ype(e){const t=e.children||"",n=new t3;return typeof t=="string"&&(n.value=t),n}function bpe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||vpe;for(const h of ppe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+dpe+h.id,void 0);return hb(e,f),$ce(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function f(h,p,m){if(h.type==="raw"&&m&&typeof p=="number")return a?m.children.splice(p,1):m.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let y;for(y in Bx)if(Object.hasOwn(Bx,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=Bx[y];(v===null||v.includes(h.tagName))&&(h.properties[y]=c(String(b||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(h,p,m)),y&&m&&typeof p=="number")return u&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p}}}function vpe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||hpe.test(e.slice(0,t))?e:""}const xpe=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,wpe=Object.hasOwnProperty;class Spe{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=Cpe(t,n===!0);const o=i;for(;wpe.call(r.occurrences,i);)r.occurrences[o]++,i=o+"-"+r.occurrences[o];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function Cpe(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(xpe,"").replace(/ /g,"-"))}function Epe(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}function kpe(e){return"children"in e?n3(e):"value"in e?e.value:""}function Rpe(e){return e.type==="text"?e.value:"children"in e?n3(e):""}function n3(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Rpe(e.children[t]);return n.join("")}const _pe={},sO=new Spe;function Tpe(e){const n=(e||_pe).prefix||"";return function(r){sO.reset(),hb(r,"element",function(i){Epe(i)&&!i.properties.id&&(i.properties.id=n+sO.slug(kpe(i)))})}}function Ape(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Dpe(e,t,n){const i=fb((n||{}).ignore||[]),o=Mpe(t);let a=-1;for(;++a<o.length;)e3(e,"text",u);function u(f,h){let p=-1,m;for(;++p<h.length;){const y=h[p],b=m?m.children:void 0;if(i(y,b?b.indexOf(y):void 0,m))return;m=y}if(m)return c(f,h)}function c(f,h){const p=h[h.length-1],m=o[a][0],y=o[a][1];let b=0;const S=p.children.indexOf(f);let x=!1,_=[];m.lastIndex=0;let k=m.exec(f.value);for(;k;){const T=k.index,A={index:k.index,input:k.input,stack:[...h,f]};let D=y(...k,A);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?m.lastIndex=T+1:(b!==T&&_.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(D)?_.push(...D):D&&_.push(D),b=T+k[0].length,x=!0),!m.global)break;k=m.exec(f.value)}return x?(b<f.value.length&&_.push({type:"text",value:f.value.slice(b)}),p.children.splice(S,1,..._)):_=[f],S+_.length}}function Mpe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Ope(i[0]),$pe(i[1])])}return t}function Ope(e){return typeof e=="string"?new RegExp(Ape(e),"g"):e}function $pe(e){return typeof e=="function"?e:function(){return e}}const Zx="phrasing",Jx=["autolink","link","image","label"];function Ppe(){return{transforms:[Bpe],enter:{literalAutolink:Ipe,literalAutolinkEmail:e1,literalAutolinkHttp:e1,literalAutolinkWww:e1},exit:{literalAutolink:zpe,literalAutolinkEmail:Fpe,literalAutolinkHttp:Lpe,literalAutolinkWww:jpe}}}function Npe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zx,notInConstruct:Jx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zx,notInConstruct:Jx},{character:":",before:"[ps]",after:"\\/",inConstruct:Zx,notInConstruct:Jx}]}}function Ipe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function e1(e){this.config.enter.autolinkProtocol.call(this,e)}function Lpe(e){this.config.exit.autolinkProtocol.call(this,e)}function jpe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Fpe(e){this.config.exit.autolinkEmail.call(this,e)}function zpe(e){this.exit(e)}function Bpe(e){Dpe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Upe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Hpe]],{ignore:["link","linkReference"]})}function Upe(e,t,n,r,i){let o="";if(!r3(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Gpe(n)))return!1;const a=Vpe(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function Hpe(e,t,n,r){return!r3(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Gpe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Vpe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Kg(e,"(");let o=Kg(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function r3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xl(n)||lb(n))&&(!t||n!==47)}i3.peek=eme;function qpe(){this.buffer()}function Ype(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wpe(){this.buffer()}function Kpe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xpe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qpe(e){this.exit(e)}function Zpe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Fi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jpe(e){this.exit(e)}function eme(){return"["}function i3(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),a(),o+=i.move("]"),o}function tme(){return{enter:{gfmFootnoteCallString:qpe,gfmFootnoteCall:Ype,gfmFootnoteDefinitionLabelString:Wpe,gfmFootnoteDefinition:Kpe},exit:{gfmFootnoteCallString:Xpe,gfmFootnoteCall:Qpe,gfmFootnoteDefinitionLabelString:Zpe,gfmFootnoteDefinition:Jpe}}}function nme(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:i3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const u=o.createTracker(a);let c=u.move("[^");const f=o.enter("footnoteDefinition"),h=o.enter("label");return c+=u.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),c+=u.move((t?`
|
|
493
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?o3:rme))),f(),c}}function rme(e,t,n){return t===0?e:o3(e,t,n)}function o3(e,t,n){return(n?"":" ")+e}const ime=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];s3.peek=ume;function ome(){return{canContainEols:["delete"],enter:{strikethrough:ame},exit:{strikethrough:lme}}}function sme(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ime}],handlers:{delete:s3}}}function ame(e){this.enter({type:"delete",children:[]},e)}function lme(e){this.exit(e)}function s3(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function ume(){return"~"}function cme(e){return e.length}function fme(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cme,o=[],a=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],S=[];let x=-1;for(e[h].length>f&&(f=e[h].length);++x<e[h].length;){const _=dme(e[h][x]);if(n.alignDelimiters!==!1){const k=i(_);S[x]=k,(c[x]===void 0||k>c[x])&&(c[x]=k)}v.push(_)}a[h]=v,u[h]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=aO(r[p]);else{const v=aO(r);for(;++p<f;)o[p]=v}p=-1;const m=[],y=[];for(;++p<f;){const v=o[p];let S="",x="";v===99?(S=":",x=":"):v===108?S=":":v===114&&(x=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[p]-S.length-x.length);const k=S+"-".repeat(_)+x;n.alignDelimiters!==!1&&(_=S.length+_+x.length,_>c[p]&&(c[p]=_),y[p]=_),m[p]=k}a.splice(1,0,m),u.splice(1,0,y),h=-1;const b=[];for(;++h<a.length;){const v=a[h],S=u[h];p=-1;const x=[];for(;++p<f;){const _=v[p]||"";let k="",T="";if(n.alignDelimiters!==!1){const A=c[p]-(S[p]||0),D=o[p];D===114?k=" ".repeat(A):D===99?A%2?(k=" ".repeat(A/2+.5),T=" ".repeat(A/2-.5)):(k=" ".repeat(A/2),T=k):T=" ".repeat(A)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(k),x.push(_),n.alignDelimiters!==!1&&x.push(T),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&x.push("|")}b.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return b.join(`
|
|
494
|
+
`)}function dme(e){return e==null?"":String(e)}function aO(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hme(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),pme);return i(),a}function pme(e,t,n){return">"+(n?"":" ")+e}function mme(e,t){return lO(e,t.inConstruct,!0)&&!lO(e,t.notInConstruct,!1)}function lO(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uO(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
495
|
+
`&&mme(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
496
|
+
`}function gme(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function yme(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bme(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vme(e,t,n,r){const i=bme(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(yme(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(o,xme);return p(),m}const u=n.createTracker(r),c=i.repeat(Math.max(gme(o,i)+1,3)),f=n.enter("codeFenced");let h=u.move(c);if(e.lang){const p=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
497
|
+
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
498
|
+
`),o&&(h+=u.move(o+`
|
|
499
|
+
`)),h+=u.move(c),f(),h}function xme(e,t,n){return(n?"":" ")+e}function CE(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wme(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
500
|
+
`,...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),a(),f}function Sme(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function mh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xy(e,t,n){const r=ef(e),i=ef(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}a3.peek=Cme;function a3(e,t,n,r){const i=Sme(n),o=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=xy(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=mh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=xy(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+mh(p));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},u+c+y}function Cme(e,t,n){return n.options.emphasis||"*"}function Eme(e,t){let n=!1;return hb(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Gw}),!!((!e.depth||e.depth<3)&&mE(e)&&(t.options.setext||n))}function kme(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Eme(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...o.current(),before:`
|
|
501
|
+
`,after:`
|
|
502
|
+
`});return p(),h(),m+`
|
|
503
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
504
|
+
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
505
|
+
`,...o.current()});return/^[\t ]/.test(f)&&(f=mh(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),u(),f}l3.peek=Rme;function l3(e){return e.value||""}function Rme(){return"<"}u3.peek=_me;function u3(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),f+=c.move(")"),a(),f}function _me(){return"!"}c3.peek=Tme;function c3(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const f=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Tme(){return"!"}f3.peek=Ame;function f3(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],u=n.compilePattern(a);let c;if(a.atBreak)for(;c=u.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function Ame(){return"`"}function d3(e,t){const n=mE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}h3.peek=Dme;function h3(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,c;if(d3(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),u(),n.stack=h,p}u=n.enter("link"),c=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(c=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=a.move(" "+i),f+=a.move(n.safe(e.title,{before:f,after:i,...a.current()})),f+=a.move(i),c()),f+=a.move(")"),u(),f}function Dme(e,t,n){return d3(e,n)?"<":"["}p3.peek=Mme;function p3(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Mme(){return"["}function EE(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ome(e){const t=EE(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function $me(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function m3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pme(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?$me(n):EE(n);const u=e.ordered?a==="."?")":".":Ome(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),m3(n)===a&&h){let p=-1;for(;++p<e.children.length;){const m=e.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=u),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),f}function Nme(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ime(e,t,n,r){const i=Nme(n);let o=n.bulletCurrent||EE(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(a-o.length)),u.shift(a);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return c(),f;function h(p,m,y){return m?(y?"":" ".repeat(a))+p:(y?o:o+" ".repeat(a-o.length))+p}}function Lme(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const jme=fb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Fme(e,t,n,r){return(e.children.some(function(a){return jme(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zme(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}g3.peek=Bme;function g3(e,t,n,r){const i=zme(n),o=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=xy(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=mh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=xy(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+mh(p));const y=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},u+c+y}function Bme(e,t,n){return n.options.strong||"*"}function Ume(e,t,n,r){return n.safe(e.value,r)}function Hme(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Gme(e,t,n){const r=(m3(n)+(n.options.ruleSpaces?" ":"")).repeat(Hme(n));return n.options.ruleSpaces?r.slice(0,-1):r}const y3={blockquote:hme,break:uO,code:vme,definition:wme,emphasis:a3,hardBreak:uO,heading:kme,html:l3,image:u3,imageReference:c3,inlineCode:f3,link:h3,linkReference:p3,list:Pme,listItem:Ime,paragraph:Lme,root:Fme,strong:g3,text:Ume,thematicBreak:Gme};function Vme(){return{enter:{table:qme,tableData:cO,tableHeader:cO,tableRow:Wme},exit:{codeText:Kme,table:Yme,tableData:t1,tableHeader:t1,tableRow:t1}}}function qme(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Yme(e){this.exit(e),this.data.inTable=void 0}function Wme(e){this.enter({type:"tableRow",children:[]},e)}function t1(e){this.exit(e)}function cO(e){this.enter({type:"tableCell",children:[]},e)}function Kme(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xme));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xme(e,t){return t==="|"?t:e}function Qme(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
506
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:c,tableRow:u}};function a(y,b,v,S){return f(h(y,v,S),y.align)}function u(y,b,v,S){const x=p(y,v,S),_=f([x]);return _.slice(0,_.indexOf(`
|
|
507
|
+
`))}function c(y,b,v,S){const x=v.enter("tableCell"),_=v.enter("phrasing"),k=v.containerPhrasing(y,{...S,before:o,after:o});return _(),x(),k}function f(y,b){return fme(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,v){const S=y.children;let x=-1;const _=[],k=b.enter("table");for(;++x<S.length;)_[x]=p(S[x],b,v);return k(),_}function p(y,b,v){const S=y.children;let x=-1;const _=[],k=b.enter("tableRow");for(;++x<S.length;)_[x]=c(S[x],y,b,v);return k(),_}function m(y,b,v){let S=y3.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Zme(){return{exit:{taskListCheckValueChecked:fO,taskListCheckValueUnchecked:fO,paragraph:ege}}}function Jme(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tge}}}function fO(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ege(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tge(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(a);let c=y3.listItem(e,t,n,{...r,...u.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+a}}function nge(){return[Ppe(),tme(),ome(),Vme(),Zme()]}function rge(e){return{extensions:[Npe(),nme(e),sme(),Qme(e),Jme()]}}const ige={tokenize:cge,partial:!0},b3={tokenize:fge,partial:!0},v3={tokenize:dge,partial:!0},x3={tokenize:hge,partial:!0},oge={tokenize:pge,partial:!0},w3={name:"wwwAutolink",tokenize:lge,previous:C3},S3={name:"protocolAutolink",tokenize:uge,previous:E3},cs={name:"emailAutolink",tokenize:age,previous:k3},co={};function sge(){return{text:co}}let dl=48;for(;dl<123;)co[dl]=cs,dl++,dl===58?dl=65:dl===91&&(dl=97);co[43]=cs;co[45]=cs;co[46]=cs;co[95]=cs;co[72]=[cs,S3];co[104]=[cs,S3];co[87]=[cs,w3];co[119]=[cs,w3];function age(e,t,n){const r=this;let i,o;return a;function a(p){return!Ww(p)||!k3.call(r,r.previous)||kE(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Ww(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(oge,h,f)(p):p===45||p===95||Zn(p)?(o=!0,e.consume(p),c):h(p)}function f(p){return e.consume(p),i=!0,c}function h(p){return o&&i&&ar(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function lge(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!C3.call(r,r.previous)||kE(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ige,e.attempt(b3,e.attempt(v3,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function uge(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&E3.call(r,r.previous)&&!kE(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(ar(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),o?f:(o=!0,c)):n(p)}function f(p){return p===null||yy(p)||Wt(p)||Xl(p)||lb(p)?n(p):e.attempt(b3,e.attempt(v3,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function cge(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function fge(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(x3,c,u)(f):f===null||Wt(f)||Xl(f)||f!==45&&lb(f)?c(f):(o=!0,e.consume(f),a)}function u(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),a}function c(f){return i||r||!o?n(f):t(f)}}function dge(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(x3,t,o)(a):a===null||Wt(a)||Xl(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function hge(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||Wt(u)||Xl(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Wt(u)||Xl(u)?t(u):r(u)}function o(u){return ar(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):ar(u)?(e.consume(u),a):n(u)}}function pge(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Zn(o)?n(o):t(o)}}function C3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Wt(e)}function E3(e){return!ar(e)}function k3(e){return!(e===47||Ww(e))}function Ww(e){return e===43||e===45||e===46||e===95||Zn(e)}function kE(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mge={tokenize:Cge,partial:!0};function gge(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xge,continuation:{tokenize:wge},exit:Sge}},text:{91:{name:"gfmFootnoteCall",tokenize:vge},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yge,resolveTo:bge}}}}function yge(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!a||!a._balanced)return n(c);const f=Fi(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function bge(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function vge(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!a||p===null||p===91||Wt(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Fi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Wt(p)||(a=!0),o++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function xge(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,u;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(a>999||b===93&&!u||b===null||b===91||Wt(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Fi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Wt(b)||(u=!0),a++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),a++,h):h(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(o)||i.push(o),_t(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function wge(e,t,n){return e.check(Kh,t,e.attempt(mge,t,n))}function Sge(e){e.exit("gfmFootnoteDefinition")}function Cge(e,t,n){const r=this;return _t(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Ege(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let f=c;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[c][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[c][1].end)},p={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[c][1].start)},m=[["enter",h,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Xr(m,m.length,0,ub(y,a.slice(f+1,c),u)),Xr(m,m.length,0,[["exit",p,u],["enter",a[c][1],u],["exit",a[c][1],u],["exit",h,u]]),Xr(a,f-1,c-f+3,m),c=f+m.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function o(a,u,c){const f=this.previous,h=this.events;let p=0;return m;function m(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(a.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const v=ef(f);if(b===126)return p>1?c(b):(a.consume(b),p++,y);if(p<2&&!n)return c(b);const S=a.exit("strikethroughSequenceTemporary"),x=ef(b);return S._open=!x||x===2&&!!v,S._close=!v||v===2&&!!x,u(b)}}}class kge{constructor(){this.map=[]}add(t,n,r){Rge(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Rge(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function _ge(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Tge(){return{flow:{null:{name:"table",tokenize:Age,resolveAll:Dge}}}}function Age(e,t,n){const r=this;let i=0,o=0,a;return u;function u(L){let N=r.events.length-1;for(;N>-1;){const G=r.events[N][1].type;if(G==="lineEnding"||G==="linePrefix")N--;else break}const M=N>-1?r.events[N][1].type:null,z=M==="tableHead"||M==="tableRow"?D:c;return z===D&&r.parser.lazy[r.now().line]?n(L):z(L)}function c(L){return e.enter("tableHead"),e.enter("tableRow"),f(L)}function f(L){return L===124||(a=!0,o+=1),h(L)}function h(L){return L===null?n(L):Je(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),y):n(L):xt(L)?_t(e,h,"whitespace")(L):(o+=1,a&&(a=!1,i+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(L)))}function p(L){return L===null||L===124||Wt(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?m:p)}function m(L){return L===92||L===124?(e.consume(L),p):p(L)}function y(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),a=!1,xt(L)?_t(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):b(L))}function b(L){return L===45||L===58?S(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),v):A(L)}function v(L){return xt(L)?_t(e,S,"whitespace")(L):S(L)}function S(L){return L===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),x):L===45?(o+=1,x(L)):L===null||Je(L)?T(L):A(L)}function x(L){return L===45?(e.enter("tableDelimiterFiller"),_(L)):A(L)}function _(L){return L===45?(e.consume(L),_):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return xt(L)?_t(e,T,"whitespace")(L):T(L)}function T(L){return L===124?b(L):L===null||Je(L)?!a||i!==o?A(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):A(L)}function A(L){return n(L)}function D(L){return e.enter("tableRow"),O(L)}function O(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),O):L===null||Je(L)?(e.exit("tableRow"),t(L)):xt(L)?_t(e,O,"whitespace")(L):(e.enter("data"),$(L))}function $(L){return L===null||L===124||Wt(L)?(e.exit("data"),O(L)):(e.consume(L),L===92?B:$)}function B(L){return L===92||L===124?(e.consume(L),$):$(L)}}function Dge(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],u=!1,c=0,f,h,p;const m=new kge;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(dO(m,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],p=Qm(m,t,o,i,void 0,p),o=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],p=Qm(m,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(u=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,o[1]!==0?(a[0]=a[1],p=Qm(m,t,o,i,n,p)):a[1]!==0&&(p=Qm(m,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&dO(m,t,c,f,h),m.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=_ge(t.events,n))}return e}function Qm(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},oc(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=oc(t.events,n[1]);if(o={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=oc(t.events,n[2]),h=oc(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],y=t.events[n[3]];if(m[1].end=Object.assign({},y[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,v=n[3]-n[2]-1;e.add(b,v,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(o.end=Object.assign({},oc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function dO(e,t,n,r,i){const o=[],a=oc(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function oc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Mge={name:"tasklistCheck",tokenize:$ge};function Oge(){return{text:{91:Mge}}}function $ge(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Wt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Je(c)?t(c):xt(c)?e.check({tokenize:Pge},t,n)(c):n(c)}}function Pge(e,t,n){return _t(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Nge(e){return N4([sge(),gge(),Ege(e),Tge(),Oge()])}const Ige={};function Lge(e){const t=this,n=e||Ige,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nge(n)),o.push(nge()),a.push(rge(n))}const jge=new Set(Object.keys(VI)),hO={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function Fge(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(hO[n])return hO[n];if(jge.has(n))return n}function R3(e){var t;return C.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function zge(e){return C.isValidElement(e)&&e.type===Zc}function Bge(e){return C.Children.toArray(e).some(t=>{if(!C.isValidElement(t))return!1;const n=C.Children.toArray(t.props.children);return R3(n[0])})}function Kw(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Kw).join("");if(C.isValidElement(e)){const t=e.props.children;return Kw(t)}return""}function pO(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t)).map((t,n)=>{const r=C.Children.toArray(t.props.children),i=r[0];if(R3(i)){const a=!!i.props.checked,u=r.slice(1);return{value:`item-${n}`,label:E.jsxs(Ze,{ay:"center",gap:2,children:[E.jsx(Iz,{checked:a,disabled:!0}),E.jsx(Fe,{size:1,children:u})]})}}const o=r.findIndex(zge);if(o>=0){const a=r[o],u=[...r.slice(0,o),...r.slice(o+1)];return{id:`group-${n}`,category:Kw(u).trim(),items:a.props.items??[]}}return{value:`item-${n}`,label:E.jsx(Fe,{size:1,children:r})}})}const Uge={p:({children:e})=>E.jsx(Fe,{my:1,size:1,render:E.jsx("p",{}),children:e}),h1:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:4,my:2,render:E.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:3,mt:2,render:E.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:1,my:1,render:E.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:1,render:E.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:0,render:E.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>E.jsx(Fe,{weight:"bold",size:-1,render:E.jsx("h6",{id:t}),children:e}),strong:({children:e})=>E.jsx(Fe,{weight:"bold",children:e}),em:({children:e})=>E.jsx(Fe,{render:E.jsx("em",{}),children:e}),del:({children:e})=>E.jsx(Fe,{strikethrough:!0,render:E.jsx("del",{}),children:e}),a:({children:e,href:t})=>E.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>E.jsx(Zc,{type:Bge(e)?"none":"unordered",size:"large",items:pO(e),style:{display:"block"},my:2}),ol:({children:e})=>E.jsx(Zc,{type:"ordered",size:"large",items:pO(e),style:{display:"block"},my:2}),blockquote:({children:e})=>E.jsx("blockquote",{children:e}),hr:()=>E.jsx(U$,{}),table:({children:e})=>E.jsx(iE,{children:E.jsx(oE,{bordered:!0,children:e})}),thead:({children:e})=>E.jsx(x4,{children:e}),tbody:({children:e})=>E.jsx(aE,{children:e}),tr:({children:e})=>E.jsx(sE,{children:e}),th:({children:e})=>E.jsx(w4,{children:e}),td:({children:e})=>E.jsx(hh,{children:e}),pre:({children:e})=>E.jsx(E.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
|
|
508
|
+
`)?E.jsx(hC,{code:r.replace(/\n$/,""),language:Fge(e),copyable:!0,style:{width:"100%",marginBlockEnd:"0.5rem"}}):E.jsx(aj,{...n,children:t})}},Hge=[Lge],Gge=[Tpe];function Vge({children:e,components:t}){return E.jsx(Ye,{gap:4,fullwidth:!0,children:E.jsx(mpe,{remarkPlugins:Hge,rehypePlugins:Gge,components:{...Uge,...t},children:e})})}const wa=C.memo(Vge),RE=({children:e,...t})=>E.jsx(Ye,{"data-slot":"sidebar",render:E.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});RE.displayName="SidebarWrapper";const qge=["active","waiting","paused","archived"],Yge={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},Wge=["today","yesterday","thisWeek","earlier"],Kge={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"},Xge=1440*60*1e3;function Qge(e,t){const n=new Date(e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=Math.floor((r.getTime()-i.getTime())/Xge);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function n1(e){const t=cE(e.session.status),n=e.session.status==="archived";return{value:e.session.id,label:E.jsx(T3,{session:e}),content:E.jsxs(Ze,{gap:2,ay:"center",mt:1,mb:2,children:[E.jsx(Ly,{color:t}),E.jsx(A3,{session:e})]}),action:E.jsx(D3,{session:e.session,groupPath:e.groupPath}),"data-archived":n?"":void 0,style:n?{opacity:.4}:void 0}}function Zge(e,t){if(t==="status"){const r=new Map;for(const i of e){const o=i.session.status,a=r.get(o);a?a.push(i):r.set(o,[i])}return qge.filter(i=>r.has(i)).map(i=>({category:Yge[i],collapsible:!0,items:r.get(i).map(n1)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=Qge(o.session.startedAt,r),u=i.get(a);u?u.push(o):i.set(a,[o])}return Wge.filter(o=>i.has(o)).map(o=>({category:Kge[o],collapsible:!0,items:i.get(o).map(n1)}))}const n=new Map;for(const r of e){const i=r.groupPath,o=n.get(i);o?o.push(r):n.set(i,[r])}return Array.from(n,([r,i])=>({category:r,collapsible:!0,items:i.map(n1)}))}const mO=e=>e.id??e.category??"",_3=({WrapperProps:e})=>{const[t,n]=C.useState(""),[r,i]=C.useState("group"),[o,a]=C.useState(!1),[u,c]=C.useState({}),f=C.useRef(null),{data:h=[]}=Si(Kl({includeArchived:o})),p=C.useMemo(()=>{const S=t.trim().toLowerCase(),x=S?h.filter(_=>_.session.slug.toLowerCase().includes(S)||_.session.name.toLowerCase().includes(S)||_.groupPath.toLowerCase().includes(S)):h;return Zge(x,r)},[h,t,r]),m=p.map(mO),y=m.length>0&&m.every(S=>u[S]!==!1),b=()=>{const S=!y;c(x=>{const _={...x};for(const k of m)_[k]=S;return _})},v=p.map(S=>{const x=mO(S);return{...S,open:u[x]??!0,onOpenChange:_=>c(k=>({...k,[x]:_}))}});return C.useEffect(()=>{const S=x=>{var _,k;(x.metaKey||x.ctrlKey)&&x.key==="k"&&(x.preventDefault(),(_=f.current)==null||_.focus(),(k=f.current)==null||k.select())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),E.jsxs(RE,{...e,children:[E.jsx(Ze,{ay:"center",gap:2,fullwidth:!0,children:E.jsx(Ij,{ref:f,placeholder:"Search for a session",before:E.jsx(ZG,{}),after:E.jsx(wI,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:S=>n(S.target.value)})}),E.jsxs(Ze,{ay:"center",ax:"space-between",gap:2,children:[E.jsxs(XC,{size:"sm",value:[r],onValueChange:S=>{const x=S[0];x&&i(x)},children:[E.jsx(Sc,{value:"group","aria-label":"Group by group",children:E.jsx(Il,{trigger:E.jsx(PG,{}),children:"Group by group"})}),E.jsx(Sc,{value:"status","aria-label":"Group by status",children:E.jsx(Il,{trigger:E.jsx(iV,{}),children:"Group by status"})}),E.jsx(Sc,{value:"recent","aria-label":"Group by recent",children:E.jsx(Il,{trigger:E.jsx(eP,{}),children:"Group by recent"})})]}),E.jsxs(Ze,{ay:"center",gap:1,children:[E.jsx(rh,{size:"small",shape:"square",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:E.jsx(xG,{}),pressed:E.jsx(SG,{})}}),p.length>0&&E.jsx(rh,{size:"small",shape:"square",variant:"subtle",tooltip:y?"Collapse all":"Expand all",pressed:!y,onPressedChange:()=>b(),icon:{unpressed:E.jsx(J$,{}),pressed:E.jsx(_y,{})}})]})]}),p.length===0?E.jsxs(Fe,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):E.jsx(Zc,{items:v,line:!0,size:"small"})]})};_3.displayName="Sidebar";const T3=({session:e})=>E.jsx(Ql,{to:"/sessions/$slug",params:{slug:e.session.slug},children:e.session.slug});T3.displayName="SessionLabel";const A3=({session:e})=>{const{data:t=[]}=Si(Kl()),n=t.some(p=>p.session.status==="active"||p.session.status==="waiting"),{data:r}=Si(oce(n)),{data:i}=Si(ace),o=r==null?void 0:r[e.session.id],a=i==null?void 0:i[e.session.id],u=(o==null?void 0:o.linesAdded)??0,c=(o==null?void 0:o.linesRemoved)??0,f=(o==null?void 0:o.filesTouched)??0,h=u>0||c>0;return E.jsxs(Ze,{ay:"center",gap:2,children:[E.jsx(Fe,{size:-1,shade:"muted",children:zw(e.session.startedAt)}),h&&E.jsxs(Ze,{ay:"center",gap:1,children:[E.jsx(Fe,{size:-1,family:"mono",color:"green",children:`+${u}`}),E.jsx(Fe,{size:-1,family:"mono",color:"red",children:`-${c}`})]}),f>0&&E.jsxs(Ze,{ay:"center",gap:1,children:[E.jsx(rP,{size:12}),E.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:f})]}),a&&E.jsx(WN,{TriggerProps:{openOnHover:!0},trigger:E.jsx(UG,{size:12,"aria-label":"Session recap"}),title:"Session recap",description:zw(a.createdAt),PositionerProps:{sideOffset:8,side:"right"},PopupProps:{style:{maxWidth:420}},children:E.jsx(Ye,{my:2,children:E.jsx(wa,{children:a.recap})})})]})};A3.displayName="SessionContent";const D3=({session:e,groupPath:t})=>{const n=R4(e),{Icon:r}=n,i=e.status==="paused",o=`bertrand resume ${t}/${e.slug}`;return E.jsxs(YC,{children:[E.jsx(WC,{render:E.jsx(Ui,{variant:"subtle",size:"small",shape:"square","aria-label":"Session actions",children:E.jsx(gG,{})})}),E.jsx(hy,{children:E.jsx(py,{side:"bottom",align:"end",children:E.jsxs(my,{children:[E.jsxs(fh,{disabled:n.disabled,onClick:n.onClick,children:[E.jsx(r,{size:14}),n.label]}),E.jsxs(fh,{disabled:!i,onClick:()=>{navigator.clipboard.writeText(o)},children:[E.jsx(Rh,{size:14}),"Copy resume command"]})]})})})]})};D3.displayName="SessionRowActions";const M3=({children:e,...t})=>E.jsx(Ze,{"data-slot":"top-bar-wrapper",fullwidth:!0,ay:"center",p:4,gap:4,bb:1,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1,...t.style},...t,children:e});M3.displayName="TopBarWrapper";const Wd="uiid-theme";function Jge(){return localStorage.getItem(Wd)??"system"}function eye(e){const t=n=>{n.key===Wd&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function tye(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function nye(){const e=C.useSyncExternalStore(eye,Jge),t=C.useCallback(n=>{n==="system"?localStorage.removeItem(Wd):localStorage.setItem(Wd,n),tye(n),window.dispatchEvent(new StorageEvent("storage",{key:Wd,newValue:n}))},[]);return{theme:e,setTheme:t}}const O3=()=>{const{theme:e,setTheme:t}=nye();return E.jsxs(XC,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[E.jsx(Sc,{value:"light","aria-label":"Light mode",children:E.jsx(nV,{})}),E.jsx(Sc,{value:"dark","aria-label":"Dark mode",children:E.jsx(WG,{})}),E.jsx(Sc,{value:"system","aria-label":"System theme",children:E.jsx(qG,{})})]})};O3.displayName="ThemeToggle";const _E=({sessionCount:e})=>E.jsxs(M3,{children:[E.jsx(Fe,{size:2,weight:"bold",children:"bertrand"}),E.jsx(C.Activity,{mode:e?"visible":"hidden",children:E.jsxs(cn,{color:"blue",children:[e," session(s)"]})}),E.jsxs(Ze,{gap:3,ay:"center",ml:"auto",children:[E.jsxs(Ze,{gap:2,ay:"center",children:[E.jsx(r1,{to:"/",tooltip:"Session timeline",icon:E.jsx(oG,{})}),E.jsx(r1,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:E.jsx(rG,{})}),E.jsx(r1,{to:"/dev/diff",tooltip:"Diff viewer",icon:E.jsx(nP,{})})]}),E.jsx(O3,{})]})]});_E.displayName="TopBar";const r1=({to:e,tooltip:t,icon:n})=>E.jsx(Ui,{render:E.jsx(Ql,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",shape:"square",children:n}),Cf=I9({component:rye});function rye(){return Z9({select:t=>t.location.pathname}).startsWith("/dev/")?E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[E.jsx(_E,{}),E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:E.jsx(fS,{})})]}):E.jsx(iye,{})}function iye(){const{data:e=[]}=Si(Kl());return E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[E.jsx(_E,{sessionCount:e.length}),E.jsxs(p4,{direction:"horizontal",children:[E.jsx(Fw,{defaultSize:360,minSize:320,maxSize:540,children:E.jsx(_3,{})}),E.jsx(m4,{}),E.jsx(Fw,{children:E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,fullheight:!0,children:E.jsx(fS,{})})})]})]})}const oye=Eh("/")({component:()=>E.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),sye=new Set(["session.started","session.resumed","session.end"]),aye=e=>{const t=new Map;for(let r=0;r<e.length-1;r++){const i=e[r],o=e[r+1];i.event==="session.started"&&o.event==="claude.started"&&i.conversationId===o.conversationId&&t.set(r+1,{...i.meta??{},...o.meta??{}})}const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(sye.has(i.event))continue;const o=t.get(r);n.push(o?{...i,meta:o}:i)}return n},lye=e=>{var r;const t=[],n=new Set;for(let i=0;i<e.length;i++){if(n.has(i))continue;const o=e[i];if(o.event==="session.waiting"){let a=i+1;const u=[];for(;a<e.length&&(e[a].event==="context.snapshot"||e[a].event==="assistant.recap");)e[a].event==="assistant.recap"&&u.push(e[a]),a++;if(a<e.length&&e[a].event==="session.answered"){for(const f of u)t.push(f);const c=(r=o.meta)==null?void 0:r.question;t.push({...e[a],meta:{...e[a].meta,question:c}});for(let f=i;f<=a;f++)n.add(f);continue}}t.push(o)}return t};function wy(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function gO(e){const t=e.meta;return{tool:(t==null?void 0:t.tool)??"unknown",detail:(t==null?void 0:t.detail)??"",outcome:(t==null?void 0:t.outcome)??(e.event==="permission.resolve"?"approved":"pending")}}const uye={Bash:"ran a command",Edit:"edited a file",Write:"wrote a file",Read:"read a file"};function cye(e){return uye[e.tool]??e.tool}const fye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.event!=="permission.request"&&r.event!=="permission.resolve"){t.push(r),n++;continue}const i=[];for(;n<e.length;){const h=e[n];if(h.event!=="permission.request"&&h.event!=="permission.resolve")break;i.push(h),n++}const o=i.filter(h=>h.event==="permission.request");if(o.length===0)continue;const a=o.map(gO),u=i.some(h=>h.event==="permission.resolve"),c=new Map;for(const h of a){const p=`${h.tool}::${h.detail}`,m=c.get(p);if(m){m.count++;const y=[...wy(m),...wy(h)];y.length>0&&(m.edits=y,m.oldStr=void 0,m.newStr=void 0)}else c.set(p,{...h,count:1})}const f=[...c.values()];if(f.length<=1){const h=f[0]??gO(i[0]),p=cye(h);t.push({...i[i.length-1],event:"tool.work",summary:p,meta:{...i[i.length-1].meta,permissions:f,outcome:u?"approved":"pending"}})}else{const h=new Map;for(const v of f)h.set(v.tool,(h.get(v.tool)??0)+v.count);const m=[...h.entries()].sort((v,S)=>S[1]-v[1]).map(([v,S])=>`${S}× ${v}`).join(", "),y=new Date(i[0].createdAt).getTime(),b=new Date(i[i.length-1].createdAt).getTime();t.push({...i[0],event:"tool.work",summary:m,meta:{permissions:f,outcome:u?"approved":"pending"},createdAt:new Date((y+b)/2).toISOString()})}}return t},dye={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},hye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.event!=="tool.applied"){t.push(r),n++;continue}const i=[];for(;n<e.length&&e[n].event==="tool.applied";)i.push(e[n]),n++;if(i.length===1){t.push(i[0]);continue}const o=[];for(const f of i){const h=f.meta,p=h==null?void 0:h.permissions;if(Array.isArray(p))for(const m of p)o.push(m)}const a=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=a.get(h),m=f.count??1;if(p){p.count+=m;const y=[...wy(p),...wy(f)];y.length>0&&(p.edits=y,p.oldStr=void 0,p.newStr=void 0)}else a.set(h,{...f,count:m})}const u=[...a.values()],c=i[i.length-1];t.push({...c,meta:{...c.meta,permissions:u}})}return t},pye=e=>e.map(t=>{var o;if(t.event!=="tool.applied"||t.summary)return t;const n=t.meta,r=(n==null?void 0:n.permissions)??[];if(r.length>1)return{...t,summary:`edited ${r.length} files`};const i=(o=r[0])==null?void 0:o.tool;return i?{...t,summary:dye[i]??`${i} applied`}:t}),mye=e=>{const t=new Set(["claude.started","claude.ended","claude.discarded"]);return e.map((n,r)=>{if(!t.has(n.event))return n;const i=n.meta;if(i!=null&&i.model)return n;const o=(i==null?void 0:i.claude_id)??n.conversationId;if(!o)return n;const u=n.event==="claude.started"?e.slice(r+1):e.slice(0,r).reverse();for(const c of u){if(c.event!=="context.snapshot")continue;const f=c.meta;if(((f==null?void 0:f.claude_id)??c.conversationId)!==o)continue;const p=f==null?void 0:f.model;if(p)return{...n,meta:{...i,model:p}}}return n})},gye=[aye,lye,fye,hye,pye,mye];function yye(e){return gye.reduce((t,n)=>n(t),e)}function bye(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}const vye=/<recap>[\s\S]*?<\/recap>/gi;function $3({event:e}){var a;const t=e.meta;if(e.event==="assistant.recap"){const u=(a=t==null?void 0:t.recap)==null?void 0:a.trim();return u?E.jsx(Ye,{"data-slot":"assistant-recap",py:4,children:E.jsx(zt,{children:E.jsx(wa,{children:u})})}):null}const r=((t==null?void 0:t.text)??"").replace(vye,"").trim(),i=(t==null?void 0:t.thinkingBlocks)??0,o=(t==null?void 0:t.thinkingBytes)??0;return!r&&i===0?null:E.jsxs(Ye,{"data-slot":"assistant-content",gap:2,children:[i>0&&E.jsx(cn,{color:"indigo",children:`Thought ${bye(o)}`}),r&&E.jsx(wa,{children:r})]})}$3.displayName="AssistantContent";function P3({event:e}){const t=e.meta;if(!t)return null;const n=no(t.remaining_pct),r=no(t.context_window_tokens),i=no(t.input_tokens),o=no(t.cache_read_tokens),a=no(t.cache_creation_tokens),u=ab(t.model);return r===0?null:E.jsxs(Ye,{"data-slot":"context-content",gap:3,fullwidth:!0,children:[E.jsx(WS,{value:n,size:"small",color:_4(n)}),E.jsxs(Ze,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}P3.displayName="ContextContent";function yO(e,t){return e==null?void 0:e.find(n=>n.question===t)}function xye(e,t,n){const r=[...t].sort((a,u)=>u.label.length-a.label.length),i=[];let o=e;for(;o;){const a=r.find(u=>o===u.label||o.startsWith(u.label+", "));if(!a)break;if(i.push(a.label),o===a.label){o="";break}if(o=o.slice(a.label.length+2),!n)break}return{selectedLabels:i,note:o||void 0}}function N3({event:e}){const t=e.meta;if(e.event==="session.answered"){const n=t==null?void 0:t.answers;if(!n||Object.keys(n).length===0)return null;const r=t==null?void 0:t.questions,i=Object.entries(n),o=(u,c)=>{const f=yO(r,u),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:m,note:y}=xye(c,p,h),b=m.length>0,v=b?void 0:y??c,S=b?y:void 0;return E.jsxs(Ye,{gap:4,fullwidth:!0,children:[v&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(Fe,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),E.jsx(wa,{children:v})]}),!b&&!v&&E.jsx(Fe,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&E.jsx(Zc,{type:"ordered",items:p.map(x=>({value:x.label,label:E.jsx(Fe,{weight:"bold",color:m.includes(x.label)?"green":void 0,children:x.label}),description:x.description,disabled:!m.includes(x.label)}))}),S&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(Fe,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),E.jsx(wa,{children:S})]})]})};if(i.length===1){const[u,c]=i[0];return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:o(u,c)})})}const a=i.map(([u,c],f)=>{const h=yO(r,u);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:u,render:o(u,c)}});return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:E.jsx(KC,{items:a,size:"sm",ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?E.jsx(I3,{children:E.jsx(wa,{children:n})}):null}return null}N3.displayName="InteractionContent";const I3=({children:e})=>E.jsx(Ye,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:e})});I3.displayName="CardContainer";function wye(e){if(e)return e.slice(0,8)}function L3({event:e}){if(e.event==="claude.started")return null;const t=e.meta;if(e.event==="session.recap"){const u=t==null?void 0:t.recap;return u?E.jsx(Ye,{py:4,children:E.jsx(zt,{children:E.jsx(wa,{children:u})})}):null}const n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=ab(t==null?void 0:t.model),i=wye(n??void 0),o=e.event==="claude.ended"?t==null?void 0:t.exit_code:void 0,a=typeof o=="number"&&o!==0;return!r&&!i&&!a?null:E.jsxs(Ze,{gap:2,ay:"center",children:[r&&E.jsx(cn,{color:"orange",size:"small",children:r}),i&&E.jsx(cn,{color:"neutral",size:"small",children:i}),a&&E.jsx(cn,{color:"red",size:"small",children:`exit ${o}`})]})}L3.displayName="LifecycleContent";function j3({event:e}){const t=e.meta;if(!t)return null;switch(e.event){case"gh.pr.created":{const n=t.pr_title,r=t.pr_url;return E.jsxs(E.Fragment,{children:[n&&E.jsx(Fe,{size:1,children:n}),r&&E.jsx(Fe,{size:-1,family:"mono",color:"neutral",children:r})]})}case"gh.pr.merged":{const n=t.branch;return n?E.jsx(Fe,{size:1,family:"mono",children:n}):null}case"vercel.deploy":{const n=t.project_name;return n?E.jsx(Fe,{size:1,children:n}):null}default:return null}}j3.displayName="MilestoneContent";function Sye({text:e}){const[t,n]=C.useState(!1);return E.jsx(Ui,{size:"small",variant:"ghost",shape:"square",tooltip:t?"Copied!":"Copy path",disabled:t,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},children:t?E.jsx(kh,{color:"green"}):E.jsx(Rh,{})})}function Cye(e){if(e)return e.slice(0,8)}function Eye(e){if(e)return e.slice(0,7)}function F3({event:e}){const t=e.meta;if(!t)return null;const n=t.labels??[],r=t.summary,i=t.claude_id??e.conversationId??void 0,o=ab(t.model),a=t.claude_version,u=Cye(i),c=t.git??void 0,f=c==null?void 0:c.branch,h=Eye(c==null?void 0:c.sha),p=!!(c!=null&&c.dirty),m=t.cwd,y=[];if(n.length>0&&y.push({field:"Labels",value:n.join(", ")}),r&&y.push({field:"Summary",value:r}),o&&y.push({field:"Model",value:E.jsx(cn,{color:"orange",size:"small",children:o})}),a&&y.push({field:"Version",value:E.jsx(cn,{color:"neutral",size:"small",children:a})}),u&&y.push({field:"Claude ID",value:E.jsx(cn,{color:"neutral",size:"small",children:u})}),f&&y.push({field:"Branch",value:E.jsxs(Ze,{gap:2,ay:"center",children:[E.jsx(cn,{color:"neutral",size:"small",children:f}),h&&E.jsx(cn,{color:"neutral",size:"small",children:h}),p&&E.jsx(cn,{color:"red",size:"small",children:"dirty"})]})}),m&&y.push({field:"CWD",value:E.jsx(Fe,{family:"mono",size:-1,color:"neutral",children:m})}),y.length===0)return null;const b=x=>x.field==="CWD",v=(x,_)=>b(_)?x:E.jsx(E.Fragment,{}),S={primary:[{icon:bG,tooltip:"Open in Cursor",onClick:x=>{!b(x)||!m||window.open(`cursor://file/${encodeURI(m)}`,"_blank")},wrapper:v},{icon:RG,tooltip:"Open in Finder",onClick:x=>{!b(x)||!m||fetch(lE("/api/open"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:m})})},wrapper:v},{icon:Rh,tooltip:"Copy path",wrapper:(x,_)=>b(_)&&m?E.jsx(Sye,{text:m}):E.jsx(E.Fragment,{})}]};return E.jsx(Ye,{py:4,fullwidth:!0,children:E.jsx(zt,{trimmed:!0,fullwidth:!0,children:E.jsx(iE,{children:E.jsx(oE,{children:E.jsx(aE,{children:y.map(x=>E.jsxs(sE,{children:[E.jsx(hh,{children:E.jsx(Fe,{weight:"bold",children:x.field})}),E.jsx(hh,{children:x.value}),E.jsx(C4,{actions:S,item:x})]},x.field))})})})})})}F3.displayName="StartedContent";class z3{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const o=this.castInput(t,r),a=this.castInput(n,r),u=this.removeEmpty(this.tokenize(o,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(u,c,r,i)}diffWithOptionsObj(t,n,r,i){var o;const a=_=>{if(_=this.postProcess(_,r),i){setTimeout(function(){i(_)},0);return}else return _},u=n.length,c=t.length;let f=1,h=u+c;r.maxEditLength!=null&&(h=Math.min(h,r.maxEditLength));const p=(o=r.timeout)!==null&&o!==void 0?o:1/0,m=Date.now()+p,y=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(y[0],n,t,0,r);if(y[0].oldPos+1>=c&&b+1>=u)return a(this.buildValues(y[0].lastComponent,n,t));let v=-1/0,S=1/0;const x=()=>{for(let _=Math.max(v,-f);_<=Math.min(S,f);_+=2){let k;const T=y[_-1],A=y[_+1];T&&(y[_-1]=void 0);let D=!1;if(A){const $=A.oldPos-_;D=A&&0<=$&&$<u}const O=T&&T.oldPos+1<c;if(!D&&!O){y[_]=void 0;continue}if(!O||D&&T.oldPos<A.oldPos?k=this.addToPath(A,!0,!1,0,r):k=this.addToPath(T,!1,!0,1,r),b=this.extractCommon(k,n,t,_,r),k.oldPos+1>=c&&b+1>=u)return a(this.buildValues(k.lastComponent,n,t))||!0;y[_]=k,k.oldPos+1>=c&&(S=Math.min(S,_-1)),b+1>=u&&(v=Math.max(v,_+1))}f++};if(i)(function _(){setTimeout(function(){if(f>h||Date.now()>m)return i(void 0);x()||_()},0)})();else for(;f<=h&&Date.now()<=m;){const _=x();if(_)return _}}addToPath(t,n,r,i,o){const a=t.lastComponent;return a&&!o.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,o){const a=n.length,u=r.length;let c=t.oldPos,f=c-i,h=0;for(;f+1<a&&c+1<u&&this.equals(r[c+1],n[f+1],o);)f++,c++,h++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return h&&!o.oneChangePerToken&&(t.lastComponent={count:h,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,f}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let o;for(;t;)i.push(t),o=t.previousComponent,delete t.previousComponent,t=o;i.reverse();const a=i.length;let u=0,c=0,f=0;for(;u<a;u++){const h=i[u];if(h.removed)h.value=this.join(r.slice(f,f+h.count)),f+=h.count;else{if(!h.added&&this.useLongestToken){let p=n.slice(c,c+h.count);p=p.map(function(m,y){const b=r[f+y];return b.length>m.length?b:m}),h.value=this.join(p)}else h.value=this.join(n.slice(c,c+h.count));c+=h.count,h.added||(f+=h.count)}}return i}}const bO="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class kye extends z3{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${bO}]+|[^\\S\\n\\r]+|[^${bO}]`,"ug");return t.match(n)||[]}}const Rye=new kye;function _ye(e,t,n){return Rye.diff(e,t,n)}class Tye extends z3{constructor(){super(...arguments),this.tokenize=Mye}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
509
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
510
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
511
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
512
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const Aye=new Tye;function Dye(e,t,n){return Aye.diff(e,t,n)}function Mye(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
513
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function Oye(e,t){const n=[...e.split(`
|
|
514
|
+
`),...t.split(`
|
|
515
|
+
`)];let r=1/0;for(const o of n){if(o.trim()==="")continue;const a=o.match(/^[ \t]*/),u=a?a[0].length:0;u<r&&(r=u)}if(r===1/0||r===0)return[e,t];const i=o=>o.split(`
|
|
516
|
+
`).map(a=>a.length>=r?a.slice(r):a).join(`
|
|
517
|
+
`);return[i(e),i(t)]}function $ye(e,t,n){const[r,i]=Oye(e,t),o=Dye(r,i),a=[],u=[],c=[];function f(v,S){const x=a.length,k=(v.endsWith(`
|
|
518
|
+
`)?v.slice(0,-1):v).split(`
|
|
519
|
+
`);for(const T of k)a.push(T),u.push(S);return{startIdx:x,lns:k}}let h=0;for(;h<o.length;){const v=o[h];if(v.removed&&h+1<o.length&&o[h+1].added){const S=f(v.value,"remove"),x=f(o[h+1].value,"add"),_=n?Math.min(S.lns.length,x.lns.length):0;for(let k=0;k<_;k++){const T=_ye(S.lns[k],x.lns[k]);let A=0,D=0;for(const O of T){const $=O.value.length;O.added?($>0&&c.push({start:{line:x.startIdx+k,character:D},end:{line:x.startIdx+k,character:D+$},properties:{class:"diff-word add"}}),D+=$):O.removed?($>0&&c.push({start:{line:S.startIdx+k,character:A},end:{line:S.startIdx+k,character:A+$},properties:{class:"diff-word remove"}}),A+=$):(A+=$,D+=$)}}h+=2}else v.removed?(f(v.value,"remove"),h+=1):v.added?(f(v.value,"add"),h+=1):(f(v.value,"context"),h+=1)}const p=[];let m=1,y=1;for(const v of u)v==="remove"?p.push({old:m++,new:null}):v==="add"?p.push({old:null,new:y++}):p.push({old:m++,new:y++});const b=Math.max(m-1,y-1,1);return{code:a.join(`
|
|
520
|
+
`),lineKinds:u,lineNums:p,decorations:c,maxLineNum:b}}function vO(e,t){e.properties||(e.properties={});const n=e.properties.class;typeof n=="string"?e.properties.class=n?`${n} ${t}`:t:Array.isArray(n)?e.properties.class=[...n,t]:e.properties.class=t}function i1(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}function Sy({oldStr:e,newStr:t,language:n="tsx",filename:r,wordDiff:i=!1}){const[o,a]=C.useState(""),[u,c]=C.useState(1);return C.useEffect(()=>{let f=!1;return(async()=>{const{code:h,lineKinds:p,lineNums:m,decorations:y,maxLineNum:b}=$ye(e,t,i);await nj(n);const S=(await dC()).codeToHtml(h,{lang:n,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:y,transformers:[{name:"diff-block:line-marks",pre(x){vO(x,"has-diff")},line(x,_){const k=_-1,T=p[k],A=m[k];(T==="add"||T==="remove")&&vO(x,`diff ${T}`);const D=T==="add"?"diff-marker add":T==="remove"?"diff-marker remove":"diff-marker",O=T==="add"?"+":T==="remove"?"-":" ",$="diff-num diff-num-old"+(A.old==null?" diff-num-blank":""),B="diff-num diff-num-new"+(A.new==null?" diff-num-blank":""),L=[i1($,A.old!=null?String(A.old):" "),i1(B,A.new!=null?String(A.new):" "),i1(D,O)];return x.children.unshift(...L),x}}]});f||(a(S),c(String(b).length))})(),()=>{f=!0}},[e,t,n,i]),E.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${u+2}ch`,width:"100%"},children:E.jsx(hC,{code:t,language:n,filename:r,showLineNumbers:!1,copyable:!1,html:o,style:{width:"100%"}})})}Sy.displayName="DiffBlock";function Xw(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function B3({permission:e}){return e.edits&&e.edits.length>0?E.jsx(Ye,{gap:2,fullwidth:!0,children:e.edits.map((t,n)=>E.jsx(Sy,{oldStr:t.oldStr??"",newStr:t.newStr??""},n))}):E.jsx(Sy,{oldStr:e.oldStr??"",newStr:e.newStr??""})}function Cy(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function U3({event:e}){const t=e.meta;if(!(t!=null&&t.permissions))return null;const n=t.permissions;if(n.length===0)return null;if(n.length===1){const r=n[0];return r.detail?Xw(r)?E.jsx(qC,{ContentProps:{fullwidth:!0,p:0},items:[{value:"diff",trigger:Cy(r),content:E.jsx(B3,{permission:r})}]}):E.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:Cy(r)}):null}return E.jsx(Pye,{permissions:n})}function Pye({permissions:e}){const t=e.filter(Xw),n=e.filter(u=>!Xw(u)),r=t.map((u,c)=>`permission-${c}`),[i,o]=C.useState([]),a=r.length>0&&i.length===r.length;return E.jsxs(Ye,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&E.jsxs(Ye,{gap:1,fullwidth:!0,children:[E.jsx(Ze,{ax:"end",fullwidth:!0,children:E.jsx(rh,{size:"small",variant:"subtle",tooltip:a?"Collapse all":"Expand all",pressed:!a,onPressedChange:()=>o(a?[]:r),icon:{unpressed:E.jsx(J$,{}),pressed:E.jsx(_y,{})},text:{unpressed:"Collapse all",pressed:"Expand all"}})}),E.jsx(qC,{multiple:!0,value:i,onValueChange:u=>o(u),ContentProps:{fullwidth:!0,p:0},items:t.map((u,c)=>({value:`permission-${c}`,trigger:Cy(u),content:E.jsx(B3,{permission:u})}))})]}),n.length>0&&E.jsx(Ye,{gap:1,fullwidth:!0,children:n.map((u,c)=>E.jsx(Fe,{size:-1,family:"mono",shade:"muted",children:Cy(u)},`info-${c}`))})]})}U3.displayName="WorkContent";function H3({event:e}){if(e.event==="claude.started")return E.jsx(F3,{event:e});switch(fce(e.event)){case"interaction":return E.jsx(N3,{event:e});case"work":return E.jsx(U3,{event:e});case"milestone":return E.jsx(j3,{event:e});case"assistant":return E.jsx($3,{event:e});case"context":return E.jsx(P3,{event:e});case"lifecycle":return E.jsx(L3,{event:e});default:return null}}H3.displayName="EventContent";const G3=e=>{var f;const t=Ra({from:"/sessions/$slug",shouldThrow:!1}),n=(f=t==null?void 0:t.params)==null?void 0:f.slug,{data:r=[]}=Si(Kl()),i=r.find(h=>h.session.slug===n),o=(i==null?void 0:i.session.id)??"",a=(i==null?void 0:i.session.status)==="active"||(i==null?void 0:i.session.status)==="waiting",{data:u}=Si({...ice(o,a),enabled:!!o}),{data:c}=Si({...sce(o,a),enabled:!!o});return E.jsx(RE,{"data-slot":"secondary-sidebar",...e,p:0,minw:540,children:u&&E.jsx(V3,{stats:u,engagement:c})})};G3.displayName="SecondarySidebar";function Nye(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const V3=({stats:e,engagement:t})=>{const n=e.linesAdded>0||e.linesRemoved>0,r=e.filesTouched>0,i=n||r||e.prCount>0,o=t?Object.values(t.toolUsage).reduce((p,m)=>p+m,0):0,a=((t==null?void 0:t.contextTokens.max)??0)>0,u=(t==null?void 0:t.permissionDenials)??0,c=(t==null?void 0:t.discardRate.total)??0,f=!!t&&(o>0||a||u>0||c>0),h=[{label:"Activity",value:"activity",render:E.jsxs(wg,{children:[E.jsx(zt,{title:"Conversations",description:"Distinct conversation threads",icon:zG,action:E.jsx(Br,{value:e.conversationCount})}),E.jsx(zt,{title:"Interactions",description:"User-Claude exchanges",icon:IG,action:E.jsx(Br,{value:e.interactionCount})}),E.jsx(zt,{title:"Events",description:"Total events emitted",icon:tG,action:E.jsx(Br,{value:e.eventCount})}),E.jsx(zt,{title:"Duration",description:"Total session time",icon:eP,action:E.jsx(Br,{label:Fx(e.durationS)})}),E.jsx(zt,{title:"Claude work",description:"Time Claude spent active",icon:hG,action:E.jsx(Br,{label:Fx(e.claudeWorkS)})}),E.jsx(zt,{title:"User wait",description:"Time user spent waiting",icon:jG,action:E.jsx(Br,{label:Fx(e.userWaitS)})})]})}];return i&&h.push({label:"Code",value:"code",render:E.jsxs(wg,{children:[n&&E.jsx(zt,{title:"Lines changed",description:"Across all edits",icon:nP,action:E.jsx(q3,{added:e.linesAdded,removed:e.linesRemoved})}),r&&E.jsx(zt,{title:"Files touched",description:"Distinct files edited",icon:rP,action:E.jsx(Br,{value:e.filesTouched})}),e.prCount>0&&E.jsx(zt,{title:"PRs",description:"Pull requests created",icon:DG,action:E.jsx(Br,{value:e.prCount})})]})}),f&&h.push({label:"Engagement",value:"engagement",render:E.jsxs(wg,{children:[o>0&&E.jsx(zt,{title:"Tracked tool calls",description:Nye(t.toolUsage),icon:cV,action:E.jsx(Br,{value:o})}),a&&E.jsx(zt,{title:"Context tokens",description:`avg ${Jo(t.contextTokens.avg)} · max ${Jo(t.contextTokens.max)}`,icon:TG,action:E.jsx(Br,{label:Jo(t.contextTokens.latest)})}),u>0&&E.jsx(zt,{title:"Permission denials",description:"Tool requests denied",icon:eV,action:E.jsx(Br,{value:u})}),c>0&&E.jsx(zt,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${c}`,icon:sV,action:E.jsx(Br,{value:t.discardRate.discarded})})]})}),E.jsx(KC,{items:h,fullwidth:!0,ContainerProps:{fullwidth:!0}})};V3.displayName="SessionStats";const wg=({children:e})=>E.jsx(Ye,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});wg.displayName="SectionStack";const Br=e=>E.jsx(Fe,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});Br.displayName="Stat";const q3=({added:e,removed:t})=>E.jsxs(Fe,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[E.jsx(Fe,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",E.jsx(Fe,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});q3.displayName="DiffStat";const TE=({session:e,groupPath:t,size:n="small",variant:r="subtle",shape:i="square",...o})=>{const[a,u]=C.useState(!1);if(e.status!=="paused")return null;const c=`bertrand resume ${t}/${e.slug}`;return E.jsx(rh,{tooltip:a?"Copied!":"Copy resume command",size:n,variant:r,shape:i,pressed:a,onPressedChange:f=>{f&&(navigator.clipboard.writeText(c),u(!0),setTimeout(()=>u(!1),2e3))},icon:{unpressed:E.jsx(Rh,{}),pressed:E.jsx(kh,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};TE.displayName="CopyResumeButton";const Y3=Eh("/sessions/$slug")({component:jye}),Iye=({href:e,children:t})=>E.jsx(Ql,{to:e,children:t});function Lye(e,t){const n=e.split("/").filter(Boolean),r=n.map((i,o)=>({label:i,value:`/groups/${n.slice(0,o+1).join("/")}`}));return r.push({label:t,value:""}),r}function jye(){const{slug:e}=Y3.useParams(),{data:t=[]}=Si(Kl()),{data:n=[]}=Si(Kl({includeArchived:!0})),r=t.find(p=>p.session.slug===e)??n.find(p=>p.session.slug===e),i=(r==null?void 0:r.session.id)??"",o=(r==null?void 0:r.session.status)==="active"||(r==null?void 0:r.session.status)==="waiting",{data:a=[]}=Si(rce(i,o)),u=C.useMemo(()=>yye(a),[a]),c=C.useMemo(()=>{for(let p=a.length-1;p>=0;p--)if(a[p].event==="context.snapshot")return a[p];return null},[a]),f=C.useMemo(()=>{var p;if((r==null?void 0:r.session.status)!=="waiting")return null;for(let m=a.length-1;m>=0;m--)if(a[m].event==="session.waiting"){const y=(p=a[m].meta)==null?void 0:p.question;return typeof y=="string"?y:null}return null},[a,r==null?void 0:r.session.status]),h=r?Lye(r.groupPath,r.session.name):[{label:e,value:""}];return E.jsxs(Ye,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[E.jsxs(Ze,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[E.jsx(rE,{items:h,linkAs:Iye}),E.jsxs(Ze,{ay:"center",gap:2,children:[r&&E.jsx(TE,{session:r.session,groupPath:r.groupPath}),r&&E.jsx(W3,{session:r.session}),E.jsx(eI,{side:"right",title:"Session stats",trigger:E.jsx(Ui,{tooltip:"Session stats",variant:"subtle",size:"small",shape:"square",children:E.jsx(XG,{})}),children:E.jsx(G3,{})})]})]}),E.jsx(Ye,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:u.length>0&&E.jsx(HI,{activeIndex:u.length,items:u.map(p=>({title:yce(p),time:bce(p.createdAt),color:mce(p.event),content:E.jsx(H3,{event:p})})),ItemProps:{style:{width:"100%"}},ContentProps:{fullwidth:!0,maxw:860}})}),r&&E.jsx(K3,{session:r.session,context:c,pendingQuestion:f})]})}function W3({session:e}){const t=R4(e),{Icon:n}=t;return E.jsx(Ui,{tooltip:t.tooltip,variant:"subtle",size:"small",shape:"square",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:E.jsx(n,{})})}W3.displayName="ArchiveToggle";function K3({session:e,context:t,pendingQuestion:n}){const r=cE(e.status),i=e.status==="active"||e.status==="waiting";return E.jsxs(Ye,{bt:1,p:4,gap:3,fullwidth:!0,children:[E.jsxs(Ze,{ay:"center",gap:2,fullwidth:!0,children:[E.jsx(Ly,{color:r,pulse:i}),E.jsx(cn,{color:r,children:e.status}),n&&E.jsx(Fe,{size:1,shade:"muted",children:n})]}),t&&E.jsx(X3,{event:t})]})}K3.displayName="SessionFooter";function X3({event:e}){const t=e.meta;if(!t)return null;const n=no(t.remaining_pct),r=no(t.context_window_tokens),i=no(t.input_tokens),o=no(t.cache_read_tokens),a=no(t.cache_creation_tokens),u=ab(t.model);return r===0?null:E.jsxs(E.Fragment,{children:[E.jsx(WS,{value:n,size:"small",color:_4(n)}),E.jsxs(Ze,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}X3.displayName="ContextStats";const Q3=({session:e,...t})=>{const{groupPath:n,session:r}=e,i=cE(r.status);return E.jsxs(Ze,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[E.jsxs(Ze,{gap:2,ay:"center",children:[E.jsx(Ly,{"data-slot":"session-status",color:i}),E.jsx(Ye,{gap:2,children:E.jsxs(Fe,{"data-slot":"session-link",render:E.jsx(Ql,{to:"/sessions/$slug",params:{slug:r.slug}}),weight:"bold",children:[n," / ",r.slug]})}),E.jsx(Fe,{"data-slot":"session-time",size:-1,shade:"muted",children:zw(r.startedAt)})]}),E.jsx(cn,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),E.jsx(TE,{session:r,groupPath:n})]})};Q3.displayName="SessionItem";const Z3=Eh("/groups/$")({component:zye}),Fye=({href:e,children:t})=>E.jsx(Ql,{to:e,children:t});function zye(){const{_splat:e}=Z3.useParams(),{data:t=[]}=Si(Kl()),n=t.filter(o=>o.groupPath===e),r=(e??"").split("/").filter(Boolean),i=r.map((o,a)=>({label:o,value:`/groups/${r.slice(0,a+1).join("/")}`}));return E.jsxs(Ye,{gap:4,ax:"stretch",fullwidth:!0,children:[E.jsx(Ye,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:E.jsx(rE,{items:i,linkAs:Fye})}),E.jsx(Ye,{px:8,gap:2,style:{overflow:"auto"},children:n.length>0?n.map(o=>E.jsx(Q3,{session:o},o.session.id)):E.jsx(Fe,{shade:"muted",children:"No sessions in this group."})})]})}const Bye=`# Heading 1 — anchored
|
|
521
|
+
|
|
522
|
+
## Heading 2 — anchored
|
|
523
|
+
|
|
524
|
+
### Heading 3
|
|
525
|
+
|
|
526
|
+
#### Heading 4
|
|
527
|
+
|
|
528
|
+
##### Heading 5
|
|
529
|
+
|
|
530
|
+
###### Heading 6
|
|
531
|
+
|
|
532
|
+
A paragraph with **bold**, *italic*, ~~strikethrough~~, an [external link](https://example.com), and \`inline code\`. Hover the headings to see the slug \`id\` attributes injected by rehype-slug.
|
|
533
|
+
|
|
534
|
+
> A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Lists
|
|
539
|
+
|
|
540
|
+
- Unordered list item one
|
|
541
|
+
- Unordered list item two with **emphasis** and \`code\`
|
|
542
|
+
- Nested item
|
|
543
|
+
- Another nested item
|
|
544
|
+
- Three levels deep
|
|
545
|
+
|
|
546
|
+
1. Ordered list item one
|
|
547
|
+
2. Ordered list item two
|
|
548
|
+
3. Ordered list item three
|
|
549
|
+
|
|
550
|
+
### Task list
|
|
551
|
+
|
|
552
|
+
- [x] Done item
|
|
553
|
+
- [x] Another done item
|
|
554
|
+
- [ ] Open item
|
|
555
|
+
- [ ] Open item with [a link](https://example.com)
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
## Tables
|
|
560
|
+
|
|
561
|
+
| Feature | Status | Notes |
|
|
562
|
+
|---|---|---|
|
|
563
|
+
| Headings | ✓ | rehype-slug |
|
|
564
|
+
| Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
|
|
565
|
+
| Code blocks | ✓ | shiki via CodeBlock |
|
|
566
|
+
| Task lists | ✓ | disabled checkbox render |
|
|
567
|
+
|
|
568
|
+
| Left | Center | Right |
|
|
569
|
+
|:---|:---:|---:|
|
|
570
|
+
| 1 | 2 | 3 |
|
|
571
|
+
| left-aligned | center-aligned | right-aligned |
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Code
|
|
576
|
+
|
|
577
|
+
Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
|
|
578
|
+
|
|
579
|
+
\`\`\`ts
|
|
580
|
+
// known language — should syntax-highlight
|
|
581
|
+
import { Markdown } from "../components/markdown";
|
|
582
|
+
|
|
583
|
+
export function Demo() {
|
|
584
|
+
return <Markdown>{"# hi"}</Markdown>;
|
|
585
|
+
}
|
|
586
|
+
\`\`\`
|
|
587
|
+
|
|
588
|
+
\`\`\`tsx
|
|
589
|
+
const App = () => <div>{"jsx works too"}</div>;
|
|
590
|
+
\`\`\`
|
|
591
|
+
|
|
592
|
+
\`\`\`js
|
|
593
|
+
// alias — js → javascript
|
|
594
|
+
function add(a, b) { return a + b; }
|
|
595
|
+
\`\`\`
|
|
596
|
+
|
|
597
|
+
\`\`\`sh
|
|
598
|
+
# alias — sh → bash
|
|
599
|
+
bun run dev
|
|
600
|
+
\`\`\`
|
|
601
|
+
|
|
602
|
+
\`\`\`json
|
|
603
|
+
{
|
|
604
|
+
"language": "json",
|
|
605
|
+
"ok": true
|
|
606
|
+
}
|
|
607
|
+
\`\`\`
|
|
608
|
+
|
|
609
|
+
\`\`\`unknownlanguage
|
|
610
|
+
// unknown language — should render plaintext, not throw
|
|
611
|
+
some content here
|
|
612
|
+
\`\`\`
|
|
613
|
+
|
|
614
|
+
\`\`\`
|
|
615
|
+
no language tag — also plaintext
|
|
616
|
+
multiple lines
|
|
617
|
+
\`\`\`
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## Edge cases
|
|
622
|
+
|
|
623
|
+
A paragraph immediately followed by a fenced block:
|
|
624
|
+
\`\`\`ts
|
|
625
|
+
const ok = true;
|
|
626
|
+
\`\`\`
|
|
627
|
+
|
|
628
|
+
Paragraph after the fence — should render with normal spacing.
|
|
629
|
+
|
|
630
|
+
A line with **bold at the very end**
|
|
631
|
+
|
|
632
|
+
A line ending with \`inline code\`
|
|
633
|
+
|
|
634
|
+
An empty heading below this line:
|
|
635
|
+
|
|
636
|
+
##
|
|
637
|
+
|
|
638
|
+
End of fixture.
|
|
639
|
+
`;function Uye(){const[e,t]=C.useState(Bye);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(Fe,{size:3,weight:"bold",children:"Markdown kitchen sink"}),E.jsx(Fe,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),E.jsxs(Ze,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Fe,{size:0,shade:"muted",children:"source"}),E.jsx("textarea",{value:e,onChange:n=>t(n.target.value),spellCheck:!1,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:600,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"}})]}),E.jsxs(Ye,{gap:2,children:[E.jsx(Fe,{size:0,shade:"muted",children:"rendered"}),E.jsx(zt,{children:E.jsx(wa,{children:e})})]})]})]})}const Hye=Eh("/dev/markdown")({component:Uye}),Gye=`import { useState } from "react";
|
|
640
|
+
|
|
641
|
+
export function Counter() {
|
|
642
|
+
const [count, setCount] = useState(0);
|
|
643
|
+
|
|
644
|
+
function increment() {
|
|
645
|
+
setCount(count + 1);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return (
|
|
649
|
+
<button onClick={increment}>
|
|
650
|
+
{count}
|
|
651
|
+
</button>
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
`,Vye=`import { useCallback, useState } from "react";
|
|
655
|
+
|
|
656
|
+
type CounterProps = {
|
|
657
|
+
step?: number;
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
export function Counter({ step = 1 }: CounterProps) {
|
|
661
|
+
const [count, setCount] = useState(0);
|
|
662
|
+
|
|
663
|
+
const increment = useCallback(() => {
|
|
664
|
+
setCount((c) => c + step);
|
|
665
|
+
}, [step]);
|
|
666
|
+
|
|
667
|
+
return (
|
|
668
|
+
<button type="button" onClick={increment}>
|
|
669
|
+
count: {count}
|
|
670
|
+
</button>
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
`,xO={fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:280,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"},qye=Object.entries(VI);function Yye(){const[e,t]=C.useState(Gye),[n,r]=C.useState(Vye),[i,o]=C.useState("tsx"),[a,u]=C.useState(!1);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(Fe,{size:3,weight:"bold",children:"Diff kitchen sink"}),E.jsx(Fe,{size:2,shade:"muted",children:"Edit the old and new sources on the left, see the diff on the right. Backed by jsdiff + the existing CodeBlock primitive."})]}),E.jsxs(Ze,{ay:"center",gap:4,children:[E.jsxs(Ze,{ay:"center",gap:2,children:[E.jsx(Fe,{size:0,shade:"muted",children:"language"}),E.jsx("select",{value:i,onChange:c=>o(c.target.value),style:{fontSize:12,padding:"4px 8px",border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)"},children:qye.map(([c,f])=>E.jsx("option",{value:c,children:f},c))})]}),E.jsxs(Ze,{ay:"center",gap:2,children:[E.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>u(c.target.checked)}),E.jsx(Fe,{size:0,shade:"muted",render:E.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),E.jsxs(Ze,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:3,ax:"stretch",children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Fe,{size:0,shade:"muted",children:"old"}),E.jsx(zt,{ax:"stretch",children:E.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:xO})})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Fe,{size:0,shade:"muted",children:"new"}),E.jsx(zt,{ax:"stretch",children:E.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:xO})})]})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Fe,{size:0,shade:"muted",children:"diff"}),E.jsx(Sy,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const Wye=Eh("/dev/diff")({component:Yye}),Kye=oye.update({id:"/",path:"/",getParentRoute:()=>Cf}),Xye=Y3.update({id:"/sessions/$slug",path:"/sessions/$slug",getParentRoute:()=>Cf}),Qye=Z3.update({id:"/groups/$",path:"/groups/$",getParentRoute:()=>Cf}),Zye=Hye.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>Cf}),Jye=Wye.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>Cf}),ebe={IndexRoute:Kye,DevDiffRoute:Jye,DevMarkdownRoute:Zye,GroupsSplatRoute:Qye,SessionsSlugRoute:Xye},tbe=Cf._addFileChildren(ebe)._addFileTypes();ece({immediate:!0});const nbe=new W6({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),rbe=W9({routeTree:tbe});C6.createRoot(document.getElementById("root")).render(E.jsx(C.StrictMode,{children:E.jsx(K6,{client:nbe,children:E.jsxs(BK,{children:[E.jsx(Q9,{router:rbe}),E.jsx(aI,{position:"bottom"})]})})}));
|