bertrand 0.22.2 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bertrand.js +687 -491
- package/dist/dashboard/assets/index-BXNZ0sJ0.css +1 -0
- package/dist/dashboard/assets/index-DM4zHgCh.js +694 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/migrations/0007_awesome_justin_hammer.sql +2 -0
- package/dist/migrations/meta/0007_snapshot.json +693 -0
- package/dist/migrations/meta/_journal.json +7 -0
- package/dist/run-screen.js +33 -28
- package/package.json +1 -1
- package/dist/dashboard/assets/index-CCHVGoKS.js +0 -654
- package/dist/dashboard/assets/index-D_l3EPhC.css +0 -1
|
@@ -0,0 +1,694 @@
|
|
|
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 w5=Object.defineProperty;var S5=Object.getPrototypeOf;var C5=Reflect.get;var SR=e=>{throw TypeError(e)};var E5=(e,t,n)=>t in e?w5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>E5(e,typeof t!="symbol"?t+"":t,n),K0=(e,t,n)=>t.has(e)||SR("Cannot "+n);var K=(e,t,n)=>(K0(e,t,"read from private field"),n?n.call(e):t.get(e)),He=(e,t,n)=>t.has(e)?SR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$e=(e,t,n,r)=>(K0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rt=(e,t,n)=>(K0(e,t,"access private method"),n);var Mp=(e,t,n,r)=>({set _(i){$e(e,t,i,n)},get _(){return K(e,t,r)}}),CR=(e,t,n)=>C5(S5(e),n,t);function k5(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 bw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X0={exports:{}},Gf={};/**
|
|
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 ER;function R5(){if(ER)return Gf;ER=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 Gf.Fragment=t,Gf.jsx=n,Gf.jsxs=n,Gf}var kR;function _5(){return kR||(kR=1,X0.exports=R5()),X0.exports}var R=_5(),Q0={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 RR;function T5(){if(RR)return nt;RR=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"),g=Symbol.iterator;function y(Y){return Y===null||typeof Y!="object"?null:(Y=g&&Y[g]||Y["@@iterator"],typeof Y=="function"?Y:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,w={};function S(Y,J,U){this.props=Y,this.context=J,this.refs=w,this.updater=U||b}S.prototype.isReactComponent={},S.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")},S.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function _(){}_.prototype=S.prototype;function k(Y,J,U){this.props=Y,this.context=J,this.refs=w,this.updater=U||b}var T=k.prototype=new _;T.constructor=k,v(T,S.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function H(Y,J,U){var se=U.ref;return{$$typeof:e,type:Y,key:J,ref:se!==void 0?se:null,props:U}}function I(Y,J){return H(Y.type,J,Y.props)}function L(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function M(Y){var J={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(U){return J[U]})}var B=/\/+/g;function q(Y,J){return typeof Y=="object"&&Y!==null&&Y.key!=null?M(""+Y.key):J.toString(36)}function F(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 j(Y,J,U,se,oe){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,j(ve(Y._payload),J,U,se,oe)}}if(ve)return oe=oe(Y),ve=se===""?"."+q(Y,0):se,A(oe)?(U="",ve!=null&&(U=ve.replace(B,"$&/")+"/"),j(oe,J,U,"",function(Ie){return Ie})):oe!=null&&(L(oe)&&(oe=I(oe,U+(oe.key==null||Y&&Y.key===oe.key?"":(""+oe.key).replace(B,"$&/")+"/")+ve)),J.push(oe)),1;ve=0;var Re=se===""?".":se+":";if(A(Y))for(var ce=0;ce<Y.length;ce++)se=Y[ce],he=Re+q(se,ce),ve+=j(se,J,U,he,oe);else if(ce=y(Y),typeof ce=="function")for(Y=ce.call(Y),ce=0;!(se=Y.next()).done;)se=se.value,he=Re+q(se,ce++),ve+=j(se,J,U,he,oe);else if(he==="object"){if(typeof Y.then=="function")return j(F(Y),J,U,se,oe);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 z(Y,J,U){if(Y==null)return Y;var se=[],oe=0;return j(Y,se,"","",function(he){return J.call(U,he,oe++)}),se}function V(Y){if(Y._status===-1){var J=Y._result;J=J(),J.then(function(U){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=U)},function(U){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=U)}),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)},P={map:z,forEach:function(Y,J,U){z(Y,function(){J.apply(this,arguments)},U)},count:function(Y){var J=0;return z(Y,function(){J++}),J},toArray:function(Y){return z(Y,function(J){return J})||[]},only:function(Y){if(!L(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return nt.Activity=p,nt.Children=P,nt.Component=S,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,U){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var se=v({},Y.props),oe=Y.key;if(J!=null)for(he in J.key!==void 0&&(oe=""+J.key),J)!N.call(J,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&J.ref===void 0||(se[he]=J[he]);var he=arguments.length-2;if(he===1)se.children=U;else if(1<he){for(var ve=Array(he),Re=0;Re<he;Re++)ve[Re]=arguments[Re+2];se.children=ve}return H(Y.type,oe,se)},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,U){var se,oe={},he=null;if(J!=null)for(se in J.key!==void 0&&(he=""+J.key),J)N.call(J,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(oe[se]=J[se]);var ve=arguments.length-2;if(ve===1)oe.children=U;else if(1<ve){for(var Re=Array(ve),ce=0;ce<ve;ce++)Re[ce]=arguments[ce+2];oe.children=Re}if(Y&&Y.defaultProps)for(se in ve=Y.defaultProps,ve)oe[se]===void 0&&(oe[se]=ve[se]);return H(Y,he,oe)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(Y){return{$$typeof:u,render:Y}},nt.isValidElement=L,nt.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:V}},nt.memo=function(Y,J){return{$$typeof:f,type:Y,compare:J===void 0?null:J}},nt.startTransition=function(Y){var J=O.T,U={};O.T=U;try{var se=Y(),oe=O.S;oe!==null&&oe(U,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(D,W)}catch(he){W(he)}finally{J!==null&&U.types!==null&&(J.types=U.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,U){return O.H.useActionState(Y,J,U)},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,U){return O.H.useImperativeHandle(Y,J,U)},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,U){return O.H.useReducer(Y,J,U)},nt.useRef=function(Y){return O.H.useRef(Y)},nt.useState=function(Y){return O.H.useState(Y)},nt.useSyncExternalStore=function(Y,J,U){return O.H.useSyncExternalStore(Y,J,U)},nt.useTransition=function(){return O.H.useTransition()},nt.version="19.2.5",nt}var _R;function eh(){return _R||(_R=1,Q0.exports=T5()),Q0.exports}var C=eh();const fa=bw(C),ha=k5({__proto__:null,default:fa},[C]);var Z0={exports:{}},qf={},J0={exports:{}},ev={};/**
|
|
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 TR;function A5(){return TR||(TR=1,(function(e){function t(j,z){var V=j.length;j.push(z);e:for(;0<V;){var W=V-1>>>1,P=j[W];if(0<i(P,z))j[W]=z,j[V]=P,V=W;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var z=j[0],V=j.pop();if(V!==z){j[0]=V;e:for(var W=0,P=j.length,Y=P>>>1;W<Y;){var J=2*(W+1)-1,U=j[J],se=J+1,oe=j[se];if(0>i(U,V))se<P&&0>i(oe,U)?(j[W]=oe,j[se]=V,W=se):(j[W]=U,j[J]=V,W=J);else if(se<P&&0>i(oe,V))j[W]=oe,j[se]=V,W=se;else break e}}return z}function i(j,z){var V=j.sortIndex-z.sortIndex;return V!==0?V:j.id-z.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,g=3,y=!1,b=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function T(j){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=j)r(f),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(f)}}function A(j){if(v=!1,T(j),!b)if(n(c)!==null)b=!0,D||(D=!0,M());else{var z=n(f);z!==null&&F(A,z.startTime-j)}}var D=!1,O=-1,N=5,H=-1;function I(){return w?!0:!(e.unstable_now()-H<N)}function L(){if(w=!1,D){var j=e.unstable_now();H=j;var z=!0;try{e:{b=!1,v&&(v=!1,_(O),O=-1),y=!0;var V=g;try{t:{for(T(j),p=n(c);p!==null&&!(p.expirationTime>j&&I());){var W=p.callback;if(typeof W=="function"){p.callback=null,g=p.priorityLevel;var P=W(p.expirationTime<=j);if(j=e.unstable_now(),typeof P=="function"){p.callback=P,T(j),z=!0;break t}p===n(c)&&r(c),T(j)}else r(c);p=n(c)}if(p!==null)z=!0;else{var Y=n(f);Y!==null&&F(A,Y.startTime-j),z=!1}}break e}finally{p=null,g=V,y=!1}z=void 0}}finally{z?M():D=!1}}}var M;if(typeof k=="function")M=function(){k(L)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,q=B.port2;B.port1.onmessage=L,M=function(){q.postMessage(null)}}else M=function(){S(L,0)};function F(j,z){O=S(function(){j(e.unstable_now())},z)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(j){switch(g){case 1:case 2:case 3:var z=3;break;default:z=g}var V=g;g=z;try{return j()}finally{g=V}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(j,z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var V=g;g=j;try{return z()}finally{g=V}},e.unstable_scheduleCallback=function(j,z,V){var W=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?W+V:W):V=W,j){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=V+P,j={id:h++,callback:z,priorityLevel:j,startTime:V,expirationTime:P,sortIndex:-1},V>W?(j.sortIndex=V,t(f,j),n(c)===null&&j===n(f)&&(v?(_(O),O=-1):v=!0,F(A,V-W))):(j.sortIndex=P,t(c,j),b||y||(b=!0,D||(D=!0,M()))),j},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(j){var z=g;return function(){var V=g;g=z;try{return j.apply(this,arguments)}finally{g=V}}}})(ev)),ev}var AR;function D5(){return AR||(AR=1,J0.exports=A5()),J0.exports}var tv={exports:{}},Bn={};/**
|
|
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 DR;function M5(){if(DR)return Bn;DR=1;var e=eh();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 Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.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)},Bn.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()}},Bn.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))},Bn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Bn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin),g=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:g,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Bn.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)},Bn.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})}},Bn.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)},Bn.requestFormReset=function(c){r.d.r(c)},Bn.unstable_batchedUpdates=function(c,f){return c(f)},Bn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},Bn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Bn.version="19.2.5",Bn}var MR;function kM(){if(MR)return tv.exports;MR=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(),tv.exports=M5(),tv.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 OR;function O5(){if(OR)return qf;OR=1;var e=D5(),t=eh(),n=kM();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,m=l;;){var x=d.return;if(x===null)break;var E=x.alternate;if(E===null){if(m=x.return,m!==null){d=m;continue}break}if(x.child===E.child){for(E=x.child;E;){if(E===d)return c(x),s;if(E===m)return c(x),l;E=E.sibling}throw Error(r(188))}if(d.return!==m.return)d=x,m=E;else{for(var $=!1,G=x.child;G;){if(G===d){$=!0,d=x,m=E;break}if(G===m){$=!0,m=x,d=E;break}G=G.sibling}if(!$){for(G=E.child;G;){if(G===d){$=!0,d=E,m=x;break}if(G===m){$=!0,m=E,d=x;break}G=G.sibling}if(!$)throw Error(r(189))}}if(d.alternate!==m)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,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=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"),N=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function M(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var B=Symbol.for("react.client.reference");function q(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===B?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case S:return"Profiler";case w:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList";case H: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:q(s.type)||"Memo";case N:l=s._payload,s=s._init;try{return q(s(l))}catch{}}return null}var F=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},W=[],P=-1;function Y(s){return{current:s}}function J(s){0>P||(s.current=W[P],W[P]=null,P--)}function U(s,l){P++,W[P]=s.current,s.current=l}var se=Y(null),oe=Y(null),he=Y(null),ve=Y(null);function Re(s,l){switch(U(he,l),U(oe,s),U(se,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?q2(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=q2(l),s=V2(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(se),U(se,s)}function ce(){J(se),J(oe),J(he)}function Ie(s){s.memoizedState!==null&&U(ve,s);var l=se.current,d=V2(l,s.type);l!==d&&(U(oe,s),U(se,d))}function Ve(s){oe.current===s&&(J(se),J(oe)),ve.current===s&&(J(ve),zf._currentValue=V)}var X,Z;function te(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 m={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]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=m.DetermineComponentFrameRoot(),$=E[0],G=E[1];if($&&G){var Q=$.split(`
|
|
45
|
+
`),de=G.split(`
|
|
46
|
+
`);for(x=m=0;m<Q.length&&!Q[m].includes("DetermineComponentFrameRoot");)m++;for(;x<de.length&&!de[x].includes("DetermineComponentFrameRoot");)x++;if(m===Q.length||x===de.length)for(m=Q.length-1,x=de.length-1;1<=m&&0<=x&&Q[m]!==de[x];)x--;for(;1<=m&&0<=x;m--,x--)if(Q[m]!==de[x]){if(m!==1||x!==1)do if(m--,x--,0>x||Q[m]!==de[x]){var be=`
|
|
47
|
+
`+Q[m].replace(" at new "," at ");return s.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",s.displayName)),be}while(1<=m&&0<=x);break}}}finally{xe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?te(d):""}function Ce(s,l){switch(s.tag){case 26:case 27:case 5:return te(s.type);case 16:return te("Lazy");case 13:return s.child!==l&&l!==null?te("Suspense Fallback"):te("Suspense");case 19:return te("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 te("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(m){return`
|
|
48
|
+
Error generating stack: `+m.message+`
|
|
49
|
+
`+m.stack}}var re=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,Ne=e.unstable_LowPriority,Fe=e.unstable_IdlePriority,at=e.log,Bt=e.unstable_setDisableYieldValue,Mt=null,Me=null;function We(s){if(typeof at=="function"&&Bt(s),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Mt,s)}catch{}}var Le=Math.clz32?Math.clz32:ct,Tt=Math.log,ft=Math.LN2;function ct(s){return s>>>=0,s===0?32:31-(Tt(s)/ft|0)|0}var Rt=256,Jt=262144,Wt=4194304;function en(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 hn(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var x=0,E=s.suspendedLanes,$=s.pingedLanes;s=s.warmLanes;var G=m&134217727;return G!==0?(m=G&~E,m!==0?x=en(m):($&=G,$!==0?x=en($):d||(d=G&~s,d!==0&&(x=en(d))))):(G=m&~E,G!==0?x=en(G):$!==0?x=en($):d||(d=m&~s,d!==0&&(x=en(d)))),x===0?0:l!==0&&l!==x&&(l&E)===0&&(E=x&-x,d=l&-l,E>=d||E===32&&(d&4194048)!==0)?l:x}function qr(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function ka(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 bi(){var s=Wt;return Wt<<=1,(Wt&62914560)===0&&(Wt=4194304),s}function Ra(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function vi(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Wl(s,l,d,m,x,E){var $=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 G=s.entanglements,Q=s.expirationTimes,de=s.hiddenUpdates;for(d=$&~d;0<d;){var be=31-Le(d),Ee=1<<be;G[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}m!==0&&Kl(s,m,0),E!==0&&x===0&&s.tag!==0&&(s.suspendedLanes|=E&~($&~l))}function Kl(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-Le(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function rs(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-Le(d),x=1<<m;x&l|s[m]&l&&(s[m]|=l),d&=~x}}function xi(s,l){var d=l&-l;return d=(d&42)!==0?1:_a(d),(d&(s.suspendedLanes|l))!==0?0:d}function _a(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 Ta(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Li(){var s=z.p;return s!==0?s:(s=window.event,s===void 0?32:mR(s.type))}function Aa(s,l){var d=z.p;try{return z.p=s,l()}finally{z.p=d}}var Er=Math.random().toString(36).slice(2),rn="__reactFiber$"+Er,$n="__reactProps$"+Er,lo="__reactContainer$"+Er,Xl="__reactEvents$"+Er,cF="__reactListeners$"+Er,fF="__reactHandles$"+Er,OC="__reactResources$"+Er,ef="__reactMarker$"+Er;function By(s){delete s[rn],delete s[$n],delete s[Xl],delete s[cF],delete s[fF]}function Ql(s){var l=s[rn];if(l)return l;for(var d=s.parentNode;d;){if(l=d[lo]||d[rn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=J2(s);s!==null;){if(d=s[rn])return d;s=J2(s)}return l}s=d,d=s.parentNode}return null}function Zl(s){if(s=s[rn]||s[lo]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function tf(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function Jl(s){var l=s[OC];return l||(l=s[OC]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Rn(s){s[ef]=!0}var $C=new Set,NC={};function Da(s,l){eu(s,l),eu(s+"Capture",l)}function eu(s,l){for(NC[s]=l,s=0;s<l.length;s++)$C.add(l[s])}var dF=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]*$"),PC={},LC={};function hF(s){return re.call(LC,s)?!0:re.call(PC,s)?!1:dF.test(s)?LC[s]=!0:(PC[s]=!0,!1)}function vh(s,l,d){if(hF(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function xh(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 uo(s,l,d,m){if(m===null)s.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+m)}}function Vr(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function IC(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function pF(s,l,d){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,E=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return x.call(this)},set:function($){d=""+$,E.call(this,$)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function($){d=""+$},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Uy(s){if(!s._valueTracker){var l=IC(s)?"checked":"value";s._valueTracker=pF(s,l,""+s[l])}}function FC(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=IC(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function wh(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 mF=/[\n"\\]/g;function Yr(s){return s.replace(mF,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Hy(s,l,d,m,x,E,$,G){s.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?s.type=$:s.removeAttribute("type"),l!=null?$==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Vr(l)):s.value!==""+Vr(l)&&(s.value=""+Vr(l)):$!=="submit"&&$!=="reset"||s.removeAttribute("value"),l!=null?Gy(s,$,Vr(l)):d!=null?Gy(s,$,Vr(d)):m!=null&&s.removeAttribute("value"),x==null&&E!=null&&(s.defaultChecked=!!E),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?s.name=""+Vr(G):s.removeAttribute("name")}function jC(s,l,d,m,x,E,$,G){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.type=E),l!=null||d!=null){if(!(E!=="submit"&&E!=="reset"||l!=null)){Uy(s);return}d=d!=null?""+Vr(d):"",l=l!=null?""+Vr(l):d,G||l===s.value||(s.value=l),s.defaultValue=l}m=m??x,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=G?s.checked:!!m,s.defaultChecked=!!m,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(s.name=$),Uy(s)}function Gy(s,l,d){l==="number"&&wh(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function tu(s,l,d,m){if(s=s.options,l){l={};for(var x=0;x<d.length;x++)l["$"+d[x]]=!0;for(d=0;d<s.length;d++)x=l.hasOwnProperty("$"+s[d].value),s[d].selected!==x&&(s[d].selected=x),x&&m&&(s[d].defaultSelected=!0)}else{for(d=""+Vr(d),l=null,x=0;x<s.length;x++){if(s[x].value===d){s[x].selected=!0,m&&(s[x].defaultSelected=!0);return}l!==null||s[x].disabled||(l=s[x])}l!==null&&(l.selected=!0)}}function zC(s,l,d){if(l!=null&&(l=""+Vr(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Vr(d):""}function BC(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(r(92));if(F(m)){if(1<m.length)throw Error(r(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=Vr(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),Uy(s)}function nu(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var gF=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 UC(s,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,d):typeof d!="number"||d===0||gF.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function HC(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var x in l)m=l[x],l.hasOwnProperty(x)&&d[x]!==m&&UC(s,x,m)}else for(var E in l)l.hasOwnProperty(E)&&UC(s,E,l[E])}function qy(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 yF=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"]]),bF=/^[\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 Sh(s){return bF.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function co(){}var Vy=null;function Yy(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ru=null,iu=null;function GC(s){var l=Zl(s);if(l&&(s=l.stateNode)){var d=s[$n]||null;e:switch(s=l.stateNode,l.type){case"input":if(Hy(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="'+Yr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var x=m[$n]||null;if(!x)throw Error(r(90));Hy(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&FC(m)}break e;case"textarea":zC(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&tu(s,!!d.multiple,l,!1)}}}var Wy=!1;function qC(s,l,d){if(Wy)return s(l,d);Wy=!0;try{var m=s(l);return m}finally{if(Wy=!1,(ru!==null||iu!==null)&&(up(),ru&&(l=ru,s=iu,iu=ru=null,GC(l),s)))for(l=0;l<s.length;l++)GC(s[l])}}function nf(s,l){var d=s.stateNode;if(d===null)return null;var m=d[$n]||null;if(m===null)return null;d=m[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":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ky=!1;if(fo)try{var rf={};Object.defineProperty(rf,"passive",{get:function(){Ky=!0}}),window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch{Ky=!1}var is=null,Xy=null,Ch=null;function VC(){if(Ch)return Ch;var s,l=Xy,d=l.length,m,x="value"in is?is.value:is.textContent,E=x.length;for(s=0;s<d&&l[s]===x[s];s++);var $=d-s;for(m=1;m<=$&&l[d-m]===x[E-m];m++);return Ch=x.slice(s,1<m?1-m:void 0)}function Eh(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 kh(){return!0}function YC(){return!1}function or(s){function l(d,m,x,E,$){this._reactName=d,this._targetInst=x,this.type=m,this.nativeEvent=E,this.target=$,this.currentTarget=null;for(var G in s)s.hasOwnProperty(G)&&(d=s[G],this[G]=d?d(E):E[G]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?kh:YC,this.isPropagationStopped=YC,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=kh)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=kh)},persist:function(){},isPersistent:kh}),l}var Ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rh=or(Ma),of=p({},Ma,{view:0,detail:0}),vF=or(of),Qy,Zy,sf,_h=p({},of,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eb,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!==sf&&(sf&&s.type==="mousemove"?(Qy=s.screenX-sf.screenX,Zy=s.screenY-sf.screenY):Zy=Qy=0,sf=s),Qy)},movementY:function(s){return"movementY"in s?s.movementY:Zy}}),WC=or(_h),xF=p({},_h,{dataTransfer:0}),wF=or(xF),SF=p({},of,{relatedTarget:0}),Jy=or(SF),CF=p({},Ma,{animationName:0,elapsedTime:0,pseudoElement:0}),EF=or(CF),kF=p({},Ma,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),RF=or(kF),_F=p({},Ma,{data:0}),KC=or(_F),TF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AF={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"},DF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MF(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=DF[s])?!!l[s]:!1}function eb(){return MF}var OF=p({},of,{key:function(s){if(s.key){var l=TF[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Eh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?AF[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eb,charCode:function(s){return s.type==="keypress"?Eh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Eh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),$F=or(OF),NF=p({},_h,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),XC=or(NF),PF=p({},of,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eb}),LF=or(PF),IF=p({},Ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),FF=or(IF),jF=p({},_h,{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}),zF=or(jF),BF=p({},Ma,{newState:0,oldState:0}),UF=or(BF),HF=[9,13,27,32],tb=fo&&"CompositionEvent"in window,af=null;fo&&"documentMode"in document&&(af=document.documentMode);var GF=fo&&"TextEvent"in window&&!af,QC=fo&&(!tb||af&&8<af&&11>=af),ZC=" ",JC=!1;function eE(s,l){switch(s){case"keyup":return HF.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tE(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ou=!1;function qF(s,l){switch(s){case"compositionend":return tE(l);case"keypress":return l.which!==32?null:(JC=!0,ZC);case"textInput":return s=l.data,s===ZC&&JC?null:s;default:return null}}function VF(s,l){if(ou)return s==="compositionend"||!tb&&eE(s,l)?(s=VC(),Ch=Xy=is=null,ou=!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 QC&&l.locale!=="ko"?null:l.data;default:return null}}var YF={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 nE(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!YF[s.type]:l==="textarea"}function rE(s,l,d,m){ru?iu?iu.push(m):iu=[m]:ru=m,l=gp(l,"onChange"),0<l.length&&(d=new Rh("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var lf=null,uf=null;function WF(s){j2(s,0)}function Th(s){var l=tf(s);if(FC(l))return s}function iE(s,l){if(s==="change")return l}var oE=!1;if(fo){var nb;if(fo){var rb="oninput"in document;if(!rb){var sE=document.createElement("div");sE.setAttribute("oninput","return;"),rb=typeof sE.oninput=="function"}nb=rb}else nb=!1;oE=nb&&(!document.documentMode||9<document.documentMode)}function aE(){lf&&(lf.detachEvent("onpropertychange",lE),uf=lf=null)}function lE(s){if(s.propertyName==="value"&&Th(uf)){var l=[];rE(l,uf,s,Yy(s)),qC(WF,l)}}function KF(s,l,d){s==="focusin"?(aE(),lf=l,uf=d,lf.attachEvent("onpropertychange",lE)):s==="focusout"&&aE()}function XF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Th(uf)}function QF(s,l){if(s==="click")return Th(l)}function ZF(s,l){if(s==="input"||s==="change")return Th(l)}function JF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var kr=typeof Object.is=="function"?Object.is:JF;function cf(s,l){if(kr(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var x=d[m];if(!re.call(l,x)||!kr(s[x],l[x]))return!1}return!0}function uE(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function cE(s,l){var d=uE(s);s=0;for(var m;d;){if(d.nodeType===3){if(m=s+d.textContent.length,s<=l&&m>=l)return{node:d,offset:l-s};s=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=uE(d)}}function fE(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?fE(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function dE(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=wh(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=wh(s.document)}return l}function ib(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 ej=fo&&"documentMode"in document&&11>=document.documentMode,su=null,ob=null,ff=null,sb=!1;function hE(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;sb||su==null||su!==wh(m)||(m=su,"selectionStart"in m&&ib(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),ff&&cf(ff,m)||(ff=m,m=gp(ob,"onSelect"),0<m.length&&(l=new Rh("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=su)))}function Oa(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var au={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},ab={},pE={};fo&&(pE=document.createElement("div").style,"AnimationEvent"in window||(delete au.animationend.animation,delete au.animationiteration.animation,delete au.animationstart.animation),"TransitionEvent"in window||delete au.transitionend.transition);function $a(s){if(ab[s])return ab[s];if(!au[s])return s;var l=au[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in pE)return ab[s]=l[d];return s}var mE=$a("animationend"),gE=$a("animationiteration"),yE=$a("animationstart"),tj=$a("transitionrun"),nj=$a("transitionstart"),rj=$a("transitioncancel"),bE=$a("transitionend"),vE=new Map,lb="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(" ");lb.push("scrollEnd");function wi(s,l){vE.set(s,l),Da(l,[s])}var Ah=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)},Wr=[],lu=0,ub=0;function Dh(){for(var s=lu,l=ub=lu=0;l<s;){var d=Wr[l];Wr[l++]=null;var m=Wr[l];Wr[l++]=null;var x=Wr[l];Wr[l++]=null;var E=Wr[l];if(Wr[l++]=null,m!==null&&x!==null){var $=m.pending;$===null?x.next=x:(x.next=$.next,$.next=x),m.pending=x}E!==0&&xE(d,x,E)}}function Mh(s,l,d,m){Wr[lu++]=s,Wr[lu++]=l,Wr[lu++]=d,Wr[lu++]=m,ub|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function cb(s,l,d,m){return Mh(s,l,d,m),Oh(s)}function Na(s,l){return Mh(s,null,null,l),Oh(s)}function xE(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var x=!1,E=s.return;E!==null;)E.childLanes|=d,m=E.alternate,m!==null&&(m.childLanes|=d),E.tag===22&&(s=E.stateNode,s===null||s._visibility&1||(x=!0)),s=E,E=E.return;return s.tag===3?(E=s.stateNode,x&&l!==null&&(x=31-Le(d),s=E.hiddenUpdates,m=s[x],m===null?s[x]=[l]:m.push(l),l.lane=d|536870912),E):null}function Oh(s){if(50<$f)throw $f=0,v0=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var uu={};function ij(s,l,d,m){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=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rr(s,l,d,m){return new ij(s,l,d,m)}function fb(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ho(s,l){var d=s.alternate;return d===null?(d=Rr(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 wE(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 $h(s,l,d,m,x,E){var $=0;if(m=s,typeof s=="function")fb(s)&&($=1);else if(typeof s=="string")$=u5(s,d,se.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case H:return s=Rr(31,d,l,x),s.elementType=H,s.lanes=E,s;case v:return Pa(d.children,x,E,l);case w:$=8,x|=24;break;case S:return s=Rr(12,d,l,x|2),s.elementType=S,s.lanes=E,s;case A:return s=Rr(13,d,l,x),s.elementType=A,s.lanes=E,s;case D:return s=Rr(19,d,l,x),s.elementType=D,s.lanes=E,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:$=10;break e;case _:$=9;break e;case T:$=11;break e;case O:$=14;break e;case N:$=16,m=null;break e}$=29,d=Error(r(130,s===null?"null":typeof s,"")),m=null}return l=Rr($,d,l,x),l.elementType=s,l.type=m,l.lanes=E,l}function Pa(s,l,d,m){return s=Rr(7,s,m,l),s.lanes=d,s}function db(s,l,d){return s=Rr(6,s,null,l),s.lanes=d,s}function SE(s){var l=Rr(18,null,null,0);return l.stateNode=s,l}function hb(s,l,d){return l=Rr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var CE=new WeakMap;function Kr(s,l){if(typeof s=="object"&&s!==null){var d=CE.get(s);return d!==void 0?d:(l={value:s,source:l,stack:le(l)},CE.set(s,l),l)}return{value:s,source:l,stack:le(l)}}var cu=[],fu=0,Nh=null,df=0,Xr=[],Qr=0,os=null,Ii=1,Fi="";function po(s,l){cu[fu++]=df,cu[fu++]=Nh,Nh=s,df=l}function EE(s,l,d){Xr[Qr++]=Ii,Xr[Qr++]=Fi,Xr[Qr++]=os,os=s;var m=Ii;s=Fi;var x=32-Le(m)-1;m&=~(1<<x),d+=1;var E=32-Le(l)+x;if(30<E){var $=x-x%5;E=(m&(1<<$)-1).toString(32),m>>=$,x-=$,Ii=1<<32-Le(l)+x|d<<x|m,Fi=E+s}else Ii=1<<E|d<<x|m,Fi=s}function pb(s){s.return!==null&&(po(s,1),EE(s,1,0))}function mb(s){for(;s===Nh;)Nh=cu[--fu],cu[fu]=null,df=cu[--fu],cu[fu]=null;for(;s===os;)os=Xr[--Qr],Xr[Qr]=null,Fi=Xr[--Qr],Xr[Qr]=null,Ii=Xr[--Qr],Xr[Qr]=null}function kE(s,l){Xr[Qr++]=Ii,Xr[Qr++]=Fi,Xr[Qr++]=os,Ii=l.id,Fi=l.overflow,os=s}var Nn=null,Kt=null,Ct=!1,ss=null,Zr=!1,gb=Error(r(519));function as(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hf(Kr(l,s)),gb}function RE(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[rn]=s,l[$n]=m,d){case"dialog":yt("cancel",l),yt("close",l);break;case"iframe":case"object":case"embed":yt("load",l);break;case"video":case"audio":for(d=0;d<Pf.length;d++)yt(Pf[d],l);break;case"source":yt("error",l);break;case"img":case"image":case"link":yt("error",l),yt("load",l);break;case"details":yt("toggle",l);break;case"input":yt("invalid",l),jC(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":yt("invalid",l);break;case"textarea":yt("invalid",l),BC(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||H2(l.textContent,d)?(m.popover!=null&&(yt("beforetoggle",l),yt("toggle",l)),m.onScroll!=null&&yt("scroll",l),m.onScrollEnd!=null&&yt("scrollend",l),m.onClick!=null&&(l.onclick=co),l=!0):l=!1,l||as(s,!0)}function _E(s){for(Nn=s.return;Nn;)switch(Nn.tag){case 5:case 31:case 13:Zr=!1;return;case 27:case 3:Zr=!0;return;default:Nn=Nn.return}}function du(s){if(s!==Nn)return!1;if(!Ct)return _E(s),Ct=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||N0(s.type,s.memoizedProps)),d=!d),d&&Kt&&as(s),_E(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Kt=Z2(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Kt=Z2(s)}else l===27?(l=Kt,ws(s.type)?(s=j0,j0=null,Kt=s):Kt=l):Kt=Nn?ei(s.stateNode.nextSibling):null;return!0}function La(){Kt=Nn=null,Ct=!1}function yb(){var s=ss;return s!==null&&(ur===null?ur=s:ur.push.apply(ur,s),ss=null),s}function hf(s){ss===null?ss=[s]:ss.push(s)}var bb=Y(null),Ia=null,mo=null;function ls(s,l,d){U(bb,l._currentValue),l._currentValue=d}function go(s){s._currentValue=bb.current,J(bb)}function vb(s,l,d){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===d)break;s=s.return}}function xb(s,l,d,m){var x=s.child;for(x!==null&&(x.return=s);x!==null;){var E=x.dependencies;if(E!==null){var $=x.child;E=E.firstContext;e:for(;E!==null;){var G=E;E=x;for(var Q=0;Q<l.length;Q++)if(G.context===l[Q]){E.lanes|=d,G=E.alternate,G!==null&&(G.lanes|=d),vb(E.return,d,s),m||($=null);break e}E=G.next}}else if(x.tag===18){if($=x.return,$===null)throw Error(r(341));$.lanes|=d,E=$.alternate,E!==null&&(E.lanes|=d),vb($,d,s),$=null}else $=x.child;if($!==null)$.return=x;else for($=x;$!==null;){if($===s){$=null;break}if(x=$.sibling,x!==null){x.return=$.return,$=x;break}$=$.return}x=$}}function hu(s,l,d,m){s=null;for(var x=l,E=!1;x!==null;){if(!E){if((x.flags&524288)!==0)E=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var $=x.alternate;if($===null)throw Error(r(387));if($=$.memoizedProps,$!==null){var G=x.type;kr(x.pendingProps.value,$.value)||(s!==null?s.push(G):s=[G])}}else if(x===ve.current){if($=x.alternate,$===null)throw Error(r(387));$.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(s!==null?s.push(zf):s=[zf])}x=x.return}s!==null&&xb(l,s,d,m),l.flags|=262144}function Ph(s){for(s=s.firstContext;s!==null;){if(!kr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Fa(s){Ia=s,mo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Pn(s){return TE(Ia,s)}function Lh(s,l){return Ia===null&&Fa(s),TE(s,l)}function TE(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},mo===null){if(s===null)throw Error(r(308));mo=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else mo=mo.next=l;return d}var oj=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},sj=e.unstable_scheduleCallback,aj=e.unstable_NormalPriority,pn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wb(){return{controller:new oj,data:new Map,refCount:0}}function pf(s){s.refCount--,s.refCount===0&&sj(aj,function(){s.controller.abort()})}var mf=null,Sb=0,pu=0,mu=null;function lj(s,l){if(mf===null){var d=mf=[];Sb=0,pu=k0(),mu={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Sb++,l.then(AE,AE),l}function AE(){if(--Sb===0&&mf!==null){mu!==null&&(mu.status="fulfilled");var s=mf;mf=null,pu=0,mu=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function uj(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(x){d.push(x)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var x=0;x<d.length;x++)(0,d[x])(l)},function(x){for(m.status="rejected",m.reason=x,x=0;x<d.length;x++)(0,d[x])(void 0)}),m}var DE=j.S;j.S=function(s,l){h2=_e(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&lj(s,l),DE!==null&&DE(s,l)};var ja=Y(null);function Cb(){var s=ja.current;return s!==null?s:qt.pooledCache}function Ih(s,l){l===null?U(ja,ja.current):U(ja,l.pool)}function ME(){var s=Cb();return s===null?null:{parent:pn._currentValue,pool:s}}var gu=Error(r(460)),Eb=Error(r(474)),Fh=Error(r(542)),jh={then:function(){}};function OE(s){return s=s.status,s==="fulfilled"||s==="rejected"}function $E(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(co,co),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,PE(s),s;default:if(typeof l.status=="string")l.then(co,co);else{if(s=qt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var x=l;x.status="fulfilled",x.value=m}},function(m){if(l.status==="pending"){var x=l;x.status="rejected",x.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,PE(s),s}throw Ba=l,gu}}function za(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ba=d,gu):d}}var Ba=null;function NE(){if(Ba===null)throw Error(r(459));var s=Ba;return Ba=null,s}function PE(s){if(s===gu||s===Fh)throw Error(r(483))}var yu=null,gf=0;function zh(s){var l=gf;return gf+=1,yu===null&&(yu=[]),$E(yu,s,l)}function yf(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function Bh(s,l){throw l.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function LE(s){function l(ie,ee){if(s){var fe=ie.deletions;fe===null?(ie.deletions=[ee],ie.flags|=16):fe.push(ee)}}function d(ie,ee){if(!s)return null;for(;ee!==null;)l(ie,ee),ee=ee.sibling;return null}function m(ie){for(var ee=new Map;ie!==null;)ie.key!==null?ee.set(ie.key,ie):ee.set(ie.index,ie),ie=ie.sibling;return ee}function x(ie,ee){return ie=ho(ie,ee),ie.index=0,ie.sibling=null,ie}function E(ie,ee,fe){return ie.index=fe,s?(fe=ie.alternate,fe!==null?(fe=fe.index,fe<ee?(ie.flags|=67108866,ee):fe):(ie.flags|=67108866,ee)):(ie.flags|=1048576,ee)}function $(ie){return s&&ie.alternate===null&&(ie.flags|=67108866),ie}function G(ie,ee,fe,we){return ee===null||ee.tag!==6?(ee=db(fe,ie.mode,we),ee.return=ie,ee):(ee=x(ee,fe),ee.return=ie,ee)}function Q(ie,ee,fe,we){var Xe=fe.type;return Xe===v?be(ie,ee,fe.props.children,we,fe.key):ee!==null&&(ee.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===N&&za(Xe)===ee.type)?(ee=x(ee,fe.props),yf(ee,fe),ee.return=ie,ee):(ee=$h(fe.type,fe.key,fe.props,null,ie.mode,we),yf(ee,fe),ee.return=ie,ee)}function de(ie,ee,fe,we){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==fe.containerInfo||ee.stateNode.implementation!==fe.implementation?(ee=hb(fe,ie.mode,we),ee.return=ie,ee):(ee=x(ee,fe.children||[]),ee.return=ie,ee)}function be(ie,ee,fe,we,Xe){return ee===null||ee.tag!==7?(ee=Pa(fe,ie.mode,we,Xe),ee.return=ie,ee):(ee=x(ee,fe),ee.return=ie,ee)}function Ee(ie,ee,fe){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=db(""+ee,ie.mode,fe),ee.return=ie,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return fe=$h(ee.type,ee.key,ee.props,null,ie.mode,fe),yf(fe,ee),fe.return=ie,fe;case b:return ee=hb(ee,ie.mode,fe),ee.return=ie,ee;case N:return ee=za(ee),Ee(ie,ee,fe)}if(F(ee)||M(ee))return ee=Pa(ee,ie.mode,fe,null),ee.return=ie,ee;if(typeof ee.then=="function")return Ee(ie,zh(ee),fe);if(ee.$$typeof===k)return Ee(ie,Lh(ie,ee),fe);Bh(ie,ee)}return null}function pe(ie,ee,fe,we){var Xe=ee!==null?ee.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Xe!==null?null:G(ie,ee,""+fe,we);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Xe?Q(ie,ee,fe,we):null;case b:return fe.key===Xe?de(ie,ee,fe,we):null;case N:return fe=za(fe),pe(ie,ee,fe,we)}if(F(fe)||M(fe))return Xe!==null?null:be(ie,ee,fe,we,null);if(typeof fe.then=="function")return pe(ie,ee,zh(fe),we);if(fe.$$typeof===k)return pe(ie,ee,Lh(ie,fe),we);Bh(ie,fe)}return null}function ye(ie,ee,fe,we,Xe){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ie=ie.get(fe)||null,G(ee,ie,""+we,Xe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return ie=ie.get(we.key===null?fe:we.key)||null,Q(ee,ie,we,Xe);case b:return ie=ie.get(we.key===null?fe:we.key)||null,de(ee,ie,we,Xe);case N:return we=za(we),ye(ie,ee,fe,we,Xe)}if(F(we)||M(we))return ie=ie.get(fe)||null,be(ee,ie,we,Xe,null);if(typeof we.then=="function")return ye(ie,ee,fe,zh(we),Xe);if(we.$$typeof===k)return ye(ie,ee,fe,Lh(ee,we),Xe);Bh(ee,we)}return null}function je(ie,ee,fe,we){for(var Xe=null,At=null,qe=ee,lt=ee=0,wt=null;qe!==null&<<fe.length;lt++){qe.index>lt?(wt=qe,qe=null):wt=qe.sibling;var Dt=pe(ie,qe,fe[lt],we);if(Dt===null){qe===null&&(qe=wt);break}s&&qe&&Dt.alternate===null&&l(ie,qe),ee=E(Dt,ee,lt),At===null?Xe=Dt:At.sibling=Dt,At=Dt,qe=wt}if(lt===fe.length)return d(ie,qe),Ct&&po(ie,lt),Xe;if(qe===null){for(;lt<fe.length;lt++)qe=Ee(ie,fe[lt],we),qe!==null&&(ee=E(qe,ee,lt),At===null?Xe=qe:At.sibling=qe,At=qe);return Ct&&po(ie,lt),Xe}for(qe=m(qe);lt<fe.length;lt++)wt=ye(qe,ie,lt,fe[lt],we),wt!==null&&(s&&wt.alternate!==null&&qe.delete(wt.key===null?lt:wt.key),ee=E(wt,ee,lt),At===null?Xe=wt:At.sibling=wt,At=wt);return s&&qe.forEach(function(Rs){return l(ie,Rs)}),Ct&&po(ie,lt),Xe}function Ze(ie,ee,fe,we){if(fe==null)throw Error(r(151));for(var Xe=null,At=null,qe=ee,lt=ee=0,wt=null,Dt=fe.next();qe!==null&&!Dt.done;lt++,Dt=fe.next()){qe.index>lt?(wt=qe,qe=null):wt=qe.sibling;var Rs=pe(ie,qe,Dt.value,we);if(Rs===null){qe===null&&(qe=wt);break}s&&qe&&Rs.alternate===null&&l(ie,qe),ee=E(Rs,ee,lt),At===null?Xe=Rs:At.sibling=Rs,At=Rs,qe=wt}if(Dt.done)return d(ie,qe),Ct&&po(ie,lt),Xe;if(qe===null){for(;!Dt.done;lt++,Dt=fe.next())Dt=Ee(ie,Dt.value,we),Dt!==null&&(ee=E(Dt,ee,lt),At===null?Xe=Dt:At.sibling=Dt,At=Dt);return Ct&&po(ie,lt),Xe}for(qe=m(qe);!Dt.done;lt++,Dt=fe.next())Dt=ye(qe,ie,lt,Dt.value,we),Dt!==null&&(s&&Dt.alternate!==null&&qe.delete(Dt.key===null?lt:Dt.key),ee=E(Dt,ee,lt),At===null?Xe=Dt:At.sibling=Dt,At=Dt);return s&&qe.forEach(function(x5){return l(ie,x5)}),Ct&&po(ie,lt),Xe}function Gt(ie,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 Xe=fe.key;ee!==null;){if(ee.key===Xe){if(Xe=fe.type,Xe===v){if(ee.tag===7){d(ie,ee.sibling),we=x(ee,fe.props.children),we.return=ie,ie=we;break e}}else if(ee.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===N&&za(Xe)===ee.type){d(ie,ee.sibling),we=x(ee,fe.props),yf(we,fe),we.return=ie,ie=we;break e}d(ie,ee);break}else l(ie,ee);ee=ee.sibling}fe.type===v?(we=Pa(fe.props.children,ie.mode,we,fe.key),we.return=ie,ie=we):(we=$h(fe.type,fe.key,fe.props,null,ie.mode,we),yf(we,fe),we.return=ie,ie=we)}return $(ie);case b:e:{for(Xe=fe.key;ee!==null;){if(ee.key===Xe)if(ee.tag===4&&ee.stateNode.containerInfo===fe.containerInfo&&ee.stateNode.implementation===fe.implementation){d(ie,ee.sibling),we=x(ee,fe.children||[]),we.return=ie,ie=we;break e}else{d(ie,ee);break}else l(ie,ee);ee=ee.sibling}we=hb(fe,ie.mode,we),we.return=ie,ie=we}return $(ie);case N:return fe=za(fe),Gt(ie,ee,fe,we)}if(F(fe))return je(ie,ee,fe,we);if(M(fe)){if(Xe=M(fe),typeof Xe!="function")throw Error(r(150));return fe=Xe.call(fe),Ze(ie,ee,fe,we)}if(typeof fe.then=="function")return Gt(ie,ee,zh(fe),we);if(fe.$$typeof===k)return Gt(ie,ee,Lh(ie,fe),we);Bh(ie,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ee!==null&&ee.tag===6?(d(ie,ee.sibling),we=x(ee,fe),we.return=ie,ie=we):(d(ie,ee),we=db(fe,ie.mode,we),we.return=ie,ie=we),$(ie)):d(ie,ee)}return function(ie,ee,fe,we){try{gf=0;var Xe=Gt(ie,ee,fe,we);return yu=null,Xe}catch(qe){if(qe===gu||qe===Fh)throw qe;var At=Rr(29,qe,null,ie.mode);return At.lanes=we,At.return=ie,At}finally{}}}var Ua=LE(!0),IE=LE(!1),us=!1;function kb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rb(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 cs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function fs(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Ot&2)!==0){var x=m.pending;return x===null?l.next=l:(l.next=x.next,x.next=l),m.pending=l,l=Oh(s),xE(s,null,d),l}return Mh(s,m,l,d),Oh(s)}function bf(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,rs(s,d)}}function _b(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var x=null,E=null;if(d=d.firstBaseUpdate,d!==null){do{var $={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};E===null?x=E=$:E=E.next=$,d=d.next}while(d!==null);E===null?x=E=l:E=E.next=l}else x=E=l;d={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:E,shared:m.shared,callbacks:m.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var Tb=!1;function vf(){if(Tb){var s=mu;if(s!==null)throw s}}function xf(s,l,d,m){Tb=!1;var x=s.updateQueue;us=!1;var E=x.firstBaseUpdate,$=x.lastBaseUpdate,G=x.shared.pending;if(G!==null){x.shared.pending=null;var Q=G,de=Q.next;Q.next=null,$===null?E=de:$.next=de,$=Q;var be=s.alternate;be!==null&&(be=be.updateQueue,G=be.lastBaseUpdate,G!==$&&(G===null?be.firstBaseUpdate=de:G.next=de,be.lastBaseUpdate=Q))}if(E!==null){var Ee=x.baseState;$=0,be=de=Q=null,G=E;do{var pe=G.lane&-536870913,ye=pe!==G.lane;if(ye?(xt&pe)===pe:(m&pe)===pe){pe!==0&&pe===pu&&(Tb=!0),be!==null&&(be=be.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var je=s,Ze=G;pe=l;var Gt=d;switch(Ze.tag){case 1:if(je=Ze.payload,typeof je=="function"){Ee=je.call(Gt,Ee,pe);break e}Ee=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ze.payload,pe=typeof je=="function"?je.call(Gt,Ee,pe):je,pe==null)break e;Ee=p({},Ee,pe);break e;case 2:us=!0}}pe=G.callback,pe!==null&&(s.flags|=64,ye&&(s.flags|=8192),ye=x.callbacks,ye===null?x.callbacks=[pe]:ye.push(pe))}else ye={lane:pe,tag:G.tag,payload:G.payload,callback:G.callback,next:null},be===null?(de=be=ye,Q=Ee):be=be.next=ye,$|=pe;if(G=G.next,G===null){if(G=x.shared.pending,G===null)break;ye=G,G=ye.next,ye.next=null,x.lastBaseUpdate=ye,x.shared.pending=null}}while(!0);be===null&&(Q=Ee),x.baseState=Q,x.firstBaseUpdate=de,x.lastBaseUpdate=be,E===null&&(x.shared.lanes=0),gs|=$,s.lanes=$,s.memoizedState=Ee}}function FE(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function jE(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)FE(d[s],l)}var bu=Y(null),Uh=Y(0);function zE(s,l){s=ko,U(Uh,s),U(bu,l),ko=s|l.baseLanes}function Ab(){U(Uh,ko),U(bu,bu.current)}function Db(){ko=Uh.current,J(bu),J(Uh)}var _r=Y(null),Jr=null;function ds(s){var l=s.alternate;U(un,un.current&1),U(_r,s),Jr===null&&(l===null||bu.current!==null||l.memoizedState!==null)&&(Jr=s)}function Mb(s){U(un,un.current),U(_r,s),Jr===null&&(Jr=s)}function BE(s){s.tag===22?(U(un,un.current),U(_r,s),Jr===null&&(Jr=s)):hs()}function hs(){U(un,un.current),U(_r,_r.current)}function Tr(s){J(_r),Jr===s&&(Jr=null),J(un)}var un=Y(0);function Hh(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||I0(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 yo=0,ot=null,Ut=null,mn=null,Gh=!1,vu=!1,Ha=!1,qh=0,wf=0,xu=null,cj=0;function on(){throw Error(r(321))}function Ob(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!kr(s[d],l[d]))return!1;return!0}function $b(s,l,d,m,x,E){return yo=E,ot=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,j.H=s===null||s.memoizedState===null?Ek:Wb,Ha=!1,E=d(m,x),Ha=!1,vu&&(E=HE(l,d,m,x)),UE(s),E}function UE(s){j.H=Ef;var l=Ut!==null&&Ut.next!==null;if(yo=0,mn=Ut=ot=null,Gh=!1,wf=0,xu=null,l)throw Error(r(300));s===null||gn||(s=s.dependencies,s!==null&&Ph(s)&&(gn=!0))}function HE(s,l,d,m){ot=s;var x=0;do{if(vu&&(xu=null),wf=0,vu=!1,25<=x)throw Error(r(301));if(x+=1,mn=Ut=null,s.updateQueue!=null){var E=s.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}j.H=kk,E=l(d,m)}while(vu);return E}function fj(){var s=j.H,l=s.useState()[0];return l=typeof l.then=="function"?Sf(l):l,s=s.useState()[0],(Ut!==null?Ut.memoizedState:null)!==s&&(ot.flags|=1024),l}function Nb(){var s=qh!==0;return qh=0,s}function Pb(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function Lb(s){if(Gh){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Gh=!1}yo=0,mn=Ut=ot=null,vu=!1,wf=qh=0,xu=null}function Kn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?ot.memoizedState=mn=s:mn=mn.next=s,mn}function cn(){if(Ut===null){var s=ot.alternate;s=s!==null?s.memoizedState:null}else s=Ut.next;var l=mn===null?ot.memoizedState:mn.next;if(l!==null)mn=l,Ut=s;else{if(s===null)throw ot.alternate===null?Error(r(467)):Error(r(310));Ut=s,s={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},mn===null?ot.memoizedState=mn=s:mn=mn.next=s}return mn}function Vh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Sf(s){var l=wf;return wf+=1,xu===null&&(xu=[]),s=$E(xu,s,l),l=ot,(mn===null?l.memoizedState:mn.next)===null&&(l=l.alternate,j.H=l===null||l.memoizedState===null?Ek:Wb),s}function Yh(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Sf(s);if(s.$$typeof===k)return Pn(s)}throw Error(r(438,String(s)))}function Ib(s){var l=null,d=ot.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=ot.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(x){return x.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Vh(),ot.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),m=0;m<s;m++)d[m]=I;return l.index++,d}function bo(s,l){return typeof l=="function"?l(s):l}function Wh(s){var l=cn();return Fb(l,Ut,s)}function Fb(s,l,d){var m=s.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=d;var x=s.baseQueue,E=m.pending;if(E!==null){if(x!==null){var $=x.next;x.next=E.next,E.next=$}l.baseQueue=x=E,m.pending=null}if(E=s.baseState,x===null)s.memoizedState=E;else{l=x.next;var G=$=null,Q=null,de=l,be=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(xt&Ee)===Ee:(yo&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===pu&&(be=!0);else if((yo&pe)===pe){de=de.next,pe===pu&&(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?(G=Q=Ee,$=E):Q=Q.next=Ee,ot.lanes|=pe,gs|=pe;Ee=de.action,Ha&&d(E,Ee),E=de.hasEagerState?de.eagerState:d(E,Ee)}else pe={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(G=Q=pe,$=E):Q=Q.next=pe,ot.lanes|=Ee,gs|=Ee;de=de.next}while(de!==null&&de!==l);if(Q===null?$=E:Q.next=G,!kr(E,s.memoizedState)&&(gn=!0,be&&(d=mu,d!==null)))throw d;s.memoizedState=E,s.baseState=$,s.baseQueue=Q,m.lastRenderedState=E}return x===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function jb(s){var l=cn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var m=d.dispatch,x=d.pending,E=l.memoizedState;if(x!==null){d.pending=null;var $=x=x.next;do E=s(E,$.action),$=$.next;while($!==x);kr(E,l.memoizedState)||(gn=!0),l.memoizedState=E,l.baseQueue===null&&(l.baseState=E),d.lastRenderedState=E}return[E,m]}function GE(s,l,d){var m=ot,x=cn(),E=Ct;if(E){if(d===void 0)throw Error(r(407));d=d()}else d=l();var $=!kr((Ut||x).memoizedState,d);if($&&(x.memoizedState=d,gn=!0),x=x.queue,Ub(YE.bind(null,m,x,s),[s]),x.getSnapshot!==l||$||mn!==null&&mn.memoizedState.tag&1){if(m.flags|=2048,wu(9,{destroy:void 0},VE.bind(null,m,x,d,l),null),qt===null)throw Error(r(349));E||(yo&127)!==0||qE(m,l,d)}return d}function qE(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=ot.updateQueue,l===null?(l=Vh(),ot.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function VE(s,l,d,m){l.value=d,l.getSnapshot=m,WE(l)&&KE(s)}function YE(s,l,d){return d(function(){WE(l)&&KE(s)})}function WE(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!kr(s,d)}catch{return!0}}function KE(s){var l=Na(s,2);l!==null&&cr(l,s,2)}function zb(s){var l=Kn();if(typeof s=="function"){var d=s;if(s=d(),Ha){We(!0);try{d()}finally{We(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:s},l}function XE(s,l,d,m){return s.baseState=d,Fb(s,Ut,typeof m=="function"?m:bo)}function dj(s,l,d,m,x){if(Qh(s))throw Error(r(485));if(s=l.action,s!==null){var E={payload:x,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){E.listeners.push($)}};j.T!==null?d(!0):E.isTransition=!1,m(E),d=l.pending,d===null?(E.next=l.pending=E,QE(l,E)):(E.next=d.next,l.pending=d.next=E)}}function QE(s,l){var d=l.action,m=l.payload,x=s.state;if(l.isTransition){var E=j.T,$={};j.T=$;try{var G=d(x,m),Q=j.S;Q!==null&&Q($,G),ZE(s,l,G)}catch(de){Bb(s,l,de)}finally{E!==null&&$.types!==null&&(E.types=$.types),j.T=E}}else try{E=d(x,m),ZE(s,l,E)}catch(de){Bb(s,l,de)}}function ZE(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){JE(s,l,m)},function(m){return Bb(s,l,m)}):JE(s,l,d)}function JE(s,l,d){l.status="fulfilled",l.value=d,ek(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,QE(s,d)))}function Bb(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,ek(l),l=l.next;while(l!==m)}s.action=null}function ek(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function tk(s,l){return l}function nk(s,l){if(Ct){var d=qt.formState;if(d!==null){e:{var m=ot;if(Ct){if(Kt){t:{for(var x=Kt,E=Zr;x.nodeType!==8;){if(!E){x=null;break t}if(x=ei(x.nextSibling),x===null){x=null;break t}}E=x.data,x=E==="F!"||E==="F"?x:null}if(x){Kt=ei(x.nextSibling),m=x.data==="F!";break e}}as(m)}m=!1}m&&(l=d[0])}}return d=Kn(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tk,lastRenderedState:l},d.queue=m,d=wk.bind(null,ot,m),m.dispatch=d,m=zb(!1),E=Yb.bind(null,ot,!1,m.queue),m=Kn(),x={state:l,dispatch:null,action:s,pending:null},m.queue=x,d=dj.bind(null,ot,x,E,d),x.dispatch=d,m.memoizedState=s,[l,d,!1]}function rk(s){var l=cn();return ik(l,Ut,s)}function ik(s,l,d){if(l=Fb(s,l,tk)[0],s=Wh(bo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Sf(l)}catch($){throw $===gu?Fh:$}else m=l;l=cn();var x=l.queue,E=x.dispatch;return d!==l.memoizedState&&(ot.flags|=2048,wu(9,{destroy:void 0},hj.bind(null,x,d),null)),[m,E,s]}function hj(s,l){s.action=l}function ok(s){var l=cn(),d=Ut;if(d!==null)return ik(l,d,s);cn(),l=l.memoizedState,d=cn();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function wu(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=ot.updateQueue,l===null&&(l=Vh(),ot.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(m=d.next,d.next=s,s.next=m,l.lastEffect=s),s}function sk(){return cn().memoizedState}function Kh(s,l,d,m){var x=Kn();ot.flags|=s,x.memoizedState=wu(1|l,{destroy:void 0},d,m===void 0?null:m)}function Xh(s,l,d,m){var x=cn();m=m===void 0?null:m;var E=x.memoizedState.inst;Ut!==null&&m!==null&&Ob(m,Ut.memoizedState.deps)?x.memoizedState=wu(l,E,d,m):(ot.flags|=s,x.memoizedState=wu(1|l,E,d,m))}function ak(s,l){Kh(8390656,8,s,l)}function Ub(s,l){Xh(2048,8,s,l)}function pj(s){ot.flags|=4;var l=ot.updateQueue;if(l===null)l=Vh(),ot.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function lk(s){var l=cn().memoizedState;return pj({ref:l,nextImpl:s}),function(){if((Ot&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function uk(s,l){return Xh(4,2,s,l)}function ck(s,l){return Xh(4,4,s,l)}function fk(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 dk(s,l,d){d=d!=null?d.concat([s]):null,Xh(4,4,fk.bind(null,l,s),d)}function Hb(){}function hk(s,l){var d=cn();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&Ob(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function pk(s,l){var d=cn();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&Ob(l,m[1]))return m[0];if(m=s(),Ha){We(!0);try{s()}finally{We(!1)}}return d.memoizedState=[m,l],m}function Gb(s,l,d){return d===void 0||(yo&1073741824)!==0&&(xt&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=m2(),ot.lanes|=s,gs|=s,d)}function mk(s,l,d,m){return kr(d,l)?d:bu.current!==null?(s=Gb(s,d,m),kr(s,l)||(gn=!0),s):(yo&42)===0||(yo&1073741824)!==0&&(xt&261930)===0?(gn=!0,s.memoizedState=d):(s=m2(),ot.lanes|=s,gs|=s,l)}function gk(s,l,d,m,x){var E=z.p;z.p=E!==0&&8>E?E:8;var $=j.T,G={};j.T=G,Yb(s,!1,l,d);try{var Q=x(),de=j.S;if(de!==null&&de(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=uj(Q,m);Cf(s,l,be,Mr(s))}else Cf(s,l,m,Mr(s))}catch(Ee){Cf(s,l,{then:function(){},status:"rejected",reason:Ee},Mr())}finally{z.p=E,$!==null&&G.types!==null&&($.types=G.types),j.T=$}}function mj(){}function qb(s,l,d,m){if(s.tag!==5)throw Error(r(476));var x=yk(s).queue;gk(s,x,l,V,d===null?mj:function(){return bk(s),d(m)})}function yk(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:V},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function bk(s){var l=yk(s);l.next===null&&(l=s.alternate.memoizedState),Cf(s,l.next.queue,{},Mr())}function Vb(){return Pn(zf)}function vk(){return cn().memoizedState}function xk(){return cn().memoizedState}function gj(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Mr();s=cs(d);var m=fs(l,s,d);m!==null&&(cr(m,l,d),bf(m,l,d)),l={cache:wb()},s.payload=l;return}l=l.return}}function yj(s,l,d){var m=Mr();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Qh(s)?Sk(l,d):(d=cb(s,l,d,m),d!==null&&(cr(d,s,m),Ck(d,l,m)))}function wk(s,l,d){var m=Mr();Cf(s,l,d,m)}function Cf(s,l,d,m){var x={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Qh(s))Sk(l,x);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=l.lastRenderedReducer,E!==null))try{var $=l.lastRenderedState,G=E($,d);if(x.hasEagerState=!0,x.eagerState=G,kr(G,$))return Mh(s,l,x,0),qt===null&&Dh(),!1}catch{}finally{}if(d=cb(s,l,x,m),d!==null)return cr(d,s,m),Ck(d,l,m),!0}return!1}function Yb(s,l,d,m){if(m={lane:2,revertLane:k0(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Qh(s)){if(l)throw Error(r(479))}else l=cb(s,d,m,2),l!==null&&cr(l,s,2)}function Qh(s){var l=s.alternate;return s===ot||l!==null&&l===ot}function Sk(s,l){vu=Gh=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function Ck(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,rs(s,d)}}var Ef={readContext:Pn,use:Yh,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on};Ef.useEffectEvent=on;var Ek={readContext:Pn,use:Yh,useCallback:function(s,l){return Kn().memoizedState=[s,l===void 0?null:l],s},useContext:Pn,useEffect:ak,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Kh(4194308,4,fk.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Kh(4194308,4,s,l)},useInsertionEffect:function(s,l){Kh(4,2,s,l)},useMemo:function(s,l){var d=Kn();l=l===void 0?null:l;var m=s();if(Ha){We(!0);try{s()}finally{We(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=Kn();if(d!==void 0){var x=d(l);if(Ha){We(!0);try{d(l)}finally{We(!1)}}}else x=l;return m.memoizedState=m.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},m.queue=s,s=s.dispatch=yj.bind(null,ot,s),[m.memoizedState,s]},useRef:function(s){var l=Kn();return s={current:s},l.memoizedState=s},useState:function(s){s=zb(s);var l=s.queue,d=wk.bind(null,ot,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:Hb,useDeferredValue:function(s,l){var d=Kn();return Gb(d,s,l)},useTransition:function(){var s=zb(!1);return s=gk.bind(null,ot,s.queue,!0,!1),Kn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=ot,x=Kn();if(Ct){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(xt&127)!==0||qE(m,l,d)}x.memoizedState=d;var E={value:d,getSnapshot:l};return x.queue=E,ak(YE.bind(null,m,E,s),[s]),m.flags|=2048,wu(9,{destroy:void 0},VE.bind(null,m,E,d,l),null),d},useId:function(){var s=Kn(),l=qt.identifierPrefix;if(Ct){var d=Fi,m=Ii;d=(m&~(1<<32-Le(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=qh++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=cj++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Vb,useFormState:nk,useActionState:nk,useOptimistic:function(s){var l=Kn();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Yb.bind(null,ot,!0,d),d.dispatch=l,[s,l]},useMemoCache:Ib,useCacheRefresh:function(){return Kn().memoizedState=gj.bind(null,ot)},useEffectEvent:function(s){var l=Kn(),d={impl:s};return l.memoizedState=d,function(){if((Ot&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Wb={readContext:Pn,use:Yh,useCallback:hk,useContext:Pn,useEffect:Ub,useImperativeHandle:dk,useInsertionEffect:uk,useLayoutEffect:ck,useMemo:pk,useReducer:Wh,useRef:sk,useState:function(){return Wh(bo)},useDebugValue:Hb,useDeferredValue:function(s,l){var d=cn();return mk(d,Ut.memoizedState,s,l)},useTransition:function(){var s=Wh(bo)[0],l=cn().memoizedState;return[typeof s=="boolean"?s:Sf(s),l]},useSyncExternalStore:GE,useId:vk,useHostTransitionStatus:Vb,useFormState:rk,useActionState:rk,useOptimistic:function(s,l){var d=cn();return XE(d,Ut,s,l)},useMemoCache:Ib,useCacheRefresh:xk};Wb.useEffectEvent=lk;var kk={readContext:Pn,use:Yh,useCallback:hk,useContext:Pn,useEffect:Ub,useImperativeHandle:dk,useInsertionEffect:uk,useLayoutEffect:ck,useMemo:pk,useReducer:jb,useRef:sk,useState:function(){return jb(bo)},useDebugValue:Hb,useDeferredValue:function(s,l){var d=cn();return Ut===null?Gb(d,s,l):mk(d,Ut.memoizedState,s,l)},useTransition:function(){var s=jb(bo)[0],l=cn().memoizedState;return[typeof s=="boolean"?s:Sf(s),l]},useSyncExternalStore:GE,useId:vk,useHostTransitionStatus:Vb,useFormState:ok,useActionState:ok,useOptimistic:function(s,l){var d=cn();return Ut!==null?XE(d,Ut,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:Ib,useCacheRefresh:xk};kk.useEffectEvent=lk;function Kb(s,l,d,m){l=s.memoizedState,d=d(m,l),d=d==null?l:p({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Xb={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=Mr(),x=cs(m);x.payload=l,d!=null&&(x.callback=d),l=fs(s,x,m),l!==null&&(cr(l,s,m),bf(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=Mr(),x=cs(m);x.tag=1,x.payload=l,d!=null&&(x.callback=d),l=fs(s,x,m),l!==null&&(cr(l,s,m),bf(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Mr(),m=cs(d);m.tag=2,l!=null&&(m.callback=l),l=fs(s,m,d),l!==null&&(cr(l,s,d),bf(l,s,d))}};function Rk(s,l,d,m,x,E,$){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,E,$):l.prototype&&l.prototype.isPureReactComponent?!cf(d,m)||!cf(x,E):!0}function _k(s,l,d,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==s&&Xb.enqueueReplaceState(l,l.state,null)}function Ga(s,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(s=s.defaultProps){d===l&&(d=p({},d));for(var x in s)d[x]===void 0&&(d[x]=s[x])}return d}function Tk(s){Ah(s)}function Ak(s){console.error(s)}function Dk(s){Ah(s)}function Zh(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function Mk(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function Qb(s,l,d){return d=cs(d),d.tag=3,d.payload={element:null},d.callback=function(){Zh(s,l)},d}function Ok(s){return s=cs(s),s.tag=3,s}function $k(s,l,d,m){var x=d.type.getDerivedStateFromError;if(typeof x=="function"){var E=m.value;s.payload=function(){return x(E)},s.callback=function(){Mk(l,d,m)}}var $=d.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(s.callback=function(){Mk(l,d,m),typeof x!="function"&&(ys===null?ys=new Set([this]):ys.add(this));var G=m.stack;this.componentDidCatch(m.value,{componentStack:G!==null?G:""})})}function bj(s,l,d,m,x){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&hu(l,d,x,!0),d=_r.current,d!==null){switch(d.tag){case 31:case 13:return Jr===null?cp():d.alternate===null&&sn===0&&(sn=3),d.flags&=-257,d.flags|=65536,d.lanes=x,m===jh?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),S0(s,m,x)),!1;case 22:return d.flags|=65536,m===jh?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),S0(s,m,x)),!1}throw Error(r(435,d.tag))}return S0(s,m,x),cp(),!1}if(Ct)return l=_r.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=x,m!==gb&&(s=Error(r(422),{cause:m}),hf(Kr(s,d)))):(m!==gb&&(l=Error(r(423),{cause:m}),hf(Kr(l,d))),s=s.current.alternate,s.flags|=65536,x&=-x,s.lanes|=x,m=Kr(m,d),x=Qb(s.stateNode,m,x),_b(s,x),sn!==4&&(sn=2)),!1;var E=Error(r(520),{cause:m});if(E=Kr(E,d),Of===null?Of=[E]:Of.push(E),sn!==4&&(sn=2),l===null)return!0;m=Kr(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=x&-x,d.lanes|=s,s=Qb(d.stateNode,m,s),_b(d,s),!1;case 1:if(l=d.type,E=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(ys===null||!ys.has(E))))return d.flags|=65536,x&=-x,d.lanes|=x,x=Ok(x),$k(x,s,d,m),_b(d,x),!1}d=d.return}while(d!==null);return!1}var Zb=Error(r(461)),gn=!1;function Ln(s,l,d,m){l.child=s===null?IE(l,null,d,m):Ua(l,s.child,d,m)}function Nk(s,l,d,m,x){d=d.render;var E=l.ref;if("ref"in m){var $={};for(var G in m)G!=="ref"&&($[G]=m[G])}else $=m;return Fa(l),m=$b(s,l,d,$,E,x),G=Nb(),s!==null&&!gn?(Pb(s,l,x),vo(s,l,x)):(Ct&&G&&pb(l),l.flags|=1,Ln(s,l,m,x),l.child)}function Pk(s,l,d,m,x){if(s===null){var E=d.type;return typeof E=="function"&&!fb(E)&&E.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=E,Lk(s,l,E,m,x)):(s=$h(d.type,null,m,l,l.mode,x),s.ref=l.ref,s.return=l,l.child=s)}if(E=s.child,!s0(s,x)){var $=E.memoizedProps;if(d=d.compare,d=d!==null?d:cf,d($,m)&&s.ref===l.ref)return vo(s,l,x)}return l.flags|=1,s=ho(E,m),s.ref=l.ref,s.return=l,l.child=s}function Lk(s,l,d,m,x){if(s!==null){var E=s.memoizedProps;if(cf(E,m)&&s.ref===l.ref)if(gn=!1,l.pendingProps=m=E,s0(s,x))(s.flags&131072)!==0&&(gn=!0);else return l.lanes=s.lanes,vo(s,l,x)}return Jb(s,l,d,m,x)}function Ik(s,l,d,m){var x=m.children,E=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(E=E!==null?E.baseLanes|d:d,s!==null){for(m=l.child=s.child,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~E}else m=0,l.child=null;return Fk(s,l,E,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Ih(l,E!==null?E.cachePool:null),E!==null?zE(l,E):Ab(),BE(l);else return m=l.lanes=536870912,Fk(s,l,E!==null?E.baseLanes|d:d,d,m)}else E!==null?(Ih(l,E.cachePool),zE(l,E),hs(),l.memoizedState=null):(s!==null&&Ih(l,null),Ab(),hs());return Ln(s,l,x,d),l.child}function kf(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Fk(s,l,d,m,x){var E=Cb();return E=E===null?null:{parent:pn._currentValue,pool:E},l.memoizedState={baseLanes:d,cachePool:E},s!==null&&Ih(l,null),Ab(),BE(l),s!==null&&hu(s,l,m,!0),l.childLanes=x,null}function Jh(s,l){return l=tp({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function jk(s,l,d){return Ua(l,s.child,null,d),s=Jh(l,l.pendingProps),s.flags|=2,Tr(l),l.memoizedState=null,s}function vj(s,l,d){var m=l.pendingProps,x=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Ct){if(m.mode==="hidden")return s=Jh(l,m),l.lanes=536870912,kf(null,s);if(Mb(l),(s=Kt)?(s=Q2(s,Zr),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:os!==null?{id:Ii,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},d=SE(s),d.return=l,l.child=d,Nn=l,Kt=null)):s=null,s===null)throw as(l);return l.lanes=536870912,null}return Jh(l,m)}var E=s.memoizedState;if(E!==null){var $=E.dehydrated;if(Mb(l),x)if(l.flags&256)l.flags&=-257,l=jk(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(gn||hu(s,l,d,!1),x=(d&s.childLanes)!==0,gn||x){if(m=qt,m!==null&&($=xi(m,d),$!==0&&$!==E.retryLane))throw E.retryLane=$,Na(s,$),cr(m,s,$),Zb;cp(),l=jk(s,l,d)}else s=E.treeContext,Kt=ei($.nextSibling),Nn=l,Ct=!0,ss=null,Zr=!1,s!==null&&kE(l,s),l=Jh(l,m),l.flags|=4096;return l}return s=ho(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function ep(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 Jb(s,l,d,m,x){return Fa(l),d=$b(s,l,d,m,void 0,x),m=Nb(),s!==null&&!gn?(Pb(s,l,x),vo(s,l,x)):(Ct&&m&&pb(l),l.flags|=1,Ln(s,l,d,x),l.child)}function zk(s,l,d,m,x,E){return Fa(l),l.updateQueue=null,d=HE(l,m,d,x),UE(s),m=Nb(),s!==null&&!gn?(Pb(s,l,E),vo(s,l,E)):(Ct&&m&&pb(l),l.flags|=1,Ln(s,l,d,E),l.child)}function Bk(s,l,d,m,x){if(Fa(l),l.stateNode===null){var E=uu,$=d.contextType;typeof $=="object"&&$!==null&&(E=Pn($)),E=new d(m,E),l.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=Xb,l.stateNode=E,E._reactInternals=l,E=l.stateNode,E.props=m,E.state=l.memoizedState,E.refs={},kb(l),$=d.contextType,E.context=typeof $=="object"&&$!==null?Pn($):uu,E.state=l.memoizedState,$=d.getDerivedStateFromProps,typeof $=="function"&&(Kb(l,d,$,m),E.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||($=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),$!==E.state&&Xb.enqueueReplaceState(E,E.state,null),xf(l,m,E,x),vf(),E.state=l.memoizedState),typeof E.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){E=l.stateNode;var G=l.memoizedProps,Q=Ga(d,G);E.props=Q;var de=E.context,be=d.contextType;$=uu,typeof be=="object"&&be!==null&&($=Pn(be));var Ee=d.getDerivedStateFromProps;be=typeof Ee=="function"||typeof E.getSnapshotBeforeUpdate=="function",G=l.pendingProps!==G,be||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(G||de!==$)&&_k(l,E,m,$),us=!1;var pe=l.memoizedState;E.state=pe,xf(l,m,E,x),vf(),de=l.memoizedState,G||pe!==de||us?(typeof Ee=="function"&&(Kb(l,d,Ee,m),de=l.memoizedState),(Q=us||Rk(l,d,Q,m,pe,de,$))?(be||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(l.flags|=4194308)):(typeof E.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=de),E.props=m,E.state=de,E.context=$,m=Q):(typeof E.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{E=l.stateNode,Rb(s,l),$=l.memoizedProps,be=Ga(d,$),E.props=be,Ee=l.pendingProps,pe=E.context,de=d.contextType,Q=uu,typeof de=="object"&&de!==null&&(Q=Pn(de)),G=d.getDerivedStateFromProps,(de=typeof G=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||($!==Ee||pe!==Q)&&_k(l,E,m,Q),us=!1,pe=l.memoizedState,E.state=pe,xf(l,m,E,x),vf();var ye=l.memoizedState;$!==Ee||pe!==ye||us||s!==null&&s.dependencies!==null&&Ph(s.dependencies)?(typeof G=="function"&&(Kb(l,d,G,m),ye=l.memoizedState),(be=us||Rk(l,d,be,m,pe,ye,Q)||s!==null&&s.dependencies!==null&&Ph(s.dependencies))?(de||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,ye,Q),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,ye,Q)),typeof E.componentDidUpdate=="function"&&(l.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof E.componentDidUpdate!="function"||$===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=ye),E.props=m,E.state=ye,E.context=Q,m=be):(typeof E.componentDidUpdate!="function"||$===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||$===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),m=!1)}return E=m,ep(s,l),m=(l.flags&128)!==0,E||m?(E=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:E.render(),l.flags|=1,s!==null&&m?(l.child=Ua(l,s.child,null,x),l.child=Ua(l,null,d,x)):Ln(s,l,d,x),l.memoizedState=E.state,s=l.child):s=vo(s,l,x),s}function Uk(s,l,d,m){return La(),l.flags|=256,Ln(s,l,d,m),l.child}var e0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function t0(s){return{baseLanes:s,cachePool:ME()}}function n0(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Dr),s}function Hk(s,l,d){var m=l.pendingProps,x=!1,E=(l.flags&128)!==0,$;if(($=E)||($=s!==null&&s.memoizedState===null?!1:(un.current&2)!==0),$&&(x=!0,l.flags&=-129),$=(l.flags&32)!==0,l.flags&=-33,s===null){if(Ct){if(x?ds(l):hs(),(s=Kt)?(s=Q2(s,Zr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:os!==null?{id:Ii,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},d=SE(s),d.return=l,l.child=d,Nn=l,Kt=null)):s=null,s===null)throw as(l);return F0(s)?l.lanes=32:l.lanes=536870912,null}var G=m.children;return m=m.fallback,x?(hs(),x=l.mode,G=tp({mode:"hidden",children:G},x),m=Pa(m,x,d,null),G.return=l,m.return=l,G.sibling=m,l.child=G,m=l.child,m.memoizedState=t0(d),m.childLanes=n0(s,$,d),l.memoizedState=e0,kf(null,m)):(ds(l),r0(l,G))}var Q=s.memoizedState;if(Q!==null&&(G=Q.dehydrated,G!==null)){if(E)l.flags&256?(ds(l),l.flags&=-257,l=i0(s,l,d)):l.memoizedState!==null?(hs(),l.child=s.child,l.flags|=128,l=null):(hs(),G=m.fallback,x=l.mode,m=tp({mode:"visible",children:m.children},x),G=Pa(G,x,d,null),G.flags|=2,m.return=l,G.return=l,m.sibling=G,l.child=m,Ua(l,s.child,null,d),m=l.child,m.memoizedState=t0(d),m.childLanes=n0(s,$,d),l.memoizedState=e0,l=kf(null,m));else if(ds(l),F0(G)){if($=G.nextSibling&&G.nextSibling.dataset,$)var de=$.dgst;$=de,m=Error(r(419)),m.stack="",m.digest=$,hf({value:m,source:null,stack:null}),l=i0(s,l,d)}else if(gn||hu(s,l,d,!1),$=(d&s.childLanes)!==0,gn||$){if($=qt,$!==null&&(m=xi($,d),m!==0&&m!==Q.retryLane))throw Q.retryLane=m,Na(s,m),cr($,s,m),Zb;I0(G)||cp(),l=i0(s,l,d)}else I0(G)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Kt=ei(G.nextSibling),Nn=l,Ct=!0,ss=null,Zr=!1,s!==null&&kE(l,s),l=r0(l,m.children),l.flags|=4096);return l}return x?(hs(),G=m.fallback,x=l.mode,Q=s.child,de=Q.sibling,m=ho(Q,{mode:"hidden",children:m.children}),m.subtreeFlags=Q.subtreeFlags&65011712,de!==null?G=ho(de,G):(G=Pa(G,x,d,null),G.flags|=2),G.return=l,m.return=l,m.sibling=G,l.child=m,kf(null,m),m=l.child,G=s.child.memoizedState,G===null?G=t0(d):(x=G.cachePool,x!==null?(Q=pn._currentValue,x=x.parent!==Q?{parent:Q,pool:Q}:x):x=ME(),G={baseLanes:G.baseLanes|d,cachePool:x}),m.memoizedState=G,m.childLanes=n0(s,$,d),l.memoizedState=e0,kf(s.child,m)):(ds(l),d=s.child,s=d.sibling,d=ho(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&($=l.deletions,$===null?(l.deletions=[s],l.flags|=16):$.push(s)),l.child=d,l.memoizedState=null,d)}function r0(s,l){return l=tp({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function tp(s,l){return s=Rr(22,s,null,l),s.lanes=0,s}function i0(s,l,d){return Ua(l,s.child,null,d),s=r0(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Gk(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),vb(s.return,l,d)}function o0(s,l,d,m,x,E){var $=s.memoizedState;$===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:x,treeForkCount:E}:($.isBackwards=l,$.rendering=null,$.renderingStartTime=0,$.last=m,$.tail=d,$.tailMode=x,$.treeForkCount=E)}function qk(s,l,d){var m=l.pendingProps,x=m.revealOrder,E=m.tail;m=m.children;var $=un.current,G=($&2)!==0;if(G?($=$&1|2,l.flags|=128):$&=1,U(un,$),Ln(s,l,m,d),m=Ct?df:0,!G&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Gk(s,d,l);else if(s.tag===19)Gk(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(x){case"forwards":for(d=l.child,x=null;d!==null;)s=d.alternate,s!==null&&Hh(s)===null&&(x=d),d=d.sibling;d=x,d===null?(x=l.child,l.child=null):(x=d.sibling,d.sibling=null),o0(l,!1,x,d,E,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,x=l.child,l.child=null;x!==null;){if(s=x.alternate,s!==null&&Hh(s)===null){l.child=x;break}s=x.sibling,x.sibling=d,d=x,x=s}o0(l,!0,d,null,E,m);break;case"together":o0(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function vo(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),gs|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(hu(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=ho(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=ho(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function s0(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Ph(s)))}function xj(s,l,d){switch(l.tag){case 3:Re(l,l.stateNode.containerInfo),ls(l,pn,s.memoizedState.cache),La();break;case 27:case 5:Ie(l);break;case 4:Re(l,l.stateNode.containerInfo);break;case 10:ls(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Mb(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(ds(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Hk(s,l,d):(ds(l),s=vo(s,l,d),s!==null?s.sibling:null);ds(l);break;case 19:var x=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(hu(s,l,d,!1),m=(d&l.childLanes)!==0),x){if(m)return qk(s,l,d);l.flags|=128}if(x=l.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),U(un,un.current),m)break;return null;case 22:return l.lanes=0,Ik(s,l,d,l.pendingProps);case 24:ls(l,pn,s.memoizedState.cache)}return vo(s,l,d)}function Vk(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)gn=!0;else{if(!s0(s,d)&&(l.flags&128)===0)return gn=!1,xj(s,l,d);gn=(s.flags&131072)!==0}else gn=!1,Ct&&(l.flags&1048576)!==0&&EE(l,df,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(s=za(l.elementType),l.type=s,typeof s=="function")fb(s)?(m=Ga(s,m),l.tag=1,l=Bk(null,l,s,m,d)):(l.tag=0,l=Jb(null,l,s,m,d));else{if(s!=null){var x=s.$$typeof;if(x===T){l.tag=11,l=Nk(null,l,s,m,d);break e}else if(x===O){l.tag=14,l=Pk(null,l,s,m,d);break e}}throw l=q(s)||s,Error(r(306,l,""))}}return l;case 0:return Jb(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,x=Ga(m,l.pendingProps),Bk(s,l,m,x,d);case 3:e:{if(Re(l,l.stateNode.containerInfo),s===null)throw Error(r(387));m=l.pendingProps;var E=l.memoizedState;x=E.element,Rb(s,l),xf(l,m,null,d);var $=l.memoizedState;if(m=$.cache,ls(l,pn,m),m!==E.cache&&xb(l,[pn],d,!0),vf(),m=$.element,E.isDehydrated)if(E={element:m,isDehydrated:!1,cache:$.cache},l.updateQueue.baseState=E,l.memoizedState=E,l.flags&256){l=Uk(s,l,m,d);break e}else if(m!==x){x=Kr(Error(r(424)),l),hf(x),l=Uk(s,l,m,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(Kt=ei(s.firstChild),Nn=l,Ct=!0,ss=null,Zr=!0,d=IE(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(La(),m===x){l=vo(s,l,d);break e}Ln(s,l,m,d)}l=l.child}return l;case 26:return ep(s,l),s===null?(d=rR(l.type,null,l.pendingProps,null))?l.memoizedState=d:Ct||(d=l.type,s=l.pendingProps,m=yp(he.current).createElement(d),m[rn]=l,m[$n]=s,In(m,d,s),Rn(m),l.stateNode=m):l.memoizedState=rR(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Ie(l),s===null&&Ct&&(m=l.stateNode=eR(l.type,l.pendingProps,he.current),Nn=l,Zr=!0,x=Kt,ws(l.type)?(j0=x,Kt=ei(m.firstChild)):Kt=x),Ln(s,l,l.pendingProps.children,d),ep(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Ct&&((x=m=Kt)&&(m=Xj(m,l.type,l.pendingProps,Zr),m!==null?(l.stateNode=m,Nn=l,Kt=ei(m.firstChild),Zr=!1,x=!0):x=!1),x||as(l)),Ie(l),x=l.type,E=l.pendingProps,$=s!==null?s.memoizedProps:null,m=E.children,N0(x,E)?m=null:$!==null&&N0(x,$)&&(l.flags|=32),l.memoizedState!==null&&(x=$b(s,l,fj,null,null,d),zf._currentValue=x),ep(s,l),Ln(s,l,m,d),l.child;case 6:return s===null&&Ct&&((s=d=Kt)&&(d=Qj(d,l.pendingProps,Zr),d!==null?(l.stateNode=d,Nn=l,Kt=null,s=!0):s=!1),s||as(l)),null;case 13:return Hk(s,l,d);case 4:return Re(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Ua(l,null,m,d):Ln(s,l,m,d),l.child;case 11:return Nk(s,l,l.type,l.pendingProps,d);case 7:return Ln(s,l,l.pendingProps,d),l.child;case 8:return Ln(s,l,l.pendingProps.children,d),l.child;case 12:return Ln(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,ls(l,l.type,m.value),Ln(s,l,m.children,d),l.child;case 9:return x=l.type._context,m=l.pendingProps.children,Fa(l),x=Pn(x),m=m(x),l.flags|=1,Ln(s,l,m,d),l.child;case 14:return Pk(s,l,l.type,l.pendingProps,d);case 15:return Lk(s,l,l.type,l.pendingProps,d);case 19:return qk(s,l,d);case 31:return vj(s,l,d);case 22:return Ik(s,l,d,l.pendingProps);case 24:return Fa(l),m=Pn(pn),s===null?(x=Cb(),x===null&&(x=qt,E=wb(),x.pooledCache=E,E.refCount++,E!==null&&(x.pooledCacheLanes|=d),x=E),l.memoizedState={parent:m,cache:x},kb(l),ls(l,pn,x)):((s.lanes&d)!==0&&(Rb(s,l),xf(l,null,null,d),vf()),x=s.memoizedState,E=l.memoizedState,x.parent!==m?(x={parent:m,cache:m},l.memoizedState=x,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=x),ls(l,pn,m)):(m=E.cache,ls(l,pn,m),m!==x.cache&&xb(l,[pn],d,!0))),Ln(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function xo(s){s.flags|=4}function a0(s,l,d,m,x){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(x&335544128)===x)if(s.stateNode.complete)s.flags|=8192;else if(v2())s.flags|=8192;else throw Ba=jh,Eb}else s.flags&=-16777217}function Yk(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!lR(l))if(v2())s.flags|=8192;else throw Ba=jh,Eb}function np(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?bi():536870912,s.lanes|=l,ku|=l)}function Rf(s,l){if(!Ct)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 m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Xt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var x=s.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function wj(s,l,d){var m=l.pendingProps;switch(mb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(l),null;case 1:return Xt(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),go(pn),ce(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(du(l)?xo(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,yb())),Xt(l),null;case 26:var x=l.type,E=l.memoizedState;return s===null?(xo(l),E!==null?(Xt(l),Yk(l,E)):(Xt(l),a0(l,x,null,m,d))):E?E!==s.memoizedState?(xo(l),Xt(l),Yk(l,E)):(Xt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&xo(l),Xt(l),a0(l,x,s,m,d)),null;case 27:if(Ve(l),d=he.current,x=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&xo(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Xt(l),null}s=se.current,du(l)?RE(l):(s=eR(x,m,d),l.stateNode=s,xo(l))}return Xt(l),null;case 5:if(Ve(l),x=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&xo(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return Xt(l),null}if(E=se.current,du(l))RE(l);else{var $=yp(he.current);switch(E){case 1:E=$.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:E=$.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":E=$.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":E=$.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":E=$.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof m.is=="string"?$.createElement("select",{is:m.is}):$.createElement("select"),m.multiple?E.multiple=!0:m.size&&(E.size=m.size);break;default:E=typeof m.is=="string"?$.createElement(x,{is:m.is}):$.createElement(x)}}E[rn]=l,E[$n]=m;e:for($=l.child;$!==null;){if($.tag===5||$.tag===6)E.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===l)break e;for(;$.sibling===null;){if($.return===null||$.return===l)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}l.stateNode=E;e:switch(In(E,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&xo(l)}}return Xt(l),a0(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&xo(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(s=he.current,du(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,x=Nn,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}s[rn]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||H2(s.nodeValue,d)),s||as(l,!0)}else s=yp(s).createTextNode(m),s[rn]=l,l.stateNode=s}return Xt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=du(l),d!==null){if(s===null){if(!m)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[rn]=l}else La(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Xt(l),s=!1}else d=yb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Tr(l),l):(Tr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Xt(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=du(l),m!==null&&m.dehydrated!==null){if(s===null){if(!x)throw Error(r(318));if(x=l.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[rn]=l}else La(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Xt(l),x=!1}else x=yb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return l.flags&256?(Tr(l),l):(Tr(l),null)}return Tr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),E=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(E=m.memoizedState.cachePool.pool),E!==x&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),np(l,l.updateQueue),Xt(l),null);case 4:return ce(),s===null&&A0(l.stateNode.containerInfo),Xt(l),null;case 10:return go(l.type),Xt(l),null;case 19:if(J(un),m=l.memoizedState,m===null)return Xt(l),null;if(x=(l.flags&128)!==0,E=m.rendering,E===null)if(x)Rf(m,!1);else{if(sn!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(E=Hh(s),E!==null){for(l.flags|=128,Rf(m,!1),s=E.updateQueue,l.updateQueue=s,np(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)wE(d,s),d=d.sibling;return U(un,un.current&1|2),Ct&&po(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&_e()>ap&&(l.flags|=128,x=!0,Rf(m,!1),l.lanes=4194304)}else{if(!x)if(s=Hh(E),s!==null){if(l.flags|=128,x=!0,s=s.updateQueue,l.updateQueue=s,np(l,s),Rf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!E.alternate&&!Ct)return Xt(l),null}else 2*_e()-m.renderingStartTime>ap&&d!==536870912&&(l.flags|=128,x=!0,Rf(m,!1),l.lanes=4194304);m.isBackwards?(E.sibling=l.child,l.child=E):(s=m.last,s!==null?s.sibling=E:l.child=E,m.last=E)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=_e(),s.sibling=null,d=un.current,U(un,x?d&1|2:d&1),Ct&&po(l,m.treeForkCount),s):(Xt(l),null);case 22:case 23:return Tr(l),Db(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(Xt(l),l.subtreeFlags&6&&(l.flags|=8192)):Xt(l),d=l.updateQueue,d!==null&&np(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),s!==null&&J(ja),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),go(pn),Xt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function Sj(s,l){switch(mb(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return go(pn),ce(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ve(l),null;case 31:if(l.memoizedState!==null){if(Tr(l),l.alternate===null)throw Error(r(340));La()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Tr(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));La()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(un),null;case 4:return ce(),null;case 10:return go(l.type),null;case 22:case 23:return Tr(l),Db(),s!==null&&J(ja),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return go(pn),null;case 25:return null;default:return null}}function Wk(s,l){switch(mb(l),l.tag){case 3:go(pn),ce();break;case 26:case 27:case 5:Ve(l);break;case 4:ce();break;case 31:l.memoizedState!==null&&Tr(l);break;case 13:Tr(l);break;case 19:J(un);break;case 10:go(l.type);break;case 22:case 23:Tr(l),Db(),s!==null&&J(ja);break;case 24:go(pn)}}function _f(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var x=m.next;d=x;do{if((d.tag&s)===s){m=void 0;var E=d.create,$=d.inst;m=E(),$.destroy=m}d=d.next}while(d!==x)}}catch(G){jt(l,l.return,G)}}function ps(s,l,d){try{var m=l.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var E=x.next;m=E;do{if((m.tag&s)===s){var $=m.inst,G=$.destroy;if(G!==void 0){$.destroy=void 0,x=l;var Q=d,de=G;try{de()}catch(be){jt(x,Q,be)}}}m=m.next}while(m!==E)}}catch(be){jt(l,l.return,be)}}function Kk(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{jE(l,d)}catch(m){jt(s,s.return,m)}}}function Xk(s,l,d){d.props=Ga(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){jt(s,l,m)}}function Tf(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof d=="function"?s.refCleanup=d(m):d.current=m}}catch(x){jt(s,l,x)}}function ji(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(x){jt(s,l,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(x){jt(s,l,x)}else d.current=null}function Qk(s){var l=s.type,d=s.memoizedProps,m=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break e;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(x){jt(s,s.return,x)}}function l0(s,l,d){try{var m=s.stateNode;Gj(m,s.type,d,l),m[$n]=l}catch(x){jt(s,s.return,x)}}function Zk(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ws(s.type)||s.tag===4}function u0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Zk(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&&ws(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 c0(s,l,d){var m=s.tag;if(m===5||m===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=co));else if(m!==4&&(m===27&&ws(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(c0(s,l,d),s=s.sibling;s!==null;)c0(s,l,d),s=s.sibling}function rp(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(m!==4&&(m===27&&ws(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(rp(s,l,d),s=s.sibling;s!==null;)rp(s,l,d),s=s.sibling}function Jk(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,x=l.attributes;x.length;)l.removeAttributeNode(x[0]);In(l,m,d),l[rn]=s,l[$n]=d}catch(E){jt(s,s.return,E)}}var wo=!1,yn=!1,f0=!1,e2=typeof WeakSet=="function"?WeakSet:Set,_n=null;function Cj(s,l){if(s=s.containerInfo,O0=Ep,s=dE(s),ib(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var x=m.anchorOffset,E=m.focusNode;m=m.focusOffset;try{d.nodeType,E.nodeType}catch{d=null;break e}var $=0,G=-1,Q=-1,de=0,be=0,Ee=s,pe=null;t:for(;;){for(var ye;Ee!==d||x!==0&&Ee.nodeType!==3||(G=$+x),Ee!==E||m!==0&&Ee.nodeType!==3||(Q=$+m),Ee.nodeType===3&&($+=Ee.nodeValue.length),(ye=Ee.firstChild)!==null;)pe=Ee,Ee=ye;for(;;){if(Ee===s)break t;if(pe===d&&++de===x&&(G=$),pe===E&&++be===m&&(Q=$),(ye=Ee.nextSibling)!==null)break;Ee=pe,pe=Ee.parentNode}Ee=ye}d=G===-1||Q===-1?null:{start:G,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for($0={focusedElem:s,selectionRange:d},Ep=!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,E=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++)x=s[d],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&E!==null){s=void 0,d=l,x=E.memoizedProps,E=E.memoizedState,m=d.stateNode;try{var je=Ga(d.type,x);s=m.getSnapshotBeforeUpdate(je,E),m.__reactInternalSnapshotBeforeUpdate=s}catch(Ze){jt(d,d.return,Ze)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)L0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":L0(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 t2(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Co(s,d),m&4&&_f(5,d);break;case 1:if(Co(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch($){jt(d,d.return,$)}else{var x=Ga(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(x,l,s.__reactInternalSnapshotBeforeUpdate)}catch($){jt(d,d.return,$)}}m&64&&Kk(d),m&512&&Tf(d,d.return);break;case 3:if(Co(s,d),m&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{jE(s,l)}catch($){jt(d,d.return,$)}}break;case 27:l===null&&m&4&&Jk(d);case 26:case 5:Co(s,d),l===null&&m&4&&Qk(d),m&512&&Tf(d,d.return);break;case 12:Co(s,d);break;case 31:Co(s,d),m&4&&i2(s,d);break;case 13:Co(s,d),m&4&&o2(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=Oj.bind(null,d),Zj(s,d))));break;case 22:if(m=d.memoizedState!==null||wo,!m){l=l!==null&&l.memoizedState!==null||yn,x=wo;var E=yn;wo=m,(yn=l)&&!E?Eo(s,d,(d.subtreeFlags&8772)!==0):Co(s,d),wo=x,yn=E}break;case 30:break;default:Co(s,d)}}function n2(s){var l=s.alternate;l!==null&&(s.alternate=null,n2(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&By(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 tn=null,sr=!1;function So(s,l,d){for(d=d.child;d!==null;)r2(s,l,d),d=d.sibling}function r2(s,l,d){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Mt,d)}catch{}switch(d.tag){case 26:yn||ji(d,l),So(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:yn||ji(d,l);var m=tn,x=sr;ws(d.type)&&(tn=d.stateNode,sr=!1),So(s,l,d),If(d.stateNode),tn=m,sr=x;break;case 5:yn||ji(d,l);case 6:if(m=tn,x=sr,tn=null,So(s,l,d),tn=m,sr=x,tn!==null)if(sr)try{(tn.nodeType===9?tn.body:tn.nodeName==="HTML"?tn.ownerDocument.body:tn).removeChild(d.stateNode)}catch(E){jt(d,l,E)}else try{tn.removeChild(d.stateNode)}catch(E){jt(d,l,E)}break;case 18:tn!==null&&(sr?(s=tn,K2(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),$u(s)):K2(tn,d.stateNode));break;case 4:m=tn,x=sr,tn=d.stateNode.containerInfo,sr=!0,So(s,l,d),tn=m,sr=x;break;case 0:case 11:case 14:case 15:ps(2,d,l),yn||ps(4,d,l),So(s,l,d);break;case 1:yn||(ji(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&Xk(d,l,m)),So(s,l,d);break;case 21:So(s,l,d);break;case 22:yn=(m=yn)||d.memoizedState!==null,So(s,l,d),yn=m;break;default:So(s,l,d)}}function i2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{$u(s)}catch(d){jt(l,l.return,d)}}}function o2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{$u(s)}catch(d){jt(l,l.return,d)}}function Ej(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new e2),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new e2),l;default:throw Error(r(435,s.tag))}}function ip(s,l){var d=Ej(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var x=$j.bind(null,s,m);m.then(x,x)}})}function ar(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var x=d[m],E=s,$=l,G=$;e:for(;G!==null;){switch(G.tag){case 27:if(ws(G.type)){tn=G.stateNode,sr=!1;break e}break;case 5:tn=G.stateNode,sr=!1;break e;case 3:case 4:tn=G.stateNode.containerInfo,sr=!0;break e}G=G.return}if(tn===null)throw Error(r(160));r2(E,$,x),tn=null,sr=!1,E=x.alternate,E!==null&&(E.return=null),x.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)s2(l,s),l=l.sibling}var Si=null;function s2(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:ar(l,s),lr(s),m&4&&(ps(3,s,s.return),_f(3,s),ps(5,s,s.return));break;case 1:ar(l,s),lr(s),m&512&&(yn||d===null||ji(d,d.return)),m&64&&wo&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var x=Si;if(ar(l,s),lr(s),m&512&&(yn||d===null||ji(d,d.return)),m&4){var E=d!==null?d.memoizedState:null;if(m=s.memoizedState,d===null)if(m===null)if(s.stateNode===null){e:{m=s.type,d=s.memoizedProps,x=x.ownerDocument||x;t:switch(m){case"title":E=x.getElementsByTagName("title")[0],(!E||E[ef]||E[rn]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=x.createElement(m),x.head.insertBefore(E,x.querySelector("head > title"))),In(E,m,d),E[rn]=s,Rn(E),m=E;break e;case"link":var $=sR("link","href",x).get(m+(d.href||""));if($){for(var G=0;G<$.length;G++)if(E=$[G],E.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&E.getAttribute("rel")===(d.rel==null?null:d.rel)&&E.getAttribute("title")===(d.title==null?null:d.title)&&E.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){$.splice(G,1);break t}}E=x.createElement(m),In(E,m,d),x.head.appendChild(E);break;case"meta":if($=sR("meta","content",x).get(m+(d.content||""))){for(G=0;G<$.length;G++)if(E=$[G],E.getAttribute("content")===(d.content==null?null:""+d.content)&&E.getAttribute("name")===(d.name==null?null:d.name)&&E.getAttribute("property")===(d.property==null?null:d.property)&&E.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&E.getAttribute("charset")===(d.charSet==null?null:d.charSet)){$.splice(G,1);break t}}E=x.createElement(m),In(E,m,d),x.head.appendChild(E);break;default:throw Error(r(468,m))}E[rn]=s,Rn(E),m=E}s.stateNode=m}else aR(x,s.type,s.stateNode);else s.stateNode=oR(x,m,s.memoizedProps);else E!==m?(E===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):E.count--,m===null?aR(x,s.type,s.stateNode):oR(x,m,s.memoizedProps)):m===null&&s.stateNode!==null&&l0(s,s.memoizedProps,d.memoizedProps)}break;case 27:ar(l,s),lr(s),m&512&&(yn||d===null||ji(d,d.return)),d!==null&&m&4&&l0(s,s.memoizedProps,d.memoizedProps);break;case 5:if(ar(l,s),lr(s),m&512&&(yn||d===null||ji(d,d.return)),s.flags&32){x=s.stateNode;try{nu(x,"")}catch(je){jt(s,s.return,je)}}m&4&&s.stateNode!=null&&(x=s.memoizedProps,l0(s,x,d!==null?d.memoizedProps:x)),m&1024&&(f0=!0);break;case 6:if(ar(l,s),lr(s),m&4){if(s.stateNode===null)throw Error(r(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(je){jt(s,s.return,je)}}break;case 3:if(xp=null,x=Si,Si=bp(l.containerInfo),ar(l,s),Si=x,lr(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{$u(l.containerInfo)}catch(je){jt(s,s.return,je)}f0&&(f0=!1,a2(s));break;case 4:m=Si,Si=bp(s.stateNode.containerInfo),ar(l,s),lr(s),Si=m;break;case 12:ar(l,s),lr(s);break;case 31:ar(l,s),lr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,ip(s,m)));break;case 13:ar(l,s),lr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(sp=_e()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,ip(s,m)));break;case 22:x=s.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,de=wo,be=yn;if(wo=de||x,yn=be||Q,ar(l,s),yn=be,wo=de,lr(s),m&8192)e:for(l=s.stateNode,l._visibility=x?l._visibility&-2:l._visibility|1,x&&(d===null||Q||wo||yn||qa(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(E=Q.stateNode,x)$=E.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{G=Q.stateNode;var Ee=Q.memoizedProps.style,pe=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;G.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(je){jt(Q,Q.return,je)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=x?"":Q.memoizedProps}catch(je){jt(Q,Q.return,je)}}}else if(l.tag===18){if(d===null){Q=l;try{var ye=Q.stateNode;x?X2(ye,!0):X2(Q.stateNode,!1)}catch(je){jt(Q,Q.return,je)}}}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}m&4&&(m=s.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,ip(s,d))));break;case 19:ar(l,s),lr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,ip(s,m)));break;case 30:break;case 21:break;default:ar(l,s),lr(s)}}function lr(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(Zk(m)){d=m;break}m=m.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var x=d.stateNode,E=u0(s);rp(s,E,x);break;case 5:var $=d.stateNode;d.flags&32&&(nu($,""),d.flags&=-33);var G=u0(s);rp(s,G,$);break;case 3:case 4:var Q=d.stateNode.containerInfo,de=u0(s);c0(s,de,Q);break;default:throw Error(r(161))}}catch(be){jt(s,s.return,be)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function a2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;a2(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Co(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)t2(s,l.alternate,l),l=l.sibling}function qa(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:ps(4,l,l.return),qa(l);break;case 1:ji(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&Xk(l,l.return,d),qa(l);break;case 27:If(l.stateNode);case 26:case 5:ji(l,l.return),qa(l);break;case 22:l.memoizedState===null&&qa(l);break;case 30:qa(l);break;default:qa(l)}s=s.sibling}}function Eo(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,x=s,E=l,$=E.flags;switch(E.tag){case 0:case 11:case 15:Eo(x,E,d),_f(4,E);break;case 1:if(Eo(x,E,d),m=E,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(de){jt(m,m.return,de)}if(m=E,x=m.updateQueue,x!==null){var G=m.stateNode;try{var Q=x.shared.hiddenCallbacks;if(Q!==null)for(x.shared.hiddenCallbacks=null,x=0;x<Q.length;x++)FE(Q[x],G)}catch(de){jt(m,m.return,de)}}d&&$&64&&Kk(E),Tf(E,E.return);break;case 27:Jk(E);case 26:case 5:Eo(x,E,d),d&&m===null&&$&4&&Qk(E),Tf(E,E.return);break;case 12:Eo(x,E,d);break;case 31:Eo(x,E,d),d&&$&4&&i2(x,E);break;case 13:Eo(x,E,d),d&&$&4&&o2(x,E);break;case 22:E.memoizedState===null&&Eo(x,E,d),Tf(E,E.return);break;case 30:break;default:Eo(x,E,d)}l=l.sibling}}function d0(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&&pf(d))}function h0(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&pf(s))}function Ci(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)l2(s,l,d,m),l=l.sibling}function l2(s,l,d,m){var x=l.flags;switch(l.tag){case 0:case 11:case 15:Ci(s,l,d,m),x&2048&&_f(9,l);break;case 1:Ci(s,l,d,m);break;case 3:Ci(s,l,d,m),x&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&pf(s)));break;case 12:if(x&2048){Ci(s,l,d,m),s=l.stateNode;try{var E=l.memoizedProps,$=E.id,G=E.onPostCommit;typeof G=="function"&&G($,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){jt(l,l.return,Q)}}else Ci(s,l,d,m);break;case 31:Ci(s,l,d,m);break;case 13:Ci(s,l,d,m);break;case 23:break;case 22:E=l.stateNode,$=l.alternate,l.memoizedState!==null?E._visibility&2?Ci(s,l,d,m):Af(s,l):E._visibility&2?Ci(s,l,d,m):(E._visibility|=2,Su(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),x&2048&&d0($,l);break;case 24:Ci(s,l,d,m),x&2048&&h0(l.alternate,l);break;default:Ci(s,l,d,m)}}function Su(s,l,d,m,x){for(x=x&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var E=s,$=l,G=d,Q=m,de=$.flags;switch($.tag){case 0:case 11:case 15:Su(E,$,G,Q,x),_f(8,$);break;case 23:break;case 22:var be=$.stateNode;$.memoizedState!==null?be._visibility&2?Su(E,$,G,Q,x):Af(E,$):(be._visibility|=2,Su(E,$,G,Q,x)),x&&de&2048&&d0($.alternate,$);break;case 24:Su(E,$,G,Q,x),x&&de&2048&&h0($.alternate,$);break;default:Su(E,$,G,Q,x)}l=l.sibling}}function Af(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,x=m.flags;switch(m.tag){case 22:Af(d,m),x&2048&&d0(m.alternate,m);break;case 24:Af(d,m),x&2048&&h0(m.alternate,m);break;default:Af(d,m)}l=l.sibling}}var Df=8192;function Cu(s,l,d){if(s.subtreeFlags&Df)for(s=s.child;s!==null;)u2(s,l,d),s=s.sibling}function u2(s,l,d){switch(s.tag){case 26:Cu(s,l,d),s.flags&Df&&s.memoizedState!==null&&c5(d,Si,s.memoizedState,s.memoizedProps);break;case 5:Cu(s,l,d);break;case 3:case 4:var m=Si;Si=bp(s.stateNode.containerInfo),Cu(s,l,d),Si=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Df,Df=16777216,Cu(s,l,d),Df=m):Cu(s,l,d));break;default:Cu(s,l,d)}}function c2(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 Mf(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];_n=m,d2(m,s)}c2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)f2(s),s=s.sibling}function f2(s){switch(s.tag){case 0:case 11:case 15:Mf(s),s.flags&2048&&ps(9,s,s.return);break;case 3:Mf(s);break;case 12:Mf(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,op(s)):Mf(s);break;default:Mf(s)}}function op(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];_n=m,d2(m,s)}c2(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:ps(8,l,l.return),op(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,op(l));break;default:op(l)}s=s.sibling}}function d2(s,l){for(;_n!==null;){var d=_n;switch(d.tag){case 0:case 11:case 15:ps(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:pf(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,_n=m;else e:for(d=s;_n!==null;){m=_n;var x=m.sibling,E=m.return;if(n2(m),m===d){_n=null;break e}if(x!==null){x.return=E,_n=x;break e}_n=E}}}var kj={getCacheForType:function(s){var l=Pn(pn),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Pn(pn).controller.signal}},Rj=typeof WeakMap=="function"?WeakMap:Map,Ot=0,qt=null,gt=null,xt=0,Ft=0,Ar=null,ms=!1,Eu=!1,p0=!1,ko=0,sn=0,gs=0,Va=0,m0=0,Dr=0,ku=0,Of=null,ur=null,g0=!1,sp=0,h2=0,ap=1/0,lp=null,ys=null,xn=0,bs=null,Ru=null,Ro=0,y0=0,b0=null,p2=null,$f=0,v0=null;function Mr(){return(Ot&2)!==0&&xt!==0?xt&-xt:j.T!==null?k0():Li()}function m2(){if(Dr===0)if((xt&536870912)===0||Ct){var s=Jt;Jt<<=1,(Jt&3932160)===0&&(Jt=262144),Dr=s}else Dr=536870912;return s=_r.current,s!==null&&(s.flags|=32),Dr}function cr(s,l,d){(s===qt&&(Ft===2||Ft===9)||s.cancelPendingCommit!==null)&&(_u(s,0),vs(s,xt,Dr,!1)),vi(s,d),((Ot&2)===0||s!==qt)&&(s===qt&&((Ot&2)===0&&(Va|=d),sn===4&&vs(s,xt,Dr,!1)),zi(s))}function g2(s,l,d){if((Ot&6)!==0)throw Error(r(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||qr(s,l),x=m?Aj(s,l):w0(s,l,!0),E=m;do{if(x===0){Eu&&!m&&vs(s,l,0,!1);break}else{if(d=s.current.alternate,E&&!_j(d)){x=w0(s,l,!1),E=!1;continue}if(x===2){if(E=l,s.errorRecoveryDisabledLanes&E)var $=0;else $=s.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){l=$;e:{var G=s;x=Of;var Q=G.current.memoizedState.isDehydrated;if(Q&&(_u(G,$).flags|=256),$=w0(G,$,!1),$!==2){if(p0&&!Q){G.errorRecoveryDisabledLanes|=E,Va|=E,x=4;break e}E=ur,ur=x,E!==null&&(ur===null?ur=E:ur.push.apply(ur,E))}x=$}if(E=!1,x!==2)continue}}if(x===1){_u(s,0),vs(s,l,0,!0);break}e:{switch(m=s,E=x,E){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:vs(m,l,Dr,!ms);break e;case 2:ur=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(x=sp+300-_e(),10<x)){if(vs(m,l,Dr,!ms),hn(m,0,!0)!==0)break e;Ro=l,m.timeoutHandle=Y2(y2.bind(null,m,d,ur,lp,g0,l,Dr,Va,ku,ms,E,"Throttled",-0,0),x);break e}y2(m,d,ur,lp,g0,l,Dr,Va,ku,ms,E,null,-0,0)}}break}while(!0);zi(s)}function y2(s,l,d,m,x,E,$,G,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:co},u2(l,E,Ee);var je=(E&62914560)===E?sp-_e():(E&4194048)===E?h2-_e():0;if(je=f5(Ee,je),je!==null){Ro=E,s.cancelPendingCommit=je(k2.bind(null,s,l,E,d,m,x,$,G,Q,be,Ee,null,pe,ye)),vs(s,E,$,!de);return}}k2(s,l,E,d,m,x,$,G,Q)}function _j(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 m=0;m<d.length;m++){var x=d[m],E=x.getSnapshot;x=x.value;try{if(!kr(E(),x))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 vs(s,l,d,m){l&=~m0,l&=~Va,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var x=l;0<x;){var E=31-Le(x),$=1<<E;m[E]=-1,x&=~$}d!==0&&Kl(s,d,l)}function up(){return(Ot&6)===0?(Nf(0),!1):!0}function x0(){if(gt!==null){if(Ft===0)var s=gt.return;else s=gt,mo=Ia=null,Lb(s),yu=null,gf=0,s=gt;for(;s!==null;)Wk(s.alternate,s),s=s.return;gt=null}}function _u(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,Yj(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ro=0,x0(),qt=s,gt=d=ho(s.current,null),xt=l,Ft=0,Ar=null,ms=!1,Eu=qr(s,l),p0=!1,ku=Dr=m0=Va=gs=sn=0,ur=Of=null,g0=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var x=31-Le(m),E=1<<x;l|=s[x],m&=~E}return ko=l,Dh(),d}function b2(s,l){ot=null,j.H=Ef,l===gu||l===Fh?(l=NE(),Ft=3):l===Eb?(l=NE(),Ft=4):Ft=l===Zb?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ar=l,gt===null&&(sn=1,Zh(s,Kr(l,s.current)))}function v2(){var s=_r.current;return s===null?!0:(xt&4194048)===xt?Jr===null:(xt&62914560)===xt||(xt&536870912)!==0?s===Jr:!1}function x2(){var s=j.H;return j.H=Ef,s===null?Ef:s}function w2(){var s=j.A;return j.A=kj,s}function cp(){sn=4,ms||(xt&4194048)!==xt&&_r.current!==null||(Eu=!0),(gs&134217727)===0&&(Va&134217727)===0||qt===null||vs(qt,xt,Dr,!1)}function w0(s,l,d){var m=Ot;Ot|=2;var x=x2(),E=w2();(qt!==s||xt!==l)&&(lp=null,_u(s,l)),l=!1;var $=sn;e:do try{if(Ft!==0&>!==null){var G=gt,Q=Ar;switch(Ft){case 8:x0(),$=6;break e;case 3:case 2:case 9:case 6:_r.current===null&&(l=!0);var de=Ft;if(Ft=0,Ar=null,Tu(s,G,Q,de),d&&Eu){$=0;break e}break;default:de=Ft,Ft=0,Ar=null,Tu(s,G,Q,de)}}Tj(),$=sn;break}catch(be){b2(s,be)}while(!0);return l&&s.shellSuspendCounter++,mo=Ia=null,Ot=m,j.H=x,j.A=E,gt===null&&(qt=null,xt=0,Dh()),$}function Tj(){for(;gt!==null;)S2(gt)}function Aj(s,l){var d=Ot;Ot|=2;var m=x2(),x=w2();qt!==s||xt!==l?(lp=null,ap=_e()+500,_u(s,l)):Eu=qr(s,l);e:do try{if(Ft!==0&>!==null){l=gt;var E=Ar;t:switch(Ft){case 1:Ft=0,Ar=null,Tu(s,l,E,1);break;case 2:case 9:if(OE(E)){Ft=0,Ar=null,C2(l);break}l=function(){Ft!==2&&Ft!==9||qt!==s||(Ft=7),zi(s)},E.then(l,l);break e;case 3:Ft=7;break e;case 4:Ft=5;break e;case 7:OE(E)?(Ft=0,Ar=null,C2(l)):(Ft=0,Ar=null,Tu(s,l,E,7));break;case 5:var $=null;switch(gt.tag){case 26:$=gt.memoizedState;case 5:case 27:var G=gt;if($?lR($):G.stateNode.complete){Ft=0,Ar=null;var Q=G.sibling;if(Q!==null)gt=Q;else{var de=G.return;de!==null?(gt=de,fp(de)):gt=null}break t}}Ft=0,Ar=null,Tu(s,l,E,5);break;case 6:Ft=0,Ar=null,Tu(s,l,E,6);break;case 8:x0(),sn=6;break e;default:throw Error(r(462))}}Dj();break}catch(be){b2(s,be)}while(!0);return mo=Ia=null,j.H=m,j.A=x,Ot=d,gt!==null?0:(qt=null,xt=0,Dh(),sn)}function Dj(){for(;gt!==null&&!Oe();)S2(gt)}function S2(s){var l=Vk(s.alternate,s,ko);s.memoizedProps=s.pendingProps,l===null?fp(s):gt=l}function C2(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=zk(d,l,l.pendingProps,l.type,void 0,xt);break;case 11:l=zk(d,l,l.pendingProps,l.type.render,l.ref,xt);break;case 5:Lb(l);default:Wk(d,l),l=gt=wE(l,ko),l=Vk(d,l,ko)}s.memoizedProps=s.pendingProps,l===null?fp(s):gt=l}function Tu(s,l,d,m){mo=Ia=null,Lb(l),yu=null,gf=0;var x=l.return;try{if(bj(s,x,l,d,xt)){sn=1,Zh(s,Kr(d,s.current)),gt=null;return}}catch(E){if(x!==null)throw gt=x,E;sn=1,Zh(s,Kr(d,s.current)),gt=null;return}l.flags&32768?(Ct||m===1?s=!0:Eu||(xt&536870912)!==0?s=!1:(ms=s=!0,(m===2||m===9||m===3||m===6)&&(m=_r.current,m!==null&&m.tag===13&&(m.flags|=16384))),E2(l,s)):fp(l)}function fp(s){var l=s;do{if((l.flags&32768)!==0){E2(l,ms);return}s=l.return;var d=wj(l.alternate,l,ko);if(d!==null){gt=d;return}if(l=l.sibling,l!==null){gt=l;return}gt=l=s}while(l!==null);sn===0&&(sn=5)}function E2(s,l){do{var d=Sj(s.alternate,s);if(d!==null){d.flags&=32767,gt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){gt=s;return}gt=s=d}while(s!==null);sn=6,gt=null}function k2(s,l,d,m,x,E,$,G,Q){s.cancelPendingCommit=null;do dp();while(xn!==0);if((Ot&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(E=l.lanes|l.childLanes,E|=ub,Wl(s,d,E,$,G,Q),s===qt&&(gt=qt=null,xt=0),Ru=l,bs=s,Ro=d,y0=E,b0=x,p2=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Nj(ke,function(){return D2(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=j.T,j.T=null,x=z.p,z.p=2,$=Ot,Ot|=4;try{Cj(s,l,d)}finally{Ot=$,z.p=x,j.T=m}}xn=1,R2(),_2(),T2()}}function R2(){if(xn===1){xn=0;var s=bs,l=Ru,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=j.T,j.T=null;var m=z.p;z.p=2;var x=Ot;Ot|=4;try{s2(l,s);var E=$0,$=dE(s.containerInfo),G=E.focusedElem,Q=E.selectionRange;if($!==G&&G&&G.ownerDocument&&fE(G.ownerDocument.documentElement,G)){if(Q!==null&&ib(G)){var de=Q.start,be=Q.end;if(be===void 0&&(be=de),"selectionStart"in G)G.selectionStart=de,G.selectionEnd=Math.min(be,G.value.length);else{var Ee=G.ownerDocument||document,pe=Ee&&Ee.defaultView||window;if(pe.getSelection){var ye=pe.getSelection(),je=G.textContent.length,Ze=Math.min(Q.start,je),Gt=Q.end===void 0?Ze:Math.min(Q.end,je);!ye.extend&&Ze>Gt&&($=Gt,Gt=Ze,Ze=$);var ie=cE(G,Ze),ee=cE(G,Gt);if(ie&&ee&&(ye.rangeCount!==1||ye.anchorNode!==ie.node||ye.anchorOffset!==ie.offset||ye.focusNode!==ee.node||ye.focusOffset!==ee.offset)){var fe=Ee.createRange();fe.setStart(ie.node,ie.offset),ye.removeAllRanges(),Ze>Gt?(ye.addRange(fe),ye.extend(ee.node,ee.offset)):(fe.setEnd(ee.node,ee.offset),ye.addRange(fe))}}}}for(Ee=[],ye=G;ye=ye.parentNode;)ye.nodeType===1&&Ee.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Ee.length;G++){var we=Ee[G];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Ep=!!O0,$0=O0=null}finally{Ot=x,z.p=m,j.T=d}}s.current=l,xn=2}}function _2(){if(xn===2){xn=0;var s=bs,l=Ru,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=j.T,j.T=null;var m=z.p;z.p=2;var x=Ot;Ot|=4;try{t2(s,l.alternate,l)}finally{Ot=x,z.p=m,j.T=d}}xn=3}}function T2(){if(xn===4||xn===3){xn=0,Te();var s=bs,l=Ru,d=Ro,m=p2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?xn=5:(xn=0,Ru=bs=null,A2(s,s.pendingLanes));var x=s.pendingLanes;if(x===0&&(ys=null),Ta(d),l=l.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Mt,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=j.T,x=z.p,z.p=2,j.T=null;try{for(var E=s.onRecoverableError,$=0;$<m.length;$++){var G=m[$];E(G.value,{componentStack:G.stack})}}finally{j.T=l,z.p=x}}(Ro&3)!==0&&dp(),zi(s),x=s.pendingLanes,(d&261930)!==0&&(x&42)!==0?s===v0?$f++:($f=0,v0=s):$f=0,Nf(0)}}function A2(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,pf(l)))}function dp(){return R2(),_2(),T2(),D2()}function D2(){if(xn!==5)return!1;var s=bs,l=y0;y0=0;var d=Ta(Ro),m=j.T,x=z.p;try{z.p=32>d?32:d,j.T=null,d=b0,b0=null;var E=bs,$=Ro;if(xn=0,Ru=bs=null,Ro=0,(Ot&6)!==0)throw Error(r(331));var G=Ot;if(Ot|=4,f2(E.current),l2(E,E.current,$,d),Ot=G,Nf(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Mt,E)}catch{}return!0}finally{z.p=x,j.T=m,A2(s,l)}}function M2(s,l,d){l=Kr(d,l),l=Qb(s.stateNode,l,2),s=fs(s,l,2),s!==null&&(vi(s,2),zi(s))}function jt(s,l,d){if(s.tag===3)M2(s,s,d);else for(;l!==null;){if(l.tag===3){M2(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ys===null||!ys.has(m))){s=Kr(d,s),d=Ok(2),m=fs(l,d,2),m!==null&&($k(d,m,l,s),vi(m,2),zi(m));break}}l=l.return}}function S0(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new Rj;var x=new Set;m.set(l,x)}else x=m.get(l),x===void 0&&(x=new Set,m.set(l,x));x.has(d)||(p0=!0,x.add(d),s=Mj.bind(null,s,l,d),l.then(s,s))}function Mj(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,qt===s&&(xt&d)===d&&(sn===4||sn===3&&(xt&62914560)===xt&&300>_e()-sp?(Ot&2)===0&&_u(s,0):m0|=d,ku===xt&&(ku=0)),zi(s)}function O2(s,l){l===0&&(l=bi()),s=Na(s,l),s!==null&&(vi(s,l),zi(s))}function Oj(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),O2(s,d)}function $j(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,x=s.memoizedState;x!==null&&(d=x.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(l),O2(s,d)}function Nj(s,l){return me(s,l)}var hp=null,Au=null,C0=!1,pp=!1,E0=!1,xs=0;function zi(s){s!==Au&&s.next===null&&(Au===null?hp=Au=s:Au=Au.next=s),pp=!0,C0||(C0=!0,Lj())}function Nf(s,l){if(!E0&&pp){E0=!0;do for(var d=!1,m=hp;m!==null;){if(s!==0){var x=m.pendingLanes;if(x===0)var E=0;else{var $=m.suspendedLanes,G=m.pingedLanes;E=(1<<31-Le(42|s)+1)-1,E&=x&~($&~G),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(d=!0,L2(m,E))}else E=xt,E=hn(m,m===qt?E:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(E&3)===0||qr(m,E)||(d=!0,L2(m,E));m=m.next}while(d);E0=!1}}function Pj(){$2()}function $2(){pp=C0=!1;var s=0;xs!==0&&Vj()&&(s=xs);for(var l=_e(),d=null,m=hp;m!==null;){var x=m.next,E=N2(m,l);E===0?(m.next=null,d===null?hp=x:d.next=x,x===null&&(Au=d)):(d=m,(s!==0||(E&3)!==0)&&(pp=!0)),m=x}xn!==0&&xn!==5||Nf(s),xs!==0&&(xs=0)}function N2(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,x=s.expirationTimes,E=s.pendingLanes&-62914561;0<E;){var $=31-Le(E),G=1<<$,Q=x[$];Q===-1?((G&d)===0||(G&m)!==0)&&(x[$]=ka(G,l)):Q<=l&&(s.expiredLanes|=G),E&=~G}if(l=qt,d=xt,d=hn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(Ft===2||Ft===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&ae(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||qr(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&ae(m),Ta(d)){case 2:case 8:d=Se;break;case 32:d=ke;break;case 268435456:d=Fe;break;default:d=ke}return m=P2.bind(null,s),d=me(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&ae(m),s.callbackPriority=2,s.callbackNode=null,2}function P2(s,l){if(xn!==0&&xn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(dp()&&s.callbackNode!==d)return null;var m=xt;return m=hn(s,s===qt?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(g2(s,m,l),N2(s,_e()),s.callbackNode!=null&&s.callbackNode===d?P2.bind(null,s):null)}function L2(s,l){if(dp())return null;g2(s,l,!0)}function Lj(){Wj(function(){(Ot&6)!==0?me(ue,Pj):$2()})}function k0(){if(xs===0){var s=pu;s===0&&(s=Rt,Rt<<=1,(Rt&261888)===0&&(Rt=256)),xs=s}return xs}function I2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Sh(""+s)}function F2(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 Ij(s,l,d,m,x){if(l==="submit"&&d&&d.stateNode===x){var E=I2((x[$n]||null).action),$=m.submitter;$&&(l=(l=$[$n]||null)?I2(l.formAction):$.getAttribute("formAction"),l!==null&&(E=l,$=null));var G=new Rh("action","action",null,m,x);s.push({event:G,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(xs!==0){var Q=$?F2(x,$):new FormData(x);qb(d,{pending:!0,data:Q,method:x.method,action:E},null,Q)}}else typeof E=="function"&&(G.preventDefault(),Q=$?F2(x,$):new FormData(x),qb(d,{pending:!0,data:Q,method:x.method,action:E},E,Q))},currentTarget:x}]})}}for(var R0=0;R0<lb.length;R0++){var _0=lb[R0],Fj=_0.toLowerCase(),jj=_0[0].toUpperCase()+_0.slice(1);wi(Fj,"on"+jj)}wi(mE,"onAnimationEnd"),wi(gE,"onAnimationIteration"),wi(yE,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(tj,"onTransitionRun"),wi(nj,"onTransitionStart"),wi(rj,"onTransitionCancel"),wi(bE,"onTransitionEnd"),eu("onMouseEnter",["mouseout","mouseover"]),eu("onMouseLeave",["mouseout","mouseover"]),eu("onPointerEnter",["pointerout","pointerover"]),eu("onPointerLeave",["pointerout","pointerover"]),Da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Da("onBeforeInput",["compositionend","keypress","textInput","paste"]),Da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pf="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(" "),zj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pf));function j2(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],x=m.event;m=m.listeners;e:{var E=void 0;if(l)for(var $=m.length-1;0<=$;$--){var G=m[$],Q=G.instance,de=G.currentTarget;if(G=G.listener,Q!==E&&x.isPropagationStopped())break e;E=G,x.currentTarget=de;try{E(x)}catch(be){Ah(be)}x.currentTarget=null,E=Q}else for($=0;$<m.length;$++){if(G=m[$],Q=G.instance,de=G.currentTarget,G=G.listener,Q!==E&&x.isPropagationStopped())break e;E=G,x.currentTarget=de;try{E(x)}catch(be){Ah(be)}x.currentTarget=null,E=Q}}}}function yt(s,l){var d=l[Xl];d===void 0&&(d=l[Xl]=new Set);var m=s+"__bubble";d.has(m)||(z2(l,s,2,!1),d.add(m))}function T0(s,l,d){var m=0;l&&(m|=4),z2(d,s,m,l)}var mp="_reactListening"+Math.random().toString(36).slice(2);function A0(s){if(!s[mp]){s[mp]=!0,$C.forEach(function(d){d!=="selectionchange"&&(zj.has(d)||T0(d,!1,s),T0(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[mp]||(l[mp]=!0,T0("selectionchange",!1,l))}}function z2(s,l,d,m){switch(mR(l)){case 2:var x=p5;break;case 8:x=m5;break;default:x=G0}d=x.bind(null,l,d,s),x=void 0,!Ky||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(x=!0),m?x!==void 0?s.addEventListener(l,d,{capture:!0,passive:x}):s.addEventListener(l,d,!0):x!==void 0?s.addEventListener(l,d,{passive:x}):s.addEventListener(l,d,!1)}function D0(s,l,d,m,x){var E=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var $=m.tag;if($===3||$===4){var G=m.stateNode.containerInfo;if(G===x)break;if($===4)for($=m.return;$!==null;){var Q=$.tag;if((Q===3||Q===4)&&$.stateNode.containerInfo===x)return;$=$.return}for(;G!==null;){if($=Ql(G),$===null)return;if(Q=$.tag,Q===5||Q===6||Q===26||Q===27){m=E=$;continue e}G=G.parentNode}}m=m.return}qC(function(){var de=E,be=Yy(d),Ee=[];e:{var pe=vE.get(s);if(pe!==void 0){var ye=Rh,je=s;switch(s){case"keypress":if(Eh(d)===0)break e;case"keydown":case"keyup":ye=$F;break;case"focusin":je="focus",ye=Jy;break;case"focusout":je="blur",ye=Jy;break;case"beforeblur":case"afterblur":ye=Jy;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=WC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=wF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=LF;break;case mE:case gE:case yE:ye=EF;break;case bE:ye=FF;break;case"scroll":case"scrollend":ye=vF;break;case"wheel":ye=zF;break;case"copy":case"cut":case"paste":ye=RF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=XC;break;case"toggle":case"beforetoggle":ye=UF}var Ze=(l&4)!==0,Gt=!Ze&&(s==="scroll"||s==="scrollend"),ie=Ze?pe!==null?pe+"Capture":null:pe;Ze=[];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||ie===null||(we=nf(ee,ie),we!=null&&Ze.push(Lf(ee,we,fe))),Gt)break;ee=ee.return}0<Ze.length&&(pe=new ye(pe,je,null,d,be),Ee.push({event:pe,listeners:Ze}))}}if((l&7)===0){e:{if(pe=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",pe&&d!==Vy&&(je=d.relatedTarget||d.fromElement)&&(Ql(je)||je[lo]))break e;if((ye||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ye?(je=d.relatedTarget||d.toElement,ye=de,je=je?Ql(je):null,je!==null&&(Gt=o(je),Ze=je.tag,je!==Gt||Ze!==5&&Ze!==27&&Ze!==6)&&(je=null)):(ye=null,je=de),ye!==je)){if(Ze=WC,we="onMouseLeave",ie="onMouseEnter",ee="mouse",(s==="pointerout"||s==="pointerover")&&(Ze=XC,we="onPointerLeave",ie="onPointerEnter",ee="pointer"),Gt=ye==null?pe:tf(ye),fe=je==null?pe:tf(je),pe=new Ze(we,ee+"leave",ye,d,be),pe.target=Gt,pe.relatedTarget=fe,we=null,Ql(be)===de&&(Ze=new Ze(ie,ee+"enter",je,d,be),Ze.target=fe,Ze.relatedTarget=Gt,we=Ze),Gt=we,ye&&je)t:{for(Ze=Bj,ie=ye,ee=je,fe=0,we=ie;we;we=Ze(we))fe++;we=0;for(var Xe=ee;Xe;Xe=Ze(Xe))we++;for(;0<fe-we;)ie=Ze(ie),fe--;for(;0<we-fe;)ee=Ze(ee),we--;for(;fe--;){if(ie===ee||ee!==null&&ie===ee.alternate){Ze=ie;break t}ie=Ze(ie),ee=Ze(ee)}Ze=null}else Ze=null;ye!==null&&B2(Ee,pe,ye,Ze,!1),je!==null&&Gt!==null&&B2(Ee,Gt,je,Ze,!0)}}e:{if(pe=de?tf(de):window,ye=pe.nodeName&&pe.nodeName.toLowerCase(),ye==="select"||ye==="input"&&pe.type==="file")var At=iE;else if(nE(pe))if(oE)At=ZF;else{At=XF;var qe=KF}else ye=pe.nodeName,!ye||ye.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?de&&qy(de.elementType)&&(At=iE):At=QF;if(At&&(At=At(s,de))){rE(Ee,At,d,be);break e}qe&&qe(s,pe,de),s==="focusout"&&de&&pe.type==="number"&&de.memoizedProps.value!=null&&Gy(pe,"number",pe.value)}switch(qe=de?tf(de):window,s){case"focusin":(nE(qe)||qe.contentEditable==="true")&&(su=qe,ob=de,ff=null);break;case"focusout":ff=ob=su=null;break;case"mousedown":sb=!0;break;case"contextmenu":case"mouseup":case"dragend":sb=!1,hE(Ee,d,be);break;case"selectionchange":if(ej)break;case"keydown":case"keyup":hE(Ee,d,be)}var lt;if(tb)e:{switch(s){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else ou?eE(s,d)&&(wt="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(wt="onCompositionStart");wt&&(QC&&d.locale!=="ko"&&(ou||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&ou&&(lt=VC()):(is=be,Xy="value"in is?is.value:is.textContent,ou=!0)),qe=gp(de,wt),0<qe.length&&(wt=new KC(wt,s,null,d,be),Ee.push({event:wt,listeners:qe}),lt?wt.data=lt:(lt=tE(d),lt!==null&&(wt.data=lt)))),(lt=GF?qF(s,d):VF(s,d))&&(wt=gp(de,"onBeforeInput"),0<wt.length&&(qe=new KC("onBeforeInput","beforeinput",null,d,be),Ee.push({event:qe,listeners:wt}),qe.data=lt)),Ij(Ee,s,de,d,be)}j2(Ee,l)})}function Lf(s,l,d){return{instance:s,listener:l,currentTarget:d}}function gp(s,l){for(var d=l+"Capture",m=[];s!==null;){var x=s,E=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||E===null||(x=nf(s,d),x!=null&&m.unshift(Lf(s,x,E)),x=nf(s,l),x!=null&&m.push(Lf(s,x,E))),s.tag===3)return m;s=s.return}return[]}function Bj(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function B2(s,l,d,m,x){for(var E=l._reactName,$=[];d!==null&&d!==m;){var G=d,Q=G.alternate,de=G.stateNode;if(G=G.tag,Q!==null&&Q===m)break;G!==5&&G!==26&&G!==27||de===null||(Q=de,x?(de=nf(d,E),de!=null&&$.unshift(Lf(d,de,Q))):x||(de=nf(d,E),de!=null&&$.push(Lf(d,de,Q)))),d=d.return}$.length!==0&&s.push({event:l,listeners:$})}var Uj=/\r\n?/g,Hj=/\u0000|\uFFFD/g;function U2(s){return(typeof s=="string"?s:""+s).replace(Uj,`
|
|
50
|
+
`).replace(Hj,"")}function H2(s,l){return l=U2(l),U2(s)===l}function Ht(s,l,d,m,x,E){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||nu(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&nu(s,""+m);break;case"className":xh(s,"class",m);break;case"tabIndex":xh(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":xh(s,d,m);break;case"style":HC(s,m,E);break;case"data":if(l!=="object"){xh(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Sh(""+m),s.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="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 E=="function"&&(d==="formAction"?(l!=="input"&&Ht(s,l,"name",x.name,x,null),Ht(s,l,"formEncType",x.formEncType,x,null),Ht(s,l,"formMethod",x.formMethod,x,null),Ht(s,l,"formTarget",x.formTarget,x,null)):(Ht(s,l,"encType",x.encType,x,null),Ht(s,l,"method",x.method,x,null),Ht(s,l,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=Sh(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=co);break;case"onScroll":m!=null&&yt("scroll",s);break;case"onScrollEnd":m!=null&&yt("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(x.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}d=Sh(""+m),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":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""+m):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":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":m===!0?s.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,m):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(d,m):s.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(d):s.setAttribute(d,m);break;case"popover":yt("beforetoggle",s),yt("toggle",s),vh(s,"popover",m);break;case"xlinkActuate":uo(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":uo(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":uo(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":uo(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":uo(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":uo(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":uo(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":uo(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":uo(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":vh(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=yF.get(d)||d,vh(s,d,m))}}function M0(s,l,d,m,x,E){switch(d){case"style":HC(s,m,E);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(x.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof m=="string"?nu(s,m):(typeof m=="number"||typeof m=="bigint")&&nu(s,""+m);break;case"onScroll":m!=null&&yt("scroll",s);break;case"onScrollEnd":m!=null&&yt("scrollend",s);break;case"onClick":m!=null&&(s.onclick=co);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!NC.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(x=d.endsWith("Capture"),l=d.slice(2,x?d.length-7:void 0),E=s[$n]||null,E=E!=null?E[d]:null,typeof E=="function"&&s.removeEventListener(l,E,x),typeof m=="function")){typeof E!="function"&&E!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,x);break e}d in s?s[d]=m:m===!0?s.setAttribute(d,""):vh(s,d,m)}}}function In(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",s),yt("load",s);var m=!1,x=!1,E;for(E in d)if(d.hasOwnProperty(E)){var $=d[E];if($!=null)switch(E){case"src":m=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ht(s,l,E,$,d,null)}}x&&Ht(s,l,"srcSet",d.srcSet,d,null),m&&Ht(s,l,"src",d.src,d,null);return;case"input":yt("invalid",s);var G=E=$=x=null,Q=null,de=null;for(m in d)if(d.hasOwnProperty(m)){var be=d[m];if(be!=null)switch(m){case"name":x=be;break;case"type":$=be;break;case"checked":Q=be;break;case"defaultChecked":de=be;break;case"value":E=be;break;case"defaultValue":G=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,l));break;default:Ht(s,l,m,be,d,null)}}jC(s,E,G,Q,de,$,x,!1);return;case"select":yt("invalid",s),m=$=E=null;for(x in d)if(d.hasOwnProperty(x)&&(G=d[x],G!=null))switch(x){case"value":E=G;break;case"defaultValue":$=G;break;case"multiple":m=G;default:Ht(s,l,x,G,d,null)}l=E,d=$,s.multiple=!!m,l!=null?tu(s,!!m,l,!1):d!=null&&tu(s,!!m,d,!0);return;case"textarea":yt("invalid",s),E=x=m=null;for($ in d)if(d.hasOwnProperty($)&&(G=d[$],G!=null))switch($){case"value":m=G;break;case"defaultValue":x=G;break;case"children":E=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:Ht(s,l,$,G,d,null)}BC(s,m,x,E);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(m=d[Q],m!=null))switch(Q){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Ht(s,l,Q,m,d,null)}return;case"dialog":yt("beforetoggle",s),yt("toggle",s),yt("cancel",s),yt("close",s);break;case"iframe":case"object":yt("load",s);break;case"video":case"audio":for(m=0;m<Pf.length;m++)yt(Pf[m],s);break;case"image":yt("error",s),yt("load",s);break;case"details":yt("toggle",s);break;case"embed":case"source":case"link":yt("error",s),yt("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)&&(m=d[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ht(s,l,de,m,d,null)}return;default:if(qy(l)){for(be in d)d.hasOwnProperty(be)&&(m=d[be],m!==void 0&&M0(s,l,be,m,d,void 0));return}}for(G in d)d.hasOwnProperty(G)&&(m=d[G],m!=null&&Ht(s,l,G,m,d,null))}function Gj(s,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,E=null,$=null,G=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:m.hasOwnProperty(ye)||Ht(s,l,ye,null,m,Ee)}}for(var pe in m){var ye=m[pe];if(Ee=d[pe],m.hasOwnProperty(pe)&&(ye!=null||Ee!=null))switch(pe){case"type":E=ye;break;case"name":x=ye;break;case"checked":de=ye;break;case"defaultChecked":be=ye;break;case"value":$=ye;break;case"defaultValue":G=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,l));break;default:ye!==Ee&&Ht(s,l,pe,ye,m,Ee)}}Hy(s,$,G,Q,de,be,E,x);return;case"select":ye=$=G=pe=null;for(E in d)if(Q=d[E],d.hasOwnProperty(E)&&Q!=null)switch(E){case"value":break;case"multiple":ye=Q;default:m.hasOwnProperty(E)||Ht(s,l,E,null,m,Q)}for(x in m)if(E=m[x],Q=d[x],m.hasOwnProperty(x)&&(E!=null||Q!=null))switch(x){case"value":pe=E;break;case"defaultValue":G=E;break;case"multiple":$=E;default:E!==Q&&Ht(s,l,x,E,m,Q)}l=G,d=$,m=ye,pe!=null?tu(s,!!d,pe,!1):!!m!=!!d&&(l!=null?tu(s,!!d,l,!0):tu(s,!!d,d?[]:"",!1));return;case"textarea":ye=pe=null;for(G in d)if(x=d[G],d.hasOwnProperty(G)&&x!=null&&!m.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:Ht(s,l,G,null,m,x)}for($ in m)if(x=m[$],E=d[$],m.hasOwnProperty($)&&(x!=null||E!=null))switch($){case"value":pe=x;break;case"defaultValue":ye=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==E&&Ht(s,l,$,x,m,E)}zC(s,pe,ye);return;case"option":for(var je in d)if(pe=d[je],d.hasOwnProperty(je)&&pe!=null&&!m.hasOwnProperty(je))switch(je){case"selected":s.selected=!1;break;default:Ht(s,l,je,null,m,pe)}for(Q in m)if(pe=m[Q],ye=d[Q],m.hasOwnProperty(Q)&&pe!==ye&&(pe!=null||ye!=null))switch(Q){case"selected":s.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Ht(s,l,Q,pe,m,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 Ze in d)pe=d[Ze],d.hasOwnProperty(Ze)&&pe!=null&&!m.hasOwnProperty(Ze)&&Ht(s,l,Ze,null,m,pe);for(de in m)if(pe=m[de],ye=d[de],m.hasOwnProperty(de)&&pe!==ye&&(pe!=null||ye!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,l));break;default:Ht(s,l,de,pe,m,ye)}return;default:if(qy(l)){for(var Gt in d)pe=d[Gt],d.hasOwnProperty(Gt)&&pe!==void 0&&!m.hasOwnProperty(Gt)&&M0(s,l,Gt,void 0,m,pe);for(be in m)pe=m[be],ye=d[be],!m.hasOwnProperty(be)||pe===ye||pe===void 0&&ye===void 0||M0(s,l,be,pe,m,ye);return}}for(var ie in d)pe=d[ie],d.hasOwnProperty(ie)&&pe!=null&&!m.hasOwnProperty(ie)&&Ht(s,l,ie,null,m,pe);for(Ee in m)pe=m[Ee],ye=d[Ee],!m.hasOwnProperty(Ee)||pe===ye||pe==null&&ye==null||Ht(s,l,Ee,pe,m,ye)}function G2(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qj(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var x=d[m],E=x.transferSize,$=x.initiatorType,G=x.duration;if(E&&G&&G2($)){for($=0,G=x.responseEnd,m+=1;m<d.length;m++){var Q=d[m],de=Q.startTime;if(de>G)break;var be=Q.transferSize,Ee=Q.initiatorType;be&&G2(Ee)&&(Q=Q.responseEnd,$+=be*(Q<G?1:(G-de)/(Q-de)))}if(--m,l+=8*(E+$)/(x.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,$0=null;function yp(s){return s.nodeType===9?s:s.ownerDocument}function q2(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 V2(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 N0(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 P0=null;function Vj(){var s=window.event;return s&&s.type==="popstate"?s===P0?!1:(P0=s,!0):(P0=null,!1)}var Y2=typeof setTimeout=="function"?setTimeout:void 0,Yj=typeof clearTimeout=="function"?clearTimeout:void 0,W2=typeof Promise=="function"?Promise:void 0,Wj=typeof queueMicrotask=="function"?queueMicrotask:typeof W2<"u"?function(s){return W2.resolve(null).then(s).catch(Kj)}:Y2;function Kj(s){setTimeout(function(){throw s})}function ws(s){return s==="head"}function K2(s,l){var d=l,m=0;do{var x=d.nextSibling;if(s.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(x),$u(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")If(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,If(d);for(var E=d.firstChild;E;){var $=E.nextSibling,G=E.nodeName;E[ef]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&E.rel.toLowerCase()==="stylesheet"||d.removeChild(E),E=$}}else d==="body"&&If(s.ownerDocument.body);d=x}while(d);$u(l)}function X2(s,l){var d=s;s=0;do{var m=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||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=m}while(d)}function L0(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":L0(d),By(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function Xj(s,l,d,m){for(;s.nodeType===1;){var x=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[ef])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(E=s.getAttribute("rel"),E==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(E!==x.rel||s.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||s.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||s.getAttribute("title")!==(x.title==null?null:x.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(E=s.getAttribute("src"),(E!==(x.src==null?null:x.src)||s.getAttribute("type")!==(x.type==null?null:x.type)||s.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&E&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var E=x.name==null?null:""+x.name;if(x.type==="hidden"&&s.getAttribute("name")===E)return s}else return s;if(s=ei(s.nextSibling),s===null)break}return null}function Qj(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ei(s.nextSibling),s===null))return null;return s}function Q2(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ei(s.nextSibling),s===null))return null;return s}function I0(s){return s.data==="$?"||s.data==="$~"}function F0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function Zj(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function ei(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 j0=null;function Z2(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ei(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function J2(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 eR(s,l,d){switch(l=yp(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 If(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);By(s)}var ti=new Map,tR=new Set;function bp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var _o=z.d;z.d={f:Jj,r:e5,D:t5,C:n5,L:r5,m:i5,X:s5,S:o5,M:a5};function Jj(){var s=_o.f(),l=up();return s||l}function e5(s){var l=Zl(s);l!==null&&l.tag===5&&l.type==="form"?bk(l):_o.r(s)}var Du=typeof document>"u"?null:document;function nR(s,l,d){var m=Du;if(m&&typeof l=="string"&&l){var x=Yr(l);x='link[rel="'+s+'"][href="'+x+'"]',typeof d=="string"&&(x+='[crossorigin="'+d+'"]'),tR.has(x)||(tR.add(x),s={rel:s,crossOrigin:d,href:l},m.querySelector(x)===null&&(l=m.createElement("link"),In(l,"link",s),Rn(l),m.head.appendChild(l)))}}function t5(s){_o.D(s),nR("dns-prefetch",s,null)}function n5(s,l){_o.C(s,l),nR("preconnect",s,l)}function r5(s,l,d){_o.L(s,l,d);var m=Du;if(m&&s&&l){var x='link[rel="preload"][as="'+Yr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(x+='[imagesrcset="'+Yr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(x+='[imagesizes="'+Yr(d.imageSizes)+'"]')):x+='[href="'+Yr(s)+'"]';var E=x;switch(l){case"style":E=Mu(s);break;case"script":E=Ou(s)}ti.has(E)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),ti.set(E,s),m.querySelector(x)!==null||l==="style"&&m.querySelector(Ff(E))||l==="script"&&m.querySelector(jf(E))||(l=m.createElement("link"),In(l,"link",s),Rn(l),m.head.appendChild(l)))}}function i5(s,l){_o.m(s,l);var d=Du;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",x='link[rel="modulepreload"][as="'+Yr(m)+'"][href="'+Yr(s)+'"]',E=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Ou(s)}if(!ti.has(E)&&(s=p({rel:"modulepreload",href:s},l),ti.set(E,s),d.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(jf(E)))return}m=d.createElement("link"),In(m,"link",s),Rn(m),d.head.appendChild(m)}}}function o5(s,l,d){_o.S(s,l,d);var m=Du;if(m&&s){var x=Jl(m).hoistableStyles,E=Mu(s);l=l||"default";var $=x.get(E);if(!$){var G={loading:0,preload:null};if($=m.querySelector(Ff(E)))G.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=ti.get(E))&&z0(s,d);var Q=$=m.createElement("link");Rn(Q),In(Q,"link",s),Q._p=new Promise(function(de,be){Q.onload=de,Q.onerror=be}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,vp($,l,m)}$={type:"stylesheet",instance:$,count:1,state:G},x.set(E,$)}}}function s5(s,l){_o.X(s,l);var d=Du;if(d&&s){var m=Jl(d).hoistableScripts,x=Ou(s),E=m.get(x);E||(E=d.querySelector(jf(x)),E||(s=p({src:s,async:!0},l),(l=ti.get(x))&&B0(s,l),E=d.createElement("script"),Rn(E),In(E,"link",s),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function a5(s,l){_o.M(s,l);var d=Du;if(d&&s){var m=Jl(d).hoistableScripts,x=Ou(s),E=m.get(x);E||(E=d.querySelector(jf(x)),E||(s=p({src:s,async:!0,type:"module"},l),(l=ti.get(x))&&B0(s,l),E=d.createElement("script"),Rn(E),In(E,"link",s),d.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function rR(s,l,d,m){var x=(x=he.current)?bp(x):null;if(!x)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Mu(d.href),d=Jl(x).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Mu(d.href);var E=Jl(x).hoistableStyles,$=E.get(s);if($||(x=x.ownerDocument||x,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(s,$),(E=x.querySelector(Ff(s)))&&!E._p&&($.instance=E,$.state.loading=5),ti.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},ti.set(s,d),E||l5(x,s,d,$.state))),l&&m===null)throw Error(r(528,""));return $}if(l&&m!==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=Ou(d),d=Jl(x).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Mu(s){return'href="'+Yr(s)+'"'}function Ff(s){return'link[rel="stylesheet"]['+s+"]"}function iR(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function l5(s,l,d,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),In(l,"link",d),Rn(l),s.head.appendChild(l))}function Ou(s){return'[src="'+Yr(s)+'"]'}function jf(s){return"script[async]"+s}function oR(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+Yr(d.href)+'"]');if(m)return l.instance=m,Rn(m),m;var x=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),Rn(m),In(m,"style",x),vp(m,d.precedence,s),l.instance=m;case"stylesheet":x=Mu(d.href);var E=s.querySelector(Ff(x));if(E)return l.state.loading|=4,l.instance=E,Rn(E),E;m=iR(d),(x=ti.get(x))&&z0(m,x),E=(s.ownerDocument||s).createElement("link"),Rn(E);var $=E;return $._p=new Promise(function(G,Q){$.onload=G,$.onerror=Q}),In(E,"link",m),l.state.loading|=4,vp(E,d.precedence,s),l.instance=E;case"script":return E=Ou(d.src),(x=s.querySelector(jf(E)))?(l.instance=x,Rn(x),x):(m=d,(x=ti.get(E))&&(m=p({},d),B0(m,x)),s=s.ownerDocument||s,x=s.createElement("script"),Rn(x),In(x,"link",m),s.head.appendChild(x),l.instance=x);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,vp(m,d.precedence,s));return l.instance}function vp(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,E=x,$=0;$<m.length;$++){var G=m[$];if(G.dataset.precedence===l)E=G;else if(E!==x)break}E?E.parentNode.insertBefore(s,E.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function z0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function B0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var xp=null;function sR(s,l,d){if(xp===null){var m=new Map,x=xp=new Map;x.set(d,m)}else x=xp,m=x.get(d),m||(m=new Map,x.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),x=0;x<d.length;x++){var E=d[x];if(!(E[ef]||E[rn]||s==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var $=E.getAttribute(l)||"";$=s+$;var G=m.get($);G?G.push(E):m.set($,[E])}}return m}function aR(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function u5(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 lR(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function c5(s,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var x=Mu(m.href),E=l.querySelector(Ff(x));if(E){l=E._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=wp.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=E,Rn(E);return}E=l.ownerDocument||l,m=iR(m),(x=ti.get(x))&&z0(m,x),E=E.createElement("link"),Rn(E);var $=E;$._p=new Promise(function(G,Q){$.onload=G,$.onerror=Q}),In(E,"link",m),d.instance=E}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=wp.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var U0=0;function f5(s,l){return s.stylesheets&&s.count===0&&Cp(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&Cp(s,s.stylesheets),s.unsuspend){var E=s.unsuspend;s.unsuspend=null,E()}},6e4+l);0<s.imgBytes&&U0===0&&(U0=62500*qj());var x=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Cp(s,s.stylesheets),s.unsuspend)){var E=s.unsuspend;s.unsuspend=null,E()}},(s.imgBytes>U0?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function wp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Sp=null;function Cp(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Sp=new Map,l.forEach(d5,s),Sp=null,wp.call(s))}function d5(s,l){if(!(l.state.loading&4)){var d=Sp.get(s);if(d)var m=d.get(null);else{d=new Map,Sp.set(s,d);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<x.length;E++){var $=x[E];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(d.set($.dataset.precedence,$),m=$)}m&&d.set(null,m)}x=l.instance,$=x.getAttribute("data-precedence"),E=d.get($)||m,E===m&&d.set(null,x),d.set($,x),this.count++,m=wp.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),E?E.parentNode.insertBefore(x,E.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(x,s.firstChild)),l.state.loading|=4}}var zf={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function h5(s,l,d,m,x,E,$,G,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=Ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.hiddenUpdates=Ra(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=E,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function uR(s,l,d,m,x,E,$,G,Q,de,be,Ee){return s=new h5(s,l,d,$,Q,de,be,Ee,G),l=1,E===!0&&(l|=24),E=Rr(3,null,null,l),s.current=E,E.stateNode=s,l=wb(),l.refCount++,s.pooledCache=l,l.refCount++,E.memoizedState={element:m,isDehydrated:d,cache:l},kb(E),s}function cR(s){return s?(s=uu,s):uu}function fR(s,l,d,m,x,E){x=cR(x),m.context===null?m.context=x:m.pendingContext=x,m=cs(l),m.payload={element:d},E=E===void 0?null:E,E!==null&&(m.callback=E),d=fs(s,m,l),d!==null&&(cr(d,s,l),bf(d,s,l))}function dR(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function H0(s,l){dR(s,l),(s=s.alternate)&&dR(s,l)}function hR(s){if(s.tag===13||s.tag===31){var l=Na(s,67108864);l!==null&&cr(l,s,67108864),H0(s,67108864)}}function pR(s){if(s.tag===13||s.tag===31){var l=Mr();l=_a(l);var d=Na(s,l);d!==null&&cr(d,s,l),H0(s,l)}}var Ep=!0;function p5(s,l,d,m){var x=j.T;j.T=null;var E=z.p;try{z.p=2,G0(s,l,d,m)}finally{z.p=E,j.T=x}}function m5(s,l,d,m){var x=j.T;j.T=null;var E=z.p;try{z.p=8,G0(s,l,d,m)}finally{z.p=E,j.T=x}}function G0(s,l,d,m){if(Ep){var x=q0(m);if(x===null)D0(s,l,m,kp,d),gR(s,m);else if(y5(x,s,l,d,m))m.stopPropagation();else if(gR(s,m),l&4&&-1<g5.indexOf(s)){for(;x!==null;){var E=Zl(x);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var $=en(E.pendingLanes);if($!==0){var G=E;for(G.pendingLanes|=2,G.entangledLanes|=2;$;){var Q=1<<31-Le($);G.entanglements[1]|=Q,$&=~Q}zi(E),(Ot&6)===0&&(ap=_e()+500,Nf(0))}}break;case 31:case 13:G=Na(E,2),G!==null&&cr(G,E,2),up(),H0(E,2)}if(E=q0(m),E===null&&D0(s,l,m,kp,d),E===x)break;x=E}x!==null&&m.stopPropagation()}else D0(s,l,m,null,d)}}function q0(s){return s=Yy(s),V0(s)}var kp=null;function V0(s){if(kp=null,s=Ql(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 kp=s,null}function mR(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 Ne:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var Y0=!1,Ss=null,Cs=null,Es=null,Bf=new Map,Uf=new Map,ks=[],g5="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 gR(s,l){switch(s){case"focusin":case"focusout":Ss=null;break;case"dragenter":case"dragleave":Cs=null;break;case"mouseover":case"mouseout":Es=null;break;case"pointerover":case"pointerout":Bf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uf.delete(l.pointerId)}}function Hf(s,l,d,m,x,E){return s===null||s.nativeEvent!==E?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:E,targetContainers:[x]},l!==null&&(l=Zl(l),l!==null&&hR(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,x!==null&&l.indexOf(x)===-1&&l.push(x),s)}function y5(s,l,d,m,x){switch(l){case"focusin":return Ss=Hf(Ss,s,l,d,m,x),!0;case"dragenter":return Cs=Hf(Cs,s,l,d,m,x),!0;case"mouseover":return Es=Hf(Es,s,l,d,m,x),!0;case"pointerover":var E=x.pointerId;return Bf.set(E,Hf(Bf.get(E)||null,s,l,d,m,x)),!0;case"gotpointercapture":return E=x.pointerId,Uf.set(E,Hf(Uf.get(E)||null,s,l,d,m,x)),!0}return!1}function yR(s){var l=Ql(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,Aa(s.priority,function(){pR(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,Aa(s.priority,function(){pR(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 Rp(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=q0(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);Vy=m,d.target.dispatchEvent(m),Vy=null}else return l=Zl(d),l!==null&&hR(l),s.blockedOn=d,!1;l.shift()}return!0}function bR(s,l,d){Rp(s)&&d.delete(l)}function b5(){Y0=!1,Ss!==null&&Rp(Ss)&&(Ss=null),Cs!==null&&Rp(Cs)&&(Cs=null),Es!==null&&Rp(Es)&&(Es=null),Bf.forEach(bR),Uf.forEach(bR)}function _p(s,l){s.blockedOn===l&&(s.blockedOn=null,Y0||(Y0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,b5)))}var Tp=null;function vR(s){Tp!==s&&(Tp=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tp===s&&(Tp=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],x=s[l+2];if(typeof m!="function"){if(V0(m||d)===null)continue;break}var E=Zl(d);E!==null&&(s.splice(l,3),l-=3,qb(E,{pending:!0,data:x,method:d.method,action:m},m,x))}}))}function $u(s){function l(Q){return _p(Q,s)}Ss!==null&&_p(Ss,s),Cs!==null&&_p(Cs,s),Es!==null&&_p(Es,s),Bf.forEach(l),Uf.forEach(l);for(var d=0;d<ks.length;d++){var m=ks[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<ks.length&&(d=ks[0],d.blockedOn===null);)yR(d),d.blockedOn===null&&ks.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var x=d[m],E=d[m+1],$=x[$n]||null;if(typeof E=="function")$||vR(d);else if($){var G=null;if(E&&E.hasAttribute("formAction")){if(x=E,$=E[$n]||null)G=$.formAction;else if(V0(x)!==null)continue}else G=$.action;typeof G=="function"?d[m+1]=G:(d.splice(m,3),m-=3),vR(d)}}}function xR(){function s(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function($){return x=$})},focusReset:"manual",scroll:"manual"})}function l(){x!==null&&(x(),x=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,x=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),x!==null&&(x(),x=null)}}}function W0(s){this._internalRoot=s}Ap.prototype.render=W0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,m=Mr();fR(d,m,s,l,null,null)},Ap.prototype.unmount=W0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;fR(s.current,2,null,s,null,null),up(),l[lo]=null}};function Ap(s){this._internalRoot=s}Ap.prototype.unstable_scheduleHydration=function(s){if(s){var l=Li();s={blockedOn:null,target:s,priority:l};for(var d=0;d<ks.length&&l!==0&&l<ks[d].priority;d++);ks.splice(d,0,s),d===0&&yR(s)}};var wR=t.version;if(wR!=="19.2.5")throw Error(r(527,wR,"19.2.5"));z.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 v5={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dp.isDisabled&&Dp.supportsFiber)try{Mt=Dp.inject(v5),Me=Dp}catch{}}return qf.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,m="",x=Tk,E=Ak,$=Dk;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(x=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&($=l.onRecoverableError)),l=uR(s,1,!1,null,null,d,m,null,x,E,$,xR),s[lo]=l.current,A0(s),new W0(l)},qf.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var m=!1,x="",E=Tk,$=Ak,G=Dk,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(x=d.identifierPrefix),d.onUncaughtError!==void 0&&(E=d.onUncaughtError),d.onCaughtError!==void 0&&($=d.onCaughtError),d.onRecoverableError!==void 0&&(G=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=uR(s,1,!0,l,d??null,m,x,Q,E,$,G,xR),l.context=cR(null),d=l.current,m=Mr(),m=_a(m),x=cs(m),x.callback=null,fs(d,x,m),d=m,l.current.lanes=d,vi(l,d),zi(l),s[lo]=l.current,A0(s),new Ap(l)},qf.version="19.2.5",qf}var $R;function $5(){if($R)return Z0.exports;$R=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(),Z0.exports=O5(),Z0.exports}var N5=$5(),jc=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(){}},ul,Fs,uc,pM,P5=(pM=class extends jc{constructor(){super();He(this,ul);He(this,Fs);He(this,uc);$e(this,uc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,Fs)||this.setEventListener(K(this,uc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Fs))==null||t.call(this),$e(this,Fs,void 0))}setEventListener(t){var n;$e(this,uc,t),(n=K(this,Fs))==null||n.call(this),$e(this,Fs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,ul)!==t&&($e(this,ul,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,ul)=="boolean"?K(this,ul):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ul=new WeakMap,Fs=new WeakMap,uc=new WeakMap,pM),vw=new P5,L5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},js,yw,mM,I5=(mM=class{constructor(){He(this,js,L5);He(this,yw,!1)}setTimeoutProvider(e){$e(this,js,e)}setTimeout(e,t){return K(this,js).setTimeout(e,t)}clearTimeout(e){K(this,js).clearTimeout(e)}setInterval(e,t){return K(this,js).setInterval(e,t)}clearInterval(e){K(this,js).clearInterval(e)}},js=new WeakMap,yw=new WeakMap,mM),nl=new I5;function F5(e){setTimeout(e,0)}var j5=typeof window>"u"||"Deno"in globalThis;function Qn(){}function z5(e,t){return typeof e=="function"?e(t):e}function M1(e){return typeof e=="number"&&e>=0&&e!==1/0}function RM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ta(e,t){return typeof e=="function"?e(t):e}function ai(e,t){return typeof e=="function"?e(t):e}function NR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==xw(a,t.options))return!1}else if(!Rd(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 PR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Tl(t.options.mutationKey)!==Tl(o))return!1}else if(!Rd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Tl)(e)}function Tl(e){return JSON.stringify(e,(t,n)=>O1(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Rd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Rd(e[n],t[n])):!1}var B5=Object.prototype.hasOwnProperty;function _M(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=LR(e)&&LR(t);if(!r&&!(O1(e)&&O1(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],g=e[p],y=t[p];if(g===y){c[p]=g,(r?h<o:B5.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){c[p]=y;continue}const b=_M(g,y,n+1);c[p]=b,b===g&&f++}return o===u&&f===o?e:c}function Vm(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 LR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O1(e){if(!IR(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!IR(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function IR(e){return Object.prototype.toString.call(e)==="[object Object]"}function U5(e){return new Promise(t=>{nl.setTimeout(t,e)})}function $1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?_M(e,t):t}function zc(e){return e}function H5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function G5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ww=Symbol();function TM(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ww?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sw(e,t){return typeof e=="function"?e(...t):!!e}function q5(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 _d=(()=>{let e=()=>j5;return{isServer(){return e()},setIsServer(t){e=t}}})();function N1(){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 V5=F5;function Y5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=V5;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 Cn=Y5(),cc,zs,fc,gM,W5=(gM=class extends jc{constructor(){super();He(this,cc,!0);He(this,zs);He(this,fc);$e(this,fc,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,zs)||this.setEventListener(K(this,fc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,zs))==null||t.call(this),$e(this,zs,void 0))}setEventListener(t){var n;$e(this,fc,t),(n=K(this,zs))==null||n.call(this),$e(this,zs,t(this.setOnline.bind(this)))}setOnline(t){K(this,cc)!==t&&($e(this,cc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,cc)}},cc=new WeakMap,zs=new WeakMap,fc=new WeakMap,gM),Ym=new W5;function K5(e){return Math.min(1e3*2**e,3e4)}function AM(e){return(e??"online")==="online"?Ym.isOnline():!0}var P1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function DM(e){let t=!1,n=0,r;const i=N1(),o=()=>i.status!=="pending",a=v=>{var w;if(!o()){const S=new P1(v);g(S),(w=e.onCancel)==null||w.call(e,S)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>vw.isFocused()&&(e.networkMode==="always"||Ym.isOnline())&&e.canRun(),h=()=>AM(e.networkMode)&&e.canRun(),p=v=>{o()||(r==null||r(),i.resolve(v))},g=v=>{o()||(r==null||r(),i.reject(v))},y=()=>new Promise(v=>{var w;r=S=>{(o()||f())&&v(S)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(o())return;let v;const w=n===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(S){v=Promise.reject(S)}Promise.resolve(v).then(p).catch(S=>{var D;if(o())return;const _=e.retry??(_d.isServer()?0:3),k=e.retryDelay??K5,T=typeof k=="function"?k(n,S):k,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,S);if(t||!A){g(S);return}n++,(D=e.onFail)==null||D.call(e,n,S),U5(T).then(()=>f()?void 0:y()).then(()=>{t?g(S):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 cl,yM,MM=(yM=class{constructor(){He(this,cl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),M1(this.gcTime)&&$e(this,cl,nl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_d.isServer()?1/0:300*1e3))}clearGcTimeout(){K(this,cl)!==void 0&&(nl.clearTimeout(K(this,cl)),$e(this,cl,void 0))}},cl=new WeakMap,yM),fl,dc,oi,dl,Tn,Wd,hl,$r,OM,Oo,bM,X5=(bM=class extends MM{constructor(t){super();He(this,$r);He(this,fl);He(this,dc);He(this,oi);He(this,dl);He(this,Tn);He(this,Wd);He(this,hl);$e(this,hl,!1),$e(this,Wd,t.defaultOptions),this.setOptions(t.options),this.observers=[],$e(this,dl,t.client),$e(this,oi,K(this,dl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$e(this,fl,jR(this.options)),this.state=t.state??K(this,fl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,Tn))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,Wd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=jR(this.options);n.data!==void 0&&(this.setState(FR(n.data,n.dataUpdatedAt)),$e(this,fl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,oi).remove(this)}setData(t,n){const r=$1(this.state.data,t,this.options);return rt(this,$r,Oo).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,$r,Oo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=K(this,Tn))==null?void 0:r.promise;return(i=K(this,Tn))==null||i.cancel(t),n?n.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return K(this,fl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ai(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ww||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ta(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:!RM(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Tn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Tn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,oi).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,Tn)&&(K(this,hl)||rt(this,$r,OM).call(this)?K(this,Tn).cancel({revert:!0}):K(this,Tn).cancelRetry()),this.scheduleGc()),K(this,oi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,$r,Oo).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,g,y,b,v,w,S,_,k;if(this.state.fetchStatus!=="idle"&&((c=K(this,Tn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,Tn))return K(this,Tn).continueRetry(),K(this,Tn).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,hl,!0),r.signal)})},o=()=>{const T=TM(this.options,n),D=(()=>{const O={client:K(this,dl),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return $e(this,hl,!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,dl),state:this.state,fetchFn:o};return i(T),T})();(f=this.options.behavior)==null||f.onFetch(u,this),$e(this,dc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&rt(this,$r,Oo).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),$e(this,Tn,DM({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof P1&&T.revert&&this.setState({...K(this,dc),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{rt(this,$r,Oo).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{rt(this,$r,Oo).call(this,{type:"pause"})},onContinue:()=>{rt(this,$r,Oo).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await K(this,Tn).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(g=K(this,oi).config).onSuccess)==null||y.call(g,T,this),(v=(b=K(this,oi).config).onSettled)==null||v.call(b,T,this.state.error,this),T}catch(T){if(T instanceof P1){if(T.silent)return K(this,Tn).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw rt(this,$r,Oo).call(this,{type:"error",error:T}),(S=(w=K(this,oi).config).onError)==null||S.call(w,T,this),(k=(_=K(this,oi).config).onSettled)==null||k.call(_,this.state.data,T,this),T}finally{this.scheduleGc()}}},fl=new WeakMap,dc=new WeakMap,oi=new WeakMap,dl=new WeakMap,Tn=new WeakMap,Wd=new WeakMap,hl=new WeakMap,$r=new WeakSet,OM=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Oo=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,...$M(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...FR(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return $e(this,dc,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),Cn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,oi).notify({query:this,type:"updated",action:t})})},bM);function $M(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function FR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jR(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 hr,Et,Kd,Xn,pl,hc,Po,Bs,Xd,pc,mc,ml,gl,Us,gc,It,ad,L1,I1,F1,j1,z1,B1,U1,NM,vM,Q5=(vM=class extends jc{constructor(t,n){super();He(this,It);He(this,hr);He(this,Et);He(this,Kd);He(this,Xn);He(this,pl);He(this,hc);He(this,Po);He(this,Bs);He(this,Xd);He(this,pc);He(this,mc);He(this,ml);He(this,gl);He(this,Us);He(this,gc,new Set);this.options=n,$e(this,hr,t),$e(this,Bs,null),$e(this,Po,N1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,Et).addObserver(this),zR(K(this,Et),this.options)?rt(this,It,ad).call(this):this.updateResult(),rt(this,It,j1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return H1(K(this,Et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return H1(K(this,Et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,It,z1).call(this),rt(this,It,B1).call(this),K(this,Et).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,Et);if(this.options=K(this,hr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ai(this.options.enabled,K(this,Et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,It,U1).call(this),K(this,Et).setOptions(this.options),n._defaulted&&!Vm(this.options,n)&&K(this,hr).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,Et),observer:this});const i=this.hasListeners();i&&BR(K(this,Et),r,this.options,n)&&rt(this,It,ad).call(this),this.updateResult(),i&&(K(this,Et)!==r||ai(this.options.enabled,K(this,Et))!==ai(n.enabled,K(this,Et))||ta(this.options.staleTime,K(this,Et))!==ta(n.staleTime,K(this,Et)))&&rt(this,It,L1).call(this);const o=rt(this,It,I1).call(this);i&&(K(this,Et)!==r||ai(this.options.enabled,K(this,Et))!==ai(n.enabled,K(this,Et))||o!==K(this,Us))&&rt(this,It,F1).call(this,o)}getOptimisticResult(t){const n=K(this,hr).getQueryCache().build(K(this,hr),t),r=this.createResult(n,t);return J5(this,r)&&($e(this,Xn,r),$e(this,hc,this.options),$e(this,pl,K(this,Et).state)),r}getCurrentResult(){return K(this,Xn)}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,Po).status==="pending"&&K(this,Po).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){K(this,gc).add(t)}getCurrentQuery(){return K(this,Et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,hr).defaultQueryOptions(t),r=K(this,hr).getQueryCache().build(K(this,hr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return rt(this,It,ad).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,Xn)))}createResult(t,n){var H;const r=K(this,Et),i=this.options,o=K(this,Xn),a=K(this,pl),u=K(this,hc),f=t!==r?t.state:K(this,Kd),{state:h}=t;let p={...h},g=!1,y;if(n._optimisticResults){const I=this.hasListeners(),L=!I&&zR(t,n),M=I&&BR(t,r,n,i);(L||M)&&(p={...p,...$M(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:w}=p;y=p.data;let S=!1;if(n.placeholderData!==void 0&&y===void 0&&w==="pending"){let I;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(I=o.data,S=!0):I=typeof n.placeholderData=="function"?n.placeholderData((H=K(this,mc))==null?void 0:H.state.data,K(this,mc)):n.placeholderData,I!==void 0&&(w="success",y=$1(o==null?void 0:o.data,I,n),g=!0)}if(n.select&&y!==void 0&&!S)if(o&&y===(a==null?void 0:a.data)&&n.select===K(this,Xd))y=K(this,pc);else try{$e(this,Xd,n.select),y=n.select(y),y=$1(o==null?void 0:o.data,y,n),$e(this,pc,y),$e(this,Bs,null)}catch(I){$e(this,Bs,I)}K(this,Bs)&&(b=K(this,Bs),y=K(this,pc),v=Date.now(),w="error");const _=p.fetchStatus==="fetching",k=w==="pending",T=w==="error",A=k&&_,D=y!==void 0,N={status:w,fetchStatus:p.fetchStatus,isPending:k,isSuccess:w==="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:g,isRefetchError:T&&D,isStale:Cw(t,n),refetch:this.refetch,promise:K(this,Po),isEnabled:ai(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=N.data!==void 0,L=N.status==="error"&&!I,M=F=>{L?F.reject(N.error):I&&F.resolve(N.data)},B=()=>{const F=$e(this,Po,N.promise=N1());M(F)},q=K(this,Po);switch(q.status){case"pending":t.queryHash===r.queryHash&&M(q);break;case"fulfilled":(L||N.data!==q.value)&&B();break;case"rejected":(!L||N.error!==q.reason)&&B();break}}return N}updateResult(){const t=K(this,Xn),n=this.createResult(K(this,Et),this.options);if($e(this,pl,K(this,Et).state),$e(this,hc,this.options),K(this,pl).data!==void 0&&$e(this,mc,K(this,Et)),Vm(n,t))return;$e(this,Xn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!K(this,gc).size)return!0;const a=new Set(o??K(this,gc));return this.options.throwOnError&&a.add("error"),Object.keys(K(this,Xn)).some(u=>{const c=u;return K(this,Xn)[c]!==t[c]&&a.has(c)})};rt(this,It,NM).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,It,j1).call(this)}},hr=new WeakMap,Et=new WeakMap,Kd=new WeakMap,Xn=new WeakMap,pl=new WeakMap,hc=new WeakMap,Po=new WeakMap,Bs=new WeakMap,Xd=new WeakMap,pc=new WeakMap,mc=new WeakMap,ml=new WeakMap,gl=new WeakMap,Us=new WeakMap,gc=new WeakMap,It=new WeakSet,ad=function(t){rt(this,It,U1).call(this);let n=K(this,Et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Qn)),n},L1=function(){rt(this,It,z1).call(this);const t=ta(this.options.staleTime,K(this,Et));if(_d.isServer()||K(this,Xn).isStale||!M1(t))return;const r=RM(K(this,Xn).dataUpdatedAt,t)+1;$e(this,ml,nl.setTimeout(()=>{K(this,Xn).isStale||this.updateResult()},r))},I1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,Et)):this.options.refetchInterval)??!1},F1=function(t){rt(this,It,B1).call(this),$e(this,Us,t),!(_d.isServer()||ai(this.options.enabled,K(this,Et))===!1||!M1(K(this,Us))||K(this,Us)===0)&&$e(this,gl,nl.setInterval(()=>{(this.options.refetchIntervalInBackground||vw.isFocused())&&rt(this,It,ad).call(this)},K(this,Us)))},j1=function(){rt(this,It,L1).call(this),rt(this,It,F1).call(this,rt(this,It,I1).call(this))},z1=function(){K(this,ml)!==void 0&&(nl.clearTimeout(K(this,ml)),$e(this,ml,void 0))},B1=function(){K(this,gl)!==void 0&&(nl.clearInterval(K(this,gl)),$e(this,gl,void 0))},U1=function(){const t=K(this,hr).getQueryCache().build(K(this,hr),this.options);if(t===K(this,Et))return;const n=K(this,Et);$e(this,Et,t),$e(this,Kd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},NM=function(t){Cn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,Xn))}),K(this,hr).getQueryCache().notify({query:K(this,Et),type:"observerResultsUpdated"})})},vM);function Z5(e,t){return ai(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zR(e,t){return Z5(e,t)||e.state.data!==void 0&&H1(e,t,t.refetchOnMount)}function H1(e,t,n){if(ai(t.enabled,e)!==!1&&ta(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cw(e,t)}return!1}function BR(e,t,n,r){return(e!==t||ai(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cw(e,n)}function Cw(e,t){return ai(t.enabled,e)!==!1&&e.isStaleByTime(ta(t.staleTime,e))}function J5(e,t){return!Vm(e.getCurrentResult(),t)}function UR(e){return{onFetch:(t,n)=>{var h,p,g,y,b;const r=t.options,i=(g=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:g.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 w=k=>{q5(k,()=>t.signal,()=>v=!0)},S=TM(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 L={client:t.client,queryKey:t.queryKey,pageParam:T,direction:A?"backward":"forward",meta:t.options.meta};return w(L),L})(),N=await S(O),{maxPages:H}=t.options,I=A?G5:H5;return{pages:I(k.pages,N,H),pageParams:I(k.pageParams,T,H)}};if(i&&o.length){const k=i==="backward",T=k?ez:HR,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:HR(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,w;return(w=(v=t.options).persister)==null?void 0:w.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function HR(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 ez(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 Qd,Yi,Hn,yl,Wi,Ms,xM,tz=(xM=class extends MM{constructor(t){super();He(this,Wi);He(this,Qd);He(this,Yi);He(this,Hn);He(this,yl);$e(this,Qd,t.client),this.mutationId=t.mutationId,$e(this,Hn,t.mutationCache),$e(this,Yi,[]),this.state=t.state||PM(),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,Yi).includes(t)||(K(this,Yi).push(t),this.clearGcTimeout(),K(this,Hn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$e(this,Yi,K(this,Yi).filter(n=>n!==t)),this.scheduleGc(),K(this,Hn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Yi).length||(this.state.status==="pending"?this.scheduleGc():K(this,Hn).remove(this))}continue(){var t;return((t=K(this,yl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,c,f,h,p,g,y,b,v,w,S,_,k,T,A,D,O;const n=()=>{rt(this,Wi,Ms).call(this,{type:"continue"})},r={client:K(this,Qd),meta:this.options.meta,mutationKey:this.options.mutationKey};$e(this,yl,DM({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,H)=>{rt(this,Wi,Ms).call(this,{type:"failed",failureCount:N,error:H})},onPause:()=>{rt(this,Wi,Ms).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Hn).canRun(this)}));const i=this.state.status==="pending",o=!K(this,yl).canStart();try{if(i)n();else{rt(this,Wi,Ms).call(this,{type:"pending",variables:t,isPaused:o}),K(this,Hn).config.onMutate&&await K(this,Hn).config.onMutate(t,this,r);const H=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));H!==this.state.context&&rt(this,Wi,Ms).call(this,{type:"pending",context:H,variables:t,isPaused:o})}const N=await K(this,yl).start();return await((f=(c=K(this,Hn).config).onSuccess)==null?void 0:f.call(c,N,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,N,t,this.state.context,r)),await((y=(g=K(this,Hn).config).onSettled)==null?void 0:y.call(g,N,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,N,null,t,this.state.context,r)),rt(this,Wi,Ms).call(this,{type:"success",data:N}),N}catch(N){try{await((S=(w=K(this,Hn).config).onError)==null?void 0:S.call(w,N,t,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((k=(_=this.options).onError)==null?void 0:k.call(_,N,t,this.state.context,r))}catch(H){Promise.reject(H)}try{await((A=(T=K(this,Hn).config).onSettled)==null?void 0:A.call(T,void 0,N,this.state.variables,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,N,t,this.state.context,r))}catch(H){Promise.reject(H)}throw rt(this,Wi,Ms).call(this,{type:"error",error:N}),N}finally{K(this,Hn).runNext(this)}}},Qd=new WeakMap,Yi=new WeakMap,Hn=new WeakMap,yl=new WeakMap,Wi=new WeakSet,Ms=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),Cn.batch(()=>{K(this,Yi).forEach(r=>{r.onMutationUpdate(t)}),K(this,Hn).notify({mutation:this,type:"updated",action:t})})},xM);function PM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lo,Ri,Zd,wM,nz=(wM=class extends jc{constructor(t={}){super();He(this,Lo);He(this,Ri);He(this,Zd);this.config=t,$e(this,Lo,new Set),$e(this,Ri,new Map),$e(this,Zd,0)}build(t,n,r){const i=new tz({client:t,mutationCache:this,mutationId:++Mp(this,Zd)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,Lo).add(t);const n=Op(t);if(typeof n=="string"){const r=K(this,Ri).get(n);r?r.push(t):K(this,Ri).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,Lo).delete(t)){const n=Op(t);if(typeof n=="string"){const r=K(this,Ri).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,Ri).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Op(t);if(typeof n=="string"){const r=K(this,Ri).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=Op(t);if(typeof n=="string"){const i=(r=K(this,Ri).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(){Cn.batch(()=>{K(this,Lo).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,Lo).clear(),K(this,Ri).clear()})}getAll(){return Array.from(K(this,Lo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>PR(n,r))}findAll(t={}){return this.getAll().filter(n=>PR(t,n))}notify(t){Cn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Cn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Qn))))}},Lo=new WeakMap,Ri=new WeakMap,Zd=new WeakMap,wM);function Op(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Io,Hs,pr,Fo,Wo,Sm,G1,SM,rz=(SM=class extends jc{constructor(n,r){super();He(this,Wo);He(this,Io);He(this,Hs);He(this,pr);He(this,Fo);$e(this,Io,n),this.setOptions(r),this.bindMethods(),rt(this,Wo,Sm).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,Io).defaultMutationOptions(n),Vm(this.options,r)||K(this,Io).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,pr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Tl(r.mutationKey)!==Tl(this.options.mutationKey)?this.reset():((i=K(this,pr))==null?void 0:i.state.status)==="pending"&&K(this,pr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,pr))==null||n.removeObserver(this)}onMutationUpdate(n){rt(this,Wo,Sm).call(this),rt(this,Wo,G1).call(this,n)}getCurrentResult(){return K(this,Hs)}reset(){var n;(n=K(this,pr))==null||n.removeObserver(this),$e(this,pr,void 0),rt(this,Wo,Sm).call(this),rt(this,Wo,G1).call(this)}mutate(n,r){var i;return $e(this,Fo,r),(i=K(this,pr))==null||i.removeObserver(this),$e(this,pr,K(this,Io).getMutationCache().build(K(this,Io),this.options)),K(this,pr).addObserver(this),K(this,pr).execute(n)}},Io=new WeakMap,Hs=new WeakMap,pr=new WeakMap,Fo=new WeakMap,Wo=new WeakSet,Sm=function(){var r;const n=((r=K(this,pr))==null?void 0:r.state)??PM();$e(this,Hs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},G1=function(n){Cn.batch(()=>{var r,i,o,a,u,c,f,h;if(K(this,Fo)&&this.hasListeners()){const p=K(this,Hs).variables,g=K(this,Hs).context,y={client:K(this,Io),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=K(this,Fo)).onSuccess)==null||i.call(r,n.data,p,g,y)}catch(b){Promise.reject(b)}try{(a=(o=K(this,Fo)).onSettled)==null||a.call(o,n.data,null,p,g,y)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(u=K(this,Fo)).onError)==null||c.call(u,n.error,p,g,y)}catch(b){Promise.reject(b)}try{(h=(f=K(this,Fo)).onSettled)==null||h.call(f,void 0,n.error,p,g,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(K(this,Hs))})})},SM),Ki,CM,iz=(CM=class extends jc{constructor(t={}){super();He(this,Ki);this.config=t,$e(this,Ki,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??xw(i,n);let a=this.get(o);return a||(a=new X5({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){K(this,Ki).has(t.queryHash)||(K(this,Ki).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,Ki).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,Ki).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Cn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,Ki).get(t)}getAll(){return[...K(this,Ki).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>NR(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>NR(t,r)):n}notify(t){Cn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Cn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Cn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ki=new WeakMap,CM),an,Gs,qs,yc,bc,Vs,vc,xc,EM,oz=(EM=class{constructor(e={}){He(this,an);He(this,Gs);He(this,qs);He(this,yc);He(this,bc);He(this,Vs);He(this,vc);He(this,xc);$e(this,an,e.queryCache||new iz),$e(this,Gs,e.mutationCache||new nz),$e(this,qs,e.defaultOptions||{}),$e(this,yc,new Map),$e(this,bc,new Map),$e(this,Vs,0)}mount(){Mp(this,Vs)._++,K(this,Vs)===1&&($e(this,vc,vw.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,an).onFocus())})),$e(this,xc,Ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,an).onOnline())})))}unmount(){var e,t;Mp(this,Vs)._--,K(this,Vs)===0&&((e=K(this,vc))==null||e.call(this),$e(this,vc,void 0),(t=K(this,xc))==null||t.call(this),$e(this,xc,void 0))}isFetching(e){return K(this,an).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,Gs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,an).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,an).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ta(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,an).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,an).get(r.queryHash),o=i==null?void 0:i.state.data,a=z5(t,o);if(a!==void 0)return K(this,an).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Cn.batch(()=>K(this,an).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,an).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,an);Cn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,an);return Cn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Cn.batch(()=>K(this,an).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return Cn.batch(()=>(K(this,an).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=Cn.batch(()=>K(this,an).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Qn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,an).build(this,t);return n.isStaleByTime(ta(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=UR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=UR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ym.isOnline()?K(this,Gs).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,an)}getMutationCache(){return K(this,Gs)}getDefaultOptions(){return K(this,qs)}setDefaultOptions(e){$e(this,qs,e)}setQueryDefaults(e,t){K(this,yc).set(Tl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,yc).values()],n={};return t.forEach(r=>{Rd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,bc).set(Tl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,bc).values()],n={};return t.forEach(r=>{Rd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,qs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xw(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===ww&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,qs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,an).clear(),K(this,Gs).clear()}},an=new WeakMap,Gs=new WeakMap,qs=new WeakMap,yc=new WeakMap,bc=new WeakMap,Vs=new WeakMap,vc=new WeakMap,xc=new WeakMap,EM),LM=C.createContext(void 0),Gg=e=>{const t=C.useContext(LM);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sz=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(LM.Provider,{value:e,children:t})),IM=C.createContext(!1),az=()=>C.useContext(IM);IM.Provider;function lz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uz=C.createContext(lz()),cz=()=>C.useContext(uz),fz=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Sw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},dz=e=>{C.useEffect(()=>{e.clearReset()},[e])},hz=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Sw(n,[e.error,r])),pz=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))}},mz=(e,t)=>e.isLoading&&e.isFetching&&!t,gz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,GR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function yz(e,t,n){var g,y,b,v;const r=az(),i=cz(),o=Gg(),a=o.defaultQueryOptions(e);(y=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a);const u=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",pz(a),fz(a,i,u),dz(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(w=>{const S=p?f.subscribe(Cn.batchCalls(w)):Qn;return f.updateResult(),S},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(a)},[a,f]),gz(a,h))throw GR(a,f,i);if(hz({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&&!_d.isServer()&&mz(h,r)){const w=c?GR(a,f,i):u==null?void 0:u.promise;w==null||w.catch(Qn).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function gi(e,t){return yz(e,Q5)}function qR(e,t){const n=Gg(),[r]=C.useState(()=>new rz(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(a=>r.subscribe(Cn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((a,u)=>{r.mutate(a,u).catch(Qn)},[r]);if(i.error&&Sw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var ld=typeof window<"u"?C.useLayoutEffect:C.useEffect;function nv(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 bz(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 vz(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}var FM=!1;function Td(e){return e[e.length-1]}function xz(e){return typeof e=="function"}function Xs(e,t){return xz(e)?e(t):e}var wz=Object.prototype.hasOwnProperty,VR=Object.prototype.propertyIsEnumerable,Sz=()=>Object.create(null),Ya=(e,t)=>Qs(e,t,Sz);function Qs(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=KR(e)&&KR(i);if(!o&&!(wc(e)&&wc(i)))return i;const a=o?e:YR(e);if(!a)return i;const u=o?i:YR(i);if(!u)return i;const c=a.length,f=u.length,h=o?new Array(f):n();let p=0;for(let g=0;g<f;g++){const y=o?g:u[g],b=e[y],v=i[y];if(b===v){h[y]=b,(o?g<c:wz.call(e,y))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[y]=v;continue}const w=Qs(b,v,n,r+1);h[y]=w,w===b&&p++}return c===f&&p===c?e:h}function YR(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!VR.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(!VR.call(e,i))return!1;r.push(i)}return r}function wc(e){if(!WR(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!WR(n)||!n.hasOwnProperty("isPrototypeOf"))}function WR(e){return Object.prototype.toString.call(e)==="[object Object]"}function KR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xl(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(!xl(e[r],t[r],n))return!1;return!0}if(wc(e)&&wc(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)&&!xl(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||!xl(e[a],t[a],n)))return!1;return i===o}return!1}function Sc(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 Ad(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Cz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function XR(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 Cz(t)}var Ez=["http:","https:","mailto:","tel:"];function Wm(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Vf(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+=XR(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+XR(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function kz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Rz(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 Ho(){throw new Error("Invariant failed")}function Dd(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 rl=4,jM=5;function _z(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 Ew(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=_z(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 qg(e,t,n,r,i,o,a){var c,f,h,p,g,y,b,v,w,S,_,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,N=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((g=(p=n.options)==null?void 0:p.skipRouteOnParseError)!=null&&g.params));for(;u<D;){const I=Ew(A,u,t);let L;const M=u,B=I[5];switch(u=B+1,o++,I[0]){case 0:{const q=A.substring(I[2],I[3]);if(O){const F=(y=i.static)==null?void 0:y.get(q);if(F)L=F;else{i.static??(i.static=new Map);const j=il(n.fullPath??n.from);j.parent=i,j.depth=o,L=j,i.static.set(q,j)}}else{const F=q.toLowerCase(),j=(b=i.staticInsensitive)==null?void 0:b.get(F);if(j)L=j;else{i.staticInsensitive??(i.staticInsensitive=new Map);const z=il(n.fullPath??n.from);z.parent=i,z.depth=o,L=z,i.staticInsensitive.set(F,z)}}break}case 1:{const q=A.substring(M,I[1]),F=A.substring(I[4],B),j=O&&!!(q||F),z=q?j?q:q.toLowerCase():void 0,V=F?j?F:F.toLowerCase():void 0,W=!N&&((v=i.dynamic)==null?void 0:v.find(P=>!P.skipOnParamError&&P.caseSensitive===j&&P.prefix===z&&P.suffix===V));if(W)L=W;else{const P=iv(1,n.fullPath??n.from,j,z,V);L=P,P.depth=o,P.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(P)}break}case 3:{const q=A.substring(M,I[1]),F=A.substring(I[4],B),j=O&&!!(q||F),z=q?j?q:q.toLowerCase():void 0,V=F?j?F:F.toLowerCase():void 0,W=!N&&((w=i.optional)==null?void 0:w.find(P=>!P.skipOnParamError&&P.caseSensitive===j&&P.prefix===z&&P.suffix===V));if(W)L=W;else{const P=iv(3,n.fullPath??n.from,j,z,V);L=P,P.parent=i,P.depth=o,i.optional??(i.optional=[]),i.optional.push(P)}break}case 2:{const q=A.substring(M,I[1]),F=A.substring(I[4],B),j=O&&!!(q||F),z=q?j?q:q.toLowerCase():void 0,V=F?j?F:F.toLowerCase():void 0,W=iv(2,n.fullPath??n.from,j,z,V);L=W,W.parent=i,W.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=L}if(N&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const I=il(n.fullPath??n.from);I.kind=jM,I.parent=i,o++,I.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(I),i=I}const H=(n.path||!n.children)&&!n.isRoot;if(H&&A.endsWith("/")){const I=il(n.fullPath??n.from);I.kind=rl,I.parent=i,o++,I.depth=o,i.index=I,i=I}i.parse=((_=(S=n.options)==null?void 0:S.params)==null?void 0:_.parse)??null,i.skipOnParamError=N,i.parsingPriority=((T=(k=n.options)==null?void 0:k.skipRouteOnParseError)==null?void 0:T.priority)??0,H&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const A of n.children)qg(e,t,A,u,i,o,a)}function rv(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 Ps(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Ps(i);if(e.static)for(const i of e.static.values())Ps(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ps(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(rv);for(const i of e.dynamic)Ps(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(rv);for(const i of e.optional)Ps(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(rv);for(const i of e.wildcard)Ps(i)}}function il(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 iv(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 Tz(e,t){const n=il("/"),r=new Uint16Array(6);for(const i of e)qg(!1,r,i,1,n,0);Ps(n),t.masksTree=n,t.flatCache=Dd(1e3)}function Az(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=kw(e,t.masksTree);return t.flatCache.set(e,r),r}function Dz(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=il("/"),qg(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),kw(r,a,n)}function Mz(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=kw(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=Nz(o.route)),t.matchCache.set(r,o),o}function Oz(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function $z(e,t=!1,n){const r=il(e.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return qg(t,i,e,1,r,0,c=>{if(n==null||n(c,u),c.id in o&&Ho(),o[c.id]=c,u!==0&&c.path){const f=Oz(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Ps(r),{processedTree:{segmentTree:r,singleCache:Dd(1e3),matchCache:Dd(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function kw(e,t,n=!1){const r=e.split("/"),i=Lz(e,r,t,n);if(!i)return null;const[o]=zM(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function zM(e,t,n){var h,p,g,y,b,v,w,S,_,k;const r=Pz(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=((g=n.extract)==null?void 0:g.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===rl)break;if(T.kind===jM){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],N=((b=T.prefix)==null?void 0:b.length)??0;if(O.charCodeAt(N)===123){const H=((v=T.suffix)==null?void 0:v.length)??0,I=O.substring(N+2,O.length-H-1),L=A.substring(N,A.length-H);o[I]=decodeURIComponent(L)}else{const H=O.substring(1);o[H]=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],N=((w=T.prefix)==null?void 0:w.length)??0,H=((S=T.suffix)==null?void 0:S.length)??0,I=O.substring(N+3,O.length-H-1),L=T.suffix||T.prefix?A.substring(N,A.length-H):A;L&&(o[I]=decodeURIComponent(L))}else if(T.kind===2){const O=T,N=e.substring(D+(((_=O.prefix)==null?void 0:_.length)??0),e.length-(((k=O.suffix)==null?void 0:k.length)??0)),H=decodeURIComponent(N);o["*"]=H,o._splat=H;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function Nz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Pz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Lz(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Td(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:g,index:y,skipped:b,depth:v,statics:w,dynamics:S,optionals:_}=p;let{extract:k,rawParams:T,parsedParams:A}=p;if(g.skipOnParamError){if(!ov(e,t,p))continue;T=p.rawParams,k=p.extract,A=p.parsedParams}r&&g.route&&g.kind!==rl&&Yf(f,p)&&(f=p);const D=y===a;if(D&&(g.route&&!o&&Yf(h,p)&&(h=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const O=D?void 0:t[y];let N;if(D&&g.index){const H={node:g.index,index:y,skipped:b,depth:v+1,statics:w,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A};let I=!0;if(g.index.skipOnParamError&&(ov(e,t,H)||(I=!1)),I){if(w===a&&!S&&!_&&!b)return H;Yf(h,H)&&(h=H)}}if(g.wildcard&&Yf(c,p))for(const H of g.wildcard){const{prefix:I,suffix:L}=H;if(I&&(D||!(H.caseSensitive?O:N??(N=O.toLowerCase())).startsWith(I)))continue;if(L){if(D)continue;const B=t.slice(y).join("/").slice(-L.length);if((H.caseSensitive?B:B.toLowerCase())!==L)continue}const M={node:H,index:a,skipped:b,depth:v,statics:w,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A};if(!(H.skipOnParamError&&!ov(e,t,M))){c=M;break}}if(g.optional){const H=b|1<<v,I=v+1;for(let L=g.optional.length-1;L>=0;L--){const M=g.optional[L];u.push({node:M,index:y,skipped:H,depth:I,statics:w,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D)for(let L=g.optional.length-1;L>=0;L--){const M=g.optional[L],{prefix:B,suffix:q}=M;if(B||q){const F=M.caseSensitive?O:N??(N=O.toLowerCase());if(B&&!F.startsWith(B)||q&&!F.endsWith(q))continue}u.push({node:M,index:y+1,skipped:b,depth:I,statics:w,dynamics:S,optionals:_+1,extract:k,rawParams:T,parsedParams:A})}}if(!D&&g.dynamic&&O)for(let H=g.dynamic.length-1;H>=0;H--){const I=g.dynamic[H],{prefix:L,suffix:M}=I;if(L||M){const B=I.caseSensitive?O:N??(N=O.toLowerCase());if(L&&!B.startsWith(L)||M&&!B.endsWith(M))continue}u.push({node:I,index:y+1,skipped:b,depth:v+1,statics:w,dynamics:S+1,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&g.staticInsensitive){const H=g.staticInsensitive.get(N??(N=O.toLowerCase()));H&&u.push({node:H,index:y+1,skipped:b,depth:v+1,statics:w+1,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&g.static){const H=g.static.get(O);H&&u.push({node:H,index:y+1,skipped:b,depth:v+1,statics:w+1,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(g.pathless){const H=v+1;for(let I=g.pathless.length-1;I>=0;I--){const L=g.pathless[I];u.push({node:L,index:y,skipped:b,depth:H,statics:w,dynamics:S,optionals:_,extract:k,rawParams:T,parsedParams:A})}}}if(h&&c)return Yf(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 g=p===e.length?"/":e.slice(p);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(g),f}return null}function ov(e,t,n){try{const[r,i]=zM(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 Yf(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===rl)>(e.node.kind===rl)||t.node.kind===rl==(e.node.kind===rl)&&t.depth>e.depth))):!0}function Cm(e){return Rw(e.filter(t=>t!==void 0).join("/"))}function Rw(e){return e.replace(/\/{2,}/g,"/")}function BM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function na(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function UM(e){return na(BM(e))}function Km(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Iz(e,t,n){return Km(e,n)===Km(t,n)}function Fz({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&&Td(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Td(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let c,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;c=Ew(g,0,c);const y=c[0];if(y===0){f+=g;continue}const b=c[5],v=g.substring(0,c[1]),w=g.substring(c[4],b),S=g.substring(c[2],c[3]);y===1?f+=v||w?`${v}{$${S}}${w}`:`$${S}`:y===2?f+=v||w?`${v}{$}${w}`:"$":f+=`${v}{-$${S}}${w}`}f=Rw(f);const h=f||"/";return a&&r&&r.set(a,h),h}function jz(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 sv(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=>ZR(i,n)).join("/"):ZR(r,n)}function QR({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=Ew(e,h,c);const p=c[5];if(u=p+1,h===p)continue;const g=c[0];if(g===0){f+="/"+e.substring(h,p);continue}if(g===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 w=sv("_splat",t,n);f+="/"+b+w+v;continue}if(g===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),w=sv(y,t,n)??"undefined";f+="/"+b+w+v;continue}if(g===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]),w=e.substring(c[4],p),S=sv(y,t,n)??"";f+="/"+v+S+w;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function ZR(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Yn(e){return(e==null?void 0:e.isNotFound)===!0}function zz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Bz="tsr-scroll-restoration-v1_3";function Uz(){const e=zz();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");wc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Xs(r,t)||t},persist:()=>{try{e.setItem(Bz,JSON.stringify(t))}catch{}}}}var JR=Uz(),Hz=e=>e.state.__TSR_key||e.href;function Gz(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 $p=!1,Wf="window",e_="data-scroll-restoration-id";function qz(e,t){if(!JR)return;const n=JR;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,$p=!1;const r=e.options.getScrollRestorationKey||Hz,i=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!($p||!e.isScrollRestoring))if(u.target===document||u.target===window)i.set(Wf,{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 g;if(h===Wf)g=Wf;else if(h.isConnected){const y=h.getAttribute(e_);g=y?`[${e_}="${y}"]`:Gz(h)}g&&(c[g]=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}))){$p=!0;try{const g=e.isScrollRestoring?n.state[c]:void 0;let y=!1;if(g)for(const b in g){const v=g[b];if(!wc(v))continue;const{scrollX:w,scrollY:S}=v;if(!(!Number.isFinite(w)||!Number.isFinite(S))){if(b===Wf)window.scrollTo({top:S,left:w,behavior:f}),y=!0;else if(b){let _;try{_=document.querySelector(b)}catch{continue}_&&(_.scrollLeft=w,_.scrollTop=S,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 w=document.getElementById(b);w&&w.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:f};if(window.scrollTo(v),h)for(const w of h){if(w===Wf)continue;const S=typeof w=="function"?w():document.querySelector(w);S&&S.scrollTo(v)}}}}finally{$p=!1}e.isScrollRestoring&&n.set(g=>(g[c]||(g[c]={}),g))}})}function Vz(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 av(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Yz(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]=av(i):Array.isArray(o)?o.push(av(i)):n[r]=[o,av(i)]}return n}var Wz=Xz(JSON.parse),Kz=Qz(JSON.stringify,JSON.parse);function Xz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Yz(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Qz(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=Vz(i,r);return o?`?${o}`:""}}var wl="__root__";function Zz(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 yr(e){return e instanceof Response&&!!e.options}function Jz(e){return{input:({url:t})=>{for(const n of e)t=q1(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=HM(e[n],t);return t}}}function e8(e){const t=UM(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=Cm(["/",t,a.pathname]),a)}}function q1(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 HM(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 t8(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),g=n(e.isTransitioning),y=n(e.location),b=n(e.resolvedLocation),v=n(e.statusCode),w=n(e.redirect),S=n([]),_=n([]),k=n([]),T=r(()=>lv(a,S.get())),A=r(()=>lv(u,_.get())),D=r(()=>lv(c,k.get())),O=r(()=>S.get()[0]),N=r(()=>S.get().some(z=>{var V;return((V=a.get(z))==null?void 0:V.get().status)==="pending"})),H=r(()=>{var z;return{locationHref:y.get().href,resolvedLocationHref:(z=b.get())==null?void 0:z.href,status:f.get()}}),I=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:g.get(),matches:T.get(),location:y.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:w.get()})),L=Dd(64);function M(z){let V=L.get(z);return V||(V=r(()=>{const W=S.get();for(const P of W){const Y=a.get(P);if(Y&&Y.routeId===z)return Y.get()}}),L.set(z,V)),V}const B={status:f,loadedAt:h,isLoading:p,isTransitioning:g,location:y,resolvedLocation:b,statusCode:v,redirect:w,matchesId:S,pendingIds:_,cachedIds:k,matches:T,pendingMatches:A,cachedMatches:D,firstId:O,hasPending:N,matchRouteDeps:H,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:I,getRouteMatchStore:M,setMatches:q,setPending:F,setCached:j};q(e.matches),o==null||o(B);function q(z){uv(z,a,S,n,i)}function F(z){uv(z,u,_,n,i)}function j(z){uv(z,c,k,n,i)}return B}function lv(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function uv(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)}Rz(n.get(),o)||n.set(o)})}var V1=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},n8=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),Vg=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Sl=(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},t_=(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},Zs=(e,t,n)=>{var r,i,o;if(!(!yr(n)&&!Yn(n)))throw yr(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:yr(n)?"redirected":Yn(n)?"notFound":a.status==="pending"?"success":a.status,context:Sl(e,t.index),isFetching:!1,error:n})),Yn(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),yr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},GM=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},n_=(e,t,n)=>{const r=Sl(e,n);e.updateMatch(t,i=>({...i,context:r}))},Kf=(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),Zs(e,e.router.getMatch(i),n);try{(c=(u=a.options).onError)==null||c.call(u,n)}catch(f){n=f,Zs(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&&!yr(n)&&!Yn(n)&&(e.serialError??(e.serialError=n))},qM=(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&&!Vg(e,t)&&(n.options.loader||n.options.beforeLoad||YM(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{V1(e)},i);r._nonReactive.pendingTimeout=a}},r8=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;qM(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Zs(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},i8=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Sc(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&Kf(e,n,a,"PARSE_PARAMS"),u&&Kf(e,n,u,"VALIDATE_SEARCH"),qM(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=Sc();const g={...Sl(e,n,!1),...i.__routeContext},{search:y,params:b,cause:v}=i,w=Vg(e,t),S={search:y,abortController:c,params:b,preload:w,context:g,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=T=>{if(T===void 0){e.router.batch(()=>{h(),p()});return}(yr(T)||Yn(T))&&(h(),Kf(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(S),Ad(k))return h(),k.catch(T=>{Kf(e,n,T,"BEFORE_LOAD")}).then(_)}catch(T){h(),Kf(e,n,T,"BEFORE_LOAD")}_(k)},o8=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>u(),a=()=>i8(e,n,t,i),u=()=>{if(GM(e,n))return;const c=r8(e,n,i);return Ad(c)?c.then(a):a()};return o()},s8=(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,g,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:g,styles:p==null?void 0:p.styles}))},VM=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=Sl(e,r),p=Vg(e,n);return{params:a,deps:u,preload:!!p,parentMatchPromise:o,abortController:c,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:p?"preload":f,route:i,...e.router.options.additionalContext}},r_=async(e,t,n,r,i)=>{var o,a,u,c,f;try{const h=e.router.getMatch(n);try{(!(FM??e.router.isServer)||h.ssr===!0)&&Md(i);const p=i.options.loader,g=typeof p=="function"?p:p==null?void 0:p.handler,y=g==null?void 0:g(VM(e,t,n,r,i)),b=!!g&&Ad(y);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,w=>({...w,isFetching:"loader"})),g){const w=b?await y:y;Zs(e,e.router.getMatch(n),w),w!==void 0&&e.updateMatch(n,S=>({...S,loaderData:w}))}i._lazyPromise&&await i._lazyPromise;const v=h._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,w=>({...w,error:void 0,context:Sl(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(p){let g=p;if((g==null?void 0:g.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:Sl(e,r)}));return}const y=h._nonReactive.minPendingPromise;y&&await y,Yn(p)&&await((u=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:u.call(a)),Zs(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){g=b,Zs(e,e.router.getMatch(n),b)}!yr(g)&&!Yn(g)&&await Md(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:g,context:Sl(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),Zs(e,p,h)}},a8=async(e,t,n)=>{var y,b,v,w;async function r(S,_,k,T,A){const D=Date.now()-_.updatedAt,O=S?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,N=A.options.shouldReload,H=typeof N=="function"?N(VM(e,t,i,n,A)):N,{status:I,invalid:L}=T,M=D>=O&&(!!e.forceStaleReload||T.cause==="enter"||k!==void 0&&k!==T.id);a=I==="success"&&(L||(H??M)),S&&A.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{var B,q;try{await r_(e,t,i,n,A);const F=e.router.getMatch(i);(B=F._nonReactive.loaderPromise)==null||B.resolve(),(q=F._nonReactive.loadPromise)==null||q.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){yr(F)&&await e.router.navigate(F.options)}})()):I!=="success"||a?await r_(e,t,i,n,A):n_(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(GM(e,i)){if(!e.router.getMatch(i))return e.matches[n];n_(e,i,n)}else{const S=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=Vg(e,i);if(S._nonReactive.loaderPromise){if(S.status==="success"&&!e.sync&&!S.preload&&h)return S;await S._nonReactive.loaderPromise;const A=e.router.getMatch(i),D=A._nonReactive.error||A.error;D&&Zs(e,A,D),A.status==="pending"&&await r(T,S,k,A,c)}else{const A=T&&!e.router.stores.matchStores.has(i),D=e.router.getMatch(i);D._nonReactive.loaderPromise=Sc(),A!==D.preload&&e.updateMatch(i,O=>({...O,preload:A})),await r(T,S,k,D,c)}}const p=e.router.getMatch(i);u||((v=p._nonReactive.loaderPromise)==null||v.resolve(),(w=p._nonReactive.loadPromise)==null||w.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 g=u?p.isFetching:!1;return g!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,S=>({...S,isFetching:g,invalid:!1})),e.router.getMatch(i)):p};async function i_(e){var g,y;const t=e,n=[];n8(t.router)&&V1(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=o8(t,b);Ad(v)&&await v}catch(v){if(yr(v))throw v;if(Yn(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?t_(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(a8(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 w=v.reason;if(yr(w))throw w;Yn(w)?u??(u=w):c??(c=w)}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=t_(t,f);b===void 0&&Ho();const v=t.matches[b],w=t.router.looseRoutesById[v.routeId],S=(g=t.router.options)==null?void 0:g.defaultNotFoundComponent;!w.options.notFoundComponent&&S&&(w.options.notFoundComponent=S),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 Md(w,["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 Md(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:w}=t.matches[b],S=t.router.looseRoutesById[w];try{const _=s8(t,v,S);if(_){const k=await _;t.updateMatch(v,T=>({...T,...k}))}}catch(_){console.error(`Error executing head for route ${w}:`,_)}}const p=V1(t);if(Ad(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function o_(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 Md(e,t=Em){!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===Em?(()=>{if(e._componentsPromise===void 0){const r=o_(e,Em);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():o_(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function YM(e){var t;for(const n of Em)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var Em=["component","errorComponent","pendingComponent","notFoundComponent"],ra="__TSR_index",s_="popstate",a_="beforeunload";function l8(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,g;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=Xm(c.path,c.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:c.type})){(g=e.onBlocked)==null||g.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[ra];u=l_(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[ra];u=l_(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[ra]!==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(g=>g!==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 l_(e,t){t||(t={});const n=_w();return{...t,key:n,__TSR_key:n,[ra]:e}}function u8(e){var N,H;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=I=>i=I,u=(I=>I),c=(()=>Xm(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((N=t.history.state)!=null&&N.__TSR_key)&&!((H=t.history.state)!=null&&H.key)){const I=_w();t.history.replaceState({[ra]:0,key:I,__TSR_key:I},"")}let f=c(),h,p=!1,g=!1,y=!1,b=!1;const v=()=>f;let w,S;const _=()=>{w&&(O._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),O._ignoreSubscribers=!1,w=void 0,S=void 0,h=void 0)},k=(I,L,M)=>{const B=u(L);S||(h=f),f=Xm(L,M),w={href:B,state:M,isPush:(w==null?void 0:w.isPush)||I==="push"},S||(S=Promise.resolve().then(()=>_()))},T=I=>{f=c(),O.notify({type:I})},A=async()=>{if(g){g=!1;return}const I=c(),L=I.state[ra]-f.state[ra],M=L===1,B=L===-1,q=!M&&!B||p;p=!1;const F=q?"GO":B?"BACK":"FORWARD",j=q?{type:"GO",index:L}:{type:B?"BACK":"FORWARD"};if(y)y=!1;else{const z=o();if(typeof document<"u"&&z.length){for(const V of z)if(await V.blockerFn({currentLocation:f,nextLocation:I,action:F})){g=!0,t.history.go(1),O.notify(j);return}}}f=c(),O.notify(j)},D=I=>{if(b){b=!1;return}let L=!1;const M=o();if(typeof document<"u"&&M.length)for(const B of M){const q=B.enableBeforeUnload??!0;if(q===!0){L=!0;break}if(typeof q=="function"&&q()===!0){L=!0;break}}if(L)return I.preventDefault(),I.returnValue=""},O=l8({getLocation:v,getLength:()=>t.history.length,pushState:(I,L)=>k("push",I,L),replaceState:(I,L)=>k("replace",I,L),back:I=>(I&&(y=!0),b=!0,t.history.back()),forward:I=>{I&&(y=!0),b=!0,t.history.forward()},go:I=>{p=!0,t.history.go(I)},createHref:I=>u(I),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(a_,D,{capture:!0}),t.removeEventListener(s_,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(a_,D,{capture:!0}),t.addEventListener(s_,A),t.history.pushState=function(...I){const L=n.apply(t.history,I);return O._ignoreSubscribers||T("PUSH"),L},t.history.replaceState=function(...I){const L=r.apply(t.history,I);return O._ignoreSubscribers||T("REPLACE"),L},O}function c8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Xm(e,t){const n=c8(e),r=n.indexOf("#"),i=n.indexOf("?"),o=_w();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||{[ra]:0,key:o,__TSR_key:o}}}function _w(){return(Math.random()+1).toString(36).substring(7)}function Xu(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 f8=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=jz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=u8()),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=Dd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=t8(h8(this.latestLocation),p),qz(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const p=[],g=UM(c);g&&g!=="/"&&p.push(e8({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Jz(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=$z(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Tz(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:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const S=this.options.parseSearch(f),_=this.options.stringifySearch(S);return{href:c+_+h,publicHref:c+_+h,pathname:Vf(c).path,external:!1,searchStr:_,search:Ya(r==null?void 0:r.search,S),hash:Vf(h.slice(1)).path,state:Qs(r==null?void 0:r.state,g)}}const y=new URL(p,this.origin),b=q1(this.rewrite,y),v=this.options.parseSearch(b.search),w=this.options.stringifySearch(v);return b.search=w,{href:b.href.replace(b.origin,""),publicHref:p,pathname:Vf(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:w,search:Ya(r==null?void 0:r.search,v),hash:Vf(b.hash.slice(1)).path,state:Qs(r==null?void 0:r.state,g)}},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)=>Fz({base:n,to:Rw(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=>p8({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 I,L;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),g=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,Xs(o.params,p)),b=this.getMatchedRoutes(g);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 B=((I=M.options.params)==null?void 0:I.stringify)??M.options.stringifyParams;if(B)try{Object.assign(y,B(y))}catch{}}const w=n.leaveParams?g:Vf(QR({path:g,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=h;if(n._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const M={};v.forEach(B=>{if(B.options.validateSearch)try{Object.assign(M,km(B.options.validateSearch,{...M,...S}))}catch{}}),S=M}S=m8({search:S,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),S=Ya(h,S);const _=this.options.stringifySearch(S),k=o.hash===!0?a.hash:o.hash?Xs(o.hash,a.hash):void 0,T=k?`#${k}`:"";let A=o.state===!0?a.state:o.state?Xs(o.state,a.state):{};A=Qs(a.state,A);const D=`${w}${_}${T}`;let O,N,H=!1;if(this.rewrite){const M=new URL(D,this.origin),B=HM(this.rewrite,M);O=M.href.replace(M.origin,""),B.origin!==this.origin?(N=B.href,H=!0):N=B.pathname+B.search+B.hash}else O=kz(D),N=O;return{publicHref:N,href:O,pathname:w,search:S,searchStr:_,state:A,hash:k??"",external:H,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=Az(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:p,params:g,...y}=h.route,b=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,Xs(g,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=xl(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=na(this.latestLocation.href)===na(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=Sc(()=>{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,g=Xm(u,{__TSR_index:n?p:p+1}),y=new URL(g.pathname,this.origin);c.to=q1(this.rewrite,y).pathname,c.search=this.options.parseSearch(g.search),c.hash=g.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(Wm(h,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const p=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const g of p)if(g!=null&&g.blockerFn&&await g.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=Xu(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await i_({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 w,S;let g=null,y=null,b=null,v=null;this.batch(()=>{const _=this.stores.pendingMatches.get(),k=_.length,T=this.stores.matches.get();g=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(),...g.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 _)(S=(w=this.looseRoutesById[T.routeId].options)[k])==null||S.call(w,T)})})}})}catch(h){yr(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Yn(h)&&(i=h);const p=r?r.status:i?404:this.stores.matches.get().some(g=>g.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(Xu(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&&Wm(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=Md,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 i_({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(yr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Yn(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=Dz(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!u||n.params&&!xl(u.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?xl(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??Kz,parseSearch:e.parseSearch??Wz,protocolAllowlist:e.protocolAllowlist??Ez}),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,g;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n;let{matchedRoutes:a}=n,u=!1;(r?r.path!=="/"&&i["**"]:na(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:u=!0);const c=u?y8(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 w,S,_;{const F=(v==null?void 0:v.search)??e.search,j=(v==null?void 0:v._strictSearch)??void 0;try{const z=km(b.options.validateSearch,{...F})??void 0;w={...F,...z},S={...j,...z},_=void 0}catch(z){let V=z;if(z instanceof Qm||(V=new Qm(z.message,{cause:z})),t!=null&&t.throwOnError)throw V;w=F,S={},_=V}}const k=((g=(p=b.options).loaderDeps)==null?void 0:g.call(p,{search:w}))??"",T=k?JSON.stringify(k):"",{interpolatedPath:A,usedParams:D}=QR({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=b.id+A+T,N=this.getMatch(O),H=h.get(b.id),I=(N==null?void 0:N._strictParams)??D;let L;if(!N)try{u_(b,D,o,I)}catch(F){if(Yn(F)||yr(F)?L=F:L=new d8(F.message,{cause:F}),t!=null&&t.throwOnError)throw L}Object.assign(i,I);const M=H?"stay":"enter";let B;if(N)B={...N,cause:M,params:(H==null?void 0:H.params)??i,_strictParams:I,search:Ya(H?H.search:N.search,w),_strictSearch:S};else{const F=b.options.loader||b.options.beforeLoad||b.lazyFn||YM(b)?"pending":"success";B={id:O,ssr:b.options.ssr,index:y,routeId:b.id,params:(H==null?void 0:H.params)??i,_strictParams:I,pathname:A,updatedAt:Date.now(),search:H?Ya(H.search,w):w,_strictSearch:S,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Sc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:H?Qs(H.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||(B.globalNotFound=c===b.id),B.searchError=_;const q=this.getParentContext(v);B.context={...q,...B.__routeContext,...B.__beforeLoadContext},f[y]=B}for(let y=0;y<f.length;y++){const b=f[y],v=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),S=h.get(b.routeId);if(b.params=S?Ya(S.params,i):i,!w){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=Td(t),o={...e.search};for(const p of t)try{Object.assign(o,km(p.options.validateSearch,o))}catch{}const a=Td(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 g of t)try{u_(g,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},Qm=class extends Error{},d8=class extends Error{};function h8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function km(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qm("Async validation not supported");if(n.issues)throw new Qm(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 p8({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=na(e);let o,a;const u=Mz(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 m8({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return g8(n)(e,t,r??!1)}function g8(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,g)=>g(p),u));const h=c(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,g)=>g(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,...km(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:Xs(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 y8(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 wl}function u_(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 b8="Error preloading route! ☝️",WM=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=wl:this.parentRoute||Ho();let i=r?wl:n==null?void 0:n.path;i&&i!=="/"&&(i=BM(i));const o=(n==null?void 0:n.id)||i;let a=r?wl:Cm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Cm(["/",a]));const u=a==="__root__"?"/":Cm([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=na(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=>Zz({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.")}},v8=class extends WM{constructor(e){super(e)}};function x8(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 Tw(e){const t=e.errorComponent??Aw;return R.jsx(w8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var w8=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 Aw({error:e}){const[t,n]=C.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.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"})]}),R.jsx("div",{style:{height:".25rem"}}),t?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?R.jsx("code",{children:e.message}):null})}):null]})}function S8({children:e,fallback:t=null}){return KM()?R.jsx(fa.Fragment,{children:e}):R.jsx(fa.Fragment,{children:t})}function KM(){return fa.useSyncExternalStore(C8,()=>!0,()=>!1)}function C8(){return()=>{}}var XM=C.createContext(null);function Ur(e){return C.useContext(XM)}var Yg=C.createContext(void 0),E8=C.createContext(void 0),nn=(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))(nn||{});function k8({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,p){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const y=g!==void 0?g.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:g,nextDep:y,prevSub:b,nextSub:void 0};y!==void 0&&(y.prevDep=v),g!==void 0?g.nextDep=v:h.deps=v,b!==void 0?b.nextSub=v:f.subs=v}function i(f,h=f.sub){const p=f.dep,g=f.prevDep,y=f.nextDep,b=f.nextSub,v=f.prevSub;return y!==void 0?y.prevDep=g:h.depsTail=g,g!==void 0?g.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 g=f.sub;let y=g.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,g)?(g.flags=y|40,y&=1):y=0:g.flags=y&-9|32:y=0:g.flags=y|32,y&2&&t(g),y&1){const b=g.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,g=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 w=b.subs;w.nextSub!==void 0&&u(w),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,++g;continue}if(!y){const w=f.nextDep;if(w!==void 0){f=w;continue}}for(;g--;){const w=h.subs,S=w.nextSub!==void 0;if(S?(f=p.value,p=p.prev):f=w,y){if(e(h)){S&&u(w),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 R8(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 Y1=[];let Rm=0;const{link:c_,unlink:_8,propagate:T8,checkDirty:QM,shallowPropagate:f_}=k8({update(e){return e._update()},notify(e){Y1[W1++]=e,e.flags&=~nn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=nn.Mutable|nn.Dirty,Zm(e))}});let Np=0,W1=0,qi,K1=0;function ZM(e){try{++K1,e()}finally{--K1||JM()}}function Zm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=_8(n,e)}function JM(){if(!(K1>0)){for(;Np<W1;){const e=Y1[Np];Y1[Np++]=void 0,e.notify()}Np=0,W1=0}}function d_(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?nn.None:nn.Mutable,get(){return qi!==void 0&&c_(i,qi,Rm),i._snapshot},subscribe(o){const a=R8(o),u={current:!1},c=A8(()=>{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=qi,u=(t==null?void 0:t.compare)??Object.is;if(n)qi=i,++Rm,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=nn.Mutable|nn.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{qi=a,n&&(i.flags&=~nn.RecursedCheck),Zm(i)}}};return n?(i.flags=nn.Mutable|nn.Dirty,i.get=function(){const o=i.flags;if(o&nn.Dirty||o&nn.Pending&&QM(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&f_(a)}}else o&nn.Pending&&(i.flags=o&~nn.Pending);return qi!==void 0&&c_(i,qi,Rm),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(T8(a),f_(a),JM())}},i}function A8(e){const t=()=>{const r=qi;qi=n,++Rm,n.depsTail=void 0,n.flags=nn.Watching|nn.RecursedCheck;try{return e()}finally{qi=r,n.flags&=~nn.RecursedCheck,Zm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:nn.Watching|nn.RecursedCheck,notify(){const r=this.flags;r&nn.Dirty||r&nn.Pending&&QM(this.deps,this)?t():this.flags=nn.Watching},stop(){this.flags=nn.None,this.depsTail=void 0,Zm(this)}};return t(),n}var cv={exports:{}},fv={},dv={exports:{}},hv={};/**
|
|
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 h_;function D8(){if(h_)return hv;h_=1;var e=eh();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),v=b[0].inst,w=b[1];return o(function(){v.value=y,v.getSnapshot=g,c(v)&&w({inst:v})},[p,y,g]),i(function(){return c(v)&&w({inst:v}),p(function(){c(v)&&w({inst:v})})},[p]),a(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return hv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,hv}var p_;function e3(){return p_||(p_=1,dv.exports=D8()),dv.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 m_;function M8(){if(m_)return fv;m_=1;var e=eh(),t=e3();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 fv.useSyncExternalStoreWithSelector=function(f,h,p,g,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 S(D){if(!_){if(_=!0,k=D,D=g(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 N=g(D);return y!==void 0&&y(O,N)?(k=D,O):(k=D,T=N)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return S(h())},A===null?void 0:function(){return S(A())}]},[h,p,g,y]);var w=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),c(w),w},fv}var g_;function O8(){return g_||(g_=1,cv.exports=M8()),cv.exports}var t3=O8();function $8(e,t){return e===t}function vr(e,t,n=$8){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 t3.useSyncExternalStoreWithSelector(r,i,i,t,n)}var N8={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Fl(e){const t=Ur(),n=C.useContext(e.from?E8:Yg),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 vr(i??N8,a=>{if((e.shouldThrow??!0)&&!a&&Ho(),a===void 0)return;const u=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=Qs(o.current,u);return o.current=c,c}return u})}function n3(e){return Fl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function r3(e){const{select:t,...n}=e;return Fl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function i3(e){return Fl({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 o3(e){return Fl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function s3(e){const t=Ur();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function a3(e){return Fl({...e,select:t=>e.select?e.select(t.context):t.context})}var On=kM();function P8(e,t){const n=Ur(),r=vz(t),{activeProps:i,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:b,viewTransition:v,children:w,target:S,disabled:_,style:k,className:T,onClick:A,onBlur:D,onFocus:O,onMouseEnter:N,onMouseLeave:H,onTouchStart:I,ignoreBlocker:L,params:M,search:B,hash:q,state:F,mask:j,reloadDocument:z,unsafeRelative:V,from:W,_fromLocation:P,...Y}=e,J=KM(),U=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),se=vr(n.stores.location,De=>De,(De,ue)=>De.href===ue.href),oe=C.useMemo(()=>{const De={_fromLocation:se,...U};return n.buildLocation(De)},[n,se,U]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ve=oe.maskedLocation?oe.maskedLocation.external:oe.external,Re=C.useMemo(()=>B8(he,ve,n.history,_),[_,ve,he,n.history]),ce=C.useMemo(()=>{if(Re!=null&&Re.external)return Wm(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!U8(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Wm(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Re,n.protocolAllowlist]),Ie=C.useMemo(()=>{if(ce)return!1;if(a!=null&&a.exact){if(!Iz(se.pathname,oe.pathname,n.basepath))return!1}else{const De=Km(se.pathname,n.basepath),ue=Km(oe.pathname,n.basepath);if(!(De.startsWith(ue)&&(De.length===ue.length||De[ue.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!xl(se.search,oe.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?J&&se.hash===oe.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,se,ce,J,oe.hash,oe.pathname,oe.search,n.basepath]),Ve=Ie?Xs(i,{})??L8:pv,X=Ie?pv:Xs(o,{})??pv,Z=[T,Ve.className,X.className].filter(Boolean).join(" "),te=(k||Ve.style||X.style)&&{...k,...Ve.style,...X.style},[xe,ge]=C.useState(!1),Ce=C.useRef(!1),le=e.reloadDocument||ce?!1:c??n.options.defaultPreload,re=f??n.options.defaultPreloadDelay??0,me=C.useCallback(()=>{n.preloadRoute({...U,_builtLocation:oe}).catch(De=>{console.warn(De),console.warn(b8)})},[n,U,oe]);bz(r,C.useCallback(De=>{De!=null&&De.isIntersecting&&me()},[me]),z8,{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=S!==void 0?S:ue;if(!_&&!H8(De)&&!De.defaultPrevented&&(!Se||Se==="_self")&&De.button===0){De.preventDefault(),On.flushSync(()=>{ge(!0)});const ke=n.subscribe("onResolved",()=>{ke(),ge(!1)});n.navigate({...U,replace:g,resetScroll:b,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:L})}};if(ce)return{...Y,ref:r,href:ce,...w&&{children:w},...S&&{target:S},..._&&{disabled:_},...k&&{style:k},...T&&{className:T},...A&&{onClick:A},...D&&{onBlur:D},...O&&{onFocus:O},...N&&{onMouseEnter:N},...H&&{onMouseLeave:H},...I&&{onTouchStart:I}};const Oe=De=>{if(_||le!=="intent")return;if(!re){me();return}const ue=De.currentTarget;if(Xf.has(ue))return;const Se=setTimeout(()=>{Xf.delete(ue),me()},re);Xf.set(ue,Se)},Te=De=>{_||le!=="intent"||me()},_e=De=>{if(_||!le||!re)return;const ue=De.currentTarget,Se=Xf.get(ue);Se&&(clearTimeout(Se),Xf.delete(ue))};return{...Y,...Ve,...X,href:Re==null?void 0:Re.href,ref:r,onClick:Nu([A,ae]),onBlur:Nu([D,_e]),onFocus:Nu([O,Oe]),onMouseEnter:Nu([N,Oe]),onMouseLeave:Nu([H,_e]),onTouchStart:Nu([I,Te]),disabled:!!_,target:S,...te&&{style:te},...Z&&{className:Z},..._&&I8,...Ie&&F8,...J&&xe&&j8}}var pv={},L8={className:"active"},I8={role:"link","aria-disabled":!0},F8={"data-status":"active","aria-current":"page"},j8={"data-transitioning":"transitioning"},Xf=new WeakMap,z8={rootMargin:"100px"},Nu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function B8(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function U8(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var jl=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=P8(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 H8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var G8=class extends WM{constructor(t){super(t),this.useMatch=n=>Fl({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>a3({...n,from:this.id}),this.useSearch=n=>o3({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>i3({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>r3({...n,from:this.id}),this.useLoaderData=n=>n3({...n,from:this.id}),this.useNavigate=()=>s3({from:this.fullPath}),this.Link=fa.forwardRef((n,r)=>R.jsx(jl,{ref:r,from:this.fullPath,...n}))}};function q8(e){return new G8(e)}var V8=class extends v8{constructor(e){super(e),this.useMatch=t=>Fl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>a3({...t,from:this.id}),this.useSearch=t=>o3({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>i3({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>r3({...t,from:this.id}),this.useLoaderData=t=>n3({...t,from:this.id}),this.useNavigate=()=>s3({from:this.fullPath}),this.Link=fa.forwardRef((t,n)=>R.jsx(jl,{ref:n,from:this.fullPath,...t}))}};function Y8(e){return new V8(e)}function th(e){return new W8(e,{silent:!0}).createRoute}var W8=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=q8(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function K8(e){const t=Ur(),n=`not-found-${vr(t.stores.location,r=>r.pathname)}-${vr(t.stores.status,r=>r)}`;return R.jsx(Tw,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(Yn(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Yn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function X8(){return R.jsx("p",{children:"Not Found"})}function Bu(e){return R.jsx(R.Fragment,{children:e.children})}function l3(e,t,n){return t.options.notFoundComponent?R.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?R.jsx(e.options.defaultNotFoundComponent,{...n}):R.jsx(X8,{})}function Q8(e){return null}function Z8(){return Q8(Ur()),null}var u3=C.memo(function({matchId:t}){const n=Ur(),r=n.stores.matchStores.get(t);r||Ho();const i=vr(n.stores.loadedAt,a=>a),o=vr(r,a=>a);return R.jsx(J8,{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 J8({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?R.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:Bu,g=u?Tw:Bu,y=f?K8:Bu;return R.jsxs(i.isRoot?i.options.shellComponent??Bu:Bu,{children:[R.jsx(Yg.Provider,{value:t,children:R.jsx(p,{fallback:a,children:R.jsx(g,{getResetKey:()=>n,errorComponent:u||Aw,onCatch:(w,S)=>{if(Yn(w))throw w.routeId??(w.routeId=r.routeId),w;c==null||c(w,S)},children:R.jsx(y,{fallback:w=>{if(w.routeId??(w.routeId=r.routeId),!f||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return C.createElement(f,w)},children:h||r._displayPending?R.jsx(S8,{fallback:a,children:R.jsx(y_,{matchId:t})}):R.jsx(y_,{matchId:t})})})})}),r.parentRouteId===wl?R.jsxs(R.Fragment,{children:[R.jsx(e7,{resetKey:n}),e.options.scrollRestoration&&FM?R.jsx(Z8,{}):null]}):null]})}function e7({resetKey:e}){const t=Ur(),n=C.useRef(void 0);return ld(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Xu(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var y_=C.memo(function({matchId:t}){const n=Ur(),r=(h,p)=>{var g;return((g=n.getMatch(h.id))==null?void 0:g._nonReactive[p])??h._nonReactive[p]},i=n.stores.matchStores.get(t);i||Ho();const o=vr(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?R.jsx(h,{},c):R.jsx(Dw,{})},[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 g=Sc();p._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Yn(o.error)||Ho(),l3(n,u,o.error);if(o.status==="redirected")throw yr(o.error)||Ho(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),Dw=C.memo(function(){const t=Ur(),n=C.useContext(Yg);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=vr(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=vr(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?R.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Ho(),l3(t,a,void 0);if(!o)return null;const c=R.jsx(u3,{matchId:o});return r===wl?R.jsx(C.Suspense,{fallback:u,children:c}):c});function t7(){const e=Ur(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=vr(e.stores.isLoading,p=>p),o=vr(e.stores.hasPending,p=>p),a=nv(i),u=i||n||o,c=nv(u),f=i||o,h=nv(f);return e.startTransition=p=>{r(!0),C.startTransition(()=>{p(),r(!1)})},C.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return na(e.latestLocation.publicHref)!==na(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),ld(()=>{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(g){console.error(g)}})()},[e]),ld(()=>{a&&!i&&e.emit({type:"onLoad",...Xu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),ld(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Xu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),ld(()=>{if(c&&!u){const p=Xu(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),ZM(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&x8(e)}},[u,c,e]),null}function n7(){const e=Ur(),t=e.routesById[wl].options.pendingComponent??e.options.defaultPendingComponent,n=t?R.jsx(t,{}):null,r=R.jsxs(typeof document<"u"&&e.ssr?Bu:C.Suspense,{fallback:n,children:[R.jsx(t7,{}),R.jsx(r7,{})]});return e.options.InnerWrap?R.jsx(e.options.InnerWrap,{children:r}):r}function r7(){const e=Ur(),t=vr(e.stores.firstId,i=>i),n=vr(e.stores.loadedAt,i=>i),r=t?R.jsx(u3,{matchId:t}):null;return R.jsx(Yg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:R.jsx(Tw,{getResetKey:()=>n,errorComponent:Aw,onCatch:void 0,children:r})})}var i7=e=>({createMutableStore:d_,createReadonlyStore:d_,batch:ZM}),o7=e=>new s7(e),s7=class extends f8{constructor(e){super(e,i7)}};function a7({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=R.jsx(XM.Provider,{value:e,children:t});return e.options.Wrap?R.jsx(e.options.Wrap,{children:r}):r}function l7({router:e,...t}){return R.jsx(a7,{router:e,...t,children:R.jsx(n7,{})})}function u7(e){const t=Ur({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return vr(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Qs(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function c3(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=c3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mv(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=c3(e))&&(r&&(r+=" "),r+=t);return r}const b_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,c7=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"](mv(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(mv(o)):mv(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(g=>{const y=o==null?void 0:o[g],b=c==null?void 0:c[g],v=b_(y)||b_(b);return u[g][v]}),h={...c,...o&&Object.entries(o).reduce((g,y)=>{let[b,v]=y;return typeof v>"u"?g:{...g,[b]:v}},{})},p=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((g,y)=>{let{class:b,className:v,...w}=y;return Object.entries(w).every(S=>{let[_,k]=S;const T=h[_];return Array.isArray(k)?k.includes(T):T===k})?[...g,b,v]:g},[]);return t(i==null?void 0:i.base,f,p,o==null?void 0:o.class,o==null?void 0:o.className)},cx:t}},f7=(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},d7=(e,t)=>({classGroupId:e,validator:t}),f3=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jm="-",v_=[],h7="arbitrary..",p7=e=>{const t=g7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return m7(a);const u=a.split(Jm),c=u[0]===""&&u.length>1?1:0;return d3(u,c,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?f7(f,c):c:f||v_}return n[a]||v_}}},d3=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=d3(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join(Jm):e.slice(t).join(Jm),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},m7=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?h7+r:void 0})(),g7=e=>{const{theme:t,classGroups:n}=e;return y7(n,t)},y7=(e,t)=>{const n=f3();for(const r in e){const i=e[r];Mw(i,n,r,t)}return n},Mw=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];b7(a,t,n,r)}},b7=(e,t,n,r)=>{if(typeof e=="string"){v7(e,t,n);return}if(typeof e=="function"){x7(e,t,n,r);return}w7(e,t,n,r)},v7=(e,t,n)=>{const r=e===""?t:h3(t,e);r.classGroupId=n},x7=(e,t,n,r)=>{if(S7(e)){Mw(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(d7(n,e))},w7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];Mw(c,h3(t,u),n,r)}},h3=(e,t)=>{let n=e;const r=t.split(Jm),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=f3(),n.nextPart.set(a,u)),n=u}return n},S7=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,C7=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)}}},X1="!",x_=":",E7=[],w_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),k7=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 w=i[v];if(a===0&&u===0){if(w===x_){o.push(i.slice(c,v)),c=v+1;continue}if(w==="/"){f=v;continue}}w==="["?a++:w==="]"?a--:w==="("?u++:w===")"&&u--}const p=o.length===0?i:i.slice(c);let g=p,y=!1;p.endsWith(X1)?(g=p.slice(0,-1),y=!0):p.startsWith(X1)&&(g=p.slice(1),y=!0);const b=f&&f>c?f-c:void 0;return w_(o,y,g,b)};if(t){const i=t+x_,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):w_(E7,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},R7=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}},_7=e=>({cache:C7(e.cacheSize),parseClassName:k7(e),sortModifiers:R7(e),...p7(e)}),T7=/\s+/,A7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],u=e.trim().split(T7);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:v}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let w=!!v,S=r(w?b.substring(0,v):b);if(!S){if(!w){c=h+(c.length>0?" "+c:c);continue}if(S=r(b),!S){c=h+(c.length>0?" "+c:c);continue}w=!1}const _=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=y?_+X1:_,T=k+S;if(a.indexOf(T)>-1)continue;a.push(T);const A=i(S,w);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},D7=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=p3(n))&&(i&&(i+=" "),i+=r);return i},p3=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=p3(e[r]))&&(n&&(n+=" "),n+=t);return n},M7=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=_7(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=A7(c,n);return i(c,h),h};return o=a,(...c)=>o(D7(...c))},O7=[],wn=e=>{const t=n=>n[e]||O7;return t.isThemeGetter=!0,t},m3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,g3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$7=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,N7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P7=/\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$/,L7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,I7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=e=>$7.test(e),dt=e=>!!e&&!Number.isNaN(Number(e)),Ts=e=>!!e&&Number.isInteger(Number(e)),gv=e=>e.endsWith("%")&&dt(e.slice(0,-1)),To=e=>N7.test(e),y3=()=>!0,j7=e=>P7.test(e)&&!L7.test(e),Ow=()=>!1,z7=e=>I7.test(e),B7=e=>F7.test(e),U7=e=>!Be(e)&&!Ge(e),H7=e=>pa(e,x3,Ow),Be=e=>m3.test(e),Wa=e=>pa(e,w3,j7),S_=e=>pa(e,Q7,dt),G7=e=>pa(e,C3,y3),q7=e=>pa(e,S3,Ow),C_=e=>pa(e,b3,Ow),V7=e=>pa(e,v3,B7),Pp=e=>pa(e,E3,z7),Ge=e=>g3.test(e),Qf=e=>zl(e,w3),Y7=e=>zl(e,S3),E_=e=>zl(e,b3),W7=e=>zl(e,x3),K7=e=>zl(e,v3),Lp=e=>zl(e,E3,!0),X7=e=>zl(e,C3,!0),pa=(e,t,n)=>{const r=m3.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zl=(e,t,n=!1)=>{const r=g3.exec(e);return r?r[1]?t(r[1]):n:!1},b3=e=>e==="position"||e==="percentage",v3=e=>e==="image"||e==="url",x3=e=>e==="length"||e==="size"||e==="bg-size",w3=e=>e==="length",Q7=e=>e==="number",S3=e=>e==="family-name",C3=e=>e==="number"||e==="weight",E3=e=>e==="shadow",Z7=()=>{const e=wn("color"),t=wn("font"),n=wn("text"),r=wn("font-weight"),i=wn("tracking"),o=wn("leading"),a=wn("breakpoint"),u=wn("container"),c=wn("spacing"),f=wn("radius"),h=wn("shadow"),p=wn("inset-shadow"),g=wn("text-shadow"),y=wn("drop-shadow"),b=wn("blur"),v=wn("perspective"),w=wn("aspect"),S=wn("ease"),_=wn("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,Be],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],N=()=>[Ge,Be,c],H=()=>[_s,"full","auto",...N()],I=()=>[Ts,"none","subgrid",Ge,Be],L=()=>["auto",{span:["full",Ts,Ge,Be]},Ts,Ge,Be],M=()=>[Ts,"auto",Ge,Be],B=()=>["auto","min","max","fr",Ge,Be],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...N()],z=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],V=()=>[_s,"screen","full","dvw","lvw","svw","min","max","fit",...N()],W=()=>[_s,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],P=()=>[e,Ge,Be],Y=()=>[...T(),E_,C_,{position:[Ge,Be]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",W7,H7,{size:[Ge,Be]}],se=()=>[gv,Qf,Wa],oe=()=>["","none","full",f,Ge,Be],he=()=>["",dt,Qf,Wa],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,gv,E_,C_],Ie=()=>["","none",b,Ge,Be],Ve=()=>["none",dt,Ge,Be],X=()=>["none",dt,Ge,Be],Z=()=>[dt,Ge,Be],te=()=>[_s,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[To],breakpoint:[To],color:[y3],container:[To],"drop-shadow":[To],ease:["in","out","in-out"],font:[U7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[To],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[To],shadow:[To],spacing:["px",dt],text:[To],"text-shadow":[To],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,Be,Ge,w]}],container:["container"],columns:[{columns:[dt,Be,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:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ts,"auto",Ge,Be]}],basis:[{basis:[_s,"full","auto",u,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,_s,"auto","initial","none",Be]}],grow:[{grow:["",dt,Ge,Be]}],shrink:[{shrink:["",dt,Ge,Be]}],order:[{order:[Ts,"first","last","none",Ge,Be]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:L()}],"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":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[u,"screen",...z()]}],"min-w":[{"min-w":[u,"screen","none",...z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,Qf,Wa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,X7,G7]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gv,Be]}],"font-family":[{font:[Y7,q7,t]}],"font-features":[{"font-features":[Be]}],"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,Be]}],"line-clamp":[{"line-clamp":[dt,"none",Ge,S_]}],leading:[{leading:[o,...N()]}],"list-image":[{"list-image":["none",Ge,Be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",Ge,Wa]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[dt,"auto",Ge,Be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,Be]}],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,Be]}],"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:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ts,Ge,Be],radial:["",Ge,Be],conic:[Ts,Ge,Be]},K7,V7]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"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:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,Ge,Be]}],"outline-w":[{outline:["",dt,Qf,Wa]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",h,Lp,Pp]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,Lp,Pp]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[dt,Wa]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",g,Lp,Pp]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[dt,Ge,Be]}],"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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Ge,Be]}],"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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"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:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Be]}],filter:[{filter:["","none",Ge,Be]}],blur:[{blur:Ie()}],brightness:[{brightness:[dt,Ge,Be]}],contrast:[{contrast:[dt,Ge,Be]}],"drop-shadow":[{"drop-shadow":["","none",y,Lp,Pp]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",dt,Ge,Be]}],"hue-rotate":[{"hue-rotate":[dt,Ge,Be]}],invert:[{invert:["",dt,Ge,Be]}],saturate:[{saturate:[dt,Ge,Be]}],sepia:[{sepia:["",dt,Ge,Be]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Be]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[dt,Ge,Be]}],"backdrop-contrast":[{"backdrop-contrast":[dt,Ge,Be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,Ge,Be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,Ge,Be]}],"backdrop-invert":[{"backdrop-invert":["",dt,Ge,Be]}],"backdrop-opacity":[{"backdrop-opacity":[dt,Ge,Be]}],"backdrop-saturate":[{"backdrop-saturate":[dt,Ge,Be]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,Ge,Be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,Be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",Ge,Be]}],ease:[{ease:["linear","initial",S,Ge,Be]}],delay:[{delay:[dt,Ge,Be]}],animate:[{animate:["none",_,Ge,Be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ge,Be]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Ve()}],"rotate-x":[{"rotate-x":Ve()}],"rotate-y":[{"rotate-y":Ve()}],"rotate-z":[{"rotate-z":Ve()}],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,Be,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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,Be]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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,Be]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[dt,Qf,Wa,S_]}],stroke:[{stroke:["none",...P()]}],"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"]}},J7=M7(Z7),k3=c7({hooks:{onComplete:e=>J7(e)}}),Sr=k3.cva;function ze(...e){const t=k3.cx(...e);return t.trim()?t:void 0}const R3=({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),eB=["evenly","fullwidth","fullheight","fullscreen"],tB=["ax","ay","direction"],nB={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},rB={property:"alignItems",values:["baseline","center","end","start","stretch"]},iB={property:"flexDirection",values:["column","row"]},oB=["b","bx","bl","br","by","bt","bb"],sB={property:"borderWidth"},aB={property:"borderInlineWidth"},lB={property:"borderInlineStartWidth"},uB={property:"borderInlineEndWidth"},cB={property:"borderBlockWidth"},fB={property:"borderBlockStartWidth"},dB={property:"borderBlockEndWidth"},hB=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],pB={property:"gap",unit:{variable:"--spacing-unit"}},mB={property:"margin",unit:{variable:"--spacing-unit"}},gB={property:"marginInline",unit:{variable:"--spacing-inline"}},yB={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},bB={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},vB={property:"marginBlock",unit:{variable:"--spacing-block"}},xB={property:"marginBlockStart",unit:{variable:"--spacing-block"}},wB={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},SB={property:"padding",unit:{variable:"--spacing-unit"}},CB={property:"paddingInline",unit:{variable:"--spacing-inline"}},EB={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},kB={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},RB={property:"paddingBlock",unit:{variable:"--spacing-block"}},_B={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},TB={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},AB=["w","minw","maxw","h","minh","maxh"],DB={property:"width"},MB={property:"minWidth"},OB={property:"maxWidth"},$B={property:"height"},NB={property:"minHeight"},PB={property:"maxHeight"},_3={b:sB,bx:aB,bl:lB,br:uB,by:cB,bt:fB,bb:dB,ax:nB,ay:rB,direction:iB,gap:pB,m:mB,mx:gB,ml:yB,mr:bB,my:vB,mt:xB,mb:wB,p:SB,px:CB,pl:EB,pr:kB,py:RB,pt:_B,pb:TB,w:DB,minw:MB,maxw:OB,h:$B,minh:NB,maxh:PB},LB=Object.keys(_3);({...Object.fromEntries(hB.map(e=>[e,"spacing"])),...Object.fromEntries(tB.map(e=>[e,"layout"])),...Object.fromEntries(AB.map(e=>[e,"sizing"])),...Object.fromEntries(oB.map(e=>[e,"border"])),...Object.fromEntries(eB.map(e=>[e,"toggle"]))});function T3({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=_3[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 IB="_box_1f7bt_1",Os={box:IB,"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"},FB=Sr({variants:{bordered:{true:Os["toggle-bordered"]},evenly:{true:Os["toggle-evenly"]},rounded:{true:Os["toggle-rounded"]},square:{true:Os["toggle-square"]},fullheight:{true:Os["toggle-fullheight"]},fullwidth:{true:Os["toggle-fullwidth"]},fullscreen:{true:Os["toggle-fullscreen"]}}}),Go=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:u,className:c,children:f,...h})=>{const p=T3({componentName:"box",styleProps:LB,props:h});return R3({fallbackElement:"div",props:{...p,className:ze(Os.box,FB({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:u,children:f})};Go.displayName="Box";function yi({condition:e,render:t,children:n}){if(!e||!t)return R.jsx(R.Fragment,{children:n});const r=n??t.props.children;return C.cloneElement(t,void 0,r)}yi.displayName="ConditionalRender";const jB="_group_h0evt_1",zB={group:jB},Ke=({className:e,...t})=>R.jsx(Go,{"data-slot":"group",className:ze(zB.group,e),...t});Ke.displayName="Group";const BB="_layer_hu2g5_1",UB={layer:BB},$w=({offset:e,className:t,style:n,children:r,...i})=>{const o={...n,...(e==null?void 0:e.x)!==void 0&&{"--layer-offset-x":`${e.x}px`},...(e==null?void 0:e.y)!==void 0&&{"--layer-offset-y":`${e.y}px`}};return R.jsx(Go,{"data-slot":"layer",className:ze(UB.layer,t),style:o,...i,children:r})};$w.displayName="Layer";const HB="_text_opfqd_3",GB="_colored_opfqd_138",mt={text:HB,"text-size--1":"_text-size--1_opfqd_25","text-size-0":"_text-size-0_opfqd_31","text-size-1":"_text-size-1_opfqd_37","text-size-2":"_text-size-2_opfqd_43","text-size-3":"_text-size-3_opfqd_51","text-size-4":"_text-size-4_opfqd_59","text-size-5":"_text-size-5_opfqd_67","text-size-6":"_text-size-6_opfqd_75","shade-background":"_shade-background_opfqd_84","shade-surface":"_shade-surface_opfqd_87","shade-accent":"_shade-accent_opfqd_90","shade-halftone":"_shade-halftone_opfqd_93","shade-muted":"_shade-muted_opfqd_96","shade-foreground":"_shade-foreground_opfqd_99","color-red":"_color-red_opfqd_104","color-orange":"_color-orange_opfqd_108","color-yellow":"_color-yellow_opfqd_112","color-green":"_color-green_opfqd_116","color-blue":"_color-blue_opfqd_120","color-indigo":"_color-indigo_opfqd_124","color-purple":"_color-purple_opfqd_128","color-neutral":"_color-neutral_opfqd_132",colored:GB,"toggle-underline":"_toggle-underline_opfqd_145","toggle-no-underline":"_toggle-no-underline_opfqd_149","toggle-strikethrough":"_toggle-strikethrough_opfqd_153","toggle-balance":"_toggle-balance_opfqd_157","toggle-truncate":"_toggle-truncate_opfqd_161","family-mono":"_family-mono_opfqd_169","family-serif":"_family-serif_opfqd_173","family-sans":"_family-sans_opfqd_177","weight-thin":"_weight-thin_opfqd_181","weight-light":"_weight-light_opfqd_184","weight-normal":"_weight-normal_opfqd_187","weight-medium":"_weight-medium_opfqd_190","weight-semibold":"_weight-semibold_opfqd_193","weight-bold":"_weight-bold_opfqd_196"},Nw={red:mt["color-red"],orange:mt["color-orange"],yellow:mt["color-yellow"],green:mt["color-green"],blue:mt["color-blue"],indigo:mt["color-indigo"],purple:mt["color-purple"],neutral:mt["color-neutral"]},qB=mt.colored,VB=Object.fromEntries(Object.entries(Nw).map(([e,t])=>[e,`${t} ${qB}`])),YB=Sr({variants:{strikethrough:{true:mt["toggle-strikethrough"]},balance:{true:mt["toggle-balance"]},truncate:{true:mt["toggle-truncate"]},underline:{true:mt["toggle-underline"],false:mt["toggle-no-underline"]},family:{mono:mt["family-mono"],serif:mt["family-serif"],sans:mt["family-sans"]},weight:{thin:mt["weight-thin"],light:mt["weight-light"],normal:mt["weight-normal"],medium:mt["weight-medium"],semibold:mt["weight-semibold"],bold:mt["weight-bold"]},shade:{background:mt["shade-background"],surface:mt["shade-surface"],accent:mt["shade-accent"],halftone:mt["shade-halftone"],muted:mt["shade-muted"],foreground:mt["shade-foreground"]},color:VB,size:{[-1]:mt["text-size--1"],0:mt["text-size-0"],1:mt["text-size-1"],2:mt["text-size-2"],3:mt["text-size-3"],4:mt["text-size-4"],5:mt["text-size-5"],6:mt["text-size-6"]}}}),WB=0,KB="sans",Pe=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,truncate:a,size:u=WB,family:c=KB,render:f,className:h,children:p,...g})=>{const y=T3({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:g});return R3({fallbackElement:"span",props:{...y,className:ze(mt.text,YB({shade:e,color:t,size:u,weight:n,family:c,balance:o,truncate:a,underline:r,strikethrough:i}),h)},render:f,children:p})},XB="_stack_1svur_1",QB={stack:XB},Ye=({ax:e,ay:t,className:n,...r})=>R.jsx(Go,{"data-slot":"stack",ax:t,ay:e,className:ze(QB.stack,n),...r});Ye.displayName="Stack";const Pw=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return R.jsx(R.Fragment,{children:n});const o=n??i.props.children;return C.cloneElement(i,r,o)};Pw.displayName="SwitchRender";const ZB="_separator_1u3u3_1",JB="_line_1u3u3_34",si={separator:ZB,"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:JB,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},k_=Sr({variants:{orientation:{horizontal:si["orientation-horizontal"],vertical:si["orientation-vertical"]},shade:{background:si["shade-background"],surface:si["shade-surface"],accent:si["shade-accent"],halftone:si["shade-halftone"],muted:si["shade-muted"],foreground:si["shade-foreground"]}}}),R_={};function A3(e,t){const n=C.useRef(R_);return n.current===R_&&(n.current=e(t)),n}function __(e,t,n,r){const i=A3(D3).current;return t9(i,e,t,n,r)&&M3(i,[e,t,n,r]),i.callback}function e9(e){const t=A3(D3).current;return n9(t,e)&&M3(t,e),t.callback}function D3(){return{callback:null,cleanup:null,refs:[]}}function t9(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function n9(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function M3(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 r9=parseInt(C.version,10);function i9(e){return r9>=e}function T_(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(i9(19)?n==null?void 0:n.ref:t.ref)??null}function Q1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function o9(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 s9(e,t){return typeof e=="function"?e(t):e}function a9(e,t){return typeof e=="function"?e(t):e}const Uu=Object.freeze({}),cd={};function l9(e,t,n,r,i){let o={...Z1(e,cd)};return t&&(o=O3(o,t)),o}function u9(e){if(e.length===0)return cd;if(e.length===1)return Z1(e[0],cd);let t={...Z1(e[0],cd)};for(let n=1;n<e.length;n+=1)t=O3(t,e[n]);return t}function O3(e,t){return $3(t)?t(e):c9(e,t)}function c9(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Q1(e.style,r);break}case"className":{e[n]=N3(e.className,r);break}default:f9(n,r)?e[n]=d9(e[n],r):e[n]=r}}return e}function f9(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 $3(e){return typeof e=="function"}function Z1(e,t){return $3(e)?e(t):e??cd}function d9(e,t){return t?e?n=>{if(p9(n)){const i=n;h9(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 h9(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function N3(e,t){return t?e?t+" "+e:t:e}function p9(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function m9(e,t,n={}){const r=t.render,i=g9(t,n);if(n.enabled===!1)return null;const o=n.state??Uu;return b9(e,r,i,o)}function g9(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Uu,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?s9(n,o):void 0,p=f?a9(r,o):void 0,g=f?o9(o,c):Uu,y=f?Q1(g,Array.isArray(u)?u9(u):u)??Uu:Uu;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=e9([y.ref,T_(i),...a]):y.ref=__(y.ref,T_(i),a):__(null,null)),f?(h!==void 0&&(y.className=N3(y.className,h)),p!==void 0&&(y.style=Q1(y.style,p)),y):Uu}const y9=Symbol.for("react.lazy");function b9(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=l9(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===y9&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}return v9(e,n)}function v9(e,t){return C.createElement(e,t)}const x9=C.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return m9("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),Lw=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=ze(si.separator,si.line,si[`line-${t}`],k_({shade:e}));return R.jsxs(Pw,{condition:t==="horizontal",render:{true:R.jsx(Ke,{ay:"center",gap:2,fullwidth:!0}),false:R.jsx(Ye,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[R.jsx(Go,{className:a}),R.jsx(yi,{condition:typeof r=="string",render:R.jsx(Pe,{shade:"muted",weight:"bold"}),children:r}),R.jsx(Go,{className:a})]})}return R.jsx(x9,{"data-slot":"separator",render:i??R.jsx(Go,{}),className:ze(si.separator,k_({shade:e,orientation:t}),n),"data-orientation":t,...o})};Lw.displayName="Separator";const w9="_button_4h2ty_3 _disabled_dkczp_2",S9="_fullwidth_4h2ty_138",dr={button:w9,"button-content-container":"_button-content-container_4h2ty_46","button-spinner":"_button-spinner_4h2ty_58","variant-subtle":"_variant-subtle_4h2ty_72","variant-ghost":"_variant-ghost_4h2ty_81","variant-inverted":"_variant-inverted_4h2ty_91","size-xsmall":"_size-xsmall_4h2ty_101","size-small":"_size-small_4h2ty_107","size-medium":"_size-medium_4h2ty_112","size-large":"_size-large_4h2ty_117","shape-pill":"_shape-pill_4h2ty_123","shape-square":"_shape-square_4h2ty_127","shape-circle":"_shape-circle_4h2ty_132",fullwidth:S9},C9="medium",E9=Sr({variants:{shape:{pill:dr["shape-pill"],square:dr["shape-square"],circle:dr["shape-circle"]},fullwidth:{true:dr.fullwidth},variant:{subtle:dr["variant-subtle"],ghost:dr["variant-ghost"],inverted:dr["variant-inverted"]},size:{xsmall:dr["size-xsmall"],small:dr["size-small"],medium:dr["size-medium"],large:dr["size-large"]}},defaultVariants:{size:C9}}),P3=({loading:e,children:t,...n})=>R.jsx(Ke,{"data-slot":"button-content-container",className:dr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});P3.displayName="ButtonContentContainer";function k9(){return typeof window<"u"}function R9(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _9(e){return k9()?e instanceof HTMLElement||e instanceof R9(e).HTMLElement:!1}const A_={};function Iw(e,t){const n=C.useRef(A_);return n.current===A_&&(n.current=e(t)),n}const yv=ha[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],T9=yv&&yv!==C.useLayoutEffect?yv:e=>e();function J1(e){const t=Iw(A9).current;return t.next=e,T9(t.effect),t.trampoline}function A9(){const e={next:void 0,callback:D9,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function D9(){}const M9={...ha},O9=()=>{},ex=typeof document<"u"?C.useLayoutEffect:O9;function Fw(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 $9=C.createContext(void 0);function L3(e=!1){const t=C.useContext($9);if(t===void 0&&!e)throw new Error(Fw(16));return t}function N9(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 tx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const fd={};function I3(e,t,n,r,i){let o={...nx(e,fd)};return t&&(o=_m(o,t)),n&&(o=_m(o,n)),r&&(o=_m(o,r)),o}function P9(e){if(e.length===0)return fd;if(e.length===1)return nx(e[0],fd);let t={...nx(e[0],fd)};for(let n=1;n<e.length;n+=1)t=_m(t,e[n]);return t}function _m(e,t){return F3(t)?t(e):L9(e,t)}function L9(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=tx(e.style,r);break}case"className":{e[n]=j3(e.className,r);break}default:I9(n,r)?e[n]=F9(e[n],r):e[n]=r}}return e}function I9(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 F3(e){return typeof e=="function"}function nx(e,t){return F3(e)?e(t):e??fd}function F9(e,t){return t?e?n=>{if(j9(n)){const i=n;rx(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 rx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function j3(e,t){return t?e?t+" "+e:t:e}function j9(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function z3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=L3(!0)!==void 0,u=J1(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=N9({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;z9(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);ex(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:S,..._}=g;return I3({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||(rx(k),w==null||w(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||(rx(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}S==null||S(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=J1(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function z9(e){return _9(e)&&e.tagName==="BUTTON"}function ix(e,t,n,r){const i=Iw(B3).current;return U9(i,e,t,n,r)&&U3(i,[e,t,n,r]),i.callback}function B9(e){const t=Iw(B3).current;return H9(t,e)&&U3(t,e),t.callback}function B3(){return{callback:null,cleanup:null,refs:[]}}function U9(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function H9(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function U3(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 G9=parseInt(C.version,10);function q9(e){return G9>=e}function D_(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(q9(19)?n==null?void 0:n.ref:t.ref)??null}function V9(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 Y9(e,t){return typeof e=="function"?e(t):e}function W9(e,t){return typeof e=="function"?e(t):e}const M_=Object.freeze([]),Is=Object.freeze({});function jw(e,t,n={}){const r=t.render,i=K9(t,n);if(n.enabled===!1)return null;const o=n.state??Is;return Q9(e,r,i,o)}function K9(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Is,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Y9(n,o):void 0,p=f?W9(r,o):void 0,g=f?V9(o,c):Is,y=f?tx(g,Array.isArray(u)?P9(u):u)??Is:Is;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=B9([y.ref,D_(i),...a]):y.ref=ix(y.ref,D_(i),a):ix(null,null)),f?(h!==void 0&&(y.className=j3(y.className,h)),p!==void 0&&(y.style=tx(y.style,p)),y):Is}const X9=Symbol.for("react.lazy");function Q9(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=I3(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===X9&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Z9(e,n);throw new Error(Fw(8))}function Z9(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 J9=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}=z3({disabled:i,focusableWhenDisabled:o,native:a});return jw("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 H3=(...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 eU=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 tU=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 O_=e=>{const t=tU(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 nU={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 rU=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 iU=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,...nU,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:H3("lucide",i),...!o&&!rU(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 st=(e,t)=>{const n=C.forwardRef(({className:r,...i},o)=>C.createElement(iU,{ref:o,iconNode:t,className:H3(`lucide-${eU(O_(e))}`,`lucide-${e}`,r),...i}));return n.displayName=O_(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 oU=[["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"}]],sU=st("archive-restore",oU);/**
|
|
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 aU=[["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"}]],lU=st("archive",aU);/**
|
|
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 uU=[["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"}]],cU=st("arrow-left-right",uU);/**
|
|
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 fU=[["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"}]],dU=st("case-sensitive",fU);/**
|
|
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 hU=[["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"}]],pU=st("chart-gantt",hU);/**
|
|
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 mU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zw=st("check",mU);/**
|
|
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 gU=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],yU=st("chevrons-up-down",gU);/**
|
|
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 bU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vU=st("circle-check",bU);/**
|
|
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 xU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],wU=st("circle-dot",xU);/**
|
|
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 SU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],CU=st("circle-question-mark",SU);/**
|
|
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 EU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],kU=st("circle-x",EU);/**
|
|
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 RU=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],G3=st("clock",RU);/**
|
|
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 _U=[["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"}]],Bw=st("copy",_U);/**
|
|
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 TU=[["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"}]],AU=st("cpu",TU);/**
|
|
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 DU=[["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"}]],MU=st("ellipsis",DU);/**
|
|
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 OU=[["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"}]],$U=st("eye-off",OU);/**
|
|
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 NU=[["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"}]],PU=st("eye",NU);/**
|
|
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 LU=[["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"}]],q3=st("file-diff",LU);/**
|
|
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 IU=[["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"}]],V3=st("files",IU);/**
|
|
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 FU=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],jU=st("git-branch",FU);/**
|
|
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 zU=[["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"}]],BU=st("grip-vertical",zU);/**
|
|
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 UU=[["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"}]],HU=st("group",UU);/**
|
|
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 GU=[["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"}]],qU=st("handshake",GU);/**
|
|
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 VU=[["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"}]],YU=st("hourglass",VU);/**
|
|
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 WU=[["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"}]],KU=st("message-square-more",WU);/**
|
|
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 XU=[["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"}]],QU=st("message-square",XU);/**
|
|
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 ZU=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],JU=st("messages-square",ZU);/**
|
|
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 eH=[["path",{d:"M5 12h14",key:"1ays0h"}]],tH=st("minus",eH);/**
|
|
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 nH=[["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"}]],rH=st("monitor",nH);/**
|
|
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 iH=[["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"}]],oH=st("moon",iH);/**
|
|
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 sH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],aH=st("panel-right",sH);/**
|
|
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 lH=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uH=st("pencil",lH);/**
|
|
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 cH=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],fH=st("play",cH);/**
|
|
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 dH=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hH=st("search",dH);/**
|
|
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 pH=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],mH=st("sparkles",pH);/**
|
|
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 gH=[["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"}]],yH=st("sun",gH);/**
|
|
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 bH=[["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"}]],vH=st("tags",bH);/**
|
|
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 xH=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],wH=st("terminal",xH);/**
|
|
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 SH=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],$_=st("text-wrap",SH);/**
|
|
302
|
+
* @license lucide-react v0.564.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const CH=[["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"}]],EH=st("trash-2",CH);/**
|
|
307
|
+
* @license lucide-react v0.564.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const kH=[["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"}]],RH=st("triangle-alert",kH);/**
|
|
312
|
+
* @license lucide-react v0.564.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const _H=[["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"}]],Y3=st("wrench",_H),W3=({size:e=14,fill:t="currentColor",...n})=>R.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[R.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}),R.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:R.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});W3.displayName="LoadingSpinner";const K3=({loading:e,...t})=>R.jsx(W3,{"data-slot":"button-spinner",className:dr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});K3.displayName="ButtonSpinner";const TH="_card_hf4ip_3",nh={card:TH,"card-thumbnail":"_card-thumbnail_hf4ip_39","card-header-cell":"_card-header-cell_hf4ip_51","card-icon":"_card-icon_hf4ip_55","card-action":"_card-action_hf4ip_61"},X3=({gap:e=3,className:t,children:n,...r})=>R.jsx(Ye,{"data-slot":"card-container",gap:e,className:ze(nh.card,t),...r,children:n});X3.displayName="CardContainer";const Q3=({className:e,children:t,...n})=>R.jsx(Ye,{"data-slot":"card-thumbnail",className:ze(nh["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});Q3.displayName="CardThumbnail";const Z3=({children:e,...t})=>R.jsx(Ke,{"data-slot":"card-header",ay:"start",gap:3,fullwidth:!0,...t,children:e});Z3.displayName="CardHeader";const J3=({icon:e,render:t,className:n})=>R.jsx(yi,{condition:!!t,render:t,children:e?R.jsx(e,{"data-slot":"card-icon",className:ze(nh["card-icon"],n)}):null});J3.displayName="CardIcon";const e4=({children:e,...t})=>R.jsx(Pe,{"data-slot":"card-title",render:R.jsx("h3",{}),size:1,weight:"semibold",...t,children:e});e4.displayName="CardTitle";const t4=({children:e,className:t,...n})=>R.jsx(Ke,{"data-slot":"card-action",className:ze(nh["card-action"],t),gap:2,...n,children:e});t4.displayName="CardAction";const n4=({children:e,...t})=>R.jsx(Pe,{"data-slot":"card-description",render:R.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});n4.displayName="CardDescription";const r4=({children:e,...t})=>R.jsxs(R.Fragment,{children:[R.jsx(Lw,{}),R.jsx(Ke,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e})]});r4.displayName="CardFooter";const dn=({title:e,description:t,thumbnail:n,icon:r,action:i,footer:o,ContainerProps:a,HeaderProps:u,TitleProps:c,DescriptionProps:f,IconProps:h,ActionProps:p,FooterProps:g,ThumbnailProps:y,InnerContainerProps:b,children:v,...w})=>{const S=(f==null?void 0:f.children)||t,_=(c==null?void 0:c.children)||e,k=(p==null?void 0:p.children)||i,T=(h==null?void 0:h.icon)||r,A=!!T,D=!!_,O=!!k,N=!!S,H=A||D||O;return R.jsxs(X3,{...w,...a,children:[n&&R.jsx(Q3,{mb:2,...y,children:n}),(H||N)&&R.jsxs(yi,{condition:H&&N,render:R.jsx(Ye,{gap:2,fullwidth:!0}),children:[H&&R.jsxs(Z3,{...u,children:[A&&R.jsx(bv,{children:R.jsx(J3,{icon:T,...h})}),D&&R.jsx(bv,{children:R.jsx(e4,{...c,children:_})}),O&&R.jsx(bv,{ml:"auto",children:R.jsx(t4,{...p,children:k})})]}),N&&R.jsx(n4,{...f,children:S})]}),v&&R.jsx(Ye,{"data-slot":"card-inner-container",my:2,...b,children:v}),o&&R.jsx(r4,{...g,children:o})]})};dn.displayName="Card";const bv=({children:e,className:t,...n})=>R.jsx(Ye,{className:ze(nh["card-header-cell"],t),ay:"center",...n,children:e}),N_={};function Hr(e,t){const n=C.useRef(N_);return n.current===N_&&(n.current=e(t)),n}function i4(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const vv=ha[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],AH=vv&&vv!==C.useLayoutEffect?vv:e=>e();function tt(e){const t=Hr(DH).current;return t.next=e,AH(t.effect),t.trampoline}function DH(){const e={next:void 0,callback:MH,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function MH(){}function Wg(){return typeof window<"u"}function ma(e){return Uw(e)?(e.nodeName||"").toLowerCase():"#document"}function ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function io(e){var t;return(t=(Uw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Uw(e){return Wg()?e instanceof Node||e instanceof ln(e).Node:!1}function Pt(e){return Wg()?e instanceof Element||e instanceof ln(e).Element:!1}function vn(e){return Wg()?e instanceof HTMLElement||e instanceof ln(e).HTMLElement:!1}function ox(e){return!Wg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ln(e).ShadowRoot}const OH=new Set(["inline","contents"]);function ga(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!OH.has(i)}const $H=new Set(["table","td","th"]);function NH(e){return $H.has(ma(e))}const PH=[":popover-open",":modal"];function Kg(e){return PH.some(t=>{try{return e.matches(t)}catch{return!1}})}const LH=["transform","translate","scale","rotate","perspective"],IH=["transform","translate","scale","rotate","perspective","filter"],FH=["paint","layout","strict","content"];function Hw(e){const t=Xg(),n=Pt(e)?Br(e):e;return LH.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)||IH.some(r=>(n.willChange||"").includes(r))||FH.some(r=>(n.contain||"").includes(r))}function jH(e){let t=Ko(e);for(;vn(t)&&!qo(t);){if(Hw(t))return t;if(Kg(t))return null;t=Ko(t)}return null}function Xg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zH=new Set(["html","body","#document"]);function qo(e){return zH.has(ma(e))}function Br(e){return ln(e).getComputedStyle(e)}function Qg(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ko(e){if(ma(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ox(e)&&e.host||io(e);return ox(t)?t.host:t}function o4(e){const t=Ko(e);return qo(t)?e.ownerDocument?e.ownerDocument.body:e.body:vn(t)&&ga(t)?t:o4(t)}function ia(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=o4(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=ln(i);if(o){const u=sx(a);return t.concat(a,a.visualViewport||[],ga(i)?i:[],u&&n?ia(u):[])}return t.concat(i,ia(i,[],n))}function sx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Bc=typeof navigator<"u",xv=UH(),s4=GH(),a4=HH(),l4=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),u4=xv.platform==="MacIntel"&&xv.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(xv.platform),c4=Bc&&/apple/i.test(navigator.vendor),ax=Bc&&/android/i.test(s4)||/android/i.test(a4),BH=Bc&&s4.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,f4=a4.includes("jsdom/");function UH(){if(!Bc)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 HH(){if(!Bc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function GH(){if(!Bc)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function $t(e){return(e==null?void 0:e.ownerDocument)||document}const qH=()=>{},St=typeof document<"u"?C.useLayoutEffect:qH,VH=[];function Zg(e){C.useEffect(e,VH)}const Zf=0;let no=class d4{constructor(){ne(this,"currentId",Zf);ne(this,"clear",()=>{this.currentId!==Zf&&(clearTimeout(this.currentId),this.currentId=Zf)});ne(this,"disposeEffect",()=>this.clear)}static create(){return new d4}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zf,n()},t)}isStarted(){return this.currentId!==Zf}};function da(){const e=Hr(no.create).current;return Zg(e.disposeEffect),e}const Ip=null;let YH=class{constructor(){ne(this,"callbacks",[]);ne(this,"callbacksCount",0);ne(this,"nextId",1);ne(this,"startId",1);ne(this,"isScheduled",!1);ne(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 Fp=new YH;let Ls=class h4{constructor(){ne(this,"currentId",Ip);ne(this,"cancel",()=>{this.currentId!==Ip&&(Fp.cancel(this.currentId),this.currentId=Ip)});ne(this,"disposeEffect",()=>this.cancel)}static create(){return new h4}static request(t){return Fp.request(t)}static cancel(t){return Fp.cancel(t)}request(t){this.cancel(),this.currentId=Fp.request(()=>{this.currentId=Ip,t()})}};function Gw(){const e=Hr(Ls.create).current;return Zg(e.disposeEffect),e}function p4(){}const mr=Object.freeze({});let P_={},L_={},I_="";function WH(e){if(typeof document>"u")return!1;const t=$t(e);return ln(t).innerWidth-t.documentElement.clientWidth>0}function KH(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=$t(e),n=t.documentElement,r=t.body,i=ga(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 XH(e){const t=$t(e),n=t.documentElement,r=t.body,i=ga(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 QH(e){var g;const t=$t(e),n=t.documentElement,r=t.body,i=ln(n);let o=0,a=0,u=!1;const c=Ls.create();if(l4&&(((g=i.visualViewport)==null?void 0:g.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,P_={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},I_=n.style.scrollBehavior,L_={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 w=n.scrollHeight>n.clientHeight,S=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),N=ga(n)?n:r;if(u=KH(e),u){n.style.scrollbarGutter=v,N.style.overflowY="hidden",N.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||_)&&(n.style.overflowY="scroll"),(S||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,P_),Object.assign(r.style,L_),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=I_)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let ZH=class{constructor(){ne(this,"lockCount",0);ne(this,"restore",null);ne(this,"timeoutLock",no.create());ne(this,"timeoutUnlock",no.create());ne(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ne(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=$t(t).documentElement,r=ln(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=p4;return}const i=u4||!WH(t);this.restore=i?XH(t):QH(t)}};const JH=new ZH;function eG(e=!0,t=null){St(()=>{if(e)return JH.acquire(t)},[e,t])}function tG(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 nG(e){const[t,n]=C.useState(null),r=tt((u,c)=>{e||n(c||(u4?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=tG(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=mr;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 rG(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),St(()=>{if(!e&&o&&r!=="ending"&&n){const u=Ls.request(()=>{i("ending")});return()=>{Ls.cancel(u)}}},[e,o,r,n]),St(()=>{if(!e||t)return;const u=Ls.request(()=>{i(void 0)});return()=>{Ls.cancel(u)}},[t,e]),St(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Ls.request(()=>{i("idle")});return()=>{Ls.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function $o(e){return e==null?e:"current"in e?e.current:e}let Od=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const iG={[Od.startingStyle]:""},oG={[Od.endingStyle]:""},Jg={transitionStatus(e){return e==="starting"?iG:e==="ending"?oG:null}};function sG(e,t=!1,n=!0){const r=Gw();return tt((i,o=null)=>{r.cancel();function a(){On.flushSync(i)}const u=$o(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=Od.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const g=new MutationObserver(()=>{c.hasAttribute(p)||(g.disconnect(),h())});g.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>g.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(g=>g.pending||g.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function ey(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=tt(i),a=sG(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function aG(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 m4(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=aG(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 St(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function g4(e){const t=e.useState("open");St(()=>{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 y4(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=rG(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 ey({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const lG={...ha};let F_=0;function uG(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(F_+=1,r(`${t}-${F_}`))},[n,t]),i}const j_=lG.useId;function Uc(e,t){if(j_!==void 0){const n=j_();return e??(t?`${t}-${n}`:n)}return uG(e,t)}function cG(){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)}}}const fG=C.createContext(null),dG=C.createContext(null),ty=()=>{var e;return((e=C.useContext(fG))==null?void 0:e.id)||null},rh=e=>{const t=C.useContext(dG);return e??t};var wv={exports:{}},Sv={},z_;function hG(){if(z_)return Sv;z_=1;var e=fa;function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),v=b[0].inst,w=b[1];return o(function(){v.value=y,v.getSnapshot=g,c(v)&&w({inst:v})},[p,y,g]),i(function(){return c(v)&&w({inst:v}),p(function(){c(v)&&w({inst:v})})},[p]),a(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Sv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Sv}var B_;function b4(){return B_||(B_=1,wv.exports=hG()),wv.exports}var v4=b4(),Cv={exports:{}},Ev={},U_;function pG(){if(U_)return Ev;U_=1;var e=fa,t=b4();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 Ev.useSyncExternalStoreWithSelector=function(f,h,p,g,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 S(D){if(!_){if(_=!0,k=D,D=g(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 N=g(D);return y!==void 0&&y(O,N)?(k=D,O):(k=D,T=N)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return S(h())},A===null?void 0:function(){return S(A())}]},[h,p,g,y]);var w=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),c(w),w},Ev}var H_;function mG(){return H_||(H_=1,Cv.exports=pG()),Cv.exports}var gG=mG();const yG=parseInt(C.version,10);function qw(e){return yG>=e}const lx=[];let ux;function bG(){return ux}function vG(e){lx.push(e)}function x4(e){const t=(n,r)=>{const i=Hr(wG).current;let o;try{ux=i;for(const a of lx)a.before(i);o=e(n,r);for(const a of lx)a.after(i);i.didInitialize=!0}finally{ux=void 0}return o};return t.displayName=e.displayName||e.name,t}function xG(e){return C.forwardRef(x4(e))}function wG(){return{didInitialize:!1}}const SG=qw(19),CG=SG?kG:RG;function w4(e,t,n,r,i){return CG(e,t,n,r,i)}function EG(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return v4.useSyncExternalStore(e.subscribe,o,o)}vG({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()}}),v4.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function kG(e,t,n,r,i){const o=bG();if(!o)return EG(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 RG(e,t,n,r,i){return gG.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let _G=class{constructor(t){ne(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ne(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 w4(this,t,n,r,i)}},ny=class extends _G{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),St(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;St(()=>(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);St(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;St(()=>{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),w4(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=tt(n??p4);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 TG(e){e.preventDefault(),e.stopPropagation()}function AG(e){return"nativeEvent"in e}function DG(e){return e.pointerType===""&&e.isTrusted?!0:ax&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function MG(e){return f4?!1:!ax&&e.width===0&&e.height===0||ax&&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 Al(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function S4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function ir(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 eg=Symbol("NOT_FOUND");function OG(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function $G(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function NG(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 G_=e=>Array.isArray(e)?e:[e];function PG(e){const t=Array.isArray(e[0])?e[0]:e;return NG(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function LG(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function IG(e){let t;return{get(n){return t&&e(t.key,n)?t.value:eg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function FG(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 eg}function i(u,c){r(u)===eg&&(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 jG=(e,t)=>e===t;function zG(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 BG(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=jG,maxSize:i=1,resultEqualityCheck:o}=n,a=zG(r);let u=0;const c=i<=1?IG(a):FG(i,a);function f(){let h=c.get(arguments);if(h===eg){if(h=e.apply(null,arguments),u++,o){const p=c.getEntries().find(g=>o(g.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 UG=class{constructor(t){this.value=t}deref(){return this.value}},HG=typeof WeakRef<"u"?WeakRef:UG,GG=0,q_=1;function jp(){return{s:GG,v:void 0,o:null,p:null}}function C4(e,t={}){let n=jp();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let g=0,y=c;g<y;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const w=v.get(b);w===void 0?(u=jp(),v.set(b,u)):u=w}else{let v=u.p;v===null&&(u.p=v=new Map);const w=v.get(b);w===void 0?(u=jp(),v.set(b,u)):u=w}}const f=u;let h;if(u.s===q_)h=u.v;else if(h=e.apply(null,arguments),o++,r){const g=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;g!=null&&r(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new HG(h):h}return f.s=q_,f.v=h,h}return a.clearCache=()=>{n=jp(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function E4(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()),OG(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=C4,argsMemoizeOptions:b=[]}=h,v=G_(g),w=G_(b),S=PG(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const T=LG(S,arguments);return u=_.apply(null,T),u},...w);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:S,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var qG=E4(C4),VG=Object.assign((e,t=qG)=>{$G(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:()=>VG});const YG=E4({memoize:BG,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),et=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(ir(1));let u;if(e&&t)u=(c,f,h,p)=>{const g=e(c,f,h,p);return t(g,f,h,p)};else if(e)u=e;else throw new Error("Missing arguments");return u},WG=(...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(ir(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 g=e;const y=[void 0,void 0,void 0];switch(o){case 0:break;case 1:{g=[...e.slice(0,-1),()=>y[0],r];break}case 2:{g=[...e.slice(0,-1),()=>y[0],()=>y[1],r];break}case 3:{g=[...e.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],r];break}default:throw new Error(ir(2))}p=YG(...g),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")}}},KG={open:et(e=>e.open),domReferenceElement:et(e=>e.domReferenceElement),referenceElement:et(e=>e.positionReference??e.referenceElement),floatingElement:et(e=>e.floatingElement),floatingId:et(e=>e.floatingId)};let Vw=class extends ny{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:cG(),nested:r,noEmit:i,triggerElements:a},KG);ne(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||S4(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 k4(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Uc(),a=ty()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=Hr(()=>new Vw({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return St(()=>{const g={open:u,floatingId:o,referenceElement:c,floatingElement:f};Pt(c)&&(g.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(g.positionReference=c),p.update(g)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const cx="data-base-ui-focusable",R4="active",_4="selected",T4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Nr(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&&ox(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function tg(e,t){if(!Pt(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 jn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ei(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 XG(e){return e.matches("html,body")}function ry(e){return vn(e)&&e.matches(T4)}function V_(e){return e?e.getAttribute("role")==="combobox"&&ry(e):!1}function ng(e){if(!e||f4)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function fx(e){return e?e.hasAttribute(cx)?e:e.querySelector(`[${cx}]`)||e:null}const QG=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ZG(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=Uc(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var S;return((S=fx(a))==null?void 0:S.id)||i},[a,i]),p=QG.get(u)??u,g=ty()!=null,y=C.useMemo(()=>p==="tooltip"||u==="label"?mr:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&g&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,g,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 S={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),w=C.useCallback(({active:S,selected:_})=>{const k={role:"option",...S&&{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:w,trigger:y}),[b,v,y,w])}function Cc(e){return`data-base-ui-${e}`}function Cl(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,...Cl(e,r.id,n)])}function Y_(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 Yw="none",$d="trigger-press",_i="trigger-hover",Tm="trigger-focus",A4="outside-press",D4="focus-out",Ww="escape-key",JG="disabled",M4="imperative-action",eq={intentional:"onClick",sloppy:"onPointerDown"};function tq(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 O4(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:g="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:w,externalTree:S}=t,_=rh(S),k=tt(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=tq(w),N=C.useRef(null),H=da(),I=da(),L=tt(()=>{I.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),B=C.useRef(""),q=tt(X=>{B.current=X.pointerType}),F=tt(()=>{const X=B.current,Z=X==="pen"||!X?"mouse":X,te=typeof g=="function"?g():g;return typeof te=="string"?te:te[Z]}),j=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,te=_?Cl(_.nodesRef.current,Z):[];if(!D&&te.length>0){let le=!0;if(te.forEach(re=>{var me;(me=re.context)!=null&&me.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=AG(X)?X.nativeEvent:X,ge=Qt(Ww,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),z=tt(X=>{const Z=F();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),V=tt(()=>{c.current.insideReactTree=!0,I.start(0,L)}),W=tt((X,Z=!1)=>{var Oe;if(z(X)){L();return}if(c.current.insideReactTree){L();return}if(F()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const te=jn(X),xe=`[${Cc("inert")}]`,ge=$t(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(te&&(Ce.hasElement(te)||Ce.hasMatchingElement(Te=>ht(Te,te))))return;let le=Pt(te)?te:null;for(;le&&!qo(le);){const Te=Ko(le);if(qo(Te)||!Pt(Te))break;le=Te}if(ge.length&&Pt(te)&&!XG(te)&&!ht(te,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ht(le,Te)))return;if(vn(te)&&!("touches"in X)){const Te=qo(te),_e=Br(te),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&te.clientWidth>0&&te.scrollWidth>te.clientWidth,Ne=Se&&te.clientHeight>0&&te.scrollHeight>te.clientHeight,Fe=_e.direction==="rtl",at=Ne&&(Fe?X.offsetX<=te.offsetWidth-te.clientWidth:X.offsetX>te.clientWidth),Bt=ke&&X.offsetY>te.clientHeight;if(at||Bt)return}const re=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Cl(_.nodesRef.current,re).some(Te=>{var _e;return Ei(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Ei(X,n.select("floatingElement"))||Ei(X,n.select("domReferenceElement"))||me)return;const ae=_?Cl(_.nodesRef.current,re):[];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(A4,X)),L()}),P=tt(X=>{F()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Ei(X,n.select("floatingElement"))||Ei(X,n.select("domReferenceElement"))||W(X)}),Y=tt(X=>{if(F()!=="sloppy"||!n.select("open")||!f||Ei(X,n.select("floatingElement"))||Ei(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&(N.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}),J=tt(X=>{const Z=jn(X);function te(){Y(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)}),U=tt(X=>{const Z=A.current;if(A.current=!1,H.clear(),X.type==="mousedown"&&N.current&&!N.current.dismissOnMouseDown)return;const te=jn(X);function xe(){X.type==="pointerdown"?P(X):W(X,Z),te==null||te.removeEventListener(X.type,xe)}te==null||te.addEventListener(X.type,xe)}),se=tt(X=>{if(F()!=="sloppy"||!N.current||Ei(X,n.select("floatingElement"))||Ei(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const te=Math.abs(Z.clientX-N.current.startX),xe=Math.abs(Z.clientY-N.current.startY),ge=Math.sqrt(te*te+xe*xe);ge>5&&(N.current.dismissOnTouchEnd=!0),ge>10&&(W(X),H.clear(),N.current=null)}),oe=tt(X=>{const Z=jn(X);function te(){se(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)}),he=tt(X=>{F()!=="sloppy"||!N.current||Ei(X,n.select("floatingElement"))||Ei(X,n.select("domReferenceElement"))||(N.current.dismissOnTouchEnd&&W(X),H.clear(),N.current=null)}),ve=tt(X=>{const Z=jn(X);function te(){he(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new no;function Z(le){n.setOpen(!1,Qt(Yw,le))}function te(){X.clear(),M.current=!0}function xe(){X.start(Xg()?5:0,()=>{M.current=!1})}const ge=$t(i);ge.addEventListener("pointerdown",q,!0),h&&(ge.addEventListener("keydown",j),ge.addEventListener("compositionstart",te),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",U,!0),ge.addEventListener("pointerdown",U,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",oe,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",U,!0));let Ce=[];return v&&(Pt(a)&&(Ce=ia(a)),Pt(i)&&(Ce=Ce.concat(ia(i))),!Pt(o)&&o&&o.contextElement&&(Ce=Ce.concat(ia(o.contextElement)))),Ce=Ce.filter(le=>{var re;return le!==((re=ge.defaultView)==null?void 0:re.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",q,!0),h&&(ge.removeEventListener("keydown",j),ge.removeEventListener("compositionstart",te),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",U,!0),ge.removeEventListener("pointerdown",U,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",oe,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",U,!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,j,W,U,P,J,oe,ve,q,n]),C.useEffect(L,[T,L]);const Re=C.useMemo(()=>({onKeyDown:j,...y&&{[eq[b]]:X=>{n.setOpen(!1,Qt($d,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,Qt($d,X.nativeEvent))}}}}),[j,n,y,b]),ce=tt(X=>{const Z=jn(X.nativeEvent);!ht(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=tt(X=>{!r||!f||X.button!==0||(A.current=!0)}),Ve=C.useMemo(()=>({onKeyDown:j,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:V,onMouseDownCapture(X){V(),Ie(X)},onPointerDownCapture(X){V(),Ie(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[j,ce,V,Ie]);return C.useMemo(()=>f?{reference:Re,floating:Ve,trigger:Re}:{},[f,Re,Ve])}function Kw(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=>zp(f,e,"reference"),t),a=C.useCallback(f=>zp(f,e,"floating"),n),u=C.useCallback(f=>zp(f,e,"item"),r),c=C.useCallback(f=>zp(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function zp(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[cx]="");for(const u in e)i&&e&&(u===R4||u===_4)||(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&&W_(o,c,i,r)}return W_(o,e,i,r),o}function W_(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===R4||o===_4)||(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 nq(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}=nG(i);g4(t);const{forceUnmount:p}=y4(i,t,()=>{h()}),g=tt(I=>{const L=Qt(I);return L.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},L}),y=C.useCallback(()=>{t.setOpen(!1,g(M4))},[t,g]);C.useImperativeHandle(r,()=>({unmount:p,close:y}),[p,y]);const b=k4({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,w]=C.useState(0),S=v===0,_=ZG(b),k=O4(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(I){if(!t.context.outsidePressEnabledRef.current||"button"in I&&I.button!==0||"touches"in I&&I.touches.length!==1)return!1;const L=jn(I);if(S&&!o){const M=L;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||ht(M,u)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:S});eG(i&&a===!0,u);const{getReferenceProps:T,getFloatingProps:A,getTriggerProps:D}=Kw([_,k]);t.useContextCallback("onNestedDialogOpen",I=>{w(I+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(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]),N=C.useMemo(()=>D(f),[D,f]),H=C.useMemo(()=>A(),[A]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:N,popupProps:H,floatingRootContext:b,nestedOpenDialogCount:v})}const $4=C.createContext(void 0);function ih(e){const t=C.useContext($4);if(e===!1&&t===void 0)throw new Error(ir(27));return t}let iy=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 rq(){return new Vw({open:!1,floatingElement:null,referenceElement:null,triggerElements:new iy,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function N4(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:rq(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:mr,inactiveTriggerProps:mr,popupProps:mr}}const Bp=et(e=>e.triggerIdProp??e.activeTriggerId),P4={open:et(e=>e.openProp??e.open),mounted:et(e=>e.mounted),transitionStatus:et(e=>e.transitionStatus),floatingRootContext:et(e=>e.floatingRootContext),preventUnmountingOnClose:et(e=>e.preventUnmountingOnClose),payload:et(e=>e.payload),activeTriggerId:Bp,activeTriggerElement:et(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:et((e,t)=>t!==void 0&&Bp(e)===t),isOpenedByTrigger:et((e,t)=>t!==void 0&&Bp(e)===t&&e.open),isMountedByTrigger:et((e,t)=>t!==void 0&&Bp(e)===t&&e.mounted),triggerProps:et((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:et(e=>e.popupProps),popupElement:et(e=>e.popupElement),positionerElement:et(e=>e.positionerElement)},iq={...P4,modal:et(e=>e.modal),nested:et(e=>e.nested),nestedOpenDialogCount:et(e=>e.nestedOpenDialogCount),disablePointerDismissal:et(e=>e.disablePointerDismissal),openMethod:et(e=>e.openMethod),descriptionElementId:et(e=>e.descriptionElementId),titleElementId:et(e=>e.titleElementId),viewportElement:et(e=>e.viewportElement),role:et(e=>e.role)};let oq=class extends ny{constructor(n){super(sq(n),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new iy,onOpenChange:void 0,onOpenChangeComplete:void 0},iq);ne(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 sq(e={}){return{...N4(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function aq(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,g=ih(!0),y=!!g,b=Hr(()=>(f==null?void 0:f.store)??new oq({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:u,disablePointerDismissal:a,nested:y})).current;i4(()=>{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");nq({store:b,actionsRef:c,parentContext:g==null?void 0:g.store.context});const w=C.useMemo(()=>({store:b}),[b]);return R.jsx($4.Provider,{value:w,children:typeof t=="function"?t({payload:v}):t})}const lq=C.createContext(void 0);function uq(e=!1){const t=C.useContext(lq);if(t===void 0&&!e)throw new Error(ir(16));return t}function cq(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 dx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const dd={};function L4(e,t,n,r,i){let o={...hx(e,dd)};return t&&(o=Am(o,t)),n&&(o=Am(o,n)),r&&(o=Am(o,r)),o}function fq(e){if(e.length===0)return dd;if(e.length===1)return hx(e[0],dd);let t={...hx(e[0],dd)};for(let n=1;n<e.length;n+=1)t=Am(t,e[n]);return t}function Am(e,t){return I4(t)?t(e):dq(e,t)}function dq(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=dx(e.style,r);break}case"className":{e[n]=F4(e.className,r);break}default:hq(n,r)?e[n]=pq(e[n],r):e[n]=r}}return e}function hq(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 I4(e){return typeof e=="function"}function hx(e,t){return I4(e)?e(t):e??dd}function pq(e,t){return t?e?n=>{if(mq(n)){const i=n;px(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 px(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function F4(e,t){return t?e?t+" "+e:t:e}function mq(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function gq(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=uq(!0)!==void 0,u=tt(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=cq({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;yq(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);St(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:S,..._}=g;return L4({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||(px(k),w==null||w(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||(px(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}S==null||S(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=tt(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function yq(e){return vn(e)&&e.tagName==="BUTTON"}function rg(e,t,n,r){const i=Hr(j4).current;return vq(i,e,t,n,r)&&z4(i,[e,t,n,r]),i.callback}function bq(e){const t=Hr(j4).current;return xq(t,e)&&z4(t,e),t.callback}function j4(){return{callback:null,cleanup:null,refs:[]}}function vq(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function xq(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function z4(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 K_(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(qw(19)?n==null?void 0:n.ref:t.ref)??null}function wq(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 Sq(e,t){return typeof e=="function"?e(t):e}function Cq(e,t){return typeof e=="function"?e(t):e}function oo(e,t,n={}){const r=t.render,i=Eq(t,n);if(n.enabled===!1)return null;const o=n.state??mr;return Rq(e,r,i,o)}function Eq(e,t={}){const{className:n,style:r,render:i}=e,{state:o=mr,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Sq(n,o):void 0,p=f?Cq(r,o):void 0,g=f?wq(o,c):mr,y=f?dx(g,Array.isArray(u)?fq(u):u)??mr:mr;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=bq([y.ref,K_(i),...a]):y.ref=rg(y.ref,K_(i),a):rg(null,null)),f?(h!==void 0&&(y.className=F4(y.className,h)),p!==void 0&&(y.style=dx(y.style,p)),y):mr}const kq=Symbol.for("react.lazy");function Rq(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=L4(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===kq&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return _q(e,n);throw new Error(ir(8))}function _q(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 ol=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Od.startingStyle]="startingStyle",e[e.endingStyle=Od.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),B4=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Tq={[B4.popupOpen]:""},Aq={[ol.open]:""},Dq={[ol.closed]:""},Mq={[ol.anchorHidden]:""},U4={open(e){return e?Tq:null}},oy={open(e){return e?Aq:Dq},anchorHidden(e){return e?Mq:null}},Oq={style:{transition:"none"}},H4="data-base-ui-click-trigger",$q={fallbackAxisSide:"end"},Nq={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function G4(e){return Uc(e,"base-ui")}function Pq(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=$d}=t,p=C.useRef(void 0),g=Gw(),y=da(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const w=p.current,S=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||Al(w,!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(ry(S.target)){const N=Qt(h,S,S.target);D&&w==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(D,N);return}const O=v.currentTarget;g.request(()=>{const N=Qt(h,S,O);D&&w==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(D,N)})},onClick(v){if(o==="mousedown-only")return;const w=p.current;if(o==="mousedown"&&w){p.current=void 0;return}if(Al(w,!0)&&u)return;const S=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=S&&k||!(S&&a&&(!(_&&c)||S4(_))),A=Qt(h,v.nativeEvent,v.currentTarget);T&&w==="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,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:mr,[i,b])}const Lq=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=ih(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(ir(79));const g=G4(a),y=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",g),v=C.useRef(null),{registerTrigger:w,isMountedByThisTrigger:S}=m4(g,v,p,{payload:u}),{getButtonProps:_,buttonRef:k}=gq({disabled:i,native:o}),T=Pq(y,{enabled:y!=null}),A=Kw([T]),D={disabled:i,open:b},O=p.useState("triggerProps",S);return oo("button",e,{state:D,ref:[k,t,w,v],props:[A.getReferenceProps(),O,{[H4]:"",id:g},f,_],stateAttributesMapping:U4})});function q4(e){return qw(19)?e:e?"true":void 0}const V4=C.createContext(void 0);function Iq(){const e=C.useContext(V4);if(e===void 0)throw new Error(ir(26));return e}const Fq=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
|
|
317
|
+
0% 0%,
|
|
318
|
+
100% 0%,
|
|
319
|
+
100% 100%,
|
|
320
|
+
0% 100%,
|
|
321
|
+
0% 0%,
|
|
322
|
+
${o.left}px ${o.top}px,
|
|
323
|
+
${o.left}px ${o.bottom}px,
|
|
324
|
+
${o.right}px ${o.bottom}px,
|
|
325
|
+
${o.right}px ${o.top}px,
|
|
326
|
+
${o.left}px ${o.top}px
|
|
327
|
+
)`}return R.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),jq={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Xw={...jq,position:"fixed",top:0,left:0},El=C.forwardRef(function(e,t){const[n,r]=C.useState();return St(()=>{c4&&r("button")},[]),R.jsx("span",{...e,ref:t,style:Xw,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var zq=["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] *)"],ig=zq.join(","),Y4=typeof Element>"u",Ec=Y4?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,og=!Y4&&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},sg=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]"):sg(e.parentNode));return o},Bq=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},W4=function(e,t,n){if(sg(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ig));return t&&Ec.call(e,ig)&&r.unshift(e),r=r.filter(n),r},ag=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!sg(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=ag(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Ec.call(o,ig);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!sg(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var g=ag(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,g):r.push({scopeParent:o,candidates:g})}else i.unshift.apply(i,o.children)}}return r},K4=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},X4=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Bq(e))&&!K4(e)?0:e.tabIndex},Uq=function(e,t){var n=X4(e);return n<0&&t&&!K4(e)?0:n},Hq=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Q4=function(e){return e.tagName==="INPUT"},Gq=function(e){return Q4(e)&&e.type==="hidden"},qq=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Vq=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Yq=function(e){if(!e.name)return!0;var t=e.form||og(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=Vq(r,e.form);return!i||i===e},Wq=function(e){return Q4(e)&&e.type==="radio"},Kq=function(e){return Wq(e)&&!Yq(e)},Xq=function(e){var t,n=e&&og(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=og(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},X_=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Qq=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=Ec.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ec.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=og(e);if(c&&!c.shadowRoot&&r(c)===!0)return X_(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(Xq(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return X_(e);return!1},Zq=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 Ec.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},mx=function(e,t){return!(t.disabled||Gq(t)||Qq(t,e)||qq(t)||Zq(t))},gx=function(e,t){return!(Kq(t)||X4(t)<0||!mx(e,t))},Jq=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Z4=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=Uq(a,o),c=o?Z4(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(Hq).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},sy=function(e,t){t=t||{};var n;return t.getShadowRoot?n=ag([e],t.includeContainer,{filter:gx.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Jq}):n=W4(e,t.includeContainer,gx.bind(null,t)),Z4(n)},eV=function(e,t){t=t||{};var n;return t.getShadowRoot?n=ag([e],t.includeContainer,{filter:mx.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=W4(e,t.includeContainer,mx.bind(null,t)),n},J4=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Ec.call(e,ig)===!1?!1:gx(t,e)};const oh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eO(e,t){const n=sy(e,oh()),r=n.length;if(r===0)return;const i=Nr($t(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function tO(e){return eO($t(e).body,1)||e}function nO(e){return eO($t(e).body,-1)||e}function hd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function tV(e){sy(e,oh()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function Q_(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 rO=C.createContext(null),iO=()=>C.useContext(rO),nV=Cc("portal");function oO(e={}){var b;const{ref:t,container:n,componentProps:r=mr,elementProps:i}=e,o=Uc(),a=(b=iO())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=tt(v=>{v!==null&&h(v)}),g=C.useRef(null);St(()=>{if(n===null){g.current&&(g.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(Uw(n)?n:n.current))??a??document.body;if(v==null){g.current&&(g.current=null,h(null),c(null));return}g.current!==v&&(g.current=v,h(null),c(v))},[n,a,o]);const y=oo("div",r,{ref:[t,p],props:[{id:o,[nV]:""},i]});return{portalNode:f,portalSubtree:u&&y?On.createPortal(y,u):null}}const rV=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=oO({container:r,ref:t,componentProps:e,elementProps:u}),h=C.useRef(null),p=C.useRef(null),g=C.useRef(null),y=C.useRef(null),[b,v]=C.useState(null),w=b==null?void 0:b.modal,S=b==null?void 0:b.open,_=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||w)return;function T(A){c&&A.relatedTarget&&hd(A)&&(A.type==="focusin"?Q_:tV)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,w]),C.useEffect(()=>{!c||S||Q_(c)},[S,c]);const k=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return R.jsxs(C.Fragment,{children:[f,R.jsxs(rO.Provider,{value:k,children:[_&&c&&R.jsx(El,{"data-type":"outside",ref:h,onFocus:T=>{var A,D;if(hd(T,c))(A=g.current)==null||A.focus();else{const O=b?b.domReference:null;(D=nO(O))==null||D.focus()}}}),_&&c&&R.jsx("span",{"aria-owns":c.id,style:Nq}),c&&On.createPortal(n,c),_&&c&&R.jsx(El,{"data-type":"outside",ref:p,onFocus:T=>{var A,D;if(hd(T,c))(A=y.current)==null||A.focus();else{const O=b?b.domReference:null;(D=tO(O))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,Qt(D4,T.nativeEvent)))}}})]})]})}),iV=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=ih(),o=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return o||n?R.jsx(V4.Provider,{value:n,children:R.jsxs(rV,{ref:t,...r,children:[o&&a===!0&&R.jsx(Fq,{ref:i.context.internalBackdropRef,inert:q4(!u)}),e.children]})}):null}),oV={...oy,...Jg},sV=C.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=ih(),u=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return oo("div",e,{state:{open:u,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:oV,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let aV=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),lV=(function(e){return e[e.open=ol.open]="open",e[e.closed=ol.closed]="closed",e[e.startingStyle=ol.startingStyle]="startingStyle",e[e.endingStyle=ol.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const sO="ArrowUp",aO="ArrowDown",lO="ArrowLeft",uO="ArrowRight",uV="Home",cV=new Set([lO,uO]),fV=new Set([sO,aO]),dV=new Set([...cV,...fV]);[...dV];const hV=new Set([sO,aO,lO,uO,uV,"End"]);function Qi(e){const t=Hr(pV,e).current;return t.next=e,St(t.effect),t}function pV(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Z_=0;function kv(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Z_);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():Z_=requestAnimationFrame(o)}const Qu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function J_(e){return e==="inert"?Qu.inert:e==="aria-hidden"?Qu["aria-hidden"]:Qu.none}let Up=new WeakSet,Hp={},Rv=0;const cO=e=>e&&(e.host||cO(e.parentNode)),mV=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=cO(n);return e.contains(r)?r:null}).filter(n=>n!=null);function gV(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=mV(t,e),u=new Set,c=new Set(a),f=[];Hp[i]||(Hp[i]=new WeakMap);const h=Hp[i];a.forEach(p),g(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function g(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(ma(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,w=v!==null&&v!=="false",S=J_(o),_=(S.get(b)||0)+1,k=(h.get(b)||0)+1;S.set(b,_),h.set(b,k),f.push(b),_===1&&w&&Up.add(b),k===1&&b.setAttribute(i,""),!w&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return Rv+=1,()=>{f.forEach(y=>{const b=J_(o),v=(b.get(y)||0)-1,w=(h.get(y)||0)-1;b.set(y,v),h.set(y,w),v||(!Up.has(y)&&o&&y.removeAttribute(o),Up.delete(y)),w||y.removeAttribute(i)}),Rv-=1,Rv||(Qu.inert=new WeakMap,Qu["aria-hidden"]=new WeakMap,Qu.none=new WeakMap,Up=new WeakSet,Hp={})}}function yV(e,t=!1,n=!1){const r=$t(e[0]).body;return gV(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function bV(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 eT=20;let Js=[];function Qw(){Js=Js.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function vV(e){Qw(),e&&ma(e)!=="body"&&(Js.push(new WeakRef(e)),Js.length>eT&&(Js=Js.slice(-eT)))}function _v(){var e;return Qw(),(e=Js[Js.length-1])==null?void 0:e.deref()}function xV(e){if(!e)return null;const t=oh();return J4(e,t)?e:sy(e,t)[0]||e}function wV(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Br(e).display!=="none"}function tT(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=oh(),r=eV(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return J4(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 SV(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:g,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),w=b.useState("domReferenceElement"),S=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=V_(w)&&A,O=C.useRef(["content"]),N=Qi(i),H=Qi(o),I=Qi(f),L=rh(y),M=iO(),B=C.useRef(null),q=C.useRef(null),F=C.useRef(!1),j=C.useRef(!1),z=C.useRef(!1),V=C.useRef(-1),W=C.useRef(""),P=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),U=rg(Y,g,M==null?void 0:M.beforeInsideRef),se=rg(J,M==null?void 0:M.afterInsideRef),oe=da(),he=da(),ve=Gw(),Re=M!=null,ce=fx(S),Ie=tt((Z=ce)=>Z?sy(Z,oh()):[]),Ve=tt(Z=>{const te=Ie(Z);return O.current.map(()=>te).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ht(ce,Nr($t(ce)))&&Ie().length===0&&!D&&TG(xe)}const te=$t(ce);return te.addEventListener("keydown",Z),()=>{te.removeEventListener("keydown",Z)}},[r,w,ce,u,O,D,Ie,Ve]),C.useEffect(()=>{if(r||!v)return;const Z=$t(ce);function te(){z.current=!1}function xe(Ce){const le=jn(Ce),re=ht(S,le)||ht(w,le)||ht(M==null?void 0:M.portalNode,le);z.current=!re,P.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${H4}]`)&&(j.current=!0)}function ge(){P.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",te,!0),Z.addEventListener("pointercancel",te,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",te,!0),Z.removeEventListener("pointercancel",te,!0),Z.removeEventListener("keydown",ge,!0)}},[r,S,w,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=$t(ce);function te(){j.current=!0,he.start(0,()=>{j.current=!1})}function xe(me){const ae=jn(me),Oe=Ie().indexOf(ae);Oe!==-1&&(V.current=Oe)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=jn(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Cc("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,$o(p),$o(h)].includes(ae),Se=!(ht(w,ae)||ht(S,ae)||ht(ae,S)||ht(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ht(ke,ae))||ue||L&&(Cl(L.nodesRef.current,_e).find(ke=>{var Ne,Fe;return ht((Ne=ke.context)==null?void 0:Ne.elements.floating,ae)||ht((Fe=ke.context)==null?void 0:Fe.elements.domReference,ae)})||Y_(L.nodesRef.current,_e).find(ke=>{var Ne,Fe,at;return[(Ne=ke.context)==null?void 0:Ne.elements.floating,fx((Fe=ke.context)==null?void 0:Fe.elements.floating)].includes(ae)||((at=ke.context)==null?void 0:at.elements.domReference)===ae})));if(Oe===w&&ce&&tT(ce,O),a&&Oe!==w&&!wV(Te)&&Nr(Z)===Z.body){if(vn(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=V.current,Ne=Ie(),Fe=Ne[ke]||Ne[Ne.length-1]||ce;vn(Fe)&&Fe.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!j.current&&(D||ae!==_v())&&(F.current=!0,b.setOpen(!1,Qt(D4,me)))})}function Ce(){z.current||(k.current.insideReactTree=!0,oe.start(0,()=>{k.current.insideReactTree=!1}))}const le=vn(w)?w:null,re=[];if(!(!S&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",te),re.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",te)})),S&&(S.addEventListener("focusin",xe),S.addEventListener("focusout",ge),M&&(S.addEventListener("focusout",Ce,!0),re.push(()=>{S.removeEventListener("focusout",Ce,!0)})),re.push(()=>{S.removeEventListener("focusin",xe),S.removeEventListener("focusout",ge)})),()=>{re.forEach(me=>{me()})}},[r,w,S,ce,u,L,M,b,c,a,Ie,D,T,O,k,oe,he,ve,h,p]),C.useEffect(()=>{var ge,Ce,le;if(r||!S||!v)return;const Z=Array.from(((ge=M==null?void 0:M.portalNode)==null?void 0:ge.querySelectorAll(`[${Cc("portal")}]`))||[]),te=(le=(Ce=(L?Y_(L.nodesRef.current,T()):[]).find(re=>{var me;return V_(((me=re.context)==null?void 0:me.elements.domReference)||null)}))==null?void 0:Ce.context)==null?void 0:le.elements.domReference,xe=[S,te,...Z,B.current,q.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,$o(p),$o(h),D?w:null].filter(re=>re!=null);return yV(xe,u||D)},[v,r,w,S,u,O,M,D,L,T,h,p]),St(()=>{if(!v||r||!vn(ce))return;const Z=$t(ce),te=Nr(Z);queueMicrotask(()=>{const xe=Ve(ce),ge=N.current,Ce=typeof ge=="function"?ge(I.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=$o(Ce),le=le||xe[0]||ce,!ht(ce,te)&&kv(le,{preventScroll:le===ce})})},[r,v,ce,A,Ve,N,I]),St(()=>{if(r||!ce)return;const Z=$t(ce),te=Nr(Z);vV(te);function xe(le){if(le.open||(W.current=bV(le.nativeEvent,P.current)),le.reason===_i&&le.nativeEvent.type==="mouseleave"&&(F.current=!0),le.reason===A4)if(le.nested)F.current=!1;else if(DG(le.nativeEvent)||MG(le.nativeEvent))F.current=!1;else{let re=!1;document.createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?F.current=!1:F.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,Xw),Re&&w&&w.insertAdjacentElement("afterend",ge);function Ce(){const le=H.current;let re=typeof le=="function"?le(W.current):le;if(re===void 0||re===!1)return null;if(re===null&&(re=!0),typeof re=="boolean"){const ae=w||_v();return ae&&ae.isConnected?ae:ge}const me=w||_v()||ge;return $o(re)||me}return()=>{_.off("openchange",xe);const le=Nr(Z),re=ht(S,le)||L&&Cl(L.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=xV(me),Oe=typeof H.current!="boolean";H.current&&!F.current&&vn(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||re)&&ae.focus({preventScroll:!0}),ge.remove(),F.current=!1})}},[r,S,ce,H,k,_,L,Re,w,T]),St(()=>{if(!l4||v||!S)return;const Z=Nr($t(S));!vn(Z)||!ry(Z)||ht(S,Z)&&Z.blur()},[v,S]),St(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:w}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,w]),St(()=>{if(!(r||!ce))return tT(ce,O),()=>{queueMicrotask(Qw)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return R.jsxs(C.Fragment,{children:[X&&R.jsx(El,{"data-type":"inside",ref:U,onFocus:Z=>{var te,xe;if(u){const ge=Ve();kv(ge[ge.length-1])}else M!=null&&M.portalNode&&(F.current=!1,hd(Z,M.portalNode)?(te=tO(w))==null||te.focus():(xe=$o(p??M.beforeOutsideRef))==null||xe.focus())}}),n,X&&R.jsx(El,{"data-type":"inside",ref:se,onFocus:Z=>{var te,xe;u?kv(Ve()[0]):M!=null&&M.portalNode&&(c&&(F.current=!0),hd(Z,M.portalNode)?(te=nO(w))==null||te.focus():(xe=$o(h??M.afterOutsideRef))==null||xe.focus())}})]})}const CV={...oy,...Jg,nestedDialogOpen(e){return e?{[lV.nestedDialogOpen]:""}:null}},EV=C.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:u}=ih(),c=u.useState("descriptionElementId"),f=u.useState("disablePointerDismissal"),h=u.useState("floatingRootContext"),p=u.useState("popupProps"),g=u.useState("modal"),y=u.useState("mounted"),b=u.useState("nested"),v=u.useState("nestedOpenDialogCount"),w=u.useState("open"),S=u.useState("openMethod"),_=u.useState("titleElementId"),k=u.useState("transitionStatus"),T=u.useState("role");Iq(),ey({open:w,ref:u.context.popupRef,onComplete(){var H,I;w&&((I=(H=u.context).onOpenChangeComplete)==null||I.call(H,!0))}});function A(H){return H==="touch"?u.context.popupRef.current:!0}const D=i===void 0?A:i,O=v>0,N=oo("div",e,{state:{open:w,nested:b,transitionStatus:k,nestedDialogOpen:O},props:[p,{"aria-labelledby":_??void 0,"aria-describedby":c??void 0,role:T,tabIndex:-1,hidden:!y,onKeyDown(H){hV.has(H.key)&&H.stopPropagation()},style:{[aV.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:CV});return R.jsx(SV,{context:h,openInteractionType:S,disabled:!y,closeOnFocusOut:!f,initialFocus:D,returnFocus:r,modal:g!==!1,restoreFocus:"popup",children:N})});function Dm(e,t,n){if(n&&!Al(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 yx=Cc("safe-polygon"),kV=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${T4}`;function RV(e){return e?!!e.closest(kV):!1}let _V=class fO{constructor(){ne(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ne(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 no,this.restTimeout=new no,this.handleCloseOptions=void 0}static create(){return new fO}};function dO(e){const t=Hr(_V.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Zg(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Tv(e){return typeof e=="function"?e():e}const TV={current:null};function AV(e,t={}){var I;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=TV,externalTree:g,isActiveTrigger:y=!0}=t,b=rh(g),v=dO(n),w=Qi(u),S=Qi(a),_=Qi(f),k=Qi(o);y&&(v.handleCloseOptions=(I=w.current)==null?void 0:I.__options);const T=tt(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=tt(L=>tg(L,n.context.triggerElements)),D=C.useCallback((L,M=!0)=>{const B=Dm(S.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,Qt(_i,L))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,Qt(_i,L)))},[S,n,v]),O=tt(()=>{v.unbindMouseMove(),v.handler=void 0}),N=tt(()=>{if(v.performedPointerEventsMutation){const L=$t(n.select("domReferenceElement")).body;L.style.pointerEvents="",L.removeAttribute(yx),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function L(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[o,i,v]);const H=tt(L=>{var B;if(T()||!r.current.floatingContext||A(L.relatedTarget))return;const M=p.current;(B=w.current)==null||B.call(w,{...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){N(),O(),!T()&&M===n.select("domReferenceElement")&&D(L)}})(L)});return C.useEffect(()=>{if(!o)return;const L=p.current??(y?n.select("domReferenceElement"):null);if(!Pt(L))return;function M(F){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!Al(v.pointerType)||Tv(_.current)>0&&!Dm(S.current,"open"))return;const j=Dm(S.current,"open",v.pointerType),z=n.select("domReferenceElement"),V=n.context.triggerElements,W=(V.hasElement(F.target)||V.hasMatchingElement(U=>ht(U,F.target)))&&(!z||!ht(z,F.target)),P=F.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,Qt(_i,F,P)):j?v.openChangeTimeout.start(j,()=>{J&&n.setOpen(!0,Qt(_i,F,P))}):J&&n.setOpen(!0,Qt(_i,F,P))}function B(F){if(T()){N();return}v.unbindMouseMove();const j=n.select("domReferenceElement"),z=$t(j);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!A(F.relatedTarget)){if(w.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const V=p.current;v.handler=w.current({...r.current.floatingContext,tree:b,x:F.clientX,y:F.clientY,onClose(){N(),O(),k.current&&!T()&&V===n.select("domReferenceElement")&&D(F,!0)}});const W=v.handler;W(F),z.addEventListener("mousemove",W),v.unbindMouseMove=()=>{z.removeEventListener("mousemove",W)};return}(v.pointerType!=="touch"||!ht(n.select("floatingElement"),F.relatedTarget))&&D(F)}}function q(F){H(F)}return n.select("open")&&L.addEventListener("mouseleave",q),h&&L.addEventListener("mousemove",M,{once:!0}),L.addEventListener("mouseenter",M),L.addEventListener("mouseleave",B),()=>{L.removeEventListener("mouseleave",q),h&&L.removeEventListener("mousemove",M),L.removeEventListener("mouseenter",M),L.removeEventListener("mouseleave",B)}},[O,N,r,S,D,n,o,w,H,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function L(M){v.pointerType=M.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(M){const{nativeEvent:B}=M,q=M.currentTarget,F=n.select("domReferenceElement"),j=n.context.triggerElements,z=n.select("open"),V=(j.hasElement(M.target)||j.hasMatchingElement(P=>ht(P,M.target)))&&(!F||!ht(F,M.target));if(c&&!Al(v.pointerType)||z&&!V||Tv(_.current)===0||!V&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const P=n.select("open");!v.blockMouseMove&&(!P||V)&&n.setOpen(!0,Qt(_i,B,q))}v.pointerType==="touch"?On.flushSync(()=>{W()}):V&&z?W():(v.restTimeoutPending=!0,v.restTimeout.start(Tv(_.current),W))}}},[o,v,T,c,n,_])}function nT(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 DV(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function MV(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new no;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,g){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=g,c=y,null;const v=p-a,w=g-u,S=Math.sqrt(v*v+w*w)/b;return a=p,u=g,c=y,S}const h=({x:p,y:g,placement:y,elements:b,onClose:v,nodeId:w,tree:S})=>function(_){function k(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||g==null)return;const{clientX:T,clientY:A}=_,D=[T,A],O=jn(_),N=_.type==="mouseleave",H=ht(b.floating,O),I=ht(b.domReference,O),L=b.domReference.getBoundingClientRect(),M=b.floating.getBoundingClientRect(),B=y.split("-")[0],q=p>M.right-M.width/2,F=g>M.bottom-M.height/2,j=DV(D,L),z=M.width>L.width,V=M.height>L.height,W=(z?L:M).left,P=(z?L:M).right,Y=(V?L:M).top,J=(V?L:M).bottom;if(H&&(o=!0,!N))return;if(I&&(o=!1),I&&!N){o=!0;return}if(N&&Pt(_.relatedTarget)&&ht(b.floating,_.relatedTarget)||S&&Cl(S.nodesRef.current,w).some(({context:oe})=>oe==null?void 0:oe.open))return;if(B==="top"&&g>=L.bottom-1||B==="bottom"&&g<=L.top+1||B==="left"&&p>=L.right-1||B==="right"&&p<=L.left+1)return k();let U=[];switch(B){case"top":U=[[W,L.top+1],[W,M.bottom-1],[P,M.bottom-1],[P,L.top+1]];break;case"bottom":U=[[W,M.top+1],[W,L.bottom-1],[P,L.bottom-1],[P,M.top+1]];break;case"left":U=[[M.right-1,J],[M.right-1,Y],[L.left+1,Y],[L.left+1,J]];break;case"right":U=[[L.right-1,J],[L.right-1,Y],[M.left+1,Y],[M.left+1,J]];break}function se([oe,he]){switch(B){case"top":{const ve=[z?oe+t/2:q?oe+t*4:oe-t*4,he+t+1],Re=[z?oe-t/2:q?oe+t*4:oe-t*4,he+t+1],ce=[[M.left,q||z?M.bottom-t:M.top],[M.right,q?z?M.bottom-t:M.top:M.bottom-t]];return[ve,Re,...ce]}case"bottom":{const ve=[z?oe+t/2:q?oe+t*4:oe-t*4,he-t],Re=[z?oe-t/2:q?oe+t*4:oe-t*4,he-t],ce=[[M.left,q||z?M.top+t:M.bottom],[M.right,q?z?M.top+t:M.bottom:M.top+t]];return[ve,Re,...ce]}case"left":{const ve=[oe+t+1,V?he+t/2:F?he+t*4:he-t*4],Re=[oe+t+1,V?he-t/2:F?he+t*4:he-t*4];return[[F||V?M.right-t:M.left,M.top],[F?V?M.right-t:M.left:M.right-t,M.bottom],ve,Re]}case"right":{const ve=[oe-t,V?he+t/2:F?he+t*4:he-t*4],Re=[oe-t,V?he-t/2:F?he+t*4:he-t*4],ce=[[F||V?M.left+t:M.right,M.top],[F?V?M.left+t:M.right:M.left+t,M.bottom]];return[ve,Re,...ce]}default:return[]}}if(!nT([T,A],U)){if(o&&!j)return k();if(!N&&r){const oe=f(_.clientX,_.clientY);if(oe!==null&&oe<.1)return k()}nT([T,A],se([p,g]))?!o&&r&&i.start(40,k):k()}};return h.__options={blockPointerEvents:n},h}const OV=["top","right","bottom","left"],kc=Math.min,Pr=Math.max,lg=Math.round,Gp=Math.floor,Ji=e=>({x:e,y:e}),$V={left:"right",right:"left",bottom:"top",top:"bottom"},NV={start:"end",end:"start"};function bx(e,t,n){return Pr(e,kc(t,n))}function Xo(e,t){return typeof e=="function"?e(t):e}function br(e){return e.split("-")[0]}function ya(e){return e.split("-")[1]}function Zw(e){return e==="x"?"y":"x"}function Jw(e){return e==="y"?"height":"width"}const PV=new Set(["top","bottom"]);function di(e){return PV.has(br(e))?"y":"x"}function eS(e){return Zw(di(e))}function LV(e,t,n){n===void 0&&(n=!1);const r=ya(e),i=eS(e),o=Jw(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ug(a)),[a,ug(a)]}function IV(e){const t=ug(e);return[vx(e),t,vx(t)]}function vx(e){return e.replace(/start|end/g,t=>NV[t])}const rT=["left","right"],iT=["right","left"],FV=["top","bottom"],jV=["bottom","top"];function zV(e,t,n){switch(e){case"top":case"bottom":return n?t?iT:rT:t?rT:iT;case"left":case"right":return t?FV:jV;default:return[]}}function BV(e,t,n,r){const i=ya(e);let o=zV(br(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(vx)))),o}function ug(e){return e.replace(/left|right|bottom|top/g,t=>$V[t])}function UV(e){return{top:0,right:0,bottom:0,left:0,...e}}function hO(e){return typeof e!="number"?UV(e):{top:e,right:e,bottom:e,left:e}}function cg(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 HV=C.createContext(void 0);function GV(){var e;return((e=C.useContext(HV))==null?void 0:e.direction)??"ltr"}const qV=e=>({name:"arrow",options:e,async fn(t){var W,P;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=Xo(e,t)||{};if(f==null)return{};const g=hO(h),y={x:n,y:r},b=eS(i),v=Jw(b),w=await a.getDimensions(f),S=b==="y",_=S?"top":"left",k=S?"bottom":"right",T=S?"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 N=u.floating[T]||o.floating[v];(!N||!await((P=a.isElement)==null?void 0:P.call(a,O)))&&(N=u.floating[T]||o.floating[v]);const H=A/2-D/2,I=N/2-w[v]/2-1,L=Math.min(g[_],I),M=Math.min(g[k],I),B=L,q=N-w[v]-M,F=N/2-w[v]/2+H,j=bx(B,F,q),z=!c.arrow&&ya(i)!=null&&F!==j&&o.reference[v]/2-(F<B?L:M)-w[v]/2<0,V=z?F<B?F-B:F-q:0;return{[b]:y[b]+V,data:{[b]:j,centerOffset:F-j-V,...z&&{alignmentOffset:V}},reset:z}}}),VV=(e,t)=>({...qV(e),options:[e,t]});function oT(e,t,n){let{reference:r,floating:i}=e;const o=di(t),a=eS(t),u=Jw(a),c=br(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=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(ya(t)){case"start":y[a]-=g*(n&&f?-1:1);break;case"end":y[a]+=g*(n&&f?-1:1);break}return y}async function YV(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:g=!1,padding:y=0}=Xo(t,e),b=hO(y),v=u[g?p==="floating"?"reference":"floating":p],w=cg(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})),S=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=cg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:S,offsetParent:_,strategy:c}):S);return{top:(w.top-T.top+b.top)/k.y,bottom:(T.bottom-w.bottom+b.bottom)/k.y,left:(w.left-T.left+b.left)/k.x,right:(T.right-w.right+b.right)/k.x}}const WV=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}=oT(f,r,c),g=r,y={},b=0;for(let w=0;w<u.length;w++){var v;const{name:S,fn:_}=u[w],{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:YV},elements:{reference:e,floating:t}});h=k??h,p=T??p,y={...y,[S]:{...y[S],...A}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(g=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=oT(f,g,c)),w=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}},KV=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:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=Xo(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=br(i),_=di(u),k=br(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=g||(k||!v?[ug(u)]:IV(u)),D=b!=="none";!g&&D&&A.push(...BV(u,v,b,T));const O=[u,...A],N=await c.detectOverflow(t,w),H=[];let I=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&H.push(N[S]),p){const q=LV(i,a,T);H.push(N[q[0]],N[q[1]])}if(I=[...I,{placement:i,overflows:H}],!H.every(q=>q<=0)){var L,M;const q=(((L=o.flip)==null?void 0:L.index)||0)+1,F=O[q];if(F&&(!(p==="alignment"&&_!==di(F))||I.every(z=>di(z.placement)===_?z.overflows[0]>0:!0)))return{data:{index:q,overflows:I},reset:{placement:F}};let j=(M=I.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(y){case"bestFit":{var B;const z=(B=I.filter(V=>{if(D){const W=di(V.placement);return W===_||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,P)=>W+P,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:B[0];z&&(j=z);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};function sT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aT(e){return OV.some(t=>e[t]>=0)}const XV=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Xo(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=sT(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:aT(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=sT(a,n.floating);return{data:{escapedOffsets:u,escaped:aT(u)}}}default:return{}}}}},pO=new Set(["left","top"]);async function QV(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=br(n),u=ya(n),c=di(n)==="y",f=pO.has(a)?-1:1,h=o&&c?-1:1,p=Xo(t,e);let{mainAxis:g,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:g*f}:{x:g*f,y:y*h}}const ZV=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 QV(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}}}}},JV=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:S=>{let{x:_,y:k}=S;return{x:_,y:k}}},...f}=Xo(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=di(br(i)),y=Zw(g);let b=h[y],v=h[g];if(a){const S=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[S],T=b-p[_];b=bx(k,b,T)}if(u){const S=g==="y"?"top":"left",_=g==="y"?"bottom":"right",k=v+p[S],T=v-p[_];v=bx(k,v,T)}const w=c.fn({...t,[y]:b,[g]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[y]:a,[g]:u}}}}}},eY=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}=Xo(e,t),h={x:n,y:r},p=di(i),g=Zw(p);let y=h[g],b=h[p];const v=Xo(u,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=g==="y"?"height":"width",T=o.reference[g]-o.floating[k]+w.mainAxis,A=o.reference[g]+o.reference[k]-w.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var S,_;const k=g==="y"?"width":"height",T=pO.has(br(i)),A=o.reference[p]-o.floating[k]+(T&&((S=a.offset)==null?void 0:S[p])||0)+(T?0:w.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?w.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[g]:y,[p]:b}}}},tY=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}=Xo(e,t),h=await a.detectOverflow(t,f),p=br(i),g=ya(i),y=di(i)==="y",{width:b,height:v}=o.floating;let w,S;p==="top"||p==="bottom"?(w=p,S=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(S=p,w=g==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=kc(v-h[w],_),A=kc(b-h[S],k),D=!t.middlewareData.shift;let O=T,N=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!g){const I=Pr(h.left,0),L=Pr(h.right,0),M=Pr(h.top,0),B=Pr(h.bottom,0);y?N=b-2*(I!==0||L!==0?I+L:Pr(h.left,h.right)):O=v-2*(M!==0||B!==0?M+B:Pr(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:O});const H=await a.getDimensions(u.floating);return b!==H.width||v!==H.height?{reset:{rects:!0}}:{}}}};function mO(e){const t=Br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=vn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=lg(n)!==o||lg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function tS(e){return Pt(e)?e:e.contextElement}function Zu(e){const t=tS(e);if(!vn(t))return Ji(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=mO(t);let a=(o?lg(n.width):n.width)/r,u=(o?lg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const nY=Ji(0);function gO(e){const t=ln(e);return!Xg()||!t.visualViewport?nY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ln(e)?!1:t}function Dl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=tS(e);let a=Ji(1);t&&(r?Pt(r)&&(a=Zu(r)):a=Zu(e));const u=rY(o,n,r)?gO(o):Ji(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 g=ln(o),y=r&&Pt(r)?ln(r):r;let b=g,v=sx(b);for(;v&&r&&y!==b;){const w=Zu(v),S=v.getBoundingClientRect(),_=Br(v),k=S.left+(v.clientLeft+parseFloat(_.paddingLeft))*w.x,T=S.top+(v.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,f*=w.y,h*=w.x,p*=w.y,c+=k,f+=T,b=ln(v),v=sx(b)}}return cg({width:h,height:p,x:c,y:f})}function ay(e,t){const n=Qg(e).scrollLeft;return t?t.left+n:Dl(io(e)).left+n}function yO(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ay(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function iY(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=io(r),u=t?Kg(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=Ji(1);const h=Ji(0),p=vn(r);if((p||!p&&!o)&&((ma(r)!=="body"||ga(a))&&(c=Qg(r)),vn(r))){const y=Dl(r);f=Zu(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?yO(a,c):Ji(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-c.scrollTop*f.y+h.y+g.y}}function oY(e){return Array.from(e.getClientRects())}function sY(e){const t=io(e),n=Qg(e),r=e.ownerDocument.body,i=Pr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Pr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ay(e);const u=-n.scrollTop;return Br(r).direction==="rtl"&&(a+=Pr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const lT=25;function aY(e,t){const n=ln(e),r=io(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=Xg();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=ay(r);if(f<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=lT&&(o-=b)}else f<=lT&&(o+=f);return{width:o,height:a,x:u,y:c}}const lY=new Set(["absolute","fixed"]);function uY(e,t){const n=Dl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=vn(e)?Zu(e):Ji(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 uT(e,t,n){let r;if(t==="viewport")r=aY(e,n);else if(t==="document")r=sY(io(e));else if(Pt(t))r=uY(t,n);else{const i=gO(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return cg(r)}function bO(e,t){const n=Ko(e);return n===t||!Pt(n)||qo(n)?!1:Br(n).position==="fixed"||bO(n,t)}function cY(e,t){const n=t.get(e);if(n)return n;let r=ia(e,[],!1).filter(u=>Pt(u)&&ma(u)!=="body"),i=null;const o=Br(e).position==="fixed";let a=o?Ko(e):e;for(;Pt(a)&&!qo(a);){const u=Br(a),c=Hw(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&lY.has(i.position)||ga(a)&&!c&&bO(e,a))?r=r.filter(f=>f!==a):i=u,a=Ko(a)}return t.set(e,r),r}function fY(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Kg(t)?[]:cY(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=uT(t,f,i);return c.top=Pr(h.top,c.top),c.right=kc(h.right,c.right),c.bottom=kc(h.bottom,c.bottom),c.left=Pr(h.left,c.left),c},uT(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function dY(e){const{width:t,height:n}=mO(e);return{width:t,height:n}}function hY(e,t,n){const r=vn(t),i=io(t),o=n==="fixed",a=Dl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=Ji(0);function f(){c.x=ay(i)}if(r||!r&&!o)if((ma(t)!=="body"||ga(i))&&(u=Qg(t)),r){const y=Dl(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?yO(i,u):Ji(0),p=a.left+u.scrollLeft-c.x-h.x,g=a.top+u.scrollTop-c.y-h.y;return{x:p,y:g,width:a.width,height:a.height}}function Av(e){return Br(e).position==="static"}function cT(e,t){if(!vn(e)||Br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return io(e)===n&&(n=n.ownerDocument.body),n}function vO(e,t){const n=ln(e);if(Kg(e))return n;if(!vn(e)){let i=Ko(e);for(;i&&!qo(i);){if(Pt(i)&&!Av(i))return i;i=Ko(i)}return n}let r=cT(e,t);for(;r&&NH(r)&&Av(r);)r=cT(r,t);return r&&qo(r)&&Av(r)&&!Hw(r)?n:r||jH(e)||n}const pY=async function(e){const t=this.getOffsetParent||vO,n=this.getDimensions,r=await n(e.floating);return{reference:hY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mY(e){return Br(e).direction==="rtl"}const gY={convertOffsetParentRelativeRectToViewportRelativeRect:iY,getDocumentElement:io,getClippingRect:fY,getOffsetParent:vO,getElementRects:pY,getClientRects:oY,getDimensions:dY,getScale:Zu,isElement:Pt,isRTL:mY};function xO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yY(e,t){let n=null,r;const i=io(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:g,height:y}=f;if(u||t(),!g||!y)return;const b=Gp(p),v=Gp(i.clientWidth-(h+g)),w=Gp(i.clientHeight-(p+y)),S=Gp(h),_={rootMargin:-b+"px "+-v+"px "+-w+"px "+-S+"px",threshold:Pr(0,kc(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&&!xO(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 fT(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=tS(e),h=i||o?[...f?ia(f):[],...ia(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const p=f&&u?yY(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(S=>{let[_]=S;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?Dl(e):null;c&&w();function w(){const S=Dl(e);v&&!xO(v,S)&&n(),v=S,b=requestAnimationFrame(w)}return n(),()=>{var S;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(S=y)==null||S.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const bY=ZV,vY=JV,xY=KV,wY=tY,SY=XV,CY=eY,EY=(e,t,n)=>{const r=new Map,i={platform:gY,...n},o={...i.platform,_c:r};return WV(e,t,{...i,platform:o})};var kY=typeof document<"u",RY=function(){},Mm=kY?C.useLayoutEffect:RY;function fg(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(!fg(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)&&!fg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function wO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dT(e,t){const n=wO(e);return Math.round(t*n)/n}function Dv(e){const t=C.useRef(e);return Mm(()=>{t.current=e}),t}function _Y(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}),[g,y]=C.useState(r);fg(g,r)||y(r);const[b,v]=C.useState(null),[w,S]=C.useState(null),_=C.useCallback(V=>{V!==D.current&&(D.current=V,v(V))},[]),k=C.useCallback(V=>{V!==O.current&&(O.current=V,S(V))},[]),T=o||b,A=a||w,D=C.useRef(null),O=C.useRef(null),N=C.useRef(h),H=c!=null,I=Dv(c),L=Dv(i),M=Dv(f),B=C.useCallback(()=>{if(!D.current||!O.current)return;const V={placement:t,strategy:n,middleware:g};L.current&&(V.platform=L.current),EY(D.current,O.current,V).then(W=>{const P={...W,isPositioned:M.current!==!1};q.current&&!fg(N.current,P)&&(N.current=P,On.flushSync(()=>{p(P)}))})},[g,t,n,L,M]);Mm(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[f]);const q=C.useRef(!1);Mm(()=>(q.current=!0,()=>{q.current=!1}),[]),Mm(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(I.current)return I.current(T,A,B);B()}},[T,A,B,I,H]);const F=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),j=C.useMemo(()=>({reference:T,floating:A}),[T,A]),z=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!j.floating)return V;const W=dT(j.floating,h.x),P=dT(j.floating,h.y);return u?{...V,transform:"translate("+W+"px, "+P+"px)",...wO(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:P}},[n,u,j.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:B,refs:F,elements:j,floatingStyles:z}),[h,B,F,j,z])}const TY=(e,t)=>({...bY(e),options:[e,t]}),AY=(e,t)=>({...vY(e),options:[e,t]}),DY=(e,t)=>({...CY(e),options:[e,t]}),MY=(e,t)=>({...xY(e),options:[e,t]}),OY=(e,t)=>({...wY(e),options:[e,t]}),$Y=(e,t)=>({...SY(e),options:[e,t]}),NY={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 $Y().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},Om={sideX:"left",sideY:"top"},PY={name:"adaptiveOrigin",async fn(e){var S,_;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:u}=e,c=ln(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:Om};const h=await((S=o.getOffsetParent)==null?void 0:S.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=$t(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 g=br(u);let y=t,b=n;g==="left"&&(y=p.width-(t+r.width)),g==="top"&&(b=p.height-(n+r.height));const v=g==="left"?"right":Om.sideX,w=g==="top"?"bottom":Om.sideY;return{x:y,y:b,data:{sideX:v,sideY:w}}}};function LY(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Uc(),o=ty()!=null,a=Hr(()=>new Vw({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new iy,floatingId:i,nested:o,noEmit:!1})).current;return St(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Pt(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 IY(e={}){const{nodeId:t,externalTree:n}=e,r=LY(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=rh(n);St(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=_Y({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const N=Pt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u(N),h.refs.setReference(N)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Pt(g)?g:null),i.useSyncedValue("floatingElement",b);const w=C.useCallback(O=>{(Pt(O)||O===null)&&(c.current=O,y(O)),(Pt(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Pt(O))&&h.refs.setReference(O)},[h.refs,y]),S=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:w,setFloating:S,setPositionReference:p,domReference:c}),[h.refs,w,S,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 St(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find(N=>N.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function SO(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 hT(e,t,n){const{rects:r,placement:i}=e;return{side:SO(t,br(i),n),align:ya(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function FY(e){var Me,We;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:g=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:w=!1,nodeId:S,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",N=v.align||"flip",H=v.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,L=tt(I),M=I?L:t,B=Qi(t),q=GV()==="rtl",F=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":q?"left":"right","inline-start":q?"right":"left"}[r],j=o==="center"?F:`${F}-${o}`;let z=c;const V=1,W=r==="bottom"?V:0,P=r==="top"?V:0,Y=r==="right"?V:0,J=r==="left"?V:0;typeof z=="number"?z={top:z+W,right:z+J,bottom:z+P,left:z+Y}:z&&(z={top:(z.top||0)+W,right:(z.right||0)+J,bottom:(z.bottom||0)+P,left:(z.left||0)+Y});const U={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:z},se=C.useRef(null),oe=Qi(i),he=Qi(a),ve=[TY(Le=>{const Tt=hT(Le,r,q),ft=typeof oe.current=="function"?oe.current(Tt):oe.current,ct=typeof he.current=="function"?he.current(Tt):he.current;return{mainAxis:ft,crossAxis:ct,alignmentAxis:ct}},[typeof i!="function"?i:0,typeof a!="function"?a:0,q,r])],Re=N==="none"&&O!=="shift",ce=!Re&&(f||w||O==="shift"),Ie=O==="none"?null:MY({...U,padding:{top:z.top+V,right:z.right+V,bottom:z.bottom+V,left:z.left+V},mainAxis:!w&&O==="flip",crossAxis:N==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Ve=Re?null:AY(Le=>{const Tt=$t(Le.elements.floating).documentElement;return{...U,rootBoundary:w?{x:0,y:0,width:Tt.clientWidth,height:Tt.clientHeight}:void 0,mainAxis:N!=="none",crossAxis:ce,limiter:f||w?void 0:DY(ft=>{if(!se.current)return{};const{width:ct,height:Rt}=se.current.getBoundingClientRect(),Jt=di(br(ft.placement)),Wt=Jt==="y"?ct:Rt,en=Jt==="y"?z.left+z.right:z.top+z.bottom;return{offset:Wt/2+en/2}})}},[U,f,w,z,N]);O==="shift"||N==="shift"||o==="center"?ve.push(Ve,Ie):ve.push(Ie,Ve),ve.push(OY({...U,apply({elements:{floating:Le},rects:{reference:Tt},availableWidth:ft,availableHeight:ct}){const Rt=Le.style;Rt.setProperty("--available-width",`${ft}px`),Rt.setProperty("--available-height",`${ct}px`),Rt.setProperty("--anchor-width",`${Tt.width}px`),Rt.setProperty("--anchor-height",`${Tt.height}px`)}}),VV(()=>({element:se.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Le){var Aa,Er,rn;const{elements:Tt,middlewareData:ft,placement:ct,rects:Rt,y:Jt}=Le,Wt=br(ct),en=di(Wt),hn=se.current,qr=((Aa=ft.arrow)==null?void 0:Aa.x)||0,ka=((Er=ft.arrow)==null?void 0:Er.y)||0,bi=(hn==null?void 0:hn.clientWidth)||0,Ra=(hn==null?void 0:hn.clientHeight)||0,vi=qr+bi/2,Wl=ka+Ra/2,Kl=Math.abs(((rn=ft.shift)==null?void 0:rn.y)||0),rs=Rt.reference.height/2,xi=typeof i=="function"?i(hT(Le,r,q)):i,_a=Kl>xi,Ta={top:`${vi}px calc(100% + ${xi}px)`,bottom:`${vi}px ${-xi}px`,left:`calc(100% + ${xi}px) ${Wl}px`,right:`${-xi}px ${Wl}px`}[Wt],Li=`${vi}px ${Rt.reference.y+rs-Jt}px`;return Tt.floating.style.setProperty("--transform-origin",ce&&en==="y"&&_a?Li:Ta),{}}},NY,_),St(()=>{!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:te,x:xe,y:ge,middlewareData:Ce,update:le,placement:re,context:me,isPositioned:ae,floatingStyles:Oe}=IY({rootContext:y,placement:j,middleware:ve,strategy:n,whileElementsMounted:g?void 0:(...Le)=>fT(...Le,X),nodeId:S,externalTree:T}),{sideX:Te,sideY:_e}=Ce.adaptiveOrigin||Om,De=ae?n:"fixed",ue=C.useMemo(()=>{const Le=_?{position:De,[Te]:xe,[_e]:ge}:{position:De,...Oe};return ae||(Le.opacity=0),Le},[_,De,Te,xe,_e,ge,Oe,ae]),Se=C.useRef(null);St(()=>{if(!b)return;const Le=B.current,Tt=typeof Le=="function"?Le():Le,ft=(pT(Tt)?Tt.current:Tt)||null||null;ft!==Se.current&&(Z.setPositionReference(ft),Se.current=ft)},[b,Z,M,B]),C.useEffect(()=>{if(!b)return;const Le=B.current;typeof Le!="function"&&pT(Le)&&Le.current!==Se.current&&(Z.setPositionReference(Le.current),Se.current=Le.current)},[b,Z,M,B]),C.useEffect(()=>{if(g&&b&&te.domReference&&te.floating)return fT(te.domReference,te.floating,le,X)},[g,b,te,le,X]);const ke=br(re),Ne=SO(r,ke,q),Fe=ya(re)||"center",at=!!((Me=Ce.hide)!=null&&Me.referenceHidden);St(()=>{k&&b&&ae&&D(ke)},[k,b,ae,ke]);const Bt=C.useMemo(()=>{var Le,Tt;return{position:"absolute",top:(Le=Ce.arrow)==null?void 0:Le.y,left:(Tt=Ce.arrow)==null?void 0:Tt.x}},[Ce.arrow]),Mt=((We=Ce.arrow)==null?void 0:We.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:ue,arrowStyles:Bt,arrowRef:se,arrowUncentered:Mt,side:Ne,align:Fe,physicalSide:ke,anchorHidden:at,refs:Z,context:me,isPositioned:ae,update:le}),[ue,Bt,se,Mt,Ne,Fe,ke,at,Z,me,ae,le])}function pT(e){return e!=null&&"current"in e}function CO(e){return e==="starting"?Oq:mr}const jY=new Set(["click","mousedown"]);function zY(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=dO(n),h=rh(),p=ty(),g=tt(()=>f.interactedInside?!0:a.current.openEvent?jY.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=>tg(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=BY(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,Qt(_i,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,Qt(_i,k)))},[c,n,f]),w=tt(()=>{f.unbindMouseMove(),f.handler=void 0}),S=tt(()=>{if(f.performedPointerEventsMutation){const k=$t(i).body;k.style.pointerEvents="",k.removeAttribute(yx),f.performedPointerEventsMutation=!1}}),_=tt(k=>{const T=jn(k);if(!RV(T)){f.interactedInside=!1;return}f.interactedInside=!0});St(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,w(),S())},[r,f,w,S]),C.useEffect(()=>()=>{w()},[w]),C.useEffect(()=>S,[S]),St(()=>{var k,T,A;if(u&&r&&((k=f.handleCloseOptions)!=null&&k.blockPointerEvents)&&y()&&Pt(o)&&i){f.performedPointerEventsMutation=!0;const D=$t(i).body;D.setAttribute(yx,"");const O=o,N=i,H=(A=(T=h==null?void 0:h.nodesRef.current.find(I=>I.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return H&&(H.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",N.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){g()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(S(),w(),g()||v(O))}function T(O){var N;f.openChangeTimeout.clear(),S(),(N=f.handler)==null||N.call(f,O),w()}function A(O){g()||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,g,b,v,S,w,_,f])}function BY(e,t){return t&&!Al(t)?0:typeof e=="function"?e():e}const EO=({children:e,...t})=>R.jsx(aq,{"data-slot":"sheet-root",...t,children:e});EO.displayName="SheetRoot";const kO=({children:e,...t})=>{const n=C.isValidElement(e);return R.jsx(Lq,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:R.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};kO.displayName="SheetTrigger";const RO=({children:e,...t})=>R.jsx(iV,{"data-slot":"sheet-portal",...t,children:e});RO.displayName="SheetPortal";const Vu={"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"},_O=({className:e,...t})=>R.jsx(sV,{"data-slot":"sheet-backdrop",className:ze(Vu["sheet-backdrop"],e),...t});_O.displayName="SheetBackdrop";const UY=Sr({variants:{side:{top:Vu["side-top"],right:Vu["side-right"],bottom:Vu["side-bottom"],left:Vu["side-left"]}}}),TO=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:u,...c})=>R.jsx(EV,{render:R.jsx(dn,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:ze(Vu["sheet-popup"],UY({side:e}),a),...c,children:u});TO.displayName="SheetPopup";const AO=({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:g,onOpenChange:y,children:b})=>R.jsxs(EO,{open:g,onOpenChange:y,...a,children:[R.jsx(kO,{...u,children:p??(u==null?void 0:u.children)}),R.jsxs(RO,{...c,children:[R.jsx(_O,{...f}),R.jsx(TO,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});AO.displayName="Sheet";const HY="_toast_ornow_1",DO={"toast-viewport":"_toast-viewport_ornow_1",toast:HY},nS=C.createContext(void 0);function MO(){const e=C.useContext(nS);if(!e)throw new Error(ir(73));return e}let mT=0;function GY(e){return mT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${mT}`}function Mv(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 qp=WG(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}),Ao={toasts:et(e=>e.toasts),isEmpty:et(e=>e.toasts.length===0),toast:et(qp,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:et(qp,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:et(qp,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:et(qp,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:et(e=>e.hovering),focused:et(e=>e.focused),expanded:et(e=>e.hovering||e.focused),expandedOrOutOfFocus:et(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:et(e=>e.prevFocusElement)};let qY=class extends ny{constructor(n){super(n,{},Ao);ne(this,"timers",new Map);ne(this,"areTimersPaused",!1);ne(this,"setViewport",n=>{this.set("viewport",n)});ne(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});ne(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||GY("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,g=f.slice(-p),y=new Set(g.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)),Ao.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});ne(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});ne(this,"updateToastInternal",(n,r)=>{var v,w,S;const{timeout:i,toasts:o}=this.state,a=Ao.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,g=this.timers.has(n),y=f!==c,b=(a==null?void 0:a.type)==="loading";if(!p&&g){(w=(v=this.timers.get(n))==null?void 0:v.timeout)==null||w.clear(),this.timers.delete(n);return}if(p&&(!g||y||h||b)){const _=this.timers.get(n);_&&((S=_.timeout)==null||S.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),Ao.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});ne(this,"closeToast",n=>{var c,f;(f=(c=Ao.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)});ne(this,"promiseToast",(n,r)=>{const i=Mv(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(u=>{const c=Mv(r.success,u);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),u}).catch(u=>{const c=Mv(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});ne(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=jn(n);ht(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=Ao.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=no.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=!Ao.expandedOrOutOfFocus(this.state),u=a?no.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=Nr($t(this.state.viewport));if(!this.state.viewport||!ht(this.state.viewport,r)||!ng(r))return;const i=Ao.toasts(this.state),o=Ao.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 VY=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=Hr(()=>new qY({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Zg(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}),R.jsx(nS.Provider,{value:o,children:t})};function YY(){const e=C.useContext(nS);if(!e)throw new Error(ir(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 WY=VY,OO=YY,$O=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:u,portalSubtree:c}=oO({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!u?null:R.jsxs(C.Fragment,{children:[c,u&&On.createPortal(n,u)]})}),KY=$O;let XY=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const QY=C.forwardRef(function(e,t){var L;const{render:n,className:r,children:i,...o}=e,a=MO(),u=da(),c=C.useRef(!1),f=C.useRef(!1),h=a.useState("isEmpty"),p=a.useState("toasts"),g=a.useState("focused"),y=a.useState("expanded"),b=a.useState("prevFocusElement"),v=((L=p[0])==null?void 0:L.height)??0,w=C.useMemo(()=>p.some(M=>M.transitionStatus==="ending"),[p]);C.useEffect(()=>{const M=a.state.viewport;if(!M)return;function B(F){h||F.key==="F6"&&F.target!==M&&(F.preventDefault(),a.setPrevFocusElement(Nr($t(M))),M==null||M.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const q=ln(M);return q.addEventListener("keydown",B),()=>{q.removeEventListener("keydown",B)}},[a,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const B=ln(M);function q(j){j.target===B&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(j){if(j.relatedTarget||j.target===B)return;const z=jn(j),V=Nr($t(M));(!ht(M,z)||!ng(V))&&a.resumeTimers(),u.start(0,()=>a.setIsWindowFocused(!0))}return B.addEventListener("blur",q,!0),B.addEventListener("focus",F,!0),()=>{B.removeEventListener("blur",q,!0),B.removeEventListener("focus",F,!0)}},[a,u,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const B=$t(M);return B.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{B.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function S(M){var q,F,j;const B=a.state.viewport;B&&(c.current=!0,M.relatedTarget===B?(j=(F=(q=p[0])==null?void 0:q.ref)==null?void 0:F.current)==null||j.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||w||!f.current||(a.resumeTimers(),a.setHovering(!1),f.current=!1)},[w,a]);function k(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function T(){w?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function A(){if(c.current){c.current=!1;return}g||ng($t(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function D(M){!g||ht(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},N={expanded:y},H=oo("div",e,{ref:[t,a.setViewport],state:N,props:[O,{style:{[XY.frontmostHeight]:v?`${v}px`:void 0}},o,{children:R.jsxs(C.Fragment,{children:[!h&&b&&R.jsx(El,{onFocus:S}),i,!h&&b&&R.jsx(El,{onFocus:S})]})}]}),I=C.useMemo(()=>p.filter(M=>M.priority==="high"),[p]);return R.jsxs(C.Fragment,{children:[!h&&b&&R.jsx(El,{onFocus:S}),H,!g&&I.length>0&&R.jsx("div",{style:Xw,children:I.map(M=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:M.title}),R.jsx("div",{children:M.description})]},M.id))})]})}),NO=C.createContext(void 0);function ZY(){const e=C.useContext(NO);if(!e)throw new Error(ir(66));return e}let Ka=(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 JY={...Jg,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Jf=40,eW=10,As=.5,tW=1;function gT(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 nW(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 rW=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=MO(),[p,g]=C.useState(void 0),[y,b]=C.useState(!1),[v,w]=C.useState(!1),[S,_]=C.useState(!1),[k,T]=C.useState({x:0,y:0}),[A,D]=C.useState({x:0,y:0,scale:1}),[O,N]=C.useState(),[H,I]=C.useState(),[L,M]=C.useState(null),B=C.useRef(null),q=C.useRef({x:0,y:0}),F=C.useRef({x:0,y:0,scale:1}),j=C.useRef(void 0),z=C.useRef(0),V=C.useRef(!1),W=C.useRef({x:0,y:0}),P=C.useRef(!1),Y=h.useState("toastIndex",n.id),J=h.useState("toastVisibleIndex",n.id),U=h.useState("toastOffsetY",n.id),se=h.useState("focused"),oe=h.useState("expanded");ey({open:n.transitionStatus!=="ending",ref:B,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const he=tt((re=!1)=>{const me=B.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:B,height:Oe,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}re?On.flushSync(Te):Te()});St(he,[he]);function ve(re,me){let ae=re,Oe=me;return!c.includes("left")&&!c.includes("right")?ae=re>0?re**As:-(Math.abs(re)**As):(!c.includes("right")&&re>0&&(ae=re**As),!c.includes("left")&&re<0&&(ae=-(Math.abs(re)**As))),!c.includes("up")&&!c.includes("down")?Oe=me>0?me**As:-(Math.abs(me)**As):(!c.includes("down")&&me>0&&(Oe=me**As),!c.includes("up")&&me<0&&(Oe=-(Math.abs(me)**As))),{x:ae,y:Oe}}function Re(re){var ae;if(re.button!==0)return;re.pointerType==="touch"&&h.pauseTimers();const me=jn(re.nativeEvent);if(!(me&&me.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,j.current=void 0,z.current=0,q.current={x:re.clientX,y:re.clientY},W.current=q.current,B.current){const Oe=nW(B.current);F.current=Oe,D(Oe),T({x:Oe.x,y:Oe.y})}h.setHovering(!0),b(!0),w(!1),M(null),P.current=!0,(ae=B.current)==null||ae.setPointerCapture(re.pointerId)}}function ce(re){if(!y)return;re.preventDefault(),P.current&&(q.current={x:re.clientX,y:re.clientY},P.current=!1);const{clientY:me,clientX:ae,movementX:Oe,movementY:Te}=re;(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-q.current.x,De=me-q.current.y,ue=me-W.current.y,Se=ae-W.current.x;if(!v&&Math.sqrt(_e*_e+De*De)>=tW&&(w(!0),L===null)){const Bt=c.includes("left")||c.includes("right"),Mt=c.includes("up")||c.includes("down");if(Bt&&Mt){const Me=Math.abs(_e),We=Math.abs(De);M(Me>We?"horizontal":"vertical")}}let ke;if(!j.current)L==="vertical"?De>0?ke="down":De<0&&(ke="up"):L==="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)&&(j.current=ke,z.current=gT(ke,_e,De),g(ke));else{const Bt=j.current,Mt=gT(Bt,Se,ue);Mt>Jf?(V.current=!1,g(Bt)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&z.current-Mt>=eW&&(V.current=!0)}const Ne=ve(_e,De);let Fe=F.current.x,at=F.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&(Fe+=Ne.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&(Fe+=Ne.x),(c.includes("up")||c.includes("down"))&&(at+=Ne.y)),T({x:Fe,y:at})}function Ie(re){var _e;if(!y)return;if(b(!1),w(!1),M(null),(_e=B.current)==null||_e.releasePointerCapture(re.pointerId),V.current){T({x:A.x,y:A.y}),g(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>Jf&&(me=!0,Te="right");break;case"left":ae<-Jf&&(me=!0,Te="left");break;case"down":Oe>Jf&&(me=!0,Te="down");break;case"up":Oe<-Jf&&(me=!0,Te="up");break}if(me)break}me?(g(Te),_(!0),h.closeToast(n.id)):(T({x:A.x,y:A.y}),g(void 0))}function Ve(re){if(re.key==="Escape"){if(!B.current||!ht(B.current,Nr($t(B.current))))return;h.closeToast(n.id)}}C.useEffect(()=>{if(!f)return;const re=B.current;if(!re)return;function me(ae){ht(re,ae.target)&&ae.preventDefault()}return re.addEventListener("touchmove",me,{passive:!1}),()=>{re.removeEventListener("touchmove",me)}},[f]);function X(){if(!y&&k.x===A.x&&k.y===A.y&&!S)return{[Ka.swipeMovementX]:"0px",[Ka.swipeMovementY]:"0px"};const re=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,[Ka.swipeMovementX]:`${re}px`,[Ka.swipeMovementY]:`${me}px`}}const Z=n.priority==="high",te={role:Z?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":O,"aria-describedby":H,"aria-hidden":Z&&!se?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?ce:void 0,onPointerUp:f?Ie:void 0,onKeyDown:Ve,inert:q4(n.limited),style:{...X(),[Ka.index]:n.transitionStatus==="ending"?Y:J,[Ka.offsetY]:`${U}px`,[Ka.height]:n.height?`${n.height}px`:void 0}},xe=C.useMemo(()=>({rootRef:B,toast:n,titleId:O,setTitleId:N,descriptionId:H,setDescriptionId:I,swiping:y,swipeDirection:p,recalculateHeight:he,index:Y,visibleIndex:J,expanded:oe}),[n,O,H,y,p,he,Y,J,oe]),ge={transitionStatus:n.transitionStatus,expanded:oe,limited:n.limited||!1,type:n.type,swiping:xe.swiping,swipeDirection:xe.swipeDirection},Ce=oo("div",e,{ref:[t,xe.rootRef],state:ge,stateAttributesMapping:JY,props:[te,a]});return R.jsx(NO.Provider,{value:xe,children:Ce})}),iW=C.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:u,setDescriptionId:c}=ZY(),f=o??u.description,h=!!f,p=Uc(i);St(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const g={type:u.type},y=oo("p",e,{ref:t,state:g,props:{...a,id:p,children:f}});return h?y:null}),PO=()=>{const{toasts:e}=OO();return e.map(t=>R.jsx(rW,{toast:t,className:DO.toast,render:R.jsx(dn,{"data-slot":"toast",children:R.jsx(Pe,{size:0,shade:"muted",render:R.jsx(iW,{})})})},t.id))};PO.displayName="ToastList";const LO=({position:e="bottom"})=>R.jsx(KY,{children:R.jsx(QY,{className:DO["toast-viewport"],"data-position":e,children:R.jsx(PO,{})})});LO.displayName="Toaster";const IO=C.createContext(void 0);function oW(){return C.useContext(IO)}const FO=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new no,currentIdRef:{current:null},currentContextRef:{current:null}});function sW(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=da();return R.jsx(FO.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:u,timeout:c}),[r,c]),children:t})}function aW(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=C.useContext(FO),{currentIdRef:a,delayRef:u,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:g}=o,[y,b]=C.useState(!1);return St(()=>{function v(){var w;b(!1),(w=h.current)==null||w.setIsInstantPhase(!1),a.current=null,h.current=null,u.current=f.current}if(a.current&&!i&&a.current===r){if(b(!1),c){const w=r;return g.start(c,()=>{n.select("open")||a.current&&a.current!==w||v()}),()=>{g.clear()}}v()}},[i,r,a,u,c,f,h,g,n]),St(()=>{if(!i)return;const v=h.current,w=a.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,u.current={open:0,close:Dm(f.current,"close")},w!==null&&w!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,Qt(Yw))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,u,c,f,h,g]),St(()=>()=>{h.current=null},[h]),C.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:y}),[p,u,y])}const lW=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 R.jsx(IO.Provider,{value:i,children:R.jsx(sW,{delay:o,timeoutMs:r,children:e.children})})},jO=({children:e,...t})=>R.jsx(lW,{"data-slot":"tooltip-provider",...t,children:e});jO.displayName="TooltipProvider";const zO=C.createContext(void 0);function ly(e){const t=C.useContext(zO);if(t===void 0&&!e)throw new Error(ir(72));return t}const uW={...P4,disabled:et(e=>e.disabled),instantType:et(e=>e.instantType),isInstantPhase:et(e=>e.isInstantPhase),trackCursorAxis:et(e=>e.trackCursorAxis),disableHoverablePopup:et(e=>e.disableHoverablePopup),lastOpenChangeReason:et(e=>e.openChangeReason),closeDelay:et(e=>e.closeDelay),hasViewport:et(e=>e.hasViewport)};let cW=class BO extends ny{constructor(n){super({...fW(),...n},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new iy},uW);ne(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===_i,a=n&&i===Tm,u=!n&&(i===$d||i===Ww);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===_i&&(p.instantType=void 0);const g=((y=r.trigger)==null?void 0:y.id)??null;(g||n)&&(p.activeTriggerId=g,p.activeTriggerElement=r.trigger??null),this.update(p)};o?On.flushSync(c):c()})}static useStore(n,r){const i=Hr(()=>new BO(r)).current,o=n??i,a=k4({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function fW(){return{...N4(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function dW(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,g=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,g-=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,g=u&&t.y!=null?t.y:g):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:g,top:g,right:p+f,bottom:g+h,left:p}}}}function yT(e){return e!=null&&e.clientX!=null}function hW(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,g]=C.useState(),[y,b]=C.useState([]),v=tt((T,A,D)=>{f.current||a.current.openEvent&&!yT(a.current.openEvent)||n.set("positionReference",dW(D??o,{x:T,y:A,axis:c,dataRef:a,pointerType:p}))}),w=tt(T=>{r?h.current||b([]):v(T.clientX,T.clientY,T.currentTarget)}),S=Al(p)?i:r,_=C.useCallback(()=>{if(!S||!u)return;const T=ln(i);function A(D){const O=jn(D);ht(i,O)?(T.removeEventListener("mousemove",A),h.current=null):v(D.clientX,D.clientY)}if(!a.current.openEvent||yT(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)},[S,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){g(A.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:w,onMouseEnter:w}},[w]);return C.useMemo(()=>u?{reference:k,trigger:k}:{},[u,k])}const pW=x4(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:g}=e,y=cW.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});i4(()=>{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,w=y.useState("activeTriggerId"),S=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),St(()=>{b&&t&&y.setOpen(!1,Qt(JG))},[b,t,y]),y.useSyncedValue("disabled",t),g4(y);const{forceUnmount:_,transitionStatus:k}=y4(v,y),T=y.useState("isInstantPhase"),A=y.useState("instantType"),D=y.useState("lastOpenChangeReason"),O=C.useRef(null);St(()=>{k==="ending"&&D===Yw||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]),St(()=>{v&&w==null&&y.set("payload",void 0)},[y,w,v]);const N=C.useCallback(()=>{y.setOpen(!1,mW(y,M4))},[y]);C.useImperativeHandle(a,()=>({unmount:_,close:N}),[_,N]);const H=y.useState("floatingRootContext"),I=O4(H,{enabled:!t,referencePress:!0}),L=hW(H,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:M,getFloatingProps:B,getTriggerProps:q}=Kw([I,L]),F=C.useMemo(()=>M(),[M]),j=C.useMemo(()=>q(),[q]),z=C.useMemo(()=>B(),[B]);return y.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:j,popupProps:z}),R.jsx(zO.Provider,{value:y,children:typeof g=="function"?g({payload:S}):g})});function mW(e,t){const n=Qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const UO=({children:e,...t})=>R.jsx(pW,{"data-slot":"tooltip-root",...t,children:e});UO.displayName="TooltipRoot";let gW=(function(e){return e[e.popupOpen=B4.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const yW=600,Ov=BH&&c4;function bW(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=da(),h=C.useRef(!0);C.useEffect(()=>{const g=n.select("domReferenceElement");if(!o)return;const y=ln(g);function b(){const S=n.select("domReferenceElement");!n.select("open")&&vn(S)&&S===Nr($t(S))&&(u.current=!0)}function v(){h.current=!0}function w(){h.current=!1}return y.addEventListener("blur",b),Ov&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",w,!0)),()=>{y.removeEventListener("blur",b),Ov&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",w,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function g(y){if(y.reason===$d||y.reason===Ww){const b=n.select("domReferenceElement");Pt(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(g){const y=g.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=jn(g.nativeEvent);if(Pt(b)){if(Ov&&!g.relatedTarget){if(!h.current&&!ry(b))return}else if(!ng(b))return}const v=tg(g.relatedTarget,n.context.triggerElements),{nativeEvent:w,currentTarget:S}=g,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,Qt(Tm,w,S));return}f.start(_,()=>{u.current||n.setOpen(!0,Qt(Tm,w,S))})},onBlur(g){u.current=!1,c.current=null;const y=g.relatedTarget,b=g.nativeEvent,v=Pt(y)&&y.hasAttribute(Cc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var _;const w=n.select("domReferenceElement"),S=Nr(w?w.ownerDocument:document);!y&&S===w||ht((_=i.current.floatingContext)==null?void 0:_.refs.floating.current,S)||ht(w,S)||v||tg(y??S,n.context.triggerElements)||n.setOpen(!1,Qt(Tm,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const vW=xG(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:u,closeDelay:c,id:f,...h}=e,p=ly(!0),g=(i==null?void 0:i.store)??p;if(!g)throw new Error(ir(82));const y=G4(f),b=g.useState("isTriggerActive",y),v=g.useState("isOpenedByTrigger",y),w=g.useState("floatingRootContext"),S=C.useRef(null),_=u??yW,k=c??0,{registerTrigger:T,isMountedByThisTrigger:A}=m4(y,S,g,{payload:o,closeDelay:k}),D=oW(),{delayRef:O,isInstantPhase:N,hasProvider:H}=aW(w,{open:v});g.useSyncedValue("isInstantPhase",N);const I=g.useState("disabled"),L=a??I,M=g.useState("trackCursorAxis"),B=g.useState("disableHoverablePopup"),q=AV(w,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!B&&M!=="both"?MV():null,restMs(){const V=D==null?void 0:D.delay,W=typeof O.current=="object"?O.current.open:void 0;let P=_;return H&&(W!==0?P=u??V??_:P=0),P},delay(){const V=typeof O.current=="object"?O.current.close:void 0;let W=k;return c==null&&H&&(W=V),{close:W}},triggerElementRef:S,isActiveTrigger:b}),F=bW(w,{enabled:!L}).reference,j={open:v},z=g.useState("triggerProps",A);return oo("button",e,{state:j,ref:[t,T,S],props:[q,F,z,{id:y,[gW.triggerDisabled]:L?"":void 0},h],stateAttributesMapping:U4})}),HO=({children:e,...t})=>{const n=C.isValidElement(e);return R.jsx(vW,{"data-slot":"tooltip-trigger",render:n?e:R.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};HO.displayName="TooltipTrigger";const GO=C.createContext(void 0);function xW(){const e=C.useContext(GO);if(e===void 0)throw new Error(ir(70));return e}const wW=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return ly().useState("mounted")||n?R.jsx(GO.Provider,{value:n,children:R.jsx($O,{ref:t,...r})}):null}),qO=({children:e,...t})=>R.jsx(wW,{"data-slot":"tooltip-portal",...t,children:e});qO.displayName="TooltipPortal";const VO=C.createContext(void 0);function SW(){const e=C.useContext(VO);if(e===void 0)throw new Error(ir(71));return e}const CW=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:g=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=$q,...w}=e,S=ly(),_=xW(),k=S.useState("open"),T=S.useState("mounted"),A=S.useState("trackCursorAxis"),D=S.useState("disableHoverablePopup"),O=S.useState("floatingRootContext"),N=S.useState("instantType"),H=S.useState("transitionStatus"),I=S.useState("hasViewport"),L=FY({anchor:i,positionMethod:o,floatingRootContext:O,mounted:T,side:a,sideOffset:c,align:u,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:y,arrowPadding:g,disableAnchorTracking:b,keepMounted:_,collisionAvoidance:v,adaptiveOrigin:I?PY:void 0}),M=C.useMemo(()=>{const j={};return(!k||A==="both"||D)&&(j.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...L.positionerStyles,...j}}},[k,A,D,T,L.positionerStyles]),B=C.useMemo(()=>({open:k,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:A!=="none"?"tracking-cursor":N}),[k,L.side,L.align,L.anchorHidden,A,N]),q=C.useMemo(()=>({...B,arrowRef:L.arrowRef,arrowStyles:L.arrowStyles,arrowUncentered:L.arrowUncentered}),[B,L.arrowRef,L.arrowStyles,L.arrowUncentered]),F=oo("div",e,{state:B,props:[M,CO(H),w],ref:[t,S.useStateSetter("positionerElement")],stateAttributesMapping:oy});return R.jsx(VO.Provider,{value:q,children:F})}),YO=({children:e,...t})=>R.jsx(CW,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});YO.displayName="TooltipPositioner";const EW={...oy,...Jg},kW=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=ly(),{side:a,align:u}=SW(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),g=o.useState("floatingRootContext");ey({open:c,ref:o.context.popupRef,onComplete(){var v,w;c&&((w=(v=o.context).onOpenChangeComplete)==null||w.call(v,!0))}});const y=o.useState("disabled"),b=o.useState("closeDelay");return zY(g,{enabled:!y,closeDelay:b}),oo("div",e,{state:{open:c,side:a,align:u,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,CO(h),i],stateAttributesMapping:EW})}),WO=({children:e,...t})=>R.jsx(kW,{"data-slot":"tooltip-popup",render:R.jsx(dn,{py:2,px:2,style:{backgroundColor:"var(--shade-foreground)",color:"var(--shade-background)"}}),"data-is-popup":!0,...t,children:R.jsx(Pe,{size:-1,children:e})});WO.displayName="TooltipPopup";const kl=({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})=>R.jsx(jO,{delay:t,...i,children:R.jsxs(UO,{open:n,onOpenChange:r,...o,children:[R.jsx(HO,{...a,children:e}),R.jsx(qO,{...u,children:R.jsx(YO,{...c,children:R.jsx(WO,{...f,children:h})})})]})});kl.displayName="Tooltip";const KO=({tooltip:e,children:t})=>R.jsx(kl,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:R.jsx("div",{})},delay:300,children:e});KO.displayName="ButtonTooltipWrapper";const es=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:u,...c})=>R.jsx(yi,{condition:!!e,render:R.jsx(KO,{tooltip:e}),children:R.jsx(J9,{nativeButton:!c.render,"data-slot":"button",className:ze(dr.button,E9({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:R.jsxs($w,{ay:"center",ax:"center",children:[R.jsx(P3,{loading:o,children:u}),R.jsx(K3,{loading:o})]})})});es.displayName="Button";function RW({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 bT=0;function _W(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(bT+=1,r(`${t}-${bT}`))},[n,t]),i}const vT=M9.useId;function TW(e,t){if(vT!==void 0){const n=vT();return e??`${t}-${n}`}return _W(e,t)}function AW(e){return TW(e,"base-ui")}const DW=C.createContext(void 0);function MW(e=!0){const t=C.useContext(DW);if(t===void 0&&!e)throw new Error(Fw(7));return t}const OW=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function $W(){return C.useContext(OW)}let NW=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function PW(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}=$W(),g=C.useRef(-1),[y,b]=C.useState(o??(i===NW.GuessFromOrder?()=>{if(g.current===-1){const S=p.current;p.current+=1,g.current=S}return g.current}:-1)),v=C.useRef(null),w=C.useCallback(S=>{var _;if(v.current=S,y!==-1&&S!==null&&(f.current[y]=S,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??S.textContent}},[y,f,h,t,r]);return ex(()=>{if(o!=null)return;const S=v.current;if(S)return a(S,n),()=>{u(S)}},[o,a,u,n]),ex(()=>{if(o==null)return c(S=>{var k;const _=v.current?(k=S.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:w,index:y}),[y,w])}function LW(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=L3(),{ref:i,index:o}=PW(e),a=n===o,u=C.useRef(null),c=ix(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 IW(e){const{render:t,className:n,state:r=Is,props:i=M_,refs:o=M_,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=LW({metadata:a});return jw(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function FW(e,t,n,r){let i=!1,o=!1;const a=Is;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 jW="none",zW=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,...g}=e,y=AW(h||void 0),b=MW(),v=(b==null?void 0:b.value)??[],w=b?void 0:r,S=(i||(b==null?void 0:b.disabled))??!1,[_,k]=RW({controlled:b?y!==void 0&&v.indexOf(y)>-1:u,default:w,name:"Toggle",state:"pressed"}),T=J1((L,M)=>{var B;y&&((B=b==null?void 0:b.setGroupValue)==null||B.call(b,y,L,M)),a==null||a(L,M)}),{getButtonProps:A,buttonRef:D}=z3({disabled:S,native:p}),O={disabled:S,pressed:_},N=[D,t],H=[{"aria-pressed":_,onClick(L){const M=!_,B=FW(jW,L.nativeEvent);T(M,B),!B.isCanceled&&k(M)}},g,A],I=jw("button",e,{enabled:!b,state:O,ref:N,props:H});return b?R.jsx(IW,{tag:"button",render:c,className:n,state:O,refs:N,props:H}):I}),uy=({text:e,icon:t,children:n,...r})=>R.jsx(zW,{...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 R.jsxs(es,{...i,children:[u,a??n]})}});uy.displayName="ToggleButton";const BW="_badge_1nwto_3",UW="_colored_1nwto_37",Ju={badge:BW,"badge-text":"_badge-text_1nwto_15","size-small":"_size-small_1nwto_26","size-medium":"_size-medium_1nwto_29","size-large":"_size-large_1nwto_32",colored:UW},HW=Ju.colored,XO=Object.fromEntries(Object.entries(Nw).map(([e,t])=>[e,`${t} ${HW}`])),GW=Sr({variants:{size:{small:Ju["size-small"],medium:Ju["size-medium"],large:Ju["size-large"]},color:XO},defaultVariants:{size:"medium"}}),Qo=({size:e,color:t,className:n,children:r,...i})=>R.jsx(Ke,{"data-slot":"badge",className:ze(Ju.badge,GW({size:e,color:t}),n),ay:"center",gap:1,...i,children:R.jsx(Pe,{"data-slot":"badge-text",className:Ju["badge-text"],size:-1,weight:"bold",children:r})});Qo.displayName="Badge";const qW="_status_iof57_1",dg={status:qW,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},VW=Sr({variants:{inverted:{true:dg["toggle-inverted"]},pulse:{true:dg["toggle-pulse"]},color:Nw}}),sh=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>R.jsxs(yi,{condition:!!i,render:R.jsx(Ke,{"data-slot":"status",className:ze(dg.status,r),ay:"center",gap:2,...o}),children:[R.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:ze(dg["status-dot"],VW({pulse:e,inverted:t,color:n}))}),i&&R.jsx(Pe,{"data-slot":"status-text",size:0,children:i})]});sh.displayName="Status";const xT={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},YW={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function WW(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();xT[i]?t.add(xT[i]):n=i}return{modifiers:t,key:n}}function KW(e,t){const{modifiers:n,key:r}=WW(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 XW(e){return e.map(t=>YW[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const QW="_kbd_19d6z_1",ZW={kbd:QW},QO=({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=>{KW(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]),R.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:ze(ZW.kbd,e),...r,children:n?XW(n):null})};QO.displayName="Kbd";const ZO="TimelineItem",JW="TimelineMarker",eK="TimelineConnector",tK="TimelineContent",JO=C.createContext(null);function cy(e){const t=C.useContext(JO);if(!t)throw new Error(`\`${e}\` must be used within \`${ZO}\``);return t}function nK(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function rK(e,t){return t!==void 0&&e<t}const iK="_timeline_jo8nv_1",hi={timeline:iK,"timeline-item":"_timeline-item_jo8nv_33","timeline-media":"_timeline-media_jo8nv_43","timeline-rail":"_timeline-rail_jo8nv_53","timeline-marker-box":"_timeline-marker-box_jo8nv_66","timeline-connector":"_timeline-connector_jo8nv_76","connector-active":"_connector-active_jo8nv_88","timeline-marker":"_timeline-marker_jo8nv_66","timeline-content":"_timeline-content_jo8nv_132"},rS=Sr({variants:{color:XO}}),oK=Sr({base:hi["timeline-item"]}),sK=Sr({base:hi["timeline-marker"],variants:{status:{completed:hi["status-completed"],active:hi["status-active"],pending:hi["status-pending"]}},defaultVariants:{status:"pending"}}),aK=Sr({base:hi["timeline-connector"],variants:{active:{true:hi["connector-active"]}},defaultVariants:{active:!1}}),e$=({className:e,children:t,...n})=>R.jsx("div",{"data-slot":"timeline-media",className:ze(hi["timeline-media"],e),...n,children:t});e$.displayName="TimelineMedia";const t$=({color:e,className:t,children:n,...r})=>{const{status:i}=cy(JW),o=n!=null?"content":"dot";return R.jsx("div",{"data-slot":"timeline-marker","data-variant":o,"data-status":i,className:ze(sK({status:i}),rS({color:e}),t),...r,children:n})};t$.displayName="TimelineMarker";const n$=({forceMount:e,className:t,...n})=>{const{isLast:r,connectorActive:i}=cy(eK);return r&&!e?null:R.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-active":i?"":void 0,className:ze(aK({active:i}),t),...n})};n$.displayName="TimelineConnector";const r$=({className:e,children:t,...n})=>{const{status:r}=cy(tK);return R.jsx(Ye,{"data-slot":"timeline-content","data-status":r,className:ze(hi["timeline-content"],e),gap:1,fullwidth:!0,ax:"stretch",...n,children:t})};r$.displayName="TimelineContent";const i$=({children:e,...t})=>R.jsx(Pe,{"data-slot":"timeline-title",size:1,weight:"bold",...t,children:e});i$.displayName="TimelineTitle";const o$=({children:e,...t})=>R.jsx(Pe,{"data-slot":"timeline-time",render:R.jsx("time",{}),shade:"muted",size:-1,...t,children:e});o$.displayName="TimelineTime";const s$=({children:e,...t})=>R.jsx(Pe,{"data-slot":"timeline-description",shade:"muted",size:0,...t,children:e});s$.displayName="TimelineDescription";const a$=({title:e,time:t,description:n,color:r,media:i,content:o,className:a,children:u,MediaProps:c,MarkerProps:f,ConnectorProps:h,ContentProps:p,TitleProps:g,TimeProps:y,DescriptionProps:b,...v})=>{const{status:w}=cy(ZO),S=e!=null||t!=null;return R.jsxs("li",{"data-slot":"timeline-item","data-status":w,"aria-current":w==="active"?"step":void 0,className:ze(oK(),a),...v,children:[i!=null&&R.jsx(e$,{...c,children:i}),R.jsxs("div",{"data-slot":"timeline-rail",className:ze(hi["timeline-rail"],rS({color:r})),children:[R.jsx("div",{className:hi["timeline-marker-box"],children:R.jsx(t$,{...f})}),R.jsx(n$,{...h})]}),R.jsxs(r$,{...p,children:[S&&R.jsxs(Ke,{gap:2,ay:"baseline","data-slot":"timeline-heading",children:[e!=null&&R.jsx(i$,{...g,children:e}),t!=null&&R.jsx(o$,{...y,children:t})]}),n!=null&&R.jsx(s$,{...b,children:n}),o,u]})]})};a$.displayName="TimelineItem";function l$({items:e,activeIndex:t,color:n,dir:r,className:i,children:o,ItemProps:a,...u}){const c=e?e.map((y,b)=>R.jsx(a$,{...a,...y},b)):o,f=C.Children.toArray(c),h=f.length,p=f.some(y=>C.isValidElement(y)&&y.props.media!=null),g=C.useMemo(()=>Array.from({length:h},(y,b)=>({index:b,status:nK(b,t),isLast:b===h-1,connectorActive:rK(b,t)})),[h,t]);return R.jsx("ol",{"data-slot":"timeline","data-has-media":p?"":void 0,className:ze(hi.timeline,rS({color:n}),i),dir:r,...u,children:f.map((y,b)=>R.jsx(JO.Provider,{value:g[b],children:y},b))})}l$.displayName="Timeline";const lK="typescript",u$=!1,uK=!0,c$="",f$=!1,d$={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},Vp={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},cK=Sr({base:[Vp["code-typography"],Vp["shiki-theme"],Vp["shiki-reset"]],variants:{showLineNumbers:{true:Vp["line-numbers"]}},defaultVariants:{showLineNumbers:u$}}),fK="modulepreload",dK=function(e){return"/"+e},wT={},ii=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=dK(f),f in wT)return;wT[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":fK,h||(g.as="script"),g.crossOrigin="",g.href=f,c&&g.setAttribute("nonce",c),document.head.appendChild(g),h)return new Promise((y,b)=>{g.addEventListener("load",y),g.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 An=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function hK(e){return iS(e)}function iS(e){return Array.isArray(e)?pK(e):e instanceof RegExp?e:typeof e=="object"?mK(e):e}function pK(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=iS(e[n]);return t}function mK(e){let t={};for(let n in e)t[n]=iS(e[n]);return t}function h$(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function p$(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?p$(e.substring(0,e.length-1)):e.substr(~t+1)}var $v=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yp=class{static hasCaptures(e){return e===null?!1:($v.lastIndex=0,$v.test(e))}static replaceCaptures(e,t,n){return e.replace($v,(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 m$(e,t){return e<t?-1:e>t?1:0}function g$(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=m$(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function ST(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 y$(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var b$=class{constructor(e){ne(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}},hg=class{constructor(e,t,n){ne(this,"_cachedMatchRoot",new b$(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(bK(e),t)}static createFromParsedTheme(e,t){return xK(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=>gK(e.parent,i.parentScopes));return r?new v$(r.fontStyle,r.foreground,r.background):null}},Nv=class $m{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new $m(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new $m(n,t[r]);return n}push(t){return new $m(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 gK(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&&!yK(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function yK(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var v$=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function bK(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 g=0,y=p.length;g<y;g++)switch(p[g]){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"&&ST(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&ST(a.settings.background)&&(h=a.settings.background);for(let p=0,g=u.length;p<g;p++){let b=u[p].trim().split(" "),v=b[b.length-1],w=null;b.length>1&&(w=b.slice(0,b.length-1),w.reverse()),n[r++]=new vK(v,w,i,c,f,h)}}return n}var vK=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 xK(e,t){e.sort((c,f)=>{let h=m$(c.scope,f.scope);return h!==0||(h=g$(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 wK(t),a=new v$(n,o.getId(r),o.getId(i)),u=new CK(new xx(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 hg(o,a,u)}var wK=class{constructor(e){ne(this,"_isFrozen");ne(this,"_lastColorId");ne(this,"_id2color");ne(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)}},SK=Object.freeze([]),xx=class x${constructor(t,n,r,i,o){ne(this,"scopeDepth");ne(this,"parentScopes");ne(this,"fontStyle");ne(this,"foreground");ne(this,"background");this.scopeDepth=t,this.parentScopes=n||SK,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new x$(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)}},CK=class wx{constructor(t,n=[],r={}){ne(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(wx._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 wx(this._mainRule.clone(),xx.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(g$(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 xx(t,n,r,i,o))}},Rc=class ni{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=ni.getLanguageId(t),r=ni.getTokenType(t),i=ni.getFontStyle(t),o=ni.getForeground(t),a=ni.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=ni.getLanguageId(t),f=ni.getTokenType(t),h=ni.containsBalancedBrackets(t)?1:0,p=ni.getFontStyle(t),g=ni.getForeground(t),y=ni.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(p=o),a!==0&&(g=a),u!==0&&(y=u),(c<<0|f<<8|h<<10|p<<11|g<<15|y<<24)>>>0}};function pg(e,t){const n=[],r=EK(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(CT(i)){const c=[];do c.push(i),i=r.next();while(CT(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 CT(e){return!!e&&!!e.match(/[\w\.:]+/)}function EK(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 w$(e){typeof e.dispose=="function"&&e.dispose()}var Nd=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},kK=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},RK=class{constructor(){ne(this,"_references",[]);ne(this,"_seenReferenceKeys",new Set);ne(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))}},_K=class{constructor(e,t){ne(this,"seenFullScopeRequests",new Set);ne(this,"seenPartialScopeRequests",new Set);ne(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Nd(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new RK;for(const n of e)TK(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Nd){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 TK(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 Nd?Nm({baseGrammar:o,selfGrammar:i},r):Sx(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 Nd(u))}function Sx(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];mg([r],t,n)}}function Nm(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&mg(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&mg(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function mg(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?h$({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&mg(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=S$(o);switch(a.kind){case 0:Nm({...t,selfGrammar:t.baseGrammar},n);break;case 1:Nm(t,n);break;case 2:Sx(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?Sx(a.ruleName,c,n):Nm(c,n)}else a.kind===4?n.add(new kK(a.scopeName,a.ruleName)):n.add(new Nd(a.scopeName));break}}}var AK=class{constructor(){ne(this,"kind",0)}},DK=class{constructor(){ne(this,"kind",1)}},MK=class{constructor(e){ne(this,"kind",2);this.ruleName=e}},OK=class{constructor(e){ne(this,"kind",3);this.scopeName=e}},$K=class{constructor(e,t){ne(this,"kind",4);this.scopeName=e,this.ruleName=t}};function S$(e){if(e==="$base")return new AK;if(e==="$self")return new DK;const t=e.indexOf("#");if(t===-1)return new OK(e);if(t===0)return new MK(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new $K(n,r)}}var NK=/\\(\d+)/,ET=/\\(\d+)/g,PK=-1,C$=-2;var ah=class{constructor(e,t,n,r){ne(this,"$location");ne(this,"id");ne(this,"_nameIsCapturing");ne(this,"_name");ne(this,"_contentNameIsCapturing");ne(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Yp.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Yp.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${p$(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:Yp.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yp.replaceCaptures(this._contentName,e,t)}},LK=class extends ah{constructor(t,n,r,i,o){super(t,n,r,i);ne(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!")}},IK=class extends ah{constructor(t,n,r,i,o){super(t,n,r,null);ne(this,"_match");ne(this,"captures");ne(this,"_cachedCompiledPatterns");this._match=new Pd(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 Ld,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},kT=class extends ah{constructor(t,n,r,i,o){super(t,n,r,i);ne(this,"hasMissingPatterns");ne(this,"patterns");ne(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 Ld,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Cx=class extends ah{constructor(t,n,r,i,o,a,u,c,f,h){super(t,n,r,i);ne(this,"_begin");ne(this,"beginCaptures");ne(this,"_end");ne(this,"endHasBackReferences");ne(this,"endCaptures");ne(this,"applyEndPatternLast");ne(this,"hasMissingPatterns");ne(this,"patterns");ne(this,"_cachedCompiledPatterns");this._begin=new Pd(o,this.id),this.beginCaptures=a,this._end=new Pd(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 Ld;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}},gg=class extends ah{constructor(t,n,r,i,o,a,u,c,f){super(t,n,r,i);ne(this,"_begin");ne(this,"beginCaptures");ne(this,"whileCaptures");ne(this,"_while");ne(this,"whileHasBackReferences");ne(this,"hasMissingPatterns");ne(this,"patterns");ne(this,"_cachedCompiledPatterns");ne(this,"_cachedCompiledWhilePatterns");this._begin=new Pd(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new Pd(u,C$),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 Ld;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 Ld,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},E$=class Un{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new LK(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new IK(t.$vscodeTextmateLocation,t.id,t.name,t.match,Un._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=h$({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new kT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Un._compilePatterns(o,n,r))}return t.while?new gg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Un._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Un._compileCaptures(t.whileCaptures||t.captures,n,r),Un._compilePatterns(t.patterns,n,r)):new Cx(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Un._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Un._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Un._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=Un.getCompiledRuleId(t[a],n,r)),i[u]=Un.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=S$(u.include);switch(f.kind){case 0:case 1:c=Un.getCompiledRuleId(r[u.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=Un.getCompiledRuleId(h,n,r));break;case 3:case 4:const p=f.scopeName,g=f.kind===4?f.ruleName:null,y=n.getExternalGrammar(p,r);if(y)if(g){let b=y.repository[g];b&&(c=Un.getCompiledRuleId(b,n,y.repository))}else c=Un.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else c=Un.getCompiledRuleId(u,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof kT||f instanceof Cx||f instanceof gg)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Pd=class k${constructor(t,n){ne(this,"source");ne(this,"ruleId");ne(this,"hasAnchor");ne(this,"hasBackReferences");ne(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=NK.test(this.source):this.hasBackReferences=!1}clone(){return new k$(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 ET.lastIndex=0,this.source.replace(ET,(i,o)=>y$(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}},Ld=class{constructor(){ne(this,"_items");ne(this,"_hasAnchors");ne(this,"_cached");ne(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 RT(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 RT(e,r,this._items.map(i=>i.ruleId))}},RT=class{constructor(e,t,n){ne(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(`
|
|
328
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Pv=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Bo,FK=(Bo=class{constructor(t,n){ne(this,"_defaultAttributes");ne(this,"_embeddedLanguagesMatcher");ne(this,"_getBasicScopeAttributes",new b$(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Pv(n,r)}));this._defaultAttributes=new Pv(t,8),this._embeddedLanguagesMatcher=new jK(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Bo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Bo.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!")}},ne(Bo,"_NULL_SCOPE_METADATA",new Pv(0,0)),ne(Bo,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Bo),jK=class{constructor(e){ne(this,"values");ne(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>y$(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])}},_T=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function R$(e,t,n,r,i,o,a,u){const c=t.content.length;let f=!1,h=-1;if(a){const y=zK(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 _T(i,!0);g()}return new _T(i,!1);function g(){const y=BK(e,t,n,r,i,h);if(!y){o.produce(i,c),f=!0;return}const b=y.captureIndices,v=y.matchedRuleId,w=b&&b.length>0?b[0].end>r:!1;if(v===PK){const S=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),ud(e,t,n,i,o,S.endCaptures,b),o.produce(i,b[0].end);const _=i;if(i=i.parent,h=_.getAnchorPos(),!w&&_.getEnterPos()===r){i=_,o.produce(i,c),f=!0;return}}else{const S=e.getRule(v);o.produce(i,b[0].start);const _=i,k=S.getName(t.content,b),T=i.contentNameScopesList.pushAttributed(k,e);if(i=i.push(v,r,h,b[0].end===c,null,T,T),S instanceof Cx){const A=S;ud(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))),!w&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(S instanceof gg){const A=S;ud(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))),!w&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(ud(e,t,n,i,o,S.captures,b),o.produce(i,b[0].end),i=i.pop(),!w){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function zK(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 gg&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=GK(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==C$){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),ud(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 BK(e,t,n,r,i,o){const a=UK(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return a;const c=HK(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 UK(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:u,findOptions:c}=_$(a,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function HK(e,t,n,r,i,o,a){let u=Number.MAX_VALUE,c=null,f,h=0;const p=o.contentNameScopesList.getScopeNames();for(let g=0,y=e.length;g<y;g++){const b=e[g];if(!b.matcher(p))continue;const v=t.getRule(b.ruleId),{ruleScanner:w,findOptions:S}=_$(v,t,null,r,i===a),_=w.findNextMatchSync(n,i,S);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 _$(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function GK(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ud(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 g=o[p];if(g===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),g.retokenizeCapturedWithRuleId){const v=g.getName(u,a),w=r.contentNameScopesList.pushAttributed(v,e),S=g.getContentName(u,a),_=w.pushAttributed(S,e),k=r.push(g.retokenizeCapturedWithRuleId,y.start,-1,!1,null,w,_),T=e.createOnigString(u.substring(0,y.end));R$(e,T,n&&y.start===0,y.start,k,i,!1,0),w$(T);continue}const b=g.getName(u,a);if(b!==null){const w=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new qK(w,y.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var qK=class{constructor(e,t){ne(this,"scopes");ne(this,"endPos");this.scopes=e,this.endPos=t}};function VK(e,t,n,r,i,o,a,u){return new WK(e,t,n,r,i,o,a,u)}function TT(e,t,n,r,i){const o=pg(t,yg),a=E$.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 yg(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(YK(t[i],r))return n=i+1,!0;return!1})}function YK(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 WK=class{constructor(e,t,n,r,i,o,a,u){ne(this,"_rootId");ne(this,"_lastRuleId");ne(this,"_ruleId2desc");ne(this,"_includedGrammars");ne(this,"_grammarRepository");ne(this,"_grammar");ne(this,"_injections");ne(this,"_basicScopeAttributesProvider");ne(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new FK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=AT(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=pg(c,yg);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)TT(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&&TT(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]=AT(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=E$.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Ex.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=Rc.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),g=this.getRule(this._rootId).getName(null,null);let y;g?y=pd.createRootAndLookUpScopeName(g,p,this):y=pd.createRoot("unknown",p),t=new Ex(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
|
|
329
|
+
`;const o=this.createOnigString(e),a=o.content.length,u=new XK(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=R$(this,o,i,0,t,u,!0,r);return w$(o),{lineLength:a,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function AT(e,t){return e=hK(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 pd=class Ui{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=Nv.push(i,o.scopeNames),r=new Ui(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Ui(null,new Nv(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new Nv(null,t),a=r.themeProvider.themeMatch(o),u=Ui.mergeAttributes(n,i,a);return new Ui(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ui.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),Rc.set(t,n.languageId,n.tokenType,null,i,o,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ui._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Ui._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=Ui.mergeAttributes(t.tokenAttributes,i,a);return new Ui(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}},ci,Ex=(ci=class{constructor(t,n,r,i,o,a,u,c){ne(this,"_stackElementBrand");ne(this,"_enterPos");ne(this,"_anchorPos");ne(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:ci._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?pd.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(){ci._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,u){return new ci(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 ci(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=pd.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ci(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,pd.fromExtension(r,n.contentNameScopesList))}},ne(ci,"NULL",new ci(null,0,0,0,!1,null,null,null)),ci),KK=class{constructor(e,t){ne(this,"balancedBracketScopes");ne(this,"unbalancedBracketScopes");ne(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):pg(n,yg).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>pg(n,yg).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}},XK=class{constructor(e,t,n,r){ne(this,"_emitBinaryTokens");ne(this,"_lineText");ne(this,"_tokens");ne(this,"_binaryTokens");ne(this,"_lastTokenEndIndex");ne(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=Rc.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=Rc.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}},QK=class{constructor(e,t){ne(this,"_grammars",new Map);ne(this,"_rawGrammars",new Map);ne(this,"_injectionGrammars",new Map);ne(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,VK(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ZK=class{constructor(t){ne(this,"_options");ne(this,"_syncRegistry");ne(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new QK(hg.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(hg.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 KK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new _K(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)}},kx=Ex.NULL;const JK=["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 T$(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 Rx(e){return e.toLowerCase()}class Cr{constructor(t,n){this.attribute=n,this.property=t}}Cr.prototype.attribute="";Cr.prototype.booleanish=!1;Cr.prototype.boolean=!1;Cr.prototype.commaOrSpaceSeparated=!1;Cr.prototype.commaSeparated=!1;Cr.prototype.defined=!1;Cr.prototype.mustUseProperty=!1;Cr.prototype.number=!1;Cr.prototype.overloadedBoolean=!1;Cr.prototype.property="";Cr.prototype.spaceSeparated=!1;Cr.prototype.space=void 0;let eX=0;const ut=Bl(),bn=Bl(),_x=Bl(),Ae=Bl(),Yt=Bl(),ec=Bl(),Or=Bl();function Bl(){return 2**++eX}const Tx=Object.freeze(Object.defineProperty({__proto__:null,boolean:ut,booleanish:bn,commaOrSpaceSeparated:Or,commaSeparated:ec,number:Ae,overloadedBoolean:_x,spaceSeparated:Yt},Symbol.toStringTag,{value:"Module"})),Lv=Object.keys(Tx);class oS extends Cr{constructor(t,n,r,i){let o=-1;if(super(t,n),DT(this,"space",i),typeof r=="number")for(;++o<Lv.length;){const a=Lv[o];DT(this,Lv[o],(r&Tx[a])===Tx[a])}}}oS.prototype.defined=!0;function DT(e,t,n){n&&(e[t]=n)}function Hc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new oS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Rx(r)]=r,n[Rx(o.attribute)]=r}return new lh(t,n,e.space)}const A$=Hc({properties:{ariaActiveDescendant:null,ariaAtomic:bn,ariaAutoComplete:null,ariaBusy:bn,ariaChecked:bn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Yt,ariaCurrent:null,ariaDescribedBy:Yt,ariaDetails:null,ariaDisabled:bn,ariaDropEffect:Yt,ariaErrorMessage:null,ariaExpanded:bn,ariaFlowTo:Yt,ariaGrabbed:bn,ariaHasPopup:null,ariaHidden:bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yt,ariaLevel:Ae,ariaLive:null,ariaModal:bn,ariaMultiLine:bn,ariaMultiSelectable:bn,ariaOrientation:null,ariaOwns:Yt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:bn,ariaReadOnly:bn,ariaRelevant:null,ariaRequired:bn,ariaRoleDescription:Yt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:bn,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 D$(e,t){return t in e?e[t]:t}function M$(e,t){return D$(e,t.toLowerCase())}const tX=Hc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ec,acceptCharset:Yt,accessKey:Yt,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:Yt,autoFocus:ut,autoPlay:ut,blocking:Yt,capture:null,charSet:null,checked:ut,cite:null,className:Yt,cols:Ae,colSpan:null,content:null,contentEditable:bn,controls:ut,controlsList:Yt,coords:Ae|ec,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:_x,draggable:bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:Yt,height:Ae,hidden:_x,high:Ae,href:null,hrefLang:null,htmlFor:Yt,httpEquiv:Yt,id:null,imageSizes:null,imageSrcSet:null,inert:ut,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:Yt,itemRef:Yt,itemScope:ut,itemType:Yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:Ae,pattern:null,ping:Yt,placeholder:null,playsInline:ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:Yt,required:ut,reversed:ut,rows:Ae,rowSpan:Ae,sandbox:Yt,scope:null,scoped:ut,seamless:ut,selected:ut,shadowRootClonable:ut,shadowRootDelegatesFocus:ut,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:bn,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:ut,useMap:null,value:bn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yt,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:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:bn,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:ut,disableRemotePlayback:ut,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:M$}),nX=Hc({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:Or,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:Yt,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:ut,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:ec,g2:ec,glyphName:ec,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:Or,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:Yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Or,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Or,rev:Or,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Or,requiredFeatures:Or,requiredFonts:Or,requiredFormats:Or,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:Or,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:Or,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:Or,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:D$}),O$=Hc({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()}}),$$=Hc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:M$}),N$=Hc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rX={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"},iX=/[A-Z]/g,MT=/-[a-z]/g,oX=/^data[-\w.:]+$/i;function P$(e,t){const n=Rx(t);let r=t,i=Cr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oX.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(MT,aX);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!MT.test(o)){let a=o.replace(iX,sX);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=oS}return new i(r,t)}function sX(e){return"-"+e.toLowerCase()}function aX(e){return e.charAt(1).toUpperCase()}const L$=T$([A$,tX,O$,$$,N$],"html"),uh=T$([A$,nX,O$,$$,N$],"svg"),OT={}.hasOwnProperty;function lX(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const u=r.handlers;if(i&&OT.call(i,e)){const c=String(i[e]);a=OT.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 uX=/["&'<>`]/g,cX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fX=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,dX=/[|\\{}()[\]^$+*?.]/g,$T=new WeakMap;function hX(e,t){if(e=e.replace(t.subset?pX(t.subset):uX,r),t.subset||t.escapeOnly)return e;return e.replace(cX,n).replace(fX,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 pX(e){let t=$T.get(e);return t||(t=mX(e),$T.set(e,t)),t}function mX(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(dX,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const gX=/[\dA-Fa-f]/;function yX(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!gX.test(String.fromCharCode(t))?r:r+";"}const bX=/\d/;function vX(e,t,n){const r="&#"+String(e);return n&&t&&!bX.test(String.fromCharCode(t))?r:r+";"}const xX=["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"],Iv={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:"€"},wX=["cent","copy","divide","gt","lt","not","para","times"],I$={}.hasOwnProperty,Ax={};let Wp;for(Wp in Iv)I$.call(Iv,Wp)&&(Ax[Iv[Wp]]=Wp);const SX=/[^\dA-Za-z]/;function CX(e,t,n,r){const i=String.fromCharCode(e);if(I$.call(Ax,i)){const o=Ax[i],a="&"+o;return n&&xX.includes(o)&&!wX.includes(o)&&(!r||t&&t!==61&&SX.test(String.fromCharCode(t)))?a:a+";"}return""}function EX(e,t,n){let r=yX(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=CX(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=vX(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function tc(e,t){return hX(e,Object.assign({format:EX},t))}const kX=/^>|^->|<!--|-->|--!>|<!-$/g,RX=[">"],_X=["<",">"];function TX(e,t,n,r){return r.settings.bogusComments?"<?"+tc(e.value,Object.assign({},r.settings.characterReferences,{subset:RX}))+">":"<!--"+e.value.replace(kX,i)+"-->";function i(o){return tc(o,Object.assign({},r.settings.characterReferences,{subset:_X}))}}function AX(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function bg(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 F$(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function j$(e){return e.join(" ").trim()}const DX=/[ \t\n\f\r]/g;function fy(e){return typeof e=="object"?e.type==="text"?NT(e.value):!1:NT(e)}function NT(e){return e.replace(DX,"")===""}const kn=B$(1),z$=B$(-1),MX=[];function B$(e){return t;function t(n,r,i){const o=n?n.children:MX;let a=(r||0)+e,u=o[a];if(!i)for(;u&&fy(u);)a+=e,u=o[a];return u}}const OX={}.hasOwnProperty;function U$(e){return t;function t(n,r,i){return OX.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const sS=U$({body:NX,caption:Fv,colgroup:Fv,dd:FX,dt:IX,head:Fv,html:$X,li:LX,optgroup:jX,option:zX,p:PX,rp:PT,rt:PT,tbody:UX,td:LT,tfoot:HX,th:LT,thead:BX,tr:GX});function Fv(e,t,n){const r=kn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&fy(r.value.charAt(0)))}function $X(e,t,n){const r=kn(n,t);return!r||r.type!=="comment"}function NX(e,t,n){const r=kn(n,t);return!r||r.type!=="comment"}function PX(e,t,n){const r=kn(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 LX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function IX(e,t,n){const r=kn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function FX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function PT(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function jX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function zX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function BX(e,t,n){const r=kn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function UX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function HX(e,t,n){return!kn(n,t)}function GX(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function LT(e,t,n){const r=kn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const qX=U$({body:WX,colgroup:KX,head:YX,html:VX,tbody:XX});function VX(e){const t=kn(e,-1);return!t||t.type!=="comment"}function YX(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 WX(e){const t=kn(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 KX(e,t,n){const r=z$(n,t),i=kn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&sS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function XX(e,t,n){const r=z$(n,t),i=kn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&sS(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Kp={name:[[`
|
|
330
|
+
\f\r &/=>`.split(""),`
|
|
331
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
332
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
333
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
334
|
+
\f\r &>`.split(""),`\0
|
|
335
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
336
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
337
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function QX(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=uh);const f=ZX(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!qX(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||!sS(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function ZX(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=JX(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 JX(e,t,n){const r=P$(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=tc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Kp.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?F$:j$)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=tc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Kp.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&bg(n,a)>bg(n,e.alternative)&&(a=e.alternative),u=a+tc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Kp.single:Kp.double)[i][o],attribute:!0}))+a),c+(u&&"="+u))}const eQ=["<","&"];function H$(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:tc(e.value,Object.assign({},r.settings.characterReferences,{subset:eQ}))}function tQ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:H$(e,t,n,r)}function nQ(e,t,n,r){return r.all(e)}const rQ=lX("type",{invalid:iQ,unknown:oQ,handlers:{comment:TX,doctype:AX,element:QX,raw:tQ,root:nQ,text:H$}});function iQ(e){throw new Error("Expected node, not `"+e+"`")}function oQ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const sQ={},aQ={},lQ=[];function uQ(e,t){const n=t||sQ,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:cQ,all:fQ,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||JK,characterReferences:n.characterReferences||aQ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?uh:L$,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function cQ(e,t,n){return rQ(e,t,n,this)}function fQ(e){const t=[],n=e&&e.children||lQ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function vg(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 oa(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function dQ(e){return Array.isArray(e)?e:[e]}async function G$(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function aS(e){return!e||["plaintext","txt","text","plain"].includes(e)}function hQ(e){return e==="ansi"||aS(e)}function lS(e){return e==="none"}function pQ(e){return lS(e)}function q$(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 dy(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 mQ(e){const t=dy(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 uS="light-dark()",gQ=["color","background-color"];function yQ(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 bQ(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?yQ(i,o):i})):e}function vQ(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>xg(e.variants[h])),u=new Set(a.flatMap(h=>Object.keys(h))),c={},f=(h,p)=>{const g=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[h]+(p==="color"?"":g)};return a.forEach((h,p)=>{for(const g of u){const y=h[g]||"inherit";if(p===0&&r&&gQ.includes(g))if(r===uS&&a.length>1){const b=t.findIndex(_=>_==="light"),v=t.findIndex(_=>_==="dark");if(b===-1||v===-1)throw new An('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const w=a[b][g]||"inherit",S=a[v][g]||"inherit";c[g]=`light-dark(${w}, ${S})`,i==="css-vars"&&(c[f(p,g)]=y)}else c[g]=y;else i==="css-vars"&&(c[f(p,g)]=y)}}),o.htmlStyle=c,o}function xg(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 Dx(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const V$=new WeakMap;function hy(e,t){V$.set(e,t)}function Id(e){return V$.get(e)}class Gc{constructor(...t){ne(this,"_stacks",{});ne(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 Gc(Object.fromEntries(dQ(n).map(r=>[r,kx])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return xQ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function xQ(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 wQ(e,t){if(!(e instanceof Gc))throw new An("Invalid grammar state");return e.getInternalStack(t)}function SQ(){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 An(`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 An(`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 An(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${u.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=mQ(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));CQ(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 bQ(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 An(`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,g,y,b){const v=i[p];let w="",S=-1,_=-1;if(g===0&&(S=0),y===0&&(_=0),y===Number.POSITIVE_INFINITY&&(_=v.children.length),S===-1||_===-1)for(let T=0;T<v.children.length;T++)w+=Y$(v.children[T]),S===-1&&w.length===g&&(S=T+1),_===-1&&w.length===y&&(_=T+1);if(S===-1)throw new An(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(_===-1)throw new An(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const k=v.children.slice(S,_);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(S,k.length,T)}}function a(p,g){i[p]=u(i[p],g,"line")}function u(p,g,y){var w;const b=g.properties||{},v=g.transform||(S=>S);return p.tagName=g.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(w=g.properties)!=null&&w.class&&q$(p,g.properties.class),p=v(p,y)||p,p}const c=[],f=r.decorations.sort((p,g)=>g.start.offset-p.start.offset||p.end.offset-g.end.offset);for(const p of f){const{start:g,end:y}=p;if(g.line===y.line)o(g.line,g.character,y.character,p);else if(g.line<y.line){o(g.line,g.character,Number.POSITIVE_INFINITY,p);for(let b=g.line+1;b<y.line;b++)c.unshift(()=>a(b,p));o(y.line,0,y.character,p)}}c.forEach(p=>p())}}}function CQ(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new An(`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 An(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function Y$(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Y$).join(""):""}const EQ=[SQ()];function wg(e){const t=kQ(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...EQ]}function kQ(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 sl=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jv={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function RQ(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 IT(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 _Q(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)jv[r]&&t.push({type:"setDecoration",value:jv[r]});else if(r<=29){const i=jv[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:sl[r-30]}});else if(r===38){const i=IT(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:sl[r-40]}});else if(r===48){const i=IT(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:sl[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:sl[r-100+8]}})}return t}function TQ(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=RQ(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=_Q(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 AQ={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 DQ(e=AQ){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<sl.length;f++)r.push(t(sl[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 MQ={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 OQ(e,t,n){const r=vg(e,n),i=dy(t),o=Object.fromEntries(sl.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||MQ[c]]})),a=DQ(o),u=TQ();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=oa(h,r),p=oa(p,r),f.decorations.has("dim")&&(h=$Q(h));let g=qn.None;return f.decorations.has("bold")&&(g|=qn.Bold),f.decorations.has("italic")&&(g|=qn.Italic),f.decorations.has("underline")&&(g|=qn.Underline),f.decorations.has("strikethrough")&&(g|=qn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:g}}))}function $Q(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 cS(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(aS(i)||lS(r))return dy(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return OQ(o,t,n);const u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new An(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new An(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return PQ(t,u,o,a,n)}function NQ(...e){if(e.length===2)return Id(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(aS(i)||lS(o))throw new An("Plain language does not have grammar state");if(i==="ansi")throw new An("ANSI language does not have grammar state");const{theme:a,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new Gc(fS(n,c,a,u,r).stateStack,c.name,a.name)}function PQ(e,t,n,r,i){const o=fS(e,t,n,r,i),a=new Gc(o.stateStack,t.name,n.name);return hy(o.tokens,a),o.tokens}function fS(e,t,n,r,i){const o=vg(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:u=500}=i,c=dy(e);let f=i.grammarState?wQ(i.grammarState,n.name)??kx:i.grammarContextCode!=null?fS(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:kx,h=[];const p=[];for(let g=0,y=c.length;g<y;g++){const[b,v]=c[g];if(b===""){h=[],p.push([]);continue}if(a>0&&b.length>=a){h=[],p.push([{content:b,offset:v,color:"",fontStyle:0}]);continue}let w,S,_;i.includeExplanation&&(w=t.tokenizeLine(b,f,u),S=w.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 N=k.tokens[2*A+1],H=oa(r[Rc.getForeground(N)],o),I=Rc.getFontStyle(N),L={content:b.substring(D,O),offset:v+D,color:H,fontStyle:I};if(i.includeExplanation){const M=[];if(i.includeExplanation!=="scopeName")for(const q of n.settings){let F;switch(typeof q.scope){case"string":F=q.scope.split(/,/).map(j=>j.trim());break;case"object":F=q.scope;break;default:continue}M.push({settings:q,selectors:F.map(j=>j.split(/ /))})}L.explanation=[];let B=0;for(;D+B<O;){const q=S[_],F=b.substring(q.startIndex,q.endIndex);B+=F.length,L.explanation.push({content:F,scopes:i.includeExplanation==="scopeName"?LQ(q.scopes):IQ(M,q.scopes)}),_+=1}}h.push(L)}p.push(h),h=[],f=k.ruleStack}return{tokens:p,stateStack:f}}function LQ(e){return e.map(t=>({scopeName:t}))}function IQ(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:jQ(e,o,t.slice(0,r))}}return n}function FT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function FQ(e,t,n){if(!FT(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)FT(e[r],n[i])&&(r-=1),i-=1;return r===-1}function jQ(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(FQ(a,t,n)){r.push(o);break}return r}function W$(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=cS(e,t,{...n,theme:c.theme}),h=Id(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=zQ(...i.map(c=>c.tokens)),a=o[0].map((c,f)=>c.map((h,p)=>{const g={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=h.explanation),o.forEach((y,b)=>{const{content:v,explanation:w,offset:S,..._}=y[f][p];g.variants[r[b].color]=_}),g})),u=i[0].state?new Gc(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&&hy(a,u),a}function zQ(...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 Sg(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,g=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,_)=>S.color===f?-1:_.color===f?1:0);if(g.length===0)throw new An("`themes` option must not be empty");const y=W$(e,t,n);if(c=Id(y),f&&uS!==f&&!g.find(S=>S.color===f))throw new An(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=g.map(S=>e.getTheme(S.theme)),v=g.map(S=>S.color);o=y.map(S=>S.map(_=>vQ(_,v,h,f,p))),c&&hy(o,c);const w=g.map(S=>vg(S.theme,n));i=jT(g,b,w,h,f,"fg",p),r=jT(g,b,w,h,f,"bg",p),a=`shiki-themes ${b.map(S=>S.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=vg(n.theme,n);o=cS(e,t,n);const h=e.getTheme(n.theme);r=oa(h.bg,f),i=oa(h.fg,f),a=h.name,c=Id(o)}else throw new An("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:u,grammarState:c}}function jT(e,t,n,r,i,o,a){return e.map((u,c)=>{const f=oa(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===uS&&e.length>1){const p=e.findIndex(v=>v.color==="light"),g=e.findIndex(v=>v.color==="dark");if(p===-1||g===-1)throw new An('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=oa(t[p][o],n[p])||"inherit",b=oa(t[g][o],n[g])||"inherit";return`light-dark(${y}, ${b});${h}`}return f}return a==="css-vars"?h:null}).filter(u=>!!u).join(";")}function Cg(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>Cg(e,i,o),codeToTokens:(i,o)=>Sg(e,i,o)}){var b,v;let i=t;for(const w of wg(n))i=((b=w.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:a,bg:u,themeName:c,rootStyle:f,grammarState:h}=Sg(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:g=!1}=n;p===!0?o=UQ(o):p==="never"&&(o=HQ(o)),g&&(o=GQ(o));const y={...r,get source(){return i}};for(const w of wg(n))o=((v=w.tokens)==null?void 0:v.call(y,o))||o;return BQ(o,{...n,fg:a,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,h)}function BQ(e,t,n,r=Id(e)){var v,w,S,_;const i=wg(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 g=[],y={...n,structure:u,addClassToHast:q$,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 g}};if(e.forEach((k,T)=>{var O,N;T&&(u==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
338
|
+
`}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const H of k){let I={type:"element",tagName:"span",properties:{...H.htmlAttrs},children:[{type:"text",value:H.content}]};const L=Dx(H.htmlStyle||xg(H));L&&(I.properties.style=L);for(const M of i)I=((O=M==null?void 0:M.span)==null?void 0:O.call(y,I,T+1,D,A,H))||I;u==="inline"?a.children.push(I):u==="classic"&&A.children.push(I),D+=H.content.length}if(u==="classic"){for(const H of i)A=((N=H==null?void 0:H.line)==null?void 0:N.call(y,A,T+1))||A;g.push(A),o.push(A)}else u==="inline"&&g.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=((w=k==null?void 0:k.pre)==null?void 0:w.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=((S=O==null?void 0:O.code)==null?void 0:S.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 N=D.children[O];N.type==="element"&&a.children.push(...N.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&&hy(b,r),b}function UQ(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 HQ(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 GQ(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=Dx(i.htmlStyle||xg(i)),a=Dx(r.htmlStyle||xg(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 qQ=uQ;function VQ(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,u)=>Cg(e,a,u),codeToTokens:(a,u)=>Sg(e,a,u)};let i=qQ(Cg(e,t,n,r));for(const a of wg(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const zT={light:"#333333",dark:"#bbbbbb"},BT={light:"#fffffe",dark:"#1e1e1e"},UT="__shiki_resolved";function dS(e){var u,c,f,h,p;if(e!=null&&e[UT])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 g=t.settings?t.settings.find(y=>!y.name&&!y.scope):void 0;(u=g==null?void 0:g.settings)!=null&&u.foreground&&(r=g.settings.foreground),(c=g==null?void 0:g.settings)!=null&&c.background&&(n=g.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"?zT.light:zT.dark),n||(n=t.type==="light"?BT.light:BT.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(g){var b;if(o.has(g))return o.get(g);i+=1;const y=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${y}`]?a(g):(o.set(g,y),y)}t.settings=t.settings.map(g=>{var w,S;const y=((w=g.settings)==null?void 0:w.foreground)&&!g.settings.foreground.startsWith("#"),b=((S=g.settings)==null?void 0:S.background)&&!g.settings.background.startsWith("#");if(!y&&!b)return g;const v={...g,settings:{...g.settings}};if(y){const _=a(g.settings.foreground);t.colorReplacements[_]=g.settings.foreground,v.settings.foreground=_}if(b){const _=a(g.settings.background);t.colorReplacements[_]=g.settings.background,v.settings.background=_}return v});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((p=t.colors[g])!=null&&p.startsWith("#"))){const y=a(t.colors[g]);t.colorReplacements[y]=t.colors[g],t.colors[g]=y}return Object.defineProperty(t,UT,{enumerable:!1,writable:!1,value:!0}),t}async function K$(e){return Array.from(new Set((await Promise.all(e.filter(t=>!hQ(t)).map(async t=>await G$(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function X$(e){return(await Promise.all(e.map(async n=>pQ(n)?null:dS(await G$(n))))).filter(n=>!!n)}let YQ=3;function WQ(e,t=3){t>YQ||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class Yu extends Error{constructor(t){super(t),this.name="ShikiError"}}function Q$(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 Yu(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class KQ extends ZK{constructor(n,r,i,o={}){super(n);ne(this,"_resolvedThemes",new Map);ne(this,"_resolvedGrammars",new Map);ne(this,"_langMap",new Map);ne(this,"_langGraph",new Map);ne(this,"_textmateThemeCache",new WeakMap);ne(this,"_loadedThemesCache",null);ne(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=dS(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=hg.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=Q$(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 Yu(`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 XQ{constructor(t,n){ne(this,"_langs",new Map);ne(this,"_scopeToLang",new Map);ne(this,"_injections",new Map);ne(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 ed=0;function QQ(e){ed+=1,e.warnings!==!1&&ed>=10&&ed%10===0&&console.warn(`[Shiki] ${ed} 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 Yu("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(dS),i=new XQ(e.engine,n),o=new KQ(i,r,n,e.langAlias);let a;function u(k){return Q$(k,e.langAlias)}function c(k){S();const T=o.getGrammar(typeof k=="string"?k:k.name);if(!T)throw new Yu(`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"};S();const T=o.getTheme(k);if(!T)throw new Yu(`Theme \`${k}\` not found, you may need to load it first`);return T}function h(k){S();const T=f(k);a!==k&&(o.setTheme(T),a=k);const A=o.getColorMap();return{theme:T,colorMap:A}}function p(){return S(),o.getLoadedThemes()}function g(){return S(),o.getLoadedLanguages()}function y(...k){S(),o.loadLanguages(k.flat(1))}async function b(...k){return y(await K$(k))}function v(...k){S();for(const T of k.flat(1))o.loadTheme(T)}async function w(...k){return S(),v(await X$(k))}function S(){if(t)throw new Yu("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),ed-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:g,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:w,loadThemeSync:v,dispose:_,[Symbol.dispose]:_}}async function ZQ(e){e.engine||WQ("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([X$(e.themes||[]),K$(e.langs||[]),e.engine]);return QQ({...e,themes:t,langs:n,engine:r})}async function JQ(e){const t=await ZQ(e);return{getLastGrammarState:(...n)=>NQ(t,...n),codeToTokensBase:(n,r)=>cS(t,n,r),codeToTokensWithThemes:(n,r)=>W$(t,n,r),codeToTokens:(n,r)=>Sg(t,n,r),codeToHast:(n,r)=>Cg(t,n,r),codeToHtml:(n,r)=>VQ(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function qc(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function eZ(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const hS=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Dn=String.raw;function Vc(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Z$=Dn`\[\^?`,J$=`c.? | C(?:-.?)?|${Dn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Dn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Dn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Dn`o\{[^\}]*\}?`}|${Dn`\d{1,3}`}`,pS=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Xp=new RegExp(Dn`
|
|
339
|
+
\\ (?:
|
|
340
|
+
${J$}
|
|
341
|
+
| [gk]<[^>]*>?
|
|
342
|
+
| [gk]'[^']*'?
|
|
343
|
+
| .
|
|
344
|
+
)
|
|
345
|
+
| \( (?:
|
|
346
|
+
\? (?:
|
|
347
|
+
[:=!>({]
|
|
348
|
+
| <[=!]
|
|
349
|
+
| <[^>]*>
|
|
350
|
+
| '[^']*'
|
|
351
|
+
| ~\|?
|
|
352
|
+
| #(?:[^)\\]|\\.?)*
|
|
353
|
+
| [^:)]*[:)]
|
|
354
|
+
)?
|
|
355
|
+
| \*[^\)]*\)?
|
|
356
|
+
)?
|
|
357
|
+
| (?:${pS.source})+
|
|
358
|
+
| ${Z$}
|
|
359
|
+
| .
|
|
360
|
+
`.replace(/\s+/g,""),"gsu"),zv=new RegExp(Dn`
|
|
361
|
+
\\ (?:
|
|
362
|
+
${J$}
|
|
363
|
+
| .
|
|
364
|
+
)
|
|
365
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
366
|
+
| ${Z$}
|
|
367
|
+
| &&
|
|
368
|
+
| .
|
|
369
|
+
`.replace(/\s+/g,""),"gsu");function tZ(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=xZ(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(Xp.lastIndex=0;u=Xp.exec(e);){const p=nZ(o,e,u[0],Xp.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(Xp.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,g)=>{p.kind="capturing",p.number=g+1});const h=f||c.length;return{tokens:a.map(p=>p.type==="EscapedNumber"?SZ(p,h):p).flat(),flags:r}}function nZ(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=rZ(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:HT(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:hZ(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:tN(n)}}if(o==="K")return{token:nN("keep",n)};if(o==="N"||o==="R")return{token:al("newline",n,{negate:o==="N"})};if(o==="O")return{token:al("any",n)};if(o==="X")return{token:al("text_segment",n)};const a=eN(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:yZ(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:gZ(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Hu("group",n)};if(n==="(?>")return{token:Hu("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Hu(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Hu("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Hu("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:cZ(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
370
|
+
`,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:al("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Dn`\A`,$:Dn`\Z`}[n]:n;return{token:HT(a,n)}}return n==="|"?{token:oZ(n)}:pS.test(n)?{tokens:CZ(n)}:{token:Uo(qc(n),n)}}function rZ(e,t,n){const r=[GT(t[1]==="^",t)];let i=1,o;for(zv.lastIndex=n;o=zv.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(GT(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Uo(93,a));else if(i--,r.push(sZ(a)),!i)break}else{const u=iZ(a);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:zv.lastIndex||e.length}}function iZ(e){if(e[0]==="\\")return eN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!hS.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return al("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?aZ(e):e==="&&"?lZ(e):Uo(qc(e),e)}function eN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return mZ(e);if("dDhHsSwW".includes(n))return bZ(e);if(e.startsWith(Dn`\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 vZ(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 Uo(qc(a),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Uo(wZ(e),e);if(qT.has(n))return Uo(qT.get(n),e);if(/\d/.test(n))return uZ(t,e);if(e==="\\")throw new Error(Dn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Uo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function oZ(e){return{type:"Alternator",raw:e}}function HT(e,t){return{type:"Assertion",kind:e,raw:t}}function tN(e){return{type:"Backreference",raw:e}}function Uo(e,t){return{type:"Character",value:e,raw:t}}function sZ(e){return{type:"CharacterClassClose",raw:e}}function aZ(e){return{type:"CharacterClassHyphen",raw:e}}function lZ(e){return{type:"CharacterClassIntersector",raw:e}}function GT(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function al(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function nN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Vc(n.flags),raw:t}}function uZ(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function cZ(e){return{type:"GroupClose",raw:e}}function Hu(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function fZ(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function dZ(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function hZ(e){return{type:"Subroutine",raw:e}}const pZ=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),qT=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function mZ(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 Uo(qc(t.toUpperCase())-64,e)}function gZ(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=YT(n),a=YT(r),u={};if(o&&(u.enable=o),a&&(u.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),nN("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Hu("group",e,{...(o||a)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function yZ(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=pZ.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 fZ(f,r??null,(i==null?void 0:i.split(","))??null,e)}function VT(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 dZ(t,n,r,e)}function bZ(e){const t=e[1].toLowerCase();return al({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function vZ(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return al("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function YT(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 xZ(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 wZ(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 SZ(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[tN(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(Dn`Octal encoded byte above 177 unsupported "${n}"`)}else f=qc(c);o.push(Uo(f,(u===0?"\\":"")+c))}return o}function CZ(e){const t=[],n=new RegExp(pS,"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(VT(i.slice(0,-1)));continue}}}t.push(VT(i))}return t}function rN(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 EZ(e){return kZ.has(e.type)}const kZ=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function iN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=tZ(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(g,y)=>{const b=r.tokens[o.nextIndex];switch(o.parent=g,o.nextIndex++,b.type){case"Alternator":return Ml();case"Assertion":return RZ(b);case"Backreference":return _Z(b,o);case"Character":return py(b.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return TZ(b,o,y);case"CharacterClassOpen":return AZ(b,o,y);case"CharacterSet":return DZ(b,o);case"Directive":return LZ(b.kind,{flags:b.flags});case"GroupOpen":return MZ(b,o,y);case"NamedCallout":return FZ(b.kind,b.tag,b.arguments);case"Quantifier":return OZ(b,o);case"Subroutine":return $Z(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=zZ(IZ(r.flags));let u=a.body[0];for(;o.nextIndex<r.tokens.length;){const g=i(u,{});g.type==="Alternative"?(a.body.push(g),u=g):u.body.push(g)}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:g}of p)if(typeof g=="number"){if(g>c.length)throw new Error("Subroutine uses a group number that's not defined");g&&(c[g-1].isSubroutined=!0)}else if(h.has(g)){if(h.get(g).length>1)throw new Error(Dn`Subroutine uses a duplicate group name "\g<${g}>"`);h.get(g)[0].isSubroutined=!0}else throw new Error(Dn`Subroutine uses a group name that's not defined "\g<${g}>"`);return a}function RZ({kind:e}){return Mx(Vc({"^":"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===Dn`\B`||e===Dn`\Y`})}function _Z({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,Ox(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 Ox(r)}return i(+r)}function TZ(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(),PZ(a,c);throw new Error("Invalid character class range")}return py(qc("-"))}function AZ({negate:e},t,n){const{tokens:r,walk:i}=t,o=[Pm()],a=r[t.nextIndex];let u=XT(a);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(Pm()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=XT(r[t.nextIndex],a)}const c=Pm({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 DZ({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const u=my(n);if(hS.has(u)&&!(a!=null&&a.has(u)))e="posix",n=u;else return Gu(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?jZ(n,{negate:t}):$x(e,{negate:t})}function MZ(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:u}=t,c=BZ(e),f=c.type==="AbsenceFunction",h=KT(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&eZ(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let g=QT(r[t.nextIndex]);for(;g.type!=="GroupClose";){if(g.type==="Alternator")c.body.push(Ml()),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(WT(b)||b.type==="CapturingGroup")throw new Error(v)}else if(WT(b)||KT(b)&&b.negate)throw new Error(v)}}g=QT(r[t.nextIndex])}return t.nextIndex++,c}function OZ({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!EZ(o))throw new Error("Quantifier requires a repeatable token");const a=sN(e,t,n,o);return i.body.pop(),a}function $Z({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=aN(i);return r.push(a),a}function NZ(e,t){return{type:"AbsenceFunction",kind:e,body:ch(t==null?void 0:t.body)}}function Ml(e){return{type:"Alternative",body:lN(e==null?void 0:e.body)}}function Mx(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function Ox(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function oN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!UZ(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:ch(t==null?void 0:t.body)}}function py(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 Pm(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:lN(e==null?void 0:e.body)}}function PZ(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function $x(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 LZ(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Vc(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function IZ(e){return{type:"Flags",...e}}function Ti(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:ch(e==null?void 0:e.body)}}function tl(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ch(e==null?void 0:e.body)}}function FZ(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function jZ(e,t){const n=!!(t!=null&&t.negate);if(!hS.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function sN(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 zZ(e,t){return{type:"Regex",body:ch(t==null?void 0:t.body),flags:e}}function aN(e){return{type:"Subroutine",ref:e}}function Gu(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(my(e));if(!r){if(n.normalizeUnknownPropertyNames)r=HZ(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Dn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function BZ({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return NZ("repeater");case"atomic":return Ti({atomic:!0});case"capturing":return oN(i,{name:n});case"group":return Ti({flags:e});case"lookahead":case"lookbehind":return tl({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function ch(e){if(e===void 0)e=[Ml()];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 lN(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 WT(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function KT(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function UZ(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function HZ(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 my(e){return e.replace(/[- _]+/g,"").toLowerCase()}function XT(e,t){const n=t;return Vc(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function QT(e){return Vc(e,"Unclosed group")}function md(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 S,_;let f=0,h=!1;const p={node:o,parent:a,key:u,container:c,root:e,remove(){Qp(c).splice(Math.max(0,Pu(u)+f),1),f--,h=!0},removeAllNextSiblings(){return Qp(c).splice(Pu(u)+1)},removeAllPrevSiblings(){const k=Pu(u)+f;return f-=k,Qp(c).splice(0,Math.max(0,k))},replaceWith(k,T={}){const A=!!T.traverse;c?c[Math.max(0,Pu(u)+f)]=k:Vc(a,"Can't replace root node")[u]=k,A&&i(k,a,u,c),h=!0},replaceWithMultiple(k,T={}){const A=!!T.traverse;if(Qp(c).splice(Math.max(0,Pu(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,Pu(u)+O+D,c)}h=!0},skip(){h=!0}},{type:g}=o,y=t["*"],b=t[g],v=typeof y=="function"?y:y==null?void 0:y.enter,w=typeof b=="function"?b:b==null?void 0:b.enter;if(v==null||v(p,n),w==null||w(p,n),!h)switch(g){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 "${g}"`)}return(S=b==null?void 0:b.exit)==null||S.call(b,p,n),(_=y==null?void 0:y.exit)==null||_.call(y,p,n),f}return i(e),e}function Qp(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Pu(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const GZ=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function qZ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function VZ(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const pi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function mS(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===pi.DEFAULT==!a)){n instanceof Function?u+=n(c,{context:a?pi.CHAR_CLASS:pi.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 uN(e,t,n,r){mS(e,t,n,r)}function YZ(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===pi.DEFAULT==!o))return a;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function Zp(e,t,n){return!!YZ(e,t,0,n)}function WZ(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 ZT=new RegExp(String.raw`(?<noncapturingStart>${GZ})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function KZ(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 g=0,y=0,b=!1,v;for(ZT.lastIndex=Number.isNaN(h)?0:h+o.length;v=ZT.exec(e);){const{0:w,index:S,groups:{capturingStart:_,noncapturingStart:k}}=v;if(w==="[")g++;else if(g)w==="]"&&g--;else if(w===i&&!b)h=S,b=!0;else if(b&&k)y++;else if(_)b?y++:(c++,a.push(c+f));else if(w===")"&&b){if(!y){f++;const T=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,S)}))<$$${T}>)${e.slice(S+1)}`,p=!0,u.push(T),qZ(n,T),r.size){const A=new Map;r.forEach((D,O)=>{A.set(O>=T?O+1:O,D.map(N=>N>=T?N+1:N))}),r=A}break}y--}}}while(p);return n.push(...u),e=mS(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:g,groups:{backrefNum:y,wrappedBackrefNum:b}})=>{if(y){const v=+y;if(v>a.length-1)throw new Error(`Backref "${g}" greater than number of captures`);return`\\${a[v]}`}return`\\${b}`},pi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const cN=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Bv=new RegExp(String.raw`
|
|
371
|
+
\\(?: \d+
|
|
372
|
+
| c[A-Za-z]
|
|
373
|
+
| [gk]<[^>]+>
|
|
374
|
+
| [pPu]\{[^\}]+\}
|
|
375
|
+
| u[A-Fa-f\d]{4}
|
|
376
|
+
| x[A-Fa-f\d]{2}
|
|
377
|
+
)
|
|
378
|
+
| \((?: \? (?: [:=!>]
|
|
379
|
+
| <(?:[=!]|[^>]+>)
|
|
380
|
+
| [A-Za-z\-]+:
|
|
381
|
+
| \(DEFINE\)
|
|
382
|
+
))?
|
|
383
|
+
| (?<qBase>${cN})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
384
|
+
| \\?.
|
|
385
|
+
`.replace(/\s+/g,""),"gsu");function XZ(e){if(!new RegExp(`${cN}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(Bv.lastIndex=0;a=Bv.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 g=-1;if(/^\{\d+\}$/.test(f))e=VZ(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)}`;g+=4}Bv.lastIndex+=g}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const fi=String.raw,QZ=fi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Nx=fi`\(\?R=(?<rDepth>[^\)]+)\)|${QZ}`,gy=fi`\(\?<(?![=!])(?<captureName>[^>]+)>`,fN=fi`${gy}|(?<unnamed>\()(?!\?)`,Xa=new RegExp(fi`${gy}|${Nx}|\(\?|\\?.`,"gsu"),Uv="Cannot use multiple overlapping recursions";function ZZ(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Nx,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Zp(e,fi`\(\?\(DEFINE\)`,pi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=Zp(e,fi`\\[1-9]`,pi.DEFAULT),u=new Map,c=[];let f=!1,h=0,p=0,g;for(Xa.lastIndex=0;g=Xa.exec(e);){const{0:y,groups:{captureName:b,rDepth:v,gRNameOrNum:w,gRDepth:S}}=g;if(y==="[")h++;else if(h)y==="]"&&h--;else if(v){if(JT(v),f)throw new Error(Uv);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,g.index),k=e.slice(Xa.lastIndex);if(Zp(k,Nx,pi.DEFAULT))throw new Error(Uv);const T=+v-1;e=eA(_,k,T,!1,n,o,p),i=nA(i,_,T,o.length,0,p);break}else if(w){JT(S);let _=!1;for(const M of c)if(M.name===w||M.num===+w){if(_=!0,M.hasRecursedWithin)throw new Error(Uv);break}if(!_)throw new Error(fi`Recursive \g cannot be used outside the referenced group "${r==="external"?w:fi`\g<${w}&R=${S}>`}"`);const k=u.get(w),T=WZ(e,k);if(a&&Zp(T,fi`${gy}|\((?!\?)`,pi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(k,g.index),D=T.slice(A.length+y.length),O=o.length,N=+S-1,H=eA(A,D,N,!0,n,o,p);i=nA(i,A,N,o.length-O,O,p);const I=e.slice(0,k),L=e.slice(k+T.length);e=`${I}${H}${L}`,Xa.lastIndex+=H.length-y.length-A.length-D.length,c.forEach(M=>M.hasRecursedWithin=!0),f=!0}else if(b)p++,u.set(String(p),Xa.lastIndex),u.set(b,Xa.lastIndex),c.push({num:p,name:b});else if(y[0]==="("){const _=y==="(";_&&(p++,u.set(String(p),Xa.lastIndex)),c.push(_?{num:p}:{})}else y===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function JT(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 eA(e,t,n,r,i,o,a){const u=new Set;r&&uN(e+t,gy,({groups:{captureName:f}})=>{u.add(f)},pi.DEFAULT);const c=[n,r?u:null,i,o,a];return`${e}${tA(`(?:${e}`,"forward",...c)}(?:)${tA(`${t})`,"backward",...c)}${t}`}function tA(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+=mS(e,fi`${fN}|\\k<(?<backref>[^>]+)>`,({0:g,groups:{captureName:y,unnamed:b,backref:v}})=>{if(v&&r&&!r.has(v))return g;const w=`_$${p}`;if(b||y){const S=a+o.length+1;return o.push(S),JZ(i,S),b?g:`(?<${y}${w}>`}return fi`\k<${v}${w}>`},pi.DEFAULT)}return f}function JZ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function nA(e,t,n,r,i,o){if(e.size&&r){let a=0;uN(t,fN,()=>a++,pi.DEFAULT);const u=o-a+i,c=new Map;return e.forEach((f,h)=>{const p=(r-a*n)/n,g=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 w=0;w<=n;w++)b.push(v+a*w);else for(let w=0;w<=n;w++)b.push(v+g+p*w);c.set(y,b)}),c}return e}var Sn=String.fromCodePoint,it=String.raw,Oi={},yy=globalThis.RegExp;Oi.flagGroups=(()=>{try{new yy("(?i:)")}catch{return!1}return!0})();Oi.unicodeSets=(()=>{try{new yy("[[]]","v")}catch{return!1}return!0})();Oi.bugFlagVLiteralHyphenIsRange=Oi.unicodeSets?(()=>{try{new yy(it`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Oi.bugNestedClassIgnoresNegation=Oi.unicodeSets&&new yy("[[^a]]","v").test("a");function Eg(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 Fd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Px(e,t){return rA[e]>=rA[t]}function eJ(e,t){if(e==null)throw new Error(t??"Value expected");return e}var rA={ES2025:2025,ES2024:2024,ES2018:2018},tJ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function dN(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!tJ[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=Oi.flagGroups?"ES2025":Oi.unicodeSets?"ES2024":"ES2018"),t}var nJ="[ -\r ]",rJ=new Set([Sn(304),Sn(305)]),Do=it`[\p{L}\p{M}\p{N}\p{Pc}]`;function hN(e){if(rJ.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=sJ.get(n),o=iJ.get(n),a=oJ.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 gS=new Map(`C Other
|
|
386
|
+
Cc Control cntrl
|
|
387
|
+
Cf Format
|
|
388
|
+
Cn Unassigned
|
|
389
|
+
Co Private_Use
|
|
390
|
+
Cs Surrogate
|
|
391
|
+
L Letter
|
|
392
|
+
LC Cased_Letter
|
|
393
|
+
Ll Lowercase_Letter
|
|
394
|
+
Lm Modifier_Letter
|
|
395
|
+
Lo Other_Letter
|
|
396
|
+
Lt Titlecase_Letter
|
|
397
|
+
Lu Uppercase_Letter
|
|
398
|
+
M Mark Combining_Mark
|
|
399
|
+
Mc Spacing_Mark
|
|
400
|
+
Me Enclosing_Mark
|
|
401
|
+
Mn Nonspacing_Mark
|
|
402
|
+
N Number
|
|
403
|
+
Nd Decimal_Number digit
|
|
404
|
+
Nl Letter_Number
|
|
405
|
+
No Other_Number
|
|
406
|
+
P Punctuation punct
|
|
407
|
+
Pc Connector_Punctuation
|
|
408
|
+
Pd Dash_Punctuation
|
|
409
|
+
Pe Close_Punctuation
|
|
410
|
+
Pf Final_Punctuation
|
|
411
|
+
Pi Initial_Punctuation
|
|
412
|
+
Po Other_Punctuation
|
|
413
|
+
Ps Open_Punctuation
|
|
414
|
+
S Symbol
|
|
415
|
+
Sc Currency_Symbol
|
|
416
|
+
Sk Modifier_Symbol
|
|
417
|
+
Sm Math_Symbol
|
|
418
|
+
So Other_Symbol
|
|
419
|
+
Z Separator
|
|
420
|
+
Zl Line_Separator
|
|
421
|
+
Zp Paragraph_Separator
|
|
422
|
+
Zs Space_Separator
|
|
423
|
+
ASCII
|
|
424
|
+
ASCII_Hex_Digit AHex
|
|
425
|
+
Alphabetic Alpha
|
|
426
|
+
Any
|
|
427
|
+
Assigned
|
|
428
|
+
Bidi_Control Bidi_C
|
|
429
|
+
Bidi_Mirrored Bidi_M
|
|
430
|
+
Case_Ignorable CI
|
|
431
|
+
Cased
|
|
432
|
+
Changes_When_Casefolded CWCF
|
|
433
|
+
Changes_When_Casemapped CWCM
|
|
434
|
+
Changes_When_Lowercased CWL
|
|
435
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
436
|
+
Changes_When_Titlecased CWT
|
|
437
|
+
Changes_When_Uppercased CWU
|
|
438
|
+
Dash
|
|
439
|
+
Default_Ignorable_Code_Point DI
|
|
440
|
+
Deprecated Dep
|
|
441
|
+
Diacritic Dia
|
|
442
|
+
Emoji
|
|
443
|
+
Emoji_Component EComp
|
|
444
|
+
Emoji_Modifier EMod
|
|
445
|
+
Emoji_Modifier_Base EBase
|
|
446
|
+
Emoji_Presentation EPres
|
|
447
|
+
Extended_Pictographic ExtPict
|
|
448
|
+
Extender Ext
|
|
449
|
+
Grapheme_Base Gr_Base
|
|
450
|
+
Grapheme_Extend Gr_Ext
|
|
451
|
+
Hex_Digit Hex
|
|
452
|
+
IDS_Binary_Operator IDSB
|
|
453
|
+
IDS_Trinary_Operator IDST
|
|
454
|
+
ID_Continue IDC
|
|
455
|
+
ID_Start IDS
|
|
456
|
+
Ideographic Ideo
|
|
457
|
+
Join_Control Join_C
|
|
458
|
+
Logical_Order_Exception LOE
|
|
459
|
+
Lowercase Lower
|
|
460
|
+
Math
|
|
461
|
+
Noncharacter_Code_Point NChar
|
|
462
|
+
Pattern_Syntax Pat_Syn
|
|
463
|
+
Pattern_White_Space Pat_WS
|
|
464
|
+
Quotation_Mark QMark
|
|
465
|
+
Radical
|
|
466
|
+
Regional_Indicator RI
|
|
467
|
+
Sentence_Terminal STerm
|
|
468
|
+
Soft_Dotted SD
|
|
469
|
+
Terminal_Punctuation Term
|
|
470
|
+
Unified_Ideograph UIdeo
|
|
471
|
+
Uppercase Upper
|
|
472
|
+
Variation_Selector VS
|
|
473
|
+
White_Space space
|
|
474
|
+
XID_Continue XIDC
|
|
475
|
+
XID_Start XIDS`.split(/\s/).map(e=>[my(e),e])),iJ=new Map([["s",Sn(383)],[Sn(383),"s"]]),oJ=new Map([[Sn(223),Sn(7838)],[Sn(107),Sn(8490)],[Sn(229),Sn(8491)],[Sn(969),Sn(8486)]]),sJ=new Map([$s(453),$s(456),$s(459),$s(498),...Hv(8072,8079),...Hv(8088,8095),...Hv(8104,8111),$s(8124),$s(8140),$s(8188)]),aJ=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 lJ(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function $s(e){const t=Sn(e);return[t.toLowerCase(),t]}function Hv(e,t){return lJ(e,t).map(n=>$s(n))}var pN=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function uJ(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};mN(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Px(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};md(e,cJ,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};md(e,fJ,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return md(e,dJ,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var cJ={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=Ti();o.body[0].body.push(tl({negate:!0,body:r}),Gu("Any"));const a=Ti();a.body[0].body.push(sN("greedy",0,1/0,o)),n(fn(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];Fd(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=yN(t.get(e));if(r){const i=Ti({flags:r});i.body[0].body=e.body,e.body=[fn(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:g,wordIsAscii:y}=u;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")a(fn(tl({body:[Ml({body:[Mx("string_end")]}),Ml({body:[py(10)]})]}),t));else if(c==="line_start")a(fn(Mo(it`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(g.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&bJ(b))a(fn(tl({negate:!0}),t));else{if(p)throw new Error(it`Uses "\G" in a way that requires a subclass`);a(Ns(Mx("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(fn(Mo(it`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!y&&!h){const b=`(?:(?<=${Do})(?!${Do})|(?<!${Do})(?=${Do}))`,v=`(?:(?<=${Do})(?=${Do})|(?<!${Do})(?!${Do}))`;a(fn(Mo(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!qv(n)&&(n=Gv(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!qv(r)&&(r=Gv(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=Pm({body:[e]});n(fn(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(Ns($x("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(fn(Vv(Mo(nJ),f),t));return}if(u&&(c==="word"||h==="word")){n(Ns($x("word",{negate:f}),t));return}if(c==="any")n(Ns(Gu("Any"),t));else if(c==="digit")n(Ns(Gu("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})?",g=it`\p{RI}{2}|${p}(?:\u200D${p})*`;n(fn(Mo(it`(?>\r\n|${i?it`\p{RGI_Emoji}`:g}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(Ns(Gu("AHex",{negate:f}),t));else if(c==="newline")n(fn(Mo(f?`[^
|
|
476
|
+
]`:`(?>\r
|
|
477
|
+
?|[
|
|
478
|
+
\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-${Sn(p.codePointAt(0)-1)}${Sn(p.codePointAt(2)+1)}-`),n(fn(Mo(`[${p}]`),t))}else n(fn(Vv(Mo(aJ.get(h)),f),t));else if(c==="property")gS.has(my(h))||(e.key="sc");else if(c==="space")n(Ns(Gu("space",{negate:f}),t));else if(c==="word")n(fn(Vv(Mo(Do),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=Ti({flags:c});f.body[0].body=a(),i(fn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],p=n.body.length===1&&rN(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 g=tl({behind:!0});g.body[0].body=o(),i(fn(g,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(fn(tl({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Ti();t.body[0].body.push(e.body),e.body=fn(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=vN(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"&&!qv(n)&&(n=Gv(n,t),e.ref=n)}},fJ={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=Ns(iA(e.number),t);c.set(p,u.get(e.number)),n(p);return}u.set(e.number,e),a.set(e.number,[]),e.name&&Fd(a,e.name,[]);const h=a.get(e.name??e.number);for(let p=0;p<h.length;p++){const g=h[p];if(f===g.node||f&&f===g.origin||e===g.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=Fd(o,e.name,new Map);let g=!1;if(f)g=!0;else for(const y of p.values())if(!y.hasDuplicateNameToRemove){g=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:g})}},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=Eg(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?iA(0):gN(a,r.groupOriginByCopy,null);let f=c;if(!u){const h=yN(mJ(a,g=>g.type==="Group"&&!!g.flags)),p=h?Eg(r.globalFlags,h):r.globalFlags;hJ(p,r.currentFlags)||(f=Ti({flags:gJ(p)}),f.body[0].body.push(c))}n(fn(f,t),{traverse:!u})}},dJ={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=>pJ(a,e));if(!o.length)n(fn(tl({negate:!0}),t));else if(o.length>1){const a=Ti({atomic:!0,body:o.reverse().map(u=>Ml({body:[Ox(u.number)]}))});n(fn(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=oN();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function mN(e){md(e,{"*"({node:t,parent:n}){t.parent=n}})}function hJ(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function pJ(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=bN(n.parent);for(const i of r){if(i===n)break;if(i===e||xN(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function gN(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]=gN(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function iA(e){const t=aN(e);return t.isRecursive=!0,t}function mJ(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Gv(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 yN(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 gJ({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 bN(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function vN(e){const t=e.find(n=>n.kind==="search_start"||vJ(n,{negate:!1})||!yJ(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=vN(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function xN(e,t){const n=bN(e)??[];for(const r of n)if(r===t||xN(r,t))return!0;return!1}function yJ({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function bJ(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function vJ(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&rN(e.body[0],{type:"Assertion",kind:"search_start"})}function qv(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Mo(e,t){const r=iN(e,{...t,unicodePropertyMap:gS}).body;return r.length>1||r[0].body.length>1?Ti({body:r}):r[0].body[0]}function Vv(e,t){return e.negate=t,e}function Ns(e,t){return e.parent=t,e}function fn(e,t){return mN(e),e.parent=t,e}function xJ(e,t){const n=dN(t),r=Px(n.target,"ES2024"),i=Px(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];md(e,wJ,{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,eJ(SJ[y.type],`Unexpected node type "${y.type}"`)(y,h,p)}const g={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete g.options.force.v,g.options.disable.v=!0,g.options.unicodeSetsPlugin=null),g._captureTransfers=new Map,g._hiddenCaptures=[],h.captureMap.forEach((y,b)=>{y.hidden&&g._hiddenCaptures.push(b),y.transferTo&&Fd(g._captureTransfers,y.transferTo,[]).push(b)}),g}var wJ={"*":{enter({node:e},t){if(sA(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Eg({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){sA(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){yS(Sn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),wN(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&pN.has(e.value)&&t.setHasCasedChar()}},SJ={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=Sn(e),r=Lu(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&yS(n)){const i=hN(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");Oi.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(aA)&&(a=[py(45),...a.filter(f=>!aA(f))]);const u=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Oi.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=Ti(),g=p.body[0];return p.parent=o,g.parent=p,a=a.filter(y=>!h.includes(y)),e.body=a,a.length?(e.parent=g,g.body.push(e)):p.body.pop(),h.forEach(y=>{const b=Ml({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"&&!(Oi.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=Lu(n,i),a=Lu(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=wN(e);_J(c).forEach(h=>{u.add(Array.isArray(h)?`${Lu(h[0],i)}-${Lu(h[1],i)}`:Lu(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&&pN.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=Eg(a,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${TJ(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)+AJ(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}>`}},CJ=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),EJ=new Set(["-","\\","]","^","["]),kJ=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),oA=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`]]),RJ=new RegExp("^\\p{Cased}$","u");function yS(e){return RJ.test(e)}function wN(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=Sn(a);if(!yS(u))continue;const c=hN(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Lu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(oA.has(e))return oA.get(e);if(e<32||e>126&&e<160||e>262143||t&&DJ(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?kJ:EJ:CJ,o=Sn(e);return(i.has(o)?"\\":"")+o}function _J(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 TJ(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 AJ({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 sA({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function DJ(e){return e>47&&e<58}function aA({type:e,value:t}){return e==="Character"&&t===45}var Ys,jo,bl,Ws,vl,Jd,Lx,ca,MJ=(ca=class extends RegExp{constructor(n,r,i){var t=(...Age)=>(super(...Age),He(this,Jd),He(this,Ys,new Map),He(this,jo,null),He(this,bl),He(this,Ws,null),He(this,vl,null),ne(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,bl,a.source),a instanceof ca&&($e(this,Ys,K(a,Ys)),$e(this,Ws,K(a,Ws)),$e(this,vl,K(a,vl)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),$e(this,bl,n),$e(this,Ys,$J(a.hiddenCaptures,a.transfers)),$e(this,vl,a.strategy),this.rawOptions=i??{}}o||$e(this,jo,this)}get source(){return K(this,bl)||"(?:)"}exec(n){if(!K(this,jo)){const{lazyCompile:o,...a}=this.rawOptions;$e(this,jo,new ca(K(this,bl),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(K(this,vl)==="clip_search"&&r&&i){this.lastIndex=0;const o=rt(this,Jd,Lx).call(this,n.slice(i));return o&&(OJ(o,i,n,this.hasIndices),this.lastIndex+=i),o}return rt(this,Jd,Lx).call(this,n)}},Ys=new WeakMap,jo=new WeakMap,bl=new WeakMap,Ws=new WeakMap,vl=new WeakMap,Jd=new WeakSet,Lx=function(n){K(this,jo).lastIndex=this.lastIndex;const r=CR(ca.prototype,this,"exec").call(K(this,jo),n);if(this.lastIndex=K(this,jo).lastIndex,!r||!K(this,Ys).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,Ys).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,Ws)||$e(this,Ws,NJ(this.source));const p=K(this,Ws).get(f);p&&(r.groups[p]=i[u],this.hasIndices&&(r.indices.groups[p]=o[u]))}}}return r},ca);function OJ(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 $J(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)Fd(n,o,{}).transferTo=r;return n}function NJ(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 PJ(e,t){const n=LJ(e,t);return n.options?new MJ(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function LJ(e,t){const n=dN(t),r=iN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:gS}),i=uJ(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=xJ(i,n),a=ZZ(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=XZ(a.pattern),c=KZ(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),g=i._strategy,y=f.pattern.length>=n.lazyCompileLength;(h.length||p.length||g||y)&&(f.options={...h.length&&{hiddenCaptures:h},...p.length&&{transfers:p},...g&&{strategy:g},...y&&{lazyCompile:y}})}return f}const lA=4294967295;class IJ{constructor(t,n={}){ne(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:lA,end:lA,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 FJ(e,t){return PJ(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function jJ(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>FJ(n,{target:t.target})),{createScanner(n){return new IJ(n,t)},createString(n){return{content:n}}}}const zJ=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function BJ(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(!Yv(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=Yv(f.value,h),g;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,w=Yv(v,h);if(w){p=w,r.push({info:w,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=uA(o[u-1],"{")&&uA(o[u+1],"}");r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===3&&c.children.length===1,isJsxStyle:y,additionalTokens:g})}else r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:g})}}return r}function uA(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function Yv(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 zJ){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 UJ(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function HJ(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=BJ(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]=UJ(f.info[1]));const g=f.info[1].trim().length===0;if(g&&(f.info[1]=""),g&&f.isLineCommentOnly)a.push(f.line);else if(g&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(g){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 g=1;(p==null?void 0:p.type)==="text"&&(p==null?void 0:p.value)===`
|
|
479
|
+
`&&(g=2),i.children.splice(h,g)}}}}function GJ(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 Jp=Symbol("highlighted-lines");function qJ(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[Jp]??(o[Jp]=GJ(this.options.meta.__raw));const a=o[Jp]??[],u=n?i-1:i;return a.includes(u)&&this.addClassToHast(r,t),r}}}function VJ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function SN(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return HJ(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(VJ).join("|")})(:\\d+)?\\]`,"gi"),function([o,a,u=":1"],c,f,h,p){const g=Number.parseInt(u.slice(1),10);for(let y=p;y<Math.min(p+g,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 YJ(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return SN({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function WJ(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return SN({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const KJ="vitesse-black",XJ="vitesse-light",QJ={javascript:()=>ii(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>ii(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>ii(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>ii(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>ii(()=>import("./json-Cp-IABpG.js"),[]),css:()=>ii(()=>import("./css-DPfMkruS.js"),[]),html:()=>ii(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>ii(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>ii(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>ii(()=>import("./python-B6aJPvgy.js"),[])},ZJ=()=>ii(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),JJ=()=>ii(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let Wv=null,Kv=null;const cA=new Set;async function bS(){return Wv||Kv||(Kv=JQ({themes:[ZJ,JJ],langs:[],engine:jJ()}),Wv=await Kv,Wv)}async function CN(e){if(cA.has(e))return;const t=QJ[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await bS(),r=await t();await n.loadLanguage(r),cA.add(e)}async function eee(e,t="typescript",n={}){await CN(t);const r=await bS(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:XJ,dark:KJ},defaultColor:!1,...o&&{meta:o},transformers:[YJ(),WJ(),qJ()]})}function EN(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 g=++f.current;eee(e,t,{highlightLines:n.highlightLines}).then(y=>{f.current===g&&(i(y),a(!1),c(null))}).catch(y=>{f.current===g&&(c(y),a(!1))})},[e,t,h]),{html:r,loading:o,error:u}}const Zi={"code-block":"_code-block_2wyt9_1","code-block-header":"_code-block-header_2wyt9_10","code-block-language-icon":"_code-block-language-icon_2wyt9_18","code-block-icon-button":"_code-block-icon-button_2wyt9_23","code-block-scroll":"_code-block-scroll_2wyt9_32","code-block-content":"_code-block-content_2wyt9_36","code-block-content-wrap":"_code-block-content-wrap_2wyt9_88","code-block-error":"_code-block-error_2wyt9_100","code-block-expand-toggle":"_code-block-expand-toggle_2wyt9_107"},kN=({code:e=c$,onCopy:t,className:n,...r})=>{const[i,o]=C.useState(!1),a=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),t==null||t(e),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy code:",u)}},[e,t]);return R.jsx(es,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",tooltip:i?"Copied":"Copy",className:ze(Zi["code-block-icon-button"],n),onClick:a,size:"xsmall",variant:"inverted",...r,children:i?R.jsx(zw,{}):R.jsx(Bw,{})})};kN.displayName="CodeBlockCopyButton";const RN=({pressed:e,defaultPressed:t,onPressedChange:n,className:r,...i})=>R.jsx(uy,{"data-slot":"code-block-wrap-button","aria-label":"Toggle line wrap",tooltip:"Toggle line wrap",className:ze(Zi["code-block-icon-button"],r),size:"xsmall",variant:"inverted",pressed:e,defaultPressed:t,onPressedChange:n,icon:{pressed:R.jsx($_,{}),unpressed:R.jsx($_,{})},...i});RN.displayName="CodeBlockWrapButton";const tee='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#fff" d="M22.67 47h99.67v73.67H22.67z"/><path data-name="original" fill="#007acc" d="M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z"/></svg>',nee='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z"/><path fill="#323330" d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"/></svg>',fA='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><g fill="#61DAFB"><circle cx="64" cy="64" r="11.4"/><path d="M107.3 45.2c-2.2-.8-4.5-1.6-6.9-2.3.6-2.4 1.1-4.8 1.5-7.1 2.1-13.2-.2-22.5-6.6-26.1-1.9-1.1-4-1.6-6.4-1.6-7 0-15.9 5.2-24.9 13.9-9-8.7-17.9-13.9-24.9-13.9-2.4 0-4.5.5-6.4 1.6-6.4 3.7-8.7 13-6.6 26.1.4 2.3.9 4.7 1.5 7.1-2.4.7-4.7 1.4-6.9 2.3C8.2 50 1.4 56.6 1.4 64s6.9 14 19.3 18.8c2.2.8 4.5 1.6 6.9 2.3-.6 2.4-1.1 4.8-1.5 7.1-2.1 13.2.2 22.5 6.6 26.1 1.9 1.1 4 1.6 6.4 1.6 7.1 0 16-5.2 24.9-13.9 9 8.7 17.9 13.9 24.9 13.9 2.4 0 4.5-.5 6.4-1.6 6.4-3.7 8.7-13 6.6-26.1-.4-2.3-.9-4.7-1.5-7.1 2.4-.7 4.7-1.4 6.9-2.3 12.5-4.8 19.3-11.4 19.3-18.8s-6.8-14-19.3-18.8zM92.5 14.7c4.1 2.4 5.5 9.8 3.8 20.3-.3 2.1-.8 4.3-1.4 6.6-5.2-1.2-10.7-2-16.5-2.5-3.4-4.8-6.9-9.1-10.4-13 7.4-7.3 14.9-12.3 21-12.3 1.3 0 2.5.3 3.5.9zM81.3 74c-1.8 3.2-3.9 6.4-6.1 9.6-3.7.3-7.4.4-11.2.4-3.9 0-7.6-.1-11.2-.4-2.2-3.2-4.2-6.4-6-9.6-1.9-3.3-3.7-6.7-5.3-10 1.6-3.3 3.4-6.7 5.3-10 1.8-3.2 3.9-6.4 6.1-9.6 3.7-.3 7.4-.4 11.2-.4 3.9 0 7.6.1 11.2.4 2.2 3.2 4.2 6.4 6 9.6 1.9 3.3 3.7 6.7 5.3 10-1.7 3.3-3.4 6.6-5.3 10zm8.3-3.3c1.5 3.5 2.7 6.9 3.8 10.3-3.4.8-7 1.4-10.8 1.9 1.2-1.9 2.5-3.9 3.6-6 1.2-2.1 2.3-4.2 3.4-6.2zM64 97.8c-2.4-2.6-4.7-5.4-6.9-8.3 2.3.1 4.6.2 6.9.2 2.3 0 4.6-.1 6.9-.2-2.2 2.9-4.5 5.7-6.9 8.3zm-18.6-15c-3.8-.5-7.4-1.1-10.8-1.9 1.1-3.3 2.3-6.8 3.8-10.3 1.1 2 2.2 4.1 3.4 6.1 1.2 2.2 2.4 4.1 3.6 6.1zm-7-25.5c-1.5-3.5-2.7-6.9-3.8-10.3 3.4-.8 7-1.4 10.8-1.9-1.2 1.9-2.5 3.9-3.6 6-1.2 2.1-2.3 4.2-3.4 6.2zM64 30.2c2.4 2.6 4.7 5.4 6.9 8.3-2.3-.1-4.6-.2-6.9-.2-2.3 0-4.6.1-6.9.2 2.2-2.9 4.5-5.7 6.9-8.3zm22.2 21l-3.6-6c3.8.5 7.4 1.1 10.8 1.9-1.1 3.3-2.3 6.8-3.8 10.3-1.1-2.1-2.2-4.2-3.4-6.2zM31.7 35c-1.7-10.5-.3-17.9 3.8-20.3 1-.6 2.2-.9 3.5-.9 6 0 13.5 4.9 21 12.3-3.5 3.8-7 8.2-10.4 13-5.8.5-11.3 1.4-16.5 2.5-.6-2.3-1-4.5-1.4-6.6zM7 64c0-4.7 5.7-9.7 15.7-13.4 2-.8 4.2-1.5 6.4-2.1 1.6 5 3.6 10.3 6 15.6-2.4 5.3-4.5 10.5-6 15.5C15.3 75.6 7 69.6 7 64zm28.5 49.3c-4.1-2.4-5.5-9.8-3.8-20.3.3-2.1.8-4.3 1.4-6.6 5.2 1.2 10.7 2 16.5 2.5 3.4 4.8 6.9 9.1 10.4 13-7.4 7.3-14.9 12.3-21 12.3-1.3 0-2.5-.3-3.5-.9zM96.3 93c1.7 10.5.3 17.9-3.8 20.3-1 .6-2.2.9-3.5.9-6 0-13.5-4.9-21-12.3 3.5-3.8 7-8.2 10.4-13 5.8-.5 11.3-1.4 16.5-2.5.6 2.3 1 4.5 1.4 6.6zm9-15.6c-2 .8-4.2 1.5-6.4 2.1-1.6-5-3.6-10.3-6-15.6 2.4-5.3 4.5-10.5 6-15.5 13.8 4 22.1 10 22.1 15.6 0 4.7-5.8 9.7-15.7 13.4z"/></g></svg>',ree=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="python-original-a" gradientUnits="userSpaceOnUse" x1="70.252" y1="1237.476" x2="170.659" y2="1151.089" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#5A9FD4"/><stop offset="1" stop-color="#306998"/></linearGradient><linearGradient id="python-original-b" gradientUnits="userSpaceOnUse" x1="209.474" y1="1098.811" x2="173.62" y2="1149.537" gradientTransform="matrix(.563 0 0 -.568 -29.215 707.817)"><stop offset="0" stop-color="#FFD43B"/><stop offset="1" stop-color="#FFE873"/></linearGradient><path fill="url(#python-original-a)" d="M63.391 1.988c-4.222.02-8.252.379-11.8 1.007-10.45 1.846-12.346 5.71-12.346 12.837v9.411h24.693v3.137H29.977c-7.176 0-13.46 4.313-15.426 12.521-2.268 9.405-2.368 15.275 0 25.096 1.755 7.311 5.947 12.519 13.124 12.519h8.491V67.234c0-8.151 7.051-15.34 15.426-15.34h24.665c6.866 0 12.346-5.654 12.346-12.548V15.833c0-6.693-5.646-11.72-12.346-12.837-4.244-.706-8.645-1.027-12.866-1.008zM50.037 9.557c2.55 0 4.634 2.117 4.634 4.721 0 2.593-2.083 4.69-4.634 4.69-2.56 0-4.633-2.097-4.633-4.69-.001-2.604 2.073-4.721 4.633-4.721z" transform="translate(0 10.26)"/><path fill="url(#python-original-b)" d="M91.682 28.38v10.966c0 8.5-7.208 15.655-15.426 15.655H51.591c-6.756 0-12.346 5.783-12.346 12.549v23.515c0 6.691 5.818 10.628 12.346 12.547 7.816 2.297 15.312 2.713 24.665 0 6.216-1.801 12.346-5.423 12.346-12.547v-9.412H63.938v-3.138h37.012c7.176 0 9.852-5.005 12.348-12.519 2.578-7.735 2.467-15.174 0-25.096-1.774-7.145-5.161-12.521-12.348-12.521h-9.268zM77.809 87.927c2.561 0 4.634 2.097 4.634 4.692 0 2.602-2.074 4.719-4.634 4.719-2.55 0-4.633-2.117-4.633-4.719 0-2.595 2.083-4.692 4.633-4.692z" transform="translate(0 10.26)"/><radialGradient id="python-original-c" cx="1825.678" cy="444.45" r="26.743" gradientTransform="matrix(0 -.24 -1.055 0 532.979 557.576)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#B8B8B8" stop-opacity=".498"/><stop offset="1" stop-color="#7F7F7F" stop-opacity="0"/></radialGradient><path opacity=".444" fill="url(#python-original-c)" d="M97.309 119.597c0 3.543-14.816 6.416-33.091 6.416-18.276 0-33.092-2.873-33.092-6.416 0-3.544 14.815-6.417 33.092-6.417 18.275 0 33.091 2.872 33.091 6.417z"/></svg>
|
|
480
|
+
`,iee='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#E44D26" d="M19.037 113.876L9.032 1.661h109.936l-10.016 112.198-45.019 12.48z"/><path fill="#F16529" d="M64 116.8l36.378-10.086 8.559-95.878H64z"/><path fill="#EBEBEB" d="M64 52.455H45.788L44.53 38.361H64V24.599H29.489l.33 3.692 3.382 37.927H64zm0 35.743l-.061.017-15.327-4.14-.979-10.975H33.816l1.928 21.609 28.193 7.826.063-.017z"/><path fill="#fff" d="M63.952 52.455v13.763h16.947l-1.597 17.849-15.35 4.143v14.319l28.215-7.82.207-2.325 3.234-36.233.335-3.696h-3.708zm0-27.856v13.762h33.244l.276-3.092.628-6.978.329-3.692z"/></svg>',oee='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#1572B6" d="M18.814 114.123L8.76 1.352h110.48l-10.064 112.754-45.243 12.543-45.119-12.526z"/><path fill="#33A9DC" d="M64.001 117.062l36.559-10.136 8.601-96.354h-45.16v106.49z"/><path fill="#fff" d="M64.001 51.429h18.302l1.264-14.163H64.001V23.435h34.682l-.332 3.711-3.4 38.114h-30.95V51.429z"/><path fill="#EBEBEB" d="M64.083 87.349l-.061.018-15.403-4.159-.985-11.031H33.752l1.937 21.717 28.331 7.863.063-.018v-14.39z"/><path fill="#fff" d="M81.127 64.675l-1.666 18.522-15.426 4.164v14.39l28.354-7.858.208-2.337 2.406-26.881H81.127z"/><path fill="#EBEBEB" d="M64.048 23.435v13.831H30.64l-.277-3.108-.63-7.012-.331-3.711h34.646zm-.047 27.996v13.831H48.792l-.277-3.108-.631-7.012-.33-3.711h16.447z"/></svg>',see=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><linearGradient id="a" x1="-670.564" x2="-583.105" y1="-280.831" y2="-368.306" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#a)" fill-rule="evenodd" d="M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z" clip-rule="evenodd"/><linearGradient id="b" x1="-579.148" x2="-666.607" y1="-364.34" y2="-276.873" gradientTransform="matrix(.9988 0 0 -.9987 689.011 -259.008)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#fff"/></linearGradient><path fill="url(#b)" fill-rule="evenodd" d="M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z" clip-rule="evenodd"/></svg>
|
|
481
|
+
`,aee=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#293138" d="M112.205 26.129 71.8 2.142A15.326 15.326 0 0 0 64.005 0c-2.688 0-5.386.717-7.796 2.152L15.795 26.14C10.976 28.999 8 34.289 8 40.018v47.975c0 5.729 2.967 11.019 7.796 13.878L56.2 125.858A15.193 15.193 0 0 0 63.995 128a15.32 15.32 0 0 0 7.796-2.142l40.414-23.987c4.819-2.86 7.796-8.16 7.796-13.878V40.007c0-5.718-2.967-11.019-7.796-13.878zm-31.29 74.907.063 3.448c0 .418-.267.889-.588 1.06l-2.046 1.178c-.321.16-.6-.032-.6-.45l-.032-3.394c-1.745.728-3.523.9-4.647.45-.214-.086-.31-.397-.225-.76l.739-3.117c.064-.246.193-.493.364-.643a.726.726 0 0 1 .193-.139c.117-.064.235-.075.332-.032 1.22.407 2.773.214 4.272-.535 1.907-.964 3.18-2.913 3.16-4.84-.022-1.757-.964-2.474-3.267-2.496-2.934.01-5.675-.567-5.718-4.894-.032-3.555 1.81-7.26 4.744-9.595l-.032-3.48c0-.428.257-.9.589-1.07l1.98-1.264c.322-.161.6.042.6.46l.033 3.48c1.456-.578 2.72-.738 3.865-.47.247.063.364.406.257.802l-.77 3.084a1.372 1.372 0 0 1-.354.622.825.825 0 0 1-.203.15c-.108.053-.204.064-.3.053-.525-.118-1.767-.385-3.727.6-2.056 1.038-2.773 2.827-2.763 4.155.022 1.585.825 2.066 3.63 2.11 3.738.063 5.344 1.691 5.387 5.45.053 3.684-1.917 7.657-4.937 10.077zm28.206-64.787L70.89 59.86c-4.765 2.784-8.278 5.911-8.288 11.662v47.107c0 3.437 1.392 5.665 3.523 6.318a12.81 12.81 0 0 1-2.12.204c-2.239 0-4.445-.61-6.383-1.757L17.219 99.408c-3.951-2.345-6.403-6.725-6.403-11.426V40.007c0-4.7 2.452-9.08 6.403-11.426L57.634 4.594a12.555 12.555 0 0 1 6.382-1.756c2.238 0 4.444.61 6.382 1.756l40.415 23.987c3.33 1.981 5.579 5.397 6.21 9.242-1.36-2.86-4.38-3.63-7.902-1.574z"/><path fill="#4fa847" d="m101.614 92.619-10.066 6.018c-.268.16-.46.332-.46.653v2.635c0 .32.214.46.481.3l10.216-6.212c.268-.16.31-.45.31-.77v-2.324c0-.322-.213-.45-.481-.3z"/></svg>
|
|
482
|
+
`,lee=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" d="M11.95 24.348c-5.836 0-10.618 4.867-10.618 10.681v57.942c0 5.814 4.782 10.681 10.617 10.681h104.102c5.835 0 10.617-4.867 10.617-10.681V35.03c0-5.814-4.783-10.681-10.617-10.681H14.898l-.002-.002H11.95zm-.007 9.543h104.108c.625 0 1.076.423 1.076 1.14v57.94c0 .717-.453 1.14-1.076 1.14H11.949c-.623 0-1.076-.423-1.076-1.14V35.029c0-.715.451-1.135 1.07-1.138z" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/><path d="M20.721 84.1V43.9H32.42l11.697 14.78L55.81 43.9h11.696v40.2H55.81V61.044l-11.694 14.78-11.698-14.78V84.1H20.722zm73.104 0L76.28 64.591h11.697V43.9h11.698v20.69h11.698zm0 0"/></svg>
|
|
483
|
+
`;function Bi(e){var r,i;const t=((r=e.match(/viewBox="([^"]+)"/))==null?void 0:r[1])??"0 0 128 128",n=((i=e.match(/<svg[^>]*>([\s\S]*)<\/svg>/))==null?void 0:i[1])??"";return{viewBox:t,body:n}}const uee={typescript:Bi(tee),tsx:Bi(fA),javascript:Bi(nee),jsx:Bi(fA),python:Bi(ree),html:Bi(iee),css:Bi(oee),json:Bi(see),bash:Bi(aee),markdown:Bi(lee)},_N=({language:e,size:t=16,...n})=>{const r=uee[e];return r?R.jsx("svg",{"data-slot":"language-icon","data-language":e,role:"img","aria-label":e,viewBox:r.viewBox,width:t,height:t,dangerouslySetInnerHTML:{__html:r.body},...n}):null};_N.displayName="LanguageIcon";const TN=({filename:e,language:t,copyable:n=uK,code:r=c$,wrappable:i=!1,wrap:o,defaultWrap:a,onWrapChange:u,className:c,LanguageIconProps:f,WrapButtonProps:h,CopyButtonProps:p,children:g,...y})=>R.jsxs(Ke,{"data-slot":"code-block-header",className:ze(Zi["code-block-header"],c),ay:"center",ax:"space-between",gap:3,py:2,px:4,fullwidth:!0,...y,children:[R.jsxs(Ke,{ay:"center",gap:2,children:[t&&R.jsx(_N,{language:t,className:Zi["code-block-language-icon"],...f}),e&&R.jsx(Pe,{size:-1,family:"mono",shade:"muted",children:e})]}),g,(i||n)&&R.jsxs(Ke,{ay:"center",gap:1,children:[i&&R.jsx(RN,{pressed:o,defaultPressed:a,onPressedChange:u,...h}),n&&R.jsx(kN,{code:r,disabled:!r,...p})]})]});TN.displayName="CodeBlockHeader";const AN=({html:e,code:t,showLineNumbers:n=u$,wrap:r=f$,className:i,...o})=>{const a=ze(Zi["code-block-content"],r&&Zi["code-block-content-wrap"],cK({showLineNumbers:n}),i),u={"data-slot":"code-block-content","data-line-numbers":n||void 0,"data-wrap":r||void 0,ax:"stretch",fullwidth:!0};if(e)return R.jsx(Ye,{...u,className:a,dangerouslySetInnerHTML:{__html:e},...o});const c=(t??"").split(`
|
|
484
|
+
`);return R.jsx(Ye,{...u,className:a,...o,children:R.jsx("pre",{children:R.jsx("code",{children:c.map((f,h)=>R.jsx("span",{className:"line",children:f||" "},h))})})})};AN.displayName="CodeBlockContent";const vS=({code:e,language:t,filename:n,showLineNumbers:r,highlightLines:i,rows:o,defaultExpanded:a=!1,defaultWrap:u=f$,onWrapChange:c,onCopy:f,html:h,className:p,HeaderProps:g,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:v,...w})=>{const S=t??lK,[_,k]=C.useState(u),T=C.useCallback(z=>{k(z),c==null||c(z)},[c]),{html:A,error:D}=EN(e,S,{highlightLines:i}),O=h||A||void 0,[N,H]=C.useState(a),[I,L]=C.useState(!1),M=C.useRef(null),B=o?`calc(${o} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`:void 0,q=o!=null&&!N,F=B?{maxHeight:q?B:void 0,overflowY:"auto"}:void 0;C.useEffect(()=>{if(!o||!M.current||!O)return;const z=M.current;L(z.scrollHeight>z.clientHeight+1)},[O,o,_,N]);const j=o!=null&&(I||N);return R.jsxs("div",{"data-slot":"code-block","data-expanded":o!=null&&N||void 0,"data-wrap":_||void 0,className:ze(Zi["code-block"],p),...w,children:[R.jsx(TN,{filename:n,language:t,copyable:!0,code:e,wrappable:!0,wrap:_,onWrapChange:T,LanguageIconProps:y,WrapButtonProps:b,CopyButtonProps:{onCopy:f,...v},...g}),R.jsx("div",{ref:M,"data-slot":"code-block-scroll",className:Zi["code-block-scroll"],style:F,children:R.jsx(AN,{html:O,code:e,showLineNumbers:r,wrap:_})}),D&&!h&&R.jsxs("div",{"data-slot":"code-block-error",className:Zi["code-block-error"],children:["[Error: ",D.message,"]"]}),j&&R.jsx("button",{type:"button","data-slot":"code-block-expand-toggle",className:Zi["code-block-expand-toggle"],onClick:()=>H(z=>!z),"aria-expanded":N,children:N?"Show less":"Show more"})]})};vS.displayName="CodeBlock";const Xv={"code-inline":"_code-inline_h7rdt_1"},DN=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=EN(o,e||"typescript");if(!e)return R.jsx("code",{"data-slot":"code-inline",className:ze(Xv["code-inline"],n),...i,children:r});const u=t||a;if(u){const c=u.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return R.jsx("code",{"data-slot":"code-inline",className:ze(Xv["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return R.jsx("code",{"data-slot":"code-inline",className:ze(Xv["code-inline"],n),...i,children:r})};DN.displayName="CodeInline";const dA={};function ba(e,t){const n=C.useRef(dA);return n.current===dA&&(n.current=e(t)),n}const Qv=ha[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],cee=Qv&&Qv!==C.useLayoutEffect?Qv:e=>e();function tr(e){const t=ba(fee).current;return t.next=e,cee(t.effect),t.trampoline}function fee(){const e={next:void 0,callback:dee,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function dee(){}function MN({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 hee=()=>{},zn=typeof document<"u"?C.useLayoutEffect:hee;function Ix(e,t,n,r){const i=ba(ON).current;return mee(i,e,t,n,r)&&$N(i,[e,t,n,r]),i.callback}function pee(e){const t=ba(ON).current;return gee(t,e)&&$N(t,e),t.callback}function ON(){return{callback:null,cleanup:null,refs:[]}}function mee(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function gee(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function $N(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 NN={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},yee={...NN,position:"fixed",top:0,left:0},bee={...NN,position:"absolute"};function gr(){}const Ai=Object.freeze({});function PN(e,t,n,r){let i=!1,o=!1;const a=Ai;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 Yc(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 vee=[];function LN(e){C.useEffect(e,vee)}const em=null;let xee=class{constructor(){ne(this,"callbacks",[]);ne(this,"callbacksCount",0);ne(this,"nextId",1);ne(this,"startId",1);ne(this,"isScheduled",!1);ne(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 tm=new xee;let el=class IN{constructor(){ne(this,"currentId",em);ne(this,"cancel",()=>{this.currentId!==em&&(tm.cancel(this.currentId),this.currentId=em)});ne(this,"disposeEffect",()=>this.cancel)}static create(){return new IN}static request(t){return tm.request(t)}static cancel(t){return tm.cancel(t)}request(t){this.cancel(),this.currentId=tm.request(()=>{this.currentId=em,t()})}};function wee(){const e=ba(el.create).current;return LN(e.disposeEffect),e}function See(e){return e==null?e:"current"in e?e.current:e}let xS=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Cee={[xS.startingStyle]:""},Eee={[xS.endingStyle]:""},FN={transitionStatus(e){return e==="starting"?Cee:e==="ending"?Eee:null}};function kee(e,t=!1,n=!0){const r=wee();return tr((i,o=null)=>{r.cancel();function a(){On.flushSync(i)}const u=See(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=xS.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const g=new MutationObserver(()=>{c.hasAttribute(p)||(g.disconnect(),h())});g.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>g.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(g=>g.pending||g.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function jN(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=tr(i),a=kee(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}let hA=(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 by={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ul={valid(e){return e===null?null:e?{[hA.valid]:""}:{[hA.invalid]:""}}},zN=C.createContext({invalid:void 0,name:void 0,validityData:{state:by,errors:[],error:"",value:"",initialValue:null},setValidityData:gr,disabled:void 0,touched:!1,setTouched:gr,dirty:!1,setDirty:gr,filled:!1,setFilled:gr,focused:!1,setFocused:gr,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=Ai)=>e,getInputValidationProps:(e=Ai)=>e,inputRef:{current:null},commit:async()=>{}}});function Wc(e=!0){const t=C.useContext(zN);if(t.setValidityData===gr&&!e)throw new Error(Yc(28));return t}function Fx(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Ree=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:gr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function fh(){return C.useContext(Ree)}function BN(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:u}=fh(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=Wc(),g=tr(e.getValue);zn(()=>{if(!t)return;let y=n;y===void 0&&(y=g()),h.initialValue===null&&y!==null&&p(b=>({...b,initialValue:y}))},[t,p,n,h.initialValue,g]),zn(()=>{!t||!r||u.current.fields.set(r,{getValue:g,name:i,controlRef:o,validityData:Fx(h,c),validate(y=!0){let b=n;b===void 0&&(b=g()),f.current=!0,y?On.flushSync(()=>a(b)):a(b)}})},[a,o,t,u,g,r,c,f,i,h,n]),zn(()=>{const y=u.current.fields;return()=>{r&&y.delete(r)}},[u,r])}function UN(){return typeof window<"u"}function HN(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _ee(e){return UN()?e instanceof Element||e instanceof HN(e).Element:!1}function GN(e){return UN()?e instanceof HTMLElement||e instanceof HN(e).HTMLElement:!1}const Tee={...ha};let pA=0;function Aee(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(pA+=1,r(`${t}-${pA}`))},[n,t]),i}const mA=Tee.useId;function Dee(e,t){if(mA!==void 0){const n=mA();return e??`${t}-${n}`}return Aee(e,t)}function Ol(e){return Dee(e,"base-ui")}const qN=C.createContext({controlId:void 0,registerControlId:gr,labelId:void 0,setLabelId:gr,messageIds:[],setMessageIds:gr,getDescriptionProps:e=>e});function va(){return C.useContext(qN)}function Mee(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=va(),a=Ol(t),u=n?i:void 0,c=ba(()=>Symbol("labelable-control")),f=C.useRef(!1),h=C.useRef(t!=null),p=tr(()=>{!f.current||o===gr||(f.current=!1,o(c.current,void 0))});return zn(()=>{if(o===gr)return;let g;if(n){const y=r==null?void 0:r.current;_ee(y)&&y.closest("label")!=null?g=t??null:g=u??a}else if(t!=null)h.current=!0,g=t;else if(h.current)g=a;else{p();return}if(g===void 0){p();return}f.current=!0,o(c.current,g)},[t,r,u,o,n,a,c,p]),C.useEffect(()=>p,[p]),i??a}function VN(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),zn(()=>{if(!e&&o&&r!=="ending"&&n){const u=el.request(()=>{i("ending")});return()=>{el.cancel(u)}}},[e,o,r,n]),zn(()=>{if(!e||t)return;const u=el.request(()=>{i(void 0)});return()=>{el.cancel(u)}},[t,e]),zn(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=el.request(()=>{i("idle")});return()=>{el.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Oee(e,t){const n=C.useRef(e),r=tr(t);zn(()=>{n.current!==e&&r(n.current)},[e,r]),zn(()=>{n.current=e},[e])}const $ee=parseInt(C.version,10);function Nee(e){return $ee>=e}function Pee(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 Lee(e){return"composedPath"in e?e.composedPath()[0]:e.target}const td=0;let Iee=class YN{constructor(){ne(this,"currentId",td);ne(this,"clear",()=>{this.currentId!==td&&(clearTimeout(this.currentId),this.currentId=td)});ne(this,"disposeEffect",()=>this.clear)}static create(){return new YN}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=td,n()},t)}isStarted(){return this.currentId!==td}};function Fee(){const e=ba(Iee.create).current;return LN(e.disposeEffect),e}const WN="none";function KN(e){return(e==null?void 0:e.ownerDocument)||document}const Rl={"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"},XN=50,QN=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?R.jsxs("span",{"data-slot":"field-hint",className:ze(Rl["field-hint"],r),...i,children:[R.jsx(kl,{trigger:R.jsx(e,{}),delay:XN,TriggerProps:{render:R.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&R.jsx(Pe,{size:-1,children:t})]}):R.jsxs("span",{"data-slot":"field-hint",className:ze(Rl["field-hint"],r),...i,children:[e&&R.jsx(e,{}),t&&R.jsx(Pe,{size:-1,children:t})]});QN.displayName="FieldHint";const jee=C.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function zee(e=!1){const t=C.useContext(jee);if(!t&&!e)throw new Error(Yc(86));return t}function gA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(Nee(19)?n==null?void 0:n.ref:t.ref)??null}function jx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Bee(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 Uee(e,t){return typeof e=="function"?e(t):e}function Hee(e,t){return typeof e=="function"?e(t):e}const gd={};function _c(e,t,n,r,i){let o={...zx(e,gd)};return t&&(o=Lm(o,t)),n&&(o=Lm(o,n)),r&&(o=Lm(o,r)),o}function Gee(e){if(e.length===0)return gd;if(e.length===1)return zx(e[0],gd);let t={...zx(e[0],gd)};for(let n=1;n<e.length;n+=1)t=Lm(t,e[n]);return t}function Lm(e,t){return ZN(t)?t(e):qee(e,t)}function qee(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=jx(e.style,r);break}case"className":{e[n]=JN(e.className,r);break}default:Vee(n,r)?e[n]=Yee(e[n],r):e[n]=r}}return e}function Vee(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 ZN(e){return typeof e=="function"}function zx(e,t){return ZN(e)?e(t):e??gd}function Yee(e,t){return t?e?n=>{if(Wee(n)){const i=n;Bx(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 Bx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function JN(e,t){return t?e?t+" "+e:t:e}function Wee(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Hl(e,t,n={}){const r=t.render,i=Kee(t,n);if(n.enabled===!1)return null;const o=n.state??Ai;return Qee(e,r,i,o)}function Kee(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Ai,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Uee(n,o):void 0,p=f?Hee(r,o):void 0,g=f?Bee(o,c):Ai,y=f?jx(g,Array.isArray(u)?Gee(u):u)??Ai:Ai;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=pee([y.ref,gA(i),...a]):y.ref=Ix(y.ref,gA(i),a):Ix(null,null)),f?(h!==void 0&&(y.className=JN(y.className,h)),p!==void 0&&(y.style=jx(y.style,p)),y):Ai}const Xee=Symbol.for("react.lazy");function Qee(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=_c(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===Xee&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return Zee(e,n);throw new Error(Yc(8))}function Zee(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 Im=Object.keys(by);function Jee(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of Im)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function ete(e){const{formRef:t,clearErrors:n}=fh(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:u,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:g,getDescriptionProps:y}=va(),b=Fee(),v=C.useRef(null),w=tr(async(k,T=!1)=>{const A=v.current;if(!A)return;if(T){if(f.valid!==!1)return;const B=A.validity;if(!B.valueMissing){const F={value:k,state:{...by,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(A.setCustomValidity(""),g){const j=t.current.fields.get(g);j&&t.current.fields.set(g,{...j,...Fx(F,!1)})}r(F);return}const q=Im.reduce((F,j)=>(F[j]=B[j],F),{});if(!q.valid&&!Jee(q))return}function D(B){const q=Im.reduce((j,z)=>(j[z]=B.validity[z],j),{});let F=!1;for(const j of Im)if(j!=="valid"){if(j==="valueMissing"&&q[j])F=!0;else if(q[j])return q}return F&&!c.current&&(q.valid=!0,q.valueMissing=!1),q}b.clear();let O=null,N=[];const H=D(A);let I;const L=p();if(A.validationMessage&&!L)I=A.validationMessage,N=[A.validationMessage];else{const B=Array.from(t.current.fields.values()).reduce((F,j)=>(j.name&&(F[j.name]=j.getValue()),F),{}),q=i(k,B);typeof q=="object"&&q!==null&&"then"in q?O=await q:O=q,O!==null?(H.valid=!1,H.customError=!0,Array.isArray(O)?(N=O,A.setCustomValidity(O.join(`
|
|
485
|
+
`))):O&&(N=[O],A.setCustomValidity(O))):L&&(A.setCustomValidity(""),H.customError=!1,A.validationMessage?(I=A.validationMessage,N=[A.validationMessage]):A.validity.valid&&!H.valid&&(H.valid=!0))}const M={value:k,state:H,error:I??(Array.isArray(O)?O[0]:O??""),errors:N,initialValue:o.initialValue};if(g){const B=t.current.fields.get(g);B&&t.current.fields.set(g,{...B,...Fx(M,u)})}r(M)}),S=C.useCallback((k={})=>_c(y,f.valid===!1?{"aria-invalid":!0}:Ai,k),[y,f.valid]),_=C.useCallback((k={})=>_c({onChange(T){if(T.nativeEvent.defaultPrevented)return;if(n(h),!p()){w(T.currentTarget.value,!0);return}if(u)return;const A=T.currentTarget;if(A.value===""){w(A.value);return}b.clear(),a?b.start(a,()=>{w(A.value)}):w(A.value)}},S(k)),[S,n,h,b,w,u,a,p]);return C.useMemo(()=>({getValidationProps:S,getInputValidationProps:_,inputRef:v,commit:w}),[S,_,w])}const tte=function(e){const t=Ol(),[n,r]=C.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=C.useState(void 0),[a,u]=C.useState([]),c=ba(()=>new Map),{messageIds:f}=va(),h=tr((y,b)=>{const v=c.current;if(b===void 0){v.delete(y);return}v.set(y,b),r(w=>{if(v.size===0)return;let S;for(const _ of v.values()){if(w!==void 0&&_===w)return w;S===void 0&&(S=_)}return S})}),p=C.useCallback(y=>_c({"aria-describedby":f.concat(a).join(" ")||void 0},y),[f,a]),g=C.useMemo(()=>({controlId:n,registerControlId:h,labelId:i,setLabelId:o,messageIds:a,setMessageIds:u,getDescriptionProps:p}),[n,h,i,o,a,u,p]);return R.jsx(qN.Provider,{value:g,children:e.children})},nte=C.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=fh(),{render:o,className:a,validate:u,validationDebounceTime:c=0,validationMode:f=r,name:h,disabled:p=!1,invalid:g,dirty:y,touched:b,actionsRef:v,...w}=e,{disabled:S}=zee(),_=tr(u||(()=>null)),k=S||p,[T,A]=C.useState(!1),[D,O]=C.useState(!1),[N,H]=C.useState(!1),[I,L]=C.useState(!1),M=y??D,B=b??T,q=C.useRef(!1),F=tr(ve=>{y===void 0&&(ve&&(q.current=!0),O(ve))}),j=tr(ve=>{b===void 0&&A(ve)}),z=tr(()=>f==="onChange"||f==="onSubmit"&&i.current),V=!!(g||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[W,P]=C.useState({state:by,error:"",errors:[],value:null,initialValue:null}),Y=!V&&W.state.valid,J=C.useMemo(()=>({disabled:k,touched:B,dirty:M,valid:Y,filled:N,focused:I}),[k,B,M,Y,N,I]),U=ete({setValidityData:P,validate:_,validityData:W,validationDebounceTime:c,invalid:V,markedDirtyRef:q,state:J,name:h,shouldValidateOnChange:z}),se=C.useCallback(()=>{q.current=!0,U.commit(W.value)},[U,W]);C.useImperativeHandle(v,()=>({validate:se}),[se]);const oe=C.useMemo(()=>({invalid:V,name:h,validityData:W,setValidityData:P,disabled:k,touched:B,setTouched:j,dirty:M,setDirty:F,filled:N,setFilled:H,focused:I,setFocused:L,validate:_,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:z,state:J,markedDirtyRef:q,validation:U}),[V,h,W,k,B,j,M,F,N,H,I,L,_,f,c,z,J,U]),he=Hl("div",e,{ref:t,state:J,props:w,stateAttributesMapping:Ul});return R.jsx(zN.Provider,{value:oe,children:he})}),rte=C.forwardRef(function(e,t){return R.jsx(tte,{children:R.jsx(nte,{...e,ref:t})})}),wS=({children:e,fullwidth:t,...n})=>R.jsx(rte,{"data-slot":"field-root",render:R.jsx(Ye,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});wS.displayName="FieldRoot";const ite=C.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,u=Wc(!1),{controlId:c,setLabelId:f,labelId:h}=va(),p=Ol(i),g=C.useRef(null),y=tr(b=>{var w;if((w=Lee(b.nativeEvent))!=null&&w.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=KN(b.currentTarget).getElementById(c);GN(v)&&v.focus({focusVisible:!0})});return zn(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),Hl("label",e,{ref:[t,g],state:u.state,props:[{id:h},o?{htmlFor:c??void 0,onMouseDown:y}:{onClick:y,onPointerDown(b){b.preventDefault()}},a],stateAttributesMapping:Ul})}),SS=({required:e,weight:t="bold",className:n,children:r,...i})=>R.jsx(ite,{"data-slot":"field-label","data-required":e??void 0,render:R.jsx(Pe,{render:R.jsx("label",{}),weight:t}),className:ze(Rl["field-label"],n),...i,children:r});SS.displayName="FieldLabel";const ote={...Ul,...FN},eP=C.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,u=Ol(r),{validityData:c,state:f,name:h}=Wc(!1),{setMessageIds:p}=va(),{errors:g}=fh(),y=h?g[h]:null;let b=!1;y||o===!0?b=!0:o?b=!!c.state[o]:b=c.state.valid===!1;const{mounted:v,transitionStatus:w,setMounted:S}=VN(b);zn(()=>{if(!(!b||!u))return p(L=>L.concat(u)),()=>{p(L=>L.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?R.jsx("ul",{children:c.errors.map(L=>R.jsx("li",{children:L},L))}):c.error);let N=c.error;y!=null?N=Array.isArray(y)?JSON.stringify(y):y:c.errors.length>1&&(N=JSON.stringify(c.errors)),b&&N!==A&&(D(N),T(O)),jN({open:b,ref:_,onComplete(){b||S(!1)}});const H={...f,transitionStatus:w},I=Hl("div",e,{ref:[t,_],state:H,props:[{id:u,children:b?O:k},a],stateAttributesMapping:ote,enabled:v});return v?I:null}),tP=e=>R.jsx(eP,{"data-slot":"field-error-tooltip",render:R.jsx(kl,{delay:XN,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:R.jsx("span",{className:Rl["field-error-tooltip"],children:R.jsx(RH,{color:"var(--shade-foreground)"})})}),...e});tP.displayName="FieldErrorTooltip";const kg=e=>R.jsx(eP,{"data-slot":"field-error",render:R.jsx(Pe,{shade:"foreground"}),...e});kg.displayName="FieldError";const ste=C.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=Ol(r),u=Wc(!1),{setMessageIds:c}=va();return zn(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),Hl("p",e,{ref:t,state:u.state,props:[{id:a},o],stateAttributesMapping:Ul})}),CS=({children:e,...t})=>R.jsx(ste,{"data-slot":"field-description",render:R.jsx(Pe,{shade:"muted"}),...t,children:e});CS.displayName="FieldDescription";const nP=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:u,HintProps:c,DescriptionProps:f,children:h,...p})=>R.jsxs(wS,{...p,...o,className:ze(n==="absolute"&&Rl["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&R.jsxs(Ke,{className:Rl["field-label-group"],ax:"space-between",ay:"center",children:[e&&R.jsx(SS,{required:i,...a,children:e}),R.jsxs(Ke,{ay:"center",children:[n==="tooltip"&&R.jsx(tP,{...u}),t&&R.jsx(QN,{...t,...c})]})]}),h,n==="absolute"&&R.jsx(kg,{className:Rl["field-error-absolute"],...u}),n==="inline"&&R.jsx(kg,{...u}),r&&R.jsx(CS,{...f,children:r})]});nP.displayName="Field";const ate="_input_1dqa6_3 _disabled_dkczp_2",Di={input:ate,"size-small":"_size-small_1dqa6_47","size-medium":"_size-medium_1dqa6_52","size-large":"_size-large_1dqa6_57","toggle-fullwidth":"_toggle-fullwidth_1dqa6_63","toggle-ghost":"_toggle-ghost_1dqa6_68","input-wrapper":"_input-wrapper_1dqa6_87","input-inner":"_input-inner_1dqa6_110","input-slot":"_input-slot_1dqa6_129"},lte="medium",rP=Sr({variants:{fullwidth:{true:Di["toggle-fullwidth"]},ghost:{true:Di["toggle-ghost"]},size:{small:Di["size-small"],medium:Di["size-medium"],large:Di["size-large"]}},defaultVariants:{size:lte}}),iP=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?R.jsx(R.Fragment,{children:a}):R.jsxs(Ke,{"data-slot":"input-wrapper",ay:"center",className:ze(Di.input,Di["input-wrapper"],rP({size:n,fullwidth:r,ghost:i}),o),children:[e&&R.jsx("span",{"data-slot":"input-before",className:Di["input-slot"],children:e}),a,t&&R.jsx("span",{"data-slot":"input-after",className:Di["input-slot"],children:t})]});iP.displayName="InputWrapper";const ute=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:g,name:y,disabled:b,setTouched:v,setDirty:w,validityData:S,setFocused:_,setFilled:k,validationMode:T,validation:A}=Wc(),D=b||u,O=y??o,N={...g,disabled:D},{labelId:H}=va(),I=Mee({id:i});zn(()=>{var j;const F=a!=null;(j=A.inputRef.current)!=null&&j.value||F&&a!==""?k(!0):F&&a===""&&k(!1)},[A.inputRef,k,a]);const L=C.useRef(null);zn(()=>{h&&L.current===Pee(KN(L.current))&&_(!0)},[h,_]);const[M]=MN({controlled:a,default:f,name:"FieldControl",state:"value"}),B=a!==void 0,q=B?M:void 0;return BN({id:I,name:O,commit:A.commit,value:q,getValue:()=>{var F;return(F=A.inputRef.current)==null?void 0:F.value},controlRef:A.inputRef}),Hl("input",e,{ref:[t,L],state:N,props:[{id:I,disabled:D,name:O,ref:A.inputRef,"aria-labelledby":H,autoFocus:h,...B?{value:q}:{defaultValue:f},onChange(F){const j=F.currentTarget.value;c==null||c(j,PN(WN,F.nativeEvent)),w(j!==S.initialValue),k(j!=="")},onFocus(){_(!0)},onBlur(F){v(!0),_(!1),T==="onBlur"&&A.commit(F.currentTarget.value)},onKeyDown(F){F.currentTarget.tagName==="INPUT"&&F.key==="Enter"&&(v(!0),A.commit(F.currentTarget.value))}},A.getInputValidationProps(),p],stateAttributesMapping:Ul})}),cte=C.forwardRef(function(e,t){return R.jsx(ute,{ref:t,...e})}),oP=({label:e,description:t,required:n,name:r,size:i,fullwidth:o,ghost:a,before:u,after:c,FieldProps:f,className:h,ref:p,...g})=>{const y=!!(u||c);return R.jsx(yi,{condition:!!(e||t),render:R.jsx(nP,{name:r,label:e,description:t,required:n,...f}),children:R.jsx(iP,{before:u,after:c,size:i,fullwidth:o,ghost:a,children:R.jsx(cte,{"data-slot":"input",ref:p,name:r,className:ze(Di.input,y?Di["input-inner"]:rP({size:i,fullwidth:o,ghost:a}),h),...g})})})};oP.displayName="Input";const sP=16,fte="none",dte="_list_c57i6_3",Vo={list:dte,"list-group-header":"_list-group-header_c57i6_29","list-group-icon":"_list-group-icon_c57i6_33","list-group-category":"_list-group-category_c57i6_37","list-group-panel":"_list-group-panel_c57i6_42","list-item":"_list-item_c57i6_47","list-text-label":"_list-text-label_c57i6_52","list-text-description":"_list-text-description_c57i6_62"},aP=({className:e,children:t,...n})=>R.jsx(Pe,{"data-slot":"list-text-label",className:ze(Vo["list-text-label"],e),size:0,...n,children:t});aP.displayName="ListLabel";const lP=({className:e,children:t,...n})=>R.jsx(Pe,{"data-slot":"list-text-description",className:ze(Vo["list-text-description"],e),size:0,...n,children:t});lP.displayName="ListDescription";const uP=({label:e,description:t,...n})=>R.jsxs(yi,{condition:!!t,render:R.jsx(Ye,{"data-slot":"list-text-block",mb:2,...n}),children:[R.jsx(aP,{children:e}),t&&R.jsx(lP,{children:t})]});uP.displayName="ListTextBlock";const vy=({render:e,className:t,icon:n,label:r,description:i,children:o,...a})=>R.jsx(Ke,{"data-slot":"list-item",render:e??R.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:ze(Vo["list-item"],t),...a,children:o||R.jsxs(yi,{condition:!!n,render:R.jsx(Ke,{gap:2,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[n&&R.jsx(n,{"data-slot":"list-item-icon",size:sP,style:{color:"var(--shade-foreground)"}}),R.jsx(uP,{"data-slot":"list-item-text",label:r,description:i})]})});vy.displayName="ListItem";const ES=({category:e,icon:t})=>e?R.jsxs(Ke,{"data-slot":"list-group-header",className:Vo["list-group-header"],ay:"center",ax:"start",gap:2,py:1,fullwidth:!0,children:[t&&R.jsx(t,{className:Vo["list-group-icon"],size:sP}),R.jsx(Pe,{"data-slot":"list-group-category",render:R.jsx("h3",{}),className:Vo["list-group-category"],weight:"bold",size:0,children:e})]}):null;ES.displayName="ListGroupHeader";const kS=({category:e,icon:t,items:n})=>R.jsxs(Ye,{"data-slot":"list-group",render:R.jsx("li",{}),ax:"stretch",fullwidth:!0,className:Vo["list-group"],children:[R.jsx(ES,{category:e,icon:t}),R.jsx("ul",{"data-slot":"list-group-panel",className:Vo["list-group-panel"],children:n.map((r,i)=>"items"in r?R.jsx(kS,{...r},r.category??i):R.jsx(vy,{...r},i))})]});kS.displayName="ListGroup";const Tc=({marker:e=fte,category:t,icon:n,items:r,children:i,ItemProps:o,GroupProps:a,...u})=>{const c=e==="decimal"?R.jsx("ol",{}):R.jsx("ul",{}),f=R.jsx(Ye,{"data-slot":"list","data-marker":e,ax:"stretch",className:Vo.list,render:c,...u,children:r?r.map((h,p)=>"items"in h?R.jsx(kS,{...h,...a},h.category??p):R.jsx(vy,{fullwidth:!0,...h,...o},p)):i});return t?R.jsxs(Ye,{"data-slot":"list-section",ax:"stretch",fullwidth:!0,children:[R.jsx(ES,{category:t,icon:n}),f]}):f};Tc.displayName="List";const hte=C.createContext(void 0);function pte(e=!1){const t=C.useContext(hte);if(t===void 0&&!e)throw new Error(Yc(16));return t}function mte(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 gte(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=pte(!0)!==void 0,u=tr(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=mte({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;yte(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);zn(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:S,..._}=g;return _c({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||(Bx(k),w==null||w(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||(Bx(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}S==null||S(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=tr(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function yte(e){return GN(e)&&e.tagName==="BUTTON"}const bte="_checkbox_pxuy6_3 _disabled_dkczp_2",zo={checkbox:bte,"checkbox-label":"_checkbox-label_pxuy6_47","checkbox-indicator":"_checkbox-indicator_pxuy6_52","size-small":"_size-small_pxuy6_61","checkbox-icon":"_checkbox-icon_pxuy6_64","size-medium":"_size-medium_pxuy6_69","size-large":"_size-large_pxuy6_77","toggle-bordered":"_toggle-bordered_pxuy6_86","toggle-reversed":"_toggle-reversed_pxuy6_102"},cP=Sr({variants:{bordered:{true:zo["toggle-bordered"]},reversed:{true:zo["toggle-reversed"]},size:{small:zo["size-small"],medium:zo["size-medium"],large:zo["size-large"]}}}),fP=({name:e,label:t,description:n,reversed:r,bordered:i,LabelProps:o,DescriptionProps:a,ErrorProps:u,className:c,children:f,...h})=>{const p=!!t,g=p&&!!n;return R.jsxs(yi,{condition:p,render:R.jsx(Ke,{render:R.jsx("label",{}),className:ze(zo["checkbox-label"],cP({reversed:r,bordered:i}),c),ay:g?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&R.jsx(wS,{name:e,children:R.jsxs(yi,{condition:g,render:R.jsx(Ye,{gap:3}),children:[t&&R.jsx(SS,{weight:"normal",...o,children:t}),n&&R.jsx(CS,{...a,children:n}),R.jsx(kg,{...u})]})})]})};fP.displayName="CheckboxField";const vte="small";let yA=(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 dP(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[yA.checked]:""}:{[yA.unchecked]:""}},...Ul}),[e.indeterminate])}const xte=C.createContext({disabled:!1});function wte(){return C.useContext(xte)}const Ste=C.createContext(void 0);function Cte(e=!0){const t=C.useContext(Ste);if(t===void 0&&!e)throw new Error(Yc(3));return t}const hP=C.createContext(void 0);function Ete(){const e=C.useContext(hP);if(e===void 0)throw new Error(Yc(14));return e}const kte="data-parent",Rte=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:g=!1,render:y,required:b=!1,uncheckedValue:v,value:w,nativeButton:S=!1,..._}=e,{clearErrors:k}=fh(),{disabled:T,name:A,setDirty:D,setFilled:O,setFocused:N,setTouched:H,state:I,validationMode:L,validityData:M,shouldValidateOnChange:B,validation:q}=Wc(),F=wte(),{labelId:j,controlId:z,registerControlId:V,getDescriptionProps:W}=va(),P=Cte(),Y=P==null?void 0:P.parent,J=Y&&P.allValues,U=T||F.disabled||(P==null?void 0:P.disabled)||o,se=A??f,oe=w??se,he=Ol(),ve=Ol();let Re=z;J?Re=p?ve:`${Y.id}-${oe}`:a&&(Re=a);let ce={};J&&(p?ce=P.parent.getParentProps():oe&&(ce=P.parent.getChildProps(oe)));const Ie=tr(h),{checked:Ve=n,indeterminate:X=u,onCheckedChange:Z,...te}=ce,xe=P==null?void 0:P.value,ge=P==null?void 0:P.setValue,Ce=P==null?void 0:P.defaultValue,le=C.useRef(null),re=ba(()=>Symbol("checkbox-control")),me=C.useRef(!1),{getButtonProps:ae,buttonRef:Oe}=gte({disabled:U,native:S}),Te=(P==null?void 0:P.validation)??q,[_e,De]=MN({controlled:oe&&xe&&!p?xe.includes(oe):Ve,default:oe&&Ce&&!p?Ce.includes(oe):i,name:"Checkbox",state:"checked"});zn(()=>{V!==gr&&(me.current=!0,V(re.current,Re))},[Re,P,V,p,re]),C.useEffect(()=>{const Me=re.current;return()=>{!me.current||V===gr||(me.current=!1,V(Me,void 0))}},[V,re]),BN({enabled:!P,id:he,commit:Te.commit,value:_e,controlRef:le,name:se,getValue:()=>_e});const ue=C.useRef(null),Se=Ix(c,ue,Te.inputRef);zn(()=>{ue.current&&(ue.current.indeterminate=X,_e&&O(!0))},[_e,X,O]),Oee(_e,()=>{P&&!p||(k(se),O(_e),D(_e!==M.initialValue),B()?Te.commit(_e):Te.commit(_e,!0))});const ke=_c({checked:_e,disabled:U,name:p?void 0:se,id:S?void 0:Re??void 0,required:b,ref:Se,style:se?bee:yee,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Me){if(Me.nativeEvent.defaultPrevented)return;const We=Me.target.checked,Le=PN(WN,Me.nativeEvent);if(Z==null||Z(We,Le),Ie(We,Le),!Le.isCanceled&&(De(We),oe&&xe&&ge&&!p)){const Tt=We?[...xe,oe]:xe.filter(ft=>ft!==oe);ge(Tt,Le)}},onFocus(){var Me;(Me=le.current)==null||Me.focus()}},w!==void 0?{value:(P?_e&&w:w)||""}:Ai,W,P?Te.getValidationProps:Te.getInputValidationProps),Ne=J?!!Ve:_e,Fe=J&&X||u;C.useEffect(()=>{if(!Y||!oe)return;const Me=Y.disabledStatesRef.current;return Me.set(oe,U),()=>{Me.delete(oe)}},[Y,U,oe]);const at=C.useMemo(()=>({...I,checked:Ne,disabled:U,readOnly:g,required:b,indeterminate:Fe}),[I,Ne,U,g,b,Fe]),Bt=dP(at),Mt=Hl("span",e,{state:at,ref:[Oe,le,t,P==null?void 0:P.registerControlRef],props:[{id:S?Re??void 0:he,role:"checkbox","aria-checked":X?"mixed":_e,"aria-readonly":g||void 0,"aria-required":b||void 0,"aria-labelledby":j,[kte]:p?"":void 0,onFocus(){N(!0)},onBlur(){const Me=ue.current;Me&&(H(!0),N(!1),L==="onBlur"&&Te.commit(P?xe:Me.checked))},onClick(Me){var We;g||U||(Me.preventDefault(),(We=ue.current)==null||We.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Me.shiftKey,ctrlKey:Me.ctrlKey,altKey:Me.altKey,metaKey:Me.metaKey})))}},W,Te.getValidationProps,_,te,ae],stateAttributesMapping:Bt});return R.jsxs(hP.Provider,{value:at,children:[Mt,!_e&&!P&&se&&!p&&v!==void 0&&R.jsx("input",{type:"hidden",name:se,value:v}),R.jsx("input",{...ke})]})}),pP=({size:e=vte,hideIndicator:t,className:n,...r})=>R.jsx(Rte,{"data-slot":"checkbox","aria-label":"checkbox",className:ze(zo.checkbox,cP({size:e}),n,{"sr-only":t}),...r});pP.displayName="CheckboxRoot";const _te=C.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=Ete(),u=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=VN(u),p=C.useRef(null),g={...a,transitionStatus:f};jN({open:u,ref:p,onComplete(){u||h(!1)}});const y=dP(a),b=C.useMemo(()=>({...y,...FN,...Ul}),[y]),v=i||c,w=Hl("span",e,{ref:[t,p],state:g,stateAttributesMapping:b,props:o});return v?w:null}),mP=({indeterminate:e,className:t,...n})=>R.jsx(_te,{"data-slot":"checkbox-indicator",className:ze(zo["checkbox-indicator"],t),...n,children:R.jsx(Pw,{condition:!!e,className:zo["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:R.jsx(tH,{strokeWidth:3}),false:R.jsx(zw,{strokeWidth:3})}})});mP.displayName="CheckboxIndicator";const gP=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:u,IndicatorProps:c,...f})=>R.jsx(fP,{name:e,label:t,description:n,reversed:r,bordered:i,...u,children:R.jsx(pP,{name:e,hideIndicator:a,indeterminate:o,...f,children:R.jsx(mP,{indeterminate:o,...c})})});gP.displayName="Checkbox";function RS({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 bA={};function xr(e,t){const n=C.useRef(bA);return n.current===bA&&(n.current=e(t)),n}const Zv=ha[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Tte=Zv&&Zv!==C.useLayoutEffect?Zv:e=>e();function Ue(e){const t=xr(Ate).current;return t.next=e,Tte(t.effect),t.trampoline}function Ate(){const e={next:void 0,callback:Dte,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Dte(){}const Mte=()=>{},Je=typeof document<"u"?C.useLayoutEffect:Mte,yP=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ote(){return C.useContext(yP)}function _S(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Ue(i),a=C.useRef(0),u=xr(Nte).current,c=xr($te).current,[f,h]=C.useState(0),p=C.useRef(f),g=Ue((S,_)=>{c.set(S,_??null),p.current+=1,h(p.current)}),y=Ue(S=>{c.delete(S),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const S=new Map;return Array.from(c.keys()).filter(k=>k.isConnected).sort(Pte).forEach((k,T)=>{const A=c.get(k)??{};S.set(k,{...A,index:T})}),S},[c,f]);Je(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const S=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&&S.observe(k.parentElement,{childList:!0})}),()=>{S.disconnect()}},[b]),Je(()=>{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]),Je(()=>()=>{n.current=[]},[n]),Je(()=>()=>{r&&(r.current=[])},[r]);const v=Ue(S=>(u.add(S),()=>{u.delete(S)}));Je(()=>{u.forEach(S=>S(b))},[u,b]);const w=C.useMemo(()=>({register:g,unregister:y,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,y,v,n,r,a]);return R.jsx(yP.Provider,{value:w,children:t})}function $te(){return new Map}function Nte(){return new Set}function Pte(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 Lte=C.createContext(void 0);function xy(){const e=C.useContext(Lte);return(e==null?void 0:e.direction)??"ltr"}function Pi(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 $l(e,t,n,r){const i=xr(bP).current;return Fte(i,e,t,n,r)&&vP(i,[e,t,n,r]),i.callback}function Ite(e){const t=xr(bP).current;return jte(t,e)&&vP(t,e),t.callback}function bP(){return{callback:null,cleanup:null,refs:[]}}function Fte(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function jte(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function vP(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 zte=parseInt(C.version,10);function TS(e){return zte>=e}function vA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(TS(19)?n==null?void 0:n.ref:t.ref)??null}function Ux(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Bte(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 Ute(e,t){return typeof e=="function"?e(t):e}function Hte(e,t){return typeof e=="function"?e(t):e}const yd={};function jd(e,t,n,r,i){let o={...Hx(e,yd)};return t&&(o=Fm(o,t)),n&&(o=Fm(o,n)),r&&(o=Fm(o,r)),o}function Gte(e){if(e.length===0)return yd;if(e.length===1)return Hx(e[0],yd);let t={...Hx(e[0],yd)};for(let n=1;n<e.length;n+=1)t=Fm(t,e[n]);return t}function Fm(e,t){return xP(t)?t(e):qte(e,t)}function qte(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Ux(e.style,r);break}case"className":{e[n]=wP(e.className,r);break}default:Vte(n,r)?e[n]=Yte(e[n],r):e[n]=r}}return e}function Vte(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 xP(e){return typeof e=="function"}function Hx(e,t){return xP(e)?e(t):e??yd}function Yte(e,t){return t?e?n=>{if(Wte(n)){const i=n;Gx(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 Gx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wP(e,t){return t?e?t+" "+e:t:e}function Wte(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function SP(){}const Ac=Object.freeze([]),En=Object.freeze({}),Kte=500,Xte=500,Qte={style:{transition:"none"}},Zte="data-base-ui-click-trigger",Jte={fallbackAxisSide:"none"},ene={fallbackAxisSide:"end"},tne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Gr(e,t,n={}){const r=t.render,i=nne(t,n);if(n.enabled===!1)return null;const o=n.state??En;return ine(e,r,i,o)}function nne(e,t={}){const{className:n,style:r,render:i}=e,{state:o=En,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?Ute(n,o):void 0,p=f?Hte(r,o):void 0,g=f?Bte(o,c):En,y=f?Ux(g,Array.isArray(u)?Gte(u):u)??En:En;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Ite([y.ref,vA(i),...a]):y.ref=$l(y.ref,vA(i),a):$l(null,null)),f?(h!==void 0&&(y.className=wP(y.className,h)),p!==void 0&&(y.style=Ux(y.style,p)),y):En}const rne=Symbol.for("react.lazy");function ine(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=jd(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===rne&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return one(e,n);throw new Error(Pi(8))}function one(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 Rg="none",zd="trigger-press",Lr="trigger-hover",bd="trigger-focus",AS="outside-press",CP="item-press",Dc="focus-out",DS="escape-key",jm="list-navigation",sne="cancel-open",zm="sibling-open",ane="imperative-action";function kt(e,t,n,r){let i=!1,o=!1;const a=r??En;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 lne={...ha};let xA=0;function une(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(xA+=1,r(`${t}-${xA}`))},[n,t]),i}const wA=lne.useId;function Gl(e,t){if(wA!==void 0){const n=wA();return e??(t?`${t}-${n}`:n)}return une(e,t)}function dh(e){return Gl(e,"base-ui")}const cne=[];function wy(e){C.useEffect(e,cne)}const nm=null;class fne{constructor(){ne(this,"callbacks",[]);ne(this,"callbacksCount",0);ne(this,"nextId",1);ne(this,"startId",1);ne(this,"isScheduled",!1);ne(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 rm=new fne;class Xi{constructor(){ne(this,"currentId",nm);ne(this,"cancel",()=>{this.currentId!==nm&&(rm.cancel(this.currentId),this.currentId=nm)});ne(this,"disposeEffect",()=>this.cancel)}static create(){return new Xi}static request(t){return rm.request(t)}static cancel(t){return rm.cancel(t)}request(t){this.cancel(),this.currentId=rm.request(()=>{this.currentId=nm,t()})}}function MS(){const e=xr(Xi.create).current;return wy(e.disposeEffect),e}function No(e){return e==null?e:"current"in e?e.current:e}let Bd=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const dne={[Bd.startingStyle]:""},hne={[Bd.endingStyle]:""},EP={transitionStatus(e){return e==="starting"?dne:e==="ending"?hne:null}};function pne(e,t=!1,n=!0){const r=MS();return Ue((i,o=null)=>{r.cancel();function a(){On.flushSync(i)}const u=No(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=Bd.startingStyle;if(!c.hasAttribute(y)){r.request(g);return}const b=new MutationObserver(()=>{c.hasAttribute(y)||(b.disconnect(),g())});b.observe(c,{attributes:!0,attributeFilter:[y]}),o==null||o.addEventListener("abort",()=>b.disconnect(),{once:!0})},g=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")&&g()})};var f=p,h=g;if(t){p();return}r.request(g)}})}function kP(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),Je(()=>{if(!e&&o&&r!=="ending"&&n){const u=Xi.request(()=>{i("ending")});return()=>{Xi.cancel(u)}}},[e,o,r,n]),Je(()=>{if(!e||t)return;const u=Xi.request(()=>{i(void 0)});return()=>{Xi.cancel(u)}},[t,e]),Je(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Xi.request(()=>{i("idle")});return()=>{Xi.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}let mne=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function OS(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}=Ote(),g=C.useRef(-1),[y,b]=C.useState(o??(i===mne.GuessFromOrder?()=>{if(g.current===-1){const S=p.current;p.current+=1,g.current=S}return g.current}:-1)),v=C.useRef(null),w=C.useCallback(S=>{var _;if(v.current=S,y!==-1&&S!==null&&(f.current[y]=S,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??S.textContent}},[y,f,h,t,r]);return Je(()=>{if(o!=null)return;const S=v.current;if(S)return a(S,n),()=>{u(S)}},[o,a,u,n]),Je(()=>{if(o==null)return c(S=>{var k;const _=v.current?(k=S.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:w,index:y}),[y,w])}function gne(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Sy(){return typeof window<"u"}function xa(e){return $S(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function so(e){var t;return(t=($S(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $S(e){return Sy()?e instanceof Node||e instanceof Mn(e).Node:!1}function Lt(e){return Sy()?e instanceof Element||e instanceof Mn(e).Element:!1}function Zt(e){return Sy()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function qx(e){return!Sy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function yne(e){return/^(table|td|th)$/.test(xa(e))}function Cy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const bne=/transform|translate|scale|rotate|perspective|filter/,vne=/paint|layout|strict|content/,Qa=e=>!!e&&e!=="none";let Jv;function NS(e){const t=Lt(e)?wr(e):e;return Qa(t.transform)||Qa(t.translate)||Qa(t.scale)||Qa(t.rotate)||Qa(t.perspective)||!Ey()&&(Qa(t.backdropFilter)||Qa(t.filter))||bne.test(t.willChange||"")||vne.test(t.contain||"")}function xne(e){let t=ro(e);for(;Zt(t)&&!eo(t);){if(NS(t))return t;if(Cy(t))return null;t=ro(t)}return null}function Ey(){return Jv==null&&(Jv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jv}function eo(e){return/^(html|body|#document)$/.test(xa(e))}function wr(e){return Mn(e).getComputedStyle(e)}function ky(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ro(e){if(xa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qx(e)&&e.host||so(e);return qx(t)?t.host:t}function RP(e){const t=ro(e);return eo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&wa(t)?t:RP(t)}function sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=RP(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Mn(i);if(o){const u=Vx(a);return t.concat(a,a.visualViewport||[],wa(i)?i:[],u&&n?sa(u):[])}else return t.concat(i,sa(i,[],n))}function Vx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const _P=C.createContext(void 0);function PS(e=!1){const t=C.useContext(_P);if(t===void 0&&!e)throw new Error(Pi(16));return t}function wne(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 Ry(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=PS(!0)!==void 0,u=Ue(()=>{const g=o.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:c}=wne({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const g=o.current;Sne(g)&&a&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,a]);Je(f,[f]);const h=C.useCallback((g={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:w,onPointerDown:S,..._}=g;return jd({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||(Gx(T),w==null||w(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||(Gx(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}S==null||S(T)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=Ue(g=>{o.current=g,f()});return{getButtonProps:h,buttonRef:p}}function Sne(e){return Zt(e)&&e.tagName==="BUTTON"}const Kc=typeof navigator<"u",e1=Ene(),TP=Rne(),AP=kne(),DP=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),MP=e1.platform==="MacIntel"&&e1.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(e1.platform),OP=Kc&&/apple/i.test(navigator.vendor),Yx=Kc&&/android/i.test(TP)||/android/i.test(AP),Cne=Kc&&TP.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,$P=AP.includes("jsdom/");function Ene(){if(!Kc)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 kne(){if(!Kc)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Rne(){if(!Kc)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Wx="data-base-ui-focusable",NP="active",PP="selected",LP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",aa="ArrowLeft",la="ArrowRight",LS="ArrowUp",hh="ArrowDown";function li(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 pt(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&&qx(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function _g(e,t){if(!Lt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(pt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Ir(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ki(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 _ne(e){return e.matches("html,body")}function _y(e){return Zt(e)&&e.matches(LP)}function Kx(e){return e?e.getAttribute("role")==="combobox"&&_y(e):!1}function Tne(e){if(!e||$P)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Tg(e){return e?e.hasAttribute(Wx)?e:e.querySelector(`[${Wx}]`)||e:null}function _l(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,..._l(e,i.id,n)])}function SA(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 Ane(e){return"nativeEvent"in e}function IP(e){return e.pointerType===""&&e.isTrusted?!0:Yx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function FP(e){return $P?!1:!Yx&&e.width===0&&e.height===0||Yx&&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 Mc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Dne=["top","right","bottom","left"],Oc=Math.min,Fr=Math.max,$c=Math.round,Wu=Math.floor,to=e=>({x:e,y:e}),Mne={left:"right",right:"left",bottom:"top",top:"bottom"};function Xx(e,t,n){return Fr(e,Oc(t,n))}function Zo(e,t){return typeof e=="function"?e(t):e}function jr(e){return e.split("-")[0]}function Sa(e){return e.split("-")[1]}function IS(e){return e==="x"?"y":"x"}function FS(e){return e==="y"?"height":"width"}function mi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jS(e){return IS(mi(e))}function One(e,t,n){n===void 0&&(n=!1);const r=Sa(e),i=jS(e),o=FS(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ag(a)),[a,Ag(a)]}function $ne(e){const t=Ag(e);return[Qx(e),t,Qx(t)]}function Qx(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const CA=["left","right"],EA=["right","left"],Nne=["top","bottom"],Pne=["bottom","top"];function Lne(e,t,n){switch(e){case"top":case"bottom":return n?t?EA:CA:t?CA:EA;case"left":case"right":return t?Nne:Pne;default:return[]}}function Ine(e,t,n,r){const i=Sa(e);let o=Lne(jr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Qx)))),o}function Ag(e){const t=jr(e);return Mne[t]+e.slice(t.length)}function Fne(e){return{top:0,right:0,bottom:0,left:0,...e}}function zP(e){return typeof e!="number"?Fne(e):{top:e,right:e,bottom:e,left:e}}function Dg(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 nc(e,t){return t<0||t>=e.current.length}function Bm(e,t){return Fn(e,{disabledIndices:t})}function Zx(e,t){return Fn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fn(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&&ua(e,o,r));return o}function BP(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 g=[],y={};let b=!1;{let S=null,_=-1;e.current.forEach((k,T)=>{if(k==null)return;const A=k.closest('[role="row"]');A&&(b=!0),(A!==S||_===-1)&&(S=A,_+=1,g[_]=[]),g[_].push(T),y[T]=_})}const v=b&&g.length>0&&g.some(S=>S.length!==o);function w(S){if(!v||f===-1)return;const _=y[f];if(_==null)return;const k=g[_].indexOf(f);let T=S==="up"?_-1:_+1;r&&(T<0?T=g.length-1:T>=g.length&&(T=0));const A=new Set;for(;T>=0&&T<g.length&&!A.has(T);){A.add(T);const D=g[T];if(D.length===0){T=S==="up"?T-1:T+1;continue}const O=Math.min(k,D.length-1);for(let N=O;N>=0;N-=1){const H=D[N];if(!ua(e,H,a))return H}T=S==="up"?T-1:T+1,r&&(T<0?T=g.length-1:T>=g.length&&(T=0))}}if(t.key===LS){const S=w("up");if(S!==void 0)h&&Gn(t),p=S;else{if(h&&Gn(t),f===-1)p=c;else if(p=Fn(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}nc(e,p)&&(p=f)}}if(t.key===hh){const S=w("down");S!==void 0?(h&&Gn(t),p=S):(h&&Gn(t),f===-1?p=u:(p=Fn(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Fn(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),nc(e,p)&&(p=f))}if(n==="both"){const S=Wu(f/o);t.key===(i?aa:la)&&(h&&Gn(t),f%o!==o-1?(p=Fn(e,{startingIndex:f,disabledIndices:a}),r&&im(p,o,S)&&(p=Fn(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Fn(e,{startingIndex:f-f%o-1,disabledIndices:a})),im(p,o,S)&&(p=f)),t.key===(i?la:aa)&&(h&&Gn(t),f%o!==0?(p=Fn(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&im(p,o,S)&&(p=Fn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Fn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),im(p,o,S)&&(p=f));const _=Wu(c/o)===S;nc(e,p)&&(r&&_?p=t.key===(i?la:aa)?c:Fn(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function UP(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 HP(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 GP(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ua(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}/*!
|
|
486
|
+
* tabbable 6.4.0
|
|
487
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
488
|
+
*/var jne=["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] *)"],Mg=jne.join(","),qP=typeof Element>"u",Nc=qP?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Og=!qP&&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},$g=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]"):$g(t.parentNode));return a},zne=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},VP=function(t,n,r){if($g(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Mg));return n&&Nc.call(t,Mg)&&i.unshift(t),i=i.filter(r),i},Ng=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!$g(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,f=Ng(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var h=Nc.call(a,Mg);h&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!$g(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&g){var y=Ng(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},YP=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},WP=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zne(t))&&!YP(t)?0:t.tabIndex},Bne=function(t,n){var r=WP(t);return r<0&&n&&!YP(t)?0:r},Une=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},KP=function(t){return t.tagName==="INPUT"},Hne=function(t){return KP(t)&&t.type==="hidden"},Gne=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},qne=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Vne=function(t){if(!t.name)return!0;var n=t.form||Og(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=qne(i,t.form);return!o||o===t},Yne=function(t){return KP(t)&&t.type==="radio"},Wne=function(t){return Yne(t)&&!Vne(t)},Kne=function(t){var n,r=t&&Og(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=Og(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},kA=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Xne=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=Nc.call(t,"details>summary:first-of-type"),u=a?t.parentElement:t;if(Nc.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=Og(t);if(f&&!f.shadowRoot&&i(f)===!0)return kA(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(Kne(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kA(t);return!1},Qne=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 Nc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Jx=function(t,n){return!(n.disabled||Hne(n)||Xne(n,t)||Gne(n)||Qne(n))},ew=function(t,n){return!(Wne(n)||WP(n)<0||!Jx(t,n))},Zne=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XP=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=Bne(u,a),f=a?XP(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(Une).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},ph=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ng([t],n.includeContainer,{filter:ew.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Zne}):r=VP(t,n.includeContainer,ew.bind(null,n)),XP(r)},Jne=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ng([t],n.includeContainer,{filter:Jx.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=VP(t,n.includeContainer,Jx.bind(null,n)),r},QP=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Nc.call(t,Mg)===!1?!1:ew(n,t)};function Nt(e){return(e==null?void 0:e.ownerDocument)||document}const Xc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZP(e,t){const n=ph(e,Xc()),r=n.length;if(r===0)return;const i=li(Nt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function zS(e){return ZP(Nt(e).body,1)||e}function JP(e){return ZP(Nt(e).body,-1)||e}function eL(e,t){if(!e)return null;const n=ph(Nt(e).body,Xc()),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 ere(e){return eL(e,1)}function tre(e){return eL(e,-1)}function rc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function nre(e){ph(e,Xc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function RA(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 ic="ArrowUp",ll="ArrowDown",Ud="ArrowLeft",oc="ArrowRight",mh="Home",gh="End",tL=new Set([Ud,oc]),rre=new Set([Ud,oc,mh,gh]),nL=new Set([ic,ll]),ire=new Set([ic,ll,mh,gh]),rL=new Set([...tL,...nL]),ore=new Set([...rL,mh,gh]),sre=new Set([ic,ll,Ud,oc,mh,gh]),are="Shift",lre="Control",ure="Alt",cre="Meta",fre=new Set([are,lre,ure,cre]);function dre(e){return Zt(e)&&e.tagName==="INPUT"}function _A(e){return!!(dre(e)&&e.selectionStart!=null||Zt(e)&&e.tagName==="TEXTAREA")}function TA(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=AA(e,t,"left"),f=om(e),h=om(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=AA(e,t,"top"),f=om(e),h=om(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 AA(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 om(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}}function BS(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Ue(i),a=pne(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}const iL=C.createContext(void 0);function oL(e){const t=C.useContext(iL);if(t===void 0&&!e)throw new Error(Pi(33));return t}const sL=C.createContext(void 0);function ql(e){const t=C.useContext(sL);if(t===void 0&&!e)throw new Error(Pi(36));return t}let US=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Bd.startingStyle]="startingStyle",e[e.endingStyle=Bd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),DA=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const hre={[DA.popupOpen]:"",[DA.pressed]:""},pre={[US.open]:""},mre={[US.closed]:""},gre={[US.anchorHidden]:""},MA={open(e){return e?hre:null}},aL={open(e){return e?pre:mre},anchorHidden(e){return e?gre:null}},yre=C.createContext(void 0);function Ty(e=!0){const t=C.useContext(yre);if(t===void 0&&!e)throw new Error(Pi(25));return t}function bre(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:o,itemRef:a,itemMetadata:u}=e,{events:c}=o.useState("floatingTreeRoot"),f=Ty(!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:CP})},onMouseUp(p){if(f){const g=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,h&&g&&Math.abs(p.clientX-g.x)<=1&&Math.abs(p.clientY-g.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 vre={type:"regular-item"};function xre(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}=Ry({disabled:n,focusableWhenDisabled:!0,native:a}),g=bre({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:o,itemRef:f,itemMetadata:u}),y=C.useCallback(v=>jd(g,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(w){w.key===" "&&o.context.typingRef.current&&w.preventBaseUIHandler()}},v,h),[g,h,o,u]),b=$l(f,p);return C.useMemo(()=>({getItemProps:y,itemRef:b}),[y,b])}const wre=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=OS({label:a}),g=oL(!0),y=dh(o),{store:b}=ql(),v=b.useState("isActive",p.index),w=b.useState("itemProps"),{getItemProps:S,itemRef:_}=xre({closeOnClick:f,disabled:c,highlighted:v,id:y,store:b,nativeButton:u,nodeId:g==null?void 0:g.nodeId,itemMetadata:vre});return Gr("div",t,{state:{disabled:c,highlighted:v},props:[w,h,S],ref:[_,n,p.ref]})}),nd=0;class Jo{constructor(){ne(this,"currentId",nd);ne(this,"clear",()=>{this.currentId!==nd&&(clearTimeout(this.currentId),this.currentId=nd)});ne(this,"disposeEffect",()=>this.clear)}static create(){return new Jo}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=nd,n()},t)}isStarted(){return this.currentId!==nd}}function Ni(){const e=xr(Jo.create).current;return wy(e.disposeEffect),e}function Jn(e){const t=xr(Sre,e).current;return t.next=e,Je(t.effect),t}function Sre(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lL(){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 HS{constructor(){ne(this,"nodesRef",{current:[]});ne(this,"events",lL())}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 uL=C.createContext(null),cL=C.createContext(null),ts=()=>{var e;return((e=C.useContext(uL))==null?void 0:e.id)||null},Ca=e=>{const t=C.useContext(cL);return e??t};function fL(e){const t=Gl(),n=Ca(e),r=ts();return Je(()=>{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 Cre(e){const{children:t,id:n}=e,r=ts();return R.jsx(uL.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Ere(e){const{children:t,externalTree:n}=e,r=xr(()=>n??new HS).current;return R.jsx(cL.Provider,{value:r,children:t})}function Pc(e){return`data-base-ui-${e}`}function t1(e,t,n){if(n&&!Mc(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 kre={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},dL={...kre,position:"fixed",top:0,left:0},Lc=C.forwardRef(function(t,n){const[r,i]=C.useState();Je(()=>{OP&&i("button")},[]);const o={tabIndex:0,role:r};return R.jsx("span",{...t,ref:n,style:dL,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let OA=0;function vd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(OA);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():OA=requestAnimationFrame(o)}const sc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function $A(e){return e==="inert"?sc.inert:e==="aria-hidden"?sc["aria-hidden"]:sc.none}let sm=new WeakSet,am={},n1=0;const hL=e=>e&&(e.host||hL(e.parentNode)),Rre=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=hL(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _re(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Rre(t,e),u=new Set,c=new Set(a),f=[];am[i]||(am[i]=new WeakMap);const h=am[i];a.forEach(p),g(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function g(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(xa(b)!=="script")if(u.has(b))g(b);else{const v=o?b.getAttribute(o):null,w=v!==null&&v!=="false",S=$A(o),_=(S.get(b)||0)+1,k=(h.get(b)||0)+1;S.set(b,_),h.set(b,k),f.push(b),_===1&&w&&sm.add(b),k===1&&b.setAttribute(i,""),!w&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return n1+=1,()=>{f.forEach(y=>{const b=$A(o),w=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,w),h.set(y,S),w||(!sm.has(y)&&o&&y.removeAttribute(o),sm.delete(y)),S||y.removeAttribute(i)}),n1-=1,n1||(sc.inert=new WeakMap,sc["aria-hidden"]=new WeakMap,sc.none=new WeakMap,sm=new WeakSet,am={})}}function Tre(e,t=!1,n=!1){const r=Nt(e[0]).body;return _re(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const pL=C.createContext(null),mL=()=>C.useContext(pL),Are=Pc("portal");function Dre(e={}){const{ref:t,container:n,componentProps:r=En,elementProps:i}=e,o=Gl(),a=mL(),u=a==null?void 0:a.portalNode,[c,f]=C.useState(null),[h,p]=C.useState(null),g=Ue(w=>{w!==null&&p(w)}),y=C.useRef(null);Je(()=>{if(n===null){y.current&&(y.current=null,p(null),f(null));return}if(o==null)return;const w=(n&&($S(n)?n:n.current))??u??document.body;if(w==null){y.current&&(y.current=null,p(null),f(null));return}y.current!==w&&(y.current=w,p(null),f(w))},[n,u,o]);const b=Gr("div",r,{ref:[t,g],props:[{id:o,[Are]:""},i]});return{portalNode:h,portalSubtree:c&&b?On.createPortal(b,c):null}}const Mre=C.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:u,...c}=t,{portalNode:f,portalSubtree:h}=Dre({container:i,ref:n,componentProps:t,elementProps:c}),p=C.useRef(null),g=C.useRef(null),y=C.useRef(null),b=C.useRef(null),[v,w]=C.useState(null),S=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||S)return;function A(D){f&&D.relatedTarget&&rc(D)&&(D.type==="focusin"?RA:nre)(f)}return f.addEventListener("focusin",A,!0),f.addEventListener("focusout",A,!0),()=>{f.removeEventListener("focusin",A,!0),f.removeEventListener("focusout",A,!0)}},[f,S]),C.useEffect(()=>{!f||_||RA(f)},[_,f]);const T=C.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:y,afterInsideRef:b,portalNode:f,setFocusManagerState:w}),[f]);return R.jsxs(C.Fragment,{children:[h,R.jsxs(pL.Provider,{value:T,children:[k&&f&&R.jsx(Lc,{"data-type":"outside",ref:p,onFocus:A=>{var D;if(rc(A,f))(D=y.current)==null||D.focus();else{const O=v?v.domReference:null,N=JP(O);N==null||N.focus()}}}),k&&f&&R.jsx("span",{"aria-owns":f.id,style:tne}),f&&On.createPortal(r,f),k&&f&&R.jsx(Lc,{"data-type":"outside",ref:g,onFocus:A=>{var D;if(rc(A,f))(D=b.current)==null||D.focus();else{const O=v?v.domReference:null,N=zS(O);N==null||N.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,kt(Dc,A.nativeEvent)))}}})]})]})});function Ore(e,t){const n=Mn(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 NA=20;let ea=[];function GS(){ea=ea.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function $re(e){GS(),e&&xa(e)!=="body"&&(ea.push(new WeakRef(e)),ea.length>NA&&(ea=ea.slice(-NA)))}function r1(){var e;return GS(),(e=ea[ea.length-1])==null?void 0:e.deref()}function Nre(e){if(!e)return null;const t=Xc();return QP(e,t)?e:ph(e,t)[0]||e}function Pre(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():wr(e).display!=="none"}function PA(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=Xc(),i=Jne(e,n).filter(u=>{const c=u.getAttribute("data-tabindex")||"";return QP(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 Lre(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:g,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),w=b.useState("domReferenceElement"),S=b.useState("floatingElement"),{events:_,dataRef:k}=b.context,T=Ue(()=>{var Z;return(Z=k.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=Kx(w)&&A,O=C.useRef(["content"]),N=Jn(i),H=Jn(o),I=Jn(f),L=Ca(y),M=mL(),B=C.useRef(null),q=C.useRef(null),F=C.useRef(!1),j=C.useRef(!1),z=C.useRef(!1),V=C.useRef(-1),W=C.useRef(""),P=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),U=$l(Y,g,M==null?void 0:M.beforeInsideRef),se=$l(J,M==null?void 0:M.afterInsideRef),oe=Ni(),he=Ni(),ve=MS(),Re=M!=null,ce=Tg(S),Ie=Ue((Z=ce)=>Z?ph(Z,Xc()):[]),Ve=Ue(Z=>{const te=Ie(Z);return O.current.map(()=>te).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&pt(ce,li(Nt(ce)))&&Ie().length===0&&!D&&Gn(xe)}const te=Nt(ce);return te.addEventListener("keydown",Z),()=>{te.removeEventListener("keydown",Z)}},[r,w,ce,u,O,D,Ie,Ve]),C.useEffect(()=>{if(r||!v)return;const Z=Nt(ce);function te(){z.current=!1}function xe(Ce){const le=Ir(Ce),re=pt(S,le)||pt(w,le)||pt(M==null?void 0:M.portalNode,le);z.current=!re,P.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${Zte}]`)&&(j.current=!0)}function ge(){P.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",te,!0),Z.addEventListener("pointercancel",te,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",te,!0),Z.removeEventListener("pointercancel",te,!0),Z.removeEventListener("keydown",ge,!0)}},[r,S,w,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Nt(ce);function te(){j.current=!0,he.start(0,()=>{j.current=!1})}function xe(me){const ae=Ir(me),Te=Ie().indexOf(ae);Te!==-1&&(V.current=Te)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Ir(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Pc("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,No(p),No(h)].includes(ae),Se=!(pt(w,ae)||pt(S,ae)||pt(ae,S)||pt(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>pt(ke,ae))||ue||L&&(_l(L.nodesRef.current,_e).find(ke=>{var Ne,Fe;return pt((Ne=ke.context)==null?void 0:Ne.elements.floating,ae)||pt((Fe=ke.context)==null?void 0:Fe.elements.domReference,ae)})||SA(L.nodesRef.current,_e).find(ke=>{var Ne,Fe,at;return[(Ne=ke.context)==null?void 0:Ne.elements.floating,Tg((Fe=ke.context)==null?void 0:Fe.elements.floating)].includes(ae)||((at=ke.context)==null?void 0:at.elements.domReference)===ae})));if(Oe===w&&ce&&PA(ce,O),a&&Oe!==w&&!Pre(Te)&&li(Z)===Z.body){if(Zt(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=V.current,Ne=Ie(),Fe=Ne[ke]||Ne[Ne.length-1]||ce;Zt(Fe)&&Fe.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!j.current&&(D||ae!==r1())&&(F.current=!0,b.setOpen(!1,kt(Dc,me)))})}function Ce(){z.current||(k.current.insideReactTree=!0,oe.start(0,()=>{k.current.insideReactTree=!1}))}const le=Zt(w)?w:null,re=[];if(!(!S&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",te),re.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",te)})),S&&(S.addEventListener("focusin",xe),S.addEventListener("focusout",ge),M&&(S.addEventListener("focusout",Ce,!0),re.push(()=>{S.removeEventListener("focusout",Ce,!0)})),re.push(()=>{S.removeEventListener("focusin",xe),S.removeEventListener("focusout",ge)})),()=>{re.forEach(me=>{me()})}},[r,w,S,ce,u,L,M,b,c,a,Ie,D,T,O,k,oe,he,ve,h,p]),C.useEffect(()=>{var Ce,le,re;if(r||!S||!v)return;const Z=Array.from(((Ce=M==null?void 0:M.portalNode)==null?void 0:Ce.querySelectorAll(`[${Pc("portal")}]`))||[]),xe=(re=(le=(L?SA(L.nodesRef.current,T()):[]).find(me=>{var ae;return Kx(((ae=me.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:le.context)==null?void 0:re.elements.domReference,ge=[S,xe,...Z,B.current,q.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,No(p),No(h),D?w:null].filter(me=>me!=null);return Tre(ge,u||D)},[v,r,w,S,u,O,M,D,L,T,h,p]),Je(()=>{if(!v||r||!Zt(ce))return;const Z=Nt(ce),te=li(Z);queueMicrotask(()=>{const xe=Ve(ce),ge=N.current,Ce=typeof ge=="function"?ge(I.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=No(Ce),le=le||xe[0]||ce,!pt(ce,te)&&vd(le,{preventScroll:le===ce})})},[r,v,ce,A,Ve,N,I]),Je(()=>{if(r||!ce)return;const Z=Nt(ce),te=li(Z);$re(te);function xe(le){if(le.open||(W.current=Ore(le.nativeEvent,P.current)),le.reason===Lr&&le.nativeEvent.type==="mouseleave"&&(F.current=!0),le.reason===AS)if(le.nested)F.current=!1;else if(IP(le.nativeEvent)||FP(le.nativeEvent))F.current=!1;else{let re=!1;document.createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?F.current=!1:F.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,dL),Re&&w&&w.insertAdjacentElement("afterend",ge);function Ce(){const le=H.current;let re=typeof le=="function"?le(W.current):le;if(re===void 0||re===!1)return null;if(re===null&&(re=!0),typeof re=="boolean"){const ae=w||r1();return ae&&ae.isConnected?ae:ge}const me=w||r1()||ge;return No(re)||me}return()=>{_.off("openchange",xe);const le=li(Z),re=pt(S,le)||L&&_l(L.nodesRef.current,T(),!1).some(ae=>{var Oe;return pt((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=Nre(me),Oe=typeof H.current!="boolean";H.current&&!F.current&&Zt(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||re)&&ae.focus({preventScroll:!0}),ge.remove(),F.current=!1})}},[r,S,ce,H,k,_,L,Re,w,T]),Je(()=>{if(!DP||v||!S)return;const Z=li(Nt(S));!Zt(Z)||!_y(Z)||pt(S,Z)&&Z.blur()},[v,S]),Je(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:w}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,w]),Je(()=>{if(!(r||!ce))return PA(ce,O),()=>{queueMicrotask(GS)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return R.jsxs(C.Fragment,{children:[X&&R.jsx(Lc,{"data-type":"inside",ref:U,onFocus:Z=>{var te;if(u){const xe=Ve();vd(xe[xe.length-1])}else if(M!=null&&M.portalNode)if(F.current=!1,rc(Z,M.portalNode)){const xe=zS(w);xe==null||xe.focus()}else(te=No(p??M.beforeOutsideRef))==null||te.focus()}}),n,X&&R.jsx(Lc,{"data-type":"inside",ref:se,onFocus:Z=>{var te;if(u)vd(Ve()[0]);else if(M!=null&&M.portalNode)if(c&&(F.current=!0),rc(Z,M.portalNode)){const xe=JP(w);xe==null||xe.focus()}else(te=No(h??M.afterOutsideRef))==null||te.focus()}})]})}function Ire(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=zd}=t,p=C.useRef(void 0),g=MS(),y=Ni(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const w=p.current,S=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||Mc(w,!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(_y(S.target)){const N=kt(h,S,S.target);D&&w==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(D,N);return}const O=v.currentTarget;g.request(()=>{const N=kt(h,S,O);D&&w==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,N)}):n.setOpen(D,N)})},onClick(v){if(o==="mousedown-only")return;const w=p.current;if(o==="mousedown"&&w){p.current=void 0;return}if(Mc(w,!0)&&u)return;const S=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=S&&k||!(S&&a&&(!(_&&c)||jP(_))),A=kt(h,v.nativeEvent,v.currentTarget);T&&w==="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,g,y,f,h]);return C.useMemo(()=>i?{reference:b}:En,[i,b])}function LA(e,t,n){let{reference:r,floating:i}=e;const o=mi(t),a=jS(t),u=FS(a),c=jr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=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(Sa(t)){case"start":y[a]-=g*(n&&f?-1:1);break;case"end":y[a]+=g*(n&&f?-1:1);break}return y}async function Fre(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:g=!1,padding:y=0}=Zo(t,e),b=zP(y),w=u[g?p==="floating"?"reference":"floating":p],S=Dg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.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=Dg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:k,strategy:c}):_);return{top:(S.top-A.top+b.top)/T.y,bottom:(A.bottom-S.bottom+b.bottom)/T.y,left:(S.left-A.left+b.left)/T.x,right:(A.right-S.right+b.right)/T.x}}const jre=50,zre=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:Fre},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}=LA(f,r,c),g=r,y=0;const b={};for(let v=0;v<o.length;v++){const w=o[v];if(!w)continue;const{name:S,fn:_}=w,{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});h=k??h,p=T??p,b[S]={...b[S],...A},D&&y<jre&&(y++,typeof D=="object"&&(D.placement&&(g=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=LA(f,g,c)),v=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:b}},Bre=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:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=Zo(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=jr(i),_=mi(u),k=jr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=g||(k||!v?[Ag(u)]:$ne(u)),D=b!=="none";!g&&D&&A.push(...Ine(u,v,b,T));const O=[u,...A],N=await c.detectOverflow(t,w),H=[];let I=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&H.push(N[S]),p){const q=One(i,a,T);H.push(N[q[0]],N[q[1]])}if(I=[...I,{placement:i,overflows:H}],!H.every(q=>q<=0)){var L,M;const q=(((L=o.flip)==null?void 0:L.index)||0)+1,F=O[q];if(F&&(!(p==="alignment"?_!==mi(F):!1)||I.every(V=>mi(V.placement)===_?V.overflows[0]>0:!0)))return{data:{index:q,overflows:I},reset:{placement:F}};let j=(M=I.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(y){case"bestFit":{var B;const z=(B=I.filter(V=>{if(D){const W=mi(V.placement);return W===_||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,P)=>W+P,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:B[0];z&&(j=z);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};function IA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FA(e){return Dne.some(t=>e[t]>=0)}const Ure=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=Zo(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=IA(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:FA(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=IA(a,n.floating);return{data:{escapedOffsets:u,escaped:FA(u)}}}default:return{}}}}},gL=new Set(["left","top"]);async function Hre(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=jr(n),u=Sa(n),c=mi(n)==="y",f=gL.has(a)?-1:1,h=o&&c?-1:1,p=Zo(t,e);let{mainAxis:g,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:g*f}:{x:g*f,y:y*h}}const Gre=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 Hre(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}}}}},qre=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:S=>{let{x:_,y:k}=S;return{x:_,y:k}}},...f}=Zo(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),g=mi(jr(i)),y=IS(g);let b=h[y],v=h[g];if(a){const S=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[S],T=b-p[_];b=Xx(k,b,T)}if(u){const S=g==="y"?"top":"left",_=g==="y"?"bottom":"right",k=v+p[S],T=v-p[_];v=Xx(k,v,T)}const w=c.fn({...t,[y]:b,[g]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[y]:a,[g]:u}}}}}},Vre=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}=Zo(e,t),h={x:n,y:r},p=mi(i),g=IS(p);let y=h[g],b=h[p];const v=Zo(u,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=g==="y"?"height":"width",T=o.reference[g]-o.floating[k]+w.mainAxis,A=o.reference[g]+o.reference[k]-w.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var S,_;const k=g==="y"?"width":"height",T=gL.has(jr(i)),A=o.reference[p]-o.floating[k]+(T&&((S=a.offset)==null?void 0:S[p])||0)+(T?0:w.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?w.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[g]:y,[p]:b}}}},Yre=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}=Zo(e,t),h=await a.detectOverflow(t,f),p=jr(i),g=Sa(i),y=mi(i)==="y",{width:b,height:v}=o.floating;let w,S;p==="top"||p==="bottom"?(w=p,S=g===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(S=p,w=g==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=Oc(v-h[w],_),A=Oc(b-h[S],k),D=!t.middlewareData.shift;let O=T,N=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!g){const I=Fr(h.left,0),L=Fr(h.right,0),M=Fr(h.top,0),B=Fr(h.bottom,0);y?N=b-2*(I!==0||L!==0?I+L:Fr(h.left,h.right)):O=v-2*(M!==0||B!==0?M+B:Fr(h.top,h.bottom))}await c({...t,availableWidth:N,availableHeight:O});const H=await a.getDimensions(u.floating);return b!==H.width||v!==H.height?{reset:{rects:!0}}:{}}}};function yL(e){const t=wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=$c(n)!==o||$c(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function qS(e){return Lt(e)?e:e.contextElement}function ac(e){const t=qS(e);if(!Zt(t))return to(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=yL(t);let a=(o?$c(n.width):n.width)/r,u=(o?$c(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const Wre=to(0);function bL(e){const t=Mn(e);return!Ey()||!t.visualViewport?Wre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kre(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function Nl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=qS(e);let a=to(1);t&&(r?Lt(r)&&(a=ac(r)):a=ac(e));const u=Kre(o,n,r)?bL(o):to(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 g=Mn(o),y=r&&Lt(r)?Mn(r):r;let b=g,v=Vx(b);for(;v&&r&&y!==b;){const w=ac(v),S=v.getBoundingClientRect(),_=wr(v),k=S.left+(v.clientLeft+parseFloat(_.paddingLeft))*w.x,T=S.top+(v.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,f*=w.y,h*=w.x,p*=w.y,c+=k,f+=T,b=Mn(v),v=Vx(b)}}return Dg({width:h,height:p,x:c,y:f})}function Ay(e,t){const n=ky(e).scrollLeft;return t?t.left+n:Nl(so(e)).left+n}function vL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ay(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Xre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=so(r),u=t?Cy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=to(1);const h=to(0),p=Zt(r);if((p||!p&&!o)&&((xa(r)!=="body"||wa(a))&&(c=ky(r)),p)){const y=Nl(r);f=ac(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=a&&!p&&!o?vL(a,c):to(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-c.scrollTop*f.y+h.y+g.y}}function Qre(e){return Array.from(e.getClientRects())}function Zre(e){const t=so(e),n=ky(e),r=e.ownerDocument.body,i=Fr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Fr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ay(e);const u=-n.scrollTop;return wr(r).direction==="rtl"&&(a+=Fr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const jA=25;function Jre(e,t){const n=Mn(e),r=so(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=Ey();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Ay(r);if(f<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=jA&&(o-=b)}else f<=jA&&(o+=f);return{width:o,height:a,x:u,y:c}}function eie(e,t){const n=Nl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Zt(e)?ac(e):to(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 zA(e,t,n){let r;if(t==="viewport")r=Jre(e,n);else if(t==="document")r=Zre(so(e));else if(Lt(t))r=eie(t,n);else{const i=bL(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Dg(r)}function xL(e,t){const n=ro(e);return n===t||!Lt(n)||eo(n)?!1:wr(n).position==="fixed"||xL(n,t)}function tie(e,t){const n=t.get(e);if(n)return n;let r=sa(e,[],!1).filter(u=>Lt(u)&&xa(u)!=="body"),i=null;const o=wr(e).position==="fixed";let a=o?ro(e):e;for(;Lt(a)&&!eo(a);){const u=wr(a),c=NS(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||wa(a)&&!c&&xL(e,a))?r=r.filter(h=>h!==a):i=u,a=ro(a)}return t.set(e,r),r}function nie(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Cy(t)?[]:tie(t,this._c):[].concat(n),r],u=zA(t,a[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let g=1;g<a.length;g++){const y=zA(t,a[g],i);c=Fr(y.top,c),f=Oc(y.right,f),h=Oc(y.bottom,h),p=Fr(y.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function rie(e){const{width:t,height:n}=yL(e);return{width:t,height:n}}function iie(e,t,n){const r=Zt(t),i=so(t),o=n==="fixed",a=Nl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=to(0);function f(){c.x=Ay(i)}if(r||!r&&!o)if((xa(t)!=="body"||wa(i))&&(u=ky(t)),r){const y=Nl(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?vL(i,u):to(0),p=a.left+u.scrollLeft-c.x-h.x,g=a.top+u.scrollTop-c.y-h.y;return{x:p,y:g,width:a.width,height:a.height}}function i1(e){return wr(e).position==="static"}function BA(e,t){if(!Zt(e)||wr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return so(e)===n&&(n=n.ownerDocument.body),n}function wL(e,t){const n=Mn(e);if(Cy(e))return n;if(!Zt(e)){let i=ro(e);for(;i&&!eo(i);){if(Lt(i)&&!i1(i))return i;i=ro(i)}return n}let r=BA(e,t);for(;r&&yne(r)&&i1(r);)r=BA(r,t);return r&&eo(r)&&i1(r)&&!NS(r)?n:r||xne(e)||n}const oie=async function(e){const t=this.getOffsetParent||wL,n=this.getDimensions,r=await n(e.floating);return{reference:iie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sie(e){return wr(e).direction==="rtl"}const aie={convertOffsetParentRelativeRectToViewportRelativeRect:Xre,getDocumentElement:so,getClippingRect:nie,getOffsetParent:wL,getElementRects:oie,getClientRects:Qre,getDimensions:rie,getScale:ac,isElement:Lt,isRTL:sie};function SL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lie(e,t){let n=null,r;const i=so(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:g,height:y}=f;if(u||t(),!g||!y)return;const b=Wu(p),v=Wu(i.clientWidth-(h+g)),w=Wu(i.clientHeight-(p+y)),S=Wu(h),k={rootMargin:-b+"px "+-v+"px "+-w+"px "+-S+"px",threshold:Fr(0,Oc(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&&!SL(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 UA(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=qS(e),h=i||o?[...f?sa(f):[],...t?sa(t):[]]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const p=f&&u?lie(f,n):null;let g=-1,y=null;a&&(y=new ResizeObserver(S=>{let[_]=S;_&&_.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),t&&y.observe(t));let b,v=c?Nl(e):null;c&&w();function w(){const S=Nl(e);v&&!SL(v,S)&&n(),v=S,b=requestAnimationFrame(w)}return n(),()=>{var S;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(S=y)==null||S.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const uie=Gre,cie=qre,fie=Bre,die=Yre,hie=Ure,pie=Vre,mie=(e,t,n)=>{const r=new Map,i={platform:aie,...n},o={...i.platform,_c:r};return zre(e,t,{...i,platform:o})};var gie=typeof document<"u",yie=function(){},Um=gie?C.useLayoutEffect:yie;function Pg(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(!Pg(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)&&!Pg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function CL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HA(e,t){const n=CL(e);return Math.round(t*n)/n}function o1(e){const t=C.useRef(e);return Um(()=>{t.current=e}),t}function bie(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}),[g,y]=C.useState(r);Pg(g,r)||y(r);const[b,v]=C.useState(null),[w,S]=C.useState(null),_=C.useCallback(V=>{V!==D.current&&(D.current=V,v(V))},[]),k=C.useCallback(V=>{V!==O.current&&(O.current=V,S(V))},[]),T=o||b,A=a||w,D=C.useRef(null),O=C.useRef(null),N=C.useRef(h),H=c!=null,I=o1(c),L=o1(i),M=o1(f),B=C.useCallback(()=>{if(!D.current||!O.current)return;const V={placement:t,strategy:n,middleware:g};L.current&&(V.platform=L.current),mie(D.current,O.current,V).then(W=>{const P={...W,isPositioned:M.current!==!1};q.current&&!Pg(N.current,P)&&(N.current=P,On.flushSync(()=>{p(P)}))})},[g,t,n,L,M]);Um(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[f]);const q=C.useRef(!1);Um(()=>(q.current=!0,()=>{q.current=!1}),[]),Um(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(I.current)return I.current(T,A,B);B()}},[T,A,B,I,H]);const F=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),j=C.useMemo(()=>({reference:T,floating:A}),[T,A]),z=C.useMemo(()=>{const V={position:n,left:0,top:0};if(!j.floating)return V;const W=HA(j.floating,h.x),P=HA(j.floating,h.y);return u?{...V,transform:"translate("+W+"px, "+P+"px)",...CL(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:P}},[n,u,j.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:B,refs:F,elements:j,floatingStyles:z}),[h,B,F,j,z])}const vie=(e,t)=>{const n=uie(e);return{name:n.name,fn:n.fn,options:[e,t]}},xie=(e,t)=>{const n=cie(e);return{name:n.name,fn:n.fn,options:[e,t]}},wie=(e,t)=>({fn:pie(e).fn,options:[e,t]}),Sie=(e,t)=>{const n=fie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cie=(e,t)=>{const n=die(e);return{name:n.name,fn:n.fn,options:[e,t]}},Eie=(e,t)=>{const n=hie(e);return{name:n.name,fn:n.fn,options:[e,t]}},kie={intentional:"onClick",sloppy:"onPointerDown"};function Rie(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 _ie(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:g="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:w,externalTree:S}=t,_=Ca(S),k=Ue(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=Rie(w),N=C.useRef(null),H=Ni(),I=Ni(),L=Ue(()=>{I.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),B=C.useRef(""),q=Ue(X=>{B.current=X.pointerType}),F=Ue(()=>{const X=B.current,Z=X==="pen"||!X?"mouse":X,te=typeof g=="function"?g():g;return typeof te=="string"?te:te[Z]}),j=Ue(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,te=_?_l(_.nodesRef.current,Z):[];if(!D&&te.length>0){let le=!0;if(te.forEach(re=>{var me;(me=re.context)!=null&&me.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=Ane(X)?X.nativeEvent:X,ge=kt(DS,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),z=Ue(X=>{const Z=F();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),V=Ue(()=>{c.current.insideReactTree=!0,I.start(0,L)}),W=Ue((X,Z=!1)=>{var Oe;if(z(X)){L();return}if(c.current.insideReactTree){L();return}if(F()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const te=Ir(X),xe=`[${Pc("inert")}]`,ge=Nt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(te&&(Ce.hasElement(te)||Ce.hasMatchingElement(Te=>pt(Te,te))))return;let le=Lt(te)?te:null;for(;le&&!eo(le);){const Te=ro(le);if(eo(Te)||!Lt(Te))break;le=Te}if(ge.length&&Lt(te)&&!_ne(te)&&!pt(te,n.select("floatingElement"))&&Array.from(ge).every(Te=>!pt(le,Te)))return;if(Zt(te)&&!("touches"in X)){const Te=eo(te),_e=wr(te),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&te.clientWidth>0&&te.scrollWidth>te.clientWidth,Ne=Se&&te.clientHeight>0&&te.scrollHeight>te.clientHeight,Fe=_e.direction==="rtl",at=Ne&&(Fe?X.offsetX<=te.offsetWidth-te.clientWidth:X.offsetX>te.clientWidth),Bt=ke&&X.offsetY>te.clientHeight;if(at||Bt)return}const re=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&_l(_.nodesRef.current,re).some(Te=>{var _e;return ki(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(ki(X,n.select("floatingElement"))||ki(X,n.select("domReferenceElement"))||me)return;const ae=_?_l(_.nodesRef.current,re):[];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,kt(AS,X)),L()}),P=Ue(X=>{F()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||ki(X,n.select("floatingElement"))||ki(X,n.select("domReferenceElement"))||W(X)}),Y=Ue(X=>{if(F()!=="sloppy"||!n.select("open")||!f||ki(X,n.select("floatingElement"))||ki(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&(N.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}),J=Ue(X=>{const Z=Ir(X);function te(){Y(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)}),U=Ue(X=>{const Z=A.current;if(A.current=!1,H.clear(),X.type==="mousedown"&&N.current&&!N.current.dismissOnMouseDown)return;const te=Ir(X);function xe(){X.type==="pointerdown"?P(X):W(X,Z),te==null||te.removeEventListener(X.type,xe)}te==null||te.addEventListener(X.type,xe)}),se=Ue(X=>{if(F()!=="sloppy"||!N.current||ki(X,n.select("floatingElement"))||ki(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const te=Math.abs(Z.clientX-N.current.startX),xe=Math.abs(Z.clientY-N.current.startY),ge=Math.sqrt(te*te+xe*xe);ge>5&&(N.current.dismissOnTouchEnd=!0),ge>10&&(W(X),H.clear(),N.current=null)}),oe=Ue(X=>{const Z=Ir(X);function te(){se(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)}),he=Ue(X=>{F()!=="sloppy"||!N.current||ki(X,n.select("floatingElement"))||ki(X,n.select("domReferenceElement"))||(N.current.dismissOnTouchEnd&&W(X),H.clear(),N.current=null)}),ve=Ue(X=>{const Z=Ir(X);function te(){he(X),Z==null||Z.removeEventListener(X.type,te)}Z==null||Z.addEventListener(X.type,te)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new Jo;function Z(le){n.setOpen(!1,kt(Rg,le))}function te(){X.clear(),M.current=!0}function xe(){X.start(Ey()?5:0,()=>{M.current=!1})}const ge=Nt(i);ge.addEventListener("pointerdown",q,!0),h&&(ge.addEventListener("keydown",j),ge.addEventListener("compositionstart",te),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",U,!0),ge.addEventListener("pointerdown",U,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",oe,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",U,!0));let Ce=[];return v&&(Lt(a)&&(Ce=sa(a)),Lt(i)&&(Ce=Ce.concat(sa(i))),!Lt(o)&&o&&o.contextElement&&(Ce=Ce.concat(sa(o.contextElement)))),Ce=Ce.filter(le=>{var re;return le!==((re=ge.defaultView)==null?void 0:re.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",q,!0),h&&(ge.removeEventListener("keydown",j),ge.removeEventListener("compositionstart",te),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",U,!0),ge.removeEventListener("pointerdown",U,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",oe,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",U,!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,j,W,U,P,J,oe,ve,q,n]),C.useEffect(L,[T,L]);const Re=C.useMemo(()=>({onKeyDown:j,...y&&{[kie[b]]:X=>{n.setOpen(!1,kt(zd,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,kt(zd,X.nativeEvent))}}}}),[j,n,y,b]),ce=Ue(X=>{const Z=Ir(X.nativeEvent);!pt(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),Ie=Ue(X=>{!r||!f||X.button!==0||(A.current=!0)}),Ve=C.useMemo(()=>({onKeyDown:j,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:V,onMouseDownCapture(X){V(),Ie(X)},onPointerDownCapture(X){V(),Ie(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[j,ce,V,Ie]);return C.useMemo(()=>f?{reference:Re,floating:Ve,trigger:Re}:{},[f,Re,Ve])}var Lg=Symbol("NOT_FOUND");function Tie(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Aie(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Die(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 GA=e=>Array.isArray(e)?e:[e];function Mie(e){const t=Array.isArray(e[0])?e[0]:e;return Die(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Oie(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function $ie(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Lg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Nie(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 Lg}function i(u,c){r(u)===Lg&&(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 Pie=(e,t)=>e===t;function Lie(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 Iie(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Pie,maxSize:i=1,resultEqualityCheck:o}=n,a=Lie(r);let u=0;const c=i<=1?$ie(a):Nie(i,a);function f(){let h=c.get(arguments);if(h===Lg){if(h=e.apply(null,arguments),u++,o){const g=c.getEntries().find(y=>o(y.value,h));g&&(h=g.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 Fie=class{constructor(e){this.value=e}deref(){return this.value}},jie=typeof WeakRef<"u"?WeakRef:Fie,zie=0,qA=1;function lm(){return{s:zie,v:void 0,o:null,p:null}}function EL(e,t={}){let n=lm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let g=0,y=c;g<y;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const w=v.get(b);w===void 0?(u=lm(),v.set(b,u)):u=w}else{let v=u.p;v===null&&(u.p=v=new Map);const w=v.get(b);w===void 0?(u=lm(),v.set(b,u)):u=w}}const f=u;let h;if(u.s===qA)h=u.v;else if(h=e.apply(null,arguments),o++,r){const g=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;g!=null&&r(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new jie(h):h}return f.s=qA,f.v=h,h}return a.clearCache=()=>{n=lm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function kL(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()),Tie(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:g=[],argsMemoize:y=EL,argsMemoizeOptions:b=[]}=h,v=GA(g),w=GA(b),S=Mie(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const A=Oie(S,arguments);return u=_.apply(null,A),u},...w);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:S,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var Bie=kL(EL),Uie=Object.assign((e,t=Bie)=>{Aie(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:()=>Uie});kL({memoize:Iie,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const bt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(Pi(1));let u;if(e)u=e;else throw new Error("Missing arguments");return u};var RL=e3();const tw=[];let nw;function Hie(){return nw}function Gie(e){tw.push(e)}function _L(e){const t=(n,r)=>{const i=xr(Vie).current;let o;try{nw=i;for(const a of tw)a.before(i);o=e(n,r);for(const a of tw)a.after(i);i.didInitialize=!0}finally{nw=void 0}return o};return t.displayName=e.displayName||e.name,t}function qie(e){return C.forwardRef(_L(e))}function Vie(){return{didInitialize:!1}}const Yie=TS(19),Wie=Yie?Xie:Qie;function TL(e,t,n,r,i){return Wie(e,t,n,r,i)}function Kie(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return RL.useSyncExternalStore(e.subscribe,o,o)}Gie({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()}}),RL.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xie(e,t,n,r,i){const o=Hie();if(!o)return Kie(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 Qie(e,t,n,r,i){return t3.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class Zie{constructor(t){ne(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ne(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 TL(this,t,n,r,i)}}class AL extends Zie{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),Je(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Je(()=>(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);Je(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;Je(()=>{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),TL(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=Ue(n??SP);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 Jie(){const[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}const eoe={open:bt(e=>e.open),domReferenceElement:bt(e=>e.domReferenceElement),referenceElement:bt(e=>e.positionReference??e.referenceElement),floatingElement:bt(e=>e.floatingElement),floatingId:bt(e=>e.floatingId)};class VS extends AL{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:lL(),nested:r,noEmit:i,triggerElements:a},eoe);ne(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||jP(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 toe(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 noe(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=toe(e,n),a=Ue(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 Je(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function roe(e){const t=e.useState("open");Je(()=>{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 ioe(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=kP(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=Ue(()=>{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 BS({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}class YS{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 ooe(){return new VS({open:!1,floatingElement:null,referenceElement:null,triggerElements:new YS,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function soe(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:ooe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:En,inactiveTriggerProps:En,popupProps:En}}const um=bt(e=>e.triggerIdProp??e.activeTriggerId),aoe={open:bt(e=>e.openProp??e.open),mounted:bt(e=>e.mounted),transitionStatus:bt(e=>e.transitionStatus),floatingRootContext:bt(e=>e.floatingRootContext),preventUnmountingOnClose:bt(e=>e.preventUnmountingOnClose),payload:bt(e=>e.payload),activeTriggerId:um,activeTriggerElement:bt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:bt((e,t)=>t!==void 0&&um(e)===t),isOpenedByTrigger:bt((e,t)=>t!==void 0&&um(e)===t&&e.open),isMountedByTrigger:bt((e,t)=>t!==void 0&&um(e)===t&&e.mounted),triggerProps:bt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:bt(e=>e.popupProps),popupElement:bt(e=>e.popupElement),positionerElement:bt(e=>e.positionerElement)};function loe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Gl(),o=ts()!=null,a=xr(()=>new VS({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new YS,floatingId:i,nested:o,noEmit:!1})).current;return Je(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Lt(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 uoe(e={}){const{nodeId:t,externalTree:n}=e,r=loe(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=Ca(n);Je(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=bie({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const N=Lt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u(N),h.refs.setReference(N)},[h.refs]),[g,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Lt(g)?g:null),i.useSyncedValue("floatingElement",b);const w=C.useCallback(O=>{(Lt(O)||O===null)&&(c.current=O,y(O)),(Lt(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Lt(O))&&h.refs.setReference(O)},[h.refs,y]),S=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:w,setFloating:S,setPositionReference:p,domReference:c}),[h.refs,w,S,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 Je(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find(N=>N.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function coe(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Gl(),a=ts()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=xr(()=>new VS({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return Je(()=>{const g={open:u,floatingId:o,referenceElement:c,floatingElement:f};Lt(c)&&(g.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(g.positionReference=c),p.update(g)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const s1=Cne&&OP;function foe(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=Ni(),h=C.useRef(!0);C.useEffect(()=>{const g=n.select("domReferenceElement");if(!o)return;const y=Mn(g);function b(){const S=n.select("domReferenceElement");!n.select("open")&&Zt(S)&&S===li(Nt(S))&&(u.current=!0)}function v(){h.current=!0}function w(){h.current=!1}return y.addEventListener("blur",b),s1&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",w,!0)),()=>{y.removeEventListener("blur",b),s1&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",w,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function g(y){if(y.reason===zd||y.reason===DS){const b=n.select("domReferenceElement");Lt(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(g){const y=g.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Ir(g.nativeEvent);if(Lt(b)){if(s1&&!g.relatedTarget){if(!h.current&&!_y(b))return}else if(!Tne(b))return}const v=_g(g.relatedTarget,n.context.triggerElements),{nativeEvent:w,currentTarget:S}=g,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,kt(bd,w,S));return}f.start(_,()=>{u.current||n.setOpen(!0,kt(bd,w,S))})},onBlur(g){u.current=!1,c.current=null;const y=g.relatedTarget,b=g.nativeEvent,v=Lt(y)&&y.hasAttribute(Pc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var k;const w=n.select("domReferenceElement"),S=li(w?w.ownerDocument:document);!y&&S===w||pt((k=i.current.floatingContext)==null?void 0:k.refs.floating.current,S)||pt(w,S)||v||_g(y??S,n.context.triggerElements)||n.setOpen(!1,kt(bd,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const rw=Pc("safe-polygon"),doe=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${LP}`;function hoe(e){return e?!!e.closest(doe):!1}class WS{constructor(){ne(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});ne(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 Jo,this.restTimeout=new Jo,this.handleCloseOptions=void 0}static create(){return new WS}}function DL(e){const t=xr(WS.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),wy(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}const poe=new Set(["click","mousedown"]);function moe(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=DL(n),h=Ca(),p=ts(),g=Ue(()=>f.interactedInside?!0:a.current.openEvent?poe.has(a.current.openEvent.type):!1),y=Ue(()=>{var T;const k=(T=a.current.openEvent)==null?void 0:T.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=Ue(k=>_g(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=goe(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,kt(Lr,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,kt(Lr,k)))},[c,n,f]),w=Ue(()=>{f.unbindMouseMove(),f.handler=void 0}),S=Ue(()=>{if(f.performedPointerEventsMutation){const k=Nt(i).body;k.style.pointerEvents="",k.removeAttribute(rw),f.performedPointerEventsMutation=!1}}),_=Ue(k=>{const T=Ir(k);if(!hoe(T)){f.interactedInside=!1;return}f.interactedInside=!0});Je(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,w(),S())},[r,f,w,S]),C.useEffect(()=>()=>{w()},[w]),C.useEffect(()=>S,[S]),Je(()=>{var k,T,A;if(u&&r&&(k=f.handleCloseOptions)!=null&&k.blockPointerEvents&&y()&&Lt(o)&&i){f.performedPointerEventsMutation=!0;const D=Nt(i).body;D.setAttribute(rw,"");const O=o,N=i,H=(A=(T=h==null?void 0:h.nodesRef.current.find(I=>I.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return H&&(H.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",N.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){g()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(S(),w(),g()||v(O))}function T(O){var N;f.openChangeTimeout.clear(),S(),(N=f.handler)==null||N.call(f,O),w()}function A(O){g()||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,g,b,v,S,w,_,f])}function goe(e,t){return t&&!Mc(t)?0:typeof e=="function"?e():e}function a1(e){return typeof e=="function"?e():e}const yoe={current:null};function boe(e,t={}){var I;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=yoe,externalTree:g,isActiveTrigger:y=!0}=t,b=Ca(g),v=DL(n),w=Jn(u),S=Jn(a),_=Jn(f),k=Jn(o);y&&(v.handleCloseOptions=(I=w.current)==null?void 0:I.__options);const T=Ue(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=Ue(L=>_g(L,n.context.triggerElements)),D=C.useCallback((L,M=!0)=>{const B=t1(S.current,"close",v.pointerType);B&&!v.handler?v.openChangeTimeout.start(B,()=>n.setOpen(!1,kt(Lr,L))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,kt(Lr,L)))},[S,n,v]),O=Ue(()=>{v.unbindMouseMove(),v.handler=void 0}),N=Ue(()=>{if(v.performedPointerEventsMutation){const L=Nt(n.select("domReferenceElement")).body;L.style.pointerEvents="",L.removeAttribute(rw),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function L(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[o,i,v]);const H=Ue(L=>{var B;if(T()||!r.current.floatingContext||A(L.relatedTarget))return;const M=p.current;(B=w.current)==null||B.call(w,{...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){N(),O(),!T()&&M===n.select("domReferenceElement")&&D(L)}})(L)});return C.useEffect(()=>{if(!o)return;const L=p.current??(y?n.select("domReferenceElement"):null);if(!Lt(L))return;function M(F){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!Mc(v.pointerType)||a1(_.current)>0&&!t1(S.current,"open"))return;const j=t1(S.current,"open",v.pointerType),z=n.select("domReferenceElement"),V=n.context.triggerElements,W=(V.hasElement(F.target)||V.hasMatchingElement(U=>pt(U,F.target)))&&(!z||!pt(z,F.target)),P=F.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,kt(Lr,F,P)):j?v.openChangeTimeout.start(j,()=>{J&&n.setOpen(!0,kt(Lr,F,P))}):J&&n.setOpen(!0,kt(Lr,F,P))}function B(F){if(T()){N();return}v.unbindMouseMove();const j=n.select("domReferenceElement"),z=Nt(j);if(v.restTimeout.clear(),v.restTimeoutPending=!1,A(F.relatedTarget))return;if(w.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const W=p.current;v.handler=w.current({...r.current.floatingContext,tree:b,x:F.clientX,y:F.clientY,onClose(){N(),O(),k.current&&!T()&&W===n.select("domReferenceElement")&&D(F,!0)}});const P=v.handler;P(F),z.addEventListener("mousemove",P),v.unbindMouseMove=()=>{z.removeEventListener("mousemove",P)};return}(v.pointerType==="touch"?!pt(n.select("floatingElement"),F.relatedTarget):!0)&&D(F)}function q(F){H(F)}return n.select("open")&&L.addEventListener("mouseleave",q),h&&L.addEventListener("mousemove",M,{once:!0}),L.addEventListener("mouseenter",M),L.addEventListener("mouseleave",B),()=>{L.removeEventListener("mouseleave",q),h&&L.removeEventListener("mousemove",M),L.removeEventListener("mouseenter",M),L.removeEventListener("mouseleave",B)}},[O,N,r,S,D,n,o,w,H,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function L(M){v.pointerType=M.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(M){const{nativeEvent:B}=M,q=M.currentTarget,F=n.select("domReferenceElement"),j=n.context.triggerElements,z=n.select("open"),V=(j.hasElement(M.target)||j.hasMatchingElement(P=>pt(P,M.target)))&&(!F||!pt(F,M.target));if(c&&!Mc(v.pointerType)||z&&!V||a1(_.current)===0||!V&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const P=n.select("open");!v.blockMouseMove&&(!P||V)&&n.setOpen(!0,kt(Lr,B,q))}v.pointerType==="touch"?On.flushSync(()=>{W()}):V&&z?W():(v.restTimeoutPending=!0,v.restTimeout.start(a1(_.current),W))}}},[o,v,T,c,n,_])}function ML(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=>cm(f,e,"reference"),t),a=C.useCallback(f=>cm(f,e,"floating"),n),u=C.useCallback(f=>cm(f,e,"item"),r),c=C.useCallback(f=>cm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function cm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[Wx]="");for(const u in e)i&&e&&(u===NP||u===PP)||(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===NP||o===PP)||(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 voe="Escape";function Dy(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function fm(e,t){return Dy(t,e===LS||e===hh,e===aa||e===la)}function l1(e,t,n){return Dy(t,e===hh,n?e===aa:e===la)||e==="Enter"||e===" "||e===""}function xoe(e,t,n){return Dy(t,n?e===aa:e===la,e===hh)}function woe(e,t,n,r){const i=n?e===la:e===aa,o=e===LS;return t==="both"||t==="horizontal"&&r&&r>1?e===voe:Dy(t,i,o)}function Soe(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:g=!1,loopFocus:y=!1,nested:b=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:S="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:k=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:D,cols:O=1,id:N,resetOnPointerLeave:H=!0,externalTree:I}=t,L=Tg(i),M=Jn(L),B=ts(),q=Ca(I);Je(()=>{a.current.orientation=A},[a,A]);const F=Kx(o),j=C.useRef(S),z=C.useRef(p??-1),V=C.useRef(null),W=C.useRef(!0),P=Ue(re=>{f(z.current===-1?null:z.current,re)}),Y=C.useRef(P),J=C.useRef(!!i),U=C.useRef(r),se=C.useRef(!1),oe=C.useRef(!1),he=Jn(T),ve=Jn(r),Re=Jn(p),ce=Jn(H),Ie=Ue(()=>{function re(Te){w?q==null||q.events.emit("virtualfocus",Te):vd(Te,{sync:se.current,preventScroll:!0})}const me=u.current[z.current],ae=oe.current;me&&re(me),(se.current?Te=>Te():requestAnimationFrame)(()=>{var De;const Te=u.current[z.current]||me;if(!Te)return;me||re(Te),X&&(ae||!W.current)&&((De=Te.scrollIntoView)==null||De.call(Te,{block:"nearest",inline:"nearest"}))})});Je(()=>{h&&(r&&i?(z.current=p??-1,j.current&&p!=null&&(oe.current=!0,P())):J.current&&(z.current=-1,Y.current()))},[h,r,i,p,P]),Je(()=>{if(h){if(!r){se.current=!1;return}if(i)if(c==null){if(se.current=!1,Re.current!=null)return;if(J.current&&(z.current=-1,Ie()),(!U.current||!J.current)&&j.current&&(V.current!=null||j.current===!0&&V.current==null)){let re=0;const me=()=>{u.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(me),re+=1):(z.current=V.current==null||l1(V.current,A,v)||b?Bm(u):Zx(u),V.current=null,P())};me()}}else nc(u,c)||(z.current=c,Ie(),oe.current=!1)}},[h,r,i,c,Re,b,u,A,v,P,Ie,he]),Je(()=>{var Te,_e;if(!h||i||!q||w||!J.current)return;const re=q.nodesRef.current,me=(_e=(Te=re.find(De=>De.id===B))==null?void 0:Te.context)==null?void 0:_e.elements.floating,ae=li(Nt(i)),Oe=re.some(De=>De.context&&pt(De.context.elements.floating,ae));me&&!Oe&&W.current&&me.focus({preventScroll:!0})},[h,i,q,B,w]),Je(()=>{Y.current=P,U.current=r,J.current=!!i}),Je(()=>{r||(V.current=null,j.current=S)},[r,S]);const Ve=c!=null,X=C.useMemo(()=>{function re(ae){if(!ve.current)return;const Oe=u.current.indexOf(ae.currentTarget);Oe!==-1&&z.current!==Oe&&(z.current=Oe,P(ae))}return{onFocus(ae){se.current=!0,re(ae)},onClick:({currentTarget:ae})=>ae.focus({preventScroll:!0}),onMouseMove(ae){se.current=!0,oe.current=!1,_&&re(ae)},onPointerLeave(ae){var Te;if(!ve.current||!W.current||ae.pointerType==="touch")return;se.current=!0;const Oe=ae.relatedTarget;!_||u.current.includes(Oe)||ce.current&&(vd(null,{sync:!0}),z.current=-1,P(ae),w||(Te=M.current)==null||Te.focus({preventScroll:!0}))}}},[ve,M,_,u,P,ce,w]),Z=C.useCallback(()=>{var re,me,ae;return D??((ae=(me=(re=q==null?void 0:q.nodesRef.current.find(Oe=>Oe.id===B))==null?void 0:re.context)==null?void 0:me.dataRef)==null?void 0:ae.current.orientation)},[B,q,D]),te=Ue(re=>{if(W.current=!1,se.current=!0,re.which===229||!ve.current&&re.currentTarget===M.current)return;if(b&&woe(re.key,A,v,O)){fm(re.key,Z())||Gn(re),n.setOpen(!1,kt(jm,re.nativeEvent)),Zt(o)&&(w?q==null||q.events.emit("virtualfocus",o):o.focus());return}const me=z.current,ae=Bm(u,T),Oe=Zx(u,T);if(F||(re.key==="Home"&&(Gn(re),z.current=ae,P(re)),re.key==="End"&&(Gn(re),z.current=Oe,P(re))),O>1){const Te=Array.from({length:u.current.length},()=>({width:1,height:1})),_e=UP(Te,O,!1),De=_e.findIndex(ke=>ke!=null&&!ua(u,ke,T)),ue=_e.reduce((ke,Ne,Fe)=>Ne!=null&&!ua(u,Ne,T)?Fe:ke,-1),Se=_e[BP({current:_e.map(ke=>ke!=null?u.current[ke]:null)},{event:re,orientation:A,loopFocus:y,rtl:v,cols:O,disabledIndices:GP([...(typeof T!="function"?T:null)||u.current.map((ke,Ne)=>ua(u,Ne,T)?Ne:void 0),void 0],_e),minIndex:De,maxIndex:ue,prevIndex:HP(z.current>Oe?ae:z.current,Te,_e,O,re.key===hh?"bl":re.key===(v?aa:la)?"tr":"tl"),stopEvent:!0})];if(Se!=null&&(z.current=Se,P(re)),A==="both")return}if(fm(re.key,A)){if(Gn(re),r&&!w&&li(re.currentTarget.ownerDocument)===re.currentTarget){z.current=l1(re.key,A,v)?ae:Oe,P(re);return}l1(re.key,A,v)?y?me>=Oe?g&&me!==u.current.length?z.current=-1:(se.current=!1,z.current=ae):z.current=Fn(u,{startingIndex:me,disabledIndices:T}):z.current=Math.min(Oe,Fn(u,{startingIndex:me,disabledIndices:T})):y?me<=ae?g&&me!==-1?z.current=u.current.length:(se.current=!1,z.current=Oe):z.current=Fn(u,{startingIndex:me,decrement:!0,disabledIndices:T}):z.current=Math.max(ae,Fn(u,{startingIndex:me,decrement:!0,disabledIndices:T})),nc(u,z.current)&&(z.current=-1),P(re)}}),xe=C.useMemo(()=>w&&r&&Ve&&{"aria-activedescendant":`${N}-${c}`},[w,r,Ve,N,c]),ge=C.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...F?{}:xe,onKeyDown(re){if(re.key==="Tab"&&re.shiftKey&&r&&!w){const me=Ir(re.nativeEvent);if(me&&!pt(M.current,me))return;Gn(re),n.setOpen(!1,kt(Dc,re.nativeEvent)),Zt(o)&&o.focus();return}te(re)},onPointerMove(){W.current=!0}}),[xe,te,M,A,F,n,r,w,o]),Ce=C.useMemo(()=>{function re(ae){S==="auto"&&IP(ae.nativeEvent)&&(j.current=!w)}function me(ae){j.current=S,S==="auto"&&FP(ae.nativeEvent)&&(j.current=!0)}return{onKeyDown(ae){const Oe=n.select("open");W.current=!1;const Te=ae.key.startsWith("Arrow"),_e=xoe(ae.key,Z(),v),De=fm(ae.key,A),ue=(b?_e:De)||ae.key==="Enter"||ae.key.trim()==="";if(w&&Oe)return te(ae);if(!(!Oe&&!k&&Te)){if(ue){const Se=fm(ae.key,Z());V.current=b&&Se?null:ae.key}if(b){_e&&(Gn(ae),Oe?(z.current=Bm(u,he.current),P(ae)):n.setOpen(!0,kt(jm,ae.nativeEvent,ae.currentTarget)));return}De&&(Re.current!=null&&(z.current=Re.current),Gn(ae),!Oe&&k?n.setOpen(!0,kt(jm,ae.nativeEvent,ae.currentTarget)):te(ae),Oe&&P(ae))}},onFocus(ae){n.select("open")&&!w&&(z.current=-1,P(ae))},onPointerDown:me,onPointerEnter:me,onMouseDown:re,onClick:re}},[te,he,S,u,b,P,n,k,A,Z,v,Re,w]),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 Coe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Eoe(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=Gl(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var _;return((_=Tg(a))==null?void 0:_.id)||i},[a,i]),p=Coe.get(u)??u,y=ts()!=null,b=C.useMemo(()=>p==="tooltip"||u==="label"?En:{"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]),w=C.useMemo(()=>{const _={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),S=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:w,item:S,trigger:b}),[v,w,b,S])}function koe(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,g=Ni(),y=C.useRef(""),b=C.useRef(p??a??-1),v=C.useRef(null);Je(()=>{!i&&p!==null||(g.clear(),v.current=null,y.current!==""&&(y.current=""))},[i,p,g]),Je(()=>{i&&y.current===""&&(b.current=p??a??-1)},[i,p,a]);const w=Ue(A=>{A?r.current.typing||(r.current.typing=A,c==null||c(A)):r.current.typing&&(r.current.typing=A,c==null||c(A))}),S=Ue(A=>{function D(M,B,q){const F=B.find(j=>(j==null?void 0:j.toLocaleLowerCase().indexOf(q.toLocaleLowerCase()))===0);return F?M.indexOf(F):-1}const O=o.current;if(y.current.length>0&&y.current[0]!==" "&&(D(O,O,y.current)===-1?w(!1):A.key===" "&&Gn(A)),O==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(Gn(A),w(!0));const N=y.current==="";N&&(b.current=p??a??-1),O.every(M=>{var B,q;return M?((B=M[0])==null?void 0:B.toLocaleLowerCase())!==((q=M[1])==null?void 0:q.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",b.current=v.current),y.current+=A.key,g.start(h,()=>{y.current="",b.current=v.current,w(!1)});const I=N?p??a??-1:b.current,L=D(O,[...O.slice((I||0)+1),...O.slice(0,(I||0)+1)],y.current);L!==-1?(u==null||u(L),v.current=L):A.key!==" "&&(y.current="",w(!1))}),_=Ue(A=>{const D=A.relatedTarget,O=n.select("domReferenceElement"),N=n.select("floatingElement"),H=pt(O,D),I=pt(N,D);H||I||(g.clear(),y.current="",b.current=v.current,w(!1))}),k=C.useMemo(()=>({onKeyDown:S,onBlur:_}),[S,_]),T=C.useMemo(()=>({onKeyDown:S,onKeyUp(A){A.key===" "&&w(!1)},onBlur:_}),[S,_,w]);return C.useMemo(()=>f?{reference:k,floating:T}:{},[f,k,T])}function YA(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 Roe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function _oe(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Jo;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,g){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=g,c=y,null;const v=p-a,w=g-u,_=Math.sqrt(v*v+w*w)/b;return a=p,u=g,c=y,_}const h=({x:p,y:g,placement:y,elements:b,onClose:v,nodeId:w,tree:S})=>function(k){function T(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||g==null)return;const{clientX:A,clientY:D}=k,O=[A,D],N=Ir(k),H=k.type==="mouseleave",I=pt(b.floating,N),L=pt(b.domReference,N),M=b.domReference.getBoundingClientRect(),B=b.floating.getBoundingClientRect(),q=y.split("-")[0],F=p>B.right-B.width/2,j=g>B.bottom-B.height/2,z=Roe(O,M),V=B.width>M.width,W=B.height>M.height,P=(V?M:B).left,Y=(V?M:B).right,J=(W?M:B).top,U=(W?M:B).bottom;if(I&&(o=!0,!H))return;if(L&&(o=!1),L&&!H){o=!0;return}if(H&&Lt(k.relatedTarget)&&pt(b.floating,k.relatedTarget)||S&&_l(S.nodesRef.current,w).some(({context:he})=>he==null?void 0:he.open))return;if(q==="top"&&g>=M.bottom-1||q==="bottom"&&g<=M.top+1||q==="left"&&p>=M.right-1||q==="right"&&p<=M.left+1)return T();let se=[];switch(q){case"top":se=[[P,M.top+1],[P,B.bottom-1],[Y,B.bottom-1],[Y,M.top+1]];break;case"bottom":se=[[P,B.top+1],[P,M.bottom-1],[Y,M.bottom-1],[Y,B.top+1]];break;case"left":se=[[B.right-1,U],[B.right-1,J],[M.left+1,J],[M.left+1,U]];break;case"right":se=[[M.right-1,U],[M.right-1,J],[B.left+1,J],[B.left+1,U]];break}function oe([he,ve]){switch(q){case"top":{const Re=[V?he+t/2:F?he+t*4:he-t*4,ve+t+1],ce=[V?he-t/2:F?he+t*4:he-t*4,ve+t+1],Ie=[[B.left,F||V?B.bottom-t:B.top],[B.right,F?V?B.bottom-t:B.top:B.bottom-t]];return[Re,ce,...Ie]}case"bottom":{const Re=[V?he+t/2:F?he+t*4:he-t*4,ve-t],ce=[V?he-t/2:F?he+t*4:he-t*4,ve-t],Ie=[[B.left,F||V?B.top+t:B.bottom],[B.right,F?V?B.top+t:B.bottom:B.top+t]];return[Re,ce,...Ie]}case"left":{const Re=[he+t+1,W?ve+t/2:j?ve+t*4:ve-t*4],ce=[he+t+1,W?ve-t/2:j?ve+t*4:ve-t*4];return[...[[j||W?B.right-t:B.left,B.top],[j?W?B.right-t:B.left:B.right-t,B.bottom]],Re,ce]}case"right":{const Re=[he-t,W?ve+t/2:j?ve+t*4:ve-t*4],ce=[he-t,W?ve-t/2:j?ve+t*4:ve-t*4],Ie=[[j||W?B.left+t:B.right,B.top],[j?W?B.left+t:B.right:B.left+t,B.bottom]];return[Re,ce,...Ie]}default:return[]}}if(!YA([A,D],se)){if(o&&!z)return T();if(!H&&r){const he=f(k.clientX,k.clientY);if(he!==null&&he<.1)return T()}YA([A,D],oe([p,g]))?!o&&r&&i.start(40,T):T()}};return h.__options={blockPointerEvents:n},h}const Toe=C.createContext(void 0);function OL(e){return C.useContext(Toe)}function $L(e){return e==="starting"?Qte:En}const Aoe={...aL,...EP},Doe=C.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:u}=ql(),{side:c,align:f}=oL(),h=OL()!=null,p=u.useState("open"),g=u.useState("transitionStatus"),y=u.useState("popupProps"),b=u.useState("mounted"),v=u.useState("instantType"),w=u.useState("activeTriggerElement"),S=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"),N=S.type==="context-menu";BS({open:p,ref:u.context.popupRef,onComplete(){var q,F;p&&((F=(q=u.context).onOpenChangeComplete)==null||F.call(q,!0))}}),C.useEffect(()=>{function q(F){u.setOpen(!1,kt(F.reason,F.domEvent))}return A.events.on("close",q),()=>{A.events.off("close",q)}},[A.events,u]);const H=u.useState("hoverEnabled"),I=u.useState("disabled");moe(T,{enabled:H&&!I&&!N&&S.type!=="menubar",closeDelay:D});const L={transitionStatus:g,side:c,align:f,open:p,nested:S.type==="menu",instant:v},M=Gr("div",t,{state:L,ref:[n,u.context.popupRef],stateAttributesMapping:Aoe,props:[y,{onKeyDown(q){h&&sre.has(q.key)&&q.stopPropagation()}},$L(g),a,{"data-rootownerid":k}]});let B=S.type===void 0||N;return(w||S.type==="menubar"&&_!==AS)&&(B=!0),R.jsx(Lre,{context:T,modal:N,disabled:!b,returnFocus:o===void 0?B:o,initialFocus:S.type!=="menu",restoreFocus:!0,externalTree:S.type!=="menubar"?A:void 0,previousFocusableElement:O,nextFocusableElement:S.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:S.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:M})}),NL=C.createContext(void 0);function Moe(){const e=C.useContext(NL);if(e===void 0)throw new Error(Pi(32));return e}const Ooe=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:o}=ql();return o.useState("mounted")||r?R.jsx(NL.Provider,{value:r,children:R.jsx(Mre,{ref:n,...i})}):null});function PL(e){return TS(19)?e:e?"true":void 0}const $oe=e=>({name:"arrow",options:e,async fn(t){var W,P;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=Zo(e,t)||{};if(f==null)return{};const g=zP(h),y={x:n,y:r},b=jS(i),v=FS(b),w=await a.getDimensions(f),S=b==="y",_=S?"top":"left",k=S?"bottom":"right",T=S?"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 N=u.floating[T]||o.floating[v];(!N||!await((P=a.isElement)==null?void 0:P.call(a,O)))&&(N=u.floating[T]||o.floating[v]);const H=A/2-D/2,I=N/2-w[v]/2-1,L=Math.min(g[_],I),M=Math.min(g[k],I),B=L,q=N-w[v]-M,F=N/2-w[v]/2+H,j=Xx(B,F,q),z=!c.arrow&&Sa(i)!=null&&F!==j&&o.reference[v]/2-(F<B?L:M)-w[v]/2<0,V=z?F<B?F-B:F-q:0;return{[b]:y[b]+V,data:{[b]:j,centerOffset:F-j-V,...z&&{alignmentOffset:V}},reset:z}}}),Noe=(e,t)=>({...$oe(e),options:[e,t]}),Poe={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 Eie().fn(e)).data)==null?void 0:u.referenceHidden)||o}}}},Loe={sideX:"left",sideY:"top"};function LL(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 WA(e,t,n){const{rects:r,placement:i}=e;return{side:LL(t,jr(i),n),align:Sa(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ioe(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:g=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:w=!1,nodeId:S,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",N=v.align||"flip",H=v.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,L=Ue(I),M=I?L:t,B=Jn(t),F=xy()==="rtl",j=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[r],z=o==="center"?j:`${j}-${o}`;let V=c;const W=1,P=r==="bottom"?W:0,Y=r==="top"?W:0,J=r==="right"?W:0,U=r==="left"?W:0;typeof V=="number"?V={top:V+P,right:V+U,bottom:V+Y,left:V+J}:V&&(V={top:(V.top||0)+P,right:(V.right||0)+U,bottom:(V.bottom||0)+Y,left:(V.left||0)+J});const se={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:V},oe=C.useRef(null),he=Jn(i),ve=Jn(a),Ie=[vie(ct=>{const Rt=WA(ct,r,F),Jt=typeof he.current=="function"?he.current(Rt):he.current,Wt=typeof ve.current=="function"?ve.current(Rt):ve.current;return{mainAxis:Jt,crossAxis:Wt,alignmentAxis:Wt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,F,r])],Ve=N==="none"&&O!=="shift",X=!Ve&&(f||w||O==="shift"),Z=O==="none"?null:Sie({...se,padding:{top:V.top+W,right:V.right+W,bottom:V.bottom+W,left:V.left+W},mainAxis:!w&&O==="flip",crossAxis:N==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),te=Ve?null:xie(ct=>{const Rt=Nt(ct.elements.floating).documentElement;return{...se,rootBoundary:w?{x:0,y:0,width:Rt.clientWidth,height:Rt.clientHeight}:void 0,mainAxis:N!=="none",crossAxis:X,limiter:f||w?void 0:wie(Jt=>{if(!oe.current)return{};const{width:Wt,height:en}=oe.current.getBoundingClientRect(),hn=mi(jr(Jt.placement)),qr=hn==="y"?Wt:en,ka=hn==="y"?V.left+V.right:V.top+V.bottom;return{offset:qr/2+ka/2}})}},[se,f,w,V,N]);O==="shift"||N==="shift"||o==="center"?Ie.push(te,Z):Ie.push(Z,te),Ie.push(Cie({...se,apply({elements:{floating:ct},rects:{reference:Rt},availableWidth:Jt,availableHeight:Wt}){const en=ct.style;en.setProperty("--available-width",`${Jt}px`),en.setProperty("--available-height",`${Wt}px`),en.setProperty("--anchor-width",`${Rt.width}px`),en.setProperty("--anchor-height",`${Rt.height}px`)}}),Noe(()=>({element:oe.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ct){var $n,lo,Xl;const{elements:Rt,middlewareData:Jt,placement:Wt,rects:en,y:hn}=ct,qr=jr(Wt),ka=mi(qr),bi=oe.current,Ra=(($n=Jt.arrow)==null?void 0:$n.x)||0,vi=((lo=Jt.arrow)==null?void 0:lo.y)||0,Wl=(bi==null?void 0:bi.clientWidth)||0,Kl=(bi==null?void 0:bi.clientHeight)||0,rs=Ra+Wl/2,xi=vi+Kl/2,_a=Math.abs(((Xl=Jt.shift)==null?void 0:Xl.y)||0),Ta=en.reference.height/2,Li=typeof i=="function"?i(WA(ct,r,F)):i,Aa=_a>Li,Er={top:`${rs}px calc(100% + ${Li}px)`,bottom:`${rs}px ${-Li}px`,left:`calc(100% + ${Li}px) ${xi}px`,right:`${-Li}px ${xi}px`}[qr],rn=`${rs}px ${en.reference.y+Ta-hn}px`;return Rt.floating.style.setProperty("--transform-origin",X&&ka==="y"&&Aa?rn:Er),{}}},Poe,_),Je(()=>{!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:re,middlewareData:me,update:ae,placement:Oe,context:Te,isPositioned:_e,floatingStyles:De}=uoe({rootContext:y,placement:z,middleware:Ie,strategy:n,whileElementsMounted:g?void 0:(...ct)=>UA(...ct,xe),nodeId:S,externalTree:T}),{sideX:ue,sideY:Se}=me.adaptiveOrigin||Loe,ke=_e?n:"fixed",Ne=C.useMemo(()=>{const ct=_?{position:ke,[ue]:le,[Se]:re}:{position:ke,...De};return _e||(ct.opacity=0),ct},[_,ke,ue,le,Se,re,De,_e]),Fe=C.useRef(null);Je(()=>{if(!b)return;const ct=B.current,Rt=typeof ct=="function"?ct():ct,Wt=(KA(Rt)?Rt.current:Rt)||null||null;Wt!==Fe.current&&(ge.setPositionReference(Wt),Fe.current=Wt)},[b,ge,M,B]),C.useEffect(()=>{if(!b)return;const ct=B.current;typeof ct!="function"&&KA(ct)&&ct.current!==Fe.current&&(ge.setPositionReference(ct.current),Fe.current=ct.current)},[b,ge,M,B]),C.useEffect(()=>{if(g&&b&&Ce.domReference&&Ce.floating)return UA(Ce.domReference,Ce.floating,ae,xe)},[g,b,Ce,ae,xe]);const at=jr(Oe),Bt=LL(r,at,F),Mt=Sa(Oe)||"center",Me=!!((Tt=me.hide)!=null&&Tt.referenceHidden);Je(()=>{k&&b&&_e&&D(at)},[k,b,_e,at]);const We=C.useMemo(()=>{var ct,Rt;return{position:"absolute",top:(ct=me.arrow)==null?void 0:ct.y,left:(Rt=me.arrow)==null?void 0:Rt.x}},[me.arrow]),Le=((ft=me.arrow)==null?void 0:ft.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:Ne,arrowStyles:We,arrowRef:oe,arrowUncentered:Le,side:Bt,align:Mt,physicalSide:at,anchorHidden:Me,refs:ge,context:Te,isPositioned:_e,update:ae}),[Ne,We,oe,Le,Bt,Mt,at,Me,ge,Te,_e,ae])}function KA(e){return e!=null&&"current"in e}const Foe=C.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r==null?void 0:r.getBoundingClientRect();o=`polygon(
|
|
489
|
+
0% 0%,
|
|
490
|
+
100% 0%,
|
|
491
|
+
100% 100%,
|
|
492
|
+
0% 100%,
|
|
493
|
+
0% 0%,
|
|
494
|
+
${a.left}px ${a.top}px,
|
|
495
|
+
${a.left}px ${a.bottom}px,
|
|
496
|
+
${a.right}px ${a.bottom}px,
|
|
497
|
+
${a.right}px ${a.top}px,
|
|
498
|
+
${a.left}px ${a.top}px
|
|
499
|
+
)`}return R.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})}),joe=C.forwardRef(function(t,n){var Ve;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:g=5,arrowPadding:y=5,sticky:b=!1,disableAnchorTracking:v=!1,collisionAvoidance:w=Jte,...S}=t,{store:_}=ql(),k=Moe(),T=Ty(!0),A=_.useState("parent"),D=_.useState("floatingRootContext"),O=_.useState("floatingTreeRoot"),N=_.useState("mounted"),H=_.useState("open"),I=_.useState("modal"),L=_.useState("activeTriggerElement"),M=_.useState("transitionStatus"),B=_.useState("lastOpenChangeReason"),q=_.useState("floatingNodeId"),F=_.useState("floatingParentNodeId");let j=r,z=f,V=h,W=c,P=w;A.type==="context-menu"&&(j=r??((Ve=A.context)==null?void 0:Ve.anchor),W=W??"start",!u&&W!=="center"&&(V=t.alignOffset??2,z=t.sideOffset??-5));let Y=u,J=W;A.type==="menu"?(Y=Y??"inline-end",J=J??"start",P=t.collisionAvoidance??ene):A.type==="menubar"&&(Y=Y??"bottom",J=J??"start");const U=A.type==="context-menu",se=Ioe({anchor:j,floatingRootContext:D,positionMethod:T?"fixed":i,mounted:N,side:Y,sideOffset:z,align:J,alignOffset:V,arrowPadding:U?0:y,collisionBoundary:p,collisionPadding:g,sticky:b,nodeId:q,keepMounted:k,disableAnchorTracking:v,collisionAvoidance:P,shiftCrossAxis:U&&!("side"in P&&P.side==="flip"),externalTree:O}),oe=C.useMemo(()=>{const X={};return H||(X.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...se.positionerStyles,...X}}},[H,N,se.positionerStyles]);C.useEffect(()=>{function X(Z){Z.open&&(Z.parentNodeId===q&&_.set("hoverEnabled",!1),Z.nodeId!==q&&Z.parentNodeId===_.select("floatingParentNodeId")&&_.setOpen(!1,kt(zm)))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[_,O.events,q]),C.useEffect(()=>{if(_.select("floatingParentNodeId")==null)return;function X(Z){if(Z.open||Z.nodeId!==_.select("floatingParentNodeId"))return;const te=Z.reason??zm;_.setOpen(!1,kt(te))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[O.events,_]),C.useEffect(()=>{function X(Z){!H||Z.nodeId!==_.select("floatingParentNodeId")||Z.target&&L&&L!==Z.target&&_.setOpen(!1,kt(zm))}return O.events.on("itemhover",X),()=>{O.events.off("itemhover",X)}},[O.events,H,L,_]),C.useEffect(()=>{const X={open:H,nodeId:q,parentNodeId:F,reason:_.select("lastOpenChangeReason")};O.events.emit("menuopenchange",X)},[O.events,H,_,q,F]);const he={open:H,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:A.type==="menu"},ve=C.useMemo(()=>({side:se.side,align:se.align,arrowRef:se.arrowRef,arrowUncentered:se.arrowUncentered,arrowStyles:se.arrowStyles,nodeId:se.context.nodeId}),[se.side,se.align,se.arrowRef,se.arrowUncentered,se.arrowStyles,se.context.nodeId]),Re=Gr("div",t,{state:he,stateAttributesMapping:aL,ref:[n,_.useStateSetter("positionerElement")],props:[oe,$L(M),S]}),ce=N&&A.type!=="menu"&&(A.type!=="menubar"&&I&&B!==Lr||A.type==="menubar"&&A.context.modal);let Ie=null;return A.type==="menubar"?Ie=A.context.contentElement:A.type===void 0&&(Ie=L),R.jsxs(iL.Provider,{value:ve,children:[ce&&R.jsx(Foe,{ref:A.type==="context-menu"||A.type==="nested-context-menu"?A.context.internalBackdropRef:null,inert:PL(!H),cutout:Ie}),R.jsx(Cre,{id:q,children:R.jsx(_S,{elementsRef:_.context.itemDomElements,labelsRef:_.context.itemLabels,children:Re})})]})});function zoe(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}let XA={},QA={},ZA="";function Boe(e){if(typeof document>"u")return!1;const t=Nt(e);return Mn(t).innerWidth-t.documentElement.clientWidth>0}function Uoe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Nt(e),r=n.documentElement,i=n.body,o=wa(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 Hoe(e){const t=Nt(e),n=t.documentElement,r=t.body,i=wa(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 Goe(e){var g;const t=Nt(e),n=t.documentElement,r=t.body,i=Mn(n);let o=0,a=0,u=!1;const c=Xi.create();if(DP&&(((g=i.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),S=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,XA={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ZA=n.style.scrollBehavior,QA={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),N=parseFloat(b.marginTop)+parseFloat(b.marginBottom),H=parseFloat(b.marginLeft)+parseFloat(b.marginRight),I=wa(n)?n:r;if(u=Uoe(e),u){n.style.scrollbarGutter=S,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:S,overflowY:"hidden",overflowX:"hidden"}),(_||T)&&(n.style.overflowY="scroll"),(k||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:N||O?`calc(100dvh - ${N+O}px)`:"100dvh",width:H||D?`calc(100vw - ${H+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,XA),Object.assign(r.style,QA),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ZA)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class qoe{constructor(){ne(this,"lockCount",0);ne(this,"restore",null);ne(this,"timeoutLock",Jo.create());ne(this,"timeoutUnlock",Jo.create());ne(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ne(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=Nt(t).documentElement,i=Mn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=SP;return}const o=MP||!Boe(t);this.restore=o?Hoe(t):Goe(t)}}const Voe=new qoe;function Yoe(e=!0,t=null){Je(()=>{if(e)return Voe.acquire(t)},[e,t])}const Woe=C.createContext(null);function IL(e){return C.useContext(Woe)}function Koe(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 Xoe(e){const[t,n]=C.useState(null),r=Ue((u,c)=>{e||n(c||(MP?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=Koe(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}const Qoe={...aoe,disabled:bt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:bt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:bt(e=>e.allowMouseEnter),stickIfOpen:bt(e=>e.stickIfOpen),parent:bt(e=>e.parent),rootId:bt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:bt(e=>e.activeIndex),isActive:bt((e,t)=>e.activeIndex===t),hoverEnabled:bt(e=>e.hoverEnabled),instantType:bt(e=>e.instantType),lastOpenChangeReason:bt(e=>e.openChangeReason),floatingTreeRoot:bt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:bt(e=>e.floatingNodeId),floatingParentNodeId:bt(e=>e.floatingParentNodeId),itemProps:bt(e=>e.itemProps),closeDelay:bt(e=>e.closeDelay),keyboardEventRelay:bt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class KS extends AL{constructor(n){super({...Zoe(),...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 YS},Qoe);ne(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=xr(()=>new KS(r)).current;return n??i}}function Zoe(){return{...soe(),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 HS,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:En,keyboardEventRelay:void 0,closeDelay:0}}const Joe=C.createContext(void 0);function ese(){return C.useContext(Joe)}const tse=_L(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:g=!1,handle:y,triggerId:b,defaultTriggerId:v=null,highlightItemOnHover:w=!0}=t,S=Ty(!0),_=ql(!0),k=IL(!0),T=ese(),A=C.useMemo(()=>T&&_?{type:"menu",store:_.store}:k?{type:"menubar",context:k}:S&&!_?{type:"context-menu",context:S}:{type:void 0},[S,_,k,T]),D=KS.useStore(y==null?void 0:y.store,{open:a,openProp:r,activeTriggerId:v,triggerIdProp:b,parent:A});zoe(()=>{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"),N=fL(O),H=ts();Je(()=>{S&&!_?D.update({parent:{type:"context-menu",context:S},floatingNodeId:N,floatingParentNodeId:H}):_&&D.update({floatingNodeId:N,floatingParentNodeId:H})},[S,_,N,H,D]);const I=D.useState("open"),L=D.useState("activeTriggerElement"),M=D.useState("positionerElement"),B=D.useState("hoverEnabled"),q=D.useState("modal"),F=D.useState("disabled"),j=D.useState("lastOpenChangeReason"),z=D.useState("parent"),V=D.useState("activeIndex"),W=D.useState("payload"),P=D.useState("floatingParentNodeId"),Y=C.useRef(null),J=P!=null;let U;D.useSyncedValues({disabled:u,modal:z.type===void 0?c:void 0,rootId:Gl()});const{openMethod:se,triggerProps:oe,reset:he}=Xoe(I);roe(D);const{forceUnmount:ve}=ioe(I,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),he()}),Re=C.useRef(z.type!=="context-menu"),ce=Ni();C.useEffect(()=>{if(I||(Y.current=null),z.type==="context-menu"){if(!I){ce.clear(),Re.current=!1;return}ce.start(500,()=>{Re.current=!0})}},[ce,I,z.type]),Yoe(I&&q&&j!==Lr&&se!=="touch",M),Je(()=>{!I&&!B&&D.set("hoverEnabled",!0)},[I,B,D]);const Ie=C.useRef(!0),Ve=Ni(),X=Ue((Me,We)=>{var en;const Le=We.reason;if(I===Me&&We.trigger===L&&j===Le||(We.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Me&&We.trigger==null&&(We.trigger=L??void 0),i==null||i(Me,We),We.isCanceled))return;const Tt={open:Me,nativeEvent:We.event,reason:We.reason,nested:J};U==null||U.emit("openchange",Tt);const ft=We.event;if(Me===!1&&(ft==null?void 0:ft.type)==="click"&&ft.pointerType==="touch"&&!Ie.current)return;if(!Me&&V!==null){const hn=D.context.itemDomElements.current[V];queueMicrotask(()=>{hn==null||hn.setAttribute("tabindex","-1")})}Me&&Le===bd?(Ie.current=!1,Ve.start(300,()=>{Ie.current=!0})):(Ie.current=!0,Ve.clear());const ct=(Le===zd||Le===CP)&&ft.detail===0&&(ft==null?void 0:ft.isTrusted),Rt=!Me&&(Le===DS||Le==null),Jt={open:Me,openChangeReason:Le};Y.current=We.event??null;const Wt=((en=We.trigger)==null?void 0:en.id)??null;(Wt||Me)&&(Jt.activeTriggerId=Wt,Jt.activeTriggerElement=We.trigger??null),D.update(Jt),z.type==="menubar"&&(Le===bd||Le===Dc||Le===Lr||Le===jm||Le===zm)?D.set("instantType","group"):ct||Rt?D.set("instantType",ct?"click":"dismiss"):D.set("instantType",void 0)}),Z=C.useCallback(Me=>{const We=kt(Me);return We.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},We},[D]),te=C.useCallback(()=>{D.setOpen(!1,Z(ane))},[D,Z]);C.useImperativeHandle(p,()=>({unmount:ve,close:te}),[ve,te]);let xe;z.type==="context-menu"&&(xe=z.context),C.useImperativeHandle(xe==null?void 0:xe.positionerRef,()=>M,[M]),C.useImperativeHandle(xe==null?void 0:xe.actionsRef,()=>({setOpen:X}),[X]);const ge=coe({popupStore:D,onOpenChange:X});U=ge.context.events,C.useEffect(()=>{const Me=({open:We,eventDetails:Le})=>X(We,Le);return U.on("setOpen",Me),()=>{U==null||U.off("setOpen",Me)}},[U,X]);const Ce=_ie(ge,{enabled:!F,bubbles:{escapeKey:g&&z.type==="menu"},outsidePress(){var Me;return z.type!=="context-menu"||((Me=Y.current)==null?void 0:Me.type)==="contextmenu"?!0:Re.current},externalTree:J?O:void 0}),le=Eoe(ge,{role:"menu"}),re=xy(),me=C.useCallback(Me=>{D.select("activeIndex")!==Me&&D.set("activeIndex",Me)},[D]),ae=Soe(ge,{enabled:!F,listRef:D.context.itemDomElements,activeIndex:V,nested:z.type!==void 0,loopFocus:f,orientation:h,parentOrientation:z.type==="menubar"?z.context.orientation:void 0,rtl:re==="rtl",disabledIndices:Ac,onNavigate:me,openOnArrowKeyDown:z.type!=="context-menu",externalTree:J?O:void 0,focusItemOnHover:w}),Oe=C.useCallback(Me=>{D.context.typingRef.current=Me},[D]),Te=koe(ge,{listRef:D.context.itemLabels,activeIndex:V,resetMs:Kte,onMatch:Me=>{I&&Me!==V&&D.set("activeIndex",Me)},onTypingChange:Oe}),{getReferenceProps:_e,getFloatingProps:De,getItemProps:ue,getTriggerProps:Se}=ML([Ce,le,ae,Te]),ke=C.useMemo(()=>{const Me=jd(_e(),{onMouseMove(){D.set("allowMouseEnter",!0)}},oe);return delete Me.role,Me},[_e,D,oe]),Ne=C.useMemo(()=>{const Me=Se();if(!Me)return Me;const We=jd(Me,oe);return delete We.role,delete We["aria-controls"],We},[Se,oe]),Fe=C.useMemo(()=>De({onMouseMove(){D.set("allowMouseEnter",!0),z.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Me){const We=D.select("keyboardEventRelay");We&&!Me.isPropagationStopped()&&We(Me)}}),[De,z.type,D]),at=C.useMemo(()=>ue(),[ue]);D.useSyncedValues({floatingRootContext:ge,activeTriggerProps:ke,inactiveTriggerProps:Ne,popupProps:Fe,itemProps:at});const Bt=C.useMemo(()=>({store:D,parent:A}),[D,A]),Mt=R.jsx(sL.Provider,{value:Bt,children:typeof n=="function"?n({payload:W}):n});return z.type===void 0||z.type==="context-menu"?R.jsx(Ere,{externalTree:O,children:Mt}):Mt});function nse(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,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}function FL(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=PS(),{ref:i,index:o}=OS(e),a=n===o,u=C.useRef(null),c=$l(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 jL(e){const{render:t,className:n,state:r=En,props:i=Ac,refs:o=Ac,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=FL({metadata:a});return Gr(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function zL(e){if(Zt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!eo(e))return zL(ro(e))}function rse(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,Nt(o.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:o=>{i.current&&(i.current=!1,o.preventBaseUIHandler())}}:En,[t,n,r])}const dm=2,ise=qie(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:g,...y}=t,b=ql(!0),v=(p==null?void 0:p.store)??(b==null?void 0:b.store);if(!v)throw new Error(Pi(85));const w=dh(u),S=v.useState("isTriggerActive",w),_=v.useState("floatingRootContext"),k=v.useState("isOpenedByTrigger",w),T=C.useRef(null),A=sse(),D=PS(!0),O=Ca(),N=C.useMemo(()=>O??new HS,[O]),H=fL(N),I=ts(),{registerTrigger:L,isMountedByThisTrigger:M}=noe(w,T,v,{payload:g,closeDelay:h,parent:A,floatingTreeRoot:N,floatingNodeId:H,floatingParentNodeId:I,keyboardEventRelay:D==null?void 0:D.relayKeyboardEvent}),B=A.type==="menubar",q=v.useState("disabled"),F=o||q||B&&A.context.disabled,{getButtonProps:j,buttonRef:z}=Ry({disabled:F,native:a});C.useEffect(()=>{!k&&A.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,k,A.type]);const V=C.useRef(null),W=Ni(),P=Ue(Ce=>{if(!V.current)return;W.clear(),v.context.allowMouseUpTriggerRef.current=!1;const le=Ce.target;if(pt(V.current,le)||pt(v.select("positionerElement"),le)||le===V.current||le!=null&&zL(le)===v.select("rootId"))return;const re=nse(V.current);Ce.clientX>=re.left-dm&&Ce.clientX<=re.right+dm&&Ce.clientY>=re.top-dm&&Ce.clientY<=re.bottom+dm||N.events.emit("close",{domEvent:Ce,reason:sne})});C.useEffect(()=>{k&&v.select("lastOpenChangeReason")===Lr&&Nt(V.current).addEventListener("mouseup",P,{once:!0})},[k,P,v]);const Y=B&&A.context.hasSubmenuOpen,U=boe(_,{enabled:(c??Y)&&!F&&A.type!=="context-menu"&&(!B||Y&&!M),handleClose:_oe({blockPointerEvents:!B}),mouseOnly:!0,move:!1,restMs:A.type===void 0?f:void 0,delay:{close:h},triggerElementRef:T,externalTree:N,isActiveTrigger:S}),se=ose(k,v.select("lastOpenChangeReason")),oe=Ire(_,{enabled:!F&&A.type!=="context-menu",event:k&&B?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0?se:!1}),he=foe(_,{enabled:!F&&Y}),ve=rse({open:k,enabled:B,mouseDownAction:"open"}),Re=ML([oe,he]),ce={disabled:F,open:k},Ie=v.useState("triggerProps",M),Ve=[V,n,z,L,T],X=[Re.getReferenceProps(),U??En,Ie,{"aria-haspopup":"menu",id:w,onMouseDown:Ce=>{if(v.select("open"))return;W.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Nt(Ce.currentTarget).addEventListener("mouseup",P,{once:!0})}},B?{role:"menuitem"}:{},ve,y,j],Z=C.useRef(null),te=Ue(Ce=>{On.flushSync(()=>{v.setOpen(!1,kt(Dc,Ce.nativeEvent,Ce.currentTarget))});const le=tre(Z.current);le==null||le.focus()}),xe=Ue(Ce=>{var re;const le=v.select("positionerElement");if(le&&rc(Ce,le))(re=v.context.beforeContentFocusGuardRef.current)==null||re.focus();else{On.flushSync(()=>{v.setOpen(!1,kt(Dc,Ce.nativeEvent,Ce.currentTarget))});let me=ere(v.context.triggerFocusTargetRef.current||T.current);for(;me!==null&&pt(le,me);){const ae=me;if(me=zS(me),me===ae)break}me==null||me.focus()}}),ge=Gr("button",t,{enabled:!B,stateAttributesMapping:MA,state:ce,ref:Ve,props:X});return B?R.jsx(jL,{tag:"button",render:r,className:i,state:ce,refs:Ve,props:X,stateAttributesMapping:MA}):k?R.jsxs(C.Fragment,{children:[R.jsx(Lc,{ref:Z,onFocus:te},`${w}-pre-focus-guard`),R.jsx(C.Fragment,{children:ge},w),R.jsx(Lc,{ref:v.context.triggerFocusTargetRef,onFocus:xe},`${w}-post-focus-guard`)]}):R.jsx(C.Fragment,{children:ge},w)});function ose(e,t){const n=Ni(),[r,i]=C.useState(!1);return Je(()=>{e&&t==="trigger-hover"?(i(!0),n.start(Xte,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function sse(){const e=Ty(!0),t=ql(!0),n=IL();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const XS=({children:e,...t})=>R.jsx(tse,{...t,children:e});XS.displayName="MenuRoot";const QS=({children:e,...t})=>{const n=C.isValidElement(e),r=!!t.render;return R.jsx(ise,{"data-slot":"menu-trigger",...!r&&{render:R.jsx("div",{tabIndex:n?-1:0}),nativeButton:!1},...t,children:e})};QS.displayName="MenuTrigger";const ZS=({children:e,...t})=>R.jsx(Ooe,{"data-slot":"menu-portal",...t,children:e});ZS.displayName="MenuPortal";const ase="_positioner_12j95_1",lse="_popup_12j95_5",use="_item_12j95_23",JS={positioner:ase,popup:lse,item:use},eC=({className:e,children:t,...n})=>R.jsx(joe,{"data-slot":"menu-positioner",className:ze(JS.positioner,e),sideOffset:4,collisionPadding:16,...n,children:t});eC.displayName="MenuPositioner";const tC=({className:e,children:t,...n})=>R.jsx(Doe,{"data-slot":"menu-popup",className:ze(JS.popup,e),...n,children:t});tC.displayName="MenuPopup";const Ig=({className:e,children:t,...n})=>R.jsx(wre,{"data-slot":"menu-item",className:ze(JS.item,e),...n,children:t});Ig.displayName="MenuItem";const BL=C.createContext(void 0);function Hd(){const e=C.useContext(BL);if(e===void 0)throw new Error(Pi(64));return e}let cse=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const My={tabActivationDirection:e=>({[cse.activationDirection]:e})},fse=C.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:u,value:c,...f}=t,h=xy(),p=Object.hasOwn(t,"defaultValue"),g=C.useRef([]),[y,b]=C.useState(()=>new Map),[v,w]=RS({controlled:c,default:i,name:"Tabs",state:"value"}),S=c!==void 0,[_,k]=C.useState(()=>new Map),[T,A]=C.useState("none"),D=Ue((z,V)=>{o==null||o(z,V),!V.isCanceled&&(w(z),A(V.activationDirection))}),O=Ue((z,V)=>{b(W=>{if(W.get(z)===V)return W;const P=new Map(W);return P.set(z,V),P})}),N=Ue((z,V)=>{b(W=>{if(!W.has(z)||W.get(z)!==V)return W;const P=new Map(W);return P.delete(z),P})}),H=C.useCallback(z=>y.get(z),[y]),I=C.useCallback(z=>{for(const V of _.values())if(z===(V==null?void 0:V.value))return V==null?void 0:V.id},[_]),L=C.useCallback(z=>{if(z===void 0)return null;for(const[V,W]of _.entries())if(W!=null&&z===(W.value??W.index))return V;return null},[_]),M=C.useMemo(()=>({direction:h,getTabElementBySelectedValue:L,getTabIdByPanelValue:I,getTabPanelIdByValue:H,onValueChange:D,orientation:a,registerMountedTabPanel:O,setTabMap:k,unregisterMountedTabPanel:N,tabActivationDirection:T,value:v}),[h,L,I,H,D,a,O,k,N,T,v]),B=C.useMemo(()=>{for(const z of _.values())if(z!=null&&z.value===v)return z},[_,v]),q=C.useMemo(()=>{for(const z of _.values())if(z!=null&&!z.disabled)return z.value},[_]);Je(()=>{if(S||_.size===0)return;const z=B==null?void 0:B.disabled,V=B==null&&v!==null;if(p&&z&&v===i||!z&&!V)return;const P=q??null;v!==P&&(w(P),A("none"))},[i,q,p,S,B,A,w,_,v]);const j=Gr("div",t,{state:{orientation:a,tabActivationDirection:T},ref:n,props:f,stateAttributesMapping:My});return R.jsx(BL.Provider,{value:M,children:R.jsx(_S,{elementsRef:g,children:j})})}),UL="data-composite-item-active",HL=C.createContext(void 0);function GL(){const e=C.useContext(HL);if(e===void 0)throw new Error(Pi(65));return e}const dse=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:g}=Hd(),{activateOnFocus:y,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:w,tabsListElement:S}=GL(),_=dh(u),k=C.useMemo(()=>({disabled:i,id:_,value:a}),[i,_,a]),{compositeProps:T,compositeRef:A,index:D}=FL({metadata:k}),O=a===h,N=C.useRef(!1);Je(()=>{if(N.current){N.current=!1;return}if(!(O&&D>-1&&b!==D))return;const W=S;if(W!=null){const P=li(Nt(W));if(P&&pt(W,P))return}i||w(D)},[O,D,b,w,i,S]);const{getButtonProps:H,buttonRef:I}=Ry({disabled:i,native:c,focusableWhenDisabled:!0}),L=p(a),M=C.useRef(!1),B=C.useRef(!1);function q(W){O||i||v(a,kt(Rg,W.nativeEvent,void 0,{activationDirection:"none"}))}function F(W){O||(D>-1&&!i&&w(D),!i&&y&&(!M.current||M.current&&B.current)&&v(a,kt(Rg,W.nativeEvent,void 0,{activationDirection:"none"})))}function j(W){if(O||i)return;M.current=!0;function P(){M.current=!1,B.current=!1}(!W.button||W.button===0)&&(B.current=!0,Nt(W.currentTarget).addEventListener("pointerup",P,{once:!0}))}return Gr("button",t,{state:{disabled:i,active:O,orientation:g},ref:[n,I,A],props:[T,{role:"tab","aria-controls":L,"aria-selected":O,id:_,onClick:q,onFocus:F,onPointerDown:j,[UL]:O?"":void 0,onKeyDownCapture(){N.current=!0}},f,H]})});function JA(e){const t=wr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return($c(n)!==o||$c(r)!==a)&&(n=o,r=a),{width:n,height:r}}const hse='!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 Iu=(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 pse=C.createContext(void 0),mse={disableStyleElements:!1};function gse(){return C.useContext(pse)??mse}const yse={...My,activeTabPosition:()=>null,activeTabSize:()=>null},bse=C.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:u}=gse(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=Hd(),{tabsListElement:g}=GL(),[y,b]=C.useState(!1),{value:v}=Hd();wy(()=>b(!0));const w=Jie();C.useEffect(()=>{if(p!=null&&g!=null&&typeof ResizeObserver<"u"){const q=new ResizeObserver(w);return q.observe(g),()=>{q.disconnect()}}},[p,g,w]);let S=0,_=0,k=0,T=0,A=0,D=0,O=!1;if(p!=null&&g!=null){const q=c(p);if(O=!0,q!=null){const{width:F,height:j}=JA(q),{width:z,height:V}=JA(g),W=q.getBoundingClientRect(),P=g.getBoundingClientRect(),Y=z>0?P.width/z:1,J=V>0?P.height/V:1;if(Math.abs(Y)>Number.EPSILON&&Math.abs(J)>Number.EPSILON){const se=W.left-P.left,oe=W.top-P.top;S=se/Y+g.scrollLeft-g.clientLeft,k=oe/J+g.scrollTop-g.clientTop}else S=q.offsetLeft,k=q.offsetTop;A=F,D=j,_=g.scrollWidth-S-A,T=g.scrollHeight-k-D}}const N=C.useMemo(()=>O?{left:S,right:_,top:k,bottom:T}:null,[S,_,k,T,O]),H=C.useMemo(()=>O?{width:A,height:D}:null,[A,D,O]),I=C.useMemo(()=>{if(O)return{[Iu.activeTabLeft]:`${S}px`,[Iu.activeTabRight]:`${_}px`,[Iu.activeTabTop]:`${k}px`,[Iu.activeTabBottom]:`${T}px`,[Iu.activeTabWidth]:`${A}px`,[Iu.activeTabHeight]:`${D}px`}},[S,_,k,T,A,D,O]),L=O&&A>0&&D>0,B=Gr("span",t,{state:{orientation:f,activeTabPosition:N,activeTabSize:H,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:I,hidden:!L},a,{suppressHydrationWarning:!0}],stateAttributesMapping:yse});return v==null?null:R.jsxs(C.Fragment,{children:[B,!y&&o&&R.jsx("script",{nonce:u,dangerouslySetInnerHTML:{__html:hse},suppressHydrationWarning:!0})]})});let vse=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const xse={...My,...EP},wse=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:g,unregisterMountedTabPanel:y}=Hd(),b=dh(),v=C.useMemo(()=>({id:b,value:i}),[b,i]),{ref:w,index:S}=OS({metadata:v}),_=i===c,{mounted:k,transitionStatus:T,setMounted:A}=kP(_),D=!k,O=f(i),N={hidden:D,orientation:h,tabActivationDirection:p,transitionStatus:T},H=C.useRef(null),I=Gr("div",t,{state:N,ref:[n,w,H],props:[{"aria-labelledby":O,hidden:D,id:b,role:"tabpanel",tabIndex:_?0:-1,inert:PL(!_),[vse.index]:S},u],stateAttributesMapping:xse});return BS({open:_,ref:H,onComplete(){_||A(!1)}}),Je(()=>{if(!(D&&!a)&&b!=null)return g(i,b),()=>{y(i,b)}},[D,a,i,b,g,y]),a||k?I:null}),Sse=[];function Cse(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:g,modifierKeys:y=Sse}=e,[b,v]=C.useState(0),w=n>1,S=C.useRef(null),_=$l(S,f),k=C.useRef([]),T=C.useRef(!1),A=u??b,D=Ue((H,I=!1)=>{if((c??v)(H),I){const L=k.current[H];TA(S.current,L,a,o)}}),O=Ue(H=>{if(H.size===0||T.current)return;T.current=!0;const I=Array.from(H.keys()),L=I.find(B=>B==null?void 0:B.hasAttribute(UL))??null,M=L?I.indexOf(L):-1;M!==-1&&D(M),TA(S.current,L,a,o)}),N=C.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:_,onFocus(H){!S.current||!_A(H.target)||H.target.setSelectionRange(0,H.target.value.length??0)},onKeyDown(H){const I=h?ore:rL;if(!I.has(H.key)||Ese(H,y)||!S.current)return;const M=a==="rtl",B=M?Ud:oc,q={horizontal:B,vertical:ll,both:B}[o],F=M?oc:Ud,j={horizontal:F,vertical:ic,both:F}[o];if(_A(H.target)&&!gne(H.target)){const U=H.target.selectionStart,se=H.target.selectionEnd,oe=H.target.value??"";if(U==null||H.shiftKey||U!==se||H.key!==j&&U<oe.length||H.key!==q&&U>0)return}let z=A;const V=Bm(k,g),W=Zx(k,g);if(w){const U=t||Array.from({length:k.current.length},()=>({width:1,height:1})),se=UP(U,n,i),oe=se.findIndex(ve=>ve!=null&&!ua(k,ve,g)),he=se.reduce((ve,Re,ce)=>Re!=null&&!ua(k,Re,g)?ce:ve,-1);z=se[BP({current:se.map(ve=>ve?k.current[ve]:null)},{event:H,orientation:o,loopFocus:r,cols:n,disabledIndices:GP([...g||k.current.map((ve,Re)=>ua(k,Re)?Re:void 0),void 0],se),minIndex:oe,maxIndex:he,prevIndex:HP(A>W?V:A,U,se,n,H.key===ll?"bl":H.key===oc?"tr":"tl"),rtl:M})]}const P={horizontal:[B],vertical:[ll],both:[B,ll]}[o],Y={horizontal:[F],vertical:[ic],both:[F,ic]}[o],J=w?I:{horizontal:h?rre:tL,vertical:h?ire:nL,both:I}[o];h&&(H.key===mh?z=V:H.key===gh&&(z=W)),z===A&&(P.includes(H.key)||Y.includes(H.key))&&(r&&z===W&&P.includes(H.key)?z=V:r&&z===V&&Y.includes(H.key)?z=W:z=Fn(k,{startingIndex:z,decrement:Y.includes(H.key),disabledIndices:g})),z!==A&&!nc(k,z)&&(p&&H.stopPropagation(),J.has(H.key)&&H.preventDefault(),D(z,!0),queueMicrotask(()=>{var U;(U=k.current[z])==null||U.focus()}))}}),[n,i,a,g,k,h,A,w,t,r,_,y,D,o,p]);return C.useMemo(()=>({props:N,highlightedIndex:A,onHighlightedIndexChange:D,elementsRef:k,disabledIndices:g,onMapChange:O,relayKeyboardEvent:N.onKeyDown}),[N,A,D,k,g,O])}function Ese(e,t){for(const n of fre.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function qL(e){const{render:t,className:n,refs:r=Ac,props:i=Ac,state:o=En,stateAttributesMapping:a,highlightedIndex:u,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:y,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:w=!0,rootRef:S,disabledIndices:_,modifierKeys:k,highlightItemOnHover:T=!1,tag:A="div",...D}=e,O=xy(),{props:N,highlightedIndex:H,onHighlightedIndexChange:I,elementsRef:L,onMapChange:M,relayKeyboardEvent:B}=Cse({itemSizes:p,cols:y,loopFocus:g,dense:h,orientation:f,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:S,stopEventPropagation:w,enableHomeAndEndKeys:b,direction:O,disabledIndices:_,modifierKeys:k}),q=Gr(A,e,{state:o,ref:r,props:[N,...i,D],stateAttributesMapping:a}),F=C.useMemo(()=>({highlightedIndex:H,onHighlightedIndexChange:I,highlightItemOnHover:T,relayKeyboardEvent:B}),[H,I,T,B]);return R.jsx(_P.Provider,{value:F,children:R.jsx(_S,{elementsRef:L,onMapChange:j=>{v==null||v(j),M(j)},children:q})})}const kse=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:g,tabActivationDirection:y}=Hd(),[b,v]=C.useState(0),[w,S]=C.useState(null),_=Rse(p,h,w,c),k=Ue((O,N)=>{if(O!==p){const H=_(O);N.activationDirection=H,f(O,N)}}),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:w,value:p}),[r,b,k,v,w,p]);return R.jsx(HL.Provider,{value:D,children:R.jsx(qL,{render:a,className:i,state:T,refs:[n,S],props:[A,u],stateAttributesMapping:My,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:g,disabledIndices:Ac})})});function eD(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 Rse(e,t,n,r){const[i,o]=C.useState(null);return Je(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:u,top:c}=eD(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}=eD(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 VL=({children:e,...t})=>R.jsx(fse,{"data-slot":"tabs-root",render:R.jsx(Ye,{}),...t,children:e});VL.displayName="TabsRoot";const _se="_tab_4eh43_3",Oy={"tabs-list":"_tabs-list_4eh43_3",tab:_se,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},YL=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>R.jsx(kse,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:R.jsx(Ke,{gap:4,ay:"center",fullwidth:n}),className:ze(Oy["tabs-list"],r),...o,children:i});YL.displayName="TabsList";const WL=({className:e,children:t,...n})=>R.jsx(dse,{"data-slot":"tabs-tab",className:ze(Oy.tab,e),...n,children:t});WL.displayName="TabsTab";const KL=({className:e,...t})=>R.jsx(bse,{"data-slot":"tabs-indicator",className:ze(Oy["tabs-indicator"],e),...t});KL.displayName="TabsIndicator";const XL=({className:e,children:t,...n})=>R.jsx(wse,{"data-slot":"tabs-panel",render:R.jsx(Ye,{ay:"center",ax:"center",fullwidth:!0}),className:ze(Oy["tabs-panel"],e),tabIndex:-1,...n,children:t});XL.displayName="TabsPanel";const nC=({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:g,ContainerProps:y})=>R.jsxs(VL,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[R.jsxs(YL,{size:o,ghost:a,fullwidth:u,...f,children:[e.map(b=>R.jsx(WL,{value:b.value,...h,children:b.label},b.value)),R.jsx(KL,{...p})]}),R.jsx($w,{"data-slot":"tabs-container",...y,children:e.map(b=>R.jsx(XL,{value:b.value,keepMounted:i,...g,children:b.render},b.value))})]});nC.displayName="Tabs";const QL=C.createContext(void 0);function Tse(e=!0){const t=C.useContext(QL);if(t===void 0&&!e)throw new Error(Pi(7));return t}let Ase=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const tD={multiple(e){return e?{[Ase.multiple]:""}:null}},Dse=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,...g}=t,y=OL(),b=C.useMemo(()=>{if(f===void 0)return r??[]},[f,r]),v=C.useMemo(()=>f!==void 0||r!==void 0,[f,r]),w=((y==null?void 0:y.disabled)??!1)||i,[S,_]=RS({controlled:f,default:b,name:"ToggleGroup",state:"value"}),k=Ue((N,H,I)=>{let L;if(c?(L=S.slice(),H?L.push(N):L.splice(S.indexOf(N),1)):L=H?[N]:[],Array.isArray(L)){if(a==null||a(L,I),I.isCanceled)return;_(L)}}),T={disabled:w,multiple:c,orientation:u},A=C.useMemo(()=>({disabled:w,orientation:u,setGroupValue:k,value:S,isValueInitialized:v}),[w,u,k,S,v]),D={role:"group"},O=Gr("div",t,{enabled:!!y,state:T,ref:n,props:[D,g],stateAttributesMapping:tD});return R.jsx(QL.Provider,{value:A,children:y?O:R.jsx(qL,{render:p,className:h,state:T,refs:[n],props:[D,g],stateAttributesMapping:tD,loopFocus:o,enableHomeAndEndKeys:!0})})}),Mse=(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}},u1={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},lc=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:g=!0,...y}=t,b=dh(p||void 0),v=Tse(),w=(v==null?void 0:v.value)??[],S=v?void 0:i,_=(o||(v==null?void 0:v.disabled))??!1,[k,T]=RS({controlled:v?b!==void 0&&w.indexOf(b)>-1:c,default:S,name:"Toggle",state:"pressed"}),A=Ue((M,B)=>{var q;b&&((q=v==null?void 0:v.setGroupValue)==null||q.call(v,b,M,B)),u==null||u(M,B)}),{getButtonProps:D,buttonRef:O}=Ry({disabled:_,native:g}),N={disabled:_,pressed:k},H=[O,n],I=[{"aria-pressed":k,onClick(M){const B=!k,q=kt(Rg,M.nativeEvent);A(B,q),!q.isCanceled&&T(B)}},y,D],L=Gr("button",t,{enabled:!v,state:N,ref:H,props:I});return v?R.jsx(jL,{tag:"button",render:f,className:r,state:N,refs:H,props:I}):L}),rC=({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}=Mse(r,c,n),g=b=>{f(b),o==null||o(b)},y=C.Children.map(a,b=>{if(C.isValidElement(b)){const v=b.props.value,w=b.props.className||"";return C.cloneElement(b,{className:`${u1["toggle-group-button"]} ${w}`.trim(),ref:S=>{S&&v&&p.current.set(v,S)}})}return b});return R.jsxs(Dse,{ref:h,value:r,defaultValue:i,onValueChange:g,className:u1["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?R.jsx(Ye,{}):R.jsx(Ke,{}),...u,children:[R.jsx("div",{"data-slot":"toggle-group-indicator",className:u1["toggle-group-indicator"]}),y]})};rC.displayName="ToggleGroup";function Ose(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function $se(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function Nse(e){return e/100*window.innerHeight}function Pse(e){return e/100*window.innerWidth}function Lse(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 hm({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=Lse(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=$se(t,i);break}case"em":{r=Ose(t,i);break}case"vh":{r=Nse(i);break}case"vw":{r=Pse(i);break}}return r}function Mi(e){return parseFloat(e.toFixed(3))}function Ic({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 iw(e){const{panels:t}=e,n=Ic({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=hm({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=Mi(h/n*100)}let u;if(o.defaultSize!==void 0){const h=hm({groupSize:n,panelElement:i,styleProp:o.defaultSize});u=Mi(h/n*100)}let c=0;if(o.minSize!==void 0){const h=hm({groupSize:n,panelElement:i,styleProp:o.minSize});c=Mi(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=hm({groupSize:n,panelElement:i,styleProp:o.maxSize});f=Mi(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:u,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function zt(e,t="Assertion error"){if(!e)throw Error(t)}function ow(e,t){return Array.from(t).sort(e==="horizontal"?Ise:Fse)}function Ise(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Fse(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function ZL(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function JL(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 jse({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}=JL(r,a),f=e==="horizontal"?u:c;f<o&&(o=f,i=a)}return zt(i,"No rect found"),i}let pm;function zse(){return pm===void 0&&(typeof matchMedia=="function"?pm=!!matchMedia("(pointer:coarse)").matches:pm=!1),pm}function eI(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=ow(n,Array.from(t.children).filter(ZL).map(b=>({element:b}))).map(({element:b})=>b),a=[];let u=!1,c=!1,f=-1,h=-1,p=0,g,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 w=r.find(S=>S.element===v);if(w){if(g){const S=g.element.getBoundingClientRect(),_=v.getBoundingClientRect();let k;if(c){const T=n==="horizontal"?new DOMRect(S.right,S.top,0,S.height):new DOMRect(S.left,S.bottom,S.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=jse({orientation:n,rects:[S,_],targetRect:D.element.getBoundingClientRect()});k=[D,O===S?A:T];break}default:{k=y;break}}}else y.length?k=y:k=[n==="horizontal"?new DOMRect(S.right,_.top,_.left-S.right,_.height):new DOMRect(_.left,S.bottom,_.width,_.top-S.bottom)];for(const T of k){let A="width"in T?T:T.element.getBoundingClientRect();const D=zse()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(A.width<D){const N=D-A.width;A=new DOMRect(A.x-N/2,A.y,A.width+N,A.height)}if(A.height<D){const N=D-A.height;A=new DOMRect(A.x,A.y-N/2,A.width,A.height+N)}const O=b<=f||b>h;!u&&!O&&a.push({group:e,groupSize:Ic({group:e}),panels:[g,w],separator:"width"in T?void 0:T,rect:A}),u=!1}}c=!1,g=w,y=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(u=!0);const w=i.find(S=>S.element===v);w?y.push(w):(g=void 0,y=[])}else c=!0}return a}var Ks;class Bse{constructor(){He(this,Ks,{})}addListener(t,n){const r=K(this,Ks)[t];return r===void 0?K(this,Ks)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,Ks)[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,Ks,{})}removeListener(t,n){const r=K(this,Ks)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}Ks=new WeakMap;function Zn(e,t,n=0){return Math.abs(Mi(e)-Mi(t))<=n}let ri={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Yo=new Bse;function nr(){return ri}function rr(e){const t=typeof e=="function"?e(ri):e;if(ri===t)return ri;const n=ri;return ri={...ri,...t},t.cursorFlags!==void 0&&Yo.emit("cursorFlagsChange",ri.cursorFlags),t.interactionState!==void 0&&Yo.emit("interactionStateChange",ri.interactionState),t.mountedGroups!==void 0&&(ri.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const u=Zn(o.collapsedSize,r.layout[o.panelId]),c=Zn(o.collapsedSize,a[o.panelId]);u&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),Yo.emit("mountedGroupsChange",ri.mountedGroups)),ri}function Use(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=JL(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 Hse(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Gse(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:iD(e),b:iD(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();zt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:rD(nD(n.a)),b:rD(nD(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 qse=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Vse(e){const t=getComputedStyle(tI(e)??e).display;return t==="flex"||t==="inline-flex"}function Yse(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Vse(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"||qse.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function nD(e){let t=e.length;for(;t--;){const n=e[t];if(zt(n,"Missing node"),Yse(n))return n}return null}function rD(e){return e&&Number(getComputedStyle(e).zIndex)||0}function iD(e){const t=[];for(;e;)t.push(e),e=tI(e);return t}function tI(e){const{parentNode:t}=e;return Hse(t)?t.host:t}function Wse(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 Kse({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!ZL(n)||n.contains(e)||e.contains(n))return!0;if(Gse(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Wse(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function iC(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=eI(i),a=Use(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Kse({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Xse(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 Vi(e,t){return Zn(e,t)?0:e>t?1:-1}function Ku({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(Vi(r,c)<0)if(o){const f=(i+c)/2;Vi(r,f)<0?r=i:r=c}else r=c;return r=Math.min(u,r),r=Mi(r),r}function Gd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Zn(e,0))return t;const a=o==="imperative-api",u=Object.values(t),c=Object.values(i),f=[...u],[h,p]=r;zt(h!=null,"Invalid first pivot index"),zt(p!=null,"Invalid second pivot index");let g=0;switch(o){case"keyboard":{{const v=e<0?p:h,w=n[v];zt(w,`Panel constraints not found for index ${v}`);const{collapsedSize:S=0,collapsible:_,minSize:k=0}=w;if(_){const T=u[v];if(zt(T!=null,`Previous layout not found for panel index ${v}`),Zn(T,S)){const A=k-T;Vi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}{const v=e<0?h:p,w=n[v];zt(w,`No panel constraints found for index ${v}`);const{collapsedSize:S=0,collapsible:_,minSize:k=0}=w;if(_){const T=u[v];if(zt(T!=null,`Previous layout not found for panel index ${v}`),Zn(T,k)){const A=T-S;Vi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}break}default:{const v=e<0?p:h,w=n[v];zt(w,`Panel constraints not found for index ${v}`);const S=u[v],{collapsible:_,collapsedSize:k,minSize:T}=w;if(_&&Vi(S,T)<0)if(e>0){const A=T-k,D=A/2,O=S+e;Vi(O,T)<0&&(e=Vi(e,D)<=0?0:A)}else{const A=T-k,D=100-A/2,O=S-e;Vi(O,T)<0&&(e=Vi(100+e,D)>0?0:-A)}break}}{const v=e<0?1:-1;let w=e<0?p:h,S=0;for(;;){const k=u[w];zt(k!=null,`Previous layout not found for panel index ${w}`);const T=Ku({overrideDisabledPanels:a,panelConstraints:n[w],prevSize:k,size:100})-k;if(S+=T,w+=v,w<0||w>=n.length)break}const _=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-_:_}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const w=Math.abs(e)-Math.abs(g),S=u[v];zt(S!=null,`Previous layout not found for panel index ${v}`);const _=S-w,k=Ku({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:S,size:_});if(!Zn(S,k)&&(g+=S-k,f[v]=k,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(Xse(c,f))return i;{const v=e<0?p:h,w=u[v];zt(w!=null,`Previous layout not found for panel index ${v}`);const S=w+g,_=Ku({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:w,size:S});if(f[v]=_,!Zn(_,S)){let k=S-_,T=e<0?p:h;for(;T>=0&&T<n.length;){const A=f[T];zt(A!=null,`Previous layout not found for panel index ${T}`);const D=A+k,O=Ku({overrideDisabledPanels:a,panelConstraints:n[T],prevSize:A,size:D});if(Zn(A,O)||(k-=O-A,f[T]=O),Zn(k,0))break;e>0?T--:T++}}}const y=Object.values(f).reduce((v,w)=>w+v,0);if(!Zn(y,100,.1))return i;const b=Object.keys(i);return f.reduce((v,w,S)=>(v[b[S]]=w,v),{})}function Pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Vi(e[n],t[n])!==0)return!1;return!0}function Ll({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(!Zn(i,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];zt(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];zt(c!=null,`No layout data found for index ${u}`);const f=r[u];zt(f!=null,`No layout data found for index ${u}`);const h=Ku({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});f!=h&&(o+=f-h,r[u]=h)}if(!Zn(o,0))for(let u=0;u<t.length;u++){const c=r[u];zt(c!=null,`No layout data found for index ${u}`);const f=c+o,h=Ku({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[u]=h,Zn(o,0)))break}const a=Object.keys(e);return r.reduce((u,c,f)=>(u[a[f]]=c,u),{})}function nI({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=nr();for(const[c,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:g}]of u)if(c.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:c,layout:p,separatorToPanels:g};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:g,separatorToPanels:y}=n(),b=p.panels.findIndex(_=>_.id===t),v=b===p.panels.length-1,w=Gd({delta:v?c-u:u-c,initialLayout:g,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:g,trigger:"imperative-api"}),S=Ll({layout:w,panelConstraints:h});Pl(g,S)||rr(_=>({mountedGroups:new Map(_.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:S,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 g=h.expandToSize??f;g===0&&(g=1),a(g)}},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&&Zn(c,f)},resize:u=>{if(o()!==u){let c;switch(typeof u){case"number":{const{group:f}=n(),h=Ic({group:f});c=Mi(u/h*100);break}case"string":{c=parseFloat(u);break}}a(c)}}}}function oD(e){if(e.defaultPrevented)return;const{mountedGroups:t}=nr();iC(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=nI({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function Hm(e){const{mountedGroups:t}=nr();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 rI({groupId:e}){const t=()=>{const{mountedGroups:n}=nr();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=Ll({layout:n,panelConstraints:i});if(r)return a;if(!Pl(a,c)){rr(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 iI(e){const{mountedGroups:t}=nr(),n=t.get(e);return zt(n,`Mounted Group ${e.id} not found`),n}function Za(e,t){const n=Hm(e),r=iI(n),i=n.separators.find(h=>h.element===e);zt(i,"Matching separator not found");const o=r.separatorToPanels.get(i);zt(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),u=rI({groupId:n.id}).getLayout(),c=Gd({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:u,trigger:"keyboard"}),f=Ll({layout:c,panelConstraints:r.derivedPanelConstraints});Pl(u,f)||rr(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function sD(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Hm(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Za(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Za(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Za(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Za(t,-5);break}case"End":{e.preventDefault(),Za(t,100);break}case"Enter":{e.preventDefault();const r=Hm(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=iI(r),u=r.separators.find(p=>p.element===t);zt(u,"Matching separator not found");const c=a.get(u);zt(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(zt(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],g=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;Za(t,g-p)}break}case"F6":{e.preventDefault();const r=Hm(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);zt(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(),Za(t,-100);break}}}function aD(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=nr(),n=iC(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)}),rr({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const Qse=e=>e,c1=()=>{},oI=1,sI=2,aI=4,lI=8,lD=3,uD=12;let mm;function cD(){return mm===void 0&&(mm=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(mm=!0)),mm}function Zse({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&&cD()){const o=(e&oI)!==0,a=(e&sI)!==0,u=(e&aI)!==0,c=(e&lI)!==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 cD()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const fD=new WeakMap;function oC(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=fD.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=nr();switch(i.state){case"active":case"hover":{const o=Zse({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}}fD.set(e,{prevStyle:t,styleSheet:n})}function uI({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:g}=h,{disableCursor:y,orientation:b,panels:v}=p;let w=0;o?b==="horizontal"?w=(t.clientX-o.x)/g*100:w=(t.clientY-o.y)/g*100:b==="horizontal"?w=t.clientX<0?-100:100:w=t.clientY<0?-100:100;const S=r.get(p),{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:T,separatorToPanels:A}=i.get(p)??{defaultLayoutDeferred:!1};if(k&&S&&T&&A){const D=Gd({delta:w,initialLayout:S,panelConstraints:k,pivotIndices:h.panels.map(O=>v.indexOf(O)),prevLayout:T,trigger:"mouse-or-touch"});if(Pl(D,T)){if(w!==0&&!y)switch(b){case"horizontal":{u|=w<0?oI:sI;break}case"vertical":{u|=w<0?aI:lI;break}}}else{c.set(h.group,{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:D,separatorToPanels:A});const O=h.group.panels.map(({id:N})=>N).join(",");h.group.inMemoryLayouts[O]=D}}});let f=0;t.movementX===0?f|=a&lD:f|=u&lD,t.movementY===0?f|=a&uD:f|=u&uD,rr({cursorFlags:f,mountedGroups:c}),oC(e)}function dD(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=nr();n.state==="active"&&uI({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function hD(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=nr();switch(n.state){case"active":{if(e.buttons===0){rr(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),rr(i=>({mountedGroups:new Map(i.mountedGroups)}));return}uI({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=iC(e,r);i.length===0?n.state!=="inactive"&&rr({interactionState:{state:"inactive"}}):rr({interactionState:{hitRegions:i,state:"hover"}}),oC(e.currentTarget);break}}}function pD(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=nr();t.state==="hover"&&rr({interactionState:{state:"inactive"}})}}function mD(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=nr();t.state==="active"&&(rr({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(oC(e.currentTarget),rr(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function gD(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=Mi(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=Mi((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function Jse(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=Ic({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,u={asPercentage:Mi(o/i*100),inPixels:o};r.mutableValues.prevSize=u,r.onResize(u,r.id,a)}function eae(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 tae(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 Fu=new Map;function nae(e){let t=!0;zt(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:w,target:S}=v;if(S===e.element){if(t){if(Ic({group:e})===0)return;rr(_=>{const k=_.mountedGroups.get(e);if(k){const T=iw(e),A=k.defaultLayoutDeferred?gD(T):k.layout,D=Ll({layout:A,panelConstraints:T});return!k.defaultLayoutDeferred&&Pl(A,D)&&eae(k.derivedPanelConstraints,T)?_:{mountedGroups:new Map(_.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,layout:D,separatorToPanels:k.separatorToPanels})}}return _})}}else Jse(e,S,w)}});o.observe(e.element),e.panels.forEach(b=>{zt(!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=Ic({group:e}),u=iw(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(tae(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??gD(u),p=Ll({layout:h,panelConstraints:u}),g=eI(e),y=e.element.ownerDocument;return rr(b=>{const v=new Map;return Fu.set(y,(Fu.get(y)??0)+1),g.forEach(w=>{w.separator&&v.set(w.separator,w.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:u,layout:p,separatorToPanels:v})}}),e.separators.forEach(b=>{zt(!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",sD)}),Fu.get(y)===1&&(y.addEventListener("dblclick",oD,!0),y.addEventListener("pointerdown",aD,!0),y.addEventListener("pointerleave",dD),y.addEventListener("pointermove",hD),y.addEventListener("pointerout",pD),y.addEventListener("pointerup",mD,!0)),function(){t=!1,Fu.set(y,Math.max(0,(Fu.get(y)??0)-1)),rr(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",sD)}),Fu.get(y)||(y.removeEventListener("dblclick",oD,!0),y.removeEventListener("pointerdown",aD,!0),y.removeEventListener("pointerleave",dD),y.removeEventListener("pointermove",hD),y.removeEventListener("pointerout",pD),y.removeEventListener("pointerup",mD,!0)),o.disconnect()}}function rae(){const[e,t]=C.useState({}),n=C.useCallback(()=>t({}),[]);return[e,n]}function sC(e){const t=C.useId();return`${e??t}`}const Vl=typeof window<"u"?C.useLayoutEffect:C.useEffect;function xd(e){const t=C.useRef(e);return Vl(()=>{t.current=e},[e]),C.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function aC(...e){return xd(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function lC(e){const t=C.useRef({...e});return Vl(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const cI=C.createContext(null);function iae(e,t){const n=C.useRef({getLayout:()=>({}),setLayout:Qse});C.useImperativeHandle(t,()=>n.current,[]),Vl(()=>{Object.assign(n.current,rI({groupId:e}))})}function fI({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:g,...y}){const b=C.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=xd(L=>{Pl(b.current.onLayoutChange,L)||(b.current.onLayoutChange=L,c==null||c(L))}),w=xd(L=>{Pl(b.current.onLayoutChanged,L)||(b.current.onLayoutChanged=L,f==null||f(L))}),S=sC(u),_=C.useRef(null),[k,T]=rae(),A=C.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),D=aC(_,o);iae(S,a);const O=xd((L,M)=>{const{interactionState:B,mountedGroups:q}=nr();for(const F of q.keys())if(F.id===L){const j=q.get(F);if(j){let z=!1;return B.state==="active"&&(z=B.hitRegions.some(V=>V.group===F)),{flexGrow:j.layout[M]??1,pointerEvents:z?"none":void 0}}}return{flexGrow:(n==null?void 0:n[M])??1}}),N=lC({defaultLayout:n,disableCursor:r}),H=C.useMemo(()=>({get disableCursor(){return!!N.disableCursor},getPanelStyles:O,id:S,orientation:h,registerPanel:L=>{const M=A.current;return M.panels=ow(h,[...M.panels,L]),T(),()=>{M.panels=M.panels.filter(B=>B!==L),T()}},registerSeparator:L=>{const M=A.current;return M.separators=ow(h,[...M.separators,L]),T(),()=>{M.separators=M.separators.filter(B=>B!==L),T()}},togglePanelDisabled:(L,M)=>{const B=A.current.panels.find(F=>F.id===L);B&&(B.panelConstraints.disabled=M);const{mountedGroups:q}=nr();for(const F of q.keys())if(F.id===S){const j=q.get(F);j&&(j.derivedPanelConstraints=iw(F))}},toggleSeparatorDisabled:(L,M)=>{const B=A.current.separators.find(q=>q.id===L);B&&(B.disabled=M)}}),[O,S,T,h,N]),I=C.useRef(null);return Vl(()=>{const L=_.current;if(L===null)return;const M=A.current;let B;if(N.defaultLayout!==void 0&&Object.keys(N.defaultLayout).length===M.panels.length){B={};for(const W of M.panels){const P=N.defaultLayout[W.id];P!==void 0&&(B[W.id]=P)}}const q={defaultLayout:B,disableCursor:!!N.disableCursor,disabled:!!i,element:L,id:S,inMemoryLastExpandedPanelSizes:A.current.lastExpandedPanelSizes,inMemoryLayouts:A.current.layouts,orientation:h,panels:M.panels,resizeTargetMinimumSize:M.resizeTargetMinimumSize,separators:M.separators};I.current=q;const F=nae(q),j=nr().mountedGroups.get(q);if(j){const{defaultLayoutDeferred:W,derivedPanelConstraints:P,layout:Y}=j;!W&&P.length>0&&(v(Y),w(Y))}const z=Yo.addListener("interactionStateChange",W=>{W.state}),V=Yo.addListener("mountedGroupsChange",W=>{const P=W.get(q);if(P){const{defaultLayoutDeferred:Y,derivedPanelConstraints:J,layout:U}=P;if(Y||J.length===0)return;const{interactionState:se}=nr(),oe=se.state!=="active";v(U),oe&&w(U)}});return()=>{I.current=null,F(),z(),V()}},[i,S,w,v,h,k,N]),C.useEffect(()=>{const L=I.current;L&&(L.defaultLayout=n,L.disableCursor=!!r)}),R.jsx(cI.Provider,{value:H,children:R.jsx("div",{...y,className:t,"data-group":!0,"data-testid":S,id:S,ref:D,style:{height:"100%",width:"100%",overflow:"hidden",...g,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:h==="horizontal"?"pan-y":"pan-x"},children:e})})}fI.displayName="Group";function uC(){const e=C.useContext(cI);return zt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function oae(e,t){const{id:n}=uC(),r=C.useRef({collapse:c1,expand:c1,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:c1});C.useImperativeHandle(t,()=>r.current,[]),Vl(()=>{Object.assign(r.current,nI({groupId:n,panelId:e}))})}function dI({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:g,...y}){const b=!!u,v=sC(u),w=lC({disabled:o}),S=C.useRef(null),_=aC(S,a),{getPanelStyles:k,id:T,orientation:A,registerPanel:D,togglePanelDisabled:O}=uC(),N=h!==null,H=xd((L,M,B)=>{h==null||h(L,u,B)});Vl(()=>{const L=S.current;if(L!==null){const M={element:L,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:N?H:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:w.disabled,maxSize:c,minSize:f}};return D(M)}},[n,r,i,N,v,b,c,f,H,D,w]),C.useEffect(()=>{O(v,!!o)},[o,v,O]),oae(v,p);const I=C.useSyncExternalStore(L=>(Yo.addListener("mountedGroupsChange",L),()=>{Yo.removeListener("mountedGroupsChange",L)}),()=>JSON.stringify(k(T,v)),()=>JSON.stringify(k(T,v)));return R.jsx("div",{...y,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:_,style:{...sae,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(I)},children:R.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...g,touchAction:A==="horizontal"?"pan-y":"pan-x"},children:e})})}dI.displayName="Panel";const sae={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function aae({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=Ll({layout:Gd({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Ll({layout:Gd({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function hI({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const u=sC(i),c=lC({disabled:n}),[f,h]=C.useState({}),[p,g]=C.useState("inactive"),y=C.useRef(null),b=aC(y,r),{disableCursor:v,id:w,orientation:S,registerSeparator:_,toggleSeparatorDisabled:k}=uC(),T=S==="horizontal"?"vertical":"horizontal";Vl(()=>{const D=y.current;if(D!==null){const O={disabled:c.disabled,element:D,id:u},N=_(O),H=Yo.addListener("interactionStateChange",L=>{g(L.state!=="inactive"&&L.hitRegions.some(M=>M.separator===O)?L.state:"inactive")}),I=Yo.addListener("mountedGroupsChange",L=>{L.forEach(({derivedPanelConstraints:M,layout:B,separatorToPanels:q},F)=>{if(F.id===w){const j=q.get(O);if(j){const z=j[0],V=F.panels.indexOf(z);h(aae({layout:B,panelConstraints:M,panelId:z.id,panelIndex:V}))}}})});return()=>{H(),I(),N()}}},[w,u,_,c]),C.useEffect(()=>{k(u,!!n)},[n,u,k]);let A;return n&&!v&&(A="not-allowed"),R.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})}hI.displayName="Separator";const lae="_resizable_wu6fv_1",Fg={resizable:lae,"resizable-panel":"_resizable-panel_wu6fv_15","resizable-handle":"_resizable-handle_wu6fv_19 _disabled_dkczp_2","resizable-handle-grip":"_resizable-handle-grip_wu6fv_45"},pI=({direction:e,className:t,children:n,...r})=>R.jsx(fI,{"data-slot":"resizable","data-direction":e,orientation:e,className:ze(Fg.resizable,t),...r,children:n});pI.displayName="Resizable";const mI=({withHandle:e,className:t,children:n,disabled:r,...i})=>R.jsx(hI,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:ze(Fg["resizable-handle"],t),...i,children:n??(e!==!1&&R.jsx("div",{className:Fg["resizable-handle-grip"],children:R.jsx(BU,{size:10})}))});mI.displayName="ResizableHandle";const sw=({className:e,children:t,...n})=>R.jsx(dI,{"data-slot":"resizable-panel",className:ze(Fg["resizable-panel"],e),...n,children:t});sw.displayName="ResizablePanel";const gI=({children:e,...t})=>R.jsx(Go,{render:R.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});gI.displayName="BreadcrumbsContainer";const uae={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},yI=({className:e,...t})=>R.jsx("ol",{"data-slot":"breadcrumbs-list",className:ze(uae["breadcrumbs-list"],e),...t});yI.displayName="BreadcrumbsList";const cae={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},bI=({className:e,...t})=>R.jsx("li",{"data-slot":"breadcrumbs-item",className:ze(cae["breadcrumbs-item"],e),...t});bI.displayName="BreadcrumbsItem";const vI=({children:e,...t})=>R.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??"/"});vI.displayName="BreadcrumbsSeparator";const cC=({items:e,linkAs:t="a",...n})=>R.jsx(gI,{"data-slot":"breadcrumbs",...n,children:R.jsx(yI,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,u=R.jsxs(yi,{condition:!!a,render:R.jsx(Ke,{gap:1,ay:"center"}),children:[a&&R.jsx(a,{size:14}),r.label]});return R.jsxs(C.Fragment,{children:[R.jsx(bI,{children:o?u:R.jsx(t,{href:r.value,children:u})}),!o&&R.jsx(vI,{})]},r.value)})})});cC.displayName="Breadcrumbs";const Qc={"table-cell":"_table-cell_1essx_3","table-container":"_table-container_1essx_12","table-head":"_table-head_1essx_16","table-header":"_table-header_1essx_27","table-root":"_table-root_1essx_36","table-row":"_table-row_1essx_45"},xI=({children:e,className:t,...n})=>R.jsx(dn,{"data-slot":"table-container",className:ze(Qc["table-container"],t),ax:"stretch",p:0,fullwidth:!0,InnerContainerProps:{my:0},...n,children:e});xI.displayName="TableContainer";const wI=({striped:e,bordered:t,highlightOnHover:n,className:r,children:i,...o})=>R.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,"data-hover":n,className:ze(Qc["table-root"],r),...o,children:i});wI.displayName="TableRoot";const SI=({className:e,...t})=>R.jsx("thead",{"data-slot":"table-header",className:ze(Qc["table-header"],e),...t});SI.displayName="TableHeader";const CI=({className:e,render:t=R.jsx("tr",{}),...n})=>R.jsx(Go,{"data-slot":"table-row",className:ze(Qc["table-row"],e),render:t,...n});CI.displayName="TableRow";const EI=({className:e,collapse:t,...n})=>R.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:ze(Qc["table-cell"],e),...n});EI.displayName="TableCell";const kI=({className:e,collapse:t,...n})=>R.jsx("th",{"data-slot":"table-head","data-collapse":t,className:ze(Qc["table-head"],e),...n});kI.displayName="TableHead";const RI=({...e})=>R.jsx("tbody",{"data-slot":"table-body",...e});RI.displayName="TableBody";const fae="bertrand:apiBase";function dae(){if(typeof window<"u")try{const e=window.localStorage.getItem(fae);if(e)return e.replace(/\/$/,"")}catch{}return""}function fC(e){return`${dae()}${e}`}async function Yl(e){const t=await fetch(fC(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class _I extends Error{constructor(n,r){super(n);ne(this,"reason");this.name="ArchiveError",this.reason=r}}async function TI(e,t){const n=await fetch(fC(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new _I(r.error??n.statusText,r.reason??"unknown")}return n.json()}const yD=e=>TI(e,"archive"),bD=e=>TI(e,"unarchive"),qd=(e={})=>({queryKey:["sessions",{includeArchived:!!e.includeArchived}],queryFn:()=>Yl(e.includeArchived?"/api/sessions?excludeArchived=false":"/api/sessions"),refetchInterval:2e3,placeholderData:zc}),hae={queryKey:["worktrees"],queryFn:()=>Yl("/api/worktrees"),refetchInterval:2e3,placeholderData:zc},pae=(e,t=!1)=>({queryKey:["events",e],queryFn:()=>Yl(`/api/events/${e}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:zc}),mae=(e,t=!1)=>({queryKey:["stats",e],queryFn:()=>Yl(`/api/stats/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:zc}),gae=(e=!1)=>({queryKey:["stats"],queryFn:()=>Yl("/api/stats"),refetchInterval:e?2e3:!1,placeholderData:zc}),yae=(e,t=!1)=>({queryKey:["engagement",e],queryFn:()=>Yl(`/api/engagement/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:zc}),AI={queryKey:["projects"],queryFn:()=>Yl("/api/projects"),refetchInterval:5e3};async function bae(e){const t=await fetch(fC("/api/active-project"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:e})});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error??`${t.status} ${t.statusText}`)}}const vae={"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 f1(e){return e instanceof _I?vae[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function DI(e){const t=Gg(),n=OO(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?yD:bD)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${f1(p)}`,priority:"high"})}),o=(f,h)=>{let p;const g=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:R.jsxs(Ke,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[R.jsxs(Pe,{children:[f," ",R.jsx("code",{children:e.slug})]}),R.jsx(es,{size:"small",onClick:g,children:"Undo"})]})})},a=qR({mutationFn:()=>yD(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${f1(f)}`,priority:"high"})}),u=qR({mutationFn:()=>bD(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${f1(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:sU,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:lU,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const xae={"claude.started":{category:"lifecycle",color:"blue",label:"session started",icon:fH},"claude.ended":{category:"lifecycle",color:"blue",label:"ended",icon:vU},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded",icon:kU},"session.waiting":{category:"interaction",color:"green",label:"waiting",icon:CU},"session.answered":{category:"interaction",color:"green",label:"Q&A",icon:JU},"user.prompt":{category:"interaction",color:"green",label:"prompt",icon:QU},"tool.work":{category:"work",color:"yellow",label:"tool work",icon:Y3},"tool.applied":{category:"work",color:"yellow",label:"applied",icon:uH},"tool.used":{category:"work",color:"yellow",label:"tool",icon:wH},"assistant.message":{category:"assistant",color:"indigo",label:"assistant",icon:mH}},wae={category:"lifecycle",color:"neutral",label:"unknown",icon:wU};function $y(e){return xae[e]??wae}function Sae(e){return $y(e).category}function Cae(e){return $y(e).color}function MI(e){return $y(e).label}function Eae(e){return $y(e).icon}const kae={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function Ny(e){return kae[e]}function d1(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 dC(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 OI=Cae,Rae=MI,_ae=Eae;function gm(e){return e?e.split(`
|
|
500
|
+
`).length:0}function Tae(e){return e.split("/").filter(Boolean).pop()??e}function Aae(e){const t=e.permissions;if(!t||t.length===0)return null;const n=new Set;let r=0,i=0,o=0;for(const u of t)if(u.detail&&n.add(u.detail),u.edits&&u.edits.length>0){r+=u.edits.length;for(const c of u.edits)o+=gm(c.oldStr),i+=gm(c.newStr)}else(u.oldStr||u.newStr)&&(r+=1,o+=gm(u.oldStr),i+=gm(u.newStr));if(n.size===0)return null;const a=i||o?` (+${i} -${o})`:"";if(n.size===1){const u=n.values().next().value,c=Tae(u);return r>1?`${r} edits to ${c}${a}`:`edited ${c}${a}`}return`edited ${n.size} files${a}`}function Dae(e){const t=Rae(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"tool.applied":return Aae(n)??t;default:return t}}function Mae(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const $I=()=>{var i;const e=Gg(),{data:t=[]}=gi(AI),n=t.find(o=>o.active),r=async o=>{if((n==null?void 0:n.slug)!==o){try{await bae(o)}catch(a){console.error("Project switch failed:",a);return}e.invalidateQueries()}};return t.length===0?null:t.length===1?R.jsxs(Ke,{ay:"center",gap:2,px:2,children:[R.jsx(Pe,{size:-1,shade:"muted",children:"project"}),R.jsx(Pe,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??((i=t[0])==null?void 0:i.name)??"default"})]}):R.jsxs(XS,{children:[R.jsx(QS,{render:R.jsx(es,{variant:"subtle",size:"small",fullwidth:!0,children:R.jsxs(Ke,{ay:"center",ax:"space-between",gap:2,fullwidth:!0,children:[R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(Pe,{size:-1,shade:"muted",children:"project"}),R.jsx(Pe,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??"—"})]}),R.jsx(yU,{size:14})]})})}),R.jsx(ZS,{children:R.jsx(eC,{side:"bottom",align:"start",children:R.jsx(tC,{children:t.map(o=>R.jsx(Ig,{onClick:()=>{r(o.slug)},children:R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(Pe,{size:-1,weight:o.active?"bold":"normal",children:o.name}),o.active&&R.jsx(Pe,{size:-1,shade:"muted",children:"(active)"})]})},o.slug))})})})]})};$I.displayName="ProjectSwitcher";const hC=({children:e,...t})=>R.jsx(Ye,{"data-slot":"sidebar",render:R.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});hC.displayName="SidebarWrapper";const Oae=["active","waiting","paused","archived"],$ae={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},Nae=["today","yesterday","thisWeek","earlier"],Pae={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"},Lae=1440*60*1e3;function Iae(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())/Lae);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function Fae(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 Oae.filter(i=>r.has(i)).map(i=>({key:i,category:$ae[i],sessions:r.get(i)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=Iae(o.session.startedAt,r),u=i.get(a);u?u.push(o):i.set(a,[o])}return Nae.filter(o=>i.has(o)).map(o=>({key:o,category:Pae[o],sessions:i.get(o)}))}const n=new Map;for(const r of e){const i=r.categoryPath,o=n.get(i);o?o.push(r):n.set(i,[r])}return Array.from(n,([r,i])=>({key:r,category:r,sessions:i}))}const NI=({WrapperProps:e})=>{const[t,n]=C.useState(""),[r,i]=C.useState("group"),[o,a]=C.useState(!1),u=C.useRef(null),{data:c=[]}=gi(qd({includeArchived:o})),f=C.useMemo(()=>{const h=t.trim().toLowerCase(),p=h?c.filter(g=>g.session.slug.toLowerCase().includes(h)||g.session.name.toLowerCase().includes(h)||g.categoryPath.toLowerCase().includes(h)):c;return Fae(p,r)},[c,t,r]);return C.useEffect(()=>{const h=p=>{var g,y;(p.metaKey||p.ctrlKey)&&p.key==="k"&&(p.preventDefault(),(g=u.current)==null||g.focus(),(y=u.current)==null||y.select())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[]),R.jsxs(hC,{...e,children:[R.jsx($I,{}),R.jsx(Ke,{ay:"center",gap:2,fullwidth:!0,children:R.jsx(oP,{ref:u,placeholder:"Search for a session",before:R.jsx(hH,{}),after:R.jsx(QO,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:h=>n(h.target.value)})}),R.jsxs(Ke,{ay:"center",ax:"space-between",gap:2,children:[R.jsxs(rC,{size:"sm",value:[r],onValueChange:h=>{const p=h[0];p&&i(p)},children:[R.jsx(lc,{value:"group","aria-label":"Group by group",children:R.jsx(kl,{trigger:R.jsx(HU,{}),children:"Group by group"})}),R.jsx(lc,{value:"status","aria-label":"Group by status",children:R.jsx(kl,{trigger:R.jsx(vH,{}),children:"Group by status"})}),R.jsx(lc,{value:"recent","aria-label":"Group by recent",children:R.jsx(kl,{trigger:R.jsx(G3,{}),children:"Group by recent"})})]}),R.jsx(Ke,{ay:"center",gap:1,children:R.jsx(uy,{size:"small",shape:"square",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:R.jsx($U,{}),pressed:R.jsx(PU,{})}})})]}),f.length===0?R.jsxs(Pe,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):R.jsx(Ye,{ax:"stretch",gap:3,fullwidth:!0,children:f.map(h=>R.jsx(PI,{group:h},h.key))})]})};NI.displayName="Sidebar";const PI=({group:e})=>R.jsxs(Ye,{"data-slot":"sidebar-list-section",ax:"stretch",gap:1,fullwidth:!0,children:[R.jsxs(Ke,{ay:"center",gap:2,py:1,fullwidth:!0,children:[R.jsx(Pe,{render:R.jsx("h3",{}),weight:"bold",size:0,children:e.category}),R.jsx(Pe,{size:-1,shade:"muted",children:e.sessions.length})]}),R.jsx(Tc,{"data-slot":"sidebar-list",marker:"none",ax:"stretch",gap:1,fullwidth:!0,children:e.sessions.map(t=>R.jsx(LI,{session:t},t.session.id))})]});PI.displayName="SessionGroupSection";const LI=({session:e})=>{const t=Ny(e.session.status),n=e.session.status==="archived";return R.jsx(vy,{"data-archived":n?"":void 0,style:n?{opacity:.4}:void 0,children:R.jsxs(Ye,{gap:1,fullwidth:!0,children:[R.jsxs(Ke,{ay:"center",ax:"space-between",gap:2,fullwidth:!0,children:[R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(sh,{color:t}),R.jsx(II,{session:e})]}),R.jsx(jI,{session:e.session,categoryPath:e.categoryPath})]}),R.jsx(FI,{session:e})]})})};LI.displayName="SessionListItem";const II=({session:e})=>R.jsx(jl,{to:"/$",params:{_splat:`${e.categoryPath}/${e.session.slug}`},children:e.session.slug});II.displayName="SessionLabel";const FI=({session:e})=>{const{data:t=[]}=gi(qd()),n=t.some(f=>f.session.status==="active"||f.session.status==="waiting"),{data:r}=gi(gae(n)),i=r==null?void 0:r[e.session.id],o=(i==null?void 0:i.linesAdded)??0,a=(i==null?void 0:i.linesRemoved)??0,u=(i==null?void 0:i.filesTouched)??0,c=o>0||a>0;return R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(Pe,{size:-1,shade:"muted",children:dC(e.session.startedAt)}),c&&R.jsxs(Ke,{ay:"center",gap:1,children:[R.jsx(Pe,{size:-1,family:"mono",color:"green",children:`+${o}`}),R.jsx(Pe,{size:-1,family:"mono",color:"red",children:`-${a}`})]}),u>0&&R.jsxs(Ke,{ay:"center",gap:1,children:[R.jsx(V3,{size:12}),R.jsx(Pe,{size:-1,family:"mono",shade:"muted",children:u})]}),e.session.rating!==null&&e.session.rating!==void 0&&R.jsx(Pe,{"aria-label":`Rated ${e.session.rating} of 5 stars`,children:[1,2,3,4,5].map(f=>f<=e.session.rating?"★":"☆").join("")})]})};FI.displayName="SessionContent";const jI=({session:e,categoryPath:t})=>{const n=DI(e),{Icon:r}=n,i=e.status==="paused",o=`${t}/${e.slug}`;return R.jsxs(XS,{children:[R.jsx(QS,{render:R.jsx(es,{variant:"ghost",size:"xsmall",shape:"square","aria-label":"Session actions",children:R.jsx(MU,{})})}),R.jsx(ZS,{children:R.jsx(eC,{side:"bottom",align:"end",children:R.jsxs(tC,{children:[R.jsxs(Ig,{disabled:n.disabled,onClick:n.onClick,render:R.jsx(Ke,{ay:"center",gap:2}),children:[R.jsx(r,{size:14}),n.label]}),R.jsxs(Ig,{disabled:!i,onClick:()=>{navigator.clipboard.writeText(o)},render:R.jsx(Ke,{ay:"center",gap:2}),children:[R.jsx(Bw,{size:14}),"Copy session path"]})]})})})]})};jI.displayName="SessionRowActions";const zI=({children:e,...t})=>R.jsx(Ke,{"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});zI.displayName="TopBarWrapper";const wd="uiid-theme";function jae(){return localStorage.getItem(wd)??"system"}function zae(e){const t=n=>{n.key===wd&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function Bae(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function Uae(){const e=C.useSyncExternalStore(zae,jae),t=C.useCallback(n=>{n==="system"?localStorage.removeItem(wd):localStorage.setItem(wd,n),Bae(n),window.dispatchEvent(new StorageEvent("storage",{key:wd,newValue:n}))},[]);return{theme:e,setTheme:t}}const BI=()=>{const{theme:e,setTheme:t}=Uae();return R.jsxs(rC,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[R.jsx(lc,{value:"light","aria-label":"Light mode",children:R.jsx(yH,{})}),R.jsx(lc,{value:"dark","aria-label":"Dark mode",children:R.jsx(oH,{})}),R.jsx(lc,{value:"system","aria-label":"System theme",children:R.jsx(rH,{})})]})};BI.displayName="ThemeToggle";const pC=({sessionCount:e})=>R.jsxs(zI,{children:[R.jsx(Pe,{size:2,weight:"bold",children:"bertrand"}),R.jsx(C.Activity,{mode:e?"visible":"hidden",children:R.jsxs(Qo,{color:"blue",children:[e," session(s)"]})}),R.jsxs(Ke,{gap:3,ay:"center",ml:"auto",children:[R.jsxs(Ke,{gap:2,ay:"center",children:[R.jsx(ym,{to:"/",tooltip:"Session timeline",icon:R.jsx(pU,{})}),R.jsx(ym,{to:"/worktrees",tooltip:"Worktrees",icon:R.jsx(jU,{})}),R.jsx(ym,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:R.jsx(dU,{})}),R.jsx(ym,{to:"/dev/diff",tooltip:"Diff viewer",icon:R.jsx(q3,{})})]}),R.jsx(BI,{})]})]});pC.displayName="TopBar";const ym=({to:e,tooltip:t,icon:n})=>R.jsx(es,{render:R.jsx(jl,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",shape:"square",children:n}),Zc=Y8({component:Hae});function Hae(){return u7({select:t=>t.location.pathname}).startsWith("/dev/")?R.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[R.jsx(pC,{}),R.jsx(Ye,{render:R.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:R.jsx(Dw,{})})]}):R.jsx(Gae,{})}function Gae(){const{data:e=[]}=gi(qd());return R.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[R.jsx(pC,{sessionCount:e.length}),R.jsxs(pI,{direction:"horizontal",children:[R.jsx(sw,{defaultSize:360,minSize:320,maxSize:540,children:R.jsx(NI,{})}),R.jsx(mI,{}),R.jsx(sw,{children:R.jsx(Ye,{render:R.jsx("main",{}),fullwidth:!0,fullheight:!0,children:R.jsx(Dw,{})})})]})]})}function qae(){const{data:e=[]}=gi(hae);return R.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[R.jsxs(Ye,{gap:2,children:[R.jsxs(Ke,{gap:2,ay:"center",children:[R.jsx(Pe,{size:3,weight:"bold",children:"Worktrees"}),e.length>0&&R.jsx(Qo,{color:"blue",children:e.length})]}),R.jsx(Pe,{size:2,shade:"muted",children:"Sessions currently working in an isolated git worktree."})]}),e.length===0?R.jsx(Pe,{size:1,shade:"muted",children:"No active worktrees. A session lands here once it enters one for git-bound work."}):R.jsx(Ye,{gap:1,fullwidth:!0,children:e.map(({session:t,categoryPath:n})=>{const r=Ny(t.status);return R.jsxs(Ke,{ay:"center",gap:3,py:2,px:2,bb:1,fullwidth:!0,children:[R.jsx(sh,{color:r}),R.jsxs(Ye,{gap:1,children:[R.jsx(Pe,{family:"mono",weight:"bold",children:t.worktreeBranch??"(unknown branch)"}),R.jsxs(Ke,{gap:2,ay:"center",children:[R.jsxs(Pe,{size:-1,shade:"muted",render:R.jsx(jl,{to:"/$",params:{_splat:`${n}/${t.slug}`}}),children:[n," / ",t.slug]}),R.jsxs(Pe,{size:-1,shade:"muted",children:["· ",dC(t.updatedAt)]})]}),t.worktreePath&&R.jsx(Pe,{size:-1,shade:"muted",family:"mono",children:t.worktreePath})]}),R.jsx(Qo,{color:r,ml:"auto",children:t.status})]},t.id)})})]})}const Vae=th("/worktrees")({component:qae}),Yae=e=>e.filter(t=>MI(t.event)!=="unknown"),Wae=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"){const a=e[i+1];if(a&&a.event==="session.answered"){const u=(r=o.meta)==null?void 0:r.question;t.push({...a,meta:{...a.meta,question:u}}),n.add(i),n.add(i+1);continue}}t.push(o)}return t};function jg(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function vD(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)??"auto"}}const UI={Bash:"ran",Edit:"edited",MultiEdit:"edited",Write:"wrote",Read:"read",Glob:"globbed",Grep:"grepped",WebFetch:"fetched",WebSearch:"searched",TodoWrite:"updated todos"},Kae={Bash:"commands",Edit:"files",MultiEdit:"files",Write:"files",Read:"files",Glob:"patterns",Grep:"patterns",WebFetch:"urls",WebSearch:"queries"},Xae=new Set(["Edit","MultiEdit","Write","Read"]);function Qae(e){return e.split("/").filter(Boolean).pop()??e}function xD(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}function Zae(e){const t=UI[e.tool]??e.tool;return e.detail?e.tool==="Bash"?`ran \`${xD(e.detail,60)}\``:Xae.has(e.tool)?`${t} ${Qae(e.detail)}`:`${t} ${xD(e.detail,60)}`:t}function Jae(e){const t=[];for(const[n,r]of e){const i=UI[n]??n;if(r===1)t.push(i);else{const o=Kae[n]??"calls";t.push(`${i} ${r} ${o}`)}}return t.join(", ")}const wD=new Set(["tool.used"]),ele=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(!wD.has(r.event)){t.push(r),n++;continue}const i=[];for(;n<e.length;){const f=e[n];if(!wD.has(f.event))break;i.push(f),n++}if(i.length===0)continue;const o=i.map(vD),a=o.some(f=>f.outcome==="approved"),u=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=u.get(h);if(p){p.count++;const g=[...jg(p),...jg(f)];g.length>0&&(p.edits=g,p.oldStr=void 0,p.newStr=void 0)}else u.set(h,{...f,count:1})}const c=[...u.values()];if(c.length<=1){const f=c[0]??vD(i[0]),h=Zae(f);t.push({...i[i.length-1],event:"tool.work",summary:h,meta:{...i[i.length-1].meta,permissions:c,outcome:a?"approved":"auto"}})}else{const f=new Map;for(const b of c)f.set(b.tool,(f.get(b.tool)??0)+b.count);const h=[...f.entries()].sort((b,v)=>v[1]-b[1]),p=Jae(h),g=new Date(i[0].createdAt).getTime(),y=new Date(i[i.length-1].createdAt).getTime();t.push({...i[0],event:"tool.work",summary:p,meta:{permissions:c,outcome:a?"approved":"auto"},createdAt:new Date((g+y)/2).toISOString()})}}return t},tle={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},nle=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 g of p)o.push(g)}const a=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=a.get(h),g=f.count??1;if(p){p.count+=g;const y=[...jg(p),...jg(f)];y.length>0&&(p.edits=y,p.oldStr=void 0,p.newStr=void 0)}else a.set(h,{...f,count:g})}const u=[...a.values()],c=i[i.length-1];t.push({...c,meta:{...c.meta,permissions:u}})}return t},rle=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:tle[i]??`${i} applied`}:t}),ile=[Yae,Wae,ele,nle,rle];function ole(e){return ile.reduce((t,n)=>n(t),e)}function SD(e,t){const n=e.replace(/^\/+|\/+$/g,"");return n.includes("/")?t.find(r=>`${r.categoryPath}/${r.session.slug}`===n)??null:null}const sle=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ale=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lle={};function CD(e,t){return(lle.jsx?ale:sle).test(e)}var ju={},h1,ED;function ule(){if(ED)return h1;ED=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=`
|
|
501
|
+
`,f="/",h="*",p="",g="comment",y="declaration";function b(w,S){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];S=S||{};var _=1,k=1;function T(q){var F=q.match(t);F&&(_+=F.length);var j=q.lastIndexOf(c);k=~j?q.length-j:k+q.length}function A(){var q={line:_,column:k};return function(F){return F.position=new D(q),H(),F}}function D(q){this.start=q,this.end={line:_,column:k},this.source=S.source}D.prototype.content=w;function O(q){var F=new Error(S.source+":"+_+":"+k+": "+q);if(F.reason=q,F.filename=S.source,F.line=_,F.column=k,F.source=w,!S.silent)throw F}function N(q){var F=q.exec(w);if(F){var j=F[0];return T(j),w=w.slice(j.length),F}}function H(){N(n)}function I(q){var F;for(q=q||[];F=L();)F!==!1&&q.push(F);return q}function L(){var q=A();if(!(f!=w.charAt(0)||h!=w.charAt(1))){for(var F=2;p!=w.charAt(F)&&(h!=w.charAt(F)||f!=w.charAt(F+1));)++F;if(F+=2,p===w.charAt(F-1))return O("End of comment missing");var j=w.slice(2,F-2);return k+=2,T(j),w=w.slice(F),k+=2,q({type:g,comment:j})}}function M(){var q=A(),F=N(r);if(F){if(L(),!N(i))return O("property missing ':'");var j=N(o),z=q({type:y,property:v(F[0].replace(e,p)),value:j?v(j[0].replace(e,p)):p});return N(a),z}}function B(){var q=[];I(q);for(var F;F=M();)F!==!1&&(q.push(F),I(q));return q}return H(),B()}function v(w){return w?w.replace(u,p):p}return h1=b,h1}var kD;function cle(){if(kD)return ju;kD=1;var e=ju&&ju.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ju,"__esModule",{value:!0}),ju.default=n;const t=e(ule());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 ju}var rd={},RD;function fle(){if(RD)return rd;RD=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 id,_D;function dle(){if(_D)return id;_D=1;var e=id&&id.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(cle()),n=fle();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,id=r,id}var hle=dle();const ple=bw(hle),HI=GI("end"),mC=GI("start");function GI(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 mle(e){const t=mC(e),n=HI(e);if(t&&n)return{start:t,end:n}}function Sd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?TD(e.position):"start"in e||"end"in e?TD(e):"line"in e||"column"in e?aw(e):""}function aw(e){return AD(e&&e.line)+":"+AD(e&&e.column)}function TD(e){return aw(e&&e.start)+"-"+aw(e&&e.end)}function AD(e){return e&&typeof e=="number"?e:1}class Wn 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=Sd(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}}Wn.prototype.file="";Wn.prototype.name="";Wn.prototype.reason="";Wn.prototype.message="";Wn.prototype.stack="";Wn.prototype.column=void 0;Wn.prototype.line=void 0;Wn.prototype.ancestors=void 0;Wn.prototype.cause=void 0;Wn.prototype.fatal=void 0;Wn.prototype.place=void 0;Wn.prototype.ruleId=void 0;Wn.prototype.source=void 0;const gC={}.hasOwnProperty,gle=new Map,yle=/[A-Z]/g,ble=new Set(["table","tbody","thead","tfoot","tr"]),vle=new Set(["td","th"]),qI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xle(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=Tle(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=_le(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"?uh:L$,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=VI(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function VI(e,t,n){if(t.type==="element")return wle(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Sle(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ele(e,t,n);if(t.type==="mdxjsEsm")return Cle(e,t);if(t.type==="root")return kle(e,t,n);if(t.type==="text")return Rle(e,t)}function wle(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=uh,e.schema=i),e.ancestors.push(t);const o=WI(e,t.tagName,!1),a=Ale(e,t);let u=bC(e,t);return ble.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!fy(c):!0})),YI(e,a,o,t),yC(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Sle(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)}Vd(e,t.position)}function Cle(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vd(e,t.position)}function Ele(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=uh,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:WI(e,t.name,!0),a=Dle(e,t),u=bC(e,t);return YI(e,a,o,t),yC(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function kle(e,t,n){const r={};return yC(r,bC(e,t)),e.create(t,e.Fragment,r,n)}function Rle(e,t){return t.value}function YI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _le(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 Tle(e,t){return n;function n(r,i,o,a){const u=Array.isArray(o.children),c=mC(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 Ale(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&gC.call(t.properties,i)){const o=Mle(e,i,t.properties[i]);if(o){const[a,u]=o;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&vle.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 Dle(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 Vd(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 Vd(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function bC(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gle;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=VI(e,o,a);u!==void 0&&n.push(u)}return n}function Mle(e,t,n){const r=P$(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?F$(n):j$(n)),r.property==="style"){let i=typeof n=="object"?n:Ole(e,String(n));return e.stylePropertyNameCase==="css"&&(i=$le(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?rX[r.property]||r.property:r.attribute,n]}}function Ole(e,t){try{return ple(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Wn("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=qI+"#cannot-parse-style-attribute",i}}function WI(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=CD(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=CD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return gC.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Vd(e)}function Vd(e,t){const n=new Wn("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=qI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $le(e){const t={};let n;for(n in e)gC.call(e,n)&&(t[Nle(n)]=e[n]);return t}function Nle(e){let t=e.replace(yle,Ple);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ple(e){return"-"+e.toLowerCase()}const p1={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"]},Lle={};function vC(e,t){const n=Lle,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return KI(e,r,i)}function KI(e,t,n){if(Ile(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 DD(e.children,t,n)}return Array.isArray(e)?DD(e,t,n):""}function DD(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=KI(e[i],t,n);return r.join("")}function Ile(e){return!!(e&&typeof e=="object")}const MD=document.createElement("i");function xC(e){const t="&"+e+";";MD.innerHTML=t;const n=MD.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zr(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 ui(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}const OD={}.hasOwnProperty;function XI(e){const t={};let n=-1;for(;++n<e.length;)Fle(t,e[n]);return t}function Fle(e,t){let n;for(n in t){const i=(OD.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){OD.call(i,a)||(i[a]=[]);const u=o[a];jle(i[a],Array.isArray(u)?u:u?[u]:[])}}}function jle(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zr(e,0,0,r)}function QI(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 $i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const er=Ea(/[A-Za-z]/),Vn=Ea(/[\dA-Za-z]/),zle=Ea(/[#-'*+\--9=?A-Z^-~]/);function zg(e){return e!==null&&(e<32||e===127)}const lw=Ea(/\d/),Ble=Ea(/[\dA-Fa-f]/),Ule=Ea(/[!-/:-@[-`{-~]/);function Qe(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function vt(e){return e===-2||e===-1||e===32}const Py=Ea(new RegExp("\\p{P}|\\p{S}","u")),Il=Ea(/\s/);function Ea(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Vn(e.charCodeAt(n+1))&&Vn(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 vt(c)?(e.enter(n),u(c)):t(c)}function u(c){return vt(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const Hle={tokenize:Gle};function Gle(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 Qe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),a)}}const qle={tokenize:Vle},$D={tokenize:Yle};function Vle(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}S(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...D},O++;return zr(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 g(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($D,h,p)(k)}function h(k){return i&&_(),S(r),g(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(k)}function g(k){return t.containerState={},e.attempt($D,y,b)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function b(k){if(k===null){i&&_(),S(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){w(e.exit("chunkFlow"),!0),S(0),e.consume(k);return}return Qe(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),v)}function w(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 N=O,H,I;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(H){I=t.events[N][1].end;break}H=!0}for(S(r),D=O;D<t.events.length;)t.events[D][1].end={...I},D++;zr(t.events,N+1,0,t.events.slice(O)),t.events.length=D}}function S(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 Yle(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 Fc(e){if(e===null||Vt(e)||Il(e))return 1;if(Py(e))return 2}function Ly(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 uw={name:"attention",resolveAll:Wle,tokenize:Kle};function Wle(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},g={...e[n][1].start};ND(p,-c),ND(g,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:g},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=ui(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ui(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=ui(f,Ly(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ui(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=ui(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,zr(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 Kle(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fc(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=Fc(c),p=!h||h===2&&i||n.includes(c),g=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?p:p&&(i||!g)),f._close=!!(o===42?g:g&&(h||!p)),t(c)}}function ND(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Xle={name:"autolink",tokenize:Qle};function Qle(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 er(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Vn(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||Vn(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||zg(y)?n(y):(e.consume(y),c)}function f(y){return y===64?(e.consume(y),h):zle(y)?(e.consume(y),f):n(y)}function h(y){return Vn(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):g(y)}function g(y){if((y===45||Vn(y))&&r++<63){const b=y===45?g:p;return e.consume(y),b}return n(y)}}const yh={partial:!0,tokenize:Zle};function Zle(e,t,n){return r;function r(o){return vt(o)?_t(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Qe(o)?t(o):n(o)}}const ZI={continuation:{tokenize:eue},exit:tue,name:"blockQuote",tokenize:Jle};function Jle(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 vt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function eue(e,t,n){const r=this;return i;function i(a){return vt(a)?_t(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(ZI,t,n)(a)}}function tue(e){e.exit("blockQuote")}const JI={name:"characterEscape",tokenize:nue};function nue(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 Ule(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const e6={name:"characterReference",tokenize:rue};function rue(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=Vn,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=Ble,h):(e.enter("characterReferenceValue"),o=7,a=lw,h(p))}function h(p){if(p===59&&i){const g=e.exit("characterReferenceValue");return a===Vn&&!xC(r.sliceSerialize(g))?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 PD={partial:!0,tokenize:oue},LD={concrete:!0,name:"codeFenced",tokenize:iue};function iue(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"),vt(D)?_t(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Qe(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(PD,v,T)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===null||Qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):vt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_t(e,y,"whitespace")(D)):D===96&&D===u?n(D):(e.consume(D),g)}function y(D){return D===null||Qe(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Qe(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,w)(D)}function w(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return o>0&&vt(D)?_t(e,_,"linePrefix",o+1)(D):_(D)}function _(D){return D===null||Qe(D)?e.check(PD,v,T)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||Qe(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),k)}function T(D){return e.exit("codeFenced"),t(D)}function A(D,O,N){let H=0;return I;function I(F){return D.enter("lineEnding"),D.consume(F),D.exit("lineEnding"),L}function L(F){return D.enter("codeFencedFence"),vt(F)?_t(D,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):M(F)}function M(F){return F===u?(D.enter("codeFencedFenceSequence"),B(F)):N(F)}function B(F){return F===u?(H++,D.consume(F),B):H>=a?(D.exit("codeFencedFenceSequence"),vt(F)?_t(D,q,"whitespace")(F):q(F)):N(F)}function q(F){return F===null||Qe(F)?(D.exit("codeFencedFence"),O(F)):N(F)}}}function oue(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 m1={name:"codeIndented",tokenize:aue},sue={partial:!0,tokenize:lue};function aue(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):Qe(f)?e.attempt(sue,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Qe(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function lue(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Qe(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):Qe(a)?i(a):n(a)}}const uue={name:"codeText",previous:fue,resolve:cue,tokenize:due};function cue(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 fue(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function due(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)):Qe(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||Qe(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 hue{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&&od(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),od(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),od(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);od(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);od(this.left,n.reverse())}}}function od(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 t6(e){const t={};let n=-1,r,i,o,a,u,c,f;const h=new hue(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,pue(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 zr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function pue(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,g=-1,y=n,b=0,v=0;const w=[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;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(v=g+1,w.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):w.pop(),g=w.length;g--;){const S=u.slice(w[g],w[g+1]),_=o.pop();c.push([_,_+S.length-1]),e.splice(_,2,S)}for(c.reverse(),g=-1;++g<c.length;)f[b+c[g][0]]=b+c[g][1],b+=c[g][1]-c[g][0]-1;return f}const mue={resolve:yue,tokenize:bue},gue={partial:!0,tokenize:vue};function yue(e){return t6(e),e}function bue(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):Qe(u)?e.check(gue,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 vue(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||Qe(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 n6(e,t,n,r,i,o,a,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(S){return S===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(S),e.exit(o),g):S===null||S===32||S===41||zg(S)?n(S):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(S))}function g(S){return S===62?(e.enter(o),e.consume(S),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(u),g(S)):S===null||S===60||Qe(S)?n(S):(e.consume(S),S===92?b:y)}function b(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!h&&(S===null||S===41||Vt(S))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(S)):h<f&&S===40?(e.consume(S),h++,v):S===41?(e.consume(S),h--,v):S===null||S===32||S===40||zg(S)?n(S):(e.consume(S),S===92?w:v)}function w(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function r6(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):Qe(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||Qe(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),c||(c=!vt(y)),y===92?g:p)}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function i6(e,t,n,r,i,o){let a;return u;function u(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),a=g===40?41:g,c):n(g)}function c(g){return g===a?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),f(g))}function f(g){return g===a?(e.exit(o),c(a)):g===null?n(g):Qe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_t(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===a||g===null||Qe(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?p:h)}function p(g){return g===a||g===92?(e.consume(g),h):h(g)}}function Cd(e,t){let n;return r;function r(i){return Qe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):vt(i)?_t(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xue={name:"definition",tokenize:Sue},wue={partial:!0,tokenize:Cue};function Sue(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return r6.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return i=$i(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 Vt(y)?Cd(e,f)(y):f(y)}function f(y){return n6(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(wue,p,p)(y)}function p(y){return vt(y)?_t(e,g,"whitespace")(y):g(y)}function g(y){return y===null||Qe(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function Cue(e,t,n){return r;function r(u){return Vt(u)?Cd(e,i)(u):n(u)}function i(u){return i6(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return vt(u)?_t(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Qe(u)?t(u):n(u)}}const Eue={name:"hardBreakEscape",tokenize:kue};function kue(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Qe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Rue={name:"headingAtx",resolve:_ue,tokenize:Tue};function _ue(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"},zr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Tue(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||Vt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Qe(h)?(e.exit("atxHeading"),t(h)):vt(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||Vt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const Aue=["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"],ID=["pre","script","style","textarea"],Due={concrete:!0,name:"htmlFlow",resolveTo:$ue,tokenize:Nue},Mue={partial:!0,tokenize:Lue},Oue={partial:!0,tokenize:Pue};function $ue(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 Nue(e,t,n){const r=this;let i,o,a,u,c;return f;function f(U){return h(U)}function h(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),p}function p(U){return U===33?(e.consume(U),g):U===47?(e.consume(U),o=!0,v):U===63?(e.consume(U),i=3,r.interrupt?t:P):er(U)?(e.consume(U),a=String.fromCharCode(U),w):n(U)}function g(U){return U===45?(e.consume(U),i=2,y):U===91?(e.consume(U),i=5,u=0,b):er(U)?(e.consume(U),i=4,r.interrupt?t:P):n(U)}function y(U){return U===45?(e.consume(U),r.interrupt?t:P):n(U)}function b(U){const se="CDATA[";return U===se.charCodeAt(u++)?(e.consume(U),u===se.length?r.interrupt?t:M:b):n(U)}function v(U){return er(U)?(e.consume(U),a=String.fromCharCode(U),w):n(U)}function w(U){if(U===null||U===47||U===62||Vt(U)){const se=U===47,oe=a.toLowerCase();return!se&&!o&&ID.includes(oe)?(i=1,r.interrupt?t(U):M(U)):Aue.includes(a.toLowerCase())?(i=6,se?(e.consume(U),S):r.interrupt?t(U):M(U)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(U):o?_(U):k(U))}return U===45||Vn(U)?(e.consume(U),a+=String.fromCharCode(U),w):n(U)}function S(U){return U===62?(e.consume(U),r.interrupt?t:M):n(U)}function _(U){return vt(U)?(e.consume(U),_):I(U)}function k(U){return U===47?(e.consume(U),I):U===58||U===95||er(U)?(e.consume(U),T):vt(U)?(e.consume(U),k):I(U)}function T(U){return U===45||U===46||U===58||U===95||Vn(U)?(e.consume(U),T):A(U)}function A(U){return U===61?(e.consume(U),D):vt(U)?(e.consume(U),A):k(U)}function D(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),c=U,O):vt(U)?(e.consume(U),D):N(U)}function O(U){return U===c?(e.consume(U),c=null,H):U===null||Qe(U)?n(U):(e.consume(U),O)}function N(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Vt(U)?A(U):(e.consume(U),N)}function H(U){return U===47||U===62||vt(U)?k(U):n(U)}function I(U){return U===62?(e.consume(U),L):n(U)}function L(U){return U===null||Qe(U)?M(U):vt(U)?(e.consume(U),L):n(U)}function M(U){return U===45&&i===2?(e.consume(U),j):U===60&&i===1?(e.consume(U),z):U===62&&i===4?(e.consume(U),Y):U===63&&i===3?(e.consume(U),P):U===93&&i===5?(e.consume(U),W):Qe(U)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Mue,J,B)(U)):U===null||Qe(U)?(e.exit("htmlFlowData"),B(U)):(e.consume(U),M)}function B(U){return e.check(Oue,q,J)(U)}function q(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),F}function F(U){return U===null||Qe(U)?B(U):(e.enter("htmlFlowData"),M(U))}function j(U){return U===45?(e.consume(U),P):M(U)}function z(U){return U===47?(e.consume(U),a="",V):M(U)}function V(U){if(U===62){const se=a.toLowerCase();return ID.includes(se)?(e.consume(U),Y):M(U)}return er(U)&&a.length<8?(e.consume(U),a+=String.fromCharCode(U),V):M(U)}function W(U){return U===93?(e.consume(U),P):M(U)}function P(U){return U===62?(e.consume(U),Y):U===45&&i===2?(e.consume(U),P):M(U)}function Y(U){return U===null||Qe(U)?(e.exit("htmlFlowData"),J(U)):(e.consume(U),Y)}function J(U){return e.exit("htmlFlow"),t(U)}}function Pue(e,t,n){const r=this;return i;function i(a){return Qe(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 Lue(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yh,t,n)}}const Iue={name:"htmlText",tokenize:Fue};function Fue(e,t,n){const r=this;let i,o,a;return u;function u(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),c}function c(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),A):P===63?(e.consume(P),k):er(P)?(e.consume(P),N):n(P)}function f(P){return P===45?(e.consume(P),h):P===91?(e.consume(P),o=0,b):er(P)?(e.consume(P),_):n(P)}function h(P){return P===45?(e.consume(P),y):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),g):Qe(P)?(a=p,z(P)):(e.consume(P),p)}function g(P){return P===45?(e.consume(P),y):p(P)}function y(P){return P===62?j(P):P===45?g(P):p(P)}function b(P){const Y="CDATA[";return P===Y.charCodeAt(o++)?(e.consume(P),o===Y.length?v:b):n(P)}function v(P){return P===null?n(P):P===93?(e.consume(P),w):Qe(P)?(a=v,z(P)):(e.consume(P),v)}function w(P){return P===93?(e.consume(P),S):v(P)}function S(P){return P===62?j(P):P===93?(e.consume(P),S):v(P)}function _(P){return P===null||P===62?j(P):Qe(P)?(a=_,z(P)):(e.consume(P),_)}function k(P){return P===null?n(P):P===63?(e.consume(P),T):Qe(P)?(a=k,z(P)):(e.consume(P),k)}function T(P){return P===62?j(P):k(P)}function A(P){return er(P)?(e.consume(P),D):n(P)}function D(P){return P===45||Vn(P)?(e.consume(P),D):O(P)}function O(P){return Qe(P)?(a=O,z(P)):vt(P)?(e.consume(P),O):j(P)}function N(P){return P===45||Vn(P)?(e.consume(P),N):P===47||P===62||Vt(P)?H(P):n(P)}function H(P){return P===47?(e.consume(P),j):P===58||P===95||er(P)?(e.consume(P),I):Qe(P)?(a=H,z(P)):vt(P)?(e.consume(P),H):j(P)}function I(P){return P===45||P===46||P===58||P===95||Vn(P)?(e.consume(P),I):L(P)}function L(P){return P===61?(e.consume(P),M):Qe(P)?(a=L,z(P)):vt(P)?(e.consume(P),L):H(P)}function M(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),i=P,B):Qe(P)?(a=M,z(P)):vt(P)?(e.consume(P),M):(e.consume(P),q)}function B(P){return P===i?(e.consume(P),i=void 0,F):P===null?n(P):Qe(P)?(a=B,z(P)):(e.consume(P),B)}function q(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||Vt(P)?H(P):(e.consume(P),q)}function F(P){return P===47||P===62||Vt(P)?H(P):n(P)}function j(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function z(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return vt(P)?_t(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):W(P)}function W(P){return e.enter("htmlTextData"),a(P)}}const wC={name:"labelEnd",resolveAll:Uue,resolveTo:Hue,tokenize:Gue},jue={tokenize:que},zue={tokenize:Vue},Bue={tokenize:Yue};function Uue(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&&zr(e,0,e.length,n),e}function Hue(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=ui(u,e.slice(o+1,o+r+3)),u=ui(u,[["enter",h,t]]),u=ui(u,Ly(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),u=ui(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=ui(u,e.slice(a+1)),u=ui(u,[["exit",c,t]]),zr(e,o,e.length,u),e}function Gue(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(g){return o?o._inactive?p(g):(a=r.parser.defined.includes($i(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):n(g)}function c(g){return g===40?e.attempt(jue,h,a?h:p)(g):g===91?e.attempt(zue,h,a?f:p)(g):a?h(g):p(g)}function f(g){return e.attempt(Bue,h,p)(g)}function h(g){return t(g)}function p(g){return o._balanced=!0,n(g)}}function que(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 Vt(p)?Cd(e,o)(p):o(p)}function o(p){return p===41?h(p):n6(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Vt(p)?Cd(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?i6(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Vt(p)?Cd(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 Vue(e,t,n){const r=this;return i;function i(u){return r6.call(r,e,o,a,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes($i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function Yue(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 Wue={name:"labelStartImage",resolveAll:wC.resolveAll,tokenize:Kue};function Kue(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 Xue={name:"labelStartLink",resolveAll:wC.resolveAll,tokenize:Que};function Que(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 g1={name:"lineEnding",tokenize:Zue};function Zue(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_t(e,t,"linePrefix")}}const Gm={name:"thematicBreak",tokenize:Jue};function Jue(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||Qe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),vt(f)?_t(e,u,"whitespace")(f):u(f))}}const fr={continuation:{tokenize:rce},exit:oce,name:"list",tokenize:nce},ece={partial:!0,tokenize:sce},tce={partial:!0,tokenize:ice};function nce(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:lw(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(Gm,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 lw(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(yh,r.interrupt?n:h,e.attempt(ece,g,p))}function h(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function p(y){return vt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function rce(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yh,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||!vt(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(tce,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,_t(e,e.attempt(fr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function ice(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 oce(e){e.exit(this.containerState.type)}function sce(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!vt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const FD={name:"setextUnderline",resolveTo:ace,tokenize:lce};function ace(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 lce(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"),vt(f)?_t(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Qe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const uce={tokenize:cce};function cce(e){const t=this,n=e.attempt(yh,r,e.attempt(this.parser.constructs.flowInitial,i,_t(e,e.attempt(this.parser.constructs.flow,i,e.attempt(mue,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 fce={resolveAll:s6()},dce=o6("string"),hce=o6("text");function o6(e){return{resolveAll:s6(e==="text"?pce: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 g=-1;if(p)for(;++g<p.length;){const y=p[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function s6(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 pce(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 mce={42:fr,43:fr,45:fr,48:fr,49:fr,50:fr,51:fr,52:fr,53:fr,54:fr,55:fr,56:fr,57:fr,62:ZI},gce={91:xue},yce={[-2]:m1,[-1]:m1,32:m1},bce={35:Rue,42:Gm,45:[FD,Gm],60:Due,61:FD,95:Gm,96:LD,126:LD},vce={38:e6,92:JI},xce={[-5]:g1,[-4]:g1,[-3]:g1,33:Wue,38:e6,42:uw,60:[Xle,Iue],91:Xue,92:[Eue,JI],93:wC,95:uw,96:uue},wce={null:[uw,fce]},Sce={null:[42,95]},Cce={null:[]},Ece=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Sce,contentInitial:gce,disable:Cce,document:mce,flow:bce,flowInitial:yce,insideSpan:wce,string:vce,text:xce},Symbol.toStringTag,{value:"Module"}));function kce(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:g,sliceStream:y,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function p(L){return a=ui(a,L),w(),a[a.length-1]!==null?[]:(N(t,0),f.events=Ly(o,f.events,f),f.events)}function g(L,M){return _ce(y(L),M)}function y(L){return Rce(a,L)}function b(){const{_bufferIndex:L,_index:M,line:B,column:q,offset:F}=r;return{_bufferIndex:L,_index:M,line:B,column:q,offset:F}}function v(L){i[L.line]=L.column,I()}function w(){let L;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<M.length;)S(M.charCodeAt(r._bufferIndex));else S(M)}}function S(L){h=h(L)}function _(L){Qe(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,I()):L!==-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=L}function k(L,M){const B=M||{};return B.type=L,B.start=b(),f.events.push(["enter",B,f]),u.push(B),B}function T(L){const M=u.pop();return M.end=b(),f.events.push(["exit",M,f]),M}function A(L,M){N(L,M.from)}function D(L,M){M.restore()}function O(L,M){return B;function B(q,F,j){let z,V,W,P;return Array.isArray(q)?J(q):"tokenize"in q?J([q]):Y(q);function Y(he){return ve;function ve(Re){const ce=Re!==null&&he[Re],Ie=Re!==null&&he.null,Ve=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return J(Ve)(Re)}}function J(he){return z=he,V=0,he.length===0?j:U(he[V])}function U(he){return ve;function ve(Re){return P=H(),W=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?oe():he.tokenize.call(M?Object.assign(Object.create(f),M):f,c,se,oe)(Re)}}function se(he){return L(W,P),F}function oe(he){return P.restore(),++V<z.length?U(z[V]):j}}}function N(L,M){L.resolveAll&&!o.includes(L)&&o.push(L),L.resolve&&zr(f.events,M,f.events.length-M,L.resolve(f.events.slice(M),f)),L.resolveTo&&(f.events=L.resolveTo(f.events,f))}function H(){const L=b(),M=f.previous,B=f.currentConstruct,q=f.events.length,F=Array.from(u);return{from:q,restore:j};function j(){r=L,f.previous=M,f.currentConstruct=B,f.events.length=q,u=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Rce(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 _ce(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=`
|
|
502
|
+
`;break}case-3:{a=`\r
|
|
503
|
+
`;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 Tce(e){const r={constructs:XI([Ece,...(e||{}).extensions||[]]),content:i(Hle),defined:[],document:i(qle),flow:i(uce),lazy:{},string:i(dce),text:i(hce)};return r;function i(o){return a;function a(u){return kce(r,o,u)}}}function Ace(e){for(;!t6(e););return e}const jD=/[\0\t\n\r]/g;function Dce(){let e=1,t="",n=!0,r;return i;function i(o,a,u){const c=[];let f,h,p,g,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(jD.lastIndex=p,f=jD.exec(o),g=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(g),!f){t=o.slice(p);break}if(y===10&&p===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<g&&(c.push(o.slice(p,g)),e+=g-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=g+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Mce=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Oce(e){return e.replace(Mce,$ce)}function $ce(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return QI(n.slice(o?2:1),o?16:10)}return xC(n)||e}const a6={}.hasOwnProperty;function Nce(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Pce(n)(Ace(Tce(n).document().write(Dce()(e,t,!0))))}function Pce(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(re),autolinkProtocol:H,autolinkEmail:H,atxHeading:o(xe),blockQuote:o(Ie),characterEscape:H,characterReference:H,codeFenced:o(Ve),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Ve,a),codeText:o(X,a),codeTextData:H,data:H,codeFlowValue:H,definition:o(Z),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(te),hardBreakEscape:o(ge),hardBreakTrailing:o(ge),htmlFlow:o(Ce,a),htmlFlowData:H,htmlText:o(Ce,a),htmlTextData:H,image:o(le),label:a,link:o(re),listItem:o(ae),listItemValue:g,listOrdered:o(me,p),listUnordered:o(me),paragraph:o(Oe),reference:U,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:I,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:he,characterReference:ve,codeFenced:c(w),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:c(S),codeText:c(F),codeTextData:I,data:I,definition:c(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(B),htmlFlowData:I,htmlText:c(q),htmlTextData:I,image:c(z),label:W,labelText:V,lineEnding:L,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:P,resourceTitleString:Y,resource:J,setextHeading:c(N),setextHeadingLineSequence:O,setextHeadingText:D,strong:c(),thematicBreak:c()}};l6(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},Ne=[];let Fe=-1;for(;++Fe<ue.length;)if(ue[Fe][1].type==="listOrdered"||ue[Fe][1].type==="listUnordered")if(ue[Fe][0]==="enter")Ne.push(Fe);else{const at=Ne.pop();Fe=i(ue,at,Fe)}for(Fe=-1;++Fe<ue.length;){const at=t[ue[Fe][0]];a6.call(at,ue[Fe][1].type)&&at[ue[Fe][1].type].call(Object.assign({sliceSerialize:ue[Fe][2].sliceSerialize},ke),ue[Fe][1])}if(ke.tokenStack.length>0){const at=ke.tokenStack[ke.tokenStack.length-1];(at[1]||zD).call(ke,void 0,at[0])}for(Se.position={start:Ds(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Ds(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)Se=t.transforms[Fe](Se)||Se;return Se}function i(ue,Se,ke){let Ne=Se-1,Fe=-1,at=!1,Bt,Mt,Me,We;for(;++Ne<=ke;){const Le=ue[Ne];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?Fe++:Fe--,We=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(Bt&&!We&&!Fe&&!Me&&(Me=Ne),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!Fe&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||Fe===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(Bt){let Tt=Ne;for(Mt=void 0;Tt--;){const ft=ue[Tt];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Mt&&(ue[Mt][1].type="lineEndingBlank",at=!0),ft[1].type="lineEnding",Mt=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&&(!Mt||Me<Mt)&&(Bt._spread=!0),Bt.end=Object.assign({},Mt?ue[Mt][1].start:Le[1].end),ue.splice(Mt||Ne,0,["exit",Bt,Le[2]]),Ne++,ke++}if(Le[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};Bt=Tt,ue.splice(Ne,0,["enter",Tt,Le[2]]),Ne++,ke++,Me=void 0,We=!0}}}return ue[Se][1]._spread=at,ke}function o(ue,Se){return ke;function ke(Ne){u.call(this,ue(Ne),Ne),Se&&Se.call(this,Ne)}}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:Ds(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(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==ue.type&&(Se?Se.call(this,ue,Ne[0]):(Ne[1]||zD).call(this,ue,Ne[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Sd({start:ue.start,end:ue.end})+"): it’s not open");ke.position.end=Ds(ue.end)}function h(){return vC(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(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 w(){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 S(){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=$i(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 N(){this.data.setextHeadingSlurpLineEnding=void 0}function H(ue){const ke=this.stack[this.stack.length-1].children;let Ne=ke[ke.length-1];(!Ne||Ne.type!=="text")&&(Ne=_e(),Ne.position={start:Ds(ue.start),end:void 0},ke.push(Ne)),this.stack.push(Ne)}function I(ue){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ue),Se.position.end=Ds(ue.end)}function L(ue){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=Se.children[Se.children.length-1];ke.position.end=Ds(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Se.type)&&(H.call(this,ue),I.call(this,ue))}function M(){this.data.atHardBreak=!0}function B(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function q(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function F(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function j(){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 z(){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 V(ue){const Se=this.sliceSerialize(ue),ke=this.stack[this.stack.length-2];ke.label=Oce(Se),ke.identifier=$i(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 Ne=ue.children;ke.children=Ne}else ke.alt=Se}function P(){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 U(){this.data.referenceType="collapsed"}function se(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=$i(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function oe(ue){this.data.characterReferenceType=ue.type}function he(ue){const Se=this.sliceSerialize(ue),ke=this.data.characterReferenceType;let Ne;ke?(Ne=QI(Se,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=xC(Se);const Fe=this.stack[this.stack.length-1];Fe.value+=Ne}function ve(ue){const Se=this.stack.pop();Se.position.end=Ds(ue.end)}function Re(ue){I.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ue)}function ce(ue){I.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ue)}function Ie(){return{type:"blockquote",children:[]}}function Ve(){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 te(){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 re(){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 Ds(e){return{line:e.line,column:e.column,offset:e.offset}}function l6(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?l6(e,r):Lce(e,r)}}function Lce(e,t){let n;for(n in t)if(a6.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 zD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Sd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Sd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Sd({start:t.start,end:t.end})+") is still open")}function Ice(e){const t=this;t.parser=n;function n(r){return Nce(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fce(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 jce(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
504
|
+
`}]}function zce(e,t){const n=t.value?t.value+`
|
|
505
|
+
`:"",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 Bce(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uce(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hce(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Jc(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 Gce(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 qce(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function u6(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 Vce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return u6(e,t);const i={src:Jc(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 Yce(e,t){const n={src:Jc(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 Wce(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 Kce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return u6(e,t);const i={href:Jc(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 Xce(e,t){const n={href:Jc(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 Qce(e,t,n){const r=e.all(t),i=n?Zce(n):c6(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:`
|
|
506
|
+
`}),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:`
|
|
507
|
+
`});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function Zce(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=c6(n[r])}return t}function c6(e){const t=e.spread;return t??e.children.length>1}function Jce(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 efe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tfe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function nfe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rfe(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=mC(t.children[1]),c=HI(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 ife(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],g={},y=a?a[c]:void 0;y&&(g.align=y);let b={type:"element",tagName:o,properties:g,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 ofe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const BD=9,UD=32;function sfe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(HD(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(HD(t.slice(i),i>0,!1)),o.join("")}function HD(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===BD||o===UD;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===BD||o===UD;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function afe(e,t){const n={type:"text",value:sfe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function lfe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ufe={blockquote:Fce,break:jce,code:zce,delete:Bce,emphasis:Uce,footnoteReference:Hce,heading:Gce,html:qce,imageReference:Vce,image:Yce,inlineCode:Wce,linkReference:Kce,link:Xce,listItem:Qce,list:Jce,paragraph:efe,root:tfe,strong:nfe,table:rfe,tableCell:ofe,tableRow:ife,text:afe,thematicBreak:lfe,toml:bm,yaml:bm,definition:bm,footnoteDefinition:bm};function bm(){}const f6=-1,Iy=0,Ed=1,Bg=2,SC=3,CC=4,EC=5,kC=6,d6=7,h6=8,GD=typeof self=="object"?self:globalThis,cfe=(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 Iy:case f6:return n(a,i);case Ed:{const u=n([],i);for(const c of a)u.push(r(c));return u}case Bg:{const u=n({},i);for(const[c,f]of a)u[r(c)]=r(f);return u}case SC:return n(new Date(a),i);case CC:{const{source:u,flags:c}=a;return n(new RegExp(u,c),i)}case EC:{const u=n(new Map,i);for(const[c,f]of a)u.set(r(c),r(f));return u}case kC:{const u=n(new Set,i);for(const c of a)u.add(r(c));return u}case d6:{const{name:u,message:c}=a;return n(new GD[u](c),i)}case h6: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 GD[o](a),i)};return r},qD=e=>cfe(new Map,e)(0),zu="",{toString:ffe}={},{keys:dfe}=Object,sd=e=>{const t=typeof e;if(t!=="object"||!e)return[Iy,t];const n=ffe.call(e).slice(8,-1);switch(n){case"Array":return[Ed,zu];case"Object":return[Bg,zu];case"Date":return[SC,zu];case"RegExp":return[CC,zu];case"Map":return[EC,zu];case"Set":return[kC,zu];case"DataView":return[Ed,n]}return n.includes("Array")?[Ed,n]:n.includes("Error")?[d6,n]:[Bg,n]},vm=([e,t])=>e===Iy&&(t==="function"||t==="symbol"),hfe=(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]=sd(a);switch(u){case Iy:{let h=a;switch(c){case"bigint":u=h6,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([f6],a)}return i([u,h],a)}case Ed:{if(c){let g=a;return c==="DataView"?g=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(a)),i([c,[...g]],a)}const h=[],p=i([u,h],a);for(const g of a)h.push(o(g));return p}case Bg:{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 g of dfe(a))(e||!vm(sd(a[g])))&&h.push([o(g),o(a[g])]);return p}case SC:return i([u,a.toISOString()],a);case CC:{const{source:h,flags:p}=a;return i([u,{source:h,flags:p}],a)}case EC:{const h=[],p=i([u,h],a);for(const[g,y]of a)(e||!(vm(sd(g))||vm(sd(y))))&&h.push([o(g),o(y)]);return p}case kC:{const h=[],p=i([u,h],a);for(const g of a)(e||!vm(sd(g)))&&h.push(o(g));return p}}const{message:f}=a;return i([u,{name:c,message:f}],a)};return o},VD=(e,{json:t,lossy:n}={})=>{const r=[];return hfe(!(t||n),!!t,new Map,r)(e),r},Ug=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?qD(VD(e,t)):structuredClone(e):(e,t)=>qD(VD(e,t));function pfe(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 mfe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gfe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pfe,r=e.options.footnoteBackLabel||mfe,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(),g=Jc(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-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,y),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const w=h[h.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const _=w.children[w.children.length-1];_&&_.type==="text"?_.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else h.push(...b);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(f,S),u.push(S)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ug(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
508
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
509
|
+
`}]}}const Fy=(function(e){if(e==null)return xfe;if(typeof e=="function")return jy(e);if(typeof e=="object")return Array.isArray(e)?yfe(e):bfe(e);if(typeof e=="string")return vfe(e);throw new Error("Expected function, string, or object as test")});function yfe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fy(e[n]);return jy(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bfe(e){const t=e;return jy(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function vfe(e){return jy(t);function t(n){return n&&n.type===e}}function jy(e){return t;function t(n,r,i){return!!(wfe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xfe(){return!0}function wfe(e){return e!==null&&typeof e=="object"&&"type"in e}const p6=[],Sfe=!0,cw=!1,Cfe="skip";function m6(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Fy(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(g,"name",{value:"node ("+(c.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=p6,b,v,w;if((!t||o(c,f,h[h.length-1]||void 0))&&(y=Efe(n(c,h)),y[0]===cw))return y;if("children"in c&&c.children){const S=c;if(S.children&&y[0]!==Cfe)for(v=(r?S.children.length:-1)+a,w=h.concat(S);v>-1&&v<S.children.length;){const _=S.children[v];if(b=u(_,v,w)(),b[0]===cw)return b;v=typeof b[1]=="number"?b[1]:v+a}}return y}}}function Efe(e){return Array.isArray(e)?e:typeof e=="number"?[Sfe,e]:e==null?p6:[e]}function zy(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),m6(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 fw={}.hasOwnProperty,kfe={};function Rfe(e,t){const n=t||kfe,r=new Map,i=new Map,o=new Map,a={...ufe,...n.handlers},u={all:f,applyData:Tfe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:_fe,wrap:Dfe};return zy(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:i,g=String(h.identifier).toUpperCase();p.has(g)||p.set(g,h)}}),u;function c(h,p){const g=h.type,y=u.handlers[g];if(fw.call(u.handlers,g)&&y)return y(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in h){const{children:v,...w}=h,S=Ug(w);return S.children=u.all(h),S}return Ug(h)}return(u.options.unknownHandler||Afe)(u,h,p)}function f(h){const p=[];if("children"in h){const g=h.children;let y=-1;for(;++y<g.length;){const b=u.one(g[y],h);if(b){if(y&&g[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=YD(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=YD(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function _fe(e,t){e.position&&(t.position=mle(e))}function Tfe(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,Ug(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Afe(e,t){const n=t.data||{},r="value"in t&&!(fw.call(n,"hProperties")||fw.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 Dfe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
510
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
511
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
512
|
+
`}),n}function YD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function WD(e,t){const n=Rfe(e,t),r=n.one(e,void 0),i=gfe(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
513
|
+
`},i),o}function Mfe(e,t){return e&&"run"in e?async function(n,r){const i=WD(n,{file:r,...t});await e.run(i,r)}:function(n,r){return WD(n,{file:r,...e||t})}}function KD(e){if(e)throw e}var y1,XD;function Ofe(){if(XD)return y1;XD=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 g;for(g in f);return typeof g>"u"||e.call(f,g)},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 y1=function c(){var f,h,p,g,y,b,v=arguments[0],w=1,S=arguments.length,_=!1;for(typeof v=="boolean"&&(_=v,v=arguments[1]||{},w=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});w<S;++w)if(f=arguments[w],f!=null)for(h in f)p=u(v,h),g=u(f,h),v!==g&&(_&&g&&(o(g)||(y=i(g)))?(y?(y=!1,b=p&&i(p)?p:[]):b=p&&o(p)?p:{},a(v,{name:h,newValue:c(_,b,g)})):typeof g<"u"&&a(v,{name:h,newValue:g}));return v},y1}var $fe=Ofe();const b1=bw($fe);function dw(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 Nfe(){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?Pfe(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 Pfe(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 Gi={basename:Lfe,dirname:Ife,extname:Ffe,join:jfe,sep:"/"};function Lfe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bh(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 Ife(e){if(bh(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 Ffe(e){bh(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 jfe(...e){let t=-1,n;for(;++t<e.length;)bh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":zfe(n)}function zfe(e){bh(e);const t=e.codePointAt(0)===47;let n=Bfe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Bfe(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 bh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ufe={cwd:Hfe};function Hfe(){return"/"}function hw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Gfe(e){if(typeof e=="string")e=new URL(e);else if(!hw(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 qfe(e)}function qfe(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 v1=["history","path","basename","stem","extname","dirname"];class g6{constructor(t){let n;t?hw(t)?n={path:t}:typeof t=="string"||Vfe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Ufe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<v1.length;){const o=v1[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)v1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Gi.basename(this.path):void 0}set basename(t){w1(t,"basename"),x1(t,"basename"),this.path=Gi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gi.dirname(this.path):void 0}set dirname(t){QD(this.basename,"dirname"),this.path=Gi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gi.extname(this.path):void 0}set extname(t){if(x1(t,"extname"),QD(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=Gi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hw(t)&&(t=Gfe(t)),w1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gi.basename(this.path,this.extname):void 0}set stem(t){w1(t,"stem"),x1(t,"stem"),this.path=Gi.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 Wn(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 x1(e,t){if(e&&e.includes(Gi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gi.sep+"`")}function w1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function QD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Vfe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yfe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Wfe={}.hasOwnProperty;class RC extends Yfe{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=Nfe()}copy(){const t=new RC;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(b1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(E1("data",this.frozen),this.namespace[t]=n,this):Wfe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(E1("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 S1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),S1("process",this.parser||this.Parser),C1("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,g){if(h||!p||!g)return f(h);const y=p,b=r.stringify(y,g);Qfe(b)?g.value=b:g.result=b,f(h,g)});function f(h,p){h||!p?a(h):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),S1("processSync",this.parser||this.Parser),C1("processSync",this.compiler||this.Compiler),this.process(t,i),JD("processSync","process",n),r;function i(o,a){n=!0,KD(o),r=a}}run(t,n,r){ZD(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,g){const y=p||t;h?u(h):a?a(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),JD("runSync","run",r),i;function o(a,u){KD(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=xm(n),i=this.compiler||this.Compiler;return C1("stringify",i),ZD(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(E1("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=b1(!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,g=-1;for(;++p<r.length;)if(r[p][0]===f){g=p;break}if(g===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[g][1];dw(v)&&dw(y)&&(y=b1(!0,v,y)),r[g]=[f,y,...b]}}}}const Kfe=new RC().freeze();function S1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function C1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function E1(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 ZD(e){if(!dw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function JD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xm(e){return Xfe(e)?e:new g6(e)}function Xfe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Qfe(e){return typeof e=="string"||Zfe(e)}function Zfe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jfe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",eM=[],tM={allowDangerousHtml:!0},ede=/^(https?|ircs?|mailto|xmpp)$/i,tde=[{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 nde(e){const t=rde(e),n=ide(e);return ode(t.runSync(t.parse(n),n),e)}function rde(e){const t=e.rehypePlugins||eM,n=e.remarkPlugins||eM,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tM}:tM;return Kfe().use(Ice).use(n).use(Mfe,r).use(t)}function ide(e){const t=e.children||"",n=new g6;return typeof t=="string"&&(n.value=t),n}function ode(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||sde;for(const h of tde)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Jfe+h.id,void 0);return zy(e,f),xle(e,{Fragment:R.Fragment,components:i,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.jsxs,passKeys:!0,passNode:!0});function f(h,p,g){if(h.type==="raw"&&g&&typeof p=="number")return a?g.children.splice(p,1):g.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let y;for(y in p1)if(Object.hasOwn(p1,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=p1[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,g)),y&&g&&typeof p=="number")return u&&h.children?g.children.splice(p,1,...h.children):g.children.splice(p,1),p}}}function sde(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||ede.test(e.slice(0,t))?e:""}const ade=/[\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,lde=Object.hasOwnProperty;class ude{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=cde(t,n===!0);const o=i;for(;lde.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 cde(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(ade,"").replace(/ /g,"-"))}function fde(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 dde(e){return"children"in e?y6(e):"value"in e?e.value:""}function hde(e){return e.type==="text"?e.value:"children"in e?y6(e):""}function y6(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=hde(e.children[t]);return n.join("")}const pde={},nM=new ude;function mde(e){const n=(e||pde).prefix||"";return function(r){nM.reset(),zy(r,"element",function(i){fde(i)&&!i.properties.id&&(i.properties.id=n+nM.slug(dde(i)))})}}function gde(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yde(e,t,n){const i=Fy((n||{}).ignore||[]),o=bde(t);let a=-1;for(;++a<o.length;)m6(e,"text",u);function u(f,h){let p=-1,g;for(;++p<h.length;){const y=h[p],b=g?g.children:void 0;if(i(y,b?b.indexOf(y):void 0,g))return;g=y}if(g)return c(f,h)}function c(f,h){const p=h[h.length-1],g=o[a][0],y=o[a][1];let b=0;const w=p.children.indexOf(f);let S=!1,_=[];g.lastIndex=0;let k=g.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?g.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,S=!0),!g.global)break;k=g.exec(f.value)}return S?(b<f.value.length&&_.push({type:"text",value:f.value.slice(b)}),p.children.splice(w,1,..._)):_=[f],w+_.length}}function bde(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([vde(i[0]),xde(i[1])])}return t}function vde(e){return typeof e=="string"?new RegExp(gde(e),"g"):e}function xde(e){return typeof e=="function"?e:function(){return e}}const k1="phrasing",R1=["autolink","link","image","label"];function wde(){return{transforms:[Tde],enter:{literalAutolink:Cde,literalAutolinkEmail:_1,literalAutolinkHttp:_1,literalAutolinkWww:_1},exit:{literalAutolink:_de,literalAutolinkEmail:Rde,literalAutolinkHttp:Ede,literalAutolinkWww:kde}}}function Sde(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:k1,notInConstruct:R1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:k1,notInConstruct:R1},{character:":",before:"[ps]",after:"\\/",inConstruct:k1,notInConstruct:R1}]}}function Cde(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function _1(e){this.config.enter.autolinkProtocol.call(this,e)}function Ede(e){this.config.exit.autolinkProtocol.call(this,e)}function kde(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 Rde(e){this.config.exit.autolinkEmail.call(this,e)}function _de(e){this.exit(e)}function Tde(e){yde(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ade],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Dde]],{ignore:["link","linkReference"]})}function Ade(e,t,n,r,i){let o="";if(!b6(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Mde(n)))return!1;const a=Ode(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 Dde(e,t,n,r){return!b6(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Mde(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 Ode(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=bg(e,"(");let o=bg(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 b6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Il(n)||Py(n))&&(!t||n!==47)}v6.peek=Bde;function $de(){this.buffer()}function Nde(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Pde(){this.buffer()}function Lde(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ide(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fde(e){this.exit(e)}function jde(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zde(e){this.exit(e)}function Bde(){return"["}function v6(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 Ude(){return{enter:{gfmFootnoteCallString:$de,gfmFootnoteCall:Nde,gfmFootnoteDefinitionLabelString:Pde,gfmFootnoteDefinition:Lde},exit:{gfmFootnoteCallString:Ide,gfmFootnoteCall:Fde,gfmFootnoteDefinitionLabelString:jde,gfmFootnoteDefinition:zde}}}function Hde(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:v6},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?`
|
|
514
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?x6:Gde))),f(),c}}function Gde(e,t,n){return t===0?e:x6(e,t,n)}function x6(e,t,n){return(n?"":" ")+e}const qde=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];w6.peek=Xde;function Vde(){return{canContainEols:["delete"],enter:{strikethrough:Wde},exit:{strikethrough:Kde}}}function Yde(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qde}],handlers:{delete:w6}}}function Wde(e){this.enter({type:"delete",children:[]},e)}function Kde(e){this.exit(e)}function w6(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 Xde(){return"~"}function Qde(e){return e.length}function Zde(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qde,o=[],a=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],w=[];let S=-1;for(e[h].length>f&&(f=e[h].length);++S<e[h].length;){const _=Jde(e[h][S]);if(n.alignDelimiters!==!1){const k=i(_);w[S]=k,(c[S]===void 0||k>c[S])&&(c[S]=k)}v.push(_)}a[h]=v,u[h]=w}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=rM(r[p]);else{const v=rM(r);for(;++p<f;)o[p]=v}p=-1;const g=[],y=[];for(;++p<f;){const v=o[p];let w="",S="";v===99?(w=":",S=":"):v===108?w=":":v===114&&(S=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[p]-w.length-S.length);const k=w+"-".repeat(_)+S;n.alignDelimiters!==!1&&(_=w.length+_+S.length,_>c[p]&&(c[p]=_),y[p]=_),g[p]=k}a.splice(1,0,g),u.splice(1,0,y),h=-1;const b=[];for(;++h<a.length;){const v=a[h],w=u[h];p=-1;const S=[];for(;++p<f;){const _=v[p]||"";let k="",T="";if(n.alignDelimiters!==!1){const A=c[p]-(w[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&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&S.push(" "),n.alignDelimiters!==!1&&S.push(k),S.push(_),n.alignDelimiters!==!1&&S.push(T),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&S.push("|")}b.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return b.join(`
|
|
515
|
+
`)}function Jde(e){return e==null?"":String(e)}function rM(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 ehe(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()),the);return i(),a}function the(e,t,n){return">"+(n?"":" ")+e}function nhe(e,t){return iM(e,t.inConstruct,!0)&&!iM(e,t.notInConstruct,!1)}function iM(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 oM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
516
|
+
`&&nhe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
517
|
+
`}function rhe(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 ihe(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 ohe(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 she(e,t,n,r){const i=ohe(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(ihe(e,n)){const p=n.enter("codeIndented"),g=n.indentLines(o,ahe);return p(),g}const u=n.createTracker(r),c=i.repeat(Math.max(rhe(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:`
|
|
518
|
+
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
519
|
+
`),o&&(h+=u.move(o+`
|
|
520
|
+
`)),h+=u.move(c),f(),h}function ahe(e,t,n){return(n?"":" ")+e}function _C(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 lhe(e,t,n,r){const i=_C(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?" ":`
|
|
521
|
+
`,...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 uhe(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 Yd(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hg(e,t,n){const r=Fc(e),i=Fc(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}}S6.peek=che;function S6(e,t,n,r){const i=uhe(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=Hg(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Yd(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Hg(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+Yd(p));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function che(e,t,n){return n.options.emphasis||"*"}function fhe(e,t){let n=!1;return zy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cw}),!!((!e.depth||e.depth<3)&&vC(e)&&(t.options.setext||n))}function dhe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(fhe(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
|
|
522
|
+
`,after:`
|
|
523
|
+
`});return p(),h(),g+`
|
|
524
|
+
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
525
|
+
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
526
|
+
`,...o.current()});return/^[\t ]/.test(f)&&(f=Yd(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),u(),f}C6.peek=hhe;function C6(e){return e.value||""}function hhe(){return"<"}E6.peek=phe;function E6(e,t,n,r){const i=_C(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 phe(){return"!"}k6.peek=mhe;function k6(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 mhe(){return"!"}R6.peek=ghe;function R6(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 ghe(){return"`"}function _6(e,t){const n=vC(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))}T6.peek=yhe;function T6(e,t,n,r){const i=_C(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,c;if(_6(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 yhe(e,t,n){return _6(e,n)?"<":"["}A6.peek=bhe;function A6(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 bhe(){return"["}function TC(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 vhe(e){const t=TC(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 xhe(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 D6(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 whe(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?xhe(n):TC(n);const u=e.ordered?a==="."?")":".":vhe(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),D6(n)===a&&h){let p=-1;for(;++p<e.children.length;){const g=e.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.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 She(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 Che(e,t,n,r){const i=She(n);let o=n.bulletCurrent||TC(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,g,y){return g?(y?"":" ".repeat(a))+p:(y?o:o+" ".repeat(a-o.length))+p}}function Ehe(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const khe=Fy(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rhe(e,t,n,r){return(e.children.some(function(a){return khe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _he(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}M6.peek=The;function M6(e,t,n,r){const i=_he(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=Hg(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=Yd(f)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Hg(r.after.charCodeAt(0),p,i);g.inside&&(c=c.slice(0,-1)+Yd(p));const y=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},u+c+y}function The(e,t,n){return n.options.strong||"*"}function Ahe(e,t,n,r){return n.safe(e.value,r)}function Dhe(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 Mhe(e,t,n){const r=(D6(n)+(n.options.ruleSpaces?" ":"")).repeat(Dhe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const O6={blockquote:ehe,break:oM,code:she,definition:lhe,emphasis:S6,hardBreak:oM,heading:dhe,html:C6,image:E6,imageReference:k6,inlineCode:R6,link:T6,linkReference:A6,list:whe,listItem:Che,paragraph:Ehe,root:Rhe,strong:M6,text:Ahe,thematicBreak:Mhe};function Ohe(){return{enter:{table:$he,tableData:sM,tableHeader:sM,tableRow:Phe},exit:{codeText:Lhe,table:Nhe,tableData:T1,tableHeader:T1,tableRow:T1}}}function $he(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 Nhe(e){this.exit(e),this.data.inTable=void 0}function Phe(e){this.enter({type:"tableRow",children:[]},e)}function T1(e){this.exit(e)}function sM(e){this.enter({type:"tableCell",children:[]},e)}function Lhe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ihe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ihe(e,t){return t==="|"?t:e}function Fhe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
527
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:a,tableCell:c,tableRow:u}};function a(y,b,v,w){return f(h(y,v,w),y.align)}function u(y,b,v,w){const S=p(y,v,w),_=f([S]);return _.slice(0,_.indexOf(`
|
|
528
|
+
`))}function c(y,b,v,w){const S=v.enter("tableCell"),_=v.enter("phrasing"),k=v.containerPhrasing(y,{...w,before:o,after:o});return _(),S(),k}function f(y,b){return Zde(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,v){const w=y.children;let S=-1;const _=[],k=b.enter("table");for(;++S<w.length;)_[S]=p(w[S],b,v);return k(),_}function p(y,b,v){const w=y.children;let S=-1;const _=[],k=b.enter("tableRow");for(;++S<w.length;)_[S]=c(w[S],y,b,v);return k(),_}function g(y,b,v){let w=O6.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function jhe(){return{exit:{taskListCheckValueChecked:aM,taskListCheckValueUnchecked:aM,paragraph:Bhe}}}function zhe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uhe}}}function aM(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Bhe(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 Uhe(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=O6.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 Hhe(){return[wde(),Ude(),Vde(),Ohe(),jhe()]}function Ghe(e){return{extensions:[Sde(),Hde(e),Yde(),Fhe(e),zhe()]}}const qhe={tokenize:Qhe,partial:!0},$6={tokenize:Zhe,partial:!0},N6={tokenize:Jhe,partial:!0},P6={tokenize:epe,partial:!0},Vhe={tokenize:tpe,partial:!0},L6={name:"wwwAutolink",tokenize:Khe,previous:F6},I6={name:"protocolAutolink",tokenize:Xhe,previous:j6},ns={name:"emailAutolink",tokenize:Whe,previous:z6},ao={};function Yhe(){return{text:ao}}let Ja=48;for(;Ja<123;)ao[Ja]=ns,Ja++,Ja===58?Ja=65:Ja===91&&(Ja=97);ao[43]=ns;ao[45]=ns;ao[46]=ns;ao[95]=ns;ao[72]=[ns,I6];ao[104]=[ns,I6];ao[87]=[ns,L6];ao[119]=[ns,L6];function Whe(e,t,n){const r=this;let i,o;return a;function a(p){return!pw(p)||!z6.call(r,r.previous)||AC(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return pw(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(Vhe,h,f)(p):p===45||p===95||Vn(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&&er(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Khe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!F6.call(r,r.previous)||AC(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qhe,e.attempt($6,e.attempt(N6,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Xhe(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&j6.call(r,r.previous)&&!AC(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(er(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const g=i.toLowerCase();if(g==="http"||g==="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||zg(p)||Vt(p)||Il(p)||Py(p)?n(p):e.attempt($6,e.attempt(N6,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Qhe(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 Zhe(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(P6,c,u)(f):f===null||Vt(f)||Il(f)||f!==45&&Py(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 Jhe(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(P6,t,o)(a):a===null||Vt(a)||Il(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function epe(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||Vt(u)||Il(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Vt(u)||Il(u)?t(u):r(u)}function o(u){return er(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):er(u)?(e.consume(u),a):n(u)}}function tpe(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Vn(o)?n(o):t(o)}}function F6(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Vt(e)}function j6(e){return!er(e)}function z6(e){return!(e===47||pw(e))}function pw(e){return e===43||e===45||e===46||e===95||Vn(e)}function AC(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 npe={tokenize:cpe,partial:!0};function rpe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ape,continuation:{tokenize:lpe},exit:upe}},text:{91:{name:"gfmFootnoteCall",tokenize:spe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ipe,resolveTo:ope}}}}function ipe(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=$i(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 ope(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 spe(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||Vt(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes($i(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Vt(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 ape(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||Vt(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=$i(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Vt(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 g(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 lpe(e,t,n){return e.check(yh,t,e.attempt(npe,t,n))}function upe(e){e.exit("gfmFootnoteDefinition")}function cpe(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 fpe(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)},g=[["enter",h,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&zr(g,g.length,0,Ly(y,a.slice(f+1,c),u)),zr(g,g.length,0,[["exit",p,u],["enter",a[c][1],u],["exit",a[c][1],u],["exit",h,u]]),zr(a,f-1,c-f+3,g),c=f+g.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 g;function g(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(a.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const v=Fc(f);if(b===126)return p>1?c(b):(a.consume(b),p++,y);if(p<2&&!n)return c(b);const w=a.exit("strikethroughSequenceTemporary"),S=Fc(b);return w._open=!S||S===2&&!!v,w._close=!v||v===2&&!!S,u(b)}}}class dpe{constructor(){this.map=[]}add(t,n,r){hpe(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 hpe(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 ppe(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 mpe(){return{flow:{null:{name:"table",tokenize:gpe,resolveAll:ype}}}}function gpe(e,t,n){const r=this;let i=0,o=0,a;return u;function u(I){let L=r.events.length-1;for(;L>-1;){const q=r.events[L][1].type;if(q==="lineEnding"||q==="linePrefix")L--;else break}const M=L>-1?r.events[L][1].type:null,B=M==="tableHead"||M==="tableRow"?D:c;return B===D&&r.parser.lazy[r.now().line]?n(I):B(I)}function c(I){return e.enter("tableHead"),e.enter("tableRow"),f(I)}function f(I){return I===124||(a=!0,o+=1),h(I)}function h(I){return I===null?n(I):Qe(I)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),y):n(I):vt(I)?_t(e,h,"whitespace")(I):(o+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(I)))}function p(I){return I===null||I===124||Vt(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?g:p)}function g(I){return I===92||I===124?(e.consume(I),p):p(I)}function y(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,vt(I)?_t(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?w(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),v):A(I)}function v(I){return vt(I)?_t(e,w,"whitespace")(I):w(I)}function w(I){return I===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),S):I===45?(o+=1,S(I)):I===null||Qe(I)?T(I):A(I)}function S(I){return I===45?(e.enter("tableDelimiterFiller"),_(I)):A(I)}function _(I){return I===45?(e.consume(I),_):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(I))}function k(I){return vt(I)?_t(e,T,"whitespace")(I):T(I)}function T(I){return I===124?b(I):I===null||Qe(I)?!a||i!==o?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):A(I)}function A(I){return n(I)}function D(I){return e.enter("tableRow"),O(I)}function O(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),O):I===null||Qe(I)?(e.exit("tableRow"),t(I)):vt(I)?_t(e,O,"whitespace")(I):(e.enter("data"),N(I))}function N(I){return I===null||I===124||Vt(I)?(e.exit("data"),O(I)):(e.consume(I),I===92?H:N)}function H(I){return I===92||I===124?(e.consume(I),N):N(I)}}function ype(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 g=new dpe;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(lM(g,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.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)},g.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=wm(g,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=wm(g,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=wm(g,t,o,i,n,p)):a[1]!==0&&(p=wm(g,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&lM(g,t,c,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ppe(t.events,n))}return e}function wm(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},qu(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=qu(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=qu(t.events,n[2]),h=qu(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 g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[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({},qu(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function lM(e,t,n,r,i){const o=[],a=qu(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 qu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bpe={name:"tasklistCheck",tokenize:xpe};function vpe(){return{text:{91:bpe}}}function xpe(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 Vt(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 Qe(c)?t(c):vt(c)?e.check({tokenize:wpe},t,n)(c):n(c)}}function wpe(e,t,n){return _t(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Spe(e){return XI([Yhe(),rpe(),fpe(e),mpe(),vpe()])}const Cpe={};function Epe(e){const t=this,n=e||Cpe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Spe(n)),o.push(Hhe()),a.push(Ghe(n))}const kpe=new Set(Object.keys(d$)),uM={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function Rpe(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(uM[n])return uM[n];if(kpe.has(n))return n}function B6(e){var t;return C.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function _pe(e){return C.isValidElement(e)&&e.type===Tc}function Tpe(e){return C.Children.toArray(e).some(t=>{if(!C.isValidElement(t))return!1;const n=C.Children.toArray(t.props.children);return B6(n[0])})}function mw(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(mw).join("");if(C.isValidElement(e)){const t=e.props.children;return mw(t)}return""}function cM(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t)).map(t=>{const n=C.Children.toArray(t.props.children),r=n[0];if(B6(r)){const o=!!r.props.checked,a=n.slice(1);return{label:R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(gP,{checked:o,disabled:!0}),R.jsx(Pe,{size:1,children:a})]})}}const i=n.findIndex(_pe);if(i>=0){const o=n[i],a=[...n.slice(0,i),...n.slice(i+1)];return{category:mw(a).trim(),items:o.props.items??[]}}return{label:R.jsx(Pe,{size:1,children:n})}})}const Ape={p:({children:e})=>R.jsx(Pe,{my:1,size:1,render:R.jsx("p",{}),children:e}),h1:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:4,my:2,render:R.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:3,mt:2,render:R.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:1,my:1,render:R.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:1,render:R.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:0,render:R.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>R.jsx(Pe,{weight:"bold",size:-1,render:R.jsx("h6",{id:t}),children:e}),strong:({children:e})=>R.jsx(Pe,{weight:"bold",children:e}),em:({children:e})=>R.jsx(Pe,{render:R.jsx("em",{}),children:e}),del:({children:e})=>R.jsx(Pe,{strikethrough:!0,render:R.jsx("del",{}),children:e}),a:({children:e,href:t})=>R.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>R.jsx(Tc,{marker:Tpe(e)?"none":"disc",items:cM(e),style:{display:"block"},my:2}),ol:({children:e})=>R.jsx(Tc,{marker:"decimal",items:cM(e),style:{display:"block"},my:2}),blockquote:({children:e})=>R.jsx("blockquote",{children:e}),hr:()=>R.jsx(Lw,{}),table:({children:e})=>R.jsx(xI,{children:R.jsx(wI,{bordered:!0,children:e})}),thead:({children:e})=>R.jsx(SI,{children:e}),tbody:({children:e})=>R.jsx(RI,{children:e}),tr:({children:e})=>R.jsx(CI,{children:e}),th:({children:e})=>R.jsx(kI,{children:e}),td:({children:e})=>R.jsx(EI,{children:e}),pre:({children:e})=>R.jsx(R.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
|
|
529
|
+
`)?R.jsx(vS,{code:r.replace(/\n$/,""),language:Rpe(e),rows:5,defaultExpanded:!1,HeaderProps:{copyable:!0},style:{width:"100%",marginBlockEnd:"0.5rem"}}):R.jsx(DN,{...n,children:t})}},Dpe=[Epe],Mpe=[mde];function Ope({children:e,components:t}){return R.jsx(Ye,{gap:4,fullwidth:!0,children:R.jsx(nde,{remarkPlugins:Dpe,rehypePlugins:Mpe,components:{...Ape,...t},children:e})})}const kd=C.memo(Ope);function $pe(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}function U6({event:e}){const t=e.meta,n=((t==null?void 0:t.text)??"").trim(),r=(t==null?void 0:t.thinkingBlocks)??0,i=(t==null?void 0:t.thinkingBytes)??0;return!n&&r===0?null:R.jsxs(Ye,{"data-slot":"assistant-content",gap:2,children:[r>0&&R.jsx(Qo,{color:"indigo",children:`Thought ${$pe(i)}`}),n&&R.jsx(kd,{children:n})]})}U6.displayName="AssistantContent";function fM(e,t){return e==null?void 0:e.find(n=>n.question===t)}function Npe(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 H6({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=fM(r,u),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:g,note:y}=Npe(c,p,h),b=g.length>0,v=b?void 0:y??c,w=b?y:void 0;return R.jsxs(Ye,{gap:4,fullwidth:!0,children:[v&&R.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[R.jsx(Pe,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),R.jsx(kd,{children:v})]}),!b&&!v&&R.jsx(Pe,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&R.jsx(Tc,{marker:"decimal",items:p.map(S=>{const _=g.includes(S.label);return{label:R.jsx(Pe,{weight:"bold",color:_?"green":void 0,shade:_?void 0:"muted",children:S.label}),description:S.description}})}),w&&R.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[R.jsx(Pe,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),R.jsx(kd,{children:w})]})]})};if(i.length===1){const[u,c]=i[0];return R.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:R.jsx(dn,{gap:4,fullwidth:!0,children:o(u,c)})})}const a=i.map(([u,c],f)=>{const h=fM(r,u);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:u,render:o(u,c)}});return R.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:R.jsx(dn,{gap:4,fullwidth:!0,children:R.jsx(nC,{items:a,ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?R.jsx(G6,{children:R.jsx(kd,{children:n})}):null}return null}H6.displayName="InteractionContent";const G6=({children:e})=>R.jsx(Ye,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:R.jsx(dn,{gap:4,fullwidth:!0,children:e})});G6.displayName="CardContainer";function Ppe(e){if(e)return e.slice(0,8)}function q6({event:e}){const t=e.meta,n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=Ppe(n??void 0),i=e.event==="claude.ended"?t==null?void 0:t.exit_code:void 0,o=typeof i=="number"&&i!==0;return!r&&!o?null:R.jsxs(Ke,{gap:2,ay:"center",children:[r&&R.jsx(Qo,{color:"neutral",size:"small",children:r}),o&&R.jsx(Qo,{color:"red",size:"small",children:`exit ${i}`})]})}q6.displayName="LifecycleContent";class V6{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,g=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,w=1/0;const S=()=>{for(let _=Math.max(v,-f);_<=Math.min(w,f);_+=2){let k;const T=y[_-1],A=y[_+1];T&&(y[_-1]=void 0);let D=!1;if(A){const N=A.oldPos-_;D=A&&0<=N&&N<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&&(w=Math.min(w,_-1)),b+1>=u&&(v=Math.max(v,_+1))}f++};if(i)(function _(){setTimeout(function(){if(f>h||Date.now()>g)return i(void 0);S()||_()},0)})();else for(;f<=h&&Date.now()<=g;){const _=S();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(g,y){const b=r[f+y];return b.length>g.length?b:g}),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 dM="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 Lpe extends V6{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${dM}]+|[^\\S\\n\\r]+|[^${dM}]`,"ug");return t.match(n)||[]}}const Ipe=new Lpe;function Fpe(e,t,n){return Ipe.diff(e,t,n)}class jpe extends V6{constructor(){super(...arguments),this.tokenize=Upe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
530
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
531
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
532
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
533
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const zpe=new jpe;function Bpe(e,t,n){return zpe.diff(e,t,n)}function Upe(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
534
|
+
`));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 Hpe(e,t){const n=[...e.split(`
|
|
535
|
+
`),...t.split(`
|
|
536
|
+
`)];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(`
|
|
537
|
+
`).map(a=>a.length>=r?a.slice(r):a).join(`
|
|
538
|
+
`);return[i(e),i(t)]}function Gpe(e,t){const n=[],r=[],i=[];function o(h,p){const g=n.length,b=(h.endsWith(`
|
|
539
|
+
`)?h.slice(0,-1):h).split(`
|
|
540
|
+
`);for(const v of b)n.push(v),r.push(p);return{startIdx:g,lns:b}}for(let h=0;h<e.length;h++){h>0&&(n.push("…"),r.push("separator"));const{oldStr:p,newStr:g}=e[h],[y,b]=Hpe(p,g),v=Bpe(y,b);let w=0;for(;w<v.length;){const S=v[w];if(S.removed&&w+1<v.length&&v[w+1].added){const _=o(S.value,"remove"),k=o(v[w+1].value,"add"),T=t?Math.min(_.lns.length,k.lns.length):0;for(let A=0;A<T;A++){const D=Fpe(_.lns[A],k.lns[A]);let O=0,N=0;for(const H of D){const I=H.value.length;H.added?(I>0&&i.push({start:{line:k.startIdx+A,character:N},end:{line:k.startIdx+A,character:N+I},properties:{class:"diff-word add"}}),N+=I):H.removed?(I>0&&i.push({start:{line:_.startIdx+A,character:O},end:{line:_.startIdx+A,character:O+I},properties:{class:"diff-word remove"}}),O+=I):(O+=I,N+=I)}}w+=2}else S.removed?(o(S.value,"remove"),w+=1):S.added?(o(S.value,"add"),w+=1):(o(S.value,"context"),w+=1)}}const a=[];let u=1,c=1;for(const h of r)h==="separator"?a.push({old:null,new:null}):h==="remove"?a.push({old:u++,new:null}):h==="add"?a.push({old:null,new:c++}):a.push({old:u++,new:c++});const f=Math.max(u-1,c-1,1);return{code:n.join(`
|
|
541
|
+
`),lineKinds:r,lineNums:a,decorations:i,maxLineNum:f}}function A1(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 D1(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}const qpe={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",md:"markdown",markdown:"markdown",css:"css",html:"html",htm:"html",py:"python",sh:"bash",bash:"bash",zsh:"bash"};function Vpe(e,t){if(!e)return t;const n=e.split("/").pop()??e,r=n.includes(".")?n.split(".").pop().toLowerCase():"";return qpe[r]??t}function DC({edits:e,oldStr:t,newStr:n,language:r,filename:i,wordDiff:o=!1,rows:a,defaultExpanded:u}){var v;const c=e&&e.length>0?e:[{oldStr:t??"",newStr:n??""}],f=r??Vpe(i,"tsx"),[h,p]=C.useState(""),[g,y]=C.useState(1);C.useEffect(()=>{let w=!1;return(async()=>{const{code:S,lineKinds:_,lineNums:k,decorations:T,maxLineNum:A}=Gpe(c,o);await CN(f);const O=(await bS()).codeToHtml(S,{lang:f,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:T,transformers:[{name:"diff-block:line-marks",pre(N){A1(N,"has-diff")},line(N,H){const I=H-1,L=_[I],M=k[I];if(L==="add"||L==="remove")A1(N,`diff ${L}`);else if(L==="separator")return A1(N,"diff-separator"),N;const B=L==="add"?"diff-marker add":L==="remove"?"diff-marker remove":"diff-marker",q=L==="add"?"+":L==="remove"?"-":" ",F="diff-num diff-num-old"+(M.old==null?" diff-num-blank":""),j="diff-num diff-num-new"+(M.new==null?" diff-num-blank":""),z=[D1(F,M.old!=null?String(M.old):" "),D1(j,M.new!=null?String(M.new):" "),D1(B,q)];return N.children.unshift(...z),N}}]});w||(p(O),y(String(A).length))})(),()=>{w=!0}},[c,f,o]);const b=((v=c[c.length-1])==null?void 0:v.newStr)??"";return R.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${g+2}ch`,width:"100%"},children:R.jsx(vS,{code:b,language:f,filename:i,showLineNumbers:!1,rows:a,defaultExpanded:u,HeaderProps:{copyable:!1},html:h,style:{width:"100%"}})})}DC.displayName="DiffBlock";const Ype=5;function gw(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function Y6({permission:e}){const t=e.edits&&e.edits.length>0?e.edits.map(n=>({oldStr:n.oldStr??"",newStr:n.newStr??""})):[{oldStr:e.oldStr??"",newStr:e.newStr??""}];return R.jsx(DC,{edits:t,filename:e.detail,rows:Ype,defaultExpanded:!1})}function Wpe(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function W6({permission:e}){return R.jsx(Pe,{size:-1,family:"mono",shade:"muted",children:Wpe(e)})}function K6({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?gw(r)?R.jsx(Y6,{permission:r}):R.jsx(W6,{permission:r}):null}return R.jsx(Kpe,{permissions:n})}function Kpe({permissions:e}){const t=e.filter(gw),n=e.filter(r=>!gw(r));return R.jsxs(Ye,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&R.jsx(Ye,{gap:2,fullwidth:!0,children:t.map((r,i)=>R.jsx(Y6,{permission:r},`diff-${i}`))}),n.length>0&&R.jsx(Ye,{gap:1,fullwidth:!0,children:n.map((r,i)=>R.jsx(W6,{permission:r},`info-${i}`))})]})}K6.displayName="WorkContent";function X6({event:e}){switch(Sae(e.event)){case"interaction":return R.jsx(H6,{event:e});case"work":return R.jsx(K6,{event:e});case"assistant":return R.jsx(U6,{event:e});case"lifecycle":return R.jsx(q6,{event:e});default:return null}}X6.displayName="EventContent";const Q6=({sessionId:e,isLive:t,...n})=>{const{data:r}=gi({...mae(e,t),enabled:!!e}),{data:i}=gi({...yae(e,t),enabled:!!e});return R.jsx(hC,{"data-slot":"secondary-sidebar",...n,p:0,minw:540,children:r&&R.jsx(Z6,{stats:r,engagement:i})})};Q6.displayName="SecondarySidebar";function Xpe(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const Z6=({stats:e,engagement:t})=>{const n=e.linesAdded>0||e.linesRemoved>0,r=e.filesTouched>0,i=n||r,o=t?Object.values(t.toolUsage).reduce((f,h)=>f+h,0):0,a=(t==null?void 0:t.discardRate.total)??0,u=!!t&&(o>0||a>0),c=[{label:"Activity",value:"activity",render:R.jsxs(qm,{children:[R.jsx(dn,{title:"Conversations",description:"Distinct conversation threads",icon:KU,action:R.jsx(Hi,{value:e.conversationCount})}),R.jsx(dn,{title:"Interactions",description:"User-Claude exchanges",icon:qU,action:R.jsx(Hi,{value:e.interactionCount})}),R.jsx(dn,{title:"Events",description:"Total events emitted",icon:cU,action:R.jsx(Hi,{value:e.eventCount})}),R.jsx(dn,{title:"Duration",description:"Total session time",icon:G3,action:R.jsx(Hi,{label:d1(e.durationS)})}),R.jsx(dn,{title:"Claude work",description:"Time Claude spent active",icon:AU,action:R.jsx(Hi,{label:d1(e.claudeWorkS)})}),R.jsx(dn,{title:"User wait",description:"Time user spent waiting",icon:YU,action:R.jsx(Hi,{label:d1(e.userWaitS)})})]})}];return i&&c.push({label:"Code",value:"code",render:R.jsxs(qm,{children:[n&&R.jsx(dn,{title:"Lines changed",description:"Across all edits",icon:q3,action:R.jsx(J6,{added:e.linesAdded,removed:e.linesRemoved})}),r&&R.jsx(dn,{title:"Files touched",description:"Distinct files edited",icon:V3,action:R.jsx(Hi,{value:e.filesTouched})})]})}),u&&c.push({label:"Engagement",value:"engagement",render:R.jsxs(qm,{children:[o>0&&R.jsx(dn,{title:"Tracked tool calls",description:Xpe(t.toolUsage),icon:Y3,action:R.jsx(Hi,{value:o})}),a>0&&R.jsx(dn,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${a}`,icon:EH,action:R.jsx(Hi,{value:t.discardRate.discarded})})]})}),R.jsx(nC,{items:c,fullwidth:!0,ContainerProps:{fullwidth:!0}})};Z6.displayName="SessionStats";const qm=({children:e})=>R.jsx(Ye,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});qm.displayName="SectionStack";const Hi=e=>R.jsx(Pe,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});Hi.displayName="Stat";const J6=({added:e,removed:t})=>R.jsxs(Pe,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[R.jsx(Pe,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",R.jsx(Pe,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});J6.displayName="DiffStat";const MC=({session:e,categoryPath: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=`${t}/${e.slug}`;return R.jsx(uy,{tooltip:a?"Copied!":"Copy session path",size:n,variant:r,shape:i,pressed:a,onPressedChange:f=>{f&&(navigator.clipboard.writeText(c),u(!0),setTimeout(()=>u(!1),2e3))},icon:{unpressed:R.jsx(Bw,{}),pressed:R.jsx(zw,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};MC.displayName="CopyResumeButton";const eF=({session:e,...t})=>{const{categoryPath:n,session:r}=e,i=Ny(r.status);return R.jsxs(Ke,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[R.jsxs(Ke,{gap:2,ay:"center",children:[R.jsx(sh,{"data-slot":"session-status",color:i}),R.jsx(Ye,{gap:2,children:R.jsxs(Pe,{"data-slot":"session-link",render:R.jsx(jl,{to:"/$",params:{_splat:`${n}/${r.slug}`}}),weight:"bold",children:[n," / ",r.slug]})}),R.jsx(Pe,{"data-slot":"session-time",size:-1,shade:"muted",children:dC(r.startedAt)})]}),R.jsx(Qo,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),R.jsx(MC,{session:r,categoryPath:n})]})};eF.displayName="SessionItem";const tF=th("/$")({component:Qpe}),nF=({href:e,children:t})=>R.jsx(jl,{to:e,children:t});function rF(e,t,n){const r=t.split("/").filter(Boolean),i=[{label:e,value:"/"}];for(let o=0;o<r.length;o++)i.push({label:r[o],value:`/${r.slice(0,o+1).join("/")}`});return n!==void 0&&i.push({label:n,value:""}),i}function Qpe(){const{_splat:e=""}=tF.useParams(),{data:t=[]}=gi(qd()),{data:n=[]}=gi(qd({includeArchived:!0})),r=SD(e,t)??SD(e,n);return r?R.jsx(sF,{match:r}):R.jsx(oF,{categoryPath:e,sessions:t})}function iF(){var t;const{data:e=[]}=gi(AI);return((t=e.find(n=>n.active))==null?void 0:t.name)??"bertrand"}function oF({categoryPath:e,sessions:t}){const n=iF(),r=t.filter(o=>o.categoryPath===e),i=rF(n,e);return R.jsxs(Ye,{gap:4,ax:"stretch",fullwidth:!0,children:[R.jsx(Ye,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:R.jsx(cC,{items:i,linkAs:nF})}),R.jsx(Ye,{px:8,gap:2,style:{overflow:"auto"},children:r.length>0?r.map(o=>R.jsx(eF,{session:o},o.session.id)):R.jsx(Pe,{shade:"muted",children:"No sessions in this category."})})]})}oF.displayName="CategoryDetail";function sF({match:e}){const t=iF(),n=e.session.id,r=e.session.status==="active"||e.session.status==="waiting",{data:i=[]}=gi(pae(n,r)),o=C.useMemo(()=>ole(i),[i]),a=C.useMemo(()=>{var c;if(e.session.status!=="waiting")return null;for(let f=i.length-1;f>=0;f--)if(i[f].event==="session.waiting"){const h=(c=i[f].meta)==null?void 0:c.question;return typeof h=="string"?h:null}return null},[i,e.session.status]),u=rF(t,e.categoryPath,e.session.name);return R.jsxs(Ye,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[R.jsxs(Ke,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[R.jsx(cC,{items:u,linkAs:nF}),R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(MC,{session:e.session,categoryPath:e.categoryPath}),R.jsx(lF,{session:e.session}),R.jsx(AO,{side:"right",title:"Session stats",trigger:R.jsx(es,{tooltip:"Session stats",variant:"subtle",size:"small",shape:"square",children:R.jsx(aH,{})}),children:R.jsx(Q6,{sessionId:n,isLive:r})})]})]}),R.jsx(Ye,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:o.length>0&&R.jsx(l$,{activeIndex:o.length,items:o.map(c=>({title:Dae(c),time:Mae(c.createdAt),color:OI(c.event),media:R.jsx(aF,{event:c}),content:R.jsx(X6,{event:c})})),ItemProps:{style:{width:"100%"},ContentProps:{fullwidth:!0,maxw:860}}})}),R.jsx(uF,{session:e.session,pendingQuestion:a})]})}sF.displayName="SessionDetail";function aF({event:e}){const t=_ae(e.event);return R.jsx(Pe,{color:OI(e.event),render:R.jsx("span",{}),children:R.jsx(t,{size:16})})}aF.displayName="EventMedia";function lF({session:e}){const t=DI(e),{Icon:n}=t;return R.jsx(es,{tooltip:t.tooltip,variant:"subtle",size:"small",shape:"square",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:R.jsx(n,{})})}lF.displayName="ArchiveToggle";function uF({session:e,pendingQuestion:t}){const n=Ny(e.status),r=e.status==="active"||e.status==="waiting";return R.jsx(Ye,{bt:1,p:4,gap:3,fullwidth:!0,children:R.jsxs(Ke,{ay:"center",gap:2,fullwidth:!0,children:[R.jsx(sh,{color:n,pulse:r}),R.jsx(Qo,{color:n,children:e.status}),t&&R.jsx(Pe,{size:1,shade:"muted",children:t})]})})}uF.displayName="SessionFooter";const Zpe=th("/")({component:()=>R.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),Jpe=`# Heading 1 — anchored
|
|
542
|
+
|
|
543
|
+
## Heading 2 — anchored
|
|
544
|
+
|
|
545
|
+
### Heading 3
|
|
546
|
+
|
|
547
|
+
#### Heading 4
|
|
548
|
+
|
|
549
|
+
##### Heading 5
|
|
550
|
+
|
|
551
|
+
###### Heading 6
|
|
552
|
+
|
|
553
|
+
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.
|
|
554
|
+
|
|
555
|
+
> A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
## Lists
|
|
560
|
+
|
|
561
|
+
- Unordered list item one
|
|
562
|
+
- Unordered list item two with **emphasis** and \`code\`
|
|
563
|
+
- Nested item
|
|
564
|
+
- Another nested item
|
|
565
|
+
- Three levels deep
|
|
566
|
+
|
|
567
|
+
1. Ordered list item one
|
|
568
|
+
2. Ordered list item two
|
|
569
|
+
3. Ordered list item three
|
|
570
|
+
|
|
571
|
+
### Task list
|
|
572
|
+
|
|
573
|
+
- [x] Done item
|
|
574
|
+
- [x] Another done item
|
|
575
|
+
- [ ] Open item
|
|
576
|
+
- [ ] Open item with [a link](https://example.com)
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Tables
|
|
581
|
+
|
|
582
|
+
| Feature | Status | Notes |
|
|
583
|
+
|---|---|---|
|
|
584
|
+
| Headings | ✓ | rehype-slug |
|
|
585
|
+
| Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
|
|
586
|
+
| Code blocks | ✓ | shiki via CodeBlock |
|
|
587
|
+
| Task lists | ✓ | disabled checkbox render |
|
|
588
|
+
|
|
589
|
+
| Left | Center | Right |
|
|
590
|
+
|:---|:---:|---:|
|
|
591
|
+
| 1 | 2 | 3 |
|
|
592
|
+
| left-aligned | center-aligned | right-aligned |
|
|
593
|
+
|
|
594
|
+
---
|
|
595
|
+
|
|
596
|
+
## Code
|
|
597
|
+
|
|
598
|
+
Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
|
|
599
|
+
|
|
600
|
+
\`\`\`ts
|
|
601
|
+
// known language — should syntax-highlight
|
|
602
|
+
import { Markdown } from "../components/markdown";
|
|
603
|
+
|
|
604
|
+
export function Demo() {
|
|
605
|
+
return <Markdown>{"# hi"}</Markdown>;
|
|
606
|
+
}
|
|
607
|
+
\`\`\`
|
|
608
|
+
|
|
609
|
+
\`\`\`tsx
|
|
610
|
+
const App = () => <div>{"jsx works too"}</div>;
|
|
611
|
+
\`\`\`
|
|
612
|
+
|
|
613
|
+
\`\`\`js
|
|
614
|
+
// alias — js → javascript
|
|
615
|
+
function add(a, b) { return a + b; }
|
|
616
|
+
\`\`\`
|
|
617
|
+
|
|
618
|
+
\`\`\`sh
|
|
619
|
+
# alias — sh → bash
|
|
620
|
+
bun run dev
|
|
621
|
+
\`\`\`
|
|
622
|
+
|
|
623
|
+
\`\`\`json
|
|
624
|
+
{
|
|
625
|
+
"language": "json",
|
|
626
|
+
"ok": true
|
|
627
|
+
}
|
|
628
|
+
\`\`\`
|
|
629
|
+
|
|
630
|
+
\`\`\`unknownlanguage
|
|
631
|
+
// unknown language — should render plaintext, not throw
|
|
632
|
+
some content here
|
|
633
|
+
\`\`\`
|
|
634
|
+
|
|
635
|
+
\`\`\`
|
|
636
|
+
no language tag — also plaintext
|
|
637
|
+
multiple lines
|
|
638
|
+
\`\`\`
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## Edge cases
|
|
643
|
+
|
|
644
|
+
A paragraph immediately followed by a fenced block:
|
|
645
|
+
\`\`\`ts
|
|
646
|
+
const ok = true;
|
|
647
|
+
\`\`\`
|
|
648
|
+
|
|
649
|
+
Paragraph after the fence — should render with normal spacing.
|
|
650
|
+
|
|
651
|
+
A line with **bold at the very end**
|
|
652
|
+
|
|
653
|
+
A line ending with \`inline code\`
|
|
654
|
+
|
|
655
|
+
An empty heading below this line:
|
|
656
|
+
|
|
657
|
+
##
|
|
658
|
+
|
|
659
|
+
End of fixture.
|
|
660
|
+
`;function eme(){const[e,t]=C.useState(Jpe);return R.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[R.jsxs(Ye,{gap:2,children:[R.jsx(Pe,{size:3,weight:"bold",children:"Markdown kitchen sink"}),R.jsx(Pe,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),R.jsxs(Ke,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[R.jsxs(Ye,{gap:2,ax:"stretch",children:[R.jsx(Pe,{size:0,shade:"muted",children:"source"}),R.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"}})]}),R.jsxs(Ye,{gap:2,children:[R.jsx(Pe,{size:0,shade:"muted",children:"rendered"}),R.jsx(dn,{children:R.jsx(kd,{children:e})})]})]})]})}const tme=th("/dev/markdown")({component:eme}),nme=`import { useState } from "react";
|
|
661
|
+
|
|
662
|
+
export function Counter() {
|
|
663
|
+
const [count, setCount] = useState(0);
|
|
664
|
+
|
|
665
|
+
function increment() {
|
|
666
|
+
setCount(count + 1);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
return (
|
|
670
|
+
<button onClick={increment}>
|
|
671
|
+
{count}
|
|
672
|
+
</button>
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
`,rme=`import { useCallback, useState } from "react";
|
|
676
|
+
|
|
677
|
+
type CounterProps = {
|
|
678
|
+
step?: number;
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
export function Counter({ step = 1 }: CounterProps) {
|
|
682
|
+
const [count, setCount] = useState(0);
|
|
683
|
+
|
|
684
|
+
const increment = useCallback(() => {
|
|
685
|
+
setCount((c) => c + step);
|
|
686
|
+
}, [step]);
|
|
687
|
+
|
|
688
|
+
return (
|
|
689
|
+
<button type="button" onClick={increment}>
|
|
690
|
+
count: {count}
|
|
691
|
+
</button>
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
`,hM={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"},ime=Object.entries(d$);function ome(){const[e,t]=C.useState(nme),[n,r]=C.useState(rme),[i,o]=C.useState("tsx"),[a,u]=C.useState(!1);return R.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[R.jsxs(Ye,{gap:2,children:[R.jsx(Pe,{size:3,weight:"bold",children:"Diff kitchen sink"}),R.jsx(Pe,{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."})]}),R.jsxs(Ke,{ay:"center",gap:4,children:[R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx(Pe,{size:0,shade:"muted",children:"language"}),R.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:ime.map(([c,f])=>R.jsx("option",{value:c,children:f},c))})]}),R.jsxs(Ke,{ay:"center",gap:2,children:[R.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>u(c.target.checked)}),R.jsx(Pe,{size:0,shade:"muted",render:R.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),R.jsxs(Ke,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[R.jsxs(Ye,{gap:3,ax:"stretch",children:[R.jsxs(Ye,{gap:2,ax:"stretch",children:[R.jsx(Pe,{size:0,shade:"muted",children:"old"}),R.jsx(dn,{ax:"stretch",children:R.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:hM})})]}),R.jsxs(Ye,{gap:2,ax:"stretch",children:[R.jsx(Pe,{size:0,shade:"muted",children:"new"}),R.jsx(dn,{ax:"stretch",children:R.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:hM})})]})]}),R.jsxs(Ye,{gap:2,ax:"stretch",children:[R.jsx(Pe,{size:0,shade:"muted",children:"diff"}),R.jsx(DC,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const sme=th("/dev/diff")({component:ome}),ame=Vae.update({id:"/worktrees",path:"/worktrees",getParentRoute:()=>Zc}),lme=tF.update({id:"/$",path:"/$",getParentRoute:()=>Zc}),ume=Zpe.update({id:"/",path:"/",getParentRoute:()=>Zc}),cme=tme.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>Zc}),fme=sme.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>Zc}),dme={IndexRoute:ume,SplatRoute:lme,WorktreesRoute:ame,DevDiffRoute:fme,DevMarkdownRoute:cme},hme=Zc._addFileChildren(dme)._addFileTypes();typeof navigator<"u"&&"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()});const pme=new oz({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),mme=o7({routeTree:hme});N5.createRoot(document.getElementById("root")).render(R.jsx(C.StrictMode,{children:R.jsx(sz,{client:pme,children:R.jsxs(WY,{children:[R.jsx(l7,{router:mme}),R.jsx(LO,{position:"bottom"})]})})}));
|