@fgbg/mdocs 0.8.21 → 0.8.23
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/agent-skills/changelog/SKILL.md +17 -1
- package/agent-skills/index.json +1 -1
- package/bin/mdocs.js +1 -1
- package/dist/server/cli/main.js +22 -1
- package/dist/server/cli/main.js.map +1 -1
- package/dist/server/cli/self-update.js +4 -0
- package/dist/server/cli/self-update.js.map +1 -1
- package/dist/server/documents/tree-and-folders.test.js +54 -3
- package/dist/server/documents/tree-and-folders.test.js.map +1 -1
- package/dist/server/documents/tree.service.js +66 -5
- package/dist/server/documents/tree.service.js.map +1 -1
- package/dist/server/routes/documents.routes.js +16 -0
- package/dist/server/routes/documents.routes.js.map +1 -1
- package/dist/web/assets/{AgentChatPanel-D95hI02c.js → AgentChatPanel-CtdLYtSw.js} +1 -1
- package/dist/web/assets/{AgentSkillFormCard-BtJ0QjLG.js → AgentSkillFormCard-DeZnOTQg.js} +2 -2
- package/dist/web/assets/AiWriteWorkbench-hUYjin2m.js +7 -0
- package/dist/web/assets/DiagramEditor-NtNY3sZL-C9hL71kf.js +2 -0
- package/dist/web/assets/DocumentEditor-BmmnuieO.js +21 -0
- package/dist/web/assets/{MergeView-DgFQHD5_.js → MergeView-CjhCBNPa.js} +1 -1
- package/dist/web/assets/{PlaygroundPage-Dg57Xxpl.js → PlaygroundPage-CgaNgQEp.js} +1 -1
- package/dist/web/assets/SettingsPage-Fl5Tu7u3.js +1 -0
- package/dist/web/assets/{Toolbar-0Y2wmGwe.js → Toolbar-BaKuyXey.js} +1 -1
- package/dist/web/assets/{VisitorPickerModal-COxtOvc4.js → VisitorPickerModal-DPyg6mIt.js} +1 -1
- package/dist/web/assets/{copy-nOl0d3Th.js → copy-UkvgEfIg.js} +1 -1
- package/dist/web/assets/diagram-BLCqfrbF.js +6257 -0
- package/dist/web/assets/index-Ct5Vt4tz.js +185 -0
- package/dist/web/assets/index-Dt_PAYaR.css +1 -0
- package/dist/web/assets/meta2d-D3b5RRN8.js +110 -0
- package/dist/web/assets/{meta2dEngine-BD2XbzaV-e28q005B.js → meta2dEngine-BD2XbzaV-2ovN6JHu.js} +1 -1
- package/dist/web/assets/{motion-D-I76zAi.js → motion-Bz_inm1R.js} +1 -1
- package/dist/web/assets/{plus-DvBbg6jL.js → plus-B-uEAM2g.js} +1 -1
- package/dist/web/assets/react-6CQL39Gs.js +2382 -0
- package/dist/web/assets/react-vendor-BJFXgntS.js +242 -0
- package/dist/web/assets/{ui-C3xtW1w8.js → ui-TwLH91RV.js} +133 -133
- package/dist/web/index.html +5 -5
- package/package.json +2 -2
- package/dist/web/assets/AiWriteWorkbench-Qam8cfY6.js +0 -6
- package/dist/web/assets/DiagramEditor-BTRe45TX-Did98cnP.js +0 -2
- package/dist/web/assets/DocumentEditor-DtSzkl6A.js +0 -21
- package/dist/web/assets/SettingsPage-CkYpe5v7.js +0 -1
- package/dist/web/assets/diagram-BJFhx-27.js +0 -3016
- package/dist/web/assets/index-B-XJ-ScV.js +0 -185
- package/dist/web/assets/index-CGvsjO9f.css +0 -1
- package/dist/web/assets/meta2d-C8Z4cn-d.js +0 -110
- package/dist/web/assets/react-BsVOIHR8.js +0 -2126
- package/dist/web/assets/react-vendor-BNpqFP9B.js +0 -242
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-pp8916En.js","assets/javascript-XPxc2APE.js","assets/css-CLj8gQPS.js","assets/scss-D5BDwBP9.js","assets/vue-DMJtu8ND.js","assets/typescript-DttGkNCf.js","assets/json-CjLXzM_z.js","assets/svelte-DR4MIrkg.js","assets/xml-DtyAt_xK.js","assets/java-B2AjWfgk.js","assets/cpp-Bp17OOWP.js","assets/c-CyUOlKFr.js","assets/sql-CKXjX23X.js","assets/ruby-CM5gBc7p.js","assets/graphql-By4-2MiP.js","assets/jsx-BGEKFWBk.js","assets/tsx-Dio8iE-N.js","assets/shellscript-CE-5zpiL.js","assets/lua-JmSlR1pZ.js","assets/yaml-B92AUxDB.js","assets/php-R6g_5hLQ.js","assets/shellsession-BhddCRKA.js","assets/nginx-bBKbG2uI.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Nx=Object.defineProperty;var Px=Object.getPrototypeOf;var Ix=Reflect.get;var fy=e=>{throw TypeError(e)};var zx=(e,t,n)=>t in e?Nx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>zx(e,typeof t!="symbol"?t+"":t,n),td=(e,t,n)=>t.has(e)||fy("Cannot "+n);var Ft=(e,t,n)=>(td(e,t,"read from private field"),n?n.call(e):t.get(e)),Go=(e,t,n)=>t.has(e)?fy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Hn=(e,t,n,r)=>(td(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),nd=(e,t,n)=>(td(e,t,"access private method"),n);var dy=(e,t,n)=>Ix(Px(e),n,t);function Bx(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var vU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bU(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var D0={exports:{}},Yc={};/**
|
|
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 $x=Symbol.for("react.transitional.element"),Hx=Symbol.for("react.fragment");function N0(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var o in t)o!=="key"&&(n[o]=t[o])}else n=t;return t=n.ref,{$$typeof:$x,type:e,key:r,ref:t!==void 0?t:null,props:n}}Yc.Fragment=Hx;Yc.jsx=N0;Yc.jsxs=N0;D0.exports=Yc;var ee=D0.exports,P0={exports:{}},we={};/**
|
|
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 tg=Symbol.for("react.transitional.element"),Gx=Symbol.for("react.portal"),jx=Symbol.for("react.fragment"),Vx=Symbol.for("react.strict_mode"),Fx=Symbol.for("react.profiler"),qx=Symbol.for("react.consumer"),Yx=Symbol.for("react.context"),Xx=Symbol.for("react.forward_ref"),Kx=Symbol.for("react.suspense"),Qx=Symbol.for("react.memo"),I0=Symbol.for("react.lazy"),Zx=Symbol.for("react.activity"),hy=Symbol.iterator;function Wx(e){return e===null||typeof e!="object"?null:(e=hy&&e[hy]||e["@@iterator"],typeof e=="function"?e:null)}var z0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B0=Object.assign,U0={};function Da(e,t,n){this.props=e,this.context=t,this.refs=U0,this.updater=n||z0}Da.prototype.isReactComponent={};Da.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Da.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $0(){}$0.prototype=Da.prototype;function ng(e,t,n){this.props=e,this.context=t,this.refs=U0,this.updater=n||z0}var rg=ng.prototype=new $0;rg.constructor=ng;B0(rg,Da.prototype);rg.isPureReactComponent=!0;var py=Array.isArray;function Sh(){}var Ze={H:null,A:null,T:null,S:null},H0=Object.prototype.hasOwnProperty;function og(e,t,n){var r=n.ref;return{$$typeof:tg,type:e,key:t,ref:r!==void 0?r:null,props:n}}function Jx(e,t){return og(e.type,t,e.props)}function ig(e){return typeof e=="object"&&e!==null&&e.$$typeof===tg}function e1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var gy=/\/+/g;function rd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?e1(""+e.key):t.toString(36)}function t1(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Sh,Sh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function zi(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case tg:case Gx:a=!0;break;case I0:return a=e._init,zi(a(e._payload),t,n,r,o)}}if(a)return o=o(e),a=r===""?"."+rd(e,0):r,py(o)?(n="",a!=null&&(n=a.replace(gy,"$&/")+"/"),zi(o,t,n,"",function(u){return u})):o!=null&&(ig(o)&&(o=Jx(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(gy,"$&/")+"/")+a)),t.push(o)),1;a=0;var l=r===""?".":r+":";if(py(e))for(var s=0;s<e.length;s++)r=e[s],i=l+rd(r,s),a+=zi(r,t,n,i,o);else if(s=Wx(e),typeof s=="function")for(e=s.call(e),s=0;!(r=e.next()).done;)r=r.value,i=l+rd(r,s++),a+=zi(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return zi(t1(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function zs(e,t,n){if(e==null)return e;var r=[],o=0;return zi(e,r,"","",function(i){return t.call(n,i,o++)}),r}function n1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var my=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},r1={map:zs,forEach:function(e,t,n){zs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return zs(e,function(){t++}),t},toArray:function(e){return zs(e,function(t){return t})||[]},only:function(e){if(!ig(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Activity=Zx;we.Children=r1;we.Component=Da;we.Fragment=jx;we.Profiler=Fx;we.PureComponent=ng;we.StrictMode=Vx;we.Suspense=Kx;we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;we.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};we.cache=function(e){return function(){return e.apply(null,arguments)}};we.cacheSignal=function(){return null};we.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=B0({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!H0.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];r.children=a}return og(e.type,o,r)};we.createContext=function(e){return e={$$typeof:Yx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:qx,_context:e},e};we.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)H0.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return og(e,i,o)};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:Xx,render:e}};we.isValidElement=ig;we.lazy=function(e){return{$$typeof:I0,_payload:{_status:-1,_result:e},_init:n1}};we.memo=function(e,t){return{$$typeof:Qx,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var r=e(),o=Ze.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Sh,my)}catch(i){my(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ze.T=t}};we.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};we.use=function(e){return Ze.H.use(e)};we.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};we.useCallback=function(e,t){return Ze.H.useCallback(e,t)};we.useContext=function(e){return Ze.H.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};we.useEffect=function(e,t){return Ze.H.useEffect(e,t)};we.useEffectEvent=function(e){return Ze.H.useEffectEvent(e)};we.useId=function(){return Ze.H.useId()};we.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};we.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};we.useMemo=function(e,t){return Ze.H.useMemo(e,t)};we.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};we.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};we.useRef=function(e){return Ze.H.useRef(e)};we.useState=function(e){return Ze.H.useState(e)};we.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};we.useTransition=function(){return Ze.H.useTransition()};we.version="19.2.5";P0.exports=we;var g=P0.exports;const o1=Ux(g),Xc=Bx({__proto__:null,default:o1},[g]);var G0={exports:{}},Kc={},j0={exports:{}},V0={};/**
|
|
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
|
+
*/(function(e){function t(x,N){var _=x.length;x.push(N);e:for(;0<_;){var k=_-1>>>1,P=x[k];if(0<o(P,N))x[k]=N,x[_]=P,_=k;else break e}}function n(x){return x.length===0?null:x[0]}function r(x){if(x.length===0)return null;var N=x[0],_=x.pop();if(_!==N){x[0]=_;e:for(var k=0,P=x.length,q=P>>>1;k<q;){var U=2*(k+1)-1,G=x[U],ue=U+1,te=x[ue];if(0>o(G,_))ue<P&&0>o(te,G)?(x[k]=te,x[ue]=_,k=ue):(x[k]=G,x[U]=_,k=U);else if(ue<P&&0>o(te,_))x[k]=te,x[ue]=_,k=ue;else break e}}return N}function o(x,N){var _=x.sortIndex-N.sortIndex;return _!==0?_:x.id-N.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],f=1,c=null,d=3,h=!1,m=!1,v=!1,E=!1,y=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function S(x){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=x)r(u),N.sortIndex=N.expirationTime,t(s,N);else break;N=n(u)}}function w(x){if(v=!1,S(x),!m)if(n(s)!==null)m=!0,C||(C=!0,B());else{var N=n(u);N!==null&&M(w,N.startTime-x)}}var C=!1,R=-1,T=5,O=-1;function L(){return E?!0:!(e.unstable_now()-O<T)}function I(){if(E=!1,C){var x=e.unstable_now();O=x;var N=!0;try{e:{m=!1,v&&(v=!1,p(R),R=-1),h=!0;var _=d;try{t:{for(S(x),c=n(s);c!==null&&!(c.expirationTime>x&&L());){var k=c.callback;if(typeof k=="function"){c.callback=null,d=c.priorityLevel;var P=k(c.expirationTime<=x);if(x=e.unstable_now(),typeof P=="function"){c.callback=P,S(x),N=!0;break t}c===n(s)&&r(s),S(x)}else r(s);c=n(s)}if(c!==null)N=!0;else{var q=n(u);q!==null&&M(w,q.startTime-x),N=!1}}break e}finally{c=null,d=_,h=!1}N=void 0}}finally{N?B():C=!1}}}var B;if(typeof b=="function")B=function(){b(I)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,D=A.port2;A.port1.onmessage=I,B=function(){D.postMessage(null)}}else B=function(){y(I,0)};function M(x,N){R=y(function(){x(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(x){x.callback=null},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(x){switch(d){case 1:case 2:case 3:var N=3;break;default:N=d}var _=d;d=N;try{return x()}finally{d=_}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(x,N){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var _=d;d=x;try{return N()}finally{d=_}},e.unstable_scheduleCallback=function(x,N,_){var k=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?k+_:k):_=k,x){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=_+P,x={id:f++,callback:N,priorityLevel:x,startTime:_,expirationTime:P,sortIndex:-1},_>k?(x.sortIndex=_,t(u,x),n(s)===null&&x===n(u)&&(v?(p(R),R=-1):v=!0,M(w,_-k))):(x.sortIndex=P,t(s,x),m||h||(m=!0,C||(C=!0,B()))),x},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(x){var N=d;return function(){var _=d;d=N;try{return x.apply(this,arguments)}finally{d=_}}}})(V0);j0.exports=V0;var i1=j0.exports,F0={exports:{}},Kt={};/**
|
|
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 a1=g;function q0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Qr(){}var Yt={d:{f:Qr,r:function(){throw Error(q0(522))},D:Qr,C:Qr,L:Qr,m:Qr,X:Qr,S:Qr,M:Qr},p:0,findDOMNode:null},l1=Symbol.for("react.portal");function s1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l1,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var vl=a1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Qc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(q0(299));return s1(e,t,null,n)};Kt.flushSync=function(e){var t=vl.T,n=Yt.p;try{if(vl.T=null,Yt.p=2,e)return e()}finally{vl.T=t,Yt.p=n,Yt.d.f()}};Kt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};Kt.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};Kt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Qc(n,t.crossOrigin),o=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:i}):n==="script"&&Yt.d.X(e,{crossOrigin:r,integrity:o,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Kt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Qc(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};Kt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Qc(n,t.crossOrigin);Yt.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Kt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Qc(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};Kt.requestFormReset=function(e){Yt.d.r(e)};Kt.unstable_batchedUpdates=function(e,t){return e(t)};Kt.useFormState=function(e,t,n){return vl.H.useFormState(e,t,n)};Kt.useFormStatus=function(){return vl.H.useHostTransitionStatus()};Kt.version="19.2.5";function Y0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Y0)}catch(e){console.error(e)}}Y0(),F0.exports=Kt;var zt=F0.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 Rt=i1,X0=g,u1=zt;function $(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function K0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Q0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Z0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yy(e){if(cs(e)!==e)throw Error($(188))}function c1(e){var t=e.alternate;if(!t){if(t=cs(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return yy(o),e;if(i===r)return yy(o),t;i=i.sibling}throw Error($(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function W0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=W0(e),t!==null)return t;e=e.sibling}return null}var We=Object.assign,f1=Symbol.for("react.element"),Bs=Symbol.for("react.transitional.element"),fl=Symbol.for("react.portal"),Gi=Symbol.for("react.fragment"),J0=Symbol.for("react.strict_mode"),Eh=Symbol.for("react.profiler"),eS=Symbol.for("react.consumer"),Or=Symbol.for("react.context"),ag=Symbol.for("react.forward_ref"),wh=Symbol.for("react.suspense"),Rh=Symbol.for("react.suspense_list"),lg=Symbol.for("react.memo"),eo=Symbol.for("react.lazy"),Ch=Symbol.for("react.activity"),d1=Symbol.for("react.memo_cache_sentinel"),vy=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=vy&&e[vy]||e["@@iterator"],typeof e=="function"?e:null)}var h1=Symbol.for("react.client.reference");function _h(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===h1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gi:return"Fragment";case Eh:return"Profiler";case J0:return"StrictMode";case wh:return"Suspense";case Rh:return"SuspenseList";case Ch:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case fl:return"Portal";case Or:return e.displayName||"Context";case eS:return(e._context.displayName||"Context")+".Consumer";case ag:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lg:return t=e.displayName||null,t!==null?t:_h(e.type)||"Memo";case eo:t=e._payload,e=e._init;try{return _h(e(t))}catch{}}return null}var dl=Array.isArray,ve=X0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Be=u1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oi={pending:!1,data:null,method:null,action:null},xh=[],ji=-1;function cr(e){return{current:e}}function Mt(e){0>ji||(e.current=xh[ji],xh[ji]=null,ji--)}function Xe(e,t){ji++,xh[ji]=e.current,e.current=t}var ir=cr(null),Bl=cr(null),mo=cr(null),ju=cr(null);function Vu(e,t){switch(Xe(mo,t),Xe(Bl,e),Xe(ir,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cv(t),e=Sw(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Mt(ir),Xe(ir,e)}function pa(){Mt(ir),Mt(Bl),Mt(mo)}function Th(e){e.memoizedState!==null&&Xe(ju,e);var t=ir.current,n=Sw(t,e.type);t!==n&&(Xe(Bl,e),Xe(ir,n))}function Fu(e){Bl.current===e&&(Mt(ir),Mt(Bl)),ju.current===e&&(Mt(ju),Kl._currentValue=oi)}var od,by;function Xo(e){if(od===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);od=t&&t[1]||"",by=-1<n.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+od+e+by}var id=!1;function ad(e,t){if(!e||id)return"";id=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(h){var d=h}Reflect.construct(e,[],c)}else{try{c.call()}catch(h){d=h}e.call(c.prototype)}}else{try{throw Error()}catch(h){d=h}(c=e())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var s=a.split(`
|
|
45
|
+
`),u=l.split(`
|
|
46
|
+
`);for(o=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;o<u.length&&!u[o].includes("DetermineComponentFrameRoot");)o++;if(r===s.length||o===u.length)for(r=s.length-1,o=u.length-1;1<=r&&0<=o&&s[r]!==u[o];)o--;for(;1<=r&&0<=o;r--,o--)if(s[r]!==u[o]){if(r!==1||o!==1)do if(r--,o--,0>o||s[r]!==u[o]){var f=`
|
|
47
|
+
`+s[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=o);break}}}finally{id=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Xo(n):""}function p1(e,t){switch(e.tag){case 26:case 27:case 5:return Xo(e.type);case 16:return Xo("Lazy");case 13:return e.child!==t&&t!==null?Xo("Suspense Fallback"):Xo("Suspense");case 19:return Xo("SuspenseList");case 0:case 15:return ad(e.type,!1);case 11:return ad(e.type.render,!1);case 1:return ad(e.type,!0);case 31:return Xo("Activity");default:return""}}function Sy(e){try{var t="",n=null;do t+=p1(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
48
|
+
Error generating stack: `+r.message+`
|
|
49
|
+
`+r.stack}}var Ah=Object.prototype.hasOwnProperty,sg=Rt.unstable_scheduleCallback,ld=Rt.unstable_cancelCallback,g1=Rt.unstable_shouldYield,m1=Rt.unstable_requestPaint,yn=Rt.unstable_now,y1=Rt.unstable_getCurrentPriorityLevel,tS=Rt.unstable_ImmediatePriority,nS=Rt.unstable_UserBlockingPriority,qu=Rt.unstable_NormalPriority,v1=Rt.unstable_LowPriority,rS=Rt.unstable_IdlePriority,b1=Rt.log,S1=Rt.unstable_setDisableYieldValue,fs=null,vn=null;function so(e){if(typeof b1=="function"&&S1(e),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(fs,e)}catch{}}var bn=Math.clz32?Math.clz32:R1,E1=Math.log,w1=Math.LN2;function R1(e){return e>>>=0,e===0?32:31-(E1(e)/w1|0)|0}var Us=256,$s=262144,Hs=4194304;function Ko(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Zc(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=r&134217727;return l!==0?(r=l&~i,r!==0?o=Ko(r):(a&=l,a!==0?o=Ko(a):n||(n=l&~e,n!==0&&(o=Ko(n))))):(l=r&~i,l!==0?o=Ko(l):a!==0?o=Ko(a):n||(n=r&~e,n!==0&&(o=Ko(n)))),o===0?0:t!==0&&t!==o&&!(t&i)&&(i=o&-o,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:o}function ds(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function C1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oS(){var e=Hs;return Hs<<=1,!(Hs&62914560)&&(Hs=4194304),e}function sd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _1(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var f=31-bn(n),c=1<<f;l[f]=0,s[f]=-1;var d=u[f];if(d!==null)for(u[f]=null,f=0;f<d.length;f++){var h=d[f];h!==null&&(h.lane&=-536870913)}n&=~c}r!==0&&iS(e,r,0),i!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function iS(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-bn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function aS(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-bn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function lS(e,t){var n=t&-t;return n=n&42?1:ug(n),n&(e.suspendedLanes|t)?0:n}function ug(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cg(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function sS(){var e=Be.p;return e!==0?e:(e=window.event,e===void 0?32:kw(e.type))}function Ey(e,t){var n=Be.p;try{return Be.p=e,t()}finally{Be.p=n}}var No=Math.random().toString(36).slice(2),Dt="__reactFiber$"+No,on="__reactProps$"+No,Na="__reactContainer$"+No,Oh="__reactEvents$"+No,x1="__reactListeners$"+No,T1="__reactHandles$"+No,wy="__reactResources$"+No,ps="__reactMarker$"+No;function fg(e){delete e[Dt],delete e[on],delete e[Oh],delete e[x1],delete e[T1]}function Vi(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Na]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ov(e);e!==null;){if(n=e[Dt])return n;e=Ov(e)}return t}e=n,n=e.parentNode}return null}function Pa(e){if(e=e[Dt]||e[Na]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function hl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error($(33))}function ta(e){var t=e[wy];return t||(t=e[wy]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[ps]=!0}var uS=new Set,cS={};function wi(e,t){ga(e,t),ga(e+"Capture",t)}function ga(e,t){for(cS[e]=t,e=0;e<t.length;e++)uS.add(t[e])}var A1=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]*$"),Ry={},Cy={};function O1(e){return Ah.call(Cy,e)?!0:Ah.call(Ry,e)?!1:A1.test(e)?Cy[e]=!0:(Ry[e]=!0,!1)}function mu(e,t,n){if(O1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Gs(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function vr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M1(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mh(e){if(!e._valueTracker){var t=fS(e)?"checked":"value";e._valueTracker=M1(e,t,""+e[t])}}function dS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var k1=/[\n"\\]/g;function kn(e){return e.replace(k1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function kh(e,t,n,r,o,i,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tn(t)):e.value!==""+Tn(t)&&(e.value=""+Tn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?Lh(e,a,Tn(t)):n!=null?Lh(e,a,Tn(n)):r!=null&&e.removeAttribute("value"),o==null&&i!=null&&(e.defaultChecked=!!i),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Tn(l):e.removeAttribute("name")}function hS(e,t,n,r,o,i,a,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Mh(e);return}n=n!=null?""+Tn(n):"",t=t!=null?""+Tn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),Mh(e)}function Lh(e,t,n){t==="number"&&Yu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function na(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Tn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function pS(e,t,n){if(t!=null&&(t=""+Tn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Tn(n):""}function gS(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error($(92));if(dl(r)){if(1<r.length)throw Error($(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Tn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Mh(e)}function ma(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var L1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _y(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||L1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function mS(e,t,n){if(t!=null&&typeof t!="object")throw Error($(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&_y(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&_y(e,i,t[i])}function dg(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var D1=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"]]),N1=/^[\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 yu(e){return N1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Mr(){}var Dh=null;function hg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fi=null,ra=null;function xy(e){var t=Pa(e);if(t&&(e=t.stateNode)){var n=e[on]||null;e:switch(e=t.stateNode,t.type){case"input":if(kh(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[on]||null;if(!o)throw Error($(90));kh(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&dS(r)}break e;case"textarea":pS(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&na(e,!!n.multiple,t,!1)}}}var ud=!1;function yS(e,t,n){if(ud)return e(t,n);ud=!0;try{var r=e(t);return r}finally{if(ud=!1,(Fi!==null||ra!==null)&&(cf(),Fi&&(t=Fi,e=ra,ra=Fi=null,xy(t),e)))for(t=0;t<e.length;t++)xy(e[t])}}function Ul(e,t){var n=e.stateNode;if(n===null)return null;var r=n[on]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var zr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nh=!1;if(zr)try{var el={};Object.defineProperty(el,"passive",{get:function(){Nh=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Nh=!1}var uo=null,pg=null,vu=null;function vS(){if(vu)return vu;var e,t=pg,n=t.length,r,o="value"in uo?uo.value:uo.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return vu=o.slice(e,1<r?1-r:void 0)}function bu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function js(){return!0}function Ty(){return!1}function sn(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?js:Ty,this.isPropagationStopped=Ty,this}return We(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=js)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=js)},persist:function(){},isPersistent:js}),t}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wc=sn(Ri),gs=We({},Ri,{view:0,detail:0}),P1=sn(gs),cd,fd,tl,Jc=We({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tl&&(tl&&e.type==="mousemove"?(cd=e.screenX-tl.screenX,fd=e.screenY-tl.screenY):fd=cd=0,tl=e),cd)},movementY:function(e){return"movementY"in e?e.movementY:fd}}),Ay=sn(Jc),I1=We({},Jc,{dataTransfer:0}),z1=sn(I1),B1=We({},gs,{relatedTarget:0}),dd=sn(B1),U1=We({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),$1=sn(U1),H1=We({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),G1=sn(H1),j1=We({},Ri,{data:0}),Oy=sn(j1),V1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F1={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"},q1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q1[e])?!!t[e]:!1}function gg(){return Y1}var X1=We({},gs,{key:function(e){if(e.key){var t=V1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?F1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gg,charCode:function(e){return e.type==="keypress"?bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),K1=sn(X1),Q1=We({},Jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),My=sn(Q1),Z1=We({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gg}),W1=sn(Z1),J1=We({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),eT=sn(J1),tT=We({},Jc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nT=sn(tT),rT=We({},Ri,{newState:0,oldState:0}),oT=sn(rT),iT=[9,13,27,32],mg=zr&&"CompositionEvent"in window,bl=null;zr&&"documentMode"in document&&(bl=document.documentMode);var aT=zr&&"TextEvent"in window&&!bl,bS=zr&&(!mg||bl&&8<bl&&11>=bl),ky=" ",Ly=!1;function SS(e,t){switch(e){case"keyup":return iT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ES(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qi=!1;function lT(e,t){switch(e){case"compositionend":return ES(t);case"keypress":return t.which!==32?null:(Ly=!0,ky);case"textInput":return e=t.data,e===ky&&Ly?null:e;default:return null}}function sT(e,t){if(qi)return e==="compositionend"||!mg&&SS(e,t)?(e=vS(),vu=pg=uo=null,qi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bS&&t.locale!=="ko"?null:t.data;default:return null}}var uT={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 Dy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!uT[e.type]:t==="textarea"}function wS(e,t,n,r){Fi?ra?ra.push(r):ra=[r]:Fi=r,t=fc(t,"onChange"),0<t.length&&(n=new Wc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Sl=null,$l=null;function cT(e){yw(e,0)}function ef(e){var t=hl(e);if(dS(t))return e}function Ny(e,t){if(e==="change")return t}var RS=!1;if(zr){var hd;if(zr){var pd="oninput"in document;if(!pd){var Py=document.createElement("div");Py.setAttribute("oninput","return;"),pd=typeof Py.oninput=="function"}hd=pd}else hd=!1;RS=hd&&(!document.documentMode||9<document.documentMode)}function Iy(){Sl&&(Sl.detachEvent("onpropertychange",CS),$l=Sl=null)}function CS(e){if(e.propertyName==="value"&&ef($l)){var t=[];wS(t,$l,e,hg(e)),yS(cT,t)}}function fT(e,t,n){e==="focusin"?(Iy(),Sl=t,$l=n,Sl.attachEvent("onpropertychange",CS)):e==="focusout"&&Iy()}function dT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ef($l)}function hT(e,t){if(e==="click")return ef(t)}function pT(e,t){if(e==="input"||e==="change")return ef(t)}function gT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wn=typeof Object.is=="function"?Object.is:gT;function Hl(e,t){if(wn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ah.call(t,o)||!wn(e[o],t[o]))return!1}return!0}function zy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function By(e,t){var n=zy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zy(n)}}function _S(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_S(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yu(e.document)}return t}function yg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var mT=zr&&"documentMode"in document&&11>=document.documentMode,Yi=null,Ph=null,El=null,Ih=!1;function Uy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ih||Yi==null||Yi!==Yu(r)||(r=Yi,"selectionStart"in r&&yg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),El&&Hl(El,r)||(El=r,r=fc(Ph,"onSelect"),0<r.length&&(t=new Wc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Yi)))}function jo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xi={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionrun:jo("Transition","TransitionRun"),transitionstart:jo("Transition","TransitionStart"),transitioncancel:jo("Transition","TransitionCancel"),transitionend:jo("Transition","TransitionEnd")},gd={},TS={};zr&&(TS=document.createElement("div").style,"AnimationEvent"in window||(delete Xi.animationend.animation,delete Xi.animationiteration.animation,delete Xi.animationstart.animation),"TransitionEvent"in window||delete Xi.transitionend.transition);function Ci(e){if(gd[e])return gd[e];if(!Xi[e])return e;var t=Xi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in TS)return gd[e]=t[n];return e}var AS=Ci("animationend"),OS=Ci("animationiteration"),MS=Ci("animationstart"),yT=Ci("transitionrun"),vT=Ci("transitionstart"),bT=Ci("transitioncancel"),kS=Ci("transitionend"),LS=new Map,zh="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(" ");zh.push("scrollEnd");function Wn(e,t){LS.set(e,t),wi(t,[e])}var Xu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xn=[],Ki=0,vg=0;function tf(){for(var e=Ki,t=vg=Ki=0;t<e;){var n=xn[t];xn[t++]=null;var r=xn[t];xn[t++]=null;var o=xn[t];xn[t++]=null;var i=xn[t];if(xn[t++]=null,r!==null&&o!==null){var a=r.pending;a===null?o.next=o:(o.next=a.next,a.next=o),r.pending=o}i!==0&&DS(n,o,i)}}function nf(e,t,n,r){xn[Ki++]=e,xn[Ki++]=t,xn[Ki++]=n,xn[Ki++]=r,vg|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bg(e,t,n,r){return nf(e,t,n,r),Ku(e)}function _i(e,t){return nf(e,null,null,t),Ku(e)}function DS(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var o=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(o=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,o&&t!==null&&(o=31-bn(n),e=i.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=n|536870912),i):null}function Ku(e){if(50<Ml)throw Ml=0,op=null,Error($(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qi={};function ST(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,r){return new ST(e,t,n,r)}function Sg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dr(e,t){var n=e.alternate;return n===null?(n=gn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function NS(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Su(e,t,n,r,o,i){var a=0;if(r=e,typeof e=="function")Sg(e)&&(a=1);else if(typeof e=="string")a=_A(e,n,ir.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ch:return e=gn(31,n,t,o),e.elementType=Ch,e.lanes=i,e;case Gi:return ii(n.children,o,i,t);case J0:a=8,o|=24;break;case Eh:return e=gn(12,n,t,o|2),e.elementType=Eh,e.lanes=i,e;case wh:return e=gn(13,n,t,o),e.elementType=wh,e.lanes=i,e;case Rh:return e=gn(19,n,t,o),e.elementType=Rh,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Or:a=10;break e;case eS:a=9;break e;case ag:a=11;break e;case lg:a=14;break e;case eo:a=16,r=null;break e}a=29,n=Error($(130,e===null?"null":typeof e,"")),r=null}return t=gn(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ii(e,t,n,r){return e=gn(7,e,r,t),e.lanes=n,e}function md(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function PS(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function yd(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var $y=new WeakMap;function Ln(e,t){if(typeof e=="object"&&e!==null){var n=$y.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Sy(t)},$y.set(e,t),t)}return{value:e,source:t,stack:Sy(t)}}var Zi=[],Wi=0,Qu=null,Gl=0,An=[],On=0,Mo=null,nr=1,rr="";function _r(e,t){Zi[Wi++]=Gl,Zi[Wi++]=Qu,Qu=e,Gl=t}function IS(e,t,n){An[On++]=nr,An[On++]=rr,An[On++]=Mo,Mo=e;var r=nr;e=rr;var o=32-bn(r)-1;r&=~(1<<o),n+=1;var i=32-bn(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,nr=1<<32-bn(t)+o|n<<o|r,rr=i+e}else nr=1<<i|n<<o|r,rr=e}function Eg(e){e.return!==null&&(_r(e,1),IS(e,1,0))}function wg(e){for(;e===Qu;)Qu=Zi[--Wi],Zi[Wi]=null,Gl=Zi[--Wi],Zi[Wi]=null;for(;e===Mo;)Mo=An[--On],An[On]=null,rr=An[--On],An[On]=null,nr=An[--On],An[On]=null}function zS(e,t){An[On++]=nr,An[On++]=rr,An[On++]=Mo,nr=t.id,rr=t.overflow,Mo=e}var Nt=null,Qe=null,Le=!1,yo=null,Dn=!1,Bh=Error($(519));function ko(e){var t=Error($(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw jl(Ln(t,e)),Bh}function Hy(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[on]=r,n){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(n=0;n<Yl.length;n++)Oe(Yl[n],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),hS(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),gS(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||bw(t.textContent,n)?(r.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),r.onScroll!=null&&Oe("scroll",t),r.onScrollEnd!=null&&Oe("scrollend",t),r.onClick!=null&&(t.onclick=Mr),t=!0):t=!1,t||ko(e,!0)}function Gy(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:Nt=Nt.return}}function Di(e){if(e!==Nt)return!1;if(!Le)return Gy(e),Le=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||up(e.type,e.memoizedProps)),n=!n),n&&Qe&&ko(e),Gy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));Qe=Av(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));Qe=Av(e)}else t===27?(t=Qe,Po(e.type)?(e=hp,hp=null,Qe=e):Qe=t):Qe=Nt?Bn(e.stateNode.nextSibling):null;return!0}function fi(){Qe=Nt=null,Le=!1}function vd(){var e=yo;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),yo=null),e}function jl(e){yo===null?yo=[e]:yo.push(e)}var Uh=cr(null),xi=null,kr=null;function no(e,t,n){Xe(Uh,t._currentValue),t._currentValue=n}function Nr(e){e._currentValue=Uh.current,Mt(Uh)}function $h(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hh(e,t,n,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var i=o.dependencies;if(i!==null){var a=o.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=o;for(var s=0;s<t.length;s++)if(l.context===t[s]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),$h(i.return,n,e),r||(a=null);break e}i=l.next}}else if(o.tag===18){if(a=o.return,a===null)throw Error($(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),$h(a,n,e),a=null}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}}function Ia(e,t,n,r){e=null;for(var o=t,i=!1;o!==null;){if(!i){if(o.flags&524288)i=!0;else if(o.flags&262144)break}if(o.tag===10){var a=o.alternate;if(a===null)throw Error($(387));if(a=a.memoizedProps,a!==null){var l=o.type;wn(o.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(o===ju.current){if(a=o.alternate,a===null)throw Error($(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Kl):e=[Kl])}o=o.return}e!==null&&Hh(t,e,n,r),t.flags|=262144}function Zu(e){for(e=e.firstContext;e!==null;){if(!wn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function di(e){xi=e,kr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return BS(xi,e)}function Vs(e,t){return xi===null&&di(e),BS(e,t)}function BS(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},kr===null){if(e===null)throw Error($(308));kr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else kr=kr.next=t;return n}var ET=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},wT=Rt.unstable_scheduleCallback,RT=Rt.unstable_NormalPriority,mt={$$typeof:Or,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rg(){return{controller:new ET,data:new Map,refCount:0}}function ms(e){e.refCount--,e.refCount===0&&wT(RT,function(){e.controller.abort()})}var wl=null,Gh=0,ya=0,oa=null;function CT(e,t){if(wl===null){var n=wl=[];Gh=0,ya=Xg(),oa={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Gh++,t.then(jy,jy),t}function jy(){if(--Gh===0&&wl!==null){oa!==null&&(oa.status="fulfilled");var e=wl;wl=null,ya=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _T(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),r}var Vy=ve.S;ve.S=function(e,t){WE=yn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&CT(e,t),Vy!==null&&Vy(e,t)};var ai=cr(null);function Cg(){var e=ai.current;return e!==null?e:Fe.pooledCache}function Eu(e,t){t===null?Xe(ai,ai.current):Xe(ai,t.pool)}function US(){var e=Cg();return e===null?null:{parent:mt._currentValue,pool:e}}var za=Error($(460)),_g=Error($(474)),rf=Error($(542)),Wu={then:function(){}};function Fy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $S(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Mr,Mr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yy(e),e;default:if(typeof t.status=="string")t.then(Mr,Mr);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error($(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yy(e),e}throw li=t,za}}function Qo(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(li=n,za):n}}var li=null;function qy(){if(li===null)throw Error($(459));var e=li;return li=null,e}function Yy(e){if(e===za||e===rf)throw Error($(483))}var ia=null,Vl=0;function Fs(e){var t=Vl;return Vl+=1,ia===null&&(ia=[]),$S(ia,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function qs(e,t){throw t.$$typeof===f1?Error($(525)):(e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function HS(e){function t(y,p){if(e){var b=y.deletions;b===null?(y.deletions=[p],y.flags|=16):b.push(p)}}function n(y,p){if(!e)return null;for(;p!==null;)t(y,p),p=p.sibling;return null}function r(y){for(var p=new Map;y!==null;)y.key!==null?p.set(y.key,y):p.set(y.index,y),y=y.sibling;return p}function o(y,p){return y=Dr(y,p),y.index=0,y.sibling=null,y}function i(y,p,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<p?(y.flags|=67108866,p):b):(y.flags|=67108866,p)):(y.flags|=1048576,p)}function a(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function l(y,p,b,S){return p===null||p.tag!==6?(p=md(b,y.mode,S),p.return=y,p):(p=o(p,b),p.return=y,p)}function s(y,p,b,S){var w=b.type;return w===Gi?f(y,p,b.props.children,S,b.key):p!==null&&(p.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===eo&&Qo(w)===p.type)?(p=o(p,b.props),nl(p,b),p.return=y,p):(p=Su(b.type,b.key,b.props,null,y.mode,S),nl(p,b),p.return=y,p)}function u(y,p,b,S){return p===null||p.tag!==4||p.stateNode.containerInfo!==b.containerInfo||p.stateNode.implementation!==b.implementation?(p=yd(b,y.mode,S),p.return=y,p):(p=o(p,b.children||[]),p.return=y,p)}function f(y,p,b,S,w){return p===null||p.tag!==7?(p=ii(b,y.mode,S,w),p.return=y,p):(p=o(p,b),p.return=y,p)}function c(y,p,b){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=md(""+p,y.mode,b),p.return=y,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Bs:return b=Su(p.type,p.key,p.props,null,y.mode,b),nl(b,p),b.return=y,b;case fl:return p=yd(p,y.mode,b),p.return=y,p;case eo:return p=Qo(p),c(y,p,b)}if(dl(p)||Ja(p))return p=ii(p,y.mode,b,null),p.return=y,p;if(typeof p.then=="function")return c(y,Fs(p),b);if(p.$$typeof===Or)return c(y,Vs(y,p),b);qs(y,p)}return null}function d(y,p,b,S){var w=p!==null?p.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return w!==null?null:l(y,p,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Bs:return b.key===w?s(y,p,b,S):null;case fl:return b.key===w?u(y,p,b,S):null;case eo:return b=Qo(b),d(y,p,b,S)}if(dl(b)||Ja(b))return w!==null?null:f(y,p,b,S,null);if(typeof b.then=="function")return d(y,p,Fs(b),S);if(b.$$typeof===Or)return d(y,p,Vs(y,b),S);qs(y,b)}return null}function h(y,p,b,S,w){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return y=y.get(b)||null,l(p,y,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Bs:return y=y.get(S.key===null?b:S.key)||null,s(p,y,S,w);case fl:return y=y.get(S.key===null?b:S.key)||null,u(p,y,S,w);case eo:return S=Qo(S),h(y,p,b,S,w)}if(dl(S)||Ja(S))return y=y.get(b)||null,f(p,y,S,w,null);if(typeof S.then=="function")return h(y,p,b,Fs(S),w);if(S.$$typeof===Or)return h(y,p,b,Vs(p,S),w);qs(p,S)}return null}function m(y,p,b,S){for(var w=null,C=null,R=p,T=p=0,O=null;R!==null&&T<b.length;T++){R.index>T?(O=R,R=null):O=R.sibling;var L=d(y,R,b[T],S);if(L===null){R===null&&(R=O);break}e&&R&&L.alternate===null&&t(y,R),p=i(L,p,T),C===null?w=L:C.sibling=L,C=L,R=O}if(T===b.length)return n(y,R),Le&&_r(y,T),w;if(R===null){for(;T<b.length;T++)R=c(y,b[T],S),R!==null&&(p=i(R,p,T),C===null?w=R:C.sibling=R,C=R);return Le&&_r(y,T),w}for(R=r(R);T<b.length;T++)O=h(R,y,T,b[T],S),O!==null&&(e&&O.alternate!==null&&R.delete(O.key===null?T:O.key),p=i(O,p,T),C===null?w=O:C.sibling=O,C=O);return e&&R.forEach(function(I){return t(y,I)}),Le&&_r(y,T),w}function v(y,p,b,S){if(b==null)throw Error($(151));for(var w=null,C=null,R=p,T=p=0,O=null,L=b.next();R!==null&&!L.done;T++,L=b.next()){R.index>T?(O=R,R=null):O=R.sibling;var I=d(y,R,L.value,S);if(I===null){R===null&&(R=O);break}e&&R&&I.alternate===null&&t(y,R),p=i(I,p,T),C===null?w=I:C.sibling=I,C=I,R=O}if(L.done)return n(y,R),Le&&_r(y,T),w;if(R===null){for(;!L.done;T++,L=b.next())L=c(y,L.value,S),L!==null&&(p=i(L,p,T),C===null?w=L:C.sibling=L,C=L);return Le&&_r(y,T),w}for(R=r(R);!L.done;T++,L=b.next())L=h(R,y,T,L.value,S),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?T:L.key),p=i(L,p,T),C===null?w=L:C.sibling=L,C=L);return e&&R.forEach(function(B){return t(y,B)}),Le&&_r(y,T),w}function E(y,p,b,S){if(typeof b=="object"&&b!==null&&b.type===Gi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Bs:e:{for(var w=b.key;p!==null;){if(p.key===w){if(w=b.type,w===Gi){if(p.tag===7){n(y,p.sibling),S=o(p,b.props.children),S.return=y,y=S;break e}}else if(p.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===eo&&Qo(w)===p.type){n(y,p.sibling),S=o(p,b.props),nl(S,b),S.return=y,y=S;break e}n(y,p);break}else t(y,p);p=p.sibling}b.type===Gi?(S=ii(b.props.children,y.mode,S,b.key),S.return=y,y=S):(S=Su(b.type,b.key,b.props,null,y.mode,S),nl(S,b),S.return=y,y=S)}return a(y);case fl:e:{for(w=b.key;p!==null;){if(p.key===w)if(p.tag===4&&p.stateNode.containerInfo===b.containerInfo&&p.stateNode.implementation===b.implementation){n(y,p.sibling),S=o(p,b.children||[]),S.return=y,y=S;break e}else{n(y,p);break}else t(y,p);p=p.sibling}S=yd(b,y.mode,S),S.return=y,y=S}return a(y);case eo:return b=Qo(b),E(y,p,b,S)}if(dl(b))return m(y,p,b,S);if(Ja(b)){if(w=Ja(b),typeof w!="function")throw Error($(150));return b=w.call(b),v(y,p,b,S)}if(typeof b.then=="function")return E(y,p,Fs(b),S);if(b.$$typeof===Or)return E(y,p,Vs(y,b),S);qs(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,p!==null&&p.tag===6?(n(y,p.sibling),S=o(p,b),S.return=y,y=S):(n(y,p),S=md(b,y.mode,S),S.return=y,y=S),a(y)):n(y,p)}return function(y,p,b,S){try{Vl=0;var w=E(y,p,b,S);return ia=null,w}catch(R){if(R===za||R===rf)throw R;var C=gn(29,R,null,y.mode);return C.lanes=S,C.return=y,C}finally{}}}var hi=HS(!0),GS=HS(!1),to=!1;function xg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Ku(e),DS(e,null,n),t}return nf(e,r,t,n),Ku(e)}function Rl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,aS(e,n)}}function bd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Vh=!1;function Cl(){if(Vh){var e=oa;if(e!==null)throw e}}function _l(e,t,n,r){Vh=!1;var o=e.updateQueue;to=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?i=u:a.next=u,a=s;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=s))}if(i!==null){var c=o.baseState;a=0,f=u=s=null,l=i;do{var d=l.lane&-536870913,h=d!==l.lane;if(h?(ke&d)===d:(r&d)===d){d!==0&&d===ya&&(Vh=!0),f!==null&&(f=f.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var m=e,v=l;d=t;var E=n;switch(v.tag){case 1:if(m=v.payload,typeof m=="function"){c=m.call(E,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,d=typeof m=="function"?m.call(E,c,d):m,d==null)break e;c=We({},c,d);break e;case 2:to=!0}}d=l.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=o.callbacks,h===null?o.callbacks=[d]:h.push(d))}else h={lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=h,s=c):f=f.next=h,a|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);f===null&&(s=c),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=f,i===null&&(o.shared.lanes=0),Do|=a,e.lanes=a,e.memoizedState=c}}function jS(e,t){if(typeof e!="function")throw Error($(191,e));e.call(t)}function VS(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)jS(n[e],t)}var va=cr(null),Ju=cr(0);function Xy(e,t){e=Hr,Xe(Ju,e),Xe(va,t),Hr=e|t.baseLanes}function Fh(){Xe(Ju,Hr),Xe(va,va.current)}function Tg(){Hr=Ju.current,Mt(va),Mt(Ju)}var Rn=cr(null),zn=null;function ro(e){var t=e.alternate;Xe(ft,ft.current&1),Xe(Rn,e),zn===null&&(t===null||va.current!==null||t.memoizedState!==null)&&(zn=e)}function qh(e){Xe(ft,ft.current),Xe(Rn,e),zn===null&&(zn=e)}function FS(e){e.tag===22?(Xe(ft,ft.current),Xe(Rn,e),zn===null&&(zn=e)):oo()}function oo(){Xe(ft,ft.current),Xe(Rn,Rn.current)}function hn(e){Mt(Rn),zn===e&&(zn=null),Mt(ft)}var ft=cr(0);function ec(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||fp(n)||dp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Br=0,Ce=null,Ve=null,pt=null,tc=!1,aa=!1,pi=!1,nc=0,Fl=0,la=null,xT=0;function ot(){throw Error($(321))}function Ag(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wn(e[n],t[n]))return!1;return!0}function Og(e,t,n,r,o,i){return Br=i,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ve.H=e===null||e.memoizedState===null?wE:$g,pi=!1,i=n(r,o),pi=!1,aa&&(i=YS(t,n,r,o)),qS(e),i}function qS(e){ve.H=ql;var t=Ve!==null&&Ve.next!==null;if(Br=0,pt=Ve=Ce=null,tc=!1,Fl=0,la=null,t)throw Error($(300));e===null||vt||(e=e.dependencies,e!==null&&Zu(e)&&(vt=!0))}function YS(e,t,n,r){Ce=e;var o=0;do{if(aa&&(la=null),Fl=0,aa=!1,25<=o)throw Error($(301));if(o+=1,pt=Ve=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ve.H=RE,i=t(n,r)}while(aa);return i}function TT(){var e=ve.H,t=e.useState()[0];return t=typeof t.then=="function"?ys(t):t,e=e.useState()[0],(Ve!==null?Ve.memoizedState:null)!==e&&(Ce.flags|=1024),t}function Mg(){var e=nc!==0;return nc=0,e}function kg(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Lg(e){if(tc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tc=!1}Br=0,pt=Ve=Ce=null,aa=!1,Fl=nc=0,la=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ce.memoizedState=pt=e:pt=pt.next=e,pt}function dt(){if(Ve===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=pt===null?Ce.memoizedState:pt.next;if(t!==null)pt=t,Ve=e;else{if(e===null)throw Ce.alternate===null?Error($(467)):Error($(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},pt===null?Ce.memoizedState=pt=e:pt=pt.next=e}return pt}function of(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ys(e){var t=Fl;return Fl+=1,la===null&&(la=[]),e=$S(la,e,t),t=Ce,(pt===null?t.memoizedState:pt.next)===null&&(t=t.alternate,ve.H=t===null||t.memoizedState===null?wE:$g),e}function af(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ys(e);if(e.$$typeof===Or)return Pt(e)}throw Error($(438,String(e)))}function Dg(e){var t=null,n=Ce.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Ce.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=of(),Ce.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=d1;return t.index++,n}function Ur(e,t){return typeof t=="function"?t(e):t}function wu(e){var t=dt();return Ng(t,Ve,e)}function Ng(e,t,n){var r=e.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,o===null)e.memoizedState=i;else{t=o.next;var l=a=null,s=null,u=t,f=!1;do{var c=u.lane&-536870913;if(c!==u.lane?(ke&c)===c:(Br&c)===c){var d=u.revertLane;if(d===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),c===ya&&(f=!0);else if((Br&d)===d){u=u.next,d===ya&&(f=!0);continue}else c={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=c,a=i):s=s.next=c,Ce.lanes|=d,Do|=d;c=u.action,pi&&n(i,c),i=u.hasEagerState?u.eagerState:n(i,c)}else d={lane:c,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=d,a=i):s=s.next=d,Ce.lanes|=c,Do|=c;u=u.next}while(u!==null&&u!==t);if(s===null?a=i:s.next=l,!wn(i,e.memoizedState)&&(vt=!0,f&&(n=oa,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=s,r.lastRenderedState=i}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Sd(e){var t=dt(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);wn(i,t.memoizedState)||(vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function XS(e,t,n){var r=Ce,o=dt(),i=Le;if(i){if(n===void 0)throw Error($(407));n=n()}else n=t();var a=!wn((Ve||o).memoizedState,n);if(a&&(o.memoizedState=n,vt=!0),o=o.queue,Pg(ZS.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||pt!==null&&pt.memoizedState.tag&1){if(r.flags|=2048,ba(9,{destroy:void 0},QS.bind(null,r,o,n,t),null),Fe===null)throw Error($(349));i||Br&127||KS(r,t,n)}return n}function KS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ce.updateQueue,t===null?(t=of(),Ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function QS(e,t,n,r){t.value=n,t.getSnapshot=r,WS(t)&&JS(e)}function ZS(e,t,n){return n(function(){WS(t)&&JS(e)})}function WS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wn(e,n)}catch{return!0}}function JS(e){var t=_i(e,2);t!==null&&nn(t,e,2)}function Yh(e){var t=qt();if(typeof e=="function"){var n=e;if(e=n(),pi){so(!0);try{n()}finally{so(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:e},t}function eE(e,t,n,r){return e.baseState=n,Ng(e,Ve,typeof r=="function"?r:Ur)}function AT(e,t,n,r,o){if(sf(e))throw Error($(485));if(e=t.action,e!==null){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};ve.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,tE(t,i)):(i.next=n.next,t.pending=n.next=i)}}function tE(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=ve.T,a={};ve.T=a;try{var l=n(o,r),s=ve.S;s!==null&&s(a,l),Ky(e,t,l)}catch(u){Xh(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),ve.T=i}}else try{i=n(o,r),Ky(e,t,i)}catch(u){Xh(e,t,u)}}function Ky(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){Qy(e,t,r)},function(r){return Xh(e,t,r)}):Qy(e,t,n)}function Qy(e,t,n){t.status="fulfilled",t.value=n,nE(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,tE(e,n)))}function Xh(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,nE(t),t=t.next;while(t!==r)}e.action=null}function nE(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rE(e,t){return t}function Zy(e,t){if(Le){var n=Fe.formState;if(n!==null){e:{var r=Ce;if(Le){if(Qe){t:{for(var o=Qe,i=Dn;o.nodeType!==8;){if(!i){o=null;break t}if(o=Bn(o.nextSibling),o===null){o=null;break t}}i=o.data,o=i==="F!"||i==="F"?o:null}if(o){Qe=Bn(o.nextSibling),r=o.data==="F!";break e}}ko(r)}r=!1}r&&(t=n[0])}}return n=qt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rE,lastRenderedState:t},n.queue=r,n=bE.bind(null,Ce,r),r.dispatch=n,r=Yh(!1),i=Ug.bind(null,Ce,!1,r.queue),r=qt(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,n=AT.bind(null,Ce,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Wy(e){var t=dt();return oE(t,Ve,e)}function oE(e,t,n){if(t=Ng(e,t,rE)[0],e=wu(Ur)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ys(t)}catch(a){throw a===za?rf:a}else r=t;t=dt();var o=t.queue,i=o.dispatch;return n!==t.memoizedState&&(Ce.flags|=2048,ba(9,{destroy:void 0},OT.bind(null,o,n),null)),[r,i,e]}function OT(e,t){e.action=t}function Jy(e){var t=dt(),n=Ve;if(n!==null)return oE(t,n,e);dt(),t=t.memoizedState,n=dt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ba(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=of(),Ce.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function iE(){return dt().memoizedState}function Ru(e,t,n,r){var o=qt();Ce.flags|=e,o.memoizedState=ba(1|t,{destroy:void 0},n,r===void 0?null:r)}function lf(e,t,n,r){var o=dt();r=r===void 0?null:r;var i=o.memoizedState.inst;Ve!==null&&r!==null&&Ag(r,Ve.memoizedState.deps)?o.memoizedState=ba(t,i,n,r):(Ce.flags|=e,o.memoizedState=ba(1|t,i,n,r))}function ev(e,t){Ru(8390656,8,e,t)}function Pg(e,t){lf(2048,8,e,t)}function MT(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=of(),Ce.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function aE(e){var t=dt().memoizedState;return MT({ref:t,nextImpl:e}),function(){if(ze&2)throw Error($(440));return t.impl.apply(void 0,arguments)}}function lE(e,t){return lf(4,2,e,t)}function sE(e,t){return lf(4,4,e,t)}function uE(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cE(e,t,n){n=n!=null?n.concat([e]):null,lf(4,4,uE.bind(null,t,e),n)}function Ig(){}function fE(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ag(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dE(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ag(t,r[1]))return r[0];if(r=e(),pi){so(!0);try{e()}finally{so(!1)}}return n.memoizedState=[r,t],r}function zg(e,t,n){return n===void 0||Br&1073741824&&!(ke&261930)?e.memoizedState=t:(e.memoizedState=n,e=ew(),Ce.lanes|=e,Do|=e,n)}function hE(e,t,n,r){return wn(n,t)?n:va.current!==null?(e=zg(e,n,r),wn(e,t)||(vt=!0),e):!(Br&42)||Br&1073741824&&!(ke&261930)?(vt=!0,e.memoizedState=n):(e=ew(),Ce.lanes|=e,Do|=e,t)}function pE(e,t,n,r,o){var i=Be.p;Be.p=i!==0&&8>i?i:8;var a=ve.T,l={};ve.T=l,Ug(e,!1,t,n);try{var s=o(),u=ve.S;if(u!==null&&u(l,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=_T(s,r);xl(e,t,f,Sn(e))}else xl(e,t,r,Sn(e))}catch(c){xl(e,t,{then:function(){},status:"rejected",reason:c},Sn())}finally{Be.p=i,a!==null&&l.types!==null&&(a.types=l.types),ve.T=a}}function kT(){}function Kh(e,t,n,r){if(e.tag!==5)throw Error($(476));var o=gE(e).queue;pE(e,o,t,oi,n===null?kT:function(){return mE(e),n(r)})}function gE(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oi,baseState:oi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:oi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mE(e){var t=gE(e);t.next===null&&(t=e.alternate.memoizedState),xl(e,t.next.queue,{},Sn())}function Bg(){return Pt(Kl)}function yE(){return dt().memoizedState}function vE(){return dt().memoizedState}function LT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=vo(n);var r=bo(t,e,n);r!==null&&(nn(r,t,n),Rl(r,t,n)),t={cache:Rg()},e.payload=t;return}t=t.return}}function DT(e,t,n){var r=Sn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},sf(e)?SE(t,n):(n=bg(e,t,n,r),n!==null&&(nn(n,e,r),EE(n,t,r)))}function bE(e,t,n){var r=Sn();xl(e,t,n,r)}function xl(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(sf(e))SE(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,wn(l,a))return nf(e,t,o,0),Fe===null&&tf(),!1}catch{}finally{}if(n=bg(e,t,o,r),n!==null)return nn(n,e,r),EE(n,t,r),!0}return!1}function Ug(e,t,n,r){if(r={lane:2,revertLane:Xg(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},sf(e)){if(t)throw Error($(479))}else t=bg(e,n,r,2),t!==null&&nn(t,e,2)}function sf(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function SE(e,t){aa=tc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function EE(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,aS(e,n)}}var ql={readContext:Pt,use:af,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};ql.useEffectEvent=ot;var wE={readContext:Pt,use:af,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:ev,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ru(4194308,4,uE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ru(4194308,4,e,t)},useInsertionEffect:function(e,t){Ru(4,2,e,t)},useMemo:function(e,t){var n=qt();t=t===void 0?null:t;var r=e();if(pi){so(!0);try{e()}finally{so(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=qt();if(n!==void 0){var o=n(t);if(pi){so(!0);try{n(t)}finally{so(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=DT.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Yh(e);var t=e.queue,n=bE.bind(null,Ce,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ig,useDeferredValue:function(e,t){var n=qt();return zg(n,e,t)},useTransition:function(){var e=Yh(!1);return e=pE.bind(null,Ce,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ce,o=qt();if(Le){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Fe===null)throw Error($(349));ke&127||KS(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ev(ZS.bind(null,r,i,e),[e]),r.flags|=2048,ba(9,{destroy:void 0},QS.bind(null,r,i,n,t),null),n},useId:function(){var e=qt(),t=Fe.identifierPrefix;if(Le){var n=rr,r=nr;n=(r&~(1<<32-bn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=nc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=xT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bg,useFormState:Zy,useActionState:Zy,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ug.bind(null,Ce,!0,n),n.dispatch=t,[e,t]},useMemoCache:Dg,useCacheRefresh:function(){return qt().memoizedState=LT.bind(null,Ce)},useEffectEvent:function(e){var t=qt(),n={impl:e};return t.memoizedState=n,function(){if(ze&2)throw Error($(440));return n.impl.apply(void 0,arguments)}}},$g={readContext:Pt,use:af,useCallback:fE,useContext:Pt,useEffect:Pg,useImperativeHandle:cE,useInsertionEffect:lE,useLayoutEffect:sE,useMemo:dE,useReducer:wu,useRef:iE,useState:function(){return wu(Ur)},useDebugValue:Ig,useDeferredValue:function(e,t){var n=dt();return hE(n,Ve.memoizedState,e,t)},useTransition:function(){var e=wu(Ur)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ys(e),t]},useSyncExternalStore:XS,useId:yE,useHostTransitionStatus:Bg,useFormState:Wy,useActionState:Wy,useOptimistic:function(e,t){var n=dt();return eE(n,Ve,e,t)},useMemoCache:Dg,useCacheRefresh:vE};$g.useEffectEvent=aE;var RE={readContext:Pt,use:af,useCallback:fE,useContext:Pt,useEffect:Pg,useImperativeHandle:cE,useInsertionEffect:lE,useLayoutEffect:sE,useMemo:dE,useReducer:Sd,useRef:iE,useState:function(){return Sd(Ur)},useDebugValue:Ig,useDeferredValue:function(e,t){var n=dt();return Ve===null?zg(n,e,t):hE(n,Ve.memoizedState,e,t)},useTransition:function(){var e=Sd(Ur)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ys(e),t]},useSyncExternalStore:XS,useId:yE,useHostTransitionStatus:Bg,useFormState:Jy,useActionState:Jy,useOptimistic:function(e,t){var n=dt();return Ve!==null?eE(n,Ve,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Dg,useCacheRefresh:vE};RE.useEffectEvent=aE;function Ed(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:We({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Qh={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Sn(),o=vo(r);o.payload=t,n!=null&&(o.callback=n),t=bo(e,o,r),t!==null&&(nn(t,e,r),Rl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Sn(),o=vo(r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=bo(e,o,r),t!==null&&(nn(t,e,r),Rl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),r=vo(n);r.tag=2,t!=null&&(r.callback=t),t=bo(e,r,n),t!==null&&(nn(t,e,n),Rl(t,e,n))}};function tv(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Hl(n,r)||!Hl(o,i):!0}function nv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qh.enqueueReplaceState(t,t.state,null)}function gi(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=We({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function CE(e){Xu(e)}function _E(e){console.error(e)}function xE(e){Xu(e)}function rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function rv(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Zh(e,t,n){return n=vo(n),n.tag=3,n.payload={element:null},n.callback=function(){rc(e,t)},n}function TE(e){return e=vo(e),e.tag=3,e}function AE(e,t,n,r){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){rv(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){rv(t,n,r),typeof o!="function"&&(So===null?So=new Set([this]):So.add(this));var l=r.stack;this.componentDidCatch(r.value,{componentStack:l!==null?l:""})})}function NT(e,t,n,r,o){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Ia(t,n,o,!0),n=Rn.current,n!==null){switch(n.tag){case 31:case 13:return zn===null?sc():n.alternate===null&&it===0&&(it=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===Wu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ld(e,r,o)),!1;case 22:return n.flags|=65536,r===Wu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ld(e,r,o)),!1}throw Error($(435,n.tag))}return Ld(e,r,o),sc(),!1}if(Le)return t=Rn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==Bh&&(e=Error($(422),{cause:r}),jl(Ln(e,n)))):(r!==Bh&&(t=Error($(423),{cause:r}),jl(Ln(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Ln(r,n),o=Zh(e.stateNode,r,o),bd(e,o),it!==4&&(it=2)),!1;var i=Error($(520),{cause:r});if(i=Ln(i,n),Ol===null?Ol=[i]:Ol.push(i),it!==4&&(it=2),t===null)return!0;r=Ln(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Zh(n.stateNode,r,e),bd(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(So===null||!So.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,o=TE(o),AE(o,e,n,r),bd(n,o),!1}n=n.return}while(n!==null);return!1}var Hg=Error($(461)),vt=!1;function kt(e,t,n,r){t.child=e===null?GS(t,null,n,r):hi(t,e.child,n,r)}function ov(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var l in r)l!=="ref"&&(a[l]=r[l])}else a=r;return di(t),r=Og(e,t,n,a,i,o),l=Mg(),e!==null&&!vt?(kg(e,t,o),$r(e,t,o)):(Le&&l&&Eg(t),t.flags|=1,kt(e,t,r,o),t.child)}function iv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Sg(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,OE(e,t,i,r,o)):(e=Su(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Gg(e,o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Hl,n(a,r)&&e.ref===t.ref)return $r(e,t,o)}return t.flags|=1,e=Dr(i,r),e.ref=t.ref,e.return=t,t.child=e}function OE(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Hl(i,r)&&e.ref===t.ref)if(vt=!1,t.pendingProps=r=i,Gg(e,o))e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,$r(e,t,o)}return Wh(e,t,n,r,o)}function ME(e,t,n,r){var o=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return av(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Eu(t,i!==null?i.cachePool:null),i!==null?Xy(t,i):Fh(),FS(t);else return r=t.lanes=536870912,av(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(Eu(t,i.cachePool),Xy(t,i),oo(),t.memoizedState=null):(e!==null&&Eu(t,null),Fh(),oo());return kt(e,t,o,n),t.child}function pl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function av(e,t,n,r,o){var i=Cg();return i=i===null?null:{parent:mt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Eu(t,null),Fh(),FS(t),e!==null&&Ia(e,t,r,!0),t.childLanes=o,null}function Cu(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lv(e,t,n){return hi(t,e.child,null,n),e=Cu(t,t.pendingProps),e.flags|=2,hn(t),t.memoizedState=null,e}function PT(e,t,n){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(r.mode==="hidden")return e=Cu(t,r),t.lanes=536870912,pl(null,e);if(qh(t),(e=Qe)?(e=ww(e,Dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mo!==null?{id:nr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},n=PS(e),n.return=t,t.child=n,Nt=t,Qe=null)):e=null,e===null)throw ko(t);return t.lanes=536870912,null}return Cu(t,r)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(qh(t),o)if(t.flags&256)t.flags&=-257,t=lv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error($(558));else if(vt||Ia(e,t,n,!1),o=(n&e.childLanes)!==0,vt||o){if(r=Fe,r!==null&&(a=lS(r,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,_i(e,a),nn(r,e,a),Hg;sc(),t=lv(e,t,n)}else e=i.treeContext,Qe=Bn(a.nextSibling),Nt=t,Le=!0,yo=null,Dn=!1,e!==null&&zS(t,e),t=Cu(t,r),t.flags|=4096;return t}return e=Dr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _u(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error($(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Wh(e,t,n,r,o){return di(t),n=Og(e,t,n,r,void 0,o),r=Mg(),e!==null&&!vt?(kg(e,t,o),$r(e,t,o)):(Le&&r&&Eg(t),t.flags|=1,kt(e,t,n,o),t.child)}function sv(e,t,n,r,o,i){return di(t),t.updateQueue=null,n=YS(t,r,n,o),qS(e),r=Mg(),e!==null&&!vt?(kg(e,t,i),$r(e,t,i)):(Le&&r&&Eg(t),t.flags|=1,kt(e,t,n,i),t.child)}function uv(e,t,n,r,o){if(di(t),t.stateNode===null){var i=Qi,a=n.contextType;typeof a=="object"&&a!==null&&(i=Pt(a)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Qh,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},xg(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Pt(a):Qi,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(Ed(t,n,a,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&Qh.enqueueReplaceState(i,i.state,null),_l(t,r,i,o),Cl(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,s=gi(n,l);i.props=s;var u=i.context,f=n.contextType;a=Qi,typeof f=="object"&&f!==null&&(a=Pt(f));var c=n.getDerivedStateFromProps;f=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==a)&&nv(t,i,r,a),to=!1;var d=t.memoizedState;i.state=d,_l(t,r,i,o),Cl(),u=t.memoizedState,l||d!==u||to?(typeof c=="function"&&(Ed(t,n,c,r),u=t.memoizedState),(s=to||tv(t,n,s,r,d,u,a))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=a,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,jh(e,t),a=t.memoizedProps,f=gi(n,a),i.props=f,c=t.pendingProps,d=i.context,u=n.contextType,s=Qi,typeof u=="object"&&u!==null&&(s=Pt(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==c||d!==s)&&nv(t,i,r,s),to=!1,d=t.memoizedState,i.state=d,_l(t,r,i,o),Cl();var h=t.memoizedState;a!==c||d!==h||to||e!==null&&e.dependencies!==null&&Zu(e.dependencies)?(typeof l=="function"&&(Ed(t,n,l,r),h=t.memoizedState),(f=to||tv(t,n,f,r,d,h,s)||e!==null&&e.dependencies!==null&&Zu(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,h,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,h,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=s,r=f):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,_u(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=hi(t,e.child,null,o),t.child=hi(t,null,n,o)):kt(e,t,n,o),t.memoizedState=i.state,e=t.child):e=$r(e,t,o),e}function cv(e,t,n,r){return fi(),t.flags|=256,kt(e,t,n,r),t.child}var wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rd(e){return{baseLanes:e,cachePool:US()}}function Cd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=mn),e}function kE(e,t,n){var r=t.pendingProps,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),a&&(o=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(o?ro(t):oo(),(e=Qe)?(e=ww(e,Dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mo!==null?{id:nr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},n=PS(e),n.return=t,t.child=n,Nt=t,Qe=null)):e=null,e===null)throw ko(t);return dp(e)?t.lanes=32:t.lanes=536870912,null}var l=r.children;return r=r.fallback,o?(oo(),o=t.mode,l=oc({mode:"hidden",children:l},o),r=ii(r,o,n,null),l.return=t,r.return=t,l.sibling=r,t.child=l,r=t.child,r.memoizedState=Rd(n),r.childLanes=Cd(e,a,n),t.memoizedState=wd,pl(null,r)):(ro(t),Jh(t,l))}var s=e.memoizedState;if(s!==null&&(l=s.dehydrated,l!==null)){if(i)t.flags&256?(ro(t),t.flags&=-257,t=_d(e,t,n)):t.memoizedState!==null?(oo(),t.child=e.child,t.flags|=128,t=null):(oo(),l=r.fallback,o=t.mode,r=oc({mode:"visible",children:r.children},o),l=ii(l,o,n,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,hi(t,e.child,null,n),r=t.child,r.memoizedState=Rd(n),r.childLanes=Cd(e,a,n),t.memoizedState=wd,t=pl(null,r));else if(ro(t),dp(l)){if(a=l.nextSibling&&l.nextSibling.dataset,a)var u=a.dgst;a=u,r=Error($(419)),r.stack="",r.digest=a,jl({value:r,source:null,stack:null}),t=_d(e,t,n)}else if(vt||Ia(e,t,n,!1),a=(n&e.childLanes)!==0,vt||a){if(a=Fe,a!==null&&(r=lS(a,n),r!==0&&r!==s.retryLane))throw s.retryLane=r,_i(e,r),nn(a,e,r),Hg;fp(l)||sc(),t=_d(e,t,n)}else fp(l)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Qe=Bn(l.nextSibling),Nt=t,Le=!0,yo=null,Dn=!1,e!==null&&zS(t,e),t=Jh(t,r.children),t.flags|=4096);return t}return o?(oo(),l=r.fallback,o=t.mode,s=e.child,u=s.sibling,r=Dr(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&65011712,u!==null?l=Dr(u,l):(l=ii(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,pl(null,r),r=t.child,l=e.child.memoizedState,l===null?l=Rd(n):(o=l.cachePool,o!==null?(s=mt._currentValue,o=o.parent!==s?{parent:s,pool:s}:o):o=US(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Cd(e,a,n),t.memoizedState=wd,pl(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=Dr(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Jh(e,t){return t=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function _d(e,t,n){return hi(t,e.child,null,n),e=Jh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$h(e.return,t,n)}function xd(e,t,n,r,o,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.treeForkCount=i)}function LE(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var a=ft.current,l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,Xe(ft,a),kt(e,t,r,n),r=Le?Gl:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fv(e,n,t);else if(e.tag===19)fv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ec(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),xd(t,!1,o,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ec(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}xd(t,!0,n,null,i,r);break;case"together":xd(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function $r(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Do|=t.lanes,!(n&t.childLanes))if(e!==null){if(Ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gg(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Zu(e)))}function IT(e,t,n){switch(t.tag){case 3:Vu(t,t.stateNode.containerInfo),no(t,mt,e.memoizedState.cache),fi();break;case 27:case 5:Th(t);break;case 4:Vu(t,t.stateNode.containerInfo);break;case 10:no(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qh(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ro(t),t.flags|=128,null):n&t.child.childLanes?kE(e,t,n):(ro(t),e=$r(e,t,n),e!==null?e.sibling:null);ro(t);break;case 19:var o=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Ia(e,t,n,!1),r=(n&t.childLanes)!==0),o){if(r)return LE(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Xe(ft,ft.current),r)break;return null;case 22:return t.lanes=0,ME(e,t,n,t.pendingProps);case 24:no(t,mt,e.memoizedState.cache)}return $r(e,t,n)}function DE(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Gg(e,n)&&!(t.flags&128))return vt=!1,IT(e,t,n);vt=!!(e.flags&131072)}else vt=!1,Le&&t.flags&1048576&&IS(t,Gl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Qo(t.elementType),t.type=e,typeof e=="function")Sg(e)?(r=gi(e,r),t.tag=1,t=uv(null,t,e,r,n)):(t.tag=0,t=Wh(null,t,e,r,n));else{if(e!=null){var o=e.$$typeof;if(o===ag){t.tag=11,t=ov(null,t,e,r,n);break e}else if(o===lg){t.tag=14,t=iv(null,t,e,r,n);break e}}throw t=_h(e)||e,Error($(306,t,""))}}return t;case 0:return Wh(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,o=gi(r,t.pendingProps),uv(e,t,r,o,n);case 3:e:{if(Vu(t,t.stateNode.containerInfo),e===null)throw Error($(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,jh(e,t),_l(t,r,null,n);var a=t.memoizedState;if(r=a.cache,no(t,mt,r),r!==i.cache&&Hh(t,[mt],n,!0),Cl(),r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cv(e,t,r,n);break e}else if(r!==o){o=Ln(Error($(424)),t),jl(o),t=cv(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=Bn(e.firstChild),Nt=t,Le=!0,yo=null,Dn=!0,n=GS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(fi(),r===o){t=$r(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 26:return _u(e,t),e===null?(n=kv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Le||(n=t.type,e=t.pendingProps,r=dc(mo.current).createElement(n),r[Dt]=t,r[on]=e,It(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=kv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Th(t),e===null&&Le&&(r=t.stateNode=Rw(t.type,t.pendingProps,mo.current),Nt=t,Dn=!0,o=Qe,Po(t.type)?(hp=o,Qe=Bn(r.firstChild)):Qe=o),kt(e,t,t.pendingProps.children,n),_u(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((o=r=Qe)&&(r=dA(r,t.type,t.pendingProps,Dn),r!==null?(t.stateNode=r,Nt=t,Qe=Bn(r.firstChild),Dn=!1,o=!0):o=!1),o||ko(t)),Th(t),o=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,r=i.children,up(o,i)?r=null:a!==null&&up(o,a)&&(t.flags|=32),t.memoizedState!==null&&(o=Og(e,t,TT,null,null,n),Kl._currentValue=o),_u(e,t),kt(e,t,r,n),t.child;case 6:return e===null&&Le&&((e=n=Qe)&&(n=hA(n,t.pendingProps,Dn),n!==null?(t.stateNode=n,Nt=t,Qe=null,e=!0):e=!1),e||ko(t)),null;case 13:return kE(e,t,n);case 4:return Vu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hi(t,null,r,n):kt(e,t,r,n),t.child;case 11:return ov(e,t,t.type,t.pendingProps,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,no(t,t.type,r.value),kt(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,di(t),o=Pt(o),r=r(o),t.flags|=1,kt(e,t,r,n),t.child;case 14:return iv(e,t,t.type,t.pendingProps,n);case 15:return OE(e,t,t.type,t.pendingProps,n);case 19:return LE(e,t,n);case 31:return PT(e,t,n);case 22:return ME(e,t,n,t.pendingProps);case 24:return di(t),r=Pt(mt),e===null?(o=Cg(),o===null&&(o=Fe,i=Rg(),o.pooledCache=i,i.refCount++,i!==null&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},xg(t),no(t,mt,o)):(e.lanes&n&&(jh(e,t),_l(t,null,null,n),Cl()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),no(t,mt,r)):(r=i.cache,no(t,mt,r),r!==o.cache&&Hh(t,[mt],n,!0))),kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error($(156,t.tag))}function br(e){e.flags|=4}function Td(e,t,n,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(rw())e.flags|=8192;else throw li=Wu,_g}else e.flags&=-16777217}function dv(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!xw(t))if(rw())e.flags|=8192;else throw li=Wu,_g}function Ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?oS():536870912,e.lanes|=t,Sa|=t)}function rl(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zT(e,t,n){var r=t.pendingProps;switch(wg(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Nr(mt),pa(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Di(t)?br(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vd())),Ke(t),null;case 26:var o=t.type,i=t.memoizedState;return e===null?(br(t),i!==null?(Ke(t),dv(t,i)):(Ke(t),Td(t,o,null,r,n))):i?i!==e.memoizedState?(br(t),Ke(t),dv(t,i)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&br(t),Ke(t),Td(t,o,e,r,n)),null;case 27:if(Fu(t),n=mo.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&br(t);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ke(t),null}e=ir.current,Di(t)?Hy(t):(e=Rw(o,r,n),t.stateNode=e,br(t))}return Ke(t),null;case 5:if(Fu(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&br(t);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ke(t),null}if(i=ir.current,Di(t))Hy(t);else{var a=dc(mo.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":i=a.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?a.createElement(o,{is:r.is}):a.createElement(o)}}i[Dt]=t,i[on]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(It(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&br(t)}}return Ke(t),Td(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&br(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(e=mo.current,Di(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,o=Nt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||bw(e.nodeValue,n)),e||ko(t,!0)}else e=dc(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Di(t),n!==null){if(e===null){if(!r)throw Error($(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(557));e[Dt]=t}else fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=vd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(hn(t),t):(hn(t),null);if(t.flags&128)throw Error($(558))}return Ke(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Di(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error($(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error($(317));o[Dt]=t}else fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ke(t),o=!1}else o=vd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(hn(t),t):(hn(t),null)}return hn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ys(t,t.updateQueue),Ke(t),null);case 4:return pa(),e===null&&Kg(t.stateNode.containerInfo),Ke(t),null;case 10:return Nr(t.type),Ke(t),null;case 19:if(Mt(ft),r=t.memoizedState,r===null)return Ke(t),null;if(o=(t.flags&128)!==0,i=r.rendering,i===null)if(o)rl(r,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ec(e),i!==null){for(t.flags|=128,rl(r,!1),e=i.updateQueue,t.updateQueue=e,Ys(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)NS(n,e),n=n.sibling;return Xe(ft,ft.current&1|2),Le&&_r(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&yn()>ac&&(t.flags|=128,o=!0,rl(r,!1),t.lanes=4194304)}else{if(!o)if(e=ec(i),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ys(t,e),rl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Le)return Ke(t),null}else 2*yn()-r.renderingStartTime>ac&&n!==536870912&&(t.flags|=128,o=!0,rl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=yn(),e.sibling=null,n=ft.current,Xe(ft,o?n&1|2:n&1),Le&&_r(t,r.treeForkCount),e):(Ke(t),null);case 22:case 23:return hn(t),Tg(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Ys(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Mt(ai),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Nr(mt),Ke(t),null;case 25:return null;case 30:return null}throw Error($(156,t.tag))}function BT(e,t){switch(wg(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nr(mt),pa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Fu(t),null;case 31:if(t.memoizedState!==null){if(hn(t),t.alternate===null)throw Error($(340));fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mt(ft),null;case 4:return pa(),null;case 10:return Nr(t.type),null;case 22:case 23:return hn(t),Tg(),e!==null&&Mt(ai),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nr(mt),null;case 25:return null;default:return null}}function NE(e,t){switch(wg(t),t.tag){case 3:Nr(mt),pa();break;case 26:case 27:case 5:Fu(t);break;case 4:pa();break;case 31:t.memoizedState!==null&&hn(t);break;case 13:hn(t);break;case 19:Mt(ft);break;case 10:Nr(t.type);break;case 22:case 23:hn(t),Tg(),e!==null&&Mt(ai);break;case 24:Nr(mt)}}function vs(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(l){He(t,t.return,l)}}function Lo(e,t,n){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,o=t;var s=n,u=l;try{u()}catch(f){He(o,s,f)}}}r=r.next}while(r!==i)}}catch(f){He(t,t.return,f)}}function PE(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{VS(t,n)}catch(r){He(e,e.return,r)}}}function IE(e,t,n){n.props=gi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){He(e,t,r)}}function Tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(o){He(e,t,o)}}function or(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(o){He(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){He(e,t,o)}else n.current=null}function zE(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){He(e,e.return,o)}}function Ad(e,t,n){try{var r=e.stateNode;aA(r,e.type,n,t),r[on]=t}catch(o){He(e,e.return,o)}}function BE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Po(e.type)||e.tag===4}function Od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Po(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ep(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Mr));else if(r!==4&&(r===27&&Po(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ep(e,t,n),e=e.sibling;e!==null;)ep(e,t,n),e=e.sibling}function ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Po(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}function UE(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);It(t,r,n),t[Dt]=e,t[on]=n}catch(i){He(e,e.return,i)}}var Tr=!1,gt=!1,Md=!1,hv=typeof WeakSet=="function"?WeakSet:Set,xt=null;function UT(e,t){if(e=e.containerInfo,lp=mc,e=xS(e),yg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||o!==0&&c.nodeType!==3||(l=a+o),c!==i||r!==0&&c.nodeType!==3||(s=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===o&&(l=a),d===i&&++f===r&&(s=a),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(sp={focusedElem:e,selectionRange:n},mc=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var m=gi(n.type,o);e=r.getSnapshotBeforeUpdate(m,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){He(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error($(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function $E(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Er(e,n),r&4&&vs(5,n);break;case 1:if(Er(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){He(n,n.return,a)}else{var o=gi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){He(n,n.return,a)}}r&64&&PE(n),r&512&&Tl(n,n.return);break;case 3:if(Er(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{VS(e,t)}catch(a){He(n,n.return,a)}}break;case 27:t===null&&r&4&&UE(n);case 26:case 5:Er(e,n),t===null&&r&4&&zE(n),r&512&&Tl(n,n.return);break;case 12:Er(e,n);break;case 31:Er(e,n),r&4&&jE(e,n);break;case 13:Er(e,n),r&4&&VE(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=XT.bind(null,n),pA(e,n))));break;case 22:if(r=n.memoizedState!==null||Tr,!r){t=t!==null&&t.memoizedState!==null||gt,o=Tr;var i=gt;Tr=r,(gt=t)&&!i?Cr(e,n,(n.subtreeFlags&8772)!==0):Er(e,n),Tr=o,gt=i}break;case 30:break;default:Er(e,n)}}function HE(e){var t=e.alternate;t!==null&&(e.alternate=null,HE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fg(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,Wt=!1;function Sr(e,t,n){for(n=n.child;n!==null;)GE(e,t,n),n=n.sibling}function GE(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(fs,n)}catch{}switch(n.tag){case 26:gt||or(n,t),Sr(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:gt||or(n,t);var r=Je,o=Wt;Po(n.type)&&(Je=n.stateNode,Wt=!1),Sr(e,t,n),kl(n.stateNode),Je=r,Wt=o;break;case 5:gt||or(n,t);case 6:if(r=Je,o=Wt,Je=null,Sr(e,t,n),Je=r,Wt=o,Je!==null)if(Wt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(i){He(n,t,i)}else try{Je.removeChild(n.stateNode)}catch(i){He(n,t,i)}break;case 18:Je!==null&&(Wt?(e=Je,xv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ca(e)):xv(Je,n.stateNode));break;case 4:r=Je,o=Wt,Je=n.stateNode.containerInfo,Wt=!0,Sr(e,t,n),Je=r,Wt=o;break;case 0:case 11:case 14:case 15:Lo(2,n,t),gt||Lo(4,n,t),Sr(e,t,n);break;case 1:gt||(or(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&IE(n,t,r)),Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:gt=(r=gt)||n.memoizedState!==null,Sr(e,t,n),gt=r;break;default:Sr(e,t,n)}}function jE(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ca(e)}catch(n){He(t,t.return,n)}}}function VE(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ca(e)}catch(n){He(t,t.return,n)}}function $T(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hv),t;default:throw Error($(435,e.tag))}}function Xs(e,t){var n=$T(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var o=KT.bind(null,e,r);r.then(o,o)}})}function Qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(Po(l.type)){Je=l.stateNode,Wt=!1;break e}break;case 5:Je=l.stateNode,Wt=!1;break e;case 3:case 4:Je=l.stateNode.containerInfo,Wt=!0;break e}l=l.return}if(Je===null)throw Error($(160));GE(i,a,o),Je=null,Wt=!1,i=o.alternate,i!==null&&(i.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)FE(t,e),t=t.sibling}var Vn=null;function FE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Zt(e),r&4&&(Lo(3,e,e.return),vs(3,e),Lo(5,e,e.return));break;case 1:Qt(t,e),Zt(e),r&512&&(gt||n===null||or(n,n.return)),r&64&&Tr&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var o=Vn;if(Qt(t,e),Zt(e),r&512&&(gt||n===null||or(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":i=o.getElementsByTagName("title")[0],(!i||i[ps]||i[Dt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),It(i,r,n),i[Dt]=e,Tt(i),r=i;break e;case"link":var a=Dv("link","href",o).get(r+(n.href||""));if(a){for(var l=0;l<a.length;l++)if(i=a[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(l,1);break t}}i=o.createElement(r),It(i,r,n),o.head.appendChild(i);break;case"meta":if(a=Dv("meta","content",o).get(r+(n.content||""))){for(l=0;l<a.length;l++)if(i=a[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(l,1);break t}}i=o.createElement(r),It(i,r,n),o.head.appendChild(i);break;default:throw Error($(468,r))}i[Dt]=e,Tt(i),r=i}e.stateNode=r}else Nv(o,e.type,e.stateNode);else e.stateNode=Lv(o,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?Nv(o,e.type,e.stateNode):Lv(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Ad(e,e.memoizedProps,n.memoizedProps)}break;case 27:Qt(t,e),Zt(e),r&512&&(gt||n===null||or(n,n.return)),n!==null&&r&4&&Ad(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Qt(t,e),Zt(e),r&512&&(gt||n===null||or(n,n.return)),e.flags&32){o=e.stateNode;try{ma(o,"")}catch(m){He(e,e.return,m)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,Ad(e,o,n!==null?n.memoizedProps:o)),r&1024&&(Md=!0);break;case 6:if(Qt(t,e),Zt(e),r&4){if(e.stateNode===null)throw Error($(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){He(e,e.return,m)}}break;case 3:if(Au=null,o=Vn,Vn=hc(t.containerInfo),Qt(t,e),Vn=o,Zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ca(t.containerInfo)}catch(m){He(e,e.return,m)}Md&&(Md=!1,qE(e));break;case 4:r=Vn,Vn=hc(e.stateNode.containerInfo),Qt(t,e),Zt(e),Vn=r;break;case 12:Qt(t,e),Zt(e);break;case 31:Qt(t,e),Zt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Xs(e,r)));break;case 13:Qt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uf=yn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Xs(e,r)));break;case 22:o=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Tr,f=gt;if(Tr=u||o,gt=f||s,Qt(t,e),gt=f,Tr=u,Zt(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||s||Tr||gt||Zo(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(i=s.stateNode,o)a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{l=s.stateNode;var c=s.memoizedProps.style,d=c!=null&&c.hasOwnProperty("display")?c.display:null;l.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(m){He(s,s.return,m)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=o?"":s.memoizedProps}catch(m){He(s,s.return,m)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;o?Tv(h,!0):Tv(s.stateNode,!1)}catch(m){He(s,s.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Xs(e,n))));break;case 19:Qt(t,e),Zt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Xs(e,r)));break;case 30:break;case 21:break;default:Qt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(BE(r)){n=r;break}r=r.return}if(n==null)throw Error($(160));switch(n.tag){case 27:var o=n.stateNode,i=Od(e);ic(e,i,o);break;case 5:var a=n.stateNode;n.flags&32&&(ma(a,""),n.flags&=-33);var l=Od(e);ic(e,l,a);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Od(e);ep(e,u,s);break;default:throw Error($(161))}}catch(f){He(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qE(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qE(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Er(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$E(e,t.alternate,t),t=t.sibling}function Zo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lo(4,t,t.return),Zo(t);break;case 1:or(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&IE(t,t.return,n),Zo(t);break;case 27:kl(t.stateNode);case 26:case 5:or(t,t.return),Zo(t);break;case 22:t.memoizedState===null&&Zo(t);break;case 30:Zo(t);break;default:Zo(t)}e=e.sibling}}function Cr(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:Cr(o,i,n),vs(4,i);break;case 1:if(Cr(o,i,n),r=i,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(u){He(r,r.return,u)}if(r=i,o=r.updateQueue,o!==null){var l=r.stateNode;try{var s=o.shared.hiddenCallbacks;if(s!==null)for(o.shared.hiddenCallbacks=null,o=0;o<s.length;o++)jS(s[o],l)}catch(u){He(r,r.return,u)}}n&&a&64&&PE(i),Tl(i,i.return);break;case 27:UE(i);case 26:case 5:Cr(o,i,n),n&&r===null&&a&4&&zE(i),Tl(i,i.return);break;case 12:Cr(o,i,n);break;case 31:Cr(o,i,n),n&&a&4&&jE(o,i);break;case 13:Cr(o,i,n),n&&a&4&&VE(o,i);break;case 22:i.memoizedState===null&&Cr(o,i,n),Tl(i,i.return);break;case 30:break;default:Cr(o,i,n)}t=t.sibling}}function jg(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ms(n))}function Vg(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ms(e))}function Gn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)YE(e,t,n,r),t=t.sibling}function YE(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Gn(e,t,n,r),o&2048&&vs(9,t);break;case 1:Gn(e,t,n,r);break;case 3:Gn(e,t,n,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ms(e)));break;case 12:if(o&2048){Gn(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,l=i.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){He(t,t.return,s)}}else Gn(e,t,n,r);break;case 31:Gn(e,t,n,r);break;case 13:Gn(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,t.memoizedState!==null?i._visibility&2?Gn(e,t,n,r):Al(e,t):i._visibility&2?Gn(e,t,n,r):(i._visibility|=2,Bi(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&jg(a,t);break;case 24:Gn(e,t,n,r),o&2048&&Vg(t.alternate,t);break;default:Gn(e,t,n,r)}}function Bi(e,t,n,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,a=t,l=n,s=r,u=a.flags;switch(a.tag){case 0:case 11:case 15:Bi(i,a,l,s,o),vs(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?Bi(i,a,l,s,o):Al(i,a):(f._visibility|=2,Bi(i,a,l,s,o)),o&&u&2048&&jg(a.alternate,a);break;case 24:Bi(i,a,l,s,o),o&&u&2048&&Vg(a.alternate,a);break;default:Bi(i,a,l,s,o)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:Al(n,r),o&2048&&jg(r.alternate,r);break;case 24:Al(n,r),o&2048&&Vg(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var gl=8192;function Ni(e,t,n){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)XE(e,t,n),e=e.sibling}function XE(e,t,n){switch(e.tag){case 26:Ni(e,t,n),e.flags&gl&&e.memoizedState!==null&&xA(n,Vn,e.memoizedState,e.memoizedProps);break;case 5:Ni(e,t,n);break;case 3:case 4:var r=Vn;Vn=hc(e.stateNode.containerInfo),Ni(e,t,n),Vn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=gl,gl=16777216,Ni(e,t,n),gl=r):Ni(e,t,n));break;default:Ni(e,t,n)}}function KE(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];xt=r,ZE(r,e)}KE(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)QE(e),e=e.sibling}function QE(e){switch(e.tag){case 0:case 11:case 15:ol(e),e.flags&2048&&Lo(9,e,e.return);break;case 3:ol(e);break;case 12:ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xu(e)):ol(e);break;default:ol(e)}}function xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];xt=r,ZE(r,e)}KE(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lo(8,t,t.return),xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,xu(t));break;default:xu(t)}e=e.sibling}}function ZE(e,t){for(;xt!==null;){var n=xt;switch(n.tag){case 0:case 11:case 15:Lo(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ms(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,xt=r;else e:for(n=e;xt!==null;){r=xt;var o=r.sibling,i=r.return;if(HE(r),r===n){xt=null;break e}if(o!==null){o.return=i,xt=o;break e}xt=i}}}var HT={getCacheForType:function(e){var t=Pt(mt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pt(mt).controller.signal}},GT=typeof WeakMap=="function"?WeakMap:Map,ze=0,Fe=null,Me=null,ke=0,$e=0,dn=null,co=!1,Ba=!1,Fg=!1,Hr=0,it=0,Do=0,si=0,qg=0,mn=0,Sa=0,Ol=null,Jt=null,tp=!1,uf=0,WE=0,ac=1/0,lc=null,So=null,Et=0,Eo=null,Ea=null,Pr=0,np=0,rp=null,JE=null,Ml=0,op=null;function Sn(){return ze&2&&ke!==0?ke&-ke:ve.T!==null?Xg():sS()}function ew(){if(mn===0)if(!(ke&536870912)||Le){var e=$s;$s<<=1,!($s&3932160)&&($s=262144),mn=e}else mn=536870912;return e=Rn.current,e!==null&&(e.flags|=32),mn}function nn(e,t,n){(e===Fe&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(wa(e,0),fo(e,ke,mn,!1)),hs(e,n),(!(ze&2)||e!==Fe)&&(e===Fe&&(!(ze&2)&&(si|=n),it===4&&fo(e,ke,mn,!1)),fr(e))}function tw(e,t,n){if(ze&6)throw Error($(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ds(e,t),o=r?FT(e,t):kd(e,t,!0),i=r;do{if(o===0){Ba&&!r&&fo(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!jT(n)){o=kd(e,t,!1),i=!1;continue}if(o===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;o=Ol;var s=l.current.memoizedState.isDehydrated;if(s&&(wa(l,a).flags|=256),a=kd(l,a,!1),a!==2){if(Fg&&!s){l.errorRecoveryDisabledLanes|=i,si|=i,o=4;break e}i=Jt,Jt=o,i!==null&&(Jt===null?Jt=i:Jt.push.apply(Jt,i))}o=a}if(i=!1,o!==2)continue}}if(o===1){wa(e,0),fo(e,t,0,!0);break}e:{switch(r=e,i=o,i){case 0:case 1:throw Error($(345));case 4:if((t&4194048)!==t)break;case 6:fo(r,t,mn,!co);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error($(329))}if((t&62914560)===t&&(o=uf+300-yn(),10<o)){if(fo(r,t,mn,!co),Zc(r,0,!0)!==0)break e;Pr=t,r.timeoutHandle=Ew(pv.bind(null,r,n,Jt,lc,tp,t,mn,si,Sa,co,i,"Throttled",-0,0),o);break e}pv(r,n,Jt,lc,tp,t,mn,si,Sa,co,i,null,-0,0)}}break}while(!0);fr(e)}function pv(e,t,n,r,o,i,a,l,s,u,f,c,d,h){if(e.timeoutHandle=-1,c=t.subtreeFlags,c&8192||(c&16785408)===16785408){c={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mr},XE(t,i,c);var m=(i&62914560)===i?uf-yn():(i&4194048)===i?WE-yn():0;if(m=TA(c,m),m!==null){Pr=i,e.cancelPendingCommit=m(mv.bind(null,e,t,i,n,r,o,a,l,s,f,c,null,d,h)),fo(e,i,a,!u);return}}mv(e,t,i,n,r,o,a,l,s)}function jT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!wn(i(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fo(e,t,n,r){t&=~qg,t&=~si,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-bn(o),a=1<<i;r[i]=-1,o&=~a}n!==0&&iS(e,n,t)}function cf(){return ze&6?!0:(bs(0),!1)}function Yg(){if(Me!==null){if($e===0)var e=Me.return;else e=Me,kr=xi=null,Lg(e),ia=null,Vl=0,e=Me;for(;e!==null;)NE(e.alternate,e),e=e.return;Me=null}}function wa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,uA(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Pr=0,Yg(),Fe=e,Me=n=Dr(e.current,null),ke=t,$e=0,dn=null,co=!1,Ba=ds(e,t),Fg=!1,Sa=mn=qg=si=Do=it=0,Jt=Ol=null,tp=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-bn(r),i=1<<o;t|=e[o],r&=~i}return Hr=t,tf(),n}function nw(e,t){Ce=null,ve.H=ql,t===za||t===rf?(t=qy(),$e=3):t===_g?(t=qy(),$e=4):$e=t===Hg?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Me===null&&(it=1,rc(e,Ln(t,e.current)))}function rw(){var e=Rn.current;return e===null?!0:(ke&4194048)===ke?zn===null:(ke&62914560)===ke||ke&536870912?e===zn:!1}function ow(){var e=ve.H;return ve.H=ql,e===null?ql:e}function iw(){var e=ve.A;return ve.A=HT,e}function sc(){it=4,co||(ke&4194048)!==ke&&Rn.current!==null||(Ba=!0),!(Do&134217727)&&!(si&134217727)||Fe===null||fo(Fe,ke,mn,!1)}function kd(e,t,n){var r=ze;ze|=2;var o=ow(),i=iw();(Fe!==e||ke!==t)&&(lc=null,wa(e,t)),t=!1;var a=it;e:do try{if($e!==0&&Me!==null){var l=Me,s=dn;switch($e){case 8:Yg(),a=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(t=!0);var u=$e;if($e=0,dn=null,Ji(e,l,s,u),n&&Ba){a=0;break e}break;default:u=$e,$e=0,dn=null,Ji(e,l,s,u)}}VT(),a=it;break}catch(f){nw(e,f)}while(!0);return t&&e.shellSuspendCounter++,kr=xi=null,ze=r,ve.H=o,ve.A=i,Me===null&&(Fe=null,ke=0,tf()),a}function VT(){for(;Me!==null;)aw(Me)}function FT(e,t){var n=ze;ze|=2;var r=ow(),o=iw();Fe!==e||ke!==t?(lc=null,ac=yn()+500,wa(e,t)):Ba=ds(e,t);e:do try{if($e!==0&&Me!==null){t=Me;var i=dn;t:switch($e){case 1:$e=0,dn=null,Ji(e,t,i,1);break;case 2:case 9:if(Fy(i)){$e=0,dn=null,gv(t);break}t=function(){$e!==2&&$e!==9||Fe!==e||($e=7),fr(e)},i.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Fy(i)?($e=0,dn=null,gv(t)):($e=0,dn=null,Ji(e,t,i,7));break;case 5:var a=null;switch(Me.tag){case 26:a=Me.memoizedState;case 5:case 27:var l=Me;if(a?xw(a):l.stateNode.complete){$e=0,dn=null;var s=l.sibling;if(s!==null)Me=s;else{var u=l.return;u!==null?(Me=u,ff(u)):Me=null}break t}}$e=0,dn=null,Ji(e,t,i,5);break;case 6:$e=0,dn=null,Ji(e,t,i,6);break;case 8:Yg(),it=6;break e;default:throw Error($(462))}}qT();break}catch(f){nw(e,f)}while(!0);return kr=xi=null,ve.H=r,ve.A=o,ze=n,Me!==null?0:(Fe=null,ke=0,tf(),it)}function qT(){for(;Me!==null&&!g1();)aw(Me)}function aw(e){var t=DE(e.alternate,e,Hr);e.memoizedProps=e.pendingProps,t===null?ff(e):Me=t}function gv(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sv(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=sv(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Lg(t);default:NE(n,t),t=Me=NS(t,Hr),t=DE(n,t,Hr)}e.memoizedProps=e.pendingProps,t===null?ff(e):Me=t}function Ji(e,t,n,r){kr=xi=null,Lg(t),ia=null,Vl=0;var o=t.return;try{if(NT(e,o,t,n,ke)){it=1,rc(e,Ln(n,e.current)),Me=null;return}}catch(i){if(o!==null)throw Me=o,i;it=1,rc(e,Ln(n,e.current)),Me=null;return}t.flags&32768?(Le||r===1?e=!0:Ba||ke&536870912?e=!1:(co=e=!0,(r===2||r===9||r===3||r===6)&&(r=Rn.current,r!==null&&r.tag===13&&(r.flags|=16384))),lw(t,e)):ff(t)}function ff(e){var t=e;do{if(t.flags&32768){lw(t,co);return}e=t.return;var n=zT(t.alternate,t,Hr);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);it===0&&(it=5)}function lw(e,t){do{var n=BT(e.alternate,e);if(n!==null){n.flags&=32767,Me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=n}while(e!==null);it=6,Me=null}function mv(e,t,n,r,o,i,a,l,s){e.cancelPendingCommit=null;do df();while(Et!==0);if(ze&6)throw Error($(327));if(t!==null){if(t===e.current)throw Error($(177));if(i=t.lanes|t.childLanes,i|=vg,_1(e,n,i,a,l,s),e===Fe&&(Me=Fe=null,ke=0),Ea=t,Eo=e,Pr=n,np=i,rp=o,JE=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,QT(qu,function(){return dw(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ve.T,ve.T=null,o=Be.p,Be.p=2,a=ze,ze|=4;try{UT(e,t,n)}finally{ze=a,Be.p=o,ve.T=r}}Et=1,sw(),uw(),cw()}}function sw(){if(Et===1){Et=0;var e=Eo,t=Ea,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ve.T,ve.T=null;var r=Be.p;Be.p=2;var o=ze;ze|=4;try{FE(t,e);var i=sp,a=xS(e.containerInfo),l=i.focusedElem,s=i.selectionRange;if(a!==l&&l&&l.ownerDocument&&_S(l.ownerDocument.documentElement,l)){if(s!==null&&yg(l)){var u=s.start,f=s.end;if(f===void 0&&(f=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(f,l.value.length);else{var c=l.ownerDocument||document,d=c&&c.defaultView||window;if(d.getSelection){var h=d.getSelection(),m=l.textContent.length,v=Math.min(s.start,m),E=s.end===void 0?v:Math.min(s.end,m);!h.extend&&v>E&&(a=E,E=v,v=a);var y=By(l,v),p=By(l,E);if(y&&p&&(h.rangeCount!==1||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==p.node||h.focusOffset!==p.offset)){var b=c.createRange();b.setStart(y.node,y.offset),h.removeAllRanges(),v>E?(h.addRange(b),h.extend(p.node,p.offset)):(b.setEnd(p.node,p.offset),h.addRange(b))}}}}for(c=[],h=l;h=h.parentNode;)h.nodeType===1&&c.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<c.length;l++){var S=c[l];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}mc=!!lp,sp=lp=null}finally{ze=o,Be.p=r,ve.T=n}}e.current=t,Et=2}}function uw(){if(Et===2){Et=0;var e=Eo,t=Ea,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ve.T,ve.T=null;var r=Be.p;Be.p=2;var o=ze;ze|=4;try{$E(e,t.alternate,t)}finally{ze=o,Be.p=r,ve.T=n}}Et=3}}function cw(){if(Et===4||Et===3){Et=0,m1();var e=Eo,t=Ea,n=Pr,r=JE;t.subtreeFlags&10256||t.flags&10256?Et=5:(Et=0,Ea=Eo=null,fw(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(So=null),cg(n),t=t.stateNode,vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(fs,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ve.T,o=Be.p,Be.p=2,ve.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var l=r[a];i(l.value,{componentStack:l.stack})}}finally{ve.T=t,Be.p=o}}Pr&3&&df(),fr(e),o=e.pendingLanes,n&261930&&o&42?e===op?Ml++:(Ml=0,op=e):Ml=0,bs(0)}}function fw(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ms(t)))}function df(){return sw(),uw(),cw(),dw()}function dw(){if(Et!==5)return!1;var e=Eo,t=np;np=0;var n=cg(Pr),r=ve.T,o=Be.p;try{Be.p=32>n?32:n,ve.T=null,n=rp,rp=null;var i=Eo,a=Pr;if(Et=0,Ea=Eo=null,Pr=0,ze&6)throw Error($(331));var l=ze;if(ze|=4,QE(i.current),YE(i,i.current,a,n),ze=l,bs(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(fs,i)}catch{}return!0}finally{Be.p=o,ve.T=r,fw(e,t)}}function yv(e,t,n){t=Ln(n,t),t=Zh(e.stateNode,t,2),e=bo(e,t,2),e!==null&&(hs(e,2),fr(e))}function He(e,t,n){if(e.tag===3)yv(e,e,n);else for(;t!==null;){if(t.tag===3){yv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(So===null||!So.has(r))){e=Ln(n,e),n=TE(2),r=bo(t,n,2),r!==null&&(AE(n,r,t,e),hs(r,2),fr(r));break}}t=t.return}}function Ld(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new GT;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(Fg=!0,o.add(n),e=YT.bind(null,e,t,n),t.then(e,e))}function YT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fe===e&&(ke&n)===n&&(it===4||it===3&&(ke&62914560)===ke&&300>yn()-uf?!(ze&2)&&wa(e,0):qg|=n,Sa===ke&&(Sa=0)),fr(e)}function hw(e,t){t===0&&(t=oS()),e=_i(e,t),e!==null&&(hs(e,t),fr(e))}function XT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hw(e,n)}function KT(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error($(314))}r!==null&&r.delete(t),hw(e,n)}function QT(e,t){return sg(e,t)}var uc=null,Ui=null,ip=!1,cc=!1,Dd=!1,ho=0;function fr(e){e!==Ui&&e.next===null&&(Ui===null?uc=Ui=e:Ui=Ui.next=e),cc=!0,ip||(ip=!0,WT())}function bs(e,t){if(!Dd&&cc){Dd=!0;do for(var n=!1,r=uc;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var i=0;else{var a=r.suspendedLanes,l=r.pingedLanes;i=(1<<31-bn(42|e)+1)-1,i&=o&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,vv(r,i))}else i=ke,i=Zc(r,r===Fe?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||ds(r,i)||(n=!0,vv(r,i));r=r.next}while(n);Dd=!1}}function ZT(){pw()}function pw(){cc=ip=!1;var e=0;ho!==0&&sA()&&(e=ho);for(var t=yn(),n=null,r=uc;r!==null;){var o=r.next,i=gw(r,t);i===0?(r.next=null,n===null?uc=o:n.next=o,o===null&&(Ui=n)):(n=r,(e!==0||i&3)&&(cc=!0)),r=o}Et!==0&&Et!==5||bs(e),ho!==0&&(ho=0)}function gw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-bn(i),l=1<<a,s=o[a];s===-1?(!(l&n)||l&r)&&(o[a]=C1(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}if(t=Fe,n=ke,n=Zc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ld(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ds(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ld(r),cg(n)){case 2:case 8:n=nS;break;case 32:n=qu;break;case 268435456:n=rS;break;default:n=qu}return r=mw.bind(null,e),n=sg(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ld(r),e.callbackPriority=2,e.callbackNode=null,2}function mw(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=ke;return r=Zc(e,e===Fe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(tw(e,r,t),gw(e,yn()),e.callbackNode!=null&&e.callbackNode===n?mw.bind(null,e):null)}function vv(e,t){if(df())return null;tw(e,t,!0)}function WT(){cA(function(){ze&6?sg(tS,ZT):pw()})}function Xg(){if(ho===0){var e=ya;e===0&&(e=Us,Us<<=1,!(Us&261888)&&(Us=256)),ho=e}return ho}function bv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yu(""+e)}function Sv(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function JT(e,t,n,r,o){if(t==="submit"&&n&&n.stateNode===o){var i=bv((o[on]||null).action),a=r.submitter;a&&(t=(t=a[on]||null)?bv(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new Wc("action","action",null,r,o);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ho!==0){var s=a?Sv(o,a):new FormData(o);Kh(n,{pending:!0,data:s,method:o.method,action:i},null,s)}}else typeof i=="function"&&(l.preventDefault(),s=a?Sv(o,a):new FormData(o),Kh(n,{pending:!0,data:s,method:o.method,action:i},i,s))},currentTarget:o}]})}}for(var Nd=0;Nd<zh.length;Nd++){var Pd=zh[Nd],eA=Pd.toLowerCase(),tA=Pd[0].toUpperCase()+Pd.slice(1);Wn(eA,"on"+tA)}Wn(AS,"onAnimationEnd");Wn(OS,"onAnimationIteration");Wn(MS,"onAnimationStart");Wn("dblclick","onDoubleClick");Wn("focusin","onFocus");Wn("focusout","onBlur");Wn(yT,"onTransitionRun");Wn(vT,"onTransitionStart");Wn(bT,"onTransitionCancel");Wn(kS,"onTransitionEnd");ga("onMouseEnter",["mouseout","mouseover"]);ga("onMouseLeave",["mouseout","mouseover"]);ga("onPointerEnter",["pointerout","pointerover"]);ga("onPointerLeave",["pointerout","pointerover"]);wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));wi("onBeforeInput",["compositionend","keypress","textInput","paste"]);wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="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(" "),nA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yl));function yw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=u;try{i(o)}catch(f){Xu(f)}o.currentTarget=null,i=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;i=l,o.currentTarget=u;try{i(o)}catch(f){Xu(f)}o.currentTarget=null,i=s}}}}function Oe(e,t){var n=t[Oh];n===void 0&&(n=t[Oh]=new Set);var r=e+"__bubble";n.has(r)||(vw(t,e,2,!1),n.add(r))}function Id(e,t,n){var r=0;t&&(r|=4),vw(n,e,r,t)}var Ks="_reactListening"+Math.random().toString(36).slice(2);function Kg(e){if(!e[Ks]){e[Ks]=!0,uS.forEach(function(n){n!=="selectionchange"&&(nA.has(n)||Id(n,!1,e),Id(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ks]||(t[Ks]=!0,Id("selectionchange",!1,t))}}function vw(e,t,n,r){switch(kw(t)){case 2:var o=MA;break;case 8:o=kA;break;default:o=Jg}n=o.bind(null,t,n,e),o=void 0,!Nh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function zd(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&a.stateNode.containerInfo===o)return;a=a.return}for(;l!==null;){if(a=Vi(l),a===null)return;if(s=a.tag,s===5||s===6||s===26||s===27){r=i=a;continue e}l=l.parentNode}}r=r.return}yS(function(){var u=i,f=hg(n),c=[];e:{var d=LS.get(e);if(d!==void 0){var h=Wc,m=e;switch(e){case"keypress":if(bu(n)===0)break e;case"keydown":case"keyup":h=K1;break;case"focusin":m="focus",h=dd;break;case"focusout":m="blur",h=dd;break;case"beforeblur":case"afterblur":h=dd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ay;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=W1;break;case AS:case OS:case MS:h=$1;break;case kS:h=eT;break;case"scroll":case"scrollend":h=P1;break;case"wheel":h=nT;break;case"copy":case"cut":case"paste":h=G1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=My;break;case"toggle":case"beforetoggle":h=oT}var v=(t&4)!==0,E=!v&&(e==="scroll"||e==="scrollend"),y=v?d!==null?d+"Capture":null:d;v=[];for(var p=u,b;p!==null;){var S=p;if(b=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||b===null||y===null||(S=Ul(p,y),S!=null&&v.push(Xl(p,S,b))),E)break;p=p.return}0<v.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Dh&&(m=n.relatedTarget||n.fromElement)&&(Vi(m)||m[Na]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Vi(m):null,m!==null&&(E=cs(m),v=m.tag,m!==E||v!==5&&v!==27&&v!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=Ay,S="onMouseLeave",y="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=My,S="onPointerLeave",y="onPointerEnter",p="pointer"),E=h==null?d:hl(h),b=m==null?d:hl(m),d=new v(S,p+"leave",h,n,f),d.target=E,d.relatedTarget=b,S=null,Vi(f)===u&&(v=new v(y,p+"enter",m,n,f),v.target=b,v.relatedTarget=E,S=v),E=S,h&&m)t:{for(v=rA,y=h,p=m,b=0,S=y;S;S=v(S))b++;S=0;for(var w=p;w;w=v(w))S++;for(;0<b-S;)y=v(y),b--;for(;0<S-b;)p=v(p),S--;for(;b--;){if(y===p||p!==null&&y===p.alternate){v=y;break t}y=v(y),p=v(p)}v=null}else v=null;h!==null&&Ev(c,d,h,v,!1),m!==null&&E!==null&&Ev(c,E,m,v,!0)}}e:{if(d=u?hl(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var C=Ny;else if(Dy(d))if(RS)C=pT;else{C=dT;var R=fT}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&dg(u.elementType)&&(C=Ny):C=hT;if(C&&(C=C(e,u))){wS(c,C,n,f);break e}R&&R(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Lh(d,"number",d.value)}switch(R=u?hl(u):window,e){case"focusin":(Dy(R)||R.contentEditable==="true")&&(Yi=R,Ph=u,El=null);break;case"focusout":El=Ph=Yi=null;break;case"mousedown":Ih=!0;break;case"contextmenu":case"mouseup":case"dragend":Ih=!1,Uy(c,n,f);break;case"selectionchange":if(mT)break;case"keydown":case"keyup":Uy(c,n,f)}var T;if(mg)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else qi?SS(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(bS&&n.locale!=="ko"&&(qi||O!=="onCompositionStart"?O==="onCompositionEnd"&&qi&&(T=vS()):(uo=f,pg="value"in uo?uo.value:uo.textContent,qi=!0)),R=fc(u,O),0<R.length&&(O=new Oy(O,e,null,n,f),c.push({event:O,listeners:R}),T?O.data=T:(T=ES(n),T!==null&&(O.data=T)))),(T=aT?lT(e,n):sT(e,n))&&(O=fc(u,"onBeforeInput"),0<O.length&&(R=new Oy("onBeforeInput","beforeinput",null,n,f),c.push({event:R,listeners:O}),R.data=T)),JT(c,e,u,n,f)}yw(c,t)})}function Xl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fc(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||i===null||(o=Ul(e,n),o!=null&&r.unshift(Xl(e,o,i)),o=Ul(e,t),o!=null&&r.push(Xl(e,o,i))),e.tag===3)return r;e=e.return}return[]}function rA(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ev(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,s!==null&&s===r)break;l!==5&&l!==26&&l!==27||u===null||(s=u,o?(u=Ul(n,i),u!=null&&a.unshift(Xl(n,u,s))):o||(u=Ul(n,i),u!=null&&a.push(Xl(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var oA=/\r\n?/g,iA=/\u0000|\uFFFD/g;function wv(e){return(typeof e=="string"?e:""+e).replace(oA,`
|
|
50
|
+
`).replace(iA,"")}function bw(e,t){return t=wv(t),wv(e)===t}function je(e,t,n,r,o,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ma(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ma(e,""+r);break;case"className":Gs(e,"class",r);break;case"tabIndex":Gs(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Gs(e,n,r);break;case"style":mS(e,r,i);break;case"data":if(t!=="object"){Gs(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=yu(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&je(e,t,"name",o.name,o,null),je(e,t,"formEncType",o.formEncType,o,null),je(e,t,"formMethod",o.formMethod,o,null),je(e,t,"formTarget",o.formTarget,o,null)):(je(e,t,"encType",o.encType,o,null),je(e,t,"method",o.method,o,null),je(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=yu(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Mr);break;case"onScroll":r!=null&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error($(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error($(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=yu(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),mu(e,"popover",r);break;case"xlinkActuate":vr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":vr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":vr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":vr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":vr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":vr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":vr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":vr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":vr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":mu(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=D1.get(n)||n,mu(e,n,r))}}function ap(e,t,n,r,o,i){switch(n){case"style":mS(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error($(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error($(60));e.innerHTML=n}}break;case"children":typeof r=="string"?ma(e,r):(typeof r=="number"||typeof r=="bigint")&&ma(e,""+r);break;case"onScroll":r!=null&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cS.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),i=e[on]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,o),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):mu(e,n,r)}}}function It(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var r=!1,o=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error($(137,t));default:je(e,t,i,a,n,null)}}o&&je(e,t,"srcSet",n.srcSet,n,null),r&&je(e,t,"src",n.src,n,null);return;case"input":Oe("invalid",e);var l=i=a=o=null,s=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":o=f;break;case"type":a=f;break;case"checked":s=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error($(137,t));break;default:je(e,t,r,f,n,null)}}hS(e,i,l,s,u,a,o,!1);return;case"select":Oe("invalid",e),r=a=i=null;for(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"value":i=l;break;case"defaultValue":a=l;break;case"multiple":r=l;default:je(e,t,o,l,n,null)}t=i,n=a,e.multiple=!!r,t!=null?na(e,!!r,t,!1):n!=null&&na(e,!!r,n,!0);return;case"textarea":Oe("invalid",e),i=o=r=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":r=l;break;case"defaultValue":o=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error($(91));break;default:je(e,t,a,l,n,null)}gS(e,r,o,i);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:je(e,t,s,r,n,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(r=0;r<Yl.length;r++)Oe(Yl[r],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error($(137,t));default:je(e,t,u,r,n,null)}return;default:if(dg(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&ap(e,t,f,r,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(r=n[l],r!=null&&je(e,t,l,r,n,null))}function aA(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,l=null,s=null,u=null,f=null;for(h in n){var c=n[h];if(n.hasOwnProperty(h)&&c!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=c;default:r.hasOwnProperty(h)||je(e,t,h,null,r,c)}}for(var d in r){var h=r[d];if(c=n[d],r.hasOwnProperty(d)&&(h!=null||c!=null))switch(d){case"type":i=h;break;case"name":o=h;break;case"checked":u=h;break;case"defaultChecked":f=h;break;case"value":a=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error($(137,t));break;default:h!==c&&je(e,t,d,h,r,c)}}kh(e,a,l,s,u,f,i,o);return;case"select":h=a=l=d=null;for(i in n)if(s=n[i],n.hasOwnProperty(i)&&s!=null)switch(i){case"value":break;case"multiple":h=s;default:r.hasOwnProperty(i)||je(e,t,i,null,r,s)}for(o in r)if(i=r[o],s=n[o],r.hasOwnProperty(o)&&(i!=null||s!=null))switch(o){case"value":d=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==s&&je(e,t,o,i,r,s)}t=l,n=a,r=h,d!=null?na(e,!!n,d,!1):!!r!=!!n&&(t!=null?na(e,!!n,t,!0):na(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(l in n)if(o=n[l],n.hasOwnProperty(l)&&o!=null&&!r.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:je(e,t,l,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(o!=null||i!=null))switch(a){case"value":d=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error($(91));break;default:o!==i&&je(e,t,a,o,r,i)}pS(e,d,h);return;case"option":for(var m in n)if(d=n[m],n.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:je(e,t,m,null,r,d)}for(s in r)if(d=r[s],h=n[s],r.hasOwnProperty(s)&&d!==h&&(d!=null||h!=null))switch(s){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:je(e,t,s,d,r,h)}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 v in n)d=n[v],n.hasOwnProperty(v)&&d!=null&&!r.hasOwnProperty(v)&&je(e,t,v,null,r,d);for(u in r)if(d=r[u],h=n[u],r.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error($(137,t));break;default:je(e,t,u,d,r,h)}return;default:if(dg(t)){for(var E in n)d=n[E],n.hasOwnProperty(E)&&d!==void 0&&!r.hasOwnProperty(E)&&ap(e,t,E,void 0,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d===void 0&&h===void 0||ap(e,t,f,d,r,h);return}}for(var y in n)d=n[y],n.hasOwnProperty(y)&&d!=null&&!r.hasOwnProperty(y)&&je(e,t,y,null,r,d);for(c in r)d=r[c],h=n[c],!r.hasOwnProperty(c)||d===h||d==null&&h==null||je(e,t,c,d,r,h)}function Rv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lA(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],i=o.transferSize,a=o.initiatorType,l=o.duration;if(i&&l&&Rv(a)){for(a=0,l=o.responseEnd,r+=1;r<n.length;r++){var s=n[r],u=s.startTime;if(u>l)break;var f=s.transferSize,c=s.initiatorType;f&&Rv(c)&&(s=s.responseEnd,a+=f*(s<l?1:(l-u)/(s-u)))}if(--r,t+=8*(i+a)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var lp=null,sp=null;function dc(e){return e.nodeType===9?e:e.ownerDocument}function Cv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Sw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function up(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bd=null;function sA(){var e=window.event;return e&&e.type==="popstate"?e===Bd?!1:(Bd=e,!0):(Bd=null,!1)}var Ew=typeof setTimeout=="function"?setTimeout:void 0,uA=typeof clearTimeout=="function"?clearTimeout:void 0,_v=typeof Promise=="function"?Promise:void 0,cA=typeof queueMicrotask=="function"?queueMicrotask:typeof _v<"u"?function(e){return _v.resolve(null).then(e).catch(fA)}:Ew;function fA(e){setTimeout(function(){throw e})}function Po(e){return e==="head"}function xv(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(o),Ca(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")kl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,kl(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[ps]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&kl(e.ownerDocument.body);n=o}while(n);Ca(t)}function Tv(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function cp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cp(n),fg(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function dA(e,t,n,r){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ps])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Bn(e.nextSibling),e===null)break}return null}function hA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Bn(e.nextSibling),e===null))return null;return e}function ww(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bn(e.nextSibling),e===null))return null;return e}function fp(e){return e.data==="$?"||e.data==="$~"}function dp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pA(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Bn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var hp=null;function Av(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Bn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ov(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Rw(e,t,n){switch(t=dc(n),e){case"html":if(e=t.documentElement,!e)throw Error($(452));return e;case"head":if(e=t.head,!e)throw Error($(453));return e;case"body":if(e=t.body,!e)throw Error($(454));return e;default:throw Error($(451))}}function kl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fg(e)}var Un=new Map,Mv=new Set;function hc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Fr=Be.d;Be.d={f:gA,r:mA,D:yA,C:vA,L:bA,m:SA,X:wA,S:EA,M:RA};function gA(){var e=Fr.f(),t=cf();return e||t}function mA(e){var t=Pa(e);t!==null&&t.tag===5&&t.type==="form"?mE(t):Fr.r(e)}var Ua=typeof document>"u"?null:document;function Cw(e,t,n){var r=Ua;if(r&&typeof t=="string"&&t){var o=kn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Mv.has(o)||(Mv.add(o),e={rel:e,crossOrigin:n,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),It(t,"link",e),Tt(t),r.head.appendChild(t)))}}function yA(e){Fr.D(e),Cw("dns-prefetch",e,null)}function vA(e,t){Fr.C(e,t),Cw("preconnect",e,t)}function bA(e,t,n){Fr.L(e,t,n);var r=Ua;if(r&&e&&t){var o='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+kn(n.imageSizes)+'"]')):o+='[href="'+kn(e)+'"]';var i=o;switch(t){case"style":i=Ra(e);break;case"script":i=$a(e)}Un.has(i)||(e=We({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Un.set(i,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(Ss(i))||t==="script"&&r.querySelector(Es(i))||(t=r.createElement("link"),It(t,"link",e),Tt(t),r.head.appendChild(t)))}}function SA(e,t){Fr.m(e,t);var n=Ua;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+kn(r)+'"][href="'+kn(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=$a(e)}if(!Un.has(i)&&(e=We({rel:"modulepreload",href:e},t),Un.set(i,e),n.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Es(i)))return}r=n.createElement("link"),It(r,"link",e),Tt(r),n.head.appendChild(r)}}}function EA(e,t,n){Fr.S(e,t,n);var r=Ua;if(r&&e){var o=ta(r).hoistableStyles,i=Ra(e);t=t||"default";var a=o.get(i);if(!a){var l={loading:0,preload:null};if(a=r.querySelector(Ss(i)))l.loading=5;else{e=We({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Un.get(i))&&Qg(e,n);var s=a=r.createElement("link");Tt(s),It(s,"link",e),s._p=new Promise(function(u,f){s.onload=u,s.onerror=f}),s.addEventListener("load",function(){l.loading|=1}),s.addEventListener("error",function(){l.loading|=2}),l.loading|=4,Tu(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:l},o.set(i,a)}}}function wA(e,t){Fr.X(e,t);var n=Ua;if(n&&e){var r=ta(n).hoistableScripts,o=$a(e),i=r.get(o);i||(i=n.querySelector(Es(o)),i||(e=We({src:e,async:!0},t),(t=Un.get(o))&&Zg(e,t),i=n.createElement("script"),Tt(i),It(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function RA(e,t){Fr.M(e,t);var n=Ua;if(n&&e){var r=ta(n).hoistableScripts,o=$a(e),i=r.get(o);i||(i=n.querySelector(Es(o)),i||(e=We({src:e,async:!0,type:"module"},t),(t=Un.get(o))&&Zg(e,t),i=n.createElement("script"),Tt(i),It(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function kv(e,t,n,r){var o=(o=mo.current)?hc(o):null;if(!o)throw Error($(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ra(n.href),n=ta(o).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ra(n.href);var i=ta(o).hoistableStyles,a=i.get(e);if(a||(o=o.ownerDocument||o,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=o.querySelector(Ss(e)))&&!i._p&&(a.instance=i,a.state.loading=5),Un.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Un.set(e,n),i||CA(o,e,n,a.state))),t&&r===null)throw Error($(528,""));return a}if(t&&r!==null)throw Error($(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$a(n),n=ta(o).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error($(444,e))}}function Ra(e){return'href="'+kn(e)+'"'}function Ss(e){return'link[rel="stylesheet"]['+e+"]"}function _w(e){return We({},e,{"data-precedence":e.precedence,precedence:null})}function CA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),It(t,"link",n),Tt(t),e.head.appendChild(t))}function $a(e){return'[src="'+kn(e)+'"]'}function Es(e){return"script[async]"+e}function Lv(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(r)return t.instance=r,Tt(r),r;var o=We({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Tt(r),It(r,"style",o),Tu(r,n.precedence,e),t.instance=r;case"stylesheet":o=Ra(n.href);var i=e.querySelector(Ss(o));if(i)return t.state.loading|=4,t.instance=i,Tt(i),i;r=_w(n),(o=Un.get(o))&&Qg(r,o),i=(e.ownerDocument||e).createElement("link"),Tt(i);var a=i;return a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),It(i,"link",r),t.state.loading|=4,Tu(i,n.precedence,e),t.instance=i;case"script":return i=$a(n.src),(o=e.querySelector(Es(i)))?(t.instance=o,Tt(o),o):(r=n,(o=Un.get(i))&&(r=We({},n),Zg(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Tt(o),It(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error($(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Tu(r,n.precedence,e));return t.instance}function Tu(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var l=r[a];if(l.dataset.precedence===t)i=l;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qg(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zg(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Au=null;function Dv(e,t,n){if(Au===null){var r=new Map,o=Au=new Map;o.set(n,r)}else o=Au,r=o.get(n),r||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[ps]||i[Dt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var l=r.get(a);l?l.push(i):r.set(a,[i])}}return r}function Nv(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function _A(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xw(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function xA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var o=Ra(r.href),i=t.querySelector(Ss(o));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Tt(i);return}i=t.ownerDocument||t,r=_w(r),(o=Un.get(o))&&Qg(r,o),i=i.createElement("link"),Tt(i);var a=i;a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),It(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=pc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ud=0;function TA(e,t){return e.stylesheets&&e.count===0&&Ou(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Ou(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ud===0&&(Ud=62500*lA());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ou(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ud?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function pc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ou(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gc=null;function Ou(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gc=new Map,t.forEach(AA,e),gc=null,pc.call(e))}function AA(e,t){if(!(t.state.loading&4)){var n=gc.get(e);if(n)var r=n.get(null);else{n=new Map,gc.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}o=t.instance,a=o.getAttribute("data-precedence"),i=n.get(a)||r,i===r&&n.set(null,o),n.set(a,o),this.count++,r=pc.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Kl={$$typeof:Or,Provider:null,Consumer:null,_currentValue:oi,_currentValue2:oi,_threadCount:0};function OA(e,t,n,r,o,i,a,l,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=sd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sd(0),this.hiddenUpdates=sd(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function Tw(e,t,n,r,o,i,a,l,s,u,f,c){return e=new OA(e,t,n,a,s,u,f,c,l),t=1,i===!0&&(t|=24),i=gn(3,null,null,t),e.current=i,i.stateNode=e,t=Rg(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},xg(i),e}function Aw(e){return e?(e=Qi,e):Qi}function Ow(e,t,n,r,o,i){o=Aw(o),r.context===null?r.context=o:r.pendingContext=o,r=vo(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=bo(e,r,t),n!==null&&(nn(n,e,t),Rl(n,e,t))}function Pv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Wg(e,t){Pv(e,t),(e=e.alternate)&&Pv(e,t)}function Mw(e){if(e.tag===13||e.tag===31){var t=_i(e,67108864);t!==null&&nn(t,e,67108864),Wg(e,67108864)}}function Iv(e){if(e.tag===13||e.tag===31){var t=Sn();t=ug(t);var n=_i(e,t);n!==null&&nn(n,e,t),Wg(e,t)}}var mc=!0;function MA(e,t,n,r){var o=ve.T;ve.T=null;var i=Be.p;try{Be.p=2,Jg(e,t,n,r)}finally{Be.p=i,ve.T=o}}function kA(e,t,n,r){var o=ve.T;ve.T=null;var i=Be.p;try{Be.p=8,Jg(e,t,n,r)}finally{Be.p=i,ve.T=o}}function Jg(e,t,n,r){if(mc){var o=pp(r);if(o===null)zd(e,t,r,yc,n),zv(e,r);else if(DA(o,e,t,n,r))r.stopPropagation();else if(zv(e,r),t&4&&-1<LA.indexOf(e)){for(;o!==null;){var i=Pa(o);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=Ko(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var s=1<<31-bn(a);l.entanglements[1]|=s,a&=~s}fr(i),!(ze&6)&&(ac=yn()+500,bs(0))}}break;case 31:case 13:l=_i(i,2),l!==null&&nn(l,i,2),cf(),Wg(i,2)}if(i=pp(r),i===null&&zd(e,t,r,yc,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else zd(e,t,r,null,n)}}function pp(e){return e=hg(e),em(e)}var yc=null;function em(e){if(yc=null,e=Vi(e),e!==null){var t=cs(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Q0(t),e!==null)return e;e=null}else if(n===31){if(e=Z0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yc=e,null}function kw(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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(y1()){case tS:return 2;case nS:return 8;case qu:case v1:return 32;case rS:return 268435456;default:return 32}default:return 32}}var gp=!1,wo=null,Ro=null,Co=null,Ql=new Map,Zl=new Map,io=[],LA="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 zv(e,t){switch(e){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":Ro=null;break;case"mouseover":case"mouseout":Co=null;break;case"pointerover":case"pointerout":Ql.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zl.delete(t.pointerId)}}function il(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Pa(t),t!==null&&Mw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function DA(e,t,n,r,o){switch(t){case"focusin":return wo=il(wo,e,t,n,r,o),!0;case"dragenter":return Ro=il(Ro,e,t,n,r,o),!0;case"mouseover":return Co=il(Co,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ql.set(i,il(Ql.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Zl.set(i,il(Zl.get(i)||null,e,t,n,r,o)),!0}return!1}function Lw(e){var t=Vi(e.target);if(t!==null){var n=cs(t);if(n!==null){if(t=n.tag,t===13){if(t=Q0(n),t!==null){e.blockedOn=t,Ey(e.priority,function(){Iv(n)});return}}else if(t===31){if(t=Z0(n),t!==null){e.blockedOn=t,Ey(e.priority,function(){Iv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dh=r,n.target.dispatchEvent(r),Dh=null}else return t=Pa(n),t!==null&&Mw(t),e.blockedOn=n,!1;t.shift()}return!0}function Bv(e,t,n){Mu(e)&&n.delete(t)}function NA(){gp=!1,wo!==null&&Mu(wo)&&(wo=null),Ro!==null&&Mu(Ro)&&(Ro=null),Co!==null&&Mu(Co)&&(Co=null),Ql.forEach(Bv),Zl.forEach(Bv)}function Qs(e,t){e.blockedOn===t&&(e.blockedOn=null,gp||(gp=!0,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,NA)))}var Zs=null;function Uv(e){Zs!==e&&(Zs=e,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,function(){Zs===e&&(Zs=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(em(r||n)===null)continue;break}var i=Pa(n);i!==null&&(e.splice(t,3),t-=3,Kh(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Ca(e){function t(s){return Qs(s,e)}wo!==null&&Qs(wo,e),Ro!==null&&Qs(Ro,e),Co!==null&&Qs(Co,e),Ql.forEach(t),Zl.forEach(t);for(var n=0;n<io.length;n++){var r=io[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<io.length&&(n=io[0],n.blockedOn===null);)Lw(n),n.blockedOn===null&&io.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[on]||null;if(typeof i=="function")a||Uv(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[on]||null)l=a.formAction;else if(em(o)!==null)continue}else l=a.action;typeof l=="function"?n[r+1]=l:(n.splice(r,3),r-=3),Uv(n)}}}function Dw(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(a){return o=a})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function tm(e){this._internalRoot=e}hf.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));var n=t.current,r=Sn();Ow(n,r,e,t,null,null)};hf.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ow(e.current,2,null,e,null,null),cf(),t[Na]=null}};function hf(e){this._internalRoot=e}hf.prototype.unstable_scheduleHydration=function(e){if(e){var t=sS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<io.length&&t!==0&&t<io[n].priority;n++);io.splice(n,0,e),n===0&&Lw(e)}};var $v=X0.version;if($v!=="19.2.5")throw Error($(527,$v,"19.2.5"));Be.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=c1(t),e=e!==null?W0(e):null,e=e===null?null:e.stateNode,e};var PA={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:ve,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ws.isDisabled&&Ws.supportsFiber)try{fs=Ws.inject(PA),vn=Ws}catch{}}Kc.createRoot=function(e,t){if(!K0(e))throw Error($(299));var n=!1,r="",o=CE,i=_E,a=xE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Tw(e,1,!1,null,null,n,r,null,o,i,a,Dw),e[Na]=t.current,Kg(e),new tm(t)};Kc.hydrateRoot=function(e,t,n){if(!K0(e))throw Error($(299));var r=!1,o="",i=CE,a=_E,l=xE,s=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=Tw(e,1,!0,t,n??null,r,o,s,i,a,l,Dw),t.context=Aw(null),n=t.current,r=Sn(),r=ug(r),o=vo(r),o.callback=null,bo(n,o,r),n=r,t.current.lanes=n,hs(t,n),fr(t),e[Na]=t.current,Kg(e),new hf(t)};Kc.version="19.2.5";function Nw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nw)}catch(e){console.error(e)}}Nw(),G0.exports=Kc;var SU=G0.exports;/**
|
|
51
|
+
* react-router v7.14.2
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/var Hv="popstate";function Gv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function IA(e={}){function t(o,i){let{pathname:a="/",search:l="",hash:s=""}=Ti(o.location.hash.substring(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),mp("",{pathname:a,search:l,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(o,i){let a=o.document.querySelector("base"),l="";if(a&&a.getAttribute("href")){let s=o.location.href,u=s.indexOf("#");l=u===-1?s:s.slice(0,u)}return l+"#"+(typeof i=="string"?i:Wl(i))}function r(o,i){Qn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(i)})`)}return BA(t,n,r,e)}function nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zA(){return Math.random().toString(36).substring(2,10)}function jv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mp(e,t,n=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ti(t):t,state:n,key:t&&t.key||r||zA(),unstable_mask:o}}function Wl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ti(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function BA(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l="POP",s=null,u=f();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function f(){return(a.state||{idx:null}).idx}function c(){l="POP";let E=f(),y=E==null?null:E-u;u=E,s&&s({action:l,location:v.location,delta:y})}function d(E,y){l="PUSH";let p=Gv(E)?E:mp(v.location,E,y);n&&n(p,E),u=f()+1;let b=jv(p,u),S=v.createHref(p.unstable_mask||p);try{a.pushState(b,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;o.location.assign(S)}i&&s&&s({action:l,location:v.location,delta:1})}function h(E,y){l="REPLACE";let p=Gv(E)?E:mp(v.location,E,y);n&&n(p,E),u=f();let b=jv(p,u),S=v.createHref(p.unstable_mask||p);a.replaceState(b,"",S),i&&s&&s({action:l,location:v.location,delta:0})}function m(E){return UA(E)}let v={get action(){return l},get location(){return e(o,a)},listen(E){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(Hv,c),s=E,()=>{o.removeEventListener(Hv,c),s=null}},createHref(E){return t(o,E)},createURL:m,encodeLocation(E){let y=m(E);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(E){return a.go(E)}};return v}function UA(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),nt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Wl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Pw(e,t,n="/"){return $A(e,t,n,!1)}function $A(e,t,n,r){let o=typeof t=="string"?Ti(t):t,i=Gr(o.pathname||"/",n);if(i==null)return null;let a=Iw(e);HA(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=WA(i);l=QA(a[s],u,r)}return l}function Iw(e,t=[],n=[],r="",o=!1){let i=(a,l,s=o,u)=>{let f={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&s)return;nt(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let c=qn([r,f.relativePath]),d=n.concat(f);a.children&&a.children.length>0&&(nt(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Iw(a.children,t,d,c,s)),!(a.path==null&&!a.index)&&t.push({path:c,score:XA(c,a.index),routesMeta:d})};return e.forEach((a,l)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,l);else for(let u of zw(a.path))i(a,l,!0,u)}),t}function zw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=zw(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function HA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:KA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var GA=/^:[\w-]+$/,jA=3,VA=2,FA=1,qA=10,YA=-2,Vv=e=>e==="*";function XA(e,t){let n=e.split("/"),r=n.length;return n.some(Vv)&&(r+=YA),t&&(r+=VA),n.filter(o=>!Vv(o)).reduce((o,i)=>o+(GA.test(i)?jA:i===""?FA:qA),r)}function KA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function QA(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],u=l===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",c=vc({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},f),d=s.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=vc({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!c)return null;Object.assign(o,c.params),a.push({params:o,pathname:qn([i,c.pathname]),pathnameBase:nO(qn([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=qn([i,c.pathnameBase]))}return a}function vc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ZA(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:c},d)=>{if(f==="*"){let m=l[d]||"";a=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const h=l[d];return c&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function ZA(e,t=!1,n=!0){Qn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s,u,f)=>{if(r.push({paramName:l,isOptional:s!=null}),s){let c=f.charAt(u+a.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function WA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Gr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var JA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function eO(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Ti(e):e,i;return n?(n=Uw(n),n.startsWith("/")?i=Fv(n.substring(1),"/"):i=Fv(n,t)):i=t,{pathname:i,search:rO(r),hash:oO(o)}}function Fv(e,t){let n=bc(t).split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function $d(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tO(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bw(e){let t=tO(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function nm(e,t,n,r=!1){let o;typeof e=="string"?o=Ti(e):(o={...e},nt(!o.pathname||!o.pathname.includes("?"),$d("?","pathname","search",o)),nt(!o.pathname||!o.pathname.includes("#"),$d("#","pathname","hash",o)),nt(!o.search||!o.search.includes("#"),$d("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let c=t.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),c-=1;o.pathname=d.join("/")}l=c>=0?t[c]:"/"}let s=eO(o,l),u=a&&a!=="/"&&a.endsWith("/"),f=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||f)&&(s.pathname+="/"),s}var Uw=e=>e.replace(/\/\/+/g,"/"),qn=e=>Uw(e.join("/")),bc=e=>e.replace(/\/+$/,""),nO=e=>bc(e).replace(/^\/*/,"/"),rO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,iO=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function aO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function lO(e){let t=e.map(n=>n.route.path).filter(Boolean);return qn(t)||"/"}var $w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hw(e,t){let n=e;if(typeof n!="string"||!JA.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if($w)try{let i=new URL(window.location.href),a=n.startsWith("//")?new URL(i.protocol+n):new URL(n),l=Gr(a.pathname,t);a.origin===i.origin&&l!=null?n=l+a.search+a.hash:o=!0}catch{Qn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Gw=["POST","PUT","PATCH","DELETE"];new Set(Gw);var sO=["GET",...Gw];new Set(sO);var Ha=g.createContext(null);Ha.displayName="DataRouter";var pf=g.createContext(null);pf.displayName="DataRouterState";var jw=g.createContext(!1);function uO(){return g.useContext(jw)}var Vw=g.createContext({isTransitioning:!1});Vw.displayName="ViewTransition";var cO=g.createContext(new Map);cO.displayName="Fetchers";var fO=g.createContext(null);fO.displayName="Await";var $n=g.createContext(null);$n.displayName="Navigation";var ws=g.createContext(null);ws.displayName="Location";var dr=g.createContext({outlet:null,matches:[],isDataRoute:!1});dr.displayName="Route";var rm=g.createContext(null);rm.displayName="RouteError";var Fw="REACT_ROUTER_ERROR",dO="REDIRECT",hO="ROUTE_ERROR_RESPONSE";function pO(e){if(e.startsWith(`${Fw}:${dO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function gO(e){if(e.startsWith(`${Fw}:${hO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new iO(t.status,t.statusText,t.data)}catch{}}function mO(e,{relative:t}={}){nt(Rs(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=g.useContext($n),{hash:o,pathname:i,search:a}=Cs(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:qn([n,i])),r.createHref({pathname:l,search:a,hash:o})}function Rs(){return g.useContext(ws)!=null}function qr(){return nt(Rs(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(ws).location}var qw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yw(e){g.useContext($n).static||g.useLayoutEffect(e)}function yO(){let{isDataRoute:e}=g.useContext(dr);return e?MO():vO()}function vO(){nt(Rs(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Ha),{basename:t,navigator:n}=g.useContext($n),{matches:r}=g.useContext(dr),{pathname:o}=qr(),i=JSON.stringify(Bw(r)),a=g.useRef(!1);return Yw(()=>{a.current=!0}),g.useCallback((s,u={})=>{if(Qn(a.current,qw),!a.current)return;if(typeof s=="number"){n.go(s);return}let f=nm(s,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:qn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}g.createContext(null);function EU(){let{matches:e}=g.useContext(dr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Cs(e,{relative:t}={}){let{matches:n}=g.useContext(dr),{pathname:r}=qr(),o=JSON.stringify(Bw(n));return g.useMemo(()=>nm(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function bO(e,t){return Xw(e,t)}function Xw(e,t,n){var E;nt(Rs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=g.useContext($n),{matches:o}=g.useContext(dr),i=o[o.length-1],a=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";Qw(l,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=qr(),c;if(t){let y=typeof t=="string"?Ti(t):t;nt(s==="/"||((E=y.pathname)==null?void 0:E.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${y.pathname}" was given in the \`location\` prop.`),c=y}else c=f;let d=c.pathname||"/",h=d;if(s!=="/"){let y=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let m=Pw(e,{pathname:h});Qn(u||m!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),Qn(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=CO(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:qn([s,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:qn([s,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),o,n);return t&&v?g.createElement(ws.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...c},navigationType:"POP"}},v):v}function SO(){let e=OO(),t=aO(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:i},"ErrorBoundary")," or"," ",g.createElement("code",{style:i},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:o},n):null,a)}var EO=g.createElement(SO,null),Kw=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=gO(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(dr.Provider,{value:this.props.routeContext},g.createElement(rm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(wO,{error:e},t):t}};Kw.contextType=jw;var Hd=new WeakMap;function wO({children:e,error:t}){let{basename:n}=g.useContext($n);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=pO(t.digest);if(r){let o=Hd.get(t);if(o)throw o;let i=Hw(r.location,n);if($w&&!Hd.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Hd.set(t,a),a}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function RO({routeContext:e,match:t,children:n}){let r=g.useContext(Ha);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(dr.Provider,{value:e},n)}function CO(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let f=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);nt(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,f+1))}let a=!1,l=-1;if(n&&r){a=r.renderFallback;for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=f),c.route.id){let{loaderData:d,errors:h}=r,m=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){n.isStatic&&(a=!0),l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}}let s=n==null?void 0:n.onError,u=r&&s?(f,c)=>{var d,h;s(f,{location:r.location,params:((h=(d=r.matches)==null?void 0:d[0])==null?void 0:h.params)??{},unstable_pattern:lO(r.matches),errorInfo:c})}:void 0;return o.reduceRight((f,c,d)=>{let h,m=!1,v=null,E=null;r&&(h=i&&c.route.id?i[c.route.id]:void 0,v=c.route.errorElement||EO,a&&(l<0&&d===0?(Qw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,E=null):l===d&&(m=!0,E=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),p=()=>{let b;return h?b=v:m?b=E:c.route.Component?b=g.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=f,g.createElement(RO,{match:c,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:b})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?g.createElement(Kw,{location:r.location,revalidation:r.revalidation,component:v,error:h,children:p(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):p()},null)}function om(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _O(e){let t=g.useContext(Ha);return nt(t,om(e)),t}function xO(e){let t=g.useContext(pf);return nt(t,om(e)),t}function TO(e){let t=g.useContext(dr);return nt(t,om(e)),t}function im(e){let t=TO(e),n=t.matches[t.matches.length-1];return nt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function AO(){return im("useRouteId")}function OO(){var r;let e=g.useContext(rm),t=xO("useRouteError"),n=im("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function MO(){let{router:e}=_O("useNavigate"),t=im("useNavigate"),n=g.useRef(!1);return Yw(()=>{n.current=!0}),g.useCallback(async(o,i={})=>{Qn(n.current,qw),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var qv={};function Qw(e,t,n){!t&&!qv[e]&&(qv[e]=!0,Qn(!1,n))}g.memo(kO);function kO({routes:e,future:t,state:n,isStatic:r,onError:o}){return Xw(e,void 0,{state:n,isStatic:r,onError:o})}function LO(e){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function DO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){nt(!Rs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=g.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[l,o,i,a]);typeof n=="string"&&(n=Ti(n));let{pathname:u="/",search:f="",hash:c="",state:d=null,key:h="default",unstable_mask:m}=n,v=g.useMemo(()=>{let E=Gr(u,l);return E==null?null:{location:{pathname:E,search:f,hash:c,state:d,key:h,unstable_mask:m},navigationType:r}},[l,u,f,c,d,h,r,m]);return Qn(v!=null,`<Router basename="${l}"> is not able to match the URL "${u}${f}${c}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:g.createElement($n.Provider,{value:s},g.createElement(ws.Provider,{children:t,value:v}))}function wU({children:e,location:t}){return bO(yp(e),t)}function yp(e,t=[]){let n=[];return g.Children.forEach(e,(r,o)=>{if(!g.isValidElement(r))return;let i=[...t,o];if(r.type===g.Fragment){n.push.apply(n,yp(r.props.children,i));return}nt(r.type===LO,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=yp(r.props.children,i)),n.push(a)}),n}var ku="get",Lu="application/x-www-form-urlencoded";function gf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function NO(e){return gf(e)&&e.tagName.toLowerCase()==="button"}function PO(e){return gf(e)&&e.tagName.toLowerCase()==="form"}function IO(e){return gf(e)&&e.tagName.toLowerCase()==="input"}function zO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BO(e,t){return e.button===0&&(!t||t==="_self")&&!zO(e)}var Js=null;function UO(){if(Js===null)try{new FormData(document.createElement("form"),0),Js=!1}catch{Js=!0}return Js}var $O=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gd(e){return e!=null&&!$O.has(e)?(Qn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Lu}"`),null):e}function HO(e,t){let n,r,o,i,a;if(PO(e)){let l=e.getAttribute("action");r=l?Gr(l,t):null,n=e.getAttribute("method")||ku,o=Gd(e.getAttribute("enctype"))||Lu,i=new FormData(e)}else if(NO(e)||IO(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?Gr(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||ku,o=Gd(e.getAttribute("formenctype"))||Gd(l.getAttribute("enctype"))||Lu,i=new FormData(l,e),!UO()){let{name:u,type:f,value:c}=e;if(f==="image"){let d=u?`${u}.`:"";i.append(`${d}x`,"0"),i.append(`${d}y`,"0")}else u&&i.append(u,c)}}else{if(gf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ku,r=null,o=Lu,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function am(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Zw(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Gr(o.pathname,t)==="/"?o.pathname=`${bc(t)}/_root.${r}`:o.pathname=`${bc(o.pathname)}.${r}`,o}async function GO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function VO(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await GO(i,n);return a.links?a.links():[]}return[]}));return XO(r.flat(1).filter(jO).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Yv(e,t,n,r,o,i){let a=(s,u)=>n[u]?s.route.id!==n[u].route.id:!0,l=(s,u)=>{var f;return n[u].pathname!==s.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==s.params["*"]};return i==="assets"?t.filter((s,u)=>a(s,u)||l(s,u)):i==="data"?t.filter((s,u)=>{var c;let f=r.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(a(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((c=n[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function FO(e,t,{includeHydrateFallback:n}={}){return qO(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function qO(e){return[...new Set(e)]}function YO(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function XO(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(YO(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function lm(){let e=g.useContext(Ha);return am(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function KO(){let e=g.useContext(pf);return am(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var sm=g.createContext(void 0);sm.displayName="FrameworkContext";function um(){let e=g.useContext(sm);return am(e,"You must render this element inside a <HydratedRouter> element"),e}function QO(e,t){let n=g.useContext(sm),[r,o]=g.useState(!1),[i,a]=g.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:f,onTouchStart:c}=t,d=g.useRef(null);g.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let v=y=>{y.forEach(p=>{a(p.isIntersecting)})},E=new IntersectionObserver(v,{threshold:.5});return d.current&&E.observe(d.current),()=>{E.disconnect()}}},[e]),g.useEffect(()=>{if(r){let v=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(v)}}},[r]);let h=()=>{o(!0)},m=()=>{o(!1),a(!1)};return n?e!=="intent"?[i,d,{}]:[i,d,{onFocus:al(l,h),onBlur:al(s,m),onMouseEnter:al(u,h),onMouseLeave:al(f,m),onTouchStart:al(c,h)}]:[!1,d,{}]}function al(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ZO({page:e,...t}){let n=uO(),{router:r}=lm(),o=g.useMemo(()=>Pw(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?n?g.createElement(JO,{page:e,matches:o,...t}):g.createElement(eM,{page:e,matches:o,...t}):null}function WO(e){let{manifest:t,routeModules:n}=um(),[r,o]=g.useState([]);return g.useEffect(()=>{let i=!1;return VO(e,t,n).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,n]),r}function JO({page:e,matches:t,...n}){let r=qr(),{future:o}=um(),{basename:i}=lm(),a=g.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let l=Zw(e,i,o.unstable_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:u.push(f.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[i,o.unstable_trailingSlashAwareDataRequests,e,r,t]);return g.createElement(g.Fragment,null,a.map(l=>g.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function eM({page:e,matches:t,...n}){let r=qr(),{future:o,manifest:i,routeModules:a}=um(),{basename:l}=lm(),{loaderData:s,matches:u}=KO(),f=g.useMemo(()=>Yv(e,t,u,i,r,"data"),[e,t,u,i,r]),c=g.useMemo(()=>Yv(e,t,u,i,r,"assets"),[e,t,u,i,r]),d=g.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,E=!1;if(t.forEach(p=>{var S;let b=i.routes[p.route.id];!b||!b.hasLoader||(!f.some(w=>w.route.id===p.route.id)&&p.route.id in s&&((S=a[p.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?E=!0:v.add(p.route.id))}),v.size===0)return[];let y=Zw(e,l,o.unstable_trailingSlashAwareDataRequests,"data");return E&&v.size>0&&y.searchParams.set("_routes",t.filter(p=>v.has(p.route.id)).map(p=>p.route.id).join(",")),[y.pathname+y.search]},[l,o.unstable_trailingSlashAwareDataRequests,s,r,i,f,t,e,a]),h=g.useMemo(()=>FO(c,i),[c,i]),m=WO(c);return g.createElement(g.Fragment,null,d.map(v=>g.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),h.map(v=>g.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),m.map(({key:v,link:E})=>g.createElement("link",{key:v,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function tM(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var nM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nM&&(window.__reactRouterVersion="7.14.2")}catch{}function RU({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=g.useRef();o.current==null&&(o.current=IA({window:r,v5Compat:!0}));let i=o.current,[a,l]=g.useState({action:i.action,location:i.location}),s=g.useCallback(u=>{n===!1?l(u):g.startTransition(()=>l(u))},[n]);return g.useLayoutEffect(()=>i.listen(s),[i,s]),g.createElement(DO,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i,unstable_useTransitions:n})}var Ww=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jw=g.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,unstable_mask:l,state:s,target:u,to:f,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...m},v){let{basename:E,navigator:y,unstable_useTransitions:p}=g.useContext($n),b=typeof f=="string"&&Ww.test(f),S=Hw(f,E);f=S.to;let w=mO(f,{relative:o}),C=qr(),R=null;if(l){let M=nm(l,[],C.unstable_mask?C.unstable_mask.pathname:"/",!0);E!=="/"&&(M.pathname=M.pathname==="/"?E:qn([E,M.pathname])),R=y.createHref(M)}let[T,O,L]=QO(r,m),I=aM(f,{replace:a,unstable_mask:l,state:s,target:u,preventScrollReset:c,relative:o,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p});function B(M){t&&t(M),M.defaultPrevented||I(M)}let A=!(S.isExternal||i),D=g.createElement("a",{...m,...L,href:(A?R:void 0)||S.absoluteURL||w,onClick:A?B:t,ref:tM(v,O),target:u,"data-discover":!b&&n==="render"?"true":void 0});return T&&!b?g.createElement(g.Fragment,null,D,g.createElement(ZO,{page:w})):D});Jw.displayName="Link";var rM=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:l,children:s,...u},f){let c=Cs(a,{relative:u.relative}),d=qr(),h=g.useContext(pf),{navigator:m,basename:v}=g.useContext($n),E=h!=null&&fM(c)&&l===!0,y=m.encodeLocation?m.encodeLocation(c).pathname:c.pathname,p=d.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(p=p.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=Gr(b,v)||b);const S=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let w=p===y||!o&&p.startsWith(y)&&p.charAt(S)==="/",C=b!=null&&(b===y||!o&&b.startsWith(y)&&b.charAt(y.length)==="/"),R={isActive:w,isPending:C,isTransitioning:E},T=w?t:void 0,O;typeof r=="function"?O=r(R):O=[r,w?"active":null,C?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let L=typeof i=="function"?i(R):i;return g.createElement(Jw,{...u,"aria-current":T,className:O,ref:f,style:L,to:a,viewTransition:l},typeof s=="function"?s(R):s)});rM.displayName="NavLink";var oM=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a=ku,action:l,onSubmit:s,relative:u,preventScrollReset:f,viewTransition:c,unstable_defaultShouldRevalidate:d,...h},m)=>{let{unstable_useTransitions:v}=g.useContext($n),E=uM(),y=cM(l,{relative:u}),p=a.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&Ww.test(l),S=w=>{if(s&&s(w),w.defaultPrevented)return;w.preventDefault();let C=w.nativeEvent.submitter,R=(C==null?void 0:C.getAttribute("formmethod"))||a,T=()=>E(C||w.currentTarget,{fetcherKey:t,method:R,navigate:n,replace:o,state:i,relative:u,preventScrollReset:f,viewTransition:c,unstable_defaultShouldRevalidate:d});v&&n!==!1?g.startTransition(()=>T()):T()};return g.createElement("form",{ref:m,method:p,action:y,onSubmit:r?s:S,...h,"data-discover":!b&&e==="render"?"true":void 0})});oM.displayName="Form";function iM(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eR(e){let t=g.useContext(Ha);return nt(t,iM(e)),t}function aM(e,{target:t,replace:n,unstable_mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let f=yO(),c=qr(),d=Cs(e,{relative:a});return g.useCallback(h=>{if(BO(h,t)){h.preventDefault();let m=n!==void 0?n:Wl(c)===Wl(d),v=()=>f(e,{replace:m,unstable_mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s});u?g.startTransition(()=>v()):v()}},[c,f,d,n,r,o,t,e,i,a,l,s,u])}var lM=0,sM=()=>`__${String(++lM)}__`;function uM(){let{router:e}=eR("useSubmit"),{basename:t}=g.useContext($n),n=AO(),r=e.fetch,o=e.navigate;return g.useCallback(async(i,a={})=>{let{action:l,method:s,encType:u,formData:f,body:c}=HO(i,t);if(a.navigate===!1){let d=a.fetcherKey||sM();await r(d,n,a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,o,t,n])}function cM(e,{relative:t}={}){let{basename:n}=g.useContext($n),r=g.useContext(dr);nt(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Cs(e||".",{relative:t})},a=qr();if(e==null){i.search=a.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(f=>f==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let f=l.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:qn([n,i.pathname])),Wl(i)}function fM(e,{relative:t}={}){let n=g.useContext(Vw);nt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=eR("useViewTransitionState"),o=Cs(e,{relative:t});if(!n.isTransitioning)return!1;let i=Gr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Gr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vc(o.pathname,a)!=null||vc(o.pathname,i)!=null}function vp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ll={};function Jl(e,t,n,r,o){let i={...bp(e,Ll)};return t&&(i=Du(i,t)),n&&(i=Du(i,n)),r&&(i=Du(i,r)),i}function dM(e){if(e.length===0)return Ll;if(e.length===1)return bp(e[0],Ll);let t={...bp(e[0],Ll)};for(let n=1;n<e.length;n+=1)t=Du(t,e[n]);return t}function Du(e,t){return tR(t)?t(e):hM(e,t)}function hM(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=vp(e.style,r);break}case"className":{e[n]=nR(e.className,r);break}default:pM(n,r)?e[n]=gM(e[n],r):e[n]=r}}return e}function pM(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function tR(e){return typeof e=="function"}function bp(e,t){return tR(e)?e(t):e??Ll}function gM(e,t){return t?e?n=>{if(mM(n)){const o=n;Sp(o);const i=t(o);return o.baseUIHandlerPrevented||e==null||e(o),i}const r=t(n);return e==null||e(n),r}:t:e}function Sp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function nR(e,t){return t?e?t+" "+e:t:e}function mM(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const yM=()=>{},ie=typeof document<"u"?g.useLayoutEffect:yM;function et(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const rR=g.createContext(void 0);function Ga(e){const t=g.useContext(rR);if(t===void 0&&!e)throw new Error(et(72));return t}const Xv={};function an(e,t){const n=g.useRef(Xv);return n.current===Xv&&(n.current=e(t)),n}const vM=[];function cm(e){g.useEffect(e,vM)}const ll=0;class Zn{constructor(){z(this,"currentId",ll);z(this,"clear",()=>{this.currentId!==ll&&(clearTimeout(this.currentId),this.currentId=ll)});z(this,"disposeEffect",()=>this.clear)}static create(){return new Zn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ll,n()},t)}isStarted(){return this.currentId!==ll}}function Cn(){const e=an(Zn.create).current;return cm(e.disposeEffect),e}function mf(){return typeof window<"u"}function Io(e){return fm(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(fm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fm(e){return mf()?e instanceof Node||e instanceof at(e).Node:!1}function Ge(e){return mf()?e instanceof Element||e instanceof at(e).Element:!1}function tt(e){return mf()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function Ep(e){return!mf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function Ai(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ln(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function bM(e){return/^(table|td|th)$/.test(Io(e))}function yf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const SM=/transform|translate|scale|rotate|perspective|filter/,EM=/paint|layout|strict|content/,Vo=e=>!!e&&e!=="none";let jd;function dm(e){const t=Ge(e)?ln(e):e;return Vo(t.transform)||Vo(t.translate)||Vo(t.scale)||Vo(t.rotate)||Vo(t.perspective)||!vf()&&(Vo(t.backdropFilter)||Vo(t.filter))||SM.test(t.willChange||"")||EM.test(t.contain||"")}function wM(e){let t=sr(e);for(;tt(t)&&!ar(t);){if(dm(t))return t;if(yf(t))return null;t=sr(t)}return null}function vf(){return jd==null&&(jd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jd}function ar(e){return/^(html|body|#document)$/.test(Io(e))}function ln(e){return at(e).getComputedStyle(e)}function bf(e){return Ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sr(e){if(Io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ep(e)&&e.host||hr(e);return Ep(t)?t.host:t}function oR(e){const t=sr(e);return ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Ai(t)?t:oR(t)}function _o(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=oR(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=at(o);if(i){const l=wp(a);return t.concat(a,a.visualViewport||[],Ai(o)?o:[],l&&n?_o(l):[])}else return t.concat(o,_o(o,[],n))}function wp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lt(e){const t=an(RM,e).current;return t.next=e,ie(t.effect),t}function RM(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Vd=Xc[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],CM=Vd&&Vd!==g.useLayoutEffect?Vd:e=>e();function W(e){const t=an(_M).current;return t.next=e,CM(t.effect),t.trampoline}function _M(){const e={next:void 0,callback:xM,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function xM(){}const ja=typeof navigator<"u",Fd=MM(),iR=LM(),aR=kM(),TM=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),AM=Fd.platform==="MacIntel"&&Fd.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Fd.platform),lR=ja&&/apple/i.test(navigator.vendor),Rp=ja&&/android/i.test(iR)||/android/i.test(aR),OM=ja&&iR.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,sR=aR.includes("jsdom/");function MM(){if(!ja)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 kM(){if(!ja)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function LM(){if(!ja)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Cp="data-base-ui-focusable",uR="active",cR="selected",fR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",xo="ArrowLeft",To="ArrowRight",hm="ArrowUp",_s="ArrowDown";function en(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 Re(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&&Ep(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function At(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jn(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 DM(e){return e.matches("html,body")}function ct(e){return(e==null?void 0:e.ownerDocument)||document}function pm(e){return tt(e)&&e.matches(fR)}function _p(e){return e?e.getAttribute("role")==="combobox"&&pm(e):!1}function Sc(e){if(!e||sR)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ec(e){return e?e.hasAttribute(Cp)?e:e.querySelector(`[${Cp}]`)||e:null}function ui(e,t,n=!0){return e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ui(e,o.id,n)])}function Kv(e,t){var o;let n=[],r=(o=e.find(i=>i.id===t))==null?void 0:o.parentId;for(;r;){const i=e.find(a=>a.id===r);r=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function $t(e){e.preventDefault(),e.stopPropagation()}function NM(e){return"nativeEvent"in e}function dR(e){return e.mozInputSource===0&&e.isTrusted?!0:Rp&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hR(e){return sR?!1:!Rp&&e.width===0&&e.height===0||Rp&&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 mi(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function pR(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const PM=["top","right","bottom","left"],_a=Math.min,pn=Math.max,xa=Math.round,ea=Math.floor,lr=e=>({x:e,y:e}),IM={left:"right",right:"left",bottom:"top",top:"bottom"};function xp(e,t,n){return pn(e,_a(t,n))}function jr(e,t){return typeof e=="function"?e(t):e}function rn(e){return e.split("-")[0]}function zo(e){return e.split("-")[1]}function gm(e){return e==="x"?"y":"x"}function mm(e){return e==="y"?"height":"width"}function Pn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ym(e){return gm(Pn(e))}function zM(e,t,n){n===void 0&&(n=!1);const r=zo(e),o=ym(e),i=mm(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=wc(a)),[a,wc(a)]}function BM(e){const t=wc(e);return[Tp(e),t,Tp(t)]}function Tp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Qv=["left","right"],Zv=["right","left"],UM=["top","bottom"],$M=["bottom","top"];function HM(e,t,n){switch(e){case"top":case"bottom":return n?t?Zv:Qv:t?Qv:Zv;case"left":case"right":return t?UM:$M;default:return[]}}function GM(e,t,n,r){const o=zo(e);let i=HM(rn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tp)))),i}function wc(e){const t=rn(e);return IM[t]+e.slice(t.length)}function jM(e){return{top:0,right:0,bottom:0,left:0,...e}}function gR(e){return typeof e!="number"?jM(e):{top:e,right:e,bottom:e,left:e}}function Rc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eu(e,t,n){return Math.floor(e/t)!==n}function Dl(e,t){return t<0||t>=e.current.length}function qd(e,t){return Ut(e,{disabledIndices:t})}function Wv(e,t){return Ut(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ut(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&Nl(e,i,r));return i}function VM(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:l,maxIndex:s,prevIndex:u,stopEvent:f=!1}){let c=u;const d=[],h={};let m=!1;{let y=null,p=-1;e.current.forEach((b,S)=>{if(b==null)return;const w=b.closest('[role="row"]');w&&(m=!0),(w!==y||p===-1)&&(y=w,p+=1,d[p]=[]),d[p].push(S),h[S]=p})}const v=m&&d.length>0&&d.some(y=>y.length!==i);function E(y){if(!v||u===-1)return;const p=h[u];if(p==null)return;const b=d[p].indexOf(u);let S=y==="up"?p-1:p+1;r&&(S<0?S=d.length-1:S>=d.length&&(S=0));const w=new Set;for(;S>=0&&S<d.length&&!w.has(S);){w.add(S);const C=d[S];if(C.length===0){S=y==="up"?S-1:S+1;continue}const R=Math.min(b,C.length-1);for(let T=R;T>=0;T-=1){const O=C[T];if(!Nl(e,O,a))return O}S=y==="up"?S-1:S+1,r&&(S<0?S=d.length-1:S>=d.length&&(S=0))}}if(t.key===hm){const y=E("up");if(y!==void 0)f&&$t(t),c=y;else{if(f&&$t(t),u===-1)c=s;else if(c=Ut(e,{startingIndex:c,amount:i,decrement:!0,disabledIndices:a}),r&&(u-i<l||c<0)){const p=u%i,b=s%i,S=s-(b-p);b===p?c=s:c=b>p?S:S-i}Dl(e,c)&&(c=u)}}if(t.key===_s){const y=E("down");y!==void 0?(f&&$t(t),c=y):(f&&$t(t),u===-1?c=l:(c=Ut(e,{startingIndex:u,amount:i,disabledIndices:a}),r&&u+i>s&&(c=Ut(e,{startingIndex:u%i-i,amount:i,disabledIndices:a}))),Dl(e,c)&&(c=u))}if(n==="both"){const y=ea(u/i);t.key===(o?xo:To)&&(f&&$t(t),u%i!==i-1?(c=Ut(e,{startingIndex:u,disabledIndices:a}),r&&eu(c,i,y)&&(c=Ut(e,{startingIndex:u-u%i-1,disabledIndices:a}))):r&&(c=Ut(e,{startingIndex:u-u%i-1,disabledIndices:a})),eu(c,i,y)&&(c=u)),t.key===(o?To:xo)&&(f&&$t(t),u%i!==0?(c=Ut(e,{startingIndex:u,decrement:!0,disabledIndices:a}),r&&eu(c,i,y)&&(c=Ut(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}))):r&&(c=Ut(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a})),eu(c,i,y)&&(c=u));const p=ea(s/i)===y;Dl(e,c)&&(r&&p?c=t.key===(o?To:xo)?s:Ut(e,{startingIndex:u-u%i-1,disabledIndices:a}):c=u)}return c}function FM(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:a},l)=>{let s=!1;for(n&&(o=0);!s;){const u=[];for(let f=0;f<i;f+=1)for(let c=0;c<a;c+=1)u.push(o+f+c*t);o%t+i<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=l}),s=!0):o+=1}}),[...r]}function qM(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function YM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Nl(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}/*!
|
|
62
|
+
* tabbable 6.4.0
|
|
63
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
64
|
+
*/var XM=["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] *)"],Cc=XM.join(","),mR=typeof Element>"u",Ta=mR?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_c=!mR&&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},xc=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):xc(t.parentNode));return a},KM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yR=function(t,n,r){if(xc(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Cc));return n&&Ta.call(t,Cc)&&o.unshift(t),o=o.filter(r),o},Tc=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!xc(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),s=l.length?l:a.children,u=Tc(s,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var f=Ta.call(a,Cc);f&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!xc(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&d){var h=Tc(c===!0?a.children:c.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},vR=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bR=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KM(t))&&!vR(t)?0:t.tabIndex},QM=function(t,n){var r=bR(t);return r<0&&n&&!vR(t)?0:r},ZM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},SR=function(t){return t.tagName==="INPUT"},WM=function(t){return SR(t)&&t.type==="hidden"},JM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ek=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},tk=function(t){if(!t.name)return!0;var n=t.form||_c(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=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 i=ek(o,t.form);return!i||i===t},nk=function(t){return SR(t)&&t.type==="radio"},rk=function(t){return nk(t)&&!tk(t)},ok=function(t){var n,r=t&&_c(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,l,s;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(s=t.ownerDocument)!==null&&s!==void 0&&s.contains(t));!i&&o;){var u,f,c;r=_c(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((f=o)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(o))}}return i},Jv=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},ik=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ta.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(Ta.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var u=t.parentElement,f=_c(t);if(u&&!u.shadowRoot&&o(u)===!0)return Jv(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=s}if(ok(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Jv(t);return!1},ak=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 o=n.children.item(r);if(o.tagName==="LEGEND")return Ta.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ap=function(t,n){return!(n.disabled||WM(n)||ik(n,t)||JM(n)||ak(n))},Op=function(t,n){return!(rk(n)||bR(n)<0||!Ap(t,n))},lk=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ER=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,s=QM(l,a),u=a?ER(o.candidates):l;s===0?a?n.push.apply(n,u):n.push(l):r.push({documentOrder:i,tabIndex:s,item:o,isScope:a,content:u})}),r.sort(ZM).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},xs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Tc([t],n.includeContainer,{filter:Op.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:lk}):r=yR(t,n.includeContainer,Op.bind(null,n)),ER(r)},sk=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Tc([t],n.includeContainer,{filter:Ap.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=yR(t,n.includeContainer,Ap.bind(null,n)),r},wR=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ta.call(t,Cc)===!1?!1:Op(n,t)};const Va=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function RR(e,t){const n=xs(e,Va()),r=n.length;if(r===0)return;const o=en(ct(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function Sf(e){return RR(ct(e).body,1)||e}function CR(e){return RR(ct(e).body,-1)||e}function _R(e,t){if(!e)return null;const n=xs(ct(e).body,Va()),r=n.length;if(r===0)return null;const o=n.indexOf(e);if(o===-1)return null;const i=(o+t+r)%r;return n[i]}function xR(e){return _R(e,1)}function TR(e){return _R(e,-1)}function ci(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Re(n,r)}function uk(e){xs(e,Va()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eb(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 ck={...Xc};let tb=0;function fk(e,t="mui"){const[n,r]=g.useState(e),o=e||n;return g.useEffect(()=>{n==null&&(tb+=1,r(`${t}-${tb}`))},[n,t]),o}const nb=ck.useId;function Yr(e,t){if(nb!==void 0){const n=nb();return e??(t?`${t}-${n}`:n)}return fk(e,t)}function AR(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(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 vm{constructor(){z(this,"nodesRef",{current:[]});z(this,"events",AR())}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 OR=g.createContext(null),MR=g.createContext(null),pr=()=>{var e;return((e=g.useContext(OR))==null?void 0:e.id)||null},Bo=e=>{const t=g.useContext(MR);return e??t};function bm(e){const t=Yr(),n=Bo(e),r=pr();return ie(()=>{if(!t)return;const o={id:t,parentId:r};return n==null||n.addNode(o),()=>{n==null||n.removeNode(o)}},[n,t,r]),t}function kR(e){const{children:t,id:n}=e,r=pr();return ee.jsx(OR.Provider,{value:g.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function LR(e){const{children:t,externalTree:n}=e,r=an(()=>n??new vm).current;return ee.jsx(MR.Provider,{value:r,children:t})}function DR(){}const Ac=Object.freeze([]),wt=Object.freeze({}),dk=500,NR=500,hk={style:{transition:"none"}},PR="data-base-ui-click-trigger",pk={fallbackAxisSide:"none"},Sm={fallbackAxisSide:"end"},gk={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Em="none",Yn="trigger-press",yt="trigger-hover",es="trigger-focus",wm="outside-press",Rm="item-press",Vr="focus-out",Ts="escape-key",Nu="list-navigation",mk="cancel-open",ml="sibling-open",yk="disabled",yi="imperative-action";function xe(e,t,n,r){let o=!1,i=!1;const a=wt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function Aa(e){return`data-base-ui-${e}`}function Pu(e,t,n){if(n&&!mi(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 vk=g.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Zn,currentIdRef:{current:null},currentContextRef:{current:null}});function bk(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:o=!0,open:i}=t,a=g.useContext(vk),{currentIdRef:l,delayRef:s,timeoutMs:u,initialDelayRef:f,currentContextRef:c,hasProvider:d,timeout:h}=a,[m,v]=g.useState(!1);return ie(()=>{function E(){var y;v(!1),(y=c.current)==null||y.setIsInstantPhase(!1),l.current=null,c.current=null,s.current=f.current}if(o&&l.current&&!i&&l.current===r){if(v(!1),u){const y=r;return h.start(u,()=>{n.select("open")||l.current&&l.current!==y||E()}),()=>{h.clear()}}E()}},[o,i,r,l,s,u,f,c,h,n]),ie(()=>{if(!o||!i)return;const E=c.current,y=l.current;h.clear(),c.current={onOpenChange:n.setOpen,setIsInstantPhase:v},l.current=r,s.current={open:0,close:Pu(f.current,"close")},y!==null&&y!==r?(v(!0),E==null||E.setIsInstantPhase(!0),E==null||E.onOpenChange(!1,xe(Em))):(v(!1),E==null||E.setIsInstantPhase(!1))},[o,i,r,n,l,s,u,f,c,h]),ie(()=>()=>{c.current=null},[c]),g.useMemo(()=>({hasProvider:d,delayRef:s,isInstantPhase:m}),[d,s,m])}function Oa(e,t,n,r){const o=an(IR).current;return Ek(o,e,t,n,r)&&zR(o,[e,t,n,r]),o.callback}function Sk(e){const t=an(IR).current;return wk(t,e)&&zR(t,e),t.callback}function IR(){return{callback:null,cleanup:null,refs:[]}}function Ek(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function wk(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function zR(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 o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const Cm={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},tu=null;class Rk{constructor(){z(this,"callbacks",[]);z(this,"callbacksCount",0);z(this,"nextId",1);z(this,"startId",1);z(this,"isScheduled",!1);z(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i<n.length;i+=1)(o=n[i])==null||o.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 nu=new Rk;class tr{constructor(){z(this,"currentId",tu);z(this,"cancel",()=>{this.currentId!==tu&&(nu.cancel(this.currentId),this.currentId=tu)});z(this,"disposeEffect",()=>this.cancel)}static create(){return new tr}static request(t){return nu.request(t)}static cancel(t){return nu.cancel(t)}request(t){this.cancel(),this.currentId=nu.request(()=>{this.currentId=tu,t()})}}function Oi(){const e=an(tr.create).current;return cm(e.disposeEffect),e}function Xt(e){return(e==null?void 0:e.ownerDocument)||document}const Xn=g.forwardRef(function(t,n){const[r,o]=g.useState();ie(()=>{lR&&o("button")},[]);const i={tabIndex:0,role:r};return ee.jsx("span",{...t,ref:n,style:Cm,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});let rb=0;function Iu(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(rb);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():rb=requestAnimationFrame(i)}const sa={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ob(e){return e==="inert"?sa.inert:e==="aria-hidden"?sa["aria-hidden"]:sa.none}let ru=new WeakSet,ou={},Yd=0;const BR=e=>e&&(e.host||BR(e.parentNode)),Ck=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=BR(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _k(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Ck(t,e),l=new Set,s=new Set(a),u=[];ou[o]||(ou[o]=new WeakMap);const f=ou[o];a.forEach(c),d(t),l.clear();function c(h){!h||l.has(h)||(l.add(h),h.parentNode&&c(h.parentNode))}function d(h){!h||s.has(h)||[].forEach.call(h.children,m=>{if(Io(m)!=="script")if(l.has(m))d(m);else{const v=i?m.getAttribute(i):null,E=v!==null&&v!=="false",y=ob(i),p=(y.get(m)||0)+1,b=(f.get(m)||0)+1;y.set(m,p),f.set(m,b),u.push(m),p===1&&E&&ru.add(m),b===1&&m.setAttribute(o,""),!E&&i&&m.setAttribute(i,i==="inert"?"":"true")}})}return Yd+=1,()=>{u.forEach(h=>{const m=ob(i),E=(m.get(h)||0)-1,y=(f.get(h)||0)-1;m.set(h,E),f.set(h,y),E||(!ru.has(h)&&i&&h.removeAttribute(i),ru.delete(h)),y||h.removeAttribute(o)}),Yd-=1,Yd||(sa.inert=new WeakMap,sa["aria-hidden"]=new WeakMap,sa.none=new WeakMap,ru=new WeakSet,ou={})}}function xk(e,t=!1,n=!1){const r=ct(e[0]).body;return _k(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Tk=parseInt(g.version,10);function _m(e){return Tk>=e}function ib(e){if(!g.isValidElement(e))return null;const t=e,n=t.props;return(_m(19)?n==null?void 0:n.ref:t.ref)??null}function Ak(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ok(e,t){return typeof e=="function"?e(t):e}function Mk(e,t){return typeof e=="function"?e(t):e}function Ue(e,t,n={}){const r=t.render,o=kk(t,n);if(n.enabled===!1)return null;const i=n.state??wt;return Lk(e,r,o,i)}function kk(e,t={}){const{className:n,style:r,render:o}=e,{state:i=wt,ref:a,props:l,stateAttributesMapping:s,enabled:u=!0}=t,f=u?Ok(n,i):void 0,c=u?Mk(r,i):void 0,d=u?Ak(i,s):wt,h=u?vp(d,Array.isArray(l)?dM(l):l)??wt:wt;return typeof document<"u"&&(u?Array.isArray(a)?h.ref=Sk([h.ref,ib(o),...a]):h.ref=Oa(h.ref,ib(o),a):Oa(null,null)),u?(f!==void 0&&(h.className=nR(h.className,f)),c!==void 0&&(h.style=vp(h.style,c)),h):wt}function Lk(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Jl(n,t.props);return o.ref=n.ref,g.cloneElement(t,o)}if(e&&typeof e=="string")return Dk(e,n);throw new Error(et(8))}function Dk(e,t){return e==="button"?g.createElement("button",{type:"button",...t,key:t.key}):e==="img"?g.createElement("img",{alt:"",...t,key:t.key}):g.createElement(e,t)}const UR=g.createContext(null),$R=()=>g.useContext(UR),Nk=Aa("portal");function HR(e={}){const{ref:t,container:n,componentProps:r=wt,elementProps:o,elementState:i}=e,a=Yr(),l=$R(),s=l==null?void 0:l.portalNode,[u,f]=g.useState(null),[c,d]=g.useState(null),h=g.useRef(null);ie(()=>{if(n===null){h.current&&(h.current=null,d(null),f(null));return}if(a==null)return;const E=(n&&(fm(n)?n:n.current))??s??document.body;if(E==null){h.current&&(h.current=null,d(null),f(null));return}h.current!==E&&(h.current=E,d(null),f(E))},[n,s,a]);const m=Ue("div",r,{ref:[t,d],state:i,props:[{id:a,[Nk]:""},o]});return{portalNode:c,portalSubtree:u&&m?zt.createPortal(m,u):null}}const GR=g.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:l,...s}=t,{portalNode:u,portalSubtree:f}=HR({container:o,ref:n,componentProps:t,elementProps:s}),c=g.useRef(null),d=g.useRef(null),h=g.useRef(null),m=g.useRef(null),[v,E]=g.useState(null),y=v==null?void 0:v.modal,p=v==null?void 0:v.open,b=typeof l=="boolean"?l:!!v&&!v.modal&&v.open&&!!u;g.useEffect(()=>{if(!u||y)return;function w(C){u&&ci(C)&&(C.type==="focusin"?eb:uk)(u)}return u.addEventListener("focusin",w,!0),u.addEventListener("focusout",w,!0),()=>{u.removeEventListener("focusin",w,!0),u.removeEventListener("focusout",w,!0)}},[u,y]),g.useEffect(()=>{!u||p||eb(u)},[p,u]);const S=g.useMemo(()=>({beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:m,portalNode:u,setFocusManagerState:E}),[u]);return ee.jsxs(g.Fragment,{children:[f,ee.jsxs(UR.Provider,{value:S,children:[b&&u&&ee.jsx(Xn,{"data-type":"outside",ref:c,onFocus:w=>{var C;if(ci(w,u))(C=h.current)==null||C.focus();else{const R=v?v.domReference:null,T=CR(R);T==null||T.focus()}}}),b&&u&&ee.jsx("span",{"aria-owns":u.id,style:gk}),u&&zt.createPortal(r,u),b&&u&&ee.jsx(Xn,{"data-type":"outside",ref:d,onFocus:w=>{var C;if(ci(w,u))(C=m.current)==null||C.focus();else{const R=v?v.domReference:null,T=Sf(R);T==null||T.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,xe(Vr,w.nativeEvent)))}}})]})]})});function Wo(e){return e==null?e:"current"in e?e.current:e}function Pk(e,t){const n=at(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 ab=20;let po=[];function xm(){po=po.filter(e=>e.isConnected)}function Ik(e){xm(),e&&Io(e)!=="body"&&(po.push(e),po.length>ab&&(po=po.slice(-ab)))}function Xd(){return xm(),po[po.length-1]}function zk(e){if(!e)return null;const t=Va();return wR(e,t)?e:xs(e,t)[0]||e}function Bk(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():ln(e).display!=="none"}function lb(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=Va(),o=sk(e,n).filter(l=>{const s=l.getAttribute("data-tabindex")||"";return wR(l,n)||l.hasAttribute("data-tabindex")&&!s.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.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 jR(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:i=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:u=!0,openInteractionType:f="",getInsideElements:c=()=>[],nextFocusableElement:d,previousFocusableElement:h,beforeContentFocusGuardRef:m,externalTree:v}=e,E="rootStore"in t?t.rootStore:t,y=E.useState("open"),p=E.useState("domReferenceElement"),b=E.useState("floatingElement"),{events:S,dataRef:w}=E.context,C=W(()=>{var Q;return(Q=w.current.floatingContext)==null?void 0:Q.nodeId}),R=W(c),T=i===!1,O=_p(p)&&T,L=Lt(o),I=Lt(i),B=Lt(a),A=Lt(f),D=Bo(v),M=$R(),x=g.useRef(null),N=g.useRef(null),_=g.useRef(!1),k=g.useRef(!1),P=g.useRef(!1),q=g.useRef(-1),U=g.useRef(""),G=g.useRef(""),ue=Cn(),te=Cn(),ce=Oi(),oe=M!=null,J=Ec(b),Se=W((Q=J)=>Q?xs(Q,Va()):[]),Ae=W(Q=>{const K=Se(Q);return L.current.map(()=>K).filter(Boolean).flat()});g.useEffect(()=>{if(r||!s)return;function Q(re){re.key==="Tab"&&Re(J,en(ct(J)))&&Se().length===0&&!O&&$t(re)}const K=ct(J);return K.addEventListener("keydown",Q),()=>{K.removeEventListener("keydown",Q)}},[r,p,J,s,L,O,Se,Ae]),g.useEffect(()=>{if(r||!b)return;function Q(K){const re=At(K),me=Se().indexOf(re);me!==-1&&(q.current=me)}return b.addEventListener("focusin",Q),()=>{b.removeEventListener("focusin",Q)}},[r,b,Se]),g.useEffect(()=>{if(r||!y)return;const Q=ct(J);function K(){P.current=!1}function re(me){const le=At(me),se=Re(b,le)||Re(p,le)||Re(M==null?void 0:M.portalNode,le);P.current=!se,G.current=me.pointerType||"keyboard"}function de(){G.current="keyboard"}return Q.addEventListener("pointerdown",re,!0),Q.addEventListener("pointerup",K,!0),Q.addEventListener("pointercancel",K,!0),Q.addEventListener("keydown",de,!0),()=>{Q.removeEventListener("pointerdown",re,!0),Q.removeEventListener("pointerup",K,!0),Q.removeEventListener("pointercancel",K,!0),Q.removeEventListener("keydown",de,!0)}},[r,b,p,J,y,M]),g.useEffect(()=>{if(r||!u)return;function Q(){k.current=!0,te.start(0,()=>{k.current=!1})}function K(le){const se=le.relatedTarget,X=le.currentTarget,ae=At(le);queueMicrotask(()=>{const j=C(),Z=E.context.triggerElements,ye=!(Re(p,se)||Re(b,se)||Re(se,b)||Re(M==null?void 0:M.portalNode,se)||se!=null&&Z.hasElement(se)||Z.hasMatchingElement(ge=>Re(ge,se))||se!=null&&se.hasAttribute(Aa("focus-guard"))||D&&(ui(D.nodesRef.current,j).find(ge=>{var be,Te;return Re((be=ge.context)==null?void 0:be.elements.floating,se)||Re((Te=ge.context)==null?void 0:Te.elements.domReference,se)})||Kv(D.nodesRef.current,j).find(ge=>{var be,Te,Ne;return[(be=ge.context)==null?void 0:be.elements.floating,Ec((Te=ge.context)==null?void 0:Te.elements.floating)].includes(se)||((Ne=ge.context)==null?void 0:Ne.elements.domReference)===se})));if(X===p&&J&&lb(J,L),l&&X!==p&&!Bk(ae)&&en(ct(J))===ct(J).body){if(tt(J)&&(J.focus(),l==="popup")){ce.request(()=>{J.focus()});return}const ge=q.current,be=Se(),Te=be[ge]||be[be.length-1]||J;tt(Te)&&Te.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(O||!s)&&se&&ye&&!k.current&&(O||se!==Xd())&&(_.current=!0,E.setOpen(!1,xe(Vr,le)))})}function re(){P.current||(w.current.insideReactTree=!0,ue.start(0,()=>{w.current.insideReactTree=!1}))}const de=tt(p)?p:null,me=[];if(!(!b&&!de))return de&&(de.addEventListener("focusout",K),de.addEventListener("pointerdown",Q),me.push(()=>{de.removeEventListener("focusout",K),de.removeEventListener("pointerdown",Q)})),b&&(b.addEventListener("focusout",K),M&&(b.addEventListener("focusout",re,!0),me.push(()=>{b.removeEventListener("focusout",re,!0)})),me.push(()=>{b.removeEventListener("focusout",K)})),()=>{me.forEach(le=>{le()})}},[r,p,b,J,s,D,M,E,u,l,Se,O,C,L,w,ue,te,ce]);const H=g.useRef(null),Y=g.useRef(null),ne=Oa(H,m,M==null?void 0:M.beforeInsideRef),De=Oa(Y,M==null?void 0:M.afterInsideRef);g.useEffect(()=>{var le,se,X;if(r||!b||!y)return;const Q=Array.from(((le=M==null?void 0:M.portalNode)==null?void 0:le.querySelectorAll(`[${Aa("portal")}]`))||[]),re=(X=(se=(D?Kv(D.nodesRef.current,C()):[]).find(ae=>{var j;return _p(((j=ae.context)==null?void 0:j.elements.domReference)||null)}))==null?void 0:se.context)==null?void 0:X.elements.domReference,de=[b,re,...Q,...R(),x.current,N.current,H.current,Y.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Wo(h),Wo(d),O?p:null].filter(ae=>ae!=null),me=xk(de,s||O);return()=>{me()}},[y,r,p,b,s,L,M,O,D,C,R,d,h]),ie(()=>{if(!y||r||!tt(J))return;const Q=ct(J),K=en(Q);queueMicrotask(()=>{const re=Ae(J),de=I.current,me=typeof de=="function"?de(A.current||""):de;if(me===void 0||me===!1)return;let le;me===!0||me===null?le=re[0]||J:le=Wo(me),le=le||re[0]||J,!Re(J,K)&&Iu(le,{preventScroll:le===J})})},[r,y,J,T,Ae,I,A]),ie(()=>{if(r||!J)return;const Q=ct(J),K=en(Q);Ik(K);function re(le){if(le.open||(U.current=Pk(le.nativeEvent,G.current)),le.reason===yt&&le.nativeEvent.type==="mouseleave"&&(_.current=!0),le.reason===wm)if(le.nested)_.current=!1;else if(dR(le.nativeEvent)||hR(le.nativeEvent))_.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?_.current=!1:_.current=!0}}S.on("openchange",re);const de=Q.createElement("span");de.setAttribute("tabindex","-1"),de.setAttribute("aria-hidden","true"),Object.assign(de.style,Cm),oe&&p&&p.insertAdjacentElement("afterend",de);function me(){const le=B.current;let se=typeof le=="function"?le(U.current):le;if(se===void 0||se===!1)return null;if(se===null&&(se=!0),typeof se=="boolean"){const ae=p||Xd();return ae&&ae.isConnected?ae:de}const X=p||Xd()||de;return Wo(se)||X}return()=>{S.off("openchange",re);const le=en(Q),se=Re(b,le)||D&&ui(D.nodesRef.current,C(),!1).some(ae=>{var j;return Re((j=ae.context)==null?void 0:j.elements.floating,le)}),X=me();queueMicrotask(()=>{const ae=zk(X),j=typeof B.current!="boolean";B.current&&!_.current&&tt(ae)&&(!(!j&&ae!==le&&le!==Q.body)||se)&&ae.focus({preventScroll:!0}),de.remove()})}},[r,b,J,B,w,S,D,oe,p,C]),g.useEffect(()=>{queueMicrotask(()=>{_.current=!1})},[r]),g.useEffect(()=>{if(r||!y)return;function Q(re){const de=At(re);de!=null&&de.closest(`[${PR}]`)&&(k.current=!0)}const K=ct(J);return K.addEventListener("pointerdown",Q,!0),()=>{K.removeEventListener("pointerdown",Q,!0)}},[r,y,J]),ie(()=>{if(!r&&M)return M.setFocusManagerState({modal:s,closeOnFocusOut:u,open:y,onOpenChange:E.setOpen,domReference:p}),()=>{M.setFocusManagerState(null)}},[r,M,s,y,E,u,p]),ie(()=>{if(!(r||!J))return lb(J,L),()=>{queueMicrotask(xm)}},[r,J,L]);const pe=!r&&(s?!O:!0)&&(oe||s);return ee.jsxs(g.Fragment,{children:[pe&&ee.jsx(Xn,{"data-type":"inside",ref:ne,onFocus:Q=>{var K;if(s){const re=Ae();Iu(re[re.length-1])}else if(M!=null&&M.portalNode)if(_.current=!1,ci(Q,M.portalNode)){const re=Sf(p);re==null||re.focus()}else(K=Wo(h??M.beforeOutsideRef))==null||K.focus()}}),n,pe&&ee.jsx(Xn,{"data-type":"inside",ref:De,onFocus:Q=>{var K;if(s)Iu(Ae()[0]);else if(M!=null&&M.portalNode)if(u&&(_.current=!0),ci(Q,M.portalNode)){const re=CR(p);re==null||re.focus()}else(K=Wo(d??M.afterOutsideRef))==null||K.focus()}})]})}function Tm(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:a=!0,ignoreMouse:l=!1,stickIfOpen:s=!0,touchOpenDelay:u=0}=t,f=g.useRef(void 0),c=Oi(),d=Cn(),h=g.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const v=f.current,E=m.nativeEvent,y=n.select("open");if(m.button!==0||i==="click"||mi(v,!0)&&l)return;const p=r.current.openEvent,b=p==null?void 0:p.type,S=n.select("domReferenceElement")!==m.currentTarget,w=y&&S||!(y&&a&&(!(p&&s)||b==="click"||b==="mousedown"));if(pm(E.target)){const R=xe(Yn,E,E.target);w&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(w,R);return}const C=m.currentTarget;c.request(()=>{const R=xe(Yn,E,C);w&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,R)}):n.setOpen(w,R)})},onClick(m){if(i==="mousedown-only")return;const v=f.current;if(i==="mousedown"&&v){f.current=void 0;return}if(mi(v,!0)&&l)return;const E=n.select("open"),y=r.current.openEvent,p=n.select("domReferenceElement")!==m.currentTarget,b=E&&p||!(E&&a&&(!(y&&s)||pR(y))),S=xe(Yn,m.nativeEvent,m.currentTarget);b&&v==="touch"&&u>0?d.start(u,()=>{n.setOpen(!0,S)}):n.setOpen(b,S)},onKeyDown(){f.current=void 0}}),[r,i,l,n,s,a,c,d,u]);return g.useMemo(()=>o?{reference:h}:wt,[o,h])}function Uk(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((h=t.dataRef.current.openEvent)==null?void 0:h.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,c=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),c-=n||0,d-=r||0,u=0,f=0,!o||s?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,c=a&&t.x!=null?t.x:c,d=l&&t.y!=null?t.y:d):o&&!s&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:c,y:d,top:d,right:c+u,bottom:d+f,left:c}}}}function sb(e){return e!=null&&e.clientX!=null}function $k(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:l=!0,axis:s="both",x:u=null,y:f=null}=t,c=g.useRef(!1),d=g.useRef(null),[h,m]=g.useState(),[v,E]=g.useState([]),y=W((C,R)=>{c.current||a.current.openEvent&&!sb(a.current.openEvent)||n.set("positionReference",Uk(i,{x:C,y:R,axis:s,dataRef:a,pointerType:h}))}),p=W(C=>{u!=null||f!=null||(r?d.current||E([]):y(C.clientX,C.clientY))}),b=mi(h)?o:r,S=g.useCallback(()=>{if(!b||!l||u!=null||f!=null)return;const C=at(o);function R(T){const O=At(T);Re(o,O)?(C.removeEventListener("mousemove",R),d.current=null):y(T.clientX,T.clientY)}if(!a.current.openEvent||sb(a.current.openEvent)){C.addEventListener("mousemove",R);const T=()=>{C.removeEventListener("mousemove",R),d.current=null};return d.current=T,T}n.set("positionReference",i)},[b,l,u,f,o,a,i,n,y]);g.useEffect(()=>S(),[S,v]),g.useEffect(()=>{l&&!o&&(c.current=!1)},[l,o]),g.useEffect(()=>{!l&&r&&(c.current=!0)},[l,r]),ie(()=>{l&&(u!=null||f!=null)&&(c.current=!1,y(u,f))},[l,u,f,y]);const w=g.useMemo(()=>{function C(R){m(R.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:p,onMouseEnter:p}},[p]);return g.useMemo(()=>l?{reference:w}:{},[l,w])}function ub(e,t,n){let{reference:r,floating:o}=e;const i=Pn(t),a=ym(t),l=mm(a),s=rn(t),u=i==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let h;switch(s){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(zo(t)){case"start":h[a]-=d*(n&&u?-1:1);break;case"end":h[a]+=d*(n&&u?-1:1);break}return h}async function Hk(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:h=0}=jr(t,e),m=gR(h),E=l[d?c==="floating"?"reference":"floating":c],y=Rc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(E)))==null||n?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:s})),p=c==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Rc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:b,strategy:s}):p);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const Gk=50,jk=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Hk},s=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=ub(u,r,s),d=r,h=0;const m={};for(let v=0;v<i.length;v++){const E=i[v];if(!E)continue;const{name:y,fn:p}=E,{x:b,y:S,data:w,reset:C}=await p({x:f,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=b??f,c=S??c,m[y]={...m[y],...w},C&&h<Gk&&(h++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:c}=ub(u,d,s)),v=-1)}return{x:f,y:c,placement:d,strategy:o,middlewareData:m}},Vk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...E}=jr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=rn(o),p=Pn(l),b=rn(l)===l,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),w=d||(b||!v?[wc(l)]:BM(l)),C=m!=="none";!d&&C&&w.push(...GM(l,v,m,S));const R=[l,...w],T=await s.detectOverflow(t,E),O=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[y]),c){const D=zM(o,a,S);O.push(T[D[0]],T[D[1]])}if(L=[...L,{placement:o,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,M=R[D];if(M&&(!(c==="alignment"?p!==Pn(M):!1)||L.every(_=>Pn(_.placement)===p?_.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:M}};let x=(B=L.filter(N=>N.overflows[0]<=0).sort((N,_)=>N.overflows[1]-_.overflows[1])[0])==null?void 0:B.placement;if(!x)switch(h){case"bestFit":{var A;const N=(A=L.filter(_=>{if(C){const k=Pn(_.placement);return k===p||k==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(k=>k>0).reduce((k,P)=>k+P,0)]).sort((_,k)=>_[1]-k[1])[0])==null?void 0:A[0];N&&(x=N);break}case"initialPlacement":x=l;break}if(o!==x)return{reset:{placement:x}}}return{}}}};function cb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fb(e){return PM.some(t=>e[t]>=0)}const Fk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=jr(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=cb(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:fb(l)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),l=cb(a,n.floating);return{data:{escapedOffsets:l,escaped:fb(l)}}}default:return{}}}}},VR=new Set(["left","top"]);async function qk(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=rn(n),l=zo(n),s=Pn(n)==="y",u=VR.has(a)?-1:1,f=i&&s?-1:1,c=jr(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof m=="number"&&(h=l==="end"?m*-1:m),s?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const Yk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await qk(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Xk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:y=>{let{x:p,y:b}=y;return{x:p,y:b}}},...u}=jr(e,t),f={x:n,y:r},c=await i.detectOverflow(t,u),d=Pn(rn(o)),h=gm(d);let m=f[h],v=f[d];if(a){const y=h==="y"?"top":"left",p=h==="y"?"bottom":"right",b=m+c[y],S=m-c[p];m=xp(b,m,S)}if(l){const y=d==="y"?"top":"left",p=d==="y"?"bottom":"right",b=v+c[y],S=v-c[p];v=xp(b,v,S)}const E=s.fn({...t,[h]:m,[d]:v});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[h]:a,[d]:l}}}}}},Kk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=jr(e,t),f={x:n,y:r},c=Pn(o),d=gm(c);let h=f[d],m=f[c];const v=jr(l,t),E=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const b=d==="y"?"height":"width",S=i.reference[d]-i.floating[b]+E.mainAxis,w=i.reference[d]+i.reference[b]-E.mainAxis;h<S?h=S:h>w&&(h=w)}if(u){var y,p;const b=d==="y"?"width":"height",S=VR.has(rn(o)),w=i.reference[c]-i.floating[b]+(S&&((y=a.offset)==null?void 0:y[c])||0)+(S?0:E.crossAxis),C=i.reference[c]+i.reference[b]+(S?0:((p=a.offset)==null?void 0:p[c])||0)-(S?E.crossAxis:0);m<w?m=w:m>C&&(m=C)}return{[d]:h,[c]:m}}}},Qk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...u}=jr(e,t),f=await a.detectOverflow(t,u),c=rn(o),d=zo(o),h=Pn(o)==="y",{width:m,height:v}=i.floating;let E,y;c==="top"||c==="bottom"?(E=c,y=d===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=c,E=d==="end"?"top":"bottom");const p=v-f.top-f.bottom,b=m-f.left-f.right,S=_a(v-f[E],p),w=_a(m-f[y],b),C=!t.middlewareData.shift;let R=S,T=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=p),C&&!d){const L=pn(f.left,0),I=pn(f.right,0),B=pn(f.top,0),A=pn(f.bottom,0);h?T=m-2*(L!==0||I!==0?L+I:pn(f.left,f.right)):R=v-2*(B!==0||A!==0?B+A:pn(f.top,f.bottom))}await s({...t,availableWidth:T,availableHeight:R});const O=await a.getDimensions(l.floating);return m!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function FR(e){const t=ln(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=xa(n)!==i||xa(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Am(e){return Ge(e)?e:e.contextElement}function ua(e){const t=Am(e);if(!tt(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=FR(t);let a=(i?xa(n.width):n.width)/r,l=(i?xa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Zk=lr(0);function qR(e){const t=at(e);return!vf()||!t.visualViewport?Zk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function vi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Am(e);let a=lr(1);t&&(r?Ge(r)&&(a=ua(r)):a=ua(e));const l=Wk(i,n,r)?qR(i):lr(0);let s=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,f=o.width/a.x,c=o.height/a.y;if(i){const d=at(i),h=r&&Ge(r)?at(r):r;let m=d,v=wp(m);for(;v&&r&&h!==m;){const E=ua(v),y=v.getBoundingClientRect(),p=ln(v),b=y.left+(v.clientLeft+parseFloat(p.paddingLeft))*E.x,S=y.top+(v.clientTop+parseFloat(p.paddingTop))*E.y;s*=E.x,u*=E.y,f*=E.x,c*=E.y,s+=b,u+=S,m=at(v),v=wp(m)}}return Rc({width:f,height:c,x:s,y:u})}function Ef(e,t){const n=bf(e).scrollLeft;return t?t.left+n:vi(hr(e)).left+n}function YR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ef(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Jk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=hr(r),l=t?yf(t.floating):!1;if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},u=lr(1);const f=lr(0),c=tt(r);if((c||!c&&!i)&&((Io(r)!=="body"||Ai(a))&&(s=bf(r)),c)){const h=vi(r);u=ua(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const d=a&&!c&&!i?YR(a,s):lr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+f.x+d.x,y:n.y*u.y-s.scrollTop*u.y+f.y+d.y}}function eL(e){return Array.from(e.getClientRects())}function tL(e){const t=hr(e),n=bf(e),r=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ef(e);const l=-n.scrollTop;return ln(r).direction==="rtl"&&(a+=pn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}const db=25;function nL(e,t){const n=at(e),r=hr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const f=vf();(!f||f&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}const u=Ef(r);if(u<=0){const f=r.ownerDocument,c=f.body,d=getComputedStyle(c),h=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-h);m<=db&&(i-=m)}else u<=db&&(i+=u);return{width:i,height:a,x:l,y:s}}function rL(e,t){const n=vi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tt(e)?ua(e):lr(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,s=o*i.x,u=r*i.y;return{width:a,height:l,x:s,y:u}}function hb(e,t,n){let r;if(t==="viewport")r=nL(e,n);else if(t==="document")r=tL(hr(e));else if(Ge(t))r=rL(t,n);else{const o=qR(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Rc(r)}function XR(e,t){const n=sr(e);return n===t||!Ge(n)||ar(n)?!1:ln(n).position==="fixed"||XR(n,t)}function oL(e,t){const n=t.get(e);if(n)return n;let r=_o(e,[],!1).filter(l=>Ge(l)&&Io(l)!=="body"),o=null;const i=ln(e).position==="fixed";let a=i?sr(e):e;for(;Ge(a)&&!ar(a);){const l=ln(a),s=dm(a);!s&&l.position==="fixed"&&(o=null),(i?!s&&!o:!s&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ai(a)&&!s&&XR(e,a))?r=r.filter(f=>f!==a):o=l,a=sr(a)}return t.set(e,r),r}function iL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?yf(t)?[]:oL(t,this._c):[].concat(n),r],l=hb(t,a[0],o);let s=l.top,u=l.right,f=l.bottom,c=l.left;for(let d=1;d<a.length;d++){const h=hb(t,a[d],o);s=pn(h.top,s),u=_a(h.right,u),f=_a(h.bottom,f),c=pn(h.left,c)}return{width:u-c,height:f-s,x:c,y:s}}function aL(e){const{width:t,height:n}=FR(e);return{width:t,height:n}}function lL(e,t,n){const r=tt(t),o=hr(t),i=n==="fixed",a=vi(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=lr(0);function u(){s.x=Ef(o)}if(r||!r&&!i)if((Io(t)!=="body"||Ai(o))&&(l=bf(t)),r){const h=vi(t,!0,i,t);s.x=h.x+t.clientLeft,s.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=o&&!r&&!i?YR(o,l):lr(0),c=a.left+l.scrollLeft-s.x-f.x,d=a.top+l.scrollTop-s.y-f.y;return{x:c,y:d,width:a.width,height:a.height}}function Kd(e){return ln(e).position==="static"}function pb(e,t){if(!tt(e)||ln(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return hr(e)===n&&(n=n.ownerDocument.body),n}function KR(e,t){const n=at(e);if(yf(e))return n;if(!tt(e)){let o=sr(e);for(;o&&!ar(o);){if(Ge(o)&&!Kd(o))return o;o=sr(o)}return n}let r=pb(e,t);for(;r&&bM(r)&&Kd(r);)r=pb(r,t);return r&&ar(r)&&Kd(r)&&!dm(r)?n:r||wM(e)||n}const sL=async function(e){const t=this.getOffsetParent||KR,n=this.getDimensions,r=await n(e.floating);return{reference:lL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uL(e){return ln(e).direction==="rtl"}const cL={convertOffsetParentRelativeRectToViewportRelativeRect:Jk,getDocumentElement:hr,getClippingRect:iL,getOffsetParent:KR,getElementRects:sL,getClientRects:eL,getDimensions:aL,getScale:ua,isElement:Ge,isRTL:uL};function QR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fL(e,t){let n=null,r;const o=hr(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),i();const u=e.getBoundingClientRect(),{left:f,top:c,width:d,height:h}=u;if(l||t(),!d||!h)return;const m=ea(c),v=ea(o.clientWidth-(f+d)),E=ea(o.clientHeight-(c+h)),y=ea(f),b={rootMargin:-m+"px "+-v+"px "+-E+"px "+-y+"px",threshold:pn(0,_a(1,s))||1};let S=!0;function w(C){const R=C[0].intersectionRatio;if(R!==s){if(!S)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!QR(u,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(w,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return a(!0),i}function gb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=Am(e),f=o||i?[...u?_o(u):[],...t?_o(t):[]]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const c=u&&l?fL(u,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(y=>{let[p]=y;p&&p.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!s&&h.observe(u),t&&h.observe(t));let m,v=s?vi(e):null;s&&E();function E(){const y=vi(e);v&&!QR(v,y)&&n(),v=y,m=requestAnimationFrame(E)}return n(),()=>{var y;f.forEach(p=>{o&&p.removeEventListener("scroll",n),i&&p.removeEventListener("resize",n)}),c==null||c(),(y=h)==null||y.disconnect(),h=null,s&&cancelAnimationFrame(m)}}const dL=Yk,hL=Xk,pL=Vk,gL=Qk,mL=Fk,yL=Kk,vL=(e,t,n)=>{const r=new Map,o={platform:cL,...n},i={...o.platform,_c:r};return jk(e,t,{...o,platform:i})};var bL=typeof document<"u",SL=function(){},zu=bL?g.useLayoutEffect:SL;function Oc(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,o;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(!Oc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Oc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ZR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mb(e,t){const n=ZR(e);return Math.round(t*n)/n}function Qd(e){const t=g.useRef(e);return zu(()=>{t.current=e}),t}function EL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[f,c]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=g.useState(r);Oc(d,r)||h(r);const[m,v]=g.useState(null),[E,y]=g.useState(null),p=g.useCallback(_=>{_!==C.current&&(C.current=_,v(_))},[]),b=g.useCallback(_=>{_!==R.current&&(R.current=_,y(_))},[]),S=i||m,w=a||E,C=g.useRef(null),R=g.useRef(null),T=g.useRef(f),O=s!=null,L=Qd(s),I=Qd(o),B=Qd(u),A=g.useCallback(()=>{if(!C.current||!R.current)return;const _={placement:t,strategy:n,middleware:d};I.current&&(_.platform=I.current),vL(C.current,R.current,_).then(k=>{const P={...k,isPositioned:B.current!==!1};D.current&&!Oc(T.current,P)&&(T.current=P,zt.flushSync(()=>{c(P)}))})},[d,t,n,I,B]);zu(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(_=>({..._,isPositioned:!1})))},[u]);const D=g.useRef(!1);zu(()=>(D.current=!0,()=>{D.current=!1}),[]),zu(()=>{if(S&&(C.current=S),w&&(R.current=w),S&&w){if(L.current)return L.current(S,w,A);A()}},[S,w,A,L,O]);const M=g.useMemo(()=>({reference:C,floating:R,setReference:p,setFloating:b}),[p,b]),x=g.useMemo(()=>({reference:S,floating:w}),[S,w]),N=g.useMemo(()=>{const _={position:n,left:0,top:0};if(!x.floating)return _;const k=mb(x.floating,f.x),P=mb(x.floating,f.y);return l?{..._,transform:"translate("+k+"px, "+P+"px)",...ZR(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:P}},[n,l,x.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:A,refs:M,elements:x,floatingStyles:N}),[f,A,M,x,N])}const wL=(e,t)=>{const n=dL(e);return{name:n.name,fn:n.fn,options:[e,t]}},RL=(e,t)=>{const n=hL(e);return{name:n.name,fn:n.fn,options:[e,t]}},CL=(e,t)=>({fn:yL(e).fn,options:[e,t]}),_L=(e,t)=>{const n=pL(e);return{name:n.name,fn:n.fn,options:[e,t]}},xL=(e,t)=>{const n=gL(e);return{name:n.name,fn:n.fn,options:[e,t]}},TL=(e,t)=>{const n=mL(e);return{name:n.name,fn:n.fn,options:[e,t]}},AL={intentional:"onClick",sloppy:"onPointerDown"};function OL(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 Om(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:l,dataRef:s}=n.context,{enabled:u=!0,escapeKey:f=!0,outsidePress:c=!0,outsidePressEvent:d="sloppy",referencePress:h=!1,referencePressEvent:m="sloppy",ancestorScroll:v=!1,bubbles:E,externalTree:y}=t,p=Bo(y),b=W(typeof c=="function"?c:()=>!1),S=typeof c=="function"?b:c,w=g.useRef(!1),{escapeKey:C,outsidePress:R}=OL(E),T=g.useRef(null),O=Cn(),L=Cn(),I=W(()=>{L.clear(),s.current.insideReactTree=!1}),B=g.useRef(!1),A=g.useRef(""),D=W(H=>{A.current=H.pointerType}),M=W(()=>{const H=A.current,Y=H==="pen"||!H?"mouse":H,ne=typeof d=="function"?d():d;return typeof ne=="string"?ne:ne[Y]}),x=W(H=>{var Q;if(!r||!u||!f||H.key!=="Escape"||B.current)return;const Y=(Q=s.current.floatingContext)==null?void 0:Q.nodeId,ne=p?ui(p.nodesRef.current,Y):[];if(!C&&ne.length>0){let K=!0;if(ne.forEach(re=>{var de;(de=re.context)!=null&&de.open&&!re.context.dataRef.current.__escapeKeyBubbles&&(K=!1)}),!K)return}const De=NM(H)?H.nativeEvent:H,pe=xe(Ts,De);n.setOpen(!1,pe),!C&&!pe.isPropagationAllowed&&H.stopPropagation()}),N=W(H=>{const Y=M();return Y==="intentional"&&H.type!=="click"||Y==="sloppy"&&H.type==="click"}),_=W(()=>{s.current.insideReactTree=!0,L.start(0,I)}),k=W((H,Y=!1)=>{var le;if(N(H)){I();return}if(s.current.insideReactTree){I();return}if(M()==="intentional"&&Y||typeof S=="function"&&!S(H))return;const ne=At(H),De=`[${Aa("inert")}]`,pe=ct(n.select("floatingElement")).querySelectorAll(De),Q=n.context.triggerElements;if(ne&&(Q.hasElement(ne)||Q.hasMatchingElement(se=>Re(se,ne))))return;let K=Ge(ne)?ne:null;for(;K&&!ar(K);){const se=sr(K);if(ar(se)||!Ge(se))break;K=se}if(pe.length&&Ge(ne)&&!DM(ne)&&!Re(ne,n.select("floatingElement"))&&Array.from(pe).every(se=>!Re(K,se)))return;if(tt(ne)&&!("touches"in H)){const se=ar(ne),X=ln(ne),ae=/auto|scroll/,j=se||ae.test(X.overflowX),Z=se||ae.test(X.overflowY),ye=j&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,ge=Z&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,be=X.direction==="rtl",Te=ge&&(be?H.offsetX<=ne.offsetWidth-ne.clientWidth:H.offsetX>ne.clientWidth),Ne=ye&&H.offsetY>ne.clientHeight;if(Te||Ne)return}const re=(le=s.current.floatingContext)==null?void 0:le.nodeId,de=p&&ui(p.nodesRef.current,re).some(se=>{var X;return jn(H,(X=se.context)==null?void 0:X.elements.floating)});if(jn(H,n.select("floatingElement"))||jn(H,n.select("domReferenceElement"))||de)return;const me=p?ui(p.nodesRef.current,re):[];if(me.length>0){let se=!0;if(me.forEach(X=>{var ae;(ae=X.context)!=null&&ae.open&&!X.context.dataRef.current.__outsidePressBubbles&&(se=!1)}),!se)return}n.setOpen(!1,xe(wm,H)),I()}),P=W(H=>{M()!=="sloppy"||H.pointerType==="touch"||!n.select("open")||!u||jn(H,n.select("floatingElement"))||jn(H,n.select("domReferenceElement"))||k(H)}),q=W(H=>{if(M()!=="sloppy"||!n.select("open")||!u||jn(H,n.select("floatingElement"))||jn(H,n.select("domReferenceElement")))return;const Y=H.touches[0];Y&&(T.current={startTime:Date.now(),startX:Y.clientX,startY:Y.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}),U=W(H=>{const Y=At(H);function ne(){q(H),Y==null||Y.removeEventListener(H.type,ne)}Y==null||Y.addEventListener(H.type,ne)}),G=W(H=>{const Y=w.current;if(w.current=!1,O.clear(),H.type==="mousedown"&&T.current&&!T.current.dismissOnMouseDown)return;const ne=At(H);function De(){H.type==="pointerdown"?P(H):k(H,Y),ne==null||ne.removeEventListener(H.type,De)}ne==null||ne.addEventListener(H.type,De)}),ue=W(H=>{if(M()!=="sloppy"||!T.current||jn(H,n.select("floatingElement"))||jn(H,n.select("domReferenceElement")))return;const Y=H.touches[0];if(!Y)return;const ne=Math.abs(Y.clientX-T.current.startX),De=Math.abs(Y.clientY-T.current.startY),pe=Math.sqrt(ne*ne+De*De);pe>5&&(T.current.dismissOnTouchEnd=!0),pe>10&&(k(H),O.clear(),T.current=null)}),te=W(H=>{const Y=At(H);function ne(){ue(H),Y==null||Y.removeEventListener(H.type,ne)}Y==null||Y.addEventListener(H.type,ne)}),ce=W(H=>{M()!=="sloppy"||!T.current||jn(H,n.select("floatingElement"))||jn(H,n.select("domReferenceElement"))||(T.current.dismissOnTouchEnd&&k(H),O.clear(),T.current=null)}),oe=W(H=>{const Y=At(H);function ne(){ce(H),Y==null||Y.removeEventListener(H.type,ne)}Y==null||Y.addEventListener(H.type,ne)});g.useEffect(()=>{if(!r||!u)return;s.current.__escapeKeyBubbles=C,s.current.__outsidePressBubbles=R;const H=new Zn;function Y(K){n.setOpen(!1,xe(Em,K))}function ne(){H.clear(),B.current=!0}function De(){H.start(vf()?5:0,()=>{B.current=!1})}const pe=ct(o);pe.addEventListener("pointerdown",D,!0),f&&(pe.addEventListener("keydown",x),pe.addEventListener("compositionstart",ne),pe.addEventListener("compositionend",De)),S&&(pe.addEventListener("click",G,!0),pe.addEventListener("pointerdown",G,!0),pe.addEventListener("touchstart",U,!0),pe.addEventListener("touchmove",te,!0),pe.addEventListener("touchend",oe,!0),pe.addEventListener("mousedown",G,!0));let Q=[];return v&&(Ge(a)&&(Q=_o(a)),Ge(o)&&(Q=Q.concat(_o(o))),!Ge(i)&&i&&i.contextElement&&(Q=Q.concat(_o(i.contextElement)))),Q=Q.filter(K=>{var re;return K!==((re=pe.defaultView)==null?void 0:re.visualViewport)}),Q.forEach(K=>{K.addEventListener("scroll",Y,{passive:!0})}),()=>{pe.removeEventListener("pointerdown",D,!0),f&&(pe.removeEventListener("keydown",x),pe.removeEventListener("compositionstart",ne),pe.removeEventListener("compositionend",De)),S&&(pe.removeEventListener("click",G,!0),pe.removeEventListener("pointerdown",G,!0),pe.removeEventListener("touchstart",U,!0),pe.removeEventListener("touchmove",te,!0),pe.removeEventListener("touchend",oe,!0),pe.removeEventListener("mousedown",G,!0)),Q.forEach(K=>{K.removeEventListener("scroll",Y)}),H.clear()}},[s,o,i,a,f,S,r,l,v,u,C,R,x,k,G,P,U,te,oe,D,n]),g.useEffect(I,[S,I]);const J=g.useMemo(()=>({onKeyDown:x,...h&&{[AL[m]]:H=>{n.setOpen(!1,xe(Yn,H.nativeEvent))},...m!=="intentional"&&{onClick(H){n.setOpen(!1,xe(Yn,H.nativeEvent))}}}}),[x,n,h,m]),Se=W(H=>{const Y=At(H.nativeEvent);!Re(n.select("floatingElement"),Y)||H.button!==0||(w.current=!0)}),Ae=g.useMemo(()=>({onKeyDown:x,onPointerDown:Se,onMouseDown:Se,onMouseUp:Se,onClickCapture:_,onMouseDownCapture:_,onPointerDownCapture:_,onMouseUpCapture:_,onTouchEndCapture:_,onTouchMoveCapture:_}),[x,Se,_]);return g.useMemo(()=>u?{reference:J,floating:Ae,trigger:J}:{},[u,J,Ae])}var Mc=Symbol("NOT_FOUND");function ML(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kL(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function LL(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 yb=e=>Array.isArray(e)?e:[e];function DL(e){const t=Array.isArray(e[0])?e[0]:e;return LL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function NL(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function PL(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Mc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function IL(e,t){let n=[];function r(l){const s=n.findIndex(u=>t(l,u.key));if(s>-1){const u=n[s];return s>0&&(n.splice(s,1),n.unshift(u)),u.value}return Mc}function o(l,s){r(l)===Mc&&(n.unshift({key:l,value:s}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var zL=(e,t)=>e===t;function BL(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function UL(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=zL,maxSize:o=1,resultEqualityCheck:i}=n,a=BL(r);let l=0;const s=o<=1?PL(a):IL(o,a);function u(){let f=s.get(arguments);if(f===Mc){if(f=e.apply(null,arguments),l++,i){const d=s.getEntries().find(h=>i(h.value,f));d&&(f=d.value,l!==0&&l--)}s.put(arguments,f)}return f}return u.clearCache=()=>{s.clear(),u.resetResultsCount()},u.resultsCount=()=>l,u.resetResultsCount=()=>{l=0},u}var $L=class{constructor(e){this.value=e}deref(){return this.value}},HL=typeof WeakRef<"u"?WeakRef:$L,GL=0,vb=1;function iu(){return{s:GL,v:void 0,o:null,p:null}}function WR(e,t={}){let n=iu();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var c;let l=n;const{length:s}=arguments;for(let d=0,h=s;d<h;d++){const m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=l.o;v===null&&(l.o=v=new WeakMap);const E=v.get(m);E===void 0?(l=iu(),v.set(m,l)):l=E}else{let v=l.p;v===null&&(l.p=v=new Map);const E=v.get(m);E===void 0?(l=iu(),v.set(m,l)):l=E}}const u=l;let f;if(l.s===vb)f=l.v;else if(f=e.apply(null,arguments),i++,r){const d=((c=o==null?void 0:o.deref)==null?void 0:c.call(o))??o;d!=null&&r(d,f)&&(f=d,i!==0&&i--),o=typeof f=="object"&&f!==null||typeof f=="function"?new HL(f):f}return u.s=vb,u.v=f,f}return a.clearCache=()=>{n=iu(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function JR(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,l,s={},u=o.pop();typeof u=="object"&&(s=u,u=o.pop()),ML(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const f={...n,...s},{memoize:c,memoizeOptions:d=[],argsMemoize:h=WR,argsMemoizeOptions:m=[]}=f,v=yb(d),E=yb(m),y=DL(o),p=c(function(){return i++,u.apply(null,arguments)},...v),b=h(function(){a++;const w=NL(y,arguments);return l=p.apply(null,w),l},...E);return Object.assign(b,{resultFunc:u,memoizedResultFunc:p,dependencies:y,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:c,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var jL=JR(WR),VL=Object.assign((e,t=jL)=>{kL(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((a,l,s)=>(a[n[s]]=l,a),{}))},{withTypes:()=>VL});JR({memoize:UL,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const fe=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error(et(1));let l;if(e)l=e;else throw new Error("Missing arguments");return l};var eC={exports:{}},tC={};/**
|
|
65
|
+
* @license React
|
|
66
|
+
* use-sync-external-store-shim.production.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var Ma=g;function FL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qL=typeof Object.is=="function"?Object.is:FL,YL=Ma.useState,XL=Ma.useEffect,KL=Ma.useLayoutEffect,QL=Ma.useDebugValue;function ZL(e,t){var n=t(),r=YL({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return KL(function(){o.value=n,o.getSnapshot=t,Zd(o)&&i({inst:o})},[e,n,t]),XL(function(){return Zd(o)&&i({inst:o}),e(function(){Zd(o)&&i({inst:o})})},[e]),QL(n),n}function Zd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qL(e,n)}catch{return!0}}function WL(e,t){return t()}var JL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WL:ZL;tC.useSyncExternalStore=Ma.useSyncExternalStore!==void 0?Ma.useSyncExternalStore:JL;eC.exports=tC;var nC=eC.exports,rC={exports:{}},oC={};/**
|
|
73
|
+
* @license React
|
|
74
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var wf=g,eD=nC;function tD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nD=typeof Object.is=="function"?Object.is:tD,rD=eD.useSyncExternalStore,oD=wf.useRef,iD=wf.useEffect,aD=wf.useMemo,lD=wf.useDebugValue;oC.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=oD(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=aD(function(){function s(h){if(!u){if(u=!0,f=h,h=r(h),o!==void 0&&a.hasValue){var m=a.value;if(o(m,h))return c=m}return c=h}if(m=c,nD(f,h))return m;var v=r(h);return o!==void 0&&o(m,v)?(f=h,m):(f=h,c=v)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,r,o]);var l=rD(e,i[0],i[1]);return iD(function(){a.hasValue=!0,a.value=l},[l]),lD(l),l};rC.exports=oC;var sD=rC.exports;const uD=_m(19),cD=uD?dD:hD;function fD(e,t,n,r,o){return cD(e,t,n,r,o)}function dD(e,t,n,r,o){const i=g.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return nC.useSyncExternalStore(e.subscribe,i,i)}function hD(e,t,n,r,o){return sD.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class Pl{constructor(t){z(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));z(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])){Pl.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Pl.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Pl.prototype.setState.call(this,t)}}class Rf extends Pl{constructor(n,r={},o){super(n);z(this,"controlledValues",new Map);z(this,"select",(n,r,o,i)=>{const a=this.selectors[n];return a(this.state,r,o,i)});z(this,"useState",(n,r,o,i)=>{g.useDebugValue(n);const a=this.selectors[n];return fD(this,a,r,o,i)});this.context=r,this.selectors=o}useSyncedValue(n,r){g.useDebugValue(n),ie(()=>{this.state[n]!==r&&this.set(n,r)},[n,r])}useSyncedValueWithCleanup(n,r){ie(()=>(this.state[n]!==r&&this.set(n,r),()=>{this.set(n,void 0)}),[n,r])}useSyncedValues(n){const r=Object.values(n);ie(()=>{this.update(n)},r)}useControlledProp(n,r,o){g.useDebugValue(n);const i=r!==void 0;this.controlledValues.has(n)||(this.controlledValues.set(n,i),!i&&!Object.is(this.state[n],o)&&super.setState({...this.state,[n]:o})),ie(()=>{i&&!Object.is(this.state[n],r)&&super.setState({...this.state,[n]:r})},[n,r,o,i])}set(n,r){this.controlledValues.get(n)!==!0&&super.set(n,r)}update(n){const r={...n};for(const o in r)if(Object.hasOwn(r,o)&&this.controlledValues.get(o)===!0){delete r[o];continue}super.update(r)}setState(n){const r={...n};for(const o in r)if(Object.hasOwn(r,o)&&this.controlledValues.get(o)===!0){delete r[o];continue}super.setState({...this.state,...r})}useContextCallback(n,r){g.useDebugValue(n);const o=W(r??DR);this.context[n]=o}useStateSetter(n){const r=g.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(n,o)}),r.current}observe(n,r){let o;typeof n=="function"?o=n:o=this.selectors[n];let i=o(this.state);return r(i,i,this),this.subscribe(a=>{const l=o(a);if(!Object.is(i,l)){const s=i;i=l,r(l,s,this)}})}}const pD={open:fe(e=>e.open),domReferenceElement:fe(e=>e.domReferenceElement),referenceElement:fe(e=>e.positionReference??e.referenceElement),floatingElement:fe(e=>e.floatingElement),floatingId:fe(e=>e.floatingId)};class Mm extends Rf{constructor(n){const{nested:r,noEmit:o,onOpenChange:i,triggerElements:a,...l}=n;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:AR(),nested:r,noEmit:o,triggerElements:a},pD);z(this,"setOpen",(n,r)=>{var o,i;if((!n||!this.state.open||pR(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)}(i=(o=this.context).onOpenChange)==null||i.call(o,n,r)})}}function iC(e,t=!1,n=!1){const[r,o]=g.useState(e&&t?"idle":void 0),[i,a]=g.useState(e);return e&&!i&&(a(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),ie(()=>{if(!e&&i&&r!=="ending"&&n){const l=tr.request(()=>{o("ending")});return()=>{tr.cancel(l)}}},[e,i,r,n]),ie(()=>{if(!e||t)return;const l=tr.request(()=>{o(void 0)});return()=>{tr.cancel(l)}},[t,e]),ie(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const l=tr.request(()=>{o("idle")});return()=>{tr.cancel(l)}},[t,e,i,o,r]),g.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:r}),[i,r])}function As(e,t=!1,n=!0){const r=Oi();return W((o,i=null)=>{r.cancel();const a=Wo(e);a!=null&&(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function l(){a&&Promise.all(a.getAnimations().map(s=>s.finished)).then(()=>{i!=null&&i.aborted||zt.flushSync(o)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;zt.flushSync(o)}else a.getAnimations().length>0&&a.getAnimations().some(s=>s.pending||s.playState!=="finished")&&l()})}t?r.request(l):l()}))})}function Fa(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Lt(n),a=W(o),l=As(r,n);g.useEffect(()=>{t&&l(()=>{n===i.current&&a()})},[t,n,a,l,i])}function aC(e,t){const n=g.useRef(null);return g.useCallback(r=>{e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),r!==null&&(n.current=e,t.context.triggerElements.add(e,r)))},[t,e])}function km(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=aC(e,n),a=W(l=>{i(l),l!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:l,...r})});return ie(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:o}}function Lm(e){const t=e.useState("open");ie(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function Dm(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=iC(e);t.useSyncedValues({mounted:r,transitionStatus:i});const a=W(()=>{var s,u;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(u=(s=t.context).onOpenChangeComplete)==null||u.call(s,!1)}),l=t.useState("preventUnmountingOnClose");return Fa({enabled:!l,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:i}}class Os{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function gD(){return new Mm({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Os,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Nm(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:gD(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:wt,inactiveTriggerProps:wt,popupProps:wt}}const Pm={open:fe(e=>e.open),mounted:fe(e=>e.mounted),transitionStatus:fe(e=>e.transitionStatus),floatingRootContext:fe(e=>e.floatingRootContext),preventUnmountingOnClose:fe(e=>e.preventUnmountingOnClose),payload:fe(e=>e.payload),activeTriggerId:fe(e=>e.activeTriggerId),activeTriggerElement:fe(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:fe((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:fe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:fe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:fe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:fe(e=>e.popupProps),popupElement:fe(e=>e.popupElement),positionerElement:fe(e=>e.positionerElement)};function mD(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Yr(),i=pr()!=null,a=an(()=>new Mm({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new Os,floatingId:o,nested:i,noEmit:e.noEmit||!1})).current;return ie(()=>{const l={open:t,floatingId:o};r.reference!==void 0&&(l.referenceElement=r.reference,l.domReferenceElement=Ge(r.reference)?r.reference:null),r.floating!==void 0&&(l.floatingElement=r.floating),a.update(l)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=e.noEmit||!1,a}function yD(e={}){const{nodeId:t,externalTree:n}=e,r=mD(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[a,l]=g.useState(null),s=g.useRef(null),u=Bo(n);ie(()=>{i.domReference&&(s.current=i.domReference)},[i.domReference]);const f=EL({...e,elements:{...i,...a&&{reference:a}}}),c=g.useCallback(R=>{const T=Ge(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(T),f.refs.setReference(T)},[f.refs]),[d,h]=g.useState(null),[m,v]=g.useState(null);o.useSyncedValue("referenceElement",d),o.useSyncedValue("domReferenceElement",Ge(d)?d:null),o.useSyncedValue("floatingElement",m);const E=g.useCallback(R=>{(Ge(R)||R===null)&&(s.current=R,h(R)),(Ge(f.refs.reference.current)||f.refs.reference.current===null||R!==null&&!Ge(R))&&f.refs.setReference(R)},[f.refs,h]),y=g.useCallback(R=>{v(R),f.refs.setFloating(R)},[f.refs]),p=g.useMemo(()=>({...f.refs,setReference:E,setFloating:y,setPositionReference:c,domReference:s}),[f.refs,E,y,c]),b=g.useMemo(()=>({...f.elements,domReference:i.domReference}),[f.elements,i.domReference]),S=o.useState("open"),w=o.useState("floatingId"),C=g.useMemo(()=>({...f,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:w,refs:p,elements:b,nodeId:t,rootStore:o}),[f,p,b,t,o,S,w]);return ie(()=>{o.context.dataRef.current.floatingContext=C;const R=u==null?void 0:u.nodesRef.current.find(T=>T.id===t);R&&(R.context=C)}),g.useMemo(()=>({...f,context:C,refs:p,elements:b,rootStore:o}),[f,p,b,C,o])}function Im(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=Yr(),a=pr()!=null,l=t.useState("open"),s=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),f=t.context.triggerElements,c=an(()=>new Mm({open:l,referenceElement:s,floatingElement:u,triggerElements:f,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return ie(()=>{const d={open:l,floatingId:i,referenceElement:s,floatingElement:u};Ge(s)&&(d.domReferenceElement=s),c.update(d)},[l,i,s,u,c]),c.context.onOpenChange=o,c.context.nested=a,c.context.noEmit=n,c}const Wd=OM&&lR;function lC(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:i=!0,visibleOnly:a=!0}=t,l=g.useRef(!1),s=Cn(),u=g.useRef(!0);g.useEffect(()=>{const c=n.select("domReferenceElement");if(!i)return;const d=at(c);function h(){!n.select("open")&&tt(c)&&c===en(ct(c))&&(l.current=!0)}function m(){u.current=!0}function v(){u.current=!1}return d.addEventListener("blur",h),Wd&&(d.addEventListener("keydown",m,!0),d.addEventListener("pointerdown",v,!0)),()=>{d.removeEventListener("blur",h),Wd&&(d.removeEventListener("keydown",m,!0),d.removeEventListener("pointerdown",v,!0))}},[n,i]),g.useEffect(()=>{if(!i)return;function c(d){(d.reason===Yn||d.reason===Ts)&&(l.current=!0)}return r.on("openchange",c),()=>{r.off("openchange",c)}},[r,i]);const f=g.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(c){if(l.current)return;const d=At(c.nativeEvent);if(a&&Ge(d)){if(Wd&&!c.relatedTarget){if(!u.current&&!pm(d))return}else if(!Sc(d))return}n.setOpen(!0,xe(es,c.nativeEvent,c.currentTarget))},onBlur(c){l.current=!1;const d=c.relatedTarget,h=c.nativeEvent,m=Ge(d)&&d.hasAttribute(Aa("focus-guard"))&&d.getAttribute("data-type")==="outside";s.start(0,()=>{var y;const v=n.select("domReferenceElement"),E=en(v?v.ownerDocument:document);!d&&E===v||Re((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,E)||Re(v,E)||m||n.context.triggerElements.hasElement(c.relatedTarget)||n.setOpen(!1,xe(es,h))})}}),[o,n,a,s]);return g.useMemo(()=>i?{reference:f,trigger:f}:{},[i,f])}const Mp=Aa("safe-polygon"),vD=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${fR}`;function bD(e){return e?!!e.closest(vD):!1}function sC(e){const t=g.useRef(void 0),n=g.useRef(!1),r=g.useRef(void 0),o=g.useRef(!0),i=g.useRef(!1),a=g.useRef(()=>{}),l=g.useRef(!1),s=Cn(),u=Cn(),f=g.useRef(void 0);return g.useMemo(()=>{const c=e.context.dataRef.current;return c.hoverInteractionState||(c.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:o,performedPointerEventsMutationRef:i,unbindMouseMoveRef:a,restTimeoutPendingRef:l,openChangeTimeout:s,restTimeout:u,handleCloseOptionsRef:f}),c.hoverInteractionState},[e,t,n,r,o,i,a,l,s,u,f])}const SD=new Set(["click","mousedown"]);function zm(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:l=!0,closeDelay:s=0,externalTree:u}=t,{pointerTypeRef:f,interactedInsideRef:c,handlerRef:d,performedPointerEventsMutationRef:h,unbindMouseMoveRef:m,restTimeoutPendingRef:v,openChangeTimeout:E,handleCloseOptionsRef:y}=sC(n),p=Bo(u),b=pr(),S=W(()=>c.current?!0:a.current.openEvent?SD.has(a.current.openEvent.type):!1),w=W(()=>{var I;const L=(I=a.current.openEvent)==null?void 0:I.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"}),C=g.useCallback((L,I=!0)=>{const B=ED(s,f.current);B&&!d.current?E.start(B,()=>n.setOpen(!1,xe(yt,L))):I&&(E.clear(),n.setOpen(!1,xe(yt,L)))},[s,d,n,f,E]),R=W(()=>{m.current(),d.current=void 0}),T=W(()=>{if(h.current){const L=ct(o).body;L.style.pointerEvents="",L.removeAttribute(Mp),h.current=!1}}),O=W(L=>{const I=At(L);if(!bD(I)){c.current=!1;return}c.current=!0});ie(()=>{r||(f.current=void 0,v.current=!1,c.current=!1,R(),T())},[r,f,v,c,R,T]),g.useEffect(()=>()=>{R()},[R]),g.useEffect(()=>T,[T]),ie(()=>{var L,I,B;if(l&&r&&(L=y.current)!=null&&L.blockPointerEvents&&w()&&Ge(i)&&o){h.current=!0;const A=ct(o).body;A.setAttribute(Mp,"");const D=i,M=o,x=(B=(I=p==null?void 0:p.nodesRef.current.find(N=>N.id===b))==null?void 0:I.context)==null?void 0:B.elements.floating;return x&&(x.style.pointerEvents=""),A.style.pointerEvents="none",D.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{A.style.pointerEvents="",D.style.pointerEvents="",M.style.pointerEvents=""}}},[l,r,i,o,y,w,p,b,h]),g.useEffect(()=>{if(!l)return;function L(D){if(S()||!a.current.floatingContext||!n.select("open"))return;const M=n.context.triggerElements;D.relatedTarget&&M.hasElement(D.relatedTarget)||(T(),R(),S()||C(D))}function I(D){var M;E.clear(),T(),(M=d.current)==null||M.call(d,D),R()}function B(D){S()||C(D,!1)}const A=o;return A&&(A.addEventListener("mouseleave",L),A.addEventListener("mouseenter",I),A.addEventListener("mouseleave",B),A.addEventListener("pointerdown",O,!0)),()=>{A&&(A.removeEventListener("mouseleave",L),A.removeEventListener("mouseenter",I),A.removeEventListener("mouseleave",B),A.removeEventListener("pointerdown",O,!0))}})}function ED(e,t){return t&&!mi(t)?0:typeof e=="function"?e():e}function Jd(e){return typeof e=="function"?e():e}const wD={current:null};function Cf(e,t={}){var N;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:i=!0,delay:a=0,handleClose:l=null,mouseOnly:s=!1,restMs:u=0,move:f=!0,triggerElementRef:c=wD,externalTree:d,isActiveTrigger:h=!0}=t,m=Bo(d),{pointerTypeRef:v,interactedInsideRef:E,handlerRef:y,blockMouseMoveRef:p,performedPointerEventsMutationRef:b,unbindMouseMoveRef:S,restTimeoutPendingRef:w,openChangeTimeout:C,restTimeout:R,handleCloseOptionsRef:T}=sC(n),O=Lt(l),L=Lt(a),I=Lt(u);h&&(T.current=(N=O.current)==null?void 0:N.__options);const B=W(()=>E.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=g.useCallback((_,k=!0)=>{const P=Pu(L.current,"close",v.current);P&&!y.current?C.start(P,()=>n.setOpen(!1,xe(yt,_))):k&&(C.clear(),n.setOpen(!1,xe(yt,_)))},[L,y,n,v,C]),D=W(()=>{S.current(),y.current=void 0}),M=W(()=>{if(b.current){const _=ct(n.select("domReferenceElement")).body;_.style.pointerEvents="",_.removeAttribute(Mp),b.current=!1}});g.useEffect(()=>{if(!i)return;function _(k){k.open||(C.clear(),R.clear(),p.current=!0,w.current=!1)}return o.on("openchange",_),()=>{o.off("openchange",_)}},[i,o,C,R,p,w]);const x=W(_=>{var q;if(B()||!r.current.floatingContext)return;const k=n.context.triggerElements;if(_.relatedTarget&&k.hasElement(_.relatedTarget))return;const P=c.current;(q=O.current)==null||q.call(O,{...r.current.floatingContext,tree:m,x:_.clientX,y:_.clientY,onClose(){M(),D(),!B()&&P===n.select("domReferenceElement")&&A(_)}})(_)});return g.useEffect(()=>{if(!i)return;const _=c.current??(h?n.select("domReferenceElement"):null);if(!Ge(_))return;function k(U){if(C.clear(),p.current=!1,s&&!mi(v.current)||Jd(I.current)>0&&!Pu(L.current,"open"))return;const G=Pu(L.current,"open",v.current),ue=n.select("domReferenceElement"),te=n.context.triggerElements,ce=(te.hasElement(U.target)||te.hasMatchingElement(Se=>Re(Se,U.target)))&&(!ue||!Re(ue,U.target)),oe=U.currentTarget??null,J=!n.select("open")||ce;G?C.start(G,()=>{J&&n.setOpen(!0,xe(yt,U,oe))}):J&&n.setOpen(!0,xe(yt,U,oe))}function P(U){if(B()){M();return}S.current();const G=n.select("domReferenceElement"),ue=ct(G);R.clear(),w.current=!1;const te=n.context.triggerElements;if(U.relatedTarget&&te.hasElement(U.relatedTarget))return;if(O.current&&r.current.floatingContext){n.select("open")||C.clear();const oe=c.current;y.current=O.current({...r.current.floatingContext,tree:m,x:U.clientX,y:U.clientY,onClose(){M(),D(),!B()&&oe===n.select("domReferenceElement")&&A(U,!0)}});const J=y.current;J(U),ue.addEventListener("mousemove",J),S.current=()=>{ue.removeEventListener("mousemove",J)};return}(v.current==="touch"?!Re(n.select("floatingElement"),U.relatedTarget):!0)&&A(U)}function q(U){x(U)}return n.select("open")&&_.addEventListener("mouseleave",q),f&&_.addEventListener("mousemove",k,{once:!0}),_.addEventListener("mouseenter",k),_.addEventListener("mouseleave",P),()=>{_.removeEventListener("mouseleave",q),f&&_.removeEventListener("mousemove",k),_.removeEventListener("mouseenter",k),_.removeEventListener("mouseleave",P)}},[D,M,p,r,L,A,n,i,O,x,h,B,s,f,v,I,R,w,C,c,m,S,y]),g.useMemo(()=>{function _(k){v.current=k.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(k){const{nativeEvent:P}=k,q=k.currentTarget,U=n.select("domReferenceElement"),G=n.context.triggerElements,ue=n.select("open"),te=(G.hasElement(k.target)||G.hasMatchingElement(oe=>Re(oe,k.target)))&&(!U||!Re(U,k.target));if(s&&!mi(v.current)||ue&&!te||Jd(I.current)===0||!te&&w.current&&k.movementX**2+k.movementY**2<2)return;R.clear();function ce(){!p.current&&(!ue||te)&&n.setOpen(!0,xe(yt,P,q))}v.current==="touch"?zt.flushSync(()=>{ce()}):te&&ue?ce():(w.current=!0,R.start(Jd(I.current),ce))}}},[p,s,n,v,I,R,w])}function qa(e=[]){const t=e.map(u=>u==null?void 0:u.reference),n=e.map(u=>u==null?void 0:u.floating),r=e.map(u=>u==null?void 0:u.item),o=e.map(u=>u==null?void 0:u.trigger),i=g.useCallback(u=>au(u,e,"reference"),t),a=g.useCallback(u=>au(u,e,"floating"),n),l=g.useCallback(u=>au(u,e,"item"),r),s=g.useCallback(u=>au(u,e,"trigger"),o);return g.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:l,getTriggerProps:s}),[i,a,l,s])}function au(e,t,n){var a;const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Cp]="");for(const l in e)o&&e&&(l===uR||l===cR)||(i[l]=e[l]);for(let l=0;l<t.length;l+=1){let s;const u=(a=t[l])==null?void 0:a[n];typeof u=="function"?s=e?u(e):null:s=u,s&&bb(i,s,o,r)}return bb(i,e,o,r),i}function bb(e,t,n,r){var o;for(const i in t){const a=t[i];n&&(i===uR||i===cR)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof a=="function"&&((o=r.get(i))==null||o.push(a),e[i]=(...l)=>{var s;return(s=r.get(i))==null?void 0:s.map(u=>u(...l)).find(u=>u!==void 0)})):e[i]=a)}}const RD="Escape";function _f(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function lu(e,t){return _f(t,e===hm||e===_s,e===xo||e===To)}function eh(e,t,n){return _f(t,e===_s,n?e===xo:e===To)||e==="Enter"||e===" "||e===""}function CD(e,t,n){return _f(t,n?e===xo:e===To,e===_s)}function _D(e,t,n,r){const o=n?e===To:e===xo,i=e===hm;return t==="both"||t==="horizontal"&&r&&r>1?e===RD:_f(t,o,i)}function xD(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:l,activeIndex:s,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:h=!1,nested:m=!1,rtl:v=!1,virtual:E=!1,focusItemOnOpen:y="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:b=!0,disabledIndices:S=void 0,orientation:w="vertical",parentOrientation:C,cols:R=1,scrollItemIntoView:T=!0,itemSizes:O,dense:L=!1,id:I,resetOnPointerLeave:B=!0,externalTree:A}=t,D=Ec(o),M=Lt(D),x=pr(),N=Bo(A);ie(()=>{a.current.orientation=w},[a,w]);const _=_p(i),k=g.useRef(y),P=g.useRef(c??-1),q=g.useRef(null),U=g.useRef(!0),G=W(X=>{u(P.current===-1?null:P.current,X)}),ue=g.useRef(G),te=g.useRef(!!o),ce=g.useRef(r),oe=g.useRef(!1),J=g.useRef(!1),Se=Lt(S),Ae=Lt(r),H=Lt(T),Y=Lt(c),ne=Lt(B),De=W(()=>{function X(ye){E?N==null||N.events.emit("virtualfocus",ye):Iu(ye,{sync:oe.current,preventScroll:!0})}const ae=l.current[P.current],j=J.current;ae&&X(ae),(oe.current?ye=>ye():requestAnimationFrame)(()=>{var Te;const ye=l.current[P.current]||ae;if(!ye)return;ae||X(ye);const ge=H.current;ge&&Q&&(j||!U.current)&&((Te=ye.scrollIntoView)==null||Te.call(ye,typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))})});ie(()=>{f&&(r&&o?(P.current=c??-1,k.current&&c!=null&&(J.current=!0,G())):te.current&&(P.current=-1,ue.current()))},[f,r,o,c,G]),ie(()=>{if(f){if(!r){oe.current=!1;return}if(o)if(s==null){if(oe.current=!1,Y.current!=null)return;if(te.current&&(P.current=-1,De()),(!ce.current||!te.current)&&k.current&&(q.current!=null||k.current===!0&&q.current==null)){let X=0;const ae=()=>{l.current[0]==null?(X<2&&(X?requestAnimationFrame:queueMicrotask)(ae),X+=1):(P.current=q.current==null||eh(q.current,w,v)||m?qd(l):Wv(l),q.current=null,G())};ae()}}else Dl(l,s)||(P.current=s,De(),J.current=!1)}},[f,r,o,s,Y,m,l,w,v,G,De,Se]),ie(()=>{var ye,ge;if(!f||o||!N||E||!te.current)return;const X=N.nodesRef.current,ae=(ge=(ye=X.find(be=>be.id===x))==null?void 0:ye.context)==null?void 0:ge.elements.floating,j=en(ct(o)),Z=X.some(be=>be.context&&Re(be.context.elements.floating,j));ae&&!Z&&U.current&&ae.focus({preventScroll:!0})},[f,o,N,x,E]),ie(()=>{ue.current=G,ce.current=r,te.current=!!o}),ie(()=>{r||(q.current=null,k.current=y)},[r,y]);const pe=s!=null,Q=g.useMemo(()=>{function X(j){if(!Ae.current)return;const Z=l.current.indexOf(j.currentTarget);Z!==-1&&P.current!==Z&&(P.current=Z,G(j))}return{onFocus(j){oe.current=!0,X(j)},onClick:({currentTarget:j})=>j.focus({preventScroll:!0}),onMouseMove(j){oe.current=!0,J.current=!1,p&&X(j)},onPointerLeave(j){var ye;if(!Ae.current||!U.current||j.pointerType==="touch")return;oe.current=!0;const Z=j.relatedTarget;!p||l.current.includes(Z)||ne.current&&(P.current=-1,G(j),E||(ye=M.current)==null||ye.focus({preventScroll:!0}))}}},[Ae,M,p,l,G,ne,E]),K=g.useCallback(()=>{var X,ae,j;return C??((j=(ae=(X=N==null?void 0:N.nodesRef.current.find(Z=>Z.id===x))==null?void 0:X.context)==null?void 0:ae.dataRef)==null?void 0:j.current.orientation)},[x,N,C]),re=W(X=>{if(U.current=!1,oe.current=!0,X.which===229||!Ae.current&&X.currentTarget===M.current)return;if(m&&_D(X.key,w,v,R)){lu(X.key,K())||$t(X),n.setOpen(!1,xe(Nu,X.nativeEvent)),tt(i)&&(E?N==null||N.events.emit("virtualfocus",i):i.focus());return}const ae=P.current,j=qd(l,S),Z=Wv(l,S);if(_||(X.key==="Home"&&($t(X),P.current=j,G(X)),X.key==="End"&&($t(X),P.current=Z,G(X))),R>1){const ye=O||Array.from({length:l.current.length},()=>({width:1,height:1})),ge=FM(ye,R,L),be=ge.findIndex(Gt=>Gt!=null&&!Nl(l,Gt,S)),Te=ge.reduce((Gt,cn,he)=>cn!=null&&!Nl(l,cn,S)?he:Gt,-1),Ne=ge[VM({current:ge.map(Gt=>Gt!=null?l.current[Gt]:null)},{event:X,orientation:w,loopFocus:h,rtl:v,cols:R,disabledIndices:YM([...(typeof S!="function"?S:null)||l.current.map((Gt,cn)=>Nl(l,cn,S)?cn:void 0),void 0],ge),minIndex:be,maxIndex:Te,prevIndex:qM(P.current>Z?j:P.current,ye,ge,R,X.key===_s?"bl":X.key===(v?xo:To)?"tr":"tl"),stopEvent:!0})];if(Ne!=null&&(P.current=Ne,G(X)),w==="both")return}if(lu(X.key,w)){if($t(X),r&&!E&&en(X.currentTarget.ownerDocument)===X.currentTarget){P.current=eh(X.key,w,v)?j:Z,G(X);return}eh(X.key,w,v)?h?ae>=Z?d&&ae!==l.current.length?P.current=-1:(oe.current=!1,P.current=j):P.current=Ut(l,{startingIndex:ae,disabledIndices:S}):P.current=Math.min(Z,Ut(l,{startingIndex:ae,disabledIndices:S})):h?ae<=j?d&&ae!==-1?P.current=l.current.length:(oe.current=!1,P.current=Z):P.current=Ut(l,{startingIndex:ae,decrement:!0,disabledIndices:S}):P.current=Math.max(j,Ut(l,{startingIndex:ae,decrement:!0,disabledIndices:S})),Dl(l,P.current)&&(P.current=-1),G(X)}}),de=g.useMemo(()=>E&&r&&pe&&{"aria-activedescendant":`${I}-${s}`},[E,r,pe,I,s]),me=g.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,..._?{}:de,onKeyDown(X){if(X.key==="Tab"&&X.shiftKey&&r&&!E){const ae=At(X.nativeEvent);if(ae&&!Re(M.current,ae))return;$t(X),n.setOpen(!1,xe(Vr,X.nativeEvent)),tt(i)&&i.focus();return}re(X)},onPointerMove(){U.current=!0}}),[de,re,M,w,_,n,r,E,i]),le=g.useMemo(()=>{function X(j){y==="auto"&&dR(j.nativeEvent)&&(k.current=!E)}function ae(j){k.current=y,y==="auto"&&hR(j.nativeEvent)&&(k.current=!0)}return{onKeyDown(j){const Z=n.select("open");U.current=!1;const ye=j.key.startsWith("Arrow"),ge=CD(j.key,K(),v),be=lu(j.key,w),Te=(m?ge:be)||j.key==="Enter"||j.key.trim()==="";if(E&&Z)return re(j);if(!(!Z&&!b&&ye)){if(Te){const Ne=lu(j.key,K());q.current=m&&Ne?null:j.key}if(m){ge&&($t(j),Z?(P.current=qd(l,Se.current),G(j)):n.setOpen(!0,xe(Nu,j.nativeEvent,j.currentTarget)));return}be&&(Y.current!=null&&(P.current=Y.current),$t(j),!Z&&b?n.setOpen(!0,xe(Nu,j.nativeEvent,j.currentTarget)):re(j),Z&&G(j))}},onFocus(j){n.select("open")&&!E&&(P.current=-1,G(j))},onPointerDown:ae,onPointerEnter:ae,onMouseDown:X,onClick:X}},[re,Se,y,l,m,G,n,b,w,K,v,Y,E]),se=g.useMemo(()=>({...de,...le}),[de,le]);return g.useMemo(()=>f?{reference:se,floating:me,item:Q,trigger:le}:{},[f,se,me,le,Q])}const TD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function uC(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{enabled:l=!0,role:s="dialog"}=t,u=Yr(),f=(i==null?void 0:i.id)||u,c=g.useMemo(()=>{var b;return((b=Ec(a))==null?void 0:b.id)||o},[a,o]),d=TD.get(s)??s,m=pr()!=null,v=g.useMemo(()=>d==="tooltip"||s==="label"?wt:{"aria-haspopup":d==="alertdialog"?"dialog":d,"aria-expanded":"false",...d==="listbox"&&{role:"combobox"},...d==="menu"&&m&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[d,m,s]),E=g.useMemo(()=>d==="tooltip"||s==="label"?{[`aria-${s==="label"?"labelledby":"describedby"}`]:r?c:void 0}:{...v,"aria-expanded":r?"true":"false","aria-controls":r?c:void 0,...d==="menu"&&{id:f}},[d,c,r,f,s,v]),y=g.useMemo(()=>{const b={id:c,...d&&{role:d}};return d==="tooltip"||s==="label"?b:{...b,...d==="menu"&&{"aria-labelledby":f}}},[d,c,f,s]),p=g.useCallback(({active:b,selected:S})=>{const w={role:"option",...b&&{id:`${c}-fui-option`}};switch(s){case"select":case"combobox":return{...w,"aria-selected":S}}return{}},[c,s]);return g.useMemo(()=>l?{reference:E,floating:y,item:p,trigger:v}:{},[l,E,y,v,p])}function AD(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.context.dataRef,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:s,enabled:u=!0,findMatch:f=null,resetMs:c=750,ignoreKeys:d=Ac,selectedIndex:h=null}=t,m=Cn(),v=g.useRef(""),E=g.useRef(h??a??-1),y=g.useRef(null);ie(()=>{r&&(m.clear(),y.current=null,v.current="")},[r,m]),ie(()=>{r&&v.current===""&&(E.current=h??a??-1)},[r,h,a]);const p=W(C=>{C?o.current.typing||(o.current.typing=C,s==null||s(C)):o.current.typing&&(o.current.typing=C,s==null||s(C))}),b=W(C=>{function R(B,A,D){const M=f?f(A,D):A.find(x=>(x==null?void 0:x.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return M?B.indexOf(M):-1}const T=i.current;if(v.current.length>0&&v.current[0]!==" "&&(R(T,T,v.current)===-1?p(!1):C.key===" "&&$t(C)),T==null||d.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&($t(C),p(!0)),T.every(B=>{var A,D;return B?((A=B[0])==null?void 0:A.toLocaleLowerCase())!==((D=B[1])==null?void 0:D.toLocaleLowerCase()):!0})&&v.current===C.key&&(v.current="",E.current=y.current),v.current+=C.key,m.start(c,()=>{v.current="",E.current=y.current,p(!1)});const L=E.current,I=R(T,[...T.slice((L||0)+1),...T.slice(0,(L||0)+1)],v.current);I!==-1?(l==null||l(I),y.current=I):C.key!==" "&&(v.current="",p(!1))}),S=g.useMemo(()=>({onKeyDown:b}),[b]),w=g.useMemo(()=>({onKeyDown:b,onKeyUp(C){C.key===" "&&p(!1)}}),[b,p]);return g.useMemo(()=>u?{reference:S,floating:w}:{},[u,S,w])}function Sb(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,l=i-1;a<i;l=a++){const[s,u]=t[a]||[0,0],[f,c]=t[l]||[0,0];u>=r!=c>=r&&n<=(f-s)*(r-u)/(c-u)+s&&(o=!o)}return o}function OD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function xf(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o=new Zn;let i=!1,a=null,l=null,s=typeof performance<"u"?performance.now():0;function u(c,d){const h=performance.now(),m=h-s;if(a===null||l===null||m===0)return a=c,l=d,s=h,null;const v=c-a,E=d-l,p=Math.sqrt(v*v+E*E)/m;return a=c,l=d,s=h,p}const f=({x:c,y:d,placement:h,elements:m,onClose:v,nodeId:E,tree:y})=>function(b){function S(){o.clear(),v()}if(o.clear(),!m.domReference||!m.floating||h==null||c==null||d==null)return;const{clientX:w,clientY:C}=b,R=[w,C],T=At(b),O=b.type==="mouseleave",L=Re(m.floating,T),I=Re(m.domReference,T),B=m.domReference.getBoundingClientRect(),A=m.floating.getBoundingClientRect(),D=h.split("-")[0],M=c>A.right-A.width/2,x=d>A.bottom-A.height/2,N=OD(R,B),_=A.width>B.width,k=A.height>B.height,P=(_?B:A).left,q=(_?B:A).right,U=(k?B:A).top,G=(k?B:A).bottom;if(L&&(i=!0,!O))return;if(I&&(i=!1),I&&!O){i=!0;return}if(O&&Ge(b.relatedTarget)&&Re(m.floating,b.relatedTarget)||y&&ui(y.nodesRef.current,E).some(({context:ce})=>ce==null?void 0:ce.open))return;if(D==="top"&&d>=B.bottom-1||D==="bottom"&&d<=B.top+1||D==="left"&&c>=B.right-1||D==="right"&&c<=B.left+1)return S();let ue=[];switch(D){case"top":ue=[[P,B.top+1],[P,A.bottom-1],[q,A.bottom-1],[q,B.top+1]];break;case"bottom":ue=[[P,A.top+1],[P,B.bottom-1],[q,B.bottom-1],[q,A.top+1]];break;case"left":ue=[[A.right-1,G],[A.right-1,U],[B.left+1,U],[B.left+1,G]];break;case"right":ue=[[B.right-1,G],[B.right-1,U],[A.left+1,U],[A.left+1,G]];break}function te([ce,oe]){switch(D){case"top":{const J=[_?ce+t/2:M?ce+t*4:ce-t*4,oe+t+1],Se=[_?ce-t/2:M?ce+t*4:ce-t*4,oe+t+1],Ae=[[A.left,M||_?A.bottom-t:A.top],[A.right,M?_?A.bottom-t:A.top:A.bottom-t]];return[J,Se,...Ae]}case"bottom":{const J=[_?ce+t/2:M?ce+t*4:ce-t*4,oe-t],Se=[_?ce-t/2:M?ce+t*4:ce-t*4,oe-t],Ae=[[A.left,M||_?A.top+t:A.bottom],[A.right,M?_?A.top+t:A.bottom:A.top+t]];return[J,Se,...Ae]}case"left":{const J=[ce+t+1,k?oe+t/2:x?oe+t*4:oe-t*4],Se=[ce+t+1,k?oe-t/2:x?oe+t*4:oe-t*4];return[...[[x||k?A.right-t:A.left,A.top],[x?k?A.right-t:A.left:A.right-t,A.bottom]],J,Se]}case"right":{const J=[ce-t,k?oe+t/2:x?oe+t*4:oe-t*4],Se=[ce-t,k?oe-t/2:x?oe+t*4:oe-t*4],Ae=[[x||k?A.left+t:A.right,A.top],[x?k?A.left+t:A.right:A.left+t,A.bottom]];return[J,Se,...Ae]}default:return[]}}if(!Sb([w,C],ue)){if(i&&!N)return S();if(!O&&r){const ce=u(b.clientX,b.clientY);if(ce!==null&&ce<.1)return S()}Sb([w,C],te([c,d]))?!i&&r&&o.start(40,S):S()}};return f.__options={blockPointerEvents:n},f}const MD={...Pm,disabled:fe(e=>e.disabled),instantType:fe(e=>e.instantType),isInstantPhase:fe(e=>e.isInstantPhase),trackCursorAxis:fe(e=>e.trackCursorAxis),disableHoverablePopup:fe(e=>e.disableHoverablePopup),lastOpenChangeReason:fe(e=>e.openChangeReason),closeDelay:fe(e=>e.closeDelay)};class Tf extends Rf{constructor(n){super({...kD(),...n},{popupRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Os},MD);z(this,"setOpen",(n,r)=>{var u,f;const o=r.reason,i=o===yt,a=n&&o===es,l=!n&&(o===Yn||o===Ts);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(f=(u=this.context).onOpenChange)==null||f.call(u,n,r),r.isCanceled)return;const s=()=>{var h;const c={open:n,openChangeReason:o};a?c.instantType="focus":l?c.instantType="dismiss":o===yt&&(c.instantType=void 0);const d=((h=r.trigger)==null?void 0:h.id)??null;(d||n)&&(c.activeTriggerId=d,c.activeTriggerElement=r.trigger??null),this.update(c)};i?zt.flushSync(s):s()})}static useStore(n,r){const o=an(()=>n??new Tf(r)).current,i=Im({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=i,o}}function kD(){return{...Nm(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}function CU(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:s,handle:u,triggerId:f,defaultTriggerId:c=null,children:d}=e,h=Tf.useStore(u==null?void 0:u.store,{open:r??n,activeTriggerId:f!==void 0?f:c});h.useControlledProp("open",r,n),h.useControlledProp("activeTriggerId",f,c),h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),v=h.useState("activeTriggerId"),E=h.useState("payload");h.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o});const y=!t&&m;ie(()=>{m&&t&&h.setOpen(!1,xe(yk))},[m,t,h]),h.useSyncedValue("disabled",t),Lm(h);const{forceUnmount:p,transitionStatus:b}=Dm(y,h),S=h.useState("isInstantPhase"),w=h.useState("instantType"),C=h.useState("lastOpenChangeReason"),R=g.useRef(null);ie(()=>{b==="ending"&&C===Em||b!=="ending"&&S?(w!=="delay"&&(R.current=w),h.set("instantType","delay")):R.current!==null&&(h.set("instantType",R.current),R.current=null)},[b,S,C,w,h]),ie(()=>{y&&v==null&&h.set("payload",void 0)},[h,v,y]);const T=g.useCallback(()=>{h.setOpen(!1,LD(h,yi))},[h]);g.useImperativeHandle(a,()=>({unmount:p,close:T}),[p,T]);const O=h.useState("floatingRootContext"),L=lC(O,{enabled:!t}),I=Om(O,{enabled:!t,referencePress:!0}),B=$k(O,{enabled:!t&&i!=="none",axis:i==="none"?void 0:i}),{getReferenceProps:A,getFloatingProps:D,getTriggerProps:M}=qa([L,I,B]),x=g.useMemo(()=>A(),[A]),N=g.useMemo(()=>M(),[M]),_=g.useMemo(()=>D(),[D]);return h.useSyncedValues({floatingRootContext:O,activeTriggerProps:x,inactiveTriggerProps:N,popupProps:_}),ee.jsx(rR.Provider,{value:h,children:typeof d=="function"?d({payload:E}):d})}function LD(e,t){const n=xe(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}let kc=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const DD={[kc.startingStyle]:""},ND={[kc.endingStyle]:""},Ya={transitionStatus(e){return e==="starting"?DD:e==="ending"?ND:null}};let Bm=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=kc.startingStyle]="startingStyle",e[e.endingStyle=kc.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e}({}),kp=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const PD={[kp.popupOpen]:""},ID={[kp.popupOpen]:"",[kp.pressed]:""},zD={[Bm.open]:""},BD={[Bm.closed]:""},UD={[Bm.anchorHidden]:""},Um={open(e){return e?PD:null}},Lp={open(e){return e?ID:null}},Xr={open(e){return e?zD:BD},anchorHidden(e){return e?UD:null}};function Mi(e){return Yr(e,"base-ui")}const $D=g.createContext(void 0);function HD(){return g.useContext($D)}const GD=600,_U=g.forwardRef(function(t,n){const{className:r,render:o,handle:i,payload:a,disabled:l,delay:s,closeDelay:u,id:f,...c}=t,d=Ga(!0),h=(i==null?void 0:i.store)??d;if(!h)throw new Error(et(82));const m=Mi(f),v=h.useState("isTriggerActive",m),E=h.useState("floatingRootContext"),y=h.useState("isOpenedByTrigger",m),p=g.useRef(null),b=s??GD,S=u??0,{registerTrigger:w,isMountedByThisTrigger:C}=km(m,p,h,{payload:a,closeDelay:S}),R=HD(),{delayRef:T,isInstantPhase:O,hasProvider:L}=bk(E,{open:y});h.useSyncedValue("isInstantPhase",O);const I=h.useState("disabled"),B=l??I,A=h.useState("trackCursorAxis"),D=h.useState("disableHoverablePopup"),M=Cf(E,{enabled:!B,mouseOnly:!0,move:!1,handleClose:!D&&A!=="both"?xf():null,restMs(){const k=R==null?void 0:R.delay,P=typeof T.current=="object"?T.current.open:void 0;let q=b;return L&&(P!==0?q=s??k??b:q=0),q},delay(){const k=typeof T.current=="object"?T.current.close:void 0;let P=S;return u==null&&L&&(P=k),{close:P}},triggerElementRef:p,isActiveTrigger:v}),x=g.useMemo(()=>({open:y}),[y]),N=h.useState("triggerProps",C);return Ue("button",t,{state:x,ref:[n,w,p],props:[M,N,{id:m},c],stateAttributesMapping:Um})}),cC=g.createContext(void 0);function jD(){const e=g.useContext(cC);if(e===void 0)throw new Error(et(70));return e}const fC=g.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...l}=t,{portalNode:s,portalSubtree:u}=HR({container:o,ref:n,componentProps:t,elementProps:l});return!u&&!s?null:ee.jsxs(g.Fragment,{children:[u,s&&zt.createPortal(r,s)]})}),xU=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return Ga().useState("mounted")||r?ee.jsx(cC.Provider,{value:r,children:ee.jsx(fC,{ref:n,...o})}):null}),dC=g.createContext(void 0);function hC(){const e=g.useContext(dC);if(e===void 0)throw new Error(et(71));return e}const VD=g.createContext(void 0);function Af(){const e=g.useContext(VD);return(e==null?void 0:e.direction)??"ltr"}const FD=e=>({name:"arrow",options:e,async fn(t){var k,P;const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:u,padding:f=0,offsetParent:c="real"}=jr(e,t)||{};if(u==null)return{};const d=gR(f),h={x:n,y:r},m=ym(o),v=mm(m),E=await a.getDimensions(u),y=m==="y",p=y?"top":"left",b=y?"bottom":"right",S=y?"clientHeight":"clientWidth",w=i.reference[v]+i.reference[m]-h[m]-i.floating[v],C=h[m]-i.reference[m],R=c==="real"?await((k=a.getOffsetParent)==null?void 0:k.call(a,u)):l.floating;let T=l.floating[S]||i.floating[v];(!T||!await((P=a.isElement)==null?void 0:P.call(a,R)))&&(T=l.floating[S]||i.floating[v]);const O=w/2-C/2,L=T/2-E[v]/2-1,I=Math.min(d[p],L),B=Math.min(d[b],L),A=I,D=T-E[v]-B,M=T/2-E[v]/2+O,x=xp(A,M,D),N=!s.arrow&&zo(o)!=null&&M!==x&&i.reference[v]/2-(M<A?I:B)-E[v]/2<0,_=N?M<A?M-A:M-D:0;return{[m]:h[m]+_,data:{[m]:x,centerOffset:M-x-_,...N&&{alignmentOffset:_}},reset:N}}}),qD=(e,t)=>({...FD(e),options:[e,t]}),YD={name:"hide",async fn(e){var l;const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:((l=(await TL().fn(e)).data)==null?void 0:l.referenceHidden)||i}}}},Bu={sideX:"left",sideY:"top"},pC={name:"adaptiveOrigin",async fn(e){var p,b;const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:l}=e,s=at(o),u=s.getComputedStyle(o);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:n,data:Bu};const c=await((p=i.getOffsetParent)==null?void 0:p.call(i,o));let d={width:0,height:0};if(a==="fixed"&&(s!=null&&s.visualViewport))d={width:s.visualViewport.width,height:s.visualViewport.height};else if(c===s){const S=Xt(o);d={width:S.documentElement.clientWidth,height:S.documentElement.clientHeight}}else await((b=i.isElement)==null?void 0:b.call(i,c))&&(d=await i.getDimensions(c));const h=rn(l);let m=t,v=n;h==="left"&&(m=d.width-(t+r.width)),h==="top"&&(v=d.height-(n+r.height));const E=h==="left"?"right":Bu.sideX,y=h==="top"?"bottom":Bu.sideY;return{x:m,y:v,data:{sideX:E,sideY:y}}}};function gC(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 Eb(e,t,n){const{rects:r,placement:o}=e;return{side:gC(t,rn(o),n),align:zo(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $m(e){var Kr,jt;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:s=5,sticky:u=!1,arrowPadding:f=5,disableAnchorTracking:c=!1,keepMounted:d=!1,floatingRootContext:h,mounted:m,collisionAvoidance:v,shiftCrossAxis:E=!1,nodeId:y,adaptiveOrigin:p,lazyFlip:b=!1,externalTree:S}=e,[w,C]=g.useState(null);!m&&w!==null&&C(null);const R=v.side||"flip",T=v.align||"flip",O=v.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,I=W(L),B=L?I:t,A=Lt(t),M=Af()==="rtl",x=w||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[r],N=i==="center"?x:`${x}-${i}`;let _=s;const k=1,P=r==="bottom"?k:0,q=r==="top"?k:0,U=r==="right"?k:0,G=r==="left"?k:0;typeof _=="number"?_={top:_+P,right:_+G,bottom:_+q,left:_+U}:_&&(_={top:(_.top||0)+P,right:(_.right||0)+G,bottom:(_.bottom||0)+q,left:(_.left||0)+U});const ue={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:_},te=g.useRef(null),ce=Lt(o),oe=Lt(a),Ae=[wL(Ie=>{const st=Eb(Ie,r,M),Vt=typeof ce.current=="function"?ce.current(st):ce.current,rt=typeof oe.current=="function"?oe.current(st):oe.current;return{mainAxis:Vt,crossAxis:rt,alignmentAxis:rt}},[typeof o!="function"?o:0,typeof a!="function"?a:0,M,r])],H=T==="none"&&R!=="shift",Y=!H&&(u||E||R==="shift"),ne=R==="none"?null:_L({...ue,padding:{top:_.top+k,right:_.right+k,bottom:_.bottom+k,left:_.left+k},mainAxis:!E&&R==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),De=H?null:RL(Ie=>{const st=Xt(Ie.elements.floating).documentElement;return{...ue,rootBoundary:E?{x:0,y:0,width:st.clientWidth,height:st.clientHeight}:void 0,mainAxis:T!=="none",crossAxis:Y,limiter:u||E?void 0:CL(Vt=>{if(!te.current)return{};const{width:rt,height:mr}=te.current.getBoundingClientRect(),yr=Pn(rn(Vt.placement)),Is=yr==="y"?rt:mr,Jf=yr==="y"?_.left+_.right:_.top+_.bottom;return{offset:Is/2+Jf/2}})}},[ue,u,E,_,T]);R==="shift"||T==="shift"||i==="center"?Ae.push(De,ne):Ae.push(ne,De),Ae.push(xL({...ue,apply({elements:{floating:Ie},rects:{reference:st},availableWidth:Vt,availableHeight:rt}){Object.entries({"--available-width":`${Vt}px`,"--available-height":`${rt}px`,"--anchor-width":`${st.width}px`,"--anchor-height":`${st.height}px`}).forEach(([mr,yr])=>{Ie.style.setProperty(mr,yr)})}}),qD(()=>({element:te.current||document.createElement("div"),padding:f,offsetParent:"floating"}),[f]),{name:"transformOrigin",fn(Ie){var sy,uy,cy;const{elements:st,middlewareData:Vt,placement:rt,rects:mr,y:yr}=Ie,Is=rn(rt),Jf=Pn(Is),Li=te.current,_x=((sy=Vt.arrow)==null?void 0:sy.x)||0,xx=((uy=Vt.arrow)==null?void 0:uy.y)||0,Tx=(Li==null?void 0:Li.clientWidth)||0,Ax=(Li==null?void 0:Li.clientHeight)||0,ed=_x+Tx/2,ly=xx+Ax/2,Ox=Math.abs(((cy=Vt.shift)==null?void 0:cy.y)||0),Mx=mr.reference.height/2,Wa=typeof o=="function"?o(Eb(Ie,r,M)):o,kx=Ox>Wa,Lx={top:`${ed}px calc(100% + ${Wa}px)`,bottom:`${ed}px ${-Wa}px`,left:`calc(100% + ${Wa}px) ${ly}px`,right:`${-Wa}px ${ly}px`}[Is],Dx=`${ed}px ${mr.reference.y+Mx-yr}px`;return st.floating.style.setProperty("--transform-origin",Y&&Jf==="y"&&kx?Dx:Lx),{}}},YD,p),ie(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,h]);const pe=g.useMemo(()=>({elementResize:!c&&typeof ResizeObserver<"u",layoutShift:!c&&typeof IntersectionObserver<"u"}),[c]),{refs:Q,elements:K,x:re,y:de,middlewareData:me,update:le,placement:se,context:X,isPositioned:ae,floatingStyles:j}=yD({rootContext:h,placement:N,middleware:Ae,strategy:n,whileElementsMounted:d?void 0:(...Ie)=>gb(...Ie,pe),nodeId:y,externalTree:S}),{sideX:Z,sideY:ye}=me.adaptiveOrigin||Bu,ge=ae?n:"fixed",be=g.useMemo(()=>p?{position:ge,[Z]:re,[ye]:de}:{position:ge,...j},[p,ge,Z,re,ye,de,j]),Te=g.useRef(null);ie(()=>{if(!m)return;const Ie=A.current,st=typeof Ie=="function"?Ie():Ie,rt=(wb(st)?st.current:st)||null||null;rt!==Te.current&&(Q.setPositionReference(rt),Te.current=rt)},[m,Q,B,A]),g.useEffect(()=>{if(!m)return;const Ie=A.current;typeof Ie!="function"&&wb(Ie)&&Ie.current!==Te.current&&(Q.setPositionReference(Ie.current),Te.current=Ie.current)},[m,Q,B,A]),g.useEffect(()=>{if(d&&m&&K.domReference&&K.floating)return gb(K.domReference,K.floating,le,pe)},[d,m,K,le,pe]);const Ne=rn(se),Gt=gC(r,Ne,M),cn=zo(se)||"center",he=!!((Kr=me.hide)!=null&&Kr.referenceHidden);ie(()=>{b&&m&&ae&&C(Ne)},[b,m,ae,Ne]);const Pe=g.useMemo(()=>{var Ie,st;return{position:"absolute",top:(Ie=me.arrow)==null?void 0:Ie.y,left:(st=me.arrow)==null?void 0:st.x}},[me.arrow]),lt=((jt=me.arrow)==null?void 0:jt.centerOffset)!==0;return g.useMemo(()=>({positionerStyles:be,arrowStyles:Pe,arrowRef:te,arrowUncentered:lt,side:Gt,align:cn,physicalSide:Ne,anchorHidden:he,refs:Q,context:X,isPositioned:ae,update:le}),[be,Pe,te,lt,Gt,cn,Ne,he,Q,X,ae,le])}function wb(e){return e!=null&&"current"in e}function Ms(e){return e==="starting"?hk:wt}const TU=g.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:l="top",align:s="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:E=Sm,...y}=t,p=Ga(),b=jD(),S=p.useState("open"),w=p.useState("mounted"),C=p.useState("trackCursorAxis"),R=p.useState("disableHoverablePopup"),T=p.useState("floatingRootContext"),O=p.useState("instantType"),L=p.useState("transitionStatus"),I=$m({anchor:i,positionMethod:a,floatingRootContext:T,mounted:w,side:l,sideOffset:u,align:s,alignOffset:f,collisionBoundary:c,collisionPadding:d,sticky:m,arrowPadding:h,disableAnchorTracking:v,keepMounted:b,collisionAvoidance:E,adaptiveOrigin:pC}),B=g.useMemo(()=>{const x={};return(!S||C==="both"||R)&&(x.pointerEvents="none"),{role:"presentation",hidden:!w,style:{...I.positionerStyles,...x}}},[S,C,R,w,I.positionerStyles]),A=g.useMemo(()=>({open:S,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:C!=="none"?"tracking-cursor":O}),[S,I.side,I.align,I.anchorHidden,C,O]),D=g.useMemo(()=>({...A,arrowRef:I.arrowRef,arrowStyles:I.arrowStyles,arrowUncentered:I.arrowUncentered}),[A,I.arrowRef,I.arrowStyles,I.arrowUncentered]),M=Ue("div",t,{state:A,props:[B,Ms(L),y],ref:[n,p.useStateSetter("positionerElement")],stateAttributesMapping:Xr});return ee.jsx(dC.Provider,{value:D,children:M})});function Rb(e){const t=ln(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r;return(xa(n)!==i||xa(r)!==a)&&(n=i,r=a),{width:n,height:r}}const XD=typeof ResizeObserver<"u",KD=()=>!0;function mC(e){const{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=KD,onMeasureLayout:a,onMeasureLayoutComplete:l,side:s,direction:u}=e,f=g.useRef(!0),c=As(t,!0,!1),d=Oi(),h=g.useRef(null),m=W(a),v=W(l),E=g.useMemo(()=>{let y=s==="top",p=s==="left";return u==="rtl"?(y=y||s==="inline-end",p=p||s==="inline-end"):(y=y||s==="inline-start",p=p||s==="inline-start"),y?{position:"absolute",[s==="top"?"bottom":"top"]:"0",[p?"right":"left"]:"0"}:wt},[s,u]);ie(()=>{if(!o||!i()||!XD){f.current=!0,h.current=null;return}if(!t||!n)return;Object.entries(E).forEach(([O,L])=>{t.style.setProperty(O,L)});const y=new ResizeObserver(O=>{const L=O[0];L&&(h.current===null?h.current={width:Math.ceil(L.borderBoxSize[0].inlineSize),height:Math.ceil(L.borderBoxSize[0].blockSize)}:(h.current.width=Math.ceil(L.borderBoxSize[0].inlineSize),h.current.height=Math.ceil(L.borderBoxSize[0].blockSize)))});y.observe(t),t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto");const p=sl(t,"position","static"),b=sl(t,"transform","none"),S=sl(t,"scale","1"),w=sl(n,"--available-width","max-content"),C=sl(n,"--available-height","max-content");if(m==null||m(),f.current||h.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const O=Rb(t);return n.style.setProperty("--positioner-width",`${O.width}px`),n.style.setProperty("--positioner-height",`${O.height}px`),p(),b(),S(),w(),C(),v==null||v(null,O),f.current=!1,()=>{y.disconnect()}}t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const R=Rb(t);t.style.setProperty("--popup-width",`${h.current.width}px`),t.style.setProperty("--popup-height",`${h.current.height}px`),p(),b(),w(),C(),v==null||v(h.current,R),n.style.setProperty("--positioner-width",`${R.width}px`),n.style.setProperty("--positioner-height",`${R.height}px`);const T=new AbortController;return d.request(()=>{t.style.setProperty("--popup-width",`${R.width}px`),t.style.setProperty("--popup-height",`${R.height}px`),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},T.signal)}),()=>{y.disconnect(),T.abort(),d.cancel()}},[r,t,n,c,d,i,o,m,v,E])}function sl(e,t,n){const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}const QD={...Xr,...Ya},AU=g.forwardRef(function(t,n){const{className:r,render:o,...i}=t,a=Ga(),{side:l,align:s}=hC(),u=a.useState("open"),f=a.useState("mounted"),c=a.useState("instantType"),d=a.useState("transitionStatus"),h=a.useState("popupProps"),m=a.useState("payload"),v=a.useState("popupElement"),E=a.useState("positionerElement"),y=a.useState("floatingRootContext"),p=Af();Fa({open:u,ref:a.context.popupRef,onComplete(){var L,I;u&&((I=(L=a.context).onOpenChangeComplete)==null||I.call(L,!0))}});function b(){y.context.events.emit("measure-layout")}function S(L,I){y.context.events.emit("measure-layout-complete",{previousDimensions:L,nextDimensions:I})}const w=g.useCallback(()=>a.context.triggerElements.size>1,[a]);mC({popupElement:v,positionerElement:E,mounted:f,content:m,enabled:w,onMeasureLayout:b,onMeasureLayoutComplete:S,side:l,direction:p});const C=a.useState("disabled"),R=a.useState("closeDelay");zm(y,{enabled:!C,closeDelay:R});const T=g.useMemo(()=>({open:u,side:l,align:s,instant:c,transitionStatus:d}),[u,l,s,c,d]);return Ue("div",t,{state:T,ref:[n,a.context.popupRef,a.useStateSetter("popupElement")],props:[h,Ms(d),i],stateAttributesMapping:QD})}),OU=g.forwardRef(function(t,n){const{className:r,render:o,...i}=t,l=Ga().useState("instantType"),{open:s,arrowRef:u,side:f,align:c,arrowUncentered:d,arrowStyles:h}=hC(),m=g.useMemo(()=>({open:s,side:f,align:c,uncentered:d,instant:l}),[s,f,c,d,l]);return Ue("div",t,{state:m,ref:[n,u],props:[{style:h,"aria-hidden":!0},i],stateAttributesMapping:Xr})});function ks(e){return _m(19)?e:e?"true":void 0}function yC(e){const[t,n]=g.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}let Cb=function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e}({});const ZD={activationDirection:e=>e?{"data-activation-direction":e}:null},MU=g.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,l=Ga(),s=l.useState("activeTriggerElement"),u=l.useState("open"),f=l.useState("floatingRootContext"),c=l.useState("instantType"),d=yC(u?s:null),h=g.useRef(null),[m,v]=g.useState(null),[E,y]=g.useState(null),p=g.useRef(null),b=g.useRef(null),S=As(p,!0,!1),w=Oi(),[C,R]=g.useState(null),[T,O]=g.useState(!1),L=W(()=>{var x,N,_;(x=p.current)==null||x.style.setProperty("animation","none"),(N=p.current)==null||N.style.setProperty("transition","none"),(_=b.current)==null||_.style.setProperty("display","none")}),I=W(x=>{var N,_,k;(N=p.current)==null||N.style.removeProperty("animation"),(_=p.current)==null||_.style.removeProperty("transition"),(k=b.current)==null||k.style.removeProperty("display"),C||R(x.previousDimensions)});g.useEffect(()=>(f.context.events.on("measure-layout",L),f.context.events.on("measure-layout-complete",I),()=>{f.context.events.off("measure-layout",L),f.context.events.off("measure-layout-complete",I)}),[f,L,I]);const B=g.useRef(null);ie(()=>{if(s&&d&&s!==d&&B.current!==s&&h.current){v(h.current),O(!0);const x=JD(d,s);y(x),w.request(()=>{w.request(()=>{O(!1),S(()=>{v(null),R(null),h.current=null})})}),B.current=s}},[s,d,m,S,w]),ie(()=>{const x=p.current;if(!x)return;const N=document.createElement("div");for(const _ of Array.from(x.childNodes))N.appendChild(_.cloneNode(!0));h.current=N});const A=m!=null;let D;A?D=ee.jsxs(g.Fragment,{children:[ee.jsx("div",{"data-previous":!0,inert:ks(!0),ref:b,style:{[Cb.popupWidth]:`${C==null?void 0:C.width}px`,[Cb.popupHeight]:`${C==null?void 0:C.height}px`,position:"absolute"},"data-ending-style":T?void 0:""},"previous"),ee.jsx("div",{"data-current":!0,ref:p,"data-starting-style":T?"":void 0,children:i},"current")]}):D=ee.jsx("div",{"data-current":!0,ref:p,children:i},"current"),ie(()=>{const x=b.current;!x||!m||x.replaceChildren(...Array.from(m.childNodes))},[m]);const M=g.useMemo(()=>({activationDirection:WD(E),transitioning:A,instant:c}),[E,A,c]);return Ue("div",t,{state:M,ref:n,props:[a,{children:D}],stateAttributesMapping:ZD})});function WD(e){if(e)return`${_b(e.horizontal,5,"right","left")} ${_b(e.vertical,5,"down","up")}`}function _b(e,t,n,r){return e>t?n:e<-t?r:""}function JD(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-o.x,vertical:i.y-o.y}}class eN{constructor(){this.store=new Tf}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(et(81,t));this.store.setOpen(!0,xe(yi,void 0,n))}close(){this.store.setOpen(!1,xe(yi,void 0,void 0))}get isOpen(){return this.store.state.open}}function kU(){return new eN}const vC=g.createContext(void 0);function Of(e){const t=g.useContext(vC);if(t===void 0&&!e)throw new Error(et(33));return t}const bC=g.createContext(void 0);function gr(e){const t=g.useContext(bC);if(t===void 0&&!e)throw new Error(et(36));return t}const tN=g.createContext(void 0);function Mf(e=!0){const t=g.useContext(tN);if(t===void 0&&!e)throw new Error(et(25));return t}function nN({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=g.useRef(e!==void 0),[i,a]=g.useState(t),l=o?e:i,s=g.useCallback(u=>{o||a(u)},[]);return[l,s]}const SC=g.createContext(void 0);function rN(){const e=g.useContext(SC);if(e===void 0)throw new Error(et(30));return e}const oN=g.createContext(void 0);function Hm(e=!1){const t=g.useContext(oN);if(t===void 0&&!e)throw new Error(et(16));return t}function iN(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,l=r&&t===!1;return{props:g.useMemo(()=>{const u={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(u.tabIndex=o,!i&&n&&(u.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||l)&&(u.disabled=n),u},[r,n,t,a,l,i,o])}}function Ls(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=g.useRef(null),a=Hm(!0)!==void 0,l=W(()=>{const d=i.current;return!!((d==null?void 0:d.tagName)==="A"&&(d!=null&&d.href))}),{props:s}=iN({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),u=g.useCallback(()=>{const d=i.current;aN(d)&&a&&t&&s.disabled===void 0&&d.disabled&&(d.disabled=!1)},[t,s.disabled,a]);ie(u,[u]);const f=g.useCallback((d={})=>{const{onClick:h,onMouseDown:m,onKeyUp:v,onKeyDown:E,onPointerDown:y,...p}=d;return Jl({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}h==null||h(S)},onMouseDown(S){t||m==null||m(S)},onKeyDown(S){if(t||(Sp(S),E==null||E(S)),S.baseUIHandlerPrevented)return;const w=S.target===S.currentTarget&&!o&&!l()&&!t,C=S.key==="Enter",R=S.key===" ";w&&((R||C)&&S.preventDefault(),C&&(h==null||h(S)))},onKeyUp(S){t||(Sp(S),v==null||v(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&(h==null||h(S))},onPointerDown(S){if(t){S.preventDefault();return}y==null||y(S)}},o?void 0:{role:"button"},s,p)},[t,s,o,l]),c=W(d=>{i.current=d,u()});return{getButtonProps:f,buttonRef:c}}function aN(e){return tt(e)&&e.tagName==="BUTTON"}const EC={type:"regular-item"};function Gm(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:i,nativeButton:a,itemMetadata:l,nodeId:s}=e,u=g.useRef(null),f=Mf(!0),c=f!==void 0,{events:d}=i.useState("floatingTreeRoot"),{getButtonProps:h,buttonRef:m}=Ls({disabled:n,focusableWhenDisabled:!0,native:a}),v=g.useCallback(y=>Jl({id:o,role:"menuitem",tabIndex:r?0:-1,onMouseMove(p){s&&d.emit("itemhover",{nodeId:s,target:p.currentTarget})},onMouseEnter(){l.type==="submenu-trigger"&&l.setActive()},onKeyUp(p){p.key===" "&&i.context.typingRef.current&&p.preventBaseUIHandler()},onClick(p){t&&d.emit("close",{domEvent:p,reason:Rm})},onMouseUp(p){if(f){const b=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,c&&b&&Math.abs(p.clientX-b.x)<=1&&Math.abs(p.clientY-b.y)<=1)return}u.current&&i.context.allowMouseUpTriggerRef.current&&(!c||p.button===2)&&l.type==="regular-item"&&u.current.click()}},y,h),[o,r,h,t,d,i,c,f,l,s]),E=Oa(u,m);return g.useMemo(()=>({getItemProps:v,itemRef:E}),[v,E])}const wC=g.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function lN(){return g.useContext(wC)}let sN=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function kf(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:l,subscribeMapChange:s,elementsRef:u,labelsRef:f,nextIndexRef:c}=lN(),d=g.useRef(-1),[h,m]=g.useState(i??(o===sN.GuessFromOrder?()=>{if(d.current===-1){const y=c.current;c.current+=1,d.current=y}return d.current}:-1)),v=g.useRef(null),E=g.useCallback(y=>{var p;if(v.current=y,h!==-1&&y!==null&&(u.current[h]=y,f)){const b=t!==void 0;f.current[h]=b?t:((p=r==null?void 0:r.current)==null?void 0:p.textContent)??y.textContent}},[h,u,f,t,r]);return ie(()=>{if(i!=null)return;const y=v.current;if(y)return a(y,n),()=>{l(y)}},[i,a,l,n]),ie(()=>{if(i==null)return s(y=>{var b;const p=v.current?(b=y.get(v.current))==null?void 0:b.index:null;p!=null&&m(p)})},[i,s,m]),g.useMemo(()=>({ref:E,index:h}),[h,E])}let xb=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e}({});const RC={checked(e){return e?{[xb.checked]:""}:{[xb.unchecked]:""}},...Ya},LU=g.forwardRef(function(t,n){const{render:r,className:o,id:i,label:a,nativeButton:l=!1,disabled:s=!1,closeOnClick:u=!1,checked:f,defaultChecked:c,onCheckedChange:d,...h}=t,m=kf({label:a}),v=Of(!0),E=Mi(i),{store:y}=gr(),p=y.useState("isActive",m.index),b=y.useState("itemProps"),[S,w]=nN({controlled:f,default:c??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:C,itemRef:R}=Gm({closeOnClick:u,disabled:s,highlighted:p,id:E,store:y,nativeButton:l,nodeId:v==null?void 0:v.nodeId,itemMetadata:EC}),T=g.useMemo(()=>({disabled:s,highlighted:p,checked:S}),[s,p,S]),O=W(I=>{const B={...xe(Rm,I.nativeEvent),preventUnmountOnClose:()=>{}};d==null||d(!S,B),!B.isCanceled&&w(A=>!A)}),L=Ue("div",t,{state:T,stateAttributesMapping:RC,props:[b,{role:"menuitemcheckbox","aria-checked":S,onClick:O},h,C],ref:[R,n,m.ref]});return ee.jsx(SC.Provider,{value:T,children:L})}),DU=g.forwardRef(function(t,n){const{render:r,className:o,keepMounted:i=!1,...a}=t,l=rN(),s=g.useRef(null),{transitionStatus:u,setMounted:f}=iC(l.checked);Fa({open:l.checked,ref:s,onComplete(){l.checked||f(!1)}});const c=g.useMemo(()=>({checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:u}),[l.checked,l.disabled,l.highlighted,u]);return Ue("span",t,{state:c,ref:[n,s],stateAttributesMapping:RC,props:{"aria-hidden":!0,...a},enabled:i||l.checked})}),CC=g.createContext(void 0);function uN(){const e=g.useContext(CC);if(e===void 0)throw new Error(et(31));return e}const NU=g.forwardRef(function(t,n){const{render:r,className:o,...i}=t,[a,l]=g.useState(void 0),s=g.useMemo(()=>({setLabelId:l}),[l]),u=Ue("div",t,{ref:n,props:{role:"group","aria-labelledby":a,...i}});return ee.jsx(CC.Provider,{value:s,children:u})}),PU=g.forwardRef(function(t,n){const{className:r,render:o,id:i,...a}=t,l=Mi(i),{setLabelId:s}=uN();return ie(()=>(s(l),()=>{s(void 0)}),[s,l]),Ue("div",t,{ref:n,props:{id:l,role:"presentation",...a}})}),IU=g.forwardRef(function(t,n){const{render:r,className:o,id:i,label:a,nativeButton:l=!1,disabled:s=!1,closeOnClick:u=!0,...f}=t,c=kf({label:a}),d=Of(!0),h=Mi(i),{store:m}=gr(),v=m.useState("isActive",c.index),E=m.useState("itemProps"),{getItemProps:y,itemRef:p}=Gm({closeOnClick:u,disabled:s,highlighted:v,id:h,store:m,nativeButton:l,nodeId:d==null?void 0:d.nodeId,itemMetadata:EC}),b=g.useMemo(()=>({disabled:s,highlighted:v}),[s,v]);return Ue("div",t,{state:b,props:[E,f,y],ref:[p,n,c.ref]})}),cN=g.createContext(void 0);function _C(e){return g.useContext(cN)}const xC="ArrowUp",TC="ArrowDown",AC="ArrowLeft",OC="ArrowRight",MC="Home",kC="End",fN=new Set([AC,OC]),dN=new Set([xC,TC]),hN=new Set([...fN,...dN]);[...hN];const LC=new Set([xC,TC,AC,OC,MC,kC]),pN={...Xr,...Ya},zU=g.forwardRef(function(t,n){const{render:r,className:o,finalFocus:i,...a}=t,{store:l}=gr(),{side:s,align:u}=Of(),f=_C()!=null,c=l.useState("open"),d=l.useState("transitionStatus"),h=l.useState("popupProps"),m=l.useState("mounted"),v=l.useState("instantType"),E=l.useState("activeTriggerElement"),y=l.useState("parent"),p=l.useState("lastOpenChangeReason"),b=l.useState("rootId"),S=l.useState("floatingRootContext"),w=l.useState("floatingTreeRoot"),C=l.useState("closeDelay"),R=l.useState("activeTriggerElement");Fa({open:c,ref:l.context.popupRef,onComplete(){var A,D;c&&((D=(A=l.context).onOpenChangeComplete)==null||D.call(A,!0))}}),g.useEffect(()=>{function A(D){l.setOpen(!1,xe(D.reason,D.domEvent))}return w.events.on("close",A),()=>{w.events.off("close",A)}},[w.events,l]);const T=l.useState("hoverEnabled"),O=l.useState("disabled");zm(S,{enabled:T&&!O&&y.type!=="context-menu"&&y.type!=="menubar",closeDelay:C});const L=g.useMemo(()=>({transitionStatus:d,side:s,align:u,open:c,nested:y.type==="menu",instant:v}),[d,s,u,c,y.type,v]),I=Ue("div",t,{state:L,ref:[n,l.context.popupRef],stateAttributesMapping:pN,props:[h,{onKeyDown(A){f&&LC.has(A.key)&&A.stopPropagation()}},Ms(d),a,{"data-rootownerid":b}]});let B=y.type===void 0||y.type==="context-menu";return(E||y.type==="menubar"&&p!==wm)&&(B=!0),ee.jsx(jR,{context:S,modal:!1,disabled:!m,returnFocus:i===void 0?B:i,initialFocus:y.type!=="menu",restoreFocus:!0,externalTree:y.type!=="menubar"?w:void 0,previousFocusableElement:R,nextFocusableElement:y.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:I})}),DC=g.createContext(void 0);function gN(){const e=g.useContext(DC);if(e===void 0)throw new Error(et(32));return e}const BU=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=gr();return i.useState("mounted")||r?ee.jsx(DC.Provider,{value:r,children:ee.jsx(GR,{ref:n,...o})}):null});function mN(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=W(o),a=g.useRef(0),l=an(vN).current,s=an(yN).current,[u,f]=g.useState(0),c=g.useRef(u),d=W((y,p)=>{s.set(y,p??null),c.current+=1,f(c.current)}),h=W(y=>{s.delete(y),c.current+=1,f(c.current)}),m=g.useMemo(()=>{const y=new Map;return Array.from(s.keys()).filter(b=>b.isConnected).sort(bN).forEach((b,S)=>{const w=s.get(b)??{};y.set(b,{...w,index:S})}),y},[s,u]);ie(()=>{if(typeof MutationObserver!="function"||m.size===0)return;const y=new MutationObserver(p=>{const b=new Set,S=w=>b.has(w)?b.delete(w):b.add(w);p.forEach(w=>{w.removedNodes.forEach(S),w.addedNodes.forEach(S)}),b.size===0&&(c.current+=1,f(c.current))});return m.forEach((p,b)=>{b.parentElement&&y.observe(b.parentElement,{childList:!0})}),()=>{y.disconnect()}},[m]),ie(()=>{c.current===u&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),a.current=m.size),i(m)},[i,m,n,r,u]),ie(()=>()=>{n.current=[]},[n]),ie(()=>()=>{r&&(r.current=[])},[r]);const v=W(y=>(l.add(y),()=>{l.delete(y)}));ie(()=>{l.forEach(y=>y(m))},[l,m]);const E=g.useMemo(()=>({register:d,unregister:h,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[d,h,v,n,r,a]);return ee.jsx(wC.Provider,{value:E,children:t})}function yN(){return new Map}function vN(){return new Set}function bN(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 NC=g.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const a=r==null?void 0:r.getBoundingClientRect();i=`polygon(
|
|
81
|
+
0% 0%,
|
|
82
|
+
100% 0%,
|
|
83
|
+
100% 100%,
|
|
84
|
+
0% 100%,
|
|
85
|
+
0% 0%,
|
|
86
|
+
${a.left}px ${a.top}px,
|
|
87
|
+
${a.left}px ${a.bottom}px,
|
|
88
|
+
${a.right}px ${a.bottom}px,
|
|
89
|
+
${a.right}px ${a.top}px,
|
|
90
|
+
${a.left}px ${a.top}px
|
|
91
|
+
)`}return ee.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),UU=g.forwardRef(function(t,n){var Ae;const{anchor:r,positionMethod:o="absolute",className:i,render:a,side:l,align:s,sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:E=pk,...y}=t,{store:p}=gr(),b=gN(),S=Mf(!0),w=p.useState("parent"),C=p.useState("floatingRootContext"),R=p.useState("floatingTreeRoot"),T=p.useState("mounted"),O=p.useState("open"),L=p.useState("modal"),I=p.useState("activeTriggerElement"),B=p.useState("lastOpenChangeReason"),A=p.useState("floatingNodeId"),D=p.useState("floatingParentNodeId");let M=r,x=u,N=f,_=s,k=E;w.type==="context-menu"&&(M=r??((Ae=w.context)==null?void 0:Ae.anchor),_=_??"start",!l&&_!=="center"&&(N=t.alignOffset??2,x=t.sideOffset??-5));let P=l,q=_;w.type==="menu"?(P=P??"inline-end",q=q??"start",k=t.collisionAvoidance??Sm):w.type==="menubar"&&(P=P??"bottom",q=q??"start");const U=w.type==="context-menu",G=$m({anchor:M,floatingRootContext:C,positionMethod:S?"fixed":o,mounted:T,side:P,sideOffset:x,align:q,alignOffset:N,arrowPadding:U?0:h,collisionBoundary:c,collisionPadding:d,sticky:m,nodeId:A,keepMounted:b,disableAnchorTracking:v,collisionAvoidance:k,shiftCrossAxis:U,externalTree:R}),ue=g.useMemo(()=>{const H={};return O||(H.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...G.positionerStyles,...H}}},[O,T,G.positionerStyles]);g.useEffect(()=>{function H(Y){Y.open?(Y.parentNodeId===A&&p.set("hoverEnabled",!1),Y.nodeId!==A&&Y.parentNodeId===p.select("floatingParentNodeId")&&p.setOpen(!1,xe(ml))):Y.parentNodeId===A&&Y.reason!==ml&&p.set("hoverEnabled",!0)}return R.events.on("menuopenchange",H),()=>{R.events.off("menuopenchange",H)}},[p,R.events,A]),g.useEffect(()=>{if(p.select("floatingParentNodeId")==null)return;function H(Y){if(Y.open||Y.nodeId!==p.select("floatingParentNodeId"))return;const ne=Y.reason??ml;p.setOpen(!1,xe(ne))}return R.events.on("menuopenchange",H),()=>{R.events.off("menuopenchange",H)}},[R.events,p]),g.useEffect(()=>{function H(Y){!O||Y.nodeId!==p.select("floatingParentNodeId")||Y.target&&I&&I!==Y.target&&p.setOpen(!1,xe(ml))}return R.events.on("itemhover",H),()=>{R.events.off("itemhover",H)}},[R.events,O,I,p]),g.useEffect(()=>{const H={open:O,nodeId:A,parentNodeId:D,reason:p.select("lastOpenChangeReason")};R.events.emit("menuopenchange",H)},[R.events,O,p,A,D]);const te=g.useMemo(()=>({open:O,side:G.side,align:G.align,anchorHidden:G.anchorHidden,nested:w.type==="menu"}),[O,G.side,G.align,G.anchorHidden,w.type]),ce=g.useMemo(()=>({side:G.side,align:G.align,arrowRef:G.arrowRef,arrowUncentered:G.arrowUncentered,arrowStyles:G.arrowStyles,nodeId:G.context.nodeId}),[G.side,G.align,G.arrowRef,G.arrowUncentered,G.arrowStyles,G.context.nodeId]),oe=Ue("div",t,{state:te,stateAttributesMapping:Xr,ref:[n,p.useStateSetter("positionerElement")],props:[ue,y]}),J=T&&w.type!=="menu"&&(w.type!=="menubar"&&L&&B!==yt||w.type==="menubar"&&w.context.modal);let Se=null;return w.type==="menubar"?Se=w.context.contentElement:w.type===void 0&&(Se=I),ee.jsxs(vC.Provider,{value:ce,children:[J&&ee.jsx(NC,{ref:w.type==="context-menu"||w.type==="nested-context-menu"?w.context.internalBackdropRef:null,inert:ks(!O),cutout:Se}),ee.jsx(kR,{id:A,children:ee.jsx(mN,{elementsRef:p.context.itemDomElements,labelsRef:p.context.itemLabels,children:oe})})]})});let Tb={},Ab={},Ob="";function SN(e){if(typeof document>"u")return!1;const t=Xt(e);return at(t).innerWidth-t.documentElement.clientWidth>0}function EN(e){const t=Xt(e),n=t.documentElement,r=t.body,o=Ai(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function wN(e){var d,h;const t=Xt(e),n=t.documentElement,r=t.body,o=at(n);let i=0,a=0;const l=tr.create(),s=typeof CSS<"u"&&((d=CSS.supports)==null?void 0:d.call(CSS,"scrollbar-gutter","stable"));if(TM&&(((h=o.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const m=o.getComputedStyle(n),v=o.getComputedStyle(r),p=(m.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,Tb={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Ob=n.style.scrollBehavior,Ab={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const b=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,w=m.overflowY==="scroll"||v.overflowY==="scroll",C=m.overflowX==="scroll"||v.overflowX==="scroll",R=Math.max(0,o.innerWidth-n.clientWidth),T=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(v.marginTop)+parseFloat(v.marginBottom),L=parseFloat(v.marginLeft)+parseFloat(v.marginRight),I=Ai(n)?n:r;if(s){n.style.scrollbarGutter=p,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:p,overflowY:"hidden",overflowX:"hidden"}),(b||w)&&(n.style.overflowY="scroll"),(S||C)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||T?`calc(100dvh - ${O+T}px)`:"100dvh",width:L||R?`calc(100vw - ${L+R}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function f(){Object.assign(n.style,Tb),Object.assign(r.style,Ab),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Ob)}function c(){f(),l.request(u)}return u(),o.addEventListener("resize",c),()=>{l.cancel(),f(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",c)}}class RN{constructor(){z(this,"lockCount",0);z(this,"restore",null);z(this,"timeoutLock",Zn.create());z(this,"timeoutUnlock",Zn.create());z(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});z(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=Xt(t).documentElement,o=at(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=DR;return}const i=AM||!SN(t);this.restore=i?EN(t):wN(t)}}const CN=new RN;function PC(e=!0,t=null){ie(()=>{if(e)return CN.acquire(t)},[e,t])}const _N=g.createContext(null);function IC(e){return g.useContext(_N)}function xN(e){const t=g.useRef(""),n=g.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:g.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function zC(e){const[t,n]=g.useState(null),r=W((l,s)=>{e||n(s)}),o=g.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=xN(r);return g.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}const TN={...Pm,disabled:fe(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:fe(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:fe(e=>e.parent.type==="menu"?e.parent.store.select("allowMouseEnter"):e.allowMouseEnter),stickIfOpen:fe(e=>e.stickIfOpen),parent:fe(e=>e.parent),rootId:fe(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:fe(e=>e.activeIndex),isActive:fe((e,t)=>e.activeIndex===t),hoverEnabled:fe(e=>e.hoverEnabled),instantType:fe(e=>e.instantType),lastOpenChangeReason:fe(e=>e.openChangeReason),floatingTreeRoot:fe(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:fe(e=>e.floatingNodeId),floatingParentNodeId:fe(e=>e.floatingParentNodeId),itemProps:fe(e=>e.itemProps),closeDelay:fe(e=>e.closeDelay),keyboardEventRelay:fe(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class jm extends Rf{constructor(n){super({...AN(),...n},{positionerRef:g.createRef(),popupRef:g.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:g.createRef(),beforeContentFocusGuardRef:g.createRef(),onOpenChangeComplete:void 0,triggerElements:new Os},TN);z(this,"unsubscribeParentListener",null);this.observe(fe(r=>r.allowMouseEnter),(r,o)=>{this.state.parent.type==="menu"&&r!==o&&this.state.parent.store.set("allowMouseEnter",r)}),this.unsubscribeParentListener=this.observe("parent",r=>{var o;if((o=this.unsubscribeParentListener)==null||o.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){return an(()=>n??new jm(r)).current}}function AN(){return{...Nm(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new vm,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:wt,keyboardEventRelay:void 0,closeDelay:0}}const BC=g.createContext(void 0);function UC(){return g.useContext(BC)}function ON(e){const{children:t,open:n,onOpenChange:r,onOpenChangeComplete:o,defaultOpen:i=!1,disabled:a=!1,modal:l,loopFocus:s=!0,orientation:u="vertical",actionsRef:f,closeParentOnEsc:c=!1,handle:d,triggerId:h,defaultTriggerId:m=null,highlightItemOnHover:v=!0}=e,E=Mf(!0),y=gr(!0),p=IC(),b=UC(),S=g.useMemo(()=>b&&y?{type:"menu",store:y.store}:p?{type:"menubar",context:p}:E&&!y?{type:"context-menu",context:E}:{type:void 0},[E,y,p,b]),w=jm.useStore(d==null?void 0:d.store,{parent:S}),C=w.useState("floatingTreeRoot"),R=bm(C),T=pr();ie(()=>{E&&!y?w.update({parent:{type:"context-menu",context:E},floatingNodeId:R,floatingParentNodeId:T}):y&&w.update({floatingNodeId:R,floatingParentNodeId:T})},[E,y,R,T,w]),w.useControlledProp("open",n,i),w.useControlledProp("activeTriggerId",h,m),w.useContextCallback("onOpenChangeComplete",o);const O=w.useState("open"),L=w.useState("activeTriggerElement"),I=w.useState("positionerElement"),B=w.useState("hoverEnabled"),A=w.useState("modal"),D=w.useState("disabled"),M=w.useState("lastOpenChangeReason"),x=w.useState("parent"),N=w.useState("activeIndex"),_=w.useState("payload"),k=w.useState("floatingParentNodeId"),P=g.useRef(null),q=k!=null;let U;w.useSyncedValues({disabled:a,modal:x.type===void 0?l:void 0,rootId:Yr()});const{openMethod:G,triggerProps:ue,reset:te}=zC(O);Lm(w);const{forceUnmount:ce}=Dm(O,w,()=>{w.update({allowMouseEnter:!1,stickIfOpen:!0}),te()}),oe=g.useRef(x.type!=="context-menu"),J=Cn();g.useEffect(()=>{if(O||(P.current=null),x.type==="context-menu"){if(!O){J.clear(),oe.current=!1;return}J.start(500,()=>{oe.current=!0})}},[J,O,x.type]),PC(O&&A&&M!==yt&&G!=="touch",I),ie(()=>{!O&&!B&&w.set("hoverEnabled",!0)},[O,B,w]);const Se=g.useRef(!0),Ae=Cn(),H=W((he,Pe)=>{const lt=Pe.reason;if(O===he&&Pe.trigger===L||(Pe.preventUnmountOnClose=()=>{w.set("preventUnmountingOnClose",!0)},!he&&Pe.trigger==null&&(Pe.trigger=L??void 0),r==null||r(he,Pe),Pe.isCanceled))return;const Kr={open:he,nativeEvent:Pe.event,reason:Pe.reason,nested:q};U==null||U.emit("openchange",Kr);const jt=Pe.event;if(he===!1&&(jt==null?void 0:jt.type)==="click"&&jt.pointerType==="touch"&&!Se.current)return;if(!he&&N!==null){const rt=w.context.itemDomElements.current[N];queueMicrotask(()=>{rt==null||rt.setAttribute("tabindex","-1")})}he&<===es?(Se.current=!1,Ae.start(300,()=>{Se.current=!0})):(Se.current=!0,Ae.clear());const Ie=(lt===Yn||lt===Rm)&&jt.detail===0&&(jt==null?void 0:jt.isTrusted),st=!he&&(lt===Ts||lt==null);function Vt(){var yr;const rt={open:he,openChangeReason:lt};P.current=Pe.event??null;const mr=((yr=Pe.trigger)==null?void 0:yr.id)??null;(mr||he)&&(rt.activeTriggerId=mr,rt.activeTriggerElement=Pe.trigger??null),w.update(rt)}lt===yt?zt.flushSync(Vt):Vt(),x.type==="menubar"&&(lt===es||lt===Vr||lt===yt||lt===Nu||lt===ml)?w.set("instantType","group"):Ie||st?w.set("instantType",Ie?"click":"dismiss"):w.set("instantType",void 0)}),Y=g.useCallback(he=>{const Pe=xe(he);return Pe.preventUnmountOnClose=()=>{w.set("preventUnmountingOnClose",!0)},Pe},[w]),ne=g.useCallback(()=>{w.setOpen(!1,Y(yi))},[w,Y]);g.useImperativeHandle(f,()=>({unmount:ce,close:ne}),[ce,ne]);let De;x.type==="context-menu"&&(De=x.context),g.useImperativeHandle(De==null?void 0:De.positionerRef,()=>I,[I]),g.useImperativeHandle(De==null?void 0:De.actionsRef,()=>({setOpen:H}),[H]);const pe=Im({popupStore:w,onOpenChange:H});U=pe.context.events,g.useEffect(()=>{const he=({open:Pe,eventDetails:lt})=>H(Pe,lt);return U.on("setOpen",he),()=>{U==null||U.off("setOpen",he)}},[U,H]);const Q=Om(pe,{enabled:!D,bubbles:c&&x.type==="menu",outsidePress(){var he;return x.type!=="context-menu"||((he=P.current)==null?void 0:he.type)==="contextmenu"?!0:oe.current},externalTree:q?C:void 0}),K=uC(pe,{role:"menu"}),re=Af(),de=g.useCallback(he=>{w.select("activeIndex")!==he&&w.set("activeIndex",he)},[w]),me=xD(pe,{enabled:!D,listRef:w.context.itemDomElements,activeIndex:N,nested:x.type!==void 0,loopFocus:s,orientation:u,parentOrientation:x.type==="menubar"?x.context.orientation:void 0,rtl:re==="rtl",disabledIndices:Ac,onNavigate:de,openOnArrowKeyDown:x.type!=="context-menu",externalTree:q?C:void 0,focusItemOnHover:v}),le=g.useCallback(he=>{w.context.typingRef.current=he},[w]),se=AD(pe,{listRef:w.context.itemLabels,activeIndex:N,resetMs:dk,onMatch:he=>{O&&he!==N&&w.set("activeIndex",he)},onTypingChange:le}),{getReferenceProps:X,getFloatingProps:ae,getItemProps:j,getTriggerProps:Z}=qa([Q,K,me,se]),ye=g.useMemo(()=>{const he=Jl(X(),{onMouseEnter(){w.set("hoverEnabled",!0)},onMouseMove(){w.set("allowMouseEnter",!0)}},ue);return delete he.role,he},[X,w,ue]),ge=g.useMemo(()=>{const he=Z();if(!he)return he;const Pe=Jl(he,ue);return delete Pe.role,delete Pe["aria-controls"],Pe},[Z,ue]),be=Oi(),Te=g.useMemo(()=>ae({onMouseEnter(){x.type==="menu"&&be.request(()=>w.set("hoverEnabled",!1))},onMouseMove(){w.set("allowMouseEnter",!0)},onClick(){w.select("hoverEnabled")&&w.set("hoverEnabled",!1)},onKeyDown(he){const Pe=w.select("keyboardEventRelay");Pe&&!he.isPropagationStopped()&&Pe(he)}}),[ae,x.type,be,w]),Ne=g.useMemo(()=>j(),[j]);w.useSyncedValues({floatingRootContext:pe,activeTriggerProps:ye,inactiveTriggerProps:ge,popupProps:Te,itemProps:Ne});const Gt=g.useMemo(()=>({store:w,parent:S}),[w,S]),cn=ee.jsx(bC.Provider,{value:Gt,children:typeof t=="function"?t({payload:_}):t});return x.type===void 0||x.type==="context-menu"?ee.jsx(LR,{externalTree:C,children:cn}):cn}function $U(e){const t=gr().store,n=g.useMemo(()=>({parentMenu:t}),[t]);return ee.jsx(BC.Provider,{value:n,children:ee.jsx(ON,{...e})})}function MN(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 i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,l=parseFloat(r.width)||0,s=parseFloat(r.height)||0,u=Math.max(t.width,i,l),f=Math.max(t.height,a,s),c=u-t.width,d=f-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}function kN(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Hm(),{ref:o,index:i}=kf(e),a=n===i,l=g.useRef(null),s=Oa(o,l);return{compositeProps:g.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(i)},onMouseMove(){const f=l.current;if(!t||!f)return;const c=f.hasAttribute("disabled")||f.ariaDisabled==="true";!a&&!c&&f.focus()}}),[a,r,i,t]),compositeRef:s,index:i}}function LN(e){const{render:t,className:n,state:r=wt,props:o=Ac,refs:i=Ac,metadata:a,stateAttributesMapping:l,tag:s="div",...u}=e,{compositeProps:f,compositeRef:c}=kN({metadata:a});return Ue(s,e,{state:r,ref:[...i,c],props:[f,...o,u],stateAttributesMapping:l})}function $C(e){if(tt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!ar(e))return $C(sr(e))}function DN(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,o=g.useRef(!1);return g.useMemo(()=>t?{onMouseDown:i=>{(n==="open"&&!r||n==="close"&&r)&&(o.current=!0,Xt(i.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:i=>{o.current&&(o.current=!1,i.preventBaseUIHandler())}}:wt,[t,n,r])}const su=2,HU=g.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,id:l,openOnHover:s,delay:u=100,closeDelay:f=0,handle:c,payload:d,...h}=t,m=gr(!0),v=(c==null?void 0:c.store)??(m==null?void 0:m.store);if(!v)throw new Error(et(85));const E=Mi(l),y=v.useState("isTriggerActive",E),p=v.useState("floatingRootContext"),b=v.useState("isOpenedByTrigger",E),S=g.useRef(null),w=PN(),C=Hm(!0),R=Bo(),T=g.useMemo(()=>R??new vm,[R]),O=bm(T),L=pr(),{registerTrigger:I,isMountedByThisTrigger:B}=km(E,S,v,{payload:d,closeDelay:f,parent:w,floatingTreeRoot:T,floatingNodeId:O,floatingParentNodeId:L,keyboardEventRelay:C==null?void 0:C.relayKeyboardEvent}),A=v.useState("disabled"),D=i||A||w.type==="menubar"&&w.context.disabled,{getButtonProps:M,buttonRef:x}=Ls({disabled:D,native:a});g.useEffect(()=>{!b&&w.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,b,w.type]);const N=g.useRef(null),_=Cn(),k=W(K=>{if(!N.current)return;_.clear(),v.context.allowMouseUpTriggerRef.current=!1;const re=K.target;if(Re(N.current,re)||Re(v.select("positionerElement"),re)||re===N.current||re!=null&&$C(re)===v.select("rootId"))return;const de=MN(N.current);K.clientX>=de.left-su&&K.clientX<=de.right+su&&K.clientY>=de.top-su&&K.clientY<=de.bottom+su||T.events.emit("close",{domEvent:K,reason:mk})});g.useEffect(()=>{b&&v.select("lastOpenChangeReason")===yt&&Xt(N.current).addEventListener("mouseup",k,{once:!0})},[b,k,v]);const P=w.type==="menubar"&&w.context.hasSubmenuOpen,U=Cf(p,{enabled:(s??P??!1)&&!D&&w.type!=="context-menu"&&(w.type!=="menubar"||P&&!B),handleClose:xf({blockPointerEvents:w.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:w.type===void 0?u:void 0,delay:{close:f},triggerElementRef:S,externalTree:T,isActiveTrigger:y}),G=NN(b,v.select("lastOpenChangeReason")),ue=Tm(p,{enabled:!D&&w.type!=="context-menu",event:b&&w.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0?G:!1}),te=lC(p,{enabled:!D&&(w.type!=="menubar"&&b||P)}),ce=DN({open:b,enabled:w.type==="menubar",mouseDownAction:"open"}),oe=qa([ue,te]),J=w.type==="menubar",Se=g.useMemo(()=>({disabled:D,open:b}),[D,b]),Ae=v.useState("triggerProps",B),H=[N,n,x,I,S],Y=[oe.getReferenceProps(),U??wt,Ae,{"aria-haspopup":"menu",id:E,onMouseDown:K=>{if(v.select("open"))return;_.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Xt(K.currentTarget).addEventListener("mouseup",k,{once:!0})}},J?{role:"menuitem"}:{},ce,h,M],ne=g.useRef(null),De=W(K=>{zt.flushSync(()=>{v.setOpen(!1,xe(Vr,K.nativeEvent,K.currentTarget))});const re=TR(ne.current);re==null||re.focus()}),pe=W(K=>{var de;const re=v.select("positionerElement");if(re&&ci(K,re))(de=v.context.beforeContentFocusGuardRef.current)==null||de.focus();else{zt.flushSync(()=>{v.setOpen(!1,xe(Vr,K.nativeEvent,K.currentTarget))});let me=xR(S.current);for(;me!==null&&Re(re,me)||me!=null&&me.hasAttribute("aria-hidden");){const le=me;if(me=Sf(me),me===le)break}me==null||me.focus()}}),Q=Ue("button",t,{enabled:!J,stateAttributesMapping:Lp,state:Se,ref:H,props:Y});return J?ee.jsx(LN,{tag:"button",render:r,className:o,state:Se,refs:H,props:Y,stateAttributesMapping:Lp}):b?ee.jsxs(g.Fragment,{children:[ee.jsx(Xn,{ref:ne,onFocus:De},`${E}-pre-focus-guard`),ee.jsx(g.Fragment,{children:Q},E),ee.jsx(Xn,{ref:v.context.triggerFocusTargetRef,onFocus:pe},`${E}-post-focus-guard`)]}):ee.jsx(g.Fragment,{children:Q},E)});function NN(e,t){const n=Cn(),[r,o]=g.useState(!1);return ie(()=>{e&&t==="trigger-hover"?(o(!0),n.start(NR,()=>{o(!1)})):e||(n.clear(),o(!1))},[e,t,n]),r}function PN(){const e=Mf(!0),t=gr(!0),n=IC();return g.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const GU=g.forwardRef(function(t,n){const{className:r,render:o,orientation:i="horizontal",...a}=t,l=g.useMemo(()=>({orientation:i}),[i]);return Ue("div",t,{state:l,ref:n,props:[{role:"separator","aria-orientation":i},a]})}),jU=g.forwardRef(function(t,n){const{render:r,className:o,label:i,id:a,nativeButton:l=!1,openOnHover:s=!0,delay:u=100,closeDelay:f=0,disabled:c=!1,...d}=t,h=kf(),m=Of(),{store:v}=gr(),E=Mi(a),y=v.useState("open"),p=v.useState("floatingRootContext"),b=v.useState("floatingTreeRoot"),S=aC(E,v),w=g.useCallback(te=>{const ce=S(te);return te!==null&&v.select("open")&&v.select("activeTriggerId")==null&&v.update({activeTriggerId:E,activeTriggerElement:te,closeDelay:f}),ce},[S,f,v,E]),C=g.useRef(null),R=g.useCallback(te=>{C.current=te,v.set("activeTriggerElement",te)},[v]),T=UC();if(!(T!=null&&T.parentMenu))throw new Error(et(37));v.useSyncedValue("closeDelay",f);const O=T.parentMenu,L=O.useState("itemProps"),I=O.useState("isActive",h.index),B=g.useMemo(()=>({type:"submenu-trigger",setActive:()=>O.set("activeIndex",h.index)}),[O,h.index]),A=v.useState("disabled"),D=c||A,{getItemProps:M,itemRef:x}=Gm({closeOnClick:!1,disabled:D,highlighted:I,id:E,store:v,nativeButton:l,itemMetadata:B,nodeId:m==null?void 0:m.nodeId}),N=v.useState("hoverEnabled"),_=v.useState("allowMouseEnter"),k=Cf(p,{enabled:N&&s&&!D&&_,handleClose:xf({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:f},triggerElementRef:C,externalTree:b}),P=Tm(p,{enabled:!D,event:"mousedown",toggle:!s,ignoreMouse:s,stickIfOpen:!1}),q=qa([P]),U=v.useState("triggerProps",!0);delete U.id;const G=g.useMemo(()=>({disabled:D,highlighted:I,open:y}),[D,I,y]);return Ue("div",t,{state:G,stateAttributesMapping:Um,props:[q.getReferenceProps(),k,U,L,{tabIndex:y||I?0:-1,onBlur(){I&&O.set("activeIndex",null)}},d,M],ref:[n,h.ref,x,w,R]})}),IN="modulepreload",zN=function(e){return"/"+e},Mb={},V=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(s=>{if(s=zN(s),s in Mb)return;Mb[s]=!0;const u=s.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${f}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":IN,u||(c.as="script"),c.crossOrigin="",c.href=s,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((d,h)=>{c.addEventListener("load",d),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return o.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};var Dp=Object.defineProperty,BN=Object.getOwnPropertyDescriptor,UN=Object.getOwnPropertyNames,$N=Object.prototype.hasOwnProperty,HN=(e,t)=>{let n={};for(var r in e)Dp(n,r,{get:e[r],enumerable:!0});return Dp(n,Symbol.toStringTag,{value:"Module"}),n},GN=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=UN(t),i=0,a=o.length,l;i<a;i++)l=o[i],!$N.call(e,l)&&l!==n&&Dp(e,l,{get:(s=>t[s]).bind(null,l),enumerable:!(r=BN(t,l))||r.enumerable});return e},jN=(e,t,n)=>(GN(e,t,"default"),n),Ye=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function VN(e){return Vm(e)}function Vm(e){return Array.isArray(e)?FN(e):e instanceof RegExp?e:typeof e=="object"?qN(e):e}function FN(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Vm(e[n]);return t}function qN(e){let t={};for(let n in e)t[n]=Vm(e[n]);return t}function HC(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function GC(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?GC(e.substring(0,e.length-1)):e.substr(~t+1)}var th=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,uu=class{static hasCaptures(e){return e===null?!1:(th.lastIndex=0,th.test(e))}static replaceCaptures(e,t,n){return e.replace(th,(r,o,i,a)=>{let l=n[parseInt(o||i,10)];if(l){let s=t.substring(l.start,l.end);for(;s[0]===".";)s=s.substring(1);switch(a){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function jC(e,t){return e<t?-1:e>t?1:0}function VC(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 o=0;o<n;o++){let i=jC(e[o],t[o]);if(i!==0)return i}return 0}return n-r}function kb(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 FC(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var qC=class{constructor(e){z(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}},Lc=class{constructor(e,t,n){z(this,"_cachedMatchRoot",new qC(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(KN(e),t)}static createFromParsedTheme(e,t){return ZN(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(o=>YN(e.parent,o.parentScopes));return r?new YC(r.fontStyle,r.foreground,r.background):null}},nh=class Uu{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Uu(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Uu(n,t[r]);return n}push(t){return new Uu(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 YN(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!XN(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function XN(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var YC=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function KN(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let l;if(typeof a.scope=="string"){let c=a.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),l=c.split(",")}else Array.isArray(a.scope)?l=a.scope:l=[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let c=a.settings.fontStyle.split(" ");for(let d=0,h=c.length;d<h;d++)switch(c[d]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof a.settings.foreground=="string"&&kb(a.settings.foreground)&&(u=a.settings.foreground);let f=null;typeof a.settings.background=="string"&&kb(a.settings.background)&&(f=a.settings.background);for(let c=0,d=l.length;c<d;c++){let m=l[c].trim().split(" "),v=m[m.length-1],E=null;m.length>1&&(E=m.slice(0,m.length-1),E.reverse()),n[r++]=new QN(v,E,o,s,u,f)}}return n}var QN=class{constructor(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},Ht=(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))(Ht||{});function ZN(e,t){e.sort((s,u)=>{let f=jC(s.scope,u.scope);return f!==0||(f=VC(s.parentScopes,u.parentScopes),f!==0)?f:s.index-u.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(o=s.background)}let i=new WN(t),a=new YC(n,i.getId(r),i.getId(o)),l=new e2(new Np(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let f=e[s];l.insert(0,f.scope,f.parentScopes,f.fontStyle,i.getId(f.foreground),i.getId(f.background))}return new Lc(i,a,l)}var WN=class{constructor(e){z(this,"_isFrozen");z(this,"_lastColorId");z(this,"_id2color");z(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)}},JN=Object.freeze([]),Np=class XC{constructor(t,n,r,o,i){z(this,"scopeDepth");z(this,"parentScopes");z(this,"fontStyle");z(this,"foreground");z(this,"background");this.scopeDepth=t,this.parentScopes=n||JN,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new XC(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},e2=class Pp{constructor(t,n=[],r={}){z(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,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){const i=n.parentScopes[o].length-t.parentScopes[r].length;if(i!==0)return i;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,i;if(r===-1?(o=t,i=""):(o=t.substring(0,r),i=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Pp._cmpBySpecificity),n}insert(t,n,r,o,i,a){if(n===""){this._doInsertHere(t,r,o,i,a);return}let l=n.indexOf("."),s,u;l===-1?(s=n,u=""):(s=n.substring(0,l),u=n.substring(l+1));let f;this._children.hasOwnProperty(s)?f=this._children[s]:(f=new Pp(this._mainRule.clone(),Np.cloneArr(this._rulesWithParentScopes)),this._children[s]=f),f.insert(t+1,u,r,o,i,a)}_doInsertHere(t,n,r,o,i){if(n===null){this._mainRule.acceptOverwrite(t,r,o,i);return}for(let a=0,l=this._rulesWithParentScopes.length;a<l;a++){let s=this._rulesWithParentScopes[a];if(VC(s.parentScopes,n)===0){s.acceptOverwrite(t,r,o,i);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Np(t,n,r,o,i))}},ka=class _n{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=_n.getLanguageId(t),r=_n.getTokenType(t),o=_n.getFontStyle(t),i=_n.getForeground(t),a=_n.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,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,o,i,a,l){let s=_n.getLanguageId(t),u=_n.getTokenType(t),f=_n.containsBalancedBrackets(t)?1:0,c=_n.getFontStyle(t),d=_n.getForeground(t),h=_n.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),o!==null&&(f=o?1:0),i!==-1&&(c=i),a!==0&&(d=a),l!==0&&(h=l),(s<<0|u<<8|f<<10|c<<11|d<<15|h<<24)>>>0}};function Dc(e,t){const n=[],r=t2(e);let o=r.next();for(;o!==null;){let s=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let u=a();if(n.push({matcher:u,priority:s}),o!==",")break;o=r.next()}return n;function i(){if(o==="-"){o=r.next();const s=i();return u=>!!s&&!s(u)}if(o==="("){o=r.next();const s=l();return o===")"&&(o=r.next()),s}if(Lb(o)){const s=[];do s.push(o),o=r.next();while(Lb(o));return u=>t(s,u)}return null}function a(){const s=[];let u=i();for(;u;)s.push(u),u=i();return f=>s.every(c=>c(f))}function l(){const s=[];let u=a();for(;u&&(s.push(u),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");u=a()}return f=>s.some(c=>c(f))}}function Lb(e){return!!e&&!!e.match(/[\w\.:]+/)}function t2(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 KC(e){typeof e.dispose=="function"&&e.dispose()}var ts=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},n2=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},r2=class{constructor(){z(this,"_references",[]);z(this,"_seenReferenceKeys",new Set);z(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))}},o2=class{constructor(e,t){z(this,"seenFullScopeRequests",new Set);z(this,"seenPartialScopeRequests",new Set);z(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ts(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new r2;for(const n of e)i2(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof ts){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 i2(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof ts?$u({baseGrammar:i,selfGrammar:o},r):Ip(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const a=n.injections(e.scopeName);if(a)for(const l of a)r.add(new ts(l))}function Ip(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Nc([r],t,n)}}function $u(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Nc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Nc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Nc(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?HC({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Nc(r.patterns,{...t,repository:o},n);const i=r.include;if(!i)continue;const a=QC(i);switch(a.kind){case 0:$u({...t,selfGrammar:t.baseGrammar},n);break;case 1:$u(t,n);break;case 2:Ip(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const l=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const s={baseGrammar:t.baseGrammar,selfGrammar:l,repository:o};a.kind===4?Ip(a.ruleName,s,n):$u(s,n)}else a.kind===4?n.add(new n2(a.scopeName,a.ruleName)):n.add(new ts(a.scopeName));break}}}var a2=class{constructor(){z(this,"kind",0)}},l2=class{constructor(){z(this,"kind",1)}},s2=class{constructor(e){z(this,"kind",2);this.ruleName=e}},u2=class{constructor(e){z(this,"kind",3);this.scopeName=e}},c2=class{constructor(e,t){z(this,"kind",4);this.scopeName=e,this.ruleName=t}};function QC(e){if(e==="$base")return new a2;if(e==="$self")return new l2;const t=e.indexOf("#");if(t===-1)return new u2(e);if(t===0)return new s2(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new c2(n,r)}}var f2=/\\(\d+)/,Db=/\\(\d+)/g,d2=-1,ZC=-2;var Ds=class{constructor(e,t,n,r){z(this,"$location");z(this,"id");z(this,"_nameIsCapturing");z(this,"_name");z(this,"_contentNameIsCapturing");z(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=uu.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=uu.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${GC(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:uu.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:uu.replaceCaptures(this._contentName,e,t)}},h2=class extends Ds{constructor(t,n,r,o,i){super(t,n,r,o);z(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,o){throw new Error("Not supported!")}},p2=class extends Ds{constructor(t,n,r,o,i){super(t,n,r,null);z(this,"_match");z(this,"captures");z(this,"_cachedCompiledPatterns");this._match=new ns(o,this.id),this.captures=i,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,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rs,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Nb=class extends Ds{constructor(t,n,r,o,i){super(t,n,r,o);z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.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,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new rs,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zp=class extends Ds{constructor(t,n,r,o,i,a,l,s,u,f){super(t,n,r,o);z(this,"_begin");z(this,"beginCaptures");z(this,"_end");z(this,"endHasBackReferences");z(this,"endCaptures");z(this,"applyEndPatternLast");z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");this._begin=new ns(i,this.id),this.beginCaptures=a,this._end=new ns(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=u||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.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,o){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,o)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rs;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}},Pc=class extends Ds{constructor(t,n,r,o,i,a,l,s,u){super(t,n,r,o);z(this,"_begin");z(this,"beginCaptures");z(this,"whileCaptures");z(this,"_while");z(this,"whileHasBackReferences");z(this,"hasMissingPatterns");z(this,"patterns");z(this,"_cachedCompiledPatterns");z(this,"_cachedCompiledWhilePatterns");this._begin=new ns(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new ns(l,ZC),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.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,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new rs;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,o){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,o)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new rs,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},WC=class Bt{static createCaptureRule(t,n,r,o,i){return t.registerRule(a=>new h2(n,a,r,o,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new p2(t.$vscodeTextmateLocation,t.id,t.name,t.match,Bt._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=HC({},r,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new Nb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Bt._compilePatterns(i,n,r))}return t.while?new Pc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Bt._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Bt._compileCaptures(t.whileCaptures||t.captures,n,r),Bt._compilePatterns(t.patterns,n,r)):new zp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Bt._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Bt._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Bt._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);l>i&&(i=l)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);let s=0;t[a].patterns&&(s=Bt.getCompiledRuleId(t[a],n,r)),o[l]=Bt.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const l=t[i];let s=-1;if(l.include){const u=QC(l.include);switch(u.kind){case 0:case 1:s=Bt.getCompiledRuleId(r[l.include],n,r);break;case 2:let f=r[u.ruleName];f&&(s=Bt.getCompiledRuleId(f,n,r));break;case 3:case 4:const c=u.scopeName,d=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(c,r);if(h)if(d){let m=h.repository[d];m&&(s=Bt.getCompiledRuleId(m,n,h.repository))}else s=Bt.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else s=Bt.getCompiledRuleId(l,n,r);if(s!==-1){const u=n.getRule(s);let f=!1;if((u instanceof Nb||u instanceof zp||u instanceof Pc)&&u.hasMissingPatterns&&u.patterns.length===0&&(f=!0),f)continue;o.push(s)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},ns=class JC{constructor(t,n){z(this,"source");z(this,"ruleId");z(this,"hasAnchor");z(this,"hasBackReferences");z(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let o=0,i=[],a=!1;for(let l=0;l<r;l++)if(t.charAt(l)==="\\"&&l+1<r){const u=t.charAt(l+1);u==="z"?(i.push(t.substring(o,l)),i.push("$(?!\\n)(?<!\\n)"),o=l+2):(u==="A"||u==="G")&&(a=!0),l++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,r)),this.source=i.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=f2.test(this.source):this.hasBackReferences=!1}clone(){return new JC(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(o=>t.substring(o.start,o.end));return Db.lastIndex=0,this.source.replace(Db,(o,i)=>FC(r[parseInt(i,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=[],o=[],i,a,l,s;for(i=0,a=this.source.length;i<a;i++)l=this.source.charAt(i),t[i]=l,n[i]=l,r[i]=l,o[i]=l,l==="\\"&&i+1<a&&(s=this.source.charAt(i+1),s==="A"?(t[i+1]="",n[i+1]="",r[i+1]="A",o[i+1]="A"):s==="G"?(t[i+1]="",n[i+1]="G",r[i+1]="",o[i+1]="G"):(t[i+1]=s,n[i+1]=s,r[i+1]=s,o[i+1]=s),i++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.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}},rs=class{constructor(){z(this,"_items");z(this,"_hasAnchors");z(this,"_cached");z(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 Pb(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(o=>o.resolveAnchors(t,n));return new Pb(e,r,this._items.map(o=>o.ruleId))}},Pb=class{constructor(e,t,n){z(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(`
|
|
92
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},rh=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ar,g2=(Ar=class{constructor(t,n){z(this,"_defaultAttributes");z(this,"_embeddedLanguagesMatcher");z(this,"_getBasicScopeAttributes",new qC(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new rh(n,r)}));this._defaultAttributes=new rh(t,8),this._embeddedLanguagesMatcher=new m2(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ar._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ar.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!")}},z(Ar,"_NULL_SCOPE_METADATA",new rh(0,0)),z(Ar,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ar),m2=class{constructor(e){z(this,"values");z(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>FC(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])}},Ib=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function e_(e,t,n,r,o,i,a,l){const s=t.content.length;let u=!1,f=-1;if(a){const h=y2(e,t,n,r,o,i);o=h.stack,r=h.linePos,n=h.isFirstLine,f=h.anchorPosition}const c=Date.now();for(;!u;){if(l!==0&&Date.now()-c>l)return new Ib(o,!0);d()}return new Ib(o,!1);function d(){const h=v2(e,t,n,r,o,f);if(!h){i.produce(o,s),u=!0;return}const m=h.captureIndices,v=h.matchedRuleId,E=m&&m.length>0?m[0].end>r:!1;if(v===d2){const y=o.getRule(e);i.produce(o,m[0].start),o=o.withContentNameScopesList(o.nameScopesList),yl(e,t,n,o,i,y.endCaptures,m),i.produce(o,m[0].end);const p=o;if(o=o.parent,f=p.getAnchorPos(),!E&&p.getEnterPos()===r){o=p,i.produce(o,s),u=!0;return}}else{const y=e.getRule(v);i.produce(o,m[0].start);const p=o,b=y.getName(t.content,m),S=o.contentNameScopesList.pushAttributed(b,e);if(o=o.push(v,r,f,m[0].end===s,null,S,S),y instanceof zp){const w=y;yl(e,t,n,o,i,w.beginCaptures,m),i.produce(o,m[0].end),f=m[0].end;const C=w.getContentName(t.content,m),R=S.pushAttributed(C,e);if(o=o.withContentNameScopesList(R),w.endHasBackReferences&&(o=o.withEndRule(w.getEndWithResolvedBackReferences(t.content,m))),!E&&p.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(y instanceof Pc){const w=y;yl(e,t,n,o,i,w.beginCaptures,m),i.produce(o,m[0].end),f=m[0].end;const C=w.getContentName(t.content,m),R=S.pushAttributed(C,e);if(o=o.withContentNameScopesList(R),w.whileHasBackReferences&&(o=o.withEndRule(w.getWhileWithResolvedBackReferences(t.content,m))),!E&&p.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(yl(e,t,n,o,i,y.captures,m),i.produce(o,m[0].end),o=o.pop(),!E){o=o.safePop(),i.produce(o,s),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function y2(e,t,n,r,o,i){let a=o.beginRuleCapturedEOL?0:-1;const l=[];for(let s=o;s;s=s.pop()){const u=s.getRule(e);u instanceof Pc&&l.push({rule:u,stack:s})}for(let s=l.pop();s;s=l.pop()){const{ruleScanner:u,findOptions:f}=E2(s.rule,e,s.stack.endRule,n,r===a),c=u.findNextMatchSync(t,r,f);if(c){if(c.ruleId!==ZC){o=s.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(i.produce(s.stack,c.captureIndices[0].start),yl(e,t,n,s.stack,i,s.rule.whileCaptures,c.captureIndices),i.produce(s.stack,c.captureIndices[0].end),a=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{o=s.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:a,isFirstLine:n}}function v2(e,t,n,r,o,i){const a=b2(e,t,n,r,o,i),l=e.getInjections();if(l.length===0)return a;const s=S2(l,e,t,n,r,o,i);if(!s)return a;if(!a)return s;const u=a.captureIndices[0].start,f=s.captureIndices[0].start;return f<u||s.priorityMatch&&f===u?s:a}function b2(e,t,n,r,o,i){const a=o.getRule(e),{ruleScanner:l,findOptions:s}=t_(a,e,o.endRule,n,r===i),u=l.findNextMatchSync(t,r,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function S2(e,t,n,r,o,i,a){let l=Number.MAX_VALUE,s=null,u,f=0;const c=i.contentNameScopesList.getScopeNames();for(let d=0,h=e.length;d<h;d++){const m=e[d];if(!m.matcher(c))continue;const v=t.getRule(m.ruleId),{ruleScanner:E,findOptions:y}=t_(v,t,null,r,o===a),p=E.findNextMatchSync(n,o,y);if(!p)continue;const b=p.captureIndices[0].start;if(!(b>=l)&&(l=b,s=p.captureIndices,u=p.ruleId,f=m.priority,l===o))break}return s?{priorityMatch:f===-1,captureIndices:s,matchedRuleId:u}:null}function t_(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function E2(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function yl(e,t,n,r,o,i,a){if(i.length===0)return;const l=t.content,s=Math.min(i.length,a.length),u=[],f=a[0].end;for(let c=0;c<s;c++){const d=i[c];if(d===null)continue;const h=a[c];if(h.length===0)continue;if(h.start>f)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),d.retokenizeCapturedWithRuleId){const v=d.getName(l,a),E=r.contentNameScopesList.pushAttributed(v,e),y=d.getContentName(l,a),p=E.pushAttributed(y,e),b=r.push(d.retokenizeCapturedWithRuleId,h.start,-1,!1,null,E,p),S=e.createOnigString(l.substring(0,h.end));e_(e,S,n&&h.start===0,h.start,b,o,!1,0),KC(S);continue}const m=d.getName(l,a);if(m!==null){const E=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new w2(E,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var w2=class{constructor(e,t){z(this,"scopes");z(this,"endPos");this.scopes=e,this.endPos=t}};function R2(e,t,n,r,o,i,a,l){return new _2(e,t,n,r,o,i,a,l)}function zb(e,t,n,r,o){const i=Dc(t,Ic),a=WC.getCompiledRuleId(n,r,o.repository);for(const l of i)e.push({debugSelector:t,matcher:l.matcher,ruleId:a,grammar:o,priority:l.priority})}function Ic(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(C2(t[o],r))return n=o+1,!0;return!1})}function C2(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 _2=class{constructor(e,t,n,r,o,i,a,l){z(this,"_rootId");z(this,"_lastRuleId");z(this,"_ruleId2desc");z(this,"_includedGrammars");z(this,"_grammarRepository");z(this,"_grammar");z(this,"_injections");z(this,"_basicScopeAttributesProvider");z(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new g2(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=Bb(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const s of Object.keys(o)){const u=Dc(s,Ic);for(const f of u)this._tokenTypeMatchers.push({matcher:f.matcher,type:o[s]})}}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:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const o=r.injections;if(o)for(let a in o)zb(t,a,o[a],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(a=>{const l=this.getExternalGrammar(a);if(l){const s=l.injectionSelector;s&&zb(t,s,l,this,l)}})}return t.sort((o,i)=>o.priority-i.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]=Bb(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=WC.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Bp.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),f=this.themeProvider.getDefaults(),c=ka.set(0,u.languageId,u.tokenType,null,f.fontStyle,f.foregroundId,f.backgroundId),d=this.getRule(this._rootId).getName(null,null);let h;d?h=Il.createRootAndLookUpScopeName(d,c,this):h=Il.createRoot("unknown",c),t=new Bp(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+`
|
|
93
|
+
`;const i=this.createOnigString(e),a=i.content.length,l=new T2(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=e_(this,i,o,0,t,l,!0,r);return KC(i),{lineLength:a,lineTokens:l,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function Bb(e,t){return e=VN(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 Il=class Jn{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=(t==null?void 0:t.scopePath)??null;for(const i of n)o=nh.push(o,i.scopeNames),r=new Jn(r,o,i.encodedTokenAttributes);return r}static createRoot(t,n){return new Jn(null,new nh(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),i=new nh(null,t),a=r.themeProvider.themeMatch(i),l=Jn.mergeAttributes(n,o,a);return new Jn(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Jn.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 o=-1,i=0,a=0;return r!==null&&(o=r.fontStyle,i=r.foregroundId,a=r.backgroundId),ka.set(t,n.languageId,n.tokenType,null,o,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Jn._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const i of r)o=Jn._pushAttributed(o,i,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),l=Jn.mergeAttributes(t.tokenAttributes,o,a);return new Jn(t,i,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var o;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((o=r.parent)==null?void 0:o.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},Mn,Bp=(Mn=class{constructor(t,n,r,o,i,a,l,s){z(this,"_stackElementBrand");z(this,"_enterPos");z(this,"_anchorPos");z(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=l,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}equals(t){return t===null?!1:Mn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Il.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(){Mn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,i,a,l){return new Mn(this,t,n,r,o,i,a,l)}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,o;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(o=this.contentNameScopesList)==null?void 0:o.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 Mn(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=Il.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Mn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Il.fromExtension(r,n.contentNameScopesList))}},z(Mn,"NULL",new Mn(null,0,0,0,!1,null,null,null)),Mn),x2=class{constructor(e,t){z(this,"balancedBracketScopes");z(this,"unbalancedBracketScopes");z(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Dc(n,Ic).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Dc(n,Ic).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}},T2=class{constructor(e,t,n,r){z(this,"_emitBinaryTokens");z(this,"_lineText");z(this,"_tokens");z(this,"_binaryTokens");z(this,"_lastTokenEndIndex");z(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 o=(e==null?void 0:e.tokenAttributes)??0,i=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(a)&&(o=ka.set(o,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(a))}if(i&&(o=ka.set(o,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===o){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(o),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,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},A2=class{constructor(e,t){z(this,"_grammars",new Map);z(this,"_rawGrammars",new Map);z(this,"_injectionGrammars",new Map);z(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,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,R2(e,i,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},O2=class{constructor(t){z(this,"_options");z(this,"_syncRegistry");z(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new A2(Lc.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Lc.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 x2(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,o,i){const a=new o2(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(l=>this._loadSingleGrammar(l.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,o,i)}_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,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,o)}_grammarForScopeName(t,n=0,r=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(t,n,r,o,i)}},Up=Bp.NULL;function zc(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,i]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof i=="string"?n[o]=i:o===r&&Object.assign(n,i);return n}function Ao(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function M2(e){return Array.isArray(e)?e:[e]}async function n_(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Lf(e){return!e||["plaintext","txt","text","plain"].includes(e)}function r_(e){return e==="ansi"||Lf(e)}function Df(e){return e==="none"}function o_(e){return Df(e)}function Nf(e,t=!1){var i;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let a=0;a<n.length;a+=2){const l=t?n[a]+(n[a+1]||""):n[a];o.push([l,r]),r+=n[a].length,r+=((i=n[a+1])==null?void 0:i.length)||0}return o}const Ub={light:"#333333",dark:"#bbbbbb"},$b={light:"#fffffe",dark:"#1e1e1e"},Hb="__shiki_resolved";function Pf(e){var l,s,u,f,c;if(e!=null&&e[Hb])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 d=t.settings?t.settings.find(h=>!h.name&&!h.scope):void 0;(l=d==null?void 0:d.settings)!=null&&l.foreground&&(r=d.settings.foreground),(s=d==null?void 0:d.settings)!=null&&s.background&&(n=d.settings.background),!r&&((u=t==null?void 0:t.colors)!=null&&u["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((f=t==null?void 0:t.colors)!=null&&f["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Ub.light:Ub.dark),n||(n=t.type==="light"?$b.light:$b.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 o=0;const i=new Map;function a(d){var m;if(i.has(d))return i.get(d);o+=1;const h=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return(m=t.colorReplacements)!=null&&m[`#${h}`]?a(d):(i.set(d,h),h)}t.settings=t.settings.map(d=>{var E,y;const h=((E=d.settings)==null?void 0:E.foreground)&&!d.settings.foreground.startsWith("#"),m=((y=d.settings)==null?void 0:y.background)&&!d.settings.background.startsWith("#");if(!h&&!m)return d;const v={...d,settings:{...d.settings}};if(h){const p=a(d.settings.foreground);t.colorReplacements[p]=d.settings.foreground,v.settings.foreground=p}if(m){const p=a(d.settings.background);t.colorReplacements[p]=d.settings.background,v.settings.background=p}return v});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((c=t.colors[d])!=null&&c.startsWith("#"))){const h=a(t.colors[d]);t.colorReplacements[h]=t.colors[d],t.colors[d]=h}return Object.defineProperty(t,Hb,{enumerable:!1,writable:!1,value:!0}),t}async function i_(e){return Array.from(new Set((await Promise.all(e.filter(t=>!r_(t)).map(async t=>await n_(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function a_(e){return(await Promise.all(e.map(async t=>o_(t)?null:Pf(await n_(t))))).filter(t=>!!t)}function l_(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 Ye(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}var k2=class extends O2{constructor(t,n,r,o={}){super(t);z(this,"_resolvedThemes",new Map);z(this,"_resolvedGrammars",new Map);z(this,"_langMap",new Map);z(this,"_langGraph",new Map);z(this,"_textmateThemeCache",new WeakMap);z(this,"_loadedThemesCache",null);z(this,"_loadedLanguagesCache",null);this._resolver=t,this._themes=n,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Pf(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Lc.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=l_(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){var i,a,l,s;if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(u=>{var f;return(f=u.embeddedLangsLazy)==null?void 0:f.includes(t.name)}));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(u=>{this._alias[u]=t.name}),this._loadedLanguagesCache=null,n.size)for(const u of n)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(a=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||a.delete(u.scopeName),(s=(l=this._syncRegistry)==null?void 0:l._grammars)==null||s.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,i])=>!i);if(r.length){const o=n.filter(([i,a])=>{var l;return a?(l=a.embeddedLanguages||a.embeddedLangs)==null?void 0:l.some(s=>r.map(([u])=>u).includes(s)):!1}).filter(i=>!r.includes(i));throw new Ye(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of n)this._resolver.addLanguage(i);for(const[o,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},L2=class{constructor(e,t){z(this,"_langs",new Map);z(this,"_scopeToLang",new Map);z(this,"_injections",new Map);z(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const o=t.slice(0,r).join(".");n=[...n,...this._injections.get(o)||[]]}return n}};let ul=0;function D2(e){ul+=1,e.warnings!==!1&&ul>=10&&ul%10===0&&console.warn(`[Shiki] ${ul} 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 Ye("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Pf),o=new k2(new L2(e.engine,n),r,n,e.langAlias);let i;function a(p){return l_(p,e.langAlias)}function l(p){E();const b=o.getGrammar(typeof p=="string"?p:p.name);if(!b)throw new Ye(`Language \`${p}\` not found, you may need to load it first`);return b}function s(p){if(p==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};E();const b=o.getTheme(p);if(!b)throw new Ye(`Theme \`${p}\` not found, you may need to load it first`);return b}function u(p){E();const b=s(p);return i!==p&&(o.setTheme(b),i=p),{theme:b,colorMap:o.getColorMap()}}function f(){return E(),o.getLoadedThemes()}function c(){return E(),o.getLoadedLanguages()}function d(...p){E(),o.loadLanguages(p.flat(1))}async function h(...p){return d(await i_(p))}function m(...p){E();for(const b of p.flat(1))o.loadTheme(b)}async function v(...p){return E(),m(await a_(p))}function E(){if(t)throw new Ye("Shiki instance has been disposed")}function y(){t||(t=!0,o.dispose(),ul-=1)}return{setTheme:u,getTheme:s,getLanguage:l,getLoadedThemes:f,getLoadedLanguages:c,resolveLangAlias:a,loadLanguage:h,loadLanguageSync:d,loadTheme:v,loadThemeSync:m,dispose:y,[Symbol.dispose]:y}}async function N2(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([a_(e.themes||[]),i_(e.langs||[]),e.engine]);return D2({...e,themes:t,langs:n,engine:r})}const s_=new WeakMap;function If(e,t){s_.set(e,t)}function os(e){return s_.get(e)}var zf=class u_{constructor(...t){z(this,"_stacks",{});z(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,o]=t;this.lang=r,this._stacks={[o]: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 u_(Object.fromEntries(M2(n).map(r=>[r,Up])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return P2(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function P2(e){const t=[],n=new Set;function r(o){var a;if(n.has(o))return;n.add(o);const i=(a=o==null?void 0:o.nameScopesList)==null?void 0:a.scopeName;i&&t.push(i),o.parent&&r(o.parent)}return r(e),t}function I2(e,t){if(!(e instanceof zf))throw new Ye("Invalid grammar state");return e.getInternalStack(t)}function c_(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Lf(e.resolveLangAlias(n.lang||"text"))||Df(r))return Nf(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:o,colorMap:i}=e.setTheme(r),a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Ye(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Ye(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return B2(t,a,o,i,n)}function z2(...e){if(e.length===2)return os(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=r;if(Lf(o)||Df(i))throw new Ye("Plain language does not have grammar state");if(o==="ansi")throw new Ye("ANSI language does not have grammar state");const{theme:a,colorMap:l}=t.setTheme(i),s=t.getLanguage(o);return new zf(Fm(n,s,a,l,r).stateStack,s.name,a.name)}function B2(e,t,n,r,o){const i=Fm(e,t,n,r,o),a=new zf(i.stateStack,t.name,n.name);return If(i.tokens,a),i.tokens}function Fm(e,t,n,r,o){const i=zc(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:l=500}=o,s=Nf(e);let u=o.grammarState?I2(o.grammarState,n.name)??Up:o.grammarContextCode!=null?Fm(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Up,f=[];const c=[];for(let d=0,h=s.length;d<h;d++){const[m,v]=s[d];if(m===""){f=[],c.push([]);continue}if(a>0&&m.length>=a){f=[],c.push([{content:m,offset:v,color:"",fontStyle:0}]);continue}let E,y,p;o.includeExplanation&&(E=t.tokenizeLine(m,u,l),y=E.tokens,p=0);const b=t.tokenizeLine2(m,u,l),S=b.tokens.length/2;for(let w=0;w<S;w++){const C=b.tokens[2*w],R=w+1<S?b.tokens[2*w+2]:m.length;if(C===R)continue;const T=b.tokens[2*w+1],O=Ao(r[ka.getForeground(T)],i),L=ka.getFontStyle(T),I={content:m.substring(C,R),offset:v+C,color:O,fontStyle:L};if(o.includeExplanation){const B=[];if(o.includeExplanation!=="scopeName")for(const D of n.settings){let M;switch(typeof D.scope){case"string":M=D.scope.split(/,/).map(x=>x.trim());break;case"object":M=D.scope;break;default:continue}B.push({settings:D,selectors:M.map(x=>x.split(/ /))})}I.explanation=[];let A=0;for(;C+A<R;){const D=y[p],M=m.substring(D.startIndex,D.endIndex);A+=M.length,I.explanation.push({content:M,scopes:o.includeExplanation==="scopeName"?U2(D.scopes):$2(B,D.scopes)}),p+=1}}f.push(I)}c.push(f),f=[],u=b.ruleStack}return{tokens:c,stateStack:u}}function U2(e){return e.map(t=>({scopeName:t}))}function $2(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];n[r]={scopeName:i,themeMatches:G2(e,i,t.slice(0,r))}}return n}function Gb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function H2(e,t,n){if(!Gb(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)Gb(e[r],n[o])&&(r-=1),o-=1;return r===-1}function G2(e,t,n){const r=[];for(const{selectors:o,settings:i}of e)for(const a of o)if(H2(a,t,n)){r.push(i);break}return r}function f_(e,t,n,r=c_){const o=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=o.map(u=>{const f=r(e,t,{...n,theme:u.theme});return{tokens:f,state:os(f),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),a=j2(...i.map(u=>u.tokens)),l=a[0].map((u,f)=>u.map((c,d)=>{const h={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=c.explanation),a.forEach((m,v)=>{const{content:E,explanation:y,offset:p,...b}=m[f][d];h.variants[o[v].color]=b}),h})),s=i[0].state?new zf(Object.fromEntries(i.map(u=>{var f;return[u.theme,(f=u.state)==null?void 0:f.getInternalStack(u.theme)]})),i[0].state.lang):void 0;return s&&If(l,s),l}function j2(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(s=>s[r]),i=t.map(()=>[]);t.forEach((s,u)=>s.push(i[u]));const a=o.map(()=>0),l=o.map(s=>s[0]);for(;l.every(s=>s);){const s=Math.min(...l.map(u=>u.content.length));for(let u=0;u<n;u++){const f=l[u];f.content.length===s?(i[u].push(f),a[u]+=1,l[u]=o[u][a[u]]):(i[u].push({...f,content:f.content.slice(0,s)}),l[u]={...f,content:f.content.slice(s),offset:f.offset+s})}}}return t}const V2=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ns{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ns.prototype.normal={};Ns.prototype.property={};Ns.prototype.space=void 0;function d_(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ns(n,r,t)}function $p(e){return e.toLowerCase()}class un{constructor(t,n){this.attribute=n,this.property=t}}un.prototype.attribute="";un.prototype.booleanish=!1;un.prototype.boolean=!1;un.prototype.commaOrSpaceSeparated=!1;un.prototype.commaSeparated=!1;un.prototype.defined=!1;un.prototype.mustUseProperty=!1;un.prototype.number=!1;un.prototype.overloadedBoolean=!1;un.prototype.property="";un.prototype.spaceSeparated=!1;un.prototype.space=void 0;let F2=0;const _e=ki(),ht=ki(),Hp=ki(),F=ki(),qe=ki(),ca=ki(),fn=ki();function ki(){return 2**++F2}const Gp=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:ht,commaOrSpaceSeparated:fn,commaSeparated:ca,number:F,overloadedBoolean:Hp,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),oh=Object.keys(Gp);class qm extends un{constructor(t,n,r,o){let i=-1;if(super(t,n),jb(this,"space",o),typeof r=="number")for(;++i<oh.length;){const a=oh[i];jb(this,oh[i],(r&Gp[a])===Gp[a])}}}qm.prototype.defined=!0;function jb(e,t,n){n&&(e[t]=n)}function Xa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new qm(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[$p(r)]=r,n[$p(i.attribute)]=r}return new Ns(t,n,e.space)}const h_=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:qe,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:F,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:qe,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:ht,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function p_(e,t){return t in e?e[t]:t}function g_(e,t){return p_(e,t.toLowerCase())}const q2=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ca,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:qe,autoFocus:_e,autoPlay:_e,blocking:qe,capture:null,charSet:null,checked:_e,cite:null,className:qe,cols:F,colSpan:null,content:null,contentEditable:ht,controls:_e,controlsList:qe,coords:F|ca,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:Hp,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:qe,height:F,hidden:Hp,high:F,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:qe,itemRef:qe,itemScope:_e,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,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:_e,optimum:F,pattern:null,ping:qe,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:qe,required:_e,reversed:_e,rows:F,rowSpan:F,sandbox:qe,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:ht,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:g_}),Y2=Xa({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:fn,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:qe,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:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,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:ca,g2:ca,glyphName:ca,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,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:F,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:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fn,rev:fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fn,requiredFeatures:fn,requiredFonts:fn,requiredFormats:fn,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:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fn,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:p_}),m_=Xa({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()}}),y_=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:g_}),v_=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qU={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"},X2=/[A-Z]/g,Vb=/-[a-z]/g,K2=/^data[-\w.:]+$/i;function Q2(e,t){const n=$p(t);let r=t,o=un;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&K2.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Vb,W2);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Vb.test(i)){let a=i.replace(X2,Z2);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=qm}return new o(r,t)}function Z2(e){return"-"+e.toLowerCase()}function W2(e){return e.charAt(1).toUpperCase()}const J2=d_([h_,q2,m_,y_,v_],"html"),b_=d_([h_,Y2,m_,y_,v_],"svg"),Fb={}.hasOwnProperty;function eP(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const l=r.handlers;if(o&&Fb.call(o,e)){const s=String(o[e]);a=Fb.call(l,s)?l[s]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const tP=/["&'<>`]/g,nP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rP=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,oP=/[|\\{}()[\]^$+*?.]/g,qb=new WeakMap;function iP(e,t){if(e=e.replace(t.subset?aP(t.subset):tP,r),t.subset||t.escapeOnly)return e;return e.replace(nP,n).replace(rP,r);function n(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function r(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function aP(e){let t=qb.get(e);return t||(t=lP(e),qb.set(e,t)),t}function lP(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(oP,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const sP=/[\dA-Fa-f]/;function uP(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!sP.test(String.fromCharCode(t))?r:r+";"}const cP=/\d/;function fP(e,t,n){const r="&#"+String(e);return n&&t&&!cP.test(String.fromCharCode(t))?r:r+";"}const dP=["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"],ih={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:"€"},hP=["cent","copy","divide","gt","lt","not","para","times"],S_={}.hasOwnProperty,jp={};let cu;for(cu in ih)S_.call(ih,cu)&&(jp[ih[cu]]=cu);const pP=/[^\dA-Za-z]/;function gP(e,t,n,r){const o=String.fromCharCode(e);if(S_.call(jp,o)){const i=jp[o],a="&"+i;return n&&dP.includes(i)&&!hP.includes(i)&&(!r||t&&t!==61&&pP.test(String.fromCharCode(t)))?a:a+";"}return""}function mP(e,t,n){let r=uP(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=gP(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const i=fP(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function fa(e,t){return iP(e,Object.assign({format:mP},t))}const yP=/^>|^->|<!--|-->|--!>|<!-$/g,vP=[">"],bP=["<",">"];function SP(e,t,n,r){return r.settings.bogusComments?"<?"+fa(e.value,Object.assign({},r.settings.characterReferences,{subset:vP}))+">":"<!--"+e.value.replace(yP,o)+"-->";function o(i){return fa(i,Object.assign({},r.settings.characterReferences,{subset:bP}))}}function EP(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Yb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function wP(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function RP(e){return e.join(" ").trim()}const CP=/[ \t\n\f\r]/g;function Ym(e){return typeof e=="object"?e.type==="text"?Xb(e.value):!1:Xb(e)}function Xb(e){return e.replace(CP,"")===""}const Ct=w_(1),E_=w_(-1),_P=[];function w_(e){return t;function t(n,r,o){const i=n?n.children:_P;let a=(r||0)+e,l=i[a];if(!o)for(;l&&Ym(l);)a+=e,l=i[a];return l}}const xP={}.hasOwnProperty;function R_(e){return t;function t(n,r,o){return xP.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const Xm=R_({body:AP,caption:ah,colgroup:ah,dd:LP,dt:kP,head:ah,html:TP,li:MP,optgroup:DP,option:NP,p:OP,rp:Kb,rt:Kb,tbody:IP,td:Qb,tfoot:zP,th:Qb,thead:PP,tr:BP});function ah(e,t,n){const r=Ct(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ym(r.value.charAt(0)))}function TP(e,t,n){const r=Ct(n,t);return!r||r.type!=="comment"}function AP(e,t,n){const r=Ct(n,t);return!r||r.type!=="comment"}function OP(e,t,n){const r=Ct(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 MP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&r.tagName==="li"}function kP(e,t,n){const r=Ct(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function LP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Kb(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function DP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function NP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function PP(e,t,n){const r=Ct(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function IP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function zP(e,t,n){return!Ct(n,t)}function BP(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Qb(e,t,n){const r=Ct(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const UP=R_({body:GP,colgroup:jP,head:HP,html:$P,tbody:VP});function $P(e){const t=Ct(e,-1);return!t||t.type!=="comment"}function HP(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 GP(e){const t=Ct(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ym(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function jP(e,t,n){const r=E_(n,t),o=Ct(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Xm(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function VP(e,t,n){const r=E_(n,t),o=Ct(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Xm(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const fu={name:[[`
|
|
94
|
+
\f\r &/=>`.split(""),`
|
|
95
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
96
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
97
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
98
|
+
\f\r &>`.split(""),`\0
|
|
99
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
100
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
101
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function FP(e,t,n,r){const o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags;let a=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const l=[];let s;o.space==="html"&&e.tagName==="svg"&&(r.schema=b_);const u=qP(r,e.properties),f=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,f&&(a=!1),(u||!i||!UP(e,t,n))&&(l.push("<",e.tagName,u?" "+u:""),a&&(o.space==="svg"||r.settings.closeSelfClosing)&&(s=u.charAt(u.length-1),(!r.settings.tightSelfClosing||s==="/"||s&&s!=='"'&&s!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(f),!a&&(!i||!Xm(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function qP(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const i=YP(e,o,t[o]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function YP(e,t,n){const r=Q2(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,l;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 s=fa(r.attribute,Object.assign({},e.settings.characterReferences,{subset:fu.name[o][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?wP:RP)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?s:(e.settings.preferUnquoted&&(l=fa(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:fu.unquoted[o][i]}))),l!==n&&(e.settings.quoteSmart&&Yb(n,a)>Yb(n,e.alternative)&&(a=e.alternative),l=a+fa(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?fu.single:fu.double)[o][i],attribute:!0}))+a),s+(l&&"="+l))}const XP=["<","&"];function C_(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:fa(e.value,Object.assign({},r.settings.characterReferences,{subset:XP}))}function KP(e,t,n,r){return r.settings.allowDangerousHtml?e.value:C_(e,t,n,r)}function QP(e,t,n,r){return r.all(e)}const ZP=eP("type",{invalid:WP,unknown:JP,handlers:{comment:SP,doctype:EP,element:FP,raw:KP,root:QP,text:C_}});function WP(e){throw new Error("Expected node, not `"+e+"`")}function JP(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const eI={},tI={},nI=[];function rI(e,t){const n=t||eI,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:oI,all:iI,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||V2,characterReferences:n.characterReferences||tI,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?b_:J2,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function oI(e,t,n){return ZP(e,t,n,this)}function iI(e){const t=[],n=e&&e.children||nI;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function __(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 o of n)o&&!e.properties.class.includes(o)&&e.properties.class.push(o);return e}function aI(e){const t=Nf(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=o,a=0;for(const l of t){if(i<l.length)break;i-=l.length,a++}return{line:a,character:i}}function r(o,i){let a=0;for(let l=0;l<o;l++)a+=t[l].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}const Km="light-dark()",lI=["color","background-color"];function sI(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function uI(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{const i=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,l)=>a-l);return i.length?sI(o,i):o})):e}function cI(e,t,n,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(f=>is(e.variants[f])),l=new Set(a.flatMap(f=>Object.keys(f))),s={},u=(f,c)=>{const d=c==="color"?"":c==="background-color"?"-bg":`-${c}`;return n+t[f]+(c==="color"?"":d)};return a.forEach((f,c)=>{for(const d of l){const h=f[d]||"inherit";if(c===0&&r&&lI.includes(d))if(r===Km&&a.length>1){const m=t.findIndex(E=>E==="light"),v=t.findIndex(E=>E==="dark");if(m===-1||v===-1)throw new Ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');s[d]=`light-dark(${a[m][d]||"inherit"}, ${a[v][d]||"inherit"})`,o==="css-vars"&&(s[u(c,d)]=h)}else s[d]=h;else o==="css-vars"&&(s[u(c,d)]=h)}}),i.htmlStyle=s,i}function is(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ht.Italic&&(t["font-style"]="italic"),e.fontStyle&Ht.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ht.Underline&&n.push("underline"),e.fontStyle&Ht.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Bc(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function fI(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Ye(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...r.indexToPos(a),offset:a}}else{const l=r.lines[a.line];if(l===void 0)throw new Ye(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${r.lines.length}`);let s=a.character;if(s<0&&(s=l.length+s),s<0||s>l.length)throw new Ye(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${l.length}`);return{...a,character:s,offset:r.posToIndex(a.line,s)}}};const r=aI(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:o(a.start),end:o(a.end)}));dI(i),e.set(n.meta,{decorations:i,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var r;if((r=this.options.decorations)!=null&&r.length)return uI(n,t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]))},code(n){var f;if(!((f=this.options.decorations)!=null&&f.length))return;const r=t(this),o=Array.from(n.children).filter(c=>c.type==="element"&&c.tagName==="span");if(o.length!==r.converter.lines.length)throw new Ye(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(c,d,h,m){const v=o[c];let E="",y=-1,p=-1;if(d===0&&(y=0),h===0&&(p=0),h===Number.POSITIVE_INFINITY&&(p=v.children.length),y===-1||p===-1)for(let S=0;S<v.children.length;S++)E+=x_(v.children[S]),y===-1&&E.length===d&&(y=S+1),p===-1&&E.length===h&&(p=S+1);if(y===-1)throw new Ye(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(p===-1)throw new Ye(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const b=v.children.slice(y,p);if(!m.alwaysWrap&&b.length===v.children.length)l(v,m,"line");else if(!m.alwaysWrap&&b.length===1&&b[0].type==="element")l(b[0],m,"token");else{const S={type:"element",tagName:"span",properties:{},children:b};l(S,m,"wrapper"),v.children.splice(y,b.length,S)}}function a(c,d){o[c]=l(o[c],d,"line")}function l(c,d,h){var E;const m=d.properties||{},v=d.transform||(y=>y);return c.tagName=d.tagName||"span",c.properties={...c.properties,...m,class:c.properties.class},(E=d.properties)!=null&&E.class&&__(c,d.properties.class),c=v(c,h)||c,c}const s=[],u=r.decorations.sort((c,d)=>d.start.offset-c.start.offset||c.end.offset-d.end.offset);for(const c of u){const{start:d,end:h}=c;if(d.line===h.line)i(d.line,d.character,h.character,c);else if(d.line<h.line){i(d.line,d.character,Number.POSITIVE_INFINITY,c);for(let m=d.line+1;m<h.line;m++)s.unshift(()=>a(m,c));i(h.line,0,h.character,c)}}s.forEach(c=>c())}}}function dI(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ye(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],i=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,l=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,s=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(i||a||l||s){if(i&&a||l&&s||l&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new Ye(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function x_(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(x_).join(""):""}const hI=[fI()];function Uc(e){const t=pI(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...hI]}function pI(e){const t=[],n=[],r=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:t,post:n,normal:r}}var ei=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],lh={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function gI(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 Zb(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 mI(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)lh[r]&&t.push({type:"setDecoration",value:lh[r]});else if(r<=29){const o=lh[r-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ei[r-30]}});else if(r===38){const o=Zb(e);o&&t.push({type:"setForegroundColor",value:o})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ei[r-40]}});else if(r===48){const o=Zb(e);o&&t.push({type:"setBackgroundColor",value:o})}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:ei[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ei[r-100+8]}})}return t}function yI(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let i=0;do{const a=gI(r,i),l=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(l.length>0&&o.push({value:l,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const s=mI(a.sequence);for(const u of s)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of s)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return o}}}var vI={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 bI(e=vI){function t(l){return e[l]}function n(l){return`#${l.map(s=>Math.max(0,Math.min(s,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let u=0;u<ei.length;u++)r.push(t(ei[u]));let l=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let f=0;f<6;f++)for(let c=0;c<6;c++)r.push(n([l[u],l[f],l[c]]));let s=8;for(let u=0;u<24;u++,s+=10)r.push(n([s,s,s]));return r}function i(l){return o()[l]}function a(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return i(l.index)}}return{value:a}}const SI={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 EI(e,t,n){const r=zc(e,n),o=Nf(t),i=bI(Object.fromEntries(ei.map(l=>{var u;const s=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`;return[l,((u=e.colors)==null?void 0:u[s])||SI[l]]}))),a=yI();return o.map(l=>a.parse(l[0]).map(s=>{let u,f;s.decorations.has("reverse")?(u=s.background?i.value(s.background):e.bg,f=s.foreground?i.value(s.foreground):e.fg):(u=s.foreground?i.value(s.foreground):e.fg,f=s.background?i.value(s.background):void 0),u=Ao(u,r),f=Ao(f,r),s.decorations.has("dim")&&(u=wI(u));let c=Ht.None;return s.decorations.has("bold")&&(c|=Ht.Bold),s.decorations.has("italic")&&(c|=Ht.Italic),s.decorations.has("underline")&&(c|=Ht.Underline),s.decorations.has("strikethrough")&&(c|=Ht.Strikethrough),{content:s.value,offset:l[1],color:u,bgColor:f,fontStyle:c}}))}function wI(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const o=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${o}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const o=r[0],i=r[1],a=r[2],l=r[3];return`#${o}${o}${i}${i}${a}${a}${Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const o=r[0],i=r[1],a=r[2];return`#${o}${o}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Vp(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:o=e.getLoadedThemes()[0]}=n;if(!Lf(r)&&!Df(o)&&r==="ansi"){const{theme:i}=e.setTheme(o);return EI(i,t,n)}return c_(e,t,n)}function $c(e,t,n){let r,o,i,a,l,s;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:f="--shiki-",colorsRendering:c="css-vars"}=n,d=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,p)=>y.color===u?-1:p.color===u?1:0);if(d.length===0)throw new Ye("`themes` option must not be empty");const h=f_(e,t,n,Vp);if(s=os(h),u&&Km!==u&&!d.find(y=>y.color===u))throw new Ye(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=d.map(y=>e.getTheme(y.theme)),v=d.map(y=>y.color);i=h.map(y=>y.map(p=>cI(p,v,f,u,c))),s&&If(i,s);const E=d.map(y=>zc(y.theme,n));o=Wb(d,m,E,f,u,"fg",c),r=Wb(d,m,E,f,u,"bg",c),a=`shiki-themes ${m.map(y=>y.name).join(" ")}`,l=u?void 0:[o,r].join(";")}else if("theme"in n){const u=zc(n.theme,n);i=Vp(e,t,n);const f=e.getTheme(n.theme);r=Ao(f.bg,u),o=Ao(f.fg,u),a=f.name,s=os(i)}else throw new Ye("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:r,themeName:a,rootStyle:l,grammarState:s}}function Wb(e,t,n,r,o,i,a){return e.map((l,s)=>{const u=Ao(t[s][i],n[s])||"inherit",f=`${r+l.color}${i==="bg"?"-bg":""}:${u}`;if(s===0&&o){if(o===Km&&e.length>1){const c=e.findIndex(h=>h.color==="light"),d=e.findIndex(h=>h.color==="dark");if(c===-1||d===-1)throw new Ye('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ao(t[c][i],n[c])||"inherit"}, ${Ao(t[d][i],n[d])||"inherit"});${f}`}return u}return a==="css-vars"?f:null}).filter(l=>!!l).join(";")}function Hc(e,t,n,r={meta:{},options:n,codeToHast:(o,i)=>Hc(e,o,i),codeToTokens:(o,i)=>$c(e,o,i)}){var m,v;let o=t;for(const E of Uc(n))o=((m=E.preprocess)==null?void 0:m.call(r,o,n))||o;let{tokens:i,fg:a,bg:l,themeName:s,rootStyle:u,grammarState:f}=$c(e,o,n);const{mergeWhitespaces:c=!0,mergeSameStyleTokens:d=!1}=n;c===!0?i=CI(i):c==="never"&&(i=_I(i)),d&&(i=xI(i));const h={...r,get source(){return o}};for(const E of Uc(n))i=((v=E.tokens)==null?void 0:v.call(h,i))||i;return RI(i,{...n,fg:a,bg:l,themeName:s,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,f)}function RI(e,t,n,r=os(e)){var v,E,y,p;const o=Uc(t),i=[],a={type:"root",children:[]},{structure:l="classic",tabindex:s="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),s!==!1&&s!=null&&(u.tabindex=s.toString());for(const[b,S]of Object.entries(t.meta||{}))b.startsWith("_")||(u[b]=S);let f={type:"element",tagName:"pre",properties:u,children:[],data:t.data},c={type:"element",tagName:"code",properties:{},children:i};const d=[],h={...n,structure:l,addClassToHast:__,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return f},get code(){return c},get lines(){return d}};if(e.forEach((b,S)=>{var R,T;S&&(l==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
|
|
102
|
+
`}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},C=0;for(const O of b){let L={type:"element",tagName:"span",properties:{...O.htmlAttrs},children:[{type:"text",value:O.content}]};const I=Bc(O.htmlStyle||is(O));I&&(L.properties.style=I);for(const B of o)L=((R=B==null?void 0:B.span)==null?void 0:R.call(h,L,S+1,C,w,O))||L;l==="inline"?a.children.push(L):l==="classic"&&w.children.push(L),C+=O.content.length}if(l==="classic"){for(const O of o)w=((T=O==null?void 0:O.line)==null?void 0:T.call(h,w,S+1))||w;d.push(w),i.push(w)}else l==="inline"&&d.push(w)}),l==="classic"){for(const b of o)c=((v=b==null?void 0:b.code)==null?void 0:v.call(h,c))||c;f.children.push(c);for(const b of o)f=((E=b==null?void 0:b.pre)==null?void 0:E.call(h,f))||f;a.children.push(f)}else if(l==="inline"){const b=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of a.children)C.type==="element"&&C.tagName==="br"?(b.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&S.children.push(C);b.push(S);let w={type:"element",tagName:"code",properties:{},children:b};for(const C of o)w=((y=C==null?void 0:C.code)==null?void 0:y.call(h,w))||w;a.children=[];for(let C=0;C<w.children.length;C++){C>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const R=w.children[C];R.type==="element"&&a.children.push(...R.children)}}let m=a;for(const b of o)m=((p=b==null?void 0:b.root)==null?void 0:p.call(h,m))||m;return r&&If(m,r),m}function CI(e){return e.map(t=>{const n=[];let r="",o;return t.forEach((i,a)=>{const l=!(i.fontStyle&&(i.fontStyle&Ht.Underline||i.fontStyle&Ht.Strikethrough));l&&i.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=i.offset),r+=i.content):r?(l?n.push({...i,offset:o,content:r+i.content}):n.push({content:r,offset:o},i),o=void 0,r=""):n.push(i)}),n})}function _I(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[,o,i,a]=r;if(!o&&!a)return n;const l=[{...n,offset:n.offset+o.length,content:i}];return o&&l.unshift({content:o,offset:n.offset}),a&&l.push({content:a,offset:n.offset+o.length+i.length}),l}))}function xI(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const o=n[n.length-1],i=Bc(o.htmlStyle||is(o)),a=Bc(r.htmlStyle||is(r)),l=o.fontStyle&&(o.fontStyle&Ht.Underline||o.fontStyle&Ht.Strikethrough),s=r.fontStyle&&(r.fontStyle&Ht.Underline||r.fontStyle&Ht.Strikethrough);!l&&!s&&i===a?o.content+=r.content:n.push({...r})}return n})}const TI=rI;function AI(e,t,n){var i;const r={meta:{},options:n,codeToHast:(a,l)=>Hc(e,a,l),codeToTokens:(a,l)=>$c(e,a,l)};let o=TI(Hc(e,t,n,r));for(const a of Uc(n))o=((i=a.postprocess)==null?void 0:i.call(r,o,n))||o;return o}async function OI(e){const t=await N2(e);return{getLastGrammarState:(...n)=>z2(t,...n),codeToTokensBase:(n,r)=>Vp(t,n,r),codeToTokensWithThemes:(n,r)=>f_(t,n,r),codeToTokens:(n,r)=>$c(t,n,r),codeToHast:(n,r)=>Hc(t,n,r),codeToHtml:(n,r)=>AI(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function MI(e){const t=e.langs,n=e.themes,r=e.engine;async function o(i){function a(c){var d;if(typeof c=="string"){if(c=((d=i.langAlias)==null?void 0:d[c])||c,r_(c))return[];const h=t[c];if(!h)throw new Ye(`Language \`${c}\` is not included in this bundle. You may want to load it from external source.`);return h}return c}function l(c){if(o_(c))return"none";if(typeof c=="string"){const d=n[c];if(!d)throw new Ye(`Theme \`${c}\` is not included in this bundle. You may want to load it from external source.`);return d}return c}const s=(i.themes??[]).map(c=>l(c)),u=(i.langs??[]).map(c=>a(c)),f=await OI({engine:i.engine??r(),...i,themes:s,langs:u});return{...f,loadLanguage(...c){return f.loadLanguage(...c.map(a))},loadTheme(...c){return f.loadTheme(...c.map(l))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return o}function kI(e){let t;async function n(r={}){if(t){const o=await t;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}else{t=e({...r,themes:[],langs:[]});const o=await t;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}}return n}function LI(e,t){const n=kI(e);async function r(o,i){var s;const a=await n({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),l=await((s=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:s.call(t,o,i.lang,a));return l&&await a.loadLanguage(...l),a}return{getSingletonHighlighter(o){return n(o)},async codeToHtml(o,i){return(await r(o,i)).codeToHtml(o,i)},async codeToHast(o,i){return(await r(o,i)).codeToHast(o,i)},async codeToTokens(o,i){return(await r(o,i)).codeToTokens(o,i)},async codeToTokensBase(o,i){return(await r(o,i)).codeToTokensBase(o,i)},async codeToTokensWithThemes(o,i){return(await r(o,i)).codeToTokensWithThemes(o,i)},async getLastGrammarState(o,i){return(await n({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(o,i)}}}function DI(e={}){var a;const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,o=l=>{var s;return(s=e.variableDefaults)!=null&&s[l]?`var(${n}${l}, ${e.variableDefaults[l]})`:`var(${n}${l})`},i={name:t,type:"dark",colors:{"editor.foreground":o("foreground"),"editor.background":o("background"),"terminal.ansiBlack":o("ansi-black"),"terminal.ansiRed":o("ansi-red"),"terminal.ansiGreen":o("ansi-green"),"terminal.ansiYellow":o("ansi-yellow"),"terminal.ansiBlue":o("ansi-blue"),"terminal.ansiMagenta":o("ansi-magenta"),"terminal.ansiCyan":o("ansi-cyan"),"terminal.ansiWhite":o("ansi-white"),"terminal.ansiBrightBlack":o("ansi-bright-black"),"terminal.ansiBrightRed":o("ansi-bright-red"),"terminal.ansiBrightGreen":o("ansi-bright-green"),"terminal.ansiBrightYellow":o("ansi-bright-yellow"),"terminal.ansiBrightBlue":o("ansi-bright-blue"),"terminal.ansiBrightMagenta":o("ansi-bright-magenta"),"terminal.ansiBrightCyan":o("ansi-bright-cyan"),"terminal.ansiBrightWhite":o("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:o("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:o("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:o("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:o("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:o("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:o("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:o("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:o("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:o("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:o("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:o("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:o("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:o("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:o("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:o("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:o("token-changed")}}]};return r||(i.tokenColors=(a=i.tokenColors)==null?void 0:a.map(l=>{var s;return(s=l.settings)!=null&&s.fontStyle&&delete l.settings.fontStyle,l})),i}const Jb=4294967295;var NI=class{constructor(e,t={}){z(this,"regexps");this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:o}=t;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(i=>{if(typeof i!="string")return i;const a=r==null?void 0:r.get(i);if(a){if(a instanceof RegExp)return a;if(n)return null;throw a}try{const l=o(i);return r==null||r.set(i,l),l}catch(l){if(r==null||r.set(i,l),n)return null;throw l}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,o=[];function i(a,l,s=0){return{index:a,captureIndices:l.indices.map(u=>u==null?{start:Jb,end:Jb,length:0}:{start:u[0]+s,end:u[1]+s,length:u[1]-u[0]})}}for(let a=0;a<this.regexps.length;a++){const l=this.regexps[a];if(l)try{l.lastIndex=t;const s=l.exec(r);if(!s)continue;if(s.index===t)return i(a,s,0);o.push([a,s,0])}catch(s){if(this.options.forgiving)continue;throw s}}if(o.length){const a=Math.min(...o.map(l=>l[1].index));for(const[l,s,u]of o)if(s.index===a)return i(l,s,u)}return null}};function Ka(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function PI(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Qm=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Ot=String.raw;function Qa(e,t){if(e==null)throw new Error(t??"Value expected");return e}const T_=Ot`\[\^?`,A_=`c.? | C(?:-.?)?|${Ot`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Ot`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Ot`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Ot`o\{[^\}]*\}?`}|${Ot`\d{1,3}`}`,Zm=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,du=new RegExp(Ot`
|
|
103
|
+
\\ (?:
|
|
104
|
+
${A_}
|
|
105
|
+
| [gk]<[^>]*>?
|
|
106
|
+
| [gk]'[^']*'?
|
|
107
|
+
| .
|
|
108
|
+
)
|
|
109
|
+
| \( (?:
|
|
110
|
+
\? (?:
|
|
111
|
+
[:=!>({]
|
|
112
|
+
| <[=!]
|
|
113
|
+
| <[^>]*>
|
|
114
|
+
| '[^']*'
|
|
115
|
+
| ~\|?
|
|
116
|
+
| #(?:[^)\\]|\\.?)*
|
|
117
|
+
| [^:)]*[:)]
|
|
118
|
+
)?
|
|
119
|
+
| \*[^\)]*\)?
|
|
120
|
+
)?
|
|
121
|
+
| (?:${Zm.source})+
|
|
122
|
+
| ${T_}
|
|
123
|
+
| .
|
|
124
|
+
`.replace(/\s+/g,""),"gsu"),sh=new RegExp(Ot`
|
|
125
|
+
\\ (?:
|
|
126
|
+
${A_}
|
|
127
|
+
| .
|
|
128
|
+
)
|
|
129
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
130
|
+
| ${T_}
|
|
131
|
+
| &&
|
|
132
|
+
| .
|
|
133
|
+
`.replace(/\s+/g,""),"gsu");function II(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=tz(n.flags),o=[r.extended],i={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(c){o.push(c)},replaceCurrentModX(c){o[o.length-1]=c},singleline:n.rules.singleline};let a=[],l;for(du.lastIndex=0;l=du.exec(e);){const c=zI(i,e,l[0],du.lastIndex);c.tokens?a.push(...c.tokens):c.token&&a.push(c.token),c.lastIndex!==void 0&&(du.lastIndex=c.lastIndex)}const s=[];let u=0;a.filter(c=>c.type==="GroupOpen").forEach(c=>{c.kind==="capturing"?c.number=++u:c.raw==="("&&s.push(c)}),u||s.forEach((c,d)=>{c.kind="capturing",c.number=d+1});const f=u||s.length;return{tokens:a.map(c=>c.type==="EscapedNumber"?rz(c,f):c).flat(),flags:r}}function zI(e,t,n,r){const[o,i]=n;if(n==="["||n==="[^"){const a=BI(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(i))return{token:e0(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:XI(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:M_(n)}}if(i==="K")return{token:k_("keep",n)};if(i==="N"||i==="R")return{token:ti("newline",n,{negate:i==="N"})};if(i==="O")return{token:ti("any",n)};if(i==="X")return{token:ti("text_segment",n)};const a=O_(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(o==="("){if(i==="*")return{token:WI(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:ZI(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:$i("group",n)};if(n==="(?>")return{token:$i("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:$i(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:$i("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:$i("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:FI(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
134
|
+
`,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:ti("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Ot`\A`,$:Ot`\Z`}[n]:n;return{token:e0(a,n)}}return n==="|"?{token:$I(n)}:Zm.test(n)?{tokens:oz(n)}:{token:Lr(Ka(n),n)}}function BI(e,t,n){const r=[t0(t[1]==="^",t)];let o=1,i;for(sh.lastIndex=n;i=sh.exec(e);){const a=i[0];if(a[0]==="["&&a[1]!==":")o++,r.push(t0(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Lr(93,a));else if(o--,r.push(HI(a)),!o)break}else{const l=UI(a);Array.isArray(l)?r.push(...l):r.push(l)}}return{tokens:r,lastIndex:sh.lastIndex||e.length}}function UI(e){if(e[0]==="\\")return O_(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Qm.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ti("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?GI(e):e==="&&"?jI(e):Lr(Ka(e),e)}function O_(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return QI(e);if("dDhHsSwW".includes(n))return JI(e);if(e.startsWith(Ot`\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 ez(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)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),i=new TextEncoder;return[...o].map(a=>{const l=[...i.encode(a)].map(s=>`\\x${s.toString(16)}`).join("");return Lr(Ka(a),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Lr(nz(e),e);if(n0.has(n))return Lr(n0.get(n),e);if(/\d/.test(n))return VI(t,e);if(e==="\\")throw new Error(Ot`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Lr(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function $I(e){return{type:"Alternator",raw:e}}function e0(e,t){return{type:"Assertion",kind:e,raw:t}}function M_(e){return{type:"Backreference",raw:e}}function Lr(e,t){return{type:"Character",value:e,raw:t}}function HI(e){return{type:"CharacterClassClose",raw:e}}function GI(e){return{type:"CharacterClassHyphen",raw:e}}function jI(e){return{type:"CharacterClassIntersector",raw:e}}function t0(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ti(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function k_(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Qa(n.flags),raw:t}}function VI(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function FI(e){return{type:"GroupClose",raw:e}}function $i(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function qI(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function YI(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function XI(e){return{type:"Subroutine",raw:e}}const KI=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),n0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function QI(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 Lr(Ka(t.toUpperCase())-64,e)}function ZI(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const o=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),i=o0(n),a=o0(r),l={};if(i&&(l.enable=i),a&&(l.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),k_("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,$i("group",e,{...(i||a)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function WI(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:o}=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 i=o?o.split(",").filter(f=>f!=="").map(f=>/^[+-]?\d+$/.test(f)?+f:f):[],[a,l,s]=i,u=KI.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);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(i.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);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 l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof s=="string"&&!/^[A-Za-z_]\w*$/.test(s))throw new Error(`Named callout argument three must be a tag or number "${s}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${u}"`)}return qI(u,r??null,(o==null?void 0:o.split(","))??null,e)}function r0(e){let t=null,n,r;if(e[0]==="{"){const{minStr:o,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||i&&+i>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,r=i===void 0?+o:i===""?1/0:+i,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 YI(t,n,r,e)}function JI(e){const t=e[1].toLowerCase();return ti({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function ez(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ti("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function o0(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 tz(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 nz(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 rz(e,t){const{raw:n,inCharClass:r}=e,o=n.slice(1);if(!r&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[M_(n)];const i=[],a=o.match(/^[0-7]+|\d/g);for(let l=0;l<a.length;l++){const s=a[l];let u;if(l===0&&s!=="8"&&s!=="9"){if(u=parseInt(s,8),u>127)throw new Error(Ot`Octal encoded byte above 177 unsupported "${n}"`)}else u=Ka(s);i.push(Lr(u,(l===0?"\\":"")+s))}return i}function oz(e){const t=[],n=new RegExp(Zm,"gy");let r;for(;r=n.exec(e);){const o=r[0];if(o[0]==="{"){const i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(i){const{min:a,max:l}=i.groups;if(+a>+l&&o.endsWith("?")){n.lastIndex--,t.push(r0(o.slice(0,-1)));continue}}}t.push(r0(o))}return t}function L_(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 iz(e){return az.has(e.type)}const az=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function D_(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=II(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(d,h)=>{const m=r.tokens[i.nextIndex];switch(i.parent=d,i.nextIndex++,m.type){case"Alternator":return bi();case"Assertion":return lz(m);case"Backreference":return sz(m,i);case"Character":return Bf(m.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return uz(m,i,h);case"CharacterClassOpen":return cz(m,i,h);case"CharacterSet":return fz(m,i);case"Directive":return yz(m.kind,{flags:m.flags});case"GroupOpen":return dz(m,i,h);case"NamedCallout":return bz(m.kind,m.tag,m.arguments);case"Quantifier":return hz(m,i);case"Subroutine":return pz(m,i);default:throw new Error(`Unexpected token type "${m.type}"`)}},i={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:o},a=Ez(vz(r.flags));let l=a.body[0];for(;i.nextIndex<r.tokens.length;){const d=o(l,{});d.type==="Alternative"?(a.body.push(d),l=d):l.body.push(d)}const{capturingGroups:s,hasNumberedRef:u,namedGroupsByName:f,subroutines:c}=i;if(u&&f.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of c)if(typeof d=="number"){if(d>s.length)throw new Error("Subroutine uses a group number that's not defined");d&&(s[d-1].isSubroutined=!0)}else if(f.has(d)){if(f.get(d).length>1)throw new Error(Ot`Subroutine uses a duplicate group name "\g<${d}>"`);f.get(d)[0].isSubroutined=!0}else throw new Error(Ot`Subroutine uses a group name that's not defined "\g<${d}>"`);return a}function lz({kind:e}){return Fp(Qa({"^":"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===Ot`\B`||e===Ot`\Y`})}function sz({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),o=(i,a=!1)=>{const l=t.capturingGroups.length;let s=!1;if(i>l)if(t.skipBackrefValidation)s=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,qp(a?l+1-i:i,{orphan:s})};if(n){const i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(i)return o(+i.groups.num,!!i.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 qp(r)}return o(+r)}function uz(e,t,n){const{tokens:r,walk:o}=t,i=t.parent,a=i.body.at(-1),l=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const s=o(i,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&s.type==="Character")return i.body.pop(),mz(a,s);throw new Error("Invalid character class range")}return Bf(Ka("-"))}function cz({negate:e},t,n){const{tokens:r,walk:o}=t,i=[Hu()],a=r[t.nextIndex];let l=l0(a);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(Hu()),t.nextIndex++;else{const u=i.at(-1);u.body.push(o(u,n))}l=l0(r[t.nextIndex],a)}const s=Hu({negate:e});return i.length===1?s.body=i[0].body:(s.kind="intersection",s.body=i.map(u=>u.body.length===1?u.body[0]:u)),t.nextIndex++,s}function fz({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:a}=r;if(e==="property"){const l=Uf(n);if(Qm.has(l)&&!(a!=null&&a.has(l)))e="posix",n=l;else return Hi(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:a})}return e==="posix"?Sz(n,{negate:t}):Yp(e,{negate:t})}function dz(e,t,n){const{tokens:r,capturingGroups:o,namedGroupsByName:i,skipLookbehindValidation:a,walk:l}=t,s=wz(e),u=s.type==="AbsenceFunction",f=a0(s),c=f&&s.negate;if(s.type==="CapturingGroup"&&(o.push(s),s.name&&PI(i,s.name,[]).push(s)),u&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=s0(r[t.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")s.body.push(bi()),t.nextIndex++;else{const h=s.body.at(-1),m=l(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||u,isInLookbehind:n.isInLookbehind||f,isInNegLookbehind:n.isInNegLookbehind||c});if(h.body.push(m),(f||n.isInLookbehind)&&!a){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(c||n.isInNegLookbehind){if(i0(m)||m.type==="CapturingGroup")throw new Error(v)}else if(i0(m)||a0(m)&&m.negate)throw new Error(v)}}d=s0(r[t.nextIndex])}return t.nextIndex++,s}function hz({kind:e,min:t,max:n},r){const o=r.parent,i=o.body.at(-1);if(!i||!iz(i))throw new Error("Quantifier requires a repeatable token");const a=P_(e,t,n,i);return o.body.pop(),a}function pz({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let o=e.slice(3,-1);const i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(i){const l=+i.groups.num,s=n.length;if(t.hasNumberedRef=!0,o={"":l,"+":s+l,"-":s+1-l}[i.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const a=I_(o);return r.push(a),a}function gz(e,t){return{type:"AbsenceFunction",kind:e,body:Ps(t==null?void 0:t.body)}}function bi(e){return{type:"Alternative",body:z_(e==null?void 0:e.body)}}function Fp(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function qp(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function N_(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Rz(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:Ps(t==null?void 0:t.body)}}function Bf(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 Hu(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:z_(e==null?void 0:e.body)}}function mz(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Yp(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 yz(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Qa(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function vz(e){return{type:"Flags",...e}}function Fn(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:Ps(e==null?void 0:e.body)}}function Jo(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ps(e==null?void 0:e.body)}}function bz(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Sz(e,t){const n=!!(t!=null&&t.negate);if(!Qm.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function P_(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 Ez(e,t){return{type:"Regex",body:Ps(t==null?void 0:t.body),flags:e}}function I_(e){return{type:"Subroutine",ref:e}}function Hi(e,t){var o;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(o=n.unicodePropertyMap)==null?void 0:o.get(Uf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Cz(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Ot`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function wz({flags:e,kind:t,name:n,negate:r,number:o}){switch(t){case"absence_repeater":return gz("repeater");case"atomic":return Fn({atomic:!0});case"capturing":return N_(o,{name:n});case"group":return Fn({flags:e});case"lookahead":case"lookbehind":return Jo({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ps(e){if(e===void 0)e=[bi()];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 z_(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 i0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function a0(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Rz(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Cz(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 Uf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function l0(e,t){const n=t;return Qa(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function s0(e){return Qa(e,"Unclosed group")}function zl(e,t,n=null){function r(i,a){for(let l=0;l<i.length;l++){const s=o(i[l],a,l,i);l=Math.max(-1,l+s)}}function o(i,a=null,l=null,s=null){var y,p;let u=0,f=!1;const c={node:i,parent:a,key:l,container:s,root:e,remove(){hu(s).splice(Math.max(0,Pi(l)+u),1),u--,f=!0},removeAllNextSiblings(){return hu(s).splice(Pi(l)+1)},removeAllPrevSiblings(){const b=Pi(l)+u;return u-=b,hu(s).splice(0,Math.max(0,b))},replaceWith(b,S={}){const w=!!S.traverse;s?s[Math.max(0,Pi(l)+u)]=b:Qa(a,"Can't replace root node")[l]=b,w&&o(b,a,l,s),f=!0},replaceWithMultiple(b,S={}){const w=!!S.traverse;if(hu(s).splice(Math.max(0,Pi(l)+u),1,...b),u+=b.length-1,w){let C=0;for(let R=0;R<b.length;R++)C+=o(b[R],a,Pi(l)+R+C,s)}f=!0},skip(){f=!0}},{type:d}=i,h=t["*"],m=t[d],v=typeof h=="function"?h:h==null?void 0:h.enter,E=typeof m=="function"?m:m==null?void 0:m.enter;if(v==null||v(c,n),E==null||E(c,n),!f)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(i.min,i,"min"),o(i.max,i,"max");break;case"Quantifier":o(i.body,i,"body");break;case"Regex":r(i.body,i),o(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return(y=m==null?void 0:m.exit)==null||y.call(m,c,n),(p=h==null?void 0:h.exit)==null||p.call(h,c,n),u}return o(e),e}function hu(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Pi(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const _z=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function xz(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Tz(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const In=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Wm(e,t,n,r){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1];let a=0,l="";for(const s of e.matchAll(o)){const{0:u,groups:{$skip:f}}=s;if(!f&&(!r||r===In.DEFAULT==!a)){n instanceof Function?l+=n(s,{context:a?In.CHAR_CLASS:In.DEFAULT,negated:i[i.length-1]}):l+=n;continue}u[0]==="["?(a++,i.push(u[1]==="^")):u==="]"&&a&&(a--,i.pop()),l+=u}return l}function B_(e,t,n,r){Wm(e,t,n,r)}function Az(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let i=0,a;for(;a=o.exec(e);){const{0:l,groups:{$skip:s}}=a;if(!s&&(!r||r===In.DEFAULT==!i))return a;l==="["?i++:l==="]"&&i&&i--,o.lastIndex==a.index&&o.lastIndex++}return null}function pu(e,t,n){return!!Az(e,t,0,n)}function Oz(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,o=0,i=1,a;for(;a=n.exec(e);){const[l]=a;if(l==="[")o++;else if(o)l==="]"&&o--;else if(l==="(")i++;else if(l===")"&&(i--,!i)){r=a.index;break}}return e.slice(t,r)}const u0=new RegExp(String.raw`(?<noncapturingStart>${_z})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Mz(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 o="(?>",i="(?:(?=(",a=[0],l=[];let s=0,u=0,f=NaN,c;do{c=!1;let d=0,h=0,m=!1,v;for(u0.lastIndex=Number.isNaN(f)?0:f+i.length;v=u0.exec(e);){const{0:E,index:y,groups:{capturingStart:p,noncapturingStart:b}}=v;if(E==="[")d++;else if(d)E==="]"&&d--;else if(E===o&&!m)f=y,m=!0;else if(m&&b)h++;else if(p)m?h++:(s++,a.push(s+u));else if(E===")"&&m){if(!h){u++;const S=s+u;if(e=`${e.slice(0,f)}${i}${e.slice(f+o.length,y)}))<$$${S}>)${e.slice(y+1)}`,c=!0,l.push(S),xz(n,S),r.size){const w=new Map;r.forEach((C,R)=>{w.set(R>=S?R+1:R,C.map(T=>T>=S?T+1:T))}),r=w}break}h--}}}while(c);return n.push(...l),e=Wm(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:h,wrappedBackrefNum:m}})=>{if(h){const v=+h;if(v>a.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${a[v]}`}return`\\${m}`},In.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const U_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,uh=new RegExp(String.raw`
|
|
135
|
+
\\(?: \d+
|
|
136
|
+
| c[A-Za-z]
|
|
137
|
+
| [gk]<[^>]+>
|
|
138
|
+
| [pPu]\{[^\}]+\}
|
|
139
|
+
| u[A-Fa-f\d]{4}
|
|
140
|
+
| x[A-Fa-f\d]{2}
|
|
141
|
+
)
|
|
142
|
+
| \((?: \? (?: [:=!>]
|
|
143
|
+
| <(?:[=!]|[^>]+>)
|
|
144
|
+
| [A-Za-z\-]+:
|
|
145
|
+
| \(DEFINE\)
|
|
146
|
+
))?
|
|
147
|
+
| (?<qBase>${U_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
148
|
+
| \\?.
|
|
149
|
+
`.replace(/\s+/g,""),"gsu");function kz(e){if(!new RegExp(`${U_}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,o="",i=0,a;for(uh.lastIndex=0;a=uh.exec(e);){const{0:l,index:s,groups:{qBase:u,qMod:f,invalidQ:c}}=a;if(l==="[")i||(r=s),i++;else if(l==="]")i?i--:r=null;else if(!i)if(f==="+"&&o&&!o.startsWith("(")){if(c)throw new Error(`Invalid quantifier "${l}"`);let d=-1;if(/^\{\d+\}$/.test(u))e=Tz(e,s+u.length,f,"");else{if(o===")"||o==="]"){const h=o===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,h)}(?>${e.slice(h,s)}${u})${e.slice(s+l.length)}`}else e=`${e.slice(0,s-o.length)}(?>${o}${u})${e.slice(s+l.length)}`;d+=4}uh.lastIndex+=d}else l[0]==="("?t.push(s):l===")"&&(n=t.length?t.pop():null);o=l}return{pattern:e}}const Nn=String.raw,Lz=Nn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Xp=Nn`\(\?R=(?<rDepth>[^\)]+)\)|${Lz}`,$f=Nn`\(\?<(?![=!])(?<captureName>[^>]+)>`,$_=Nn`${$f}|(?<unnamed>\()(?!\?)`,Fo=new RegExp(Nn`${$f}|${Xp}|\(\?|\\?.`,"gsu"),ch="Cannot use multiple overlapping recursions";function Dz(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let o=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Xp,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(r==="plugin"&&pu(e,Nn`\(\?\(DEFINE\)`,In.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const i=[],a=pu(e,Nn`\\[1-9]`,In.DEFAULT),l=new Map,s=[];let u=!1,f=0,c=0,d;for(Fo.lastIndex=0;d=Fo.exec(e);){const{0:h,groups:{captureName:m,rDepth:v,gRNameOrNum:E,gRDepth:y}}=d;if(h==="[")f++;else if(f)h==="]"&&f--;else if(v){if(c0(v),u)throw new Error(ch);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const p=e.slice(0,d.index),b=e.slice(Fo.lastIndex);if(pu(b,Xp,In.DEFAULT))throw new Error(ch);const S=+v-1;e=f0(p,b,S,!1,n,i,c),o=h0(o,p,S,i.length,0,c);break}else if(E){c0(y);let p=!1;for(const B of s)if(B.name===E||B.num===+E){if(p=!0,B.hasRecursedWithin)throw new Error(ch);break}if(!p)throw new Error(Nn`Recursive \g cannot be used outside the referenced group "${r==="external"?E:Nn`\g<${E}&R=${y}>`}"`);const b=l.get(E),S=Oz(e,b);if(a&&pu(S,Nn`${$f}|\((?!\?)`,In.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const w=e.slice(b,d.index),C=S.slice(w.length+h.length),R=i.length,T=+y-1,O=f0(w,C,T,!0,n,i,c);o=h0(o,w,T,i.length-R,R,c);const L=e.slice(0,b),I=e.slice(b+S.length);e=`${L}${O}${I}`,Fo.lastIndex+=O.length-h.length-w.length-C.length,s.forEach(B=>B.hasRecursedWithin=!0),u=!0}else if(m)c++,l.set(String(c),Fo.lastIndex),l.set(m,Fo.lastIndex),s.push({num:c,name:m});else if(h[0]==="("){const p=h==="(";p&&(c++,l.set(String(c),Fo.lastIndex)),s.push(p?{num:c}:{})}else h===")"&&s.pop()}return n.push(...i),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function c0(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 f0(e,t,n,r,o,i,a){const l=new Set;r&&B_(e+t,$f,({groups:{captureName:u}})=>{l.add(u)},In.DEFAULT);const s=[n,r?l:null,o,i,a];return`${e}${d0(`(?:${e}`,"forward",...s)}(?:)${d0(`${t})`,"backward",...s)}${t}`}function d0(e,t,n,r,o,i,a){const s=f=>t==="forward"?f+2:n-f+2-1;let u="";for(let f=0;f<n;f++){const c=s(f);u+=Wm(e,Nn`${$_}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:h,unnamed:m,backref:v}})=>{if(v&&r&&!r.has(v))return d;const E=`_$${c}`;if(m||h){const y=a+i.length+1;return i.push(y),Nz(o,y),m?d:`(?<${h}${E}>`}return Nn`\k<${v}${E}>`},In.DEFAULT)}return u}function Nz(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function h0(e,t,n,r,o,i){if(e.size&&r){let a=0;B_(t,$_,()=>a++,In.DEFAULT);const l=i-a+o,s=new Map;return e.forEach((u,f)=>{const c=(r-a*n)/n,d=a*n,h=f>l+a?f+r:f,m=[];for(const v of u)if(v<=l)m.push(v);else if(v>l+a+c)m.push(v+r);else if(v<=l+a)for(let E=0;E<=n;E++)m.push(v+a*E);else for(let E=0;E<=n;E++)m.push(v+d+c*E);s.set(h,m)}),s}return e}var bt=String.fromCodePoint,Ee=String.raw,Kn={},Hf=globalThis.RegExp;Kn.flagGroups=(()=>{try{new Hf("(?i:)")}catch{return!1}return!0})();Kn.unicodeSets=(()=>{try{new Hf("[[]]","v")}catch{return!1}return!0})();Kn.bugFlagVLiteralHyphenIsRange=Kn.unicodeSets?(()=>{try{new Hf(Ee`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Kn.bugNestedClassIgnoresNegation=Kn.unicodeSets&&new Hf("[[^a]]","v").test("a");function Gc(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 as(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Kp(e,t){return p0[e]>=p0[t]}function Pz(e,t){if(e==null)throw new Error(t??"Value expected");return e}var p0={ES2025:2025,ES2024:2024,ES2018:2018},Iz={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function H_(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Iz[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=Kn.flagGroups?"ES2025":Kn.unicodeSets?"ES2024":"ES2018"),t}var zz="[ -\r ]",Bz=new Set([bt(304),bt(305)]),wr=Ee`[\p{L}\p{M}\p{N}\p{Pc}]`;function G_(e){if(Bz.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),o=Hz.get(n),i=Uz.get(n),a=$z.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),o&&t.add(o),t.add(n),i&&t.add(i),[...t]}var Jm=new Map(`C Other
|
|
150
|
+
Cc Control cntrl
|
|
151
|
+
Cf Format
|
|
152
|
+
Cn Unassigned
|
|
153
|
+
Co Private_Use
|
|
154
|
+
Cs Surrogate
|
|
155
|
+
L Letter
|
|
156
|
+
LC Cased_Letter
|
|
157
|
+
Ll Lowercase_Letter
|
|
158
|
+
Lm Modifier_Letter
|
|
159
|
+
Lo Other_Letter
|
|
160
|
+
Lt Titlecase_Letter
|
|
161
|
+
Lu Uppercase_Letter
|
|
162
|
+
M Mark Combining_Mark
|
|
163
|
+
Mc Spacing_Mark
|
|
164
|
+
Me Enclosing_Mark
|
|
165
|
+
Mn Nonspacing_Mark
|
|
166
|
+
N Number
|
|
167
|
+
Nd Decimal_Number digit
|
|
168
|
+
Nl Letter_Number
|
|
169
|
+
No Other_Number
|
|
170
|
+
P Punctuation punct
|
|
171
|
+
Pc Connector_Punctuation
|
|
172
|
+
Pd Dash_Punctuation
|
|
173
|
+
Pe Close_Punctuation
|
|
174
|
+
Pf Final_Punctuation
|
|
175
|
+
Pi Initial_Punctuation
|
|
176
|
+
Po Other_Punctuation
|
|
177
|
+
Ps Open_Punctuation
|
|
178
|
+
S Symbol
|
|
179
|
+
Sc Currency_Symbol
|
|
180
|
+
Sk Modifier_Symbol
|
|
181
|
+
Sm Math_Symbol
|
|
182
|
+
So Other_Symbol
|
|
183
|
+
Z Separator
|
|
184
|
+
Zl Line_Separator
|
|
185
|
+
Zp Paragraph_Separator
|
|
186
|
+
Zs Space_Separator
|
|
187
|
+
ASCII
|
|
188
|
+
ASCII_Hex_Digit AHex
|
|
189
|
+
Alphabetic Alpha
|
|
190
|
+
Any
|
|
191
|
+
Assigned
|
|
192
|
+
Bidi_Control Bidi_C
|
|
193
|
+
Bidi_Mirrored Bidi_M
|
|
194
|
+
Case_Ignorable CI
|
|
195
|
+
Cased
|
|
196
|
+
Changes_When_Casefolded CWCF
|
|
197
|
+
Changes_When_Casemapped CWCM
|
|
198
|
+
Changes_When_Lowercased CWL
|
|
199
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
200
|
+
Changes_When_Titlecased CWT
|
|
201
|
+
Changes_When_Uppercased CWU
|
|
202
|
+
Dash
|
|
203
|
+
Default_Ignorable_Code_Point DI
|
|
204
|
+
Deprecated Dep
|
|
205
|
+
Diacritic Dia
|
|
206
|
+
Emoji
|
|
207
|
+
Emoji_Component EComp
|
|
208
|
+
Emoji_Modifier EMod
|
|
209
|
+
Emoji_Modifier_Base EBase
|
|
210
|
+
Emoji_Presentation EPres
|
|
211
|
+
Extended_Pictographic ExtPict
|
|
212
|
+
Extender Ext
|
|
213
|
+
Grapheme_Base Gr_Base
|
|
214
|
+
Grapheme_Extend Gr_Ext
|
|
215
|
+
Hex_Digit Hex
|
|
216
|
+
IDS_Binary_Operator IDSB
|
|
217
|
+
IDS_Trinary_Operator IDST
|
|
218
|
+
ID_Continue IDC
|
|
219
|
+
ID_Start IDS
|
|
220
|
+
Ideographic Ideo
|
|
221
|
+
Join_Control Join_C
|
|
222
|
+
Logical_Order_Exception LOE
|
|
223
|
+
Lowercase Lower
|
|
224
|
+
Math
|
|
225
|
+
Noncharacter_Code_Point NChar
|
|
226
|
+
Pattern_Syntax Pat_Syn
|
|
227
|
+
Pattern_White_Space Pat_WS
|
|
228
|
+
Quotation_Mark QMark
|
|
229
|
+
Radical
|
|
230
|
+
Regional_Indicator RI
|
|
231
|
+
Sentence_Terminal STerm
|
|
232
|
+
Soft_Dotted SD
|
|
233
|
+
Terminal_Punctuation Term
|
|
234
|
+
Unified_Ideograph UIdeo
|
|
235
|
+
Uppercase Upper
|
|
236
|
+
Variation_Selector VS
|
|
237
|
+
White_Space space
|
|
238
|
+
XID_Continue XIDC
|
|
239
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Uf(e),e])),Uz=new Map([["s",bt(383)],[bt(383),"s"]]),$z=new Map([[bt(223),bt(7838)],[bt(107),bt(8490)],[bt(229),bt(8491)],[bt(969),bt(8486)]]),Hz=new Map([Wr(453),Wr(456),Wr(459),Wr(498),...fh(8072,8079),...fh(8088,8095),...fh(8104,8111),Wr(8124),Wr(8140),Wr(8188)]),Gz=new Map([["alnum",Ee`[\p{Alpha}\p{Nd}]`],["alpha",Ee`\p{Alpha}`],["ascii",Ee`\p{ASCII}`],["blank",Ee`[\p{Zs}\t]`],["cntrl",Ee`\p{Cc}`],["digit",Ee`\p{Nd}`],["graph",Ee`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ee`\p{Lower}`],["print",Ee`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ee`[\p{P}\p{S}]`],["space",Ee`\p{space}`],["upper",Ee`\p{Upper}`],["word",Ee`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ee`\p{AHex}`]]);function jz(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Wr(e){const t=bt(e);return[t.toLowerCase(),t]}function fh(e,t){return jz(e,t).map(n=>Wr(n))}var j_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Vz(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};V_(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Kp(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};zl(e,Fz,r);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},i={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};zl(e,qz,i);const a={groupsByName:i.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:i.reffedNodesByReferencer};return zl(e,Yz,a),e._originMap=i.groupOriginByCopy,e._strategy=r.strategy,e}var Fz={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:o}=e;if(o==="repeater"){const i=Fn();i.body[0].body.push(Jo({negate:!0,body:r}),Hi("Any"));const a=Fn();a.body[0].body.push(P_("greedy",0,1/0,i)),n(ut(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const o=e.body.filter(i=>i.kind==="flags");for(let i=n+1;i<t.body.length;i++){const a=t.body[i];as(r,a,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=q_(t.get(e));if(r){const o=Fn({flags:r});o.body[0].body=e.body,e.body=[ut(o,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:o,remove:i,replaceWith:a},l){const{kind:s,negate:u}=e,{asciiWordBoundaries:f,avoidSubclass:c,supportedGNodes:d,wordIsAscii:h}=l;if(s==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if(s==="line_end")a(ut(Jo({body:[bi({body:[Fp("string_end")]}),bi({body:[Bf(10)]})]}),t));else if(s==="line_start")a(ut(Rr(Ee`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(s==="search_start")if(d.has(e))o.flags.sticky=!0,i();else{const m=r[n-1];if(m&&Jz(m))a(ut(Jo({negate:!0}),t));else{if(c)throw new Error(Ee`Uses "\G" in a way that requires a subclass`);a(Jr(Fp("string_start"),t)),l.strategy="clip_search"}}else if(!(s==="string_end"||s==="string_start"))if(s==="string_end_newline")a(ut(Rr(Ee`(?=\n?\z)`),t));else if(s==="word_boundary"){if(!h&&!f){const m=`(?:(?<=${wr})(?!${wr})|(?<!${wr})(?=${wr}))`,v=`(?:(?<=${wr})(?=${wr})|(?<!${wr})(?!${wr}))`;a(ut(Rr(u?v:m),t))}}else throw new Error(`Unexpected assertion kind "${s}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!hh(n)&&(n=dh(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!hh(r)&&(r=dh(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=Hu({body:[e]});n(ut(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:o,digitIsAscii:i,spaceIsAscii:a,wordIsAscii:l}){const{kind:s,negate:u,value:f}=e;if(i&&(s==="digit"||f==="digit")){n(Jr(Yp("digit",{negate:u}),t));return}if(a&&(s==="space"||f==="space")){n(ut(ph(Rr(zz),u),t));return}if(l&&(s==="word"||f==="word")){n(Jr(Yp("word",{negate:u}),t));return}if(s==="any")n(Jr(Hi("Any"),t));else if(s==="digit")n(Jr(Hi("Nd",{negate:u}),t));else if(s!=="dot")if(s==="text_segment"){if(r==="strict")throw new Error(Ee`Use of "\X" requires non-strict accuracy`);const c="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=Ee`\p{RI}{2}|${c}(?:\u200D${c})*`;n(ut(Rr(Ee`(?>\r\n|${o?Ee`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(s==="hex")n(Jr(Hi("AHex",{negate:u}),t));else if(s==="newline")n(ut(Rr(u?`[^
|
|
240
|
+
]`:`(?>\r
|
|
241
|
+
?|[
|
|
242
|
+
\v\f
\u2028\u2029])`),t));else if(s==="posix")if(!o&&(f==="graph"||f==="print")){if(r==="strict")throw new Error(`POSIX class "${f}" requires min target ES2024 or non-strict accuracy`);let c={graph:"!-~",print:" -~"}[f];u&&(c=`\0-${bt(c.codePointAt(0)-1)}${bt(c.codePointAt(2)+1)}-`),n(ut(Rr(`[${c}]`),t))}else n(ut(ph(Rr(Gz.get(f)),u),t));else if(s==="property")Jm.has(Uf(f))||(e.key="sc");else if(s==="space")n(Jr(Hi("space",{negate:u}),t));else if(s==="word")n(ut(ph(Rr(wr),u),t));else throw new Error(`Unexpected character set kind "${s}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:o,removeAllPrevSiblings:i,removeAllNextSiblings:a}){const{kind:l,flags:s}=e;if(l==="flags")if(!s.enable&&!s.disable)r();else{const u=Fn({flags:s});u.body[0].body=a(),o(ut(u,t),{traverse:!0})}else if(l==="keep"){const u=n.body[0],c=n.body.length===1&&L_(u,{type:"Group"})&&u.body[0].body.length===1?u.body[0]:n;if(t.parent!==c||c.body.length>1)throw new Error(Ee`Uses "\K" in a way that's unsupported`);const d=Jo({behind:!0});d.body[0].body=i(),o(ut(d,t))}else throw new Error(`Unexpected directive kind "${l}"`)},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(ut(Jo({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Fn();t.body[0].body.push(e.body),e.body=ut(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,o=!1;for(const i of e.body)if(i.body.length===1&&i.body[0].kind==="search_start")i.body.pop();else{const a=X_(i.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):o=!0}r&&!o&&n.forEach(i=>t.add(i))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Ee`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!hh(n)&&(n=dh(n,t),e.ref=n)}},qz={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:o}=e;r||n.set(e,[...t.get(o).map(({node:i})=>i)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:o,groupsByName:i,multiplexCapturesToLeftByRef:a,openRefs:l,reffedNodesByReferencer:s}){const u=o.get(e);if(u&&l.has(e.number)){const c=Jr(g0(e.number),t);s.set(c,l.get(e.number)),n(c);return}l.set(e.number,e),a.set(e.number,[]),e.name&&as(a,e.name,[]);const f=a.get(e.name??e.number);for(let c=0;c<f.length;c++){const d=f[c];if(u===d.node||u&&u===d.origin||e===d.origin){f.splice(c,1);break}}if(a.get(e.number).push({node:e,origin:u}),e.name&&a.get(e.name).push({node:e,origin:u}),e.name){const c=as(i,e.name,new Map);let d=!1;if(u)d=!0;else for(const h of c.values())if(!h.hasDuplicateNameToRemove){d=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:d})}},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=Gc(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:o,ref:i}=e;if(o){let f=t;for(;(f=f.parent)&&!(f.type==="CapturingGroup"&&(f.name===i||f.number===i)););r.reffedNodesByReferencer.set(e,f);return}const a=r.subroutineRefMap.get(i),l=i===0,s=l?g0(0):F_(a,r.groupOriginByCopy,null);let u=s;if(!l){const f=q_(Qz(a,d=>d.type==="Group"&&!!d.flags)),c=f?Gc(r.globalFlags,f):r.globalFlags;Xz(c,r.currentFlags)||(u=Fn({flags:Zz(c)}),u.body[0].body.push(s))}n(ut(u,t),{traverse:!l})}},Yz={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const i=r.reffedNodesByReferencer.get(e).filter(a=>Kz(a,e));if(!i.length)n(ut(Jo({negate:!0}),t));else if(i.length>1){const a=Fn({atomic:!0,body:i.reverse().map(l=>bi({body:[qp(l.number)]}))});n(ut(a,t))}else e.ref=i[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 o=N_();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function V_(e){zl(e,{"*"({node:t,parent:n}){t.parent=n}})}function Xz(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Kz(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Y_(n.parent);for(const o of r){if(o===n)break;if(o===e||K_(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function F_(e,t,n,r){const o=Array.isArray(e)?[]:{};for(const[i,a]of Object.entries(e))i==="parent"?o.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?o[i]=F_(a,t,o,n):(i==="type"&&a==="CapturingGroup"&&t.set(o,t.get(e)??e),o[i]=a);return o}function g0(e){const t=I_(e);return t.isRecursive=!0,t}function Qz(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function dh(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 q_(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(o=>{var i,a;(i=r.enable)!=null&&i[o]&&(delete n.disable[o],n.enable[o]=!0),(a=r.disable)!=null&&a[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Zz({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 Y_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function X_(e){const t=e.find(n=>n.kind==="search_start"||e3(n,{negate:!1})||!Wz(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 o=X_(r.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function K_(e,t){const n=Y_(e)??[];for(const r of n)if(r===t||K_(r,t))return!0;return!1}function Wz({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Jz(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function e3(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&L_(e.body[0],{type:"Assertion",kind:"search_start"})}function hh(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Rr(e,t){const r=D_(e,{...t,unicodePropertyMap:Jm}).body;return r.length>1||r[0].body.length>1?Fn({body:r}):r[0].body[0]}function ph(e,t){return e.negate=t,e}function Jr(e,t){return e.parent=t,e}function ut(e,t){return V_(e),e.parent=t,e}function t3(e,t){const n=H_(t),r=Kp(n.target,"ES2024"),o=Kp(n.target,"ES2025"),i=n.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,l=null;if(!o){const h=[e.flags.ignoreCase];zl(e,n3,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(m){h.push(m)},setHasCasedChar(){h.at(-1)?a=!0:l=!0}})}const s={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!l)};let u=e;const f={accuracy:n.accuracy,appliedGlobalFlags:s,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!o&&a&&l),useFlagMods:o,useFlagV:r,verbose:n.verbose};function c(h){return f.lastNode=u,u=h,Pz(r3[h.type],`Unexpected node type "${h.type}"`)(h,f,c)}const d={pattern:e.body.map(c).join("|"),flags:c(e.flags),options:{...e.options}};return r||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],f.captureMap.forEach((h,m)=>{h.hidden&&d._hiddenCaptures.push(m),h.transferTo&&as(d._captureTransfers,h.transferTo,[]).push(m)}),d}var n3={"*":{enter({node:e},t){if(y0(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Gc({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){y0(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ey(bt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Q_(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&j_.has(e.value)&&t.setHasCasedChar()}},r3={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?Ee`\B`:Ee`\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:o,number:i}=e,a={ignoreCase:t.currentFlags.ignoreCase},l=t.originMap.get(e);return l&&(a.hidden=!0,i>l.number&&(a.transferTo=l.number)),t.captureMap.set(i,a),`(${o?`?<${o}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=bt(e),r=Ii(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ey(n)){const o=G_(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:o,parent:i}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(v0)&&(a=[Bf(45),...a.filter(u=>!v0(u))]);const l=()=>`[${o?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Kn.bugNestedClassIgnoresNegation)&&!o){const f=a.filter(c=>c.type==="CharacterClass"&&c.kind==="union"&&c.negate);if(f.length){const c=Fn(),d=c.body[0];return c.parent=i,d.parent=c,a=a.filter(h=>!f.includes(h)),e.body=a,a.length?(e.parent=d,d.body.push(e)):c.body.pop(),f.forEach(h=>{const m=bi({body:[h]});h.parent=m,m.parent=c,c.body.push(m)}),n(c)}}t.inCharClass=!0;const u=l();return t.inCharClass=!1,u}const s=a[0];if(r==="union"&&!o&&s&&((!t.useFlagV||!t.verbose)&&i.kind==="union"&&!(Kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&i.kind==="intersection"&&a.length===1&&s.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&i.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=Ii(n,o),a=Ii(r,o),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const s=Q_(e);s3(s).forEach(f=>{l.add(Array.isArray(f)?`${Ii(f[0],o)}-${Ii(f[1],o)}`:Ii(f,o))})}return`${i}-${a}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ee`[^\n]`;if(e==="digit")return t?Ee`\D`:Ee`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&j_.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ee`\P`:Ee`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Ee`\W`:Ee`\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},o,i){const a=o.currentFlags;n&&(o.currentFlags=Gc(a,n));const l=t.map(i).join("|"),s=!o.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?l:`(?${u3(e,n,o.useFlagMods)}${l})`;return o.currentFlags=a,s},LookaroundAssertion({body:e,kind:t,negate:n},r,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+c3(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})`:Ee`\g<${t}&R=${r}>`}},o3=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),i3=new Set(["-","\\","]","^","["]),a3=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),m0=new Map([[9,Ee`\t`],[10,Ee`\n`],[11,Ee`\v`],[12,Ee`\f`],[13,Ee`\r`],[8232,Ee`\u2028`],[8233,Ee`\u2029`],[65279,Ee`\uFEFF`]]),l3=new RegExp("^\\p{Cased}$","u");function ey(e){return l3.test(e)}function Q_(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,o=e.max.value,i=[];if(r<65&&(o===65535||o>=131071)||r===65536&&o>=131071)return i;for(let a=r;a<=o;a++){const l=bt(a);if(!ey(l))continue;const s=G_(l).filter(u=>{const f=u.codePointAt(0);return f<r||f>o});if(s.length&&(i.push(...s),n))break}return i}function Ii(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(m0.has(e))return m0.get(e);if(e<32||e>126&&e<160||e>262143||t&&f3(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?r?a3:i3:o3,i=bt(e);return(o.has(i)?"\\":"")+i}function s3(e){const t=e.map(o=>o.codePointAt(0)).sort((o,i)=>o-i),n=[];let r=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?r??(r=t[o]):r===null?n.push(t[o]):(n.push([r,t[o]]),r=null);return n}function u3(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:o,disable:i}=t;r=(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")+(i?"-":"")+(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")}return`${r}:`}function c3({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 y0({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function f3(e){return e>47&&e<58}function v0({type:e,value:t}){return e==="Character"&&t===45}var ao,xr,ni,lo,ri,us,Qp,Oo,d3=(Oo=class extends RegExp{constructor(n,r,o){var t=(...n4)=>(super(...n4),Go(this,us),Go(this,ao,new Map),Go(this,xr,null),Go(this,ni),Go(this,lo,null),Go(this,ri,null),z(this,"rawOptions",{}),this);const i=!!(o!=null&&o.lazyCompile);if(n instanceof RegExp){if(o)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),Hn(this,ni,a.source),a instanceof Oo&&(Hn(this,ao,Ft(a,ao)),Hn(this,lo,Ft(a,lo)),Hn(this,ri,Ft(a,ri)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...o};t(i?"":n,r),Hn(this,ni,n),Hn(this,ao,p3(a.hiddenCaptures,a.transfers)),Hn(this,ri,a.strategy),this.rawOptions=o??{}}i||Hn(this,xr,this)}get source(){return Ft(this,ni)||"(?:)"}exec(n){if(!Ft(this,xr)){const{lazyCompile:i,...a}=this.rawOptions;Hn(this,xr,new Oo(Ft(this,ni),this.flags,a))}const r=this.global||this.sticky,o=this.lastIndex;if(Ft(this,ri)==="clip_search"&&r&&o){this.lastIndex=0;const i=nd(this,us,Qp).call(this,n.slice(o));return i&&(h3(i,o,n,this.hasIndices),this.lastIndex+=o),i}return nd(this,us,Qp).call(this,n)}},ao=new WeakMap,xr=new WeakMap,ni=new WeakMap,lo=new WeakMap,ri=new WeakMap,us=new WeakSet,Qp=function(n){Ft(this,xr).lastIndex=this.lastIndex;const r=dy(Oo.prototype,this,"exec").call(Ft(this,xr),n);if(this.lastIndex=Ft(this,xr).lastIndex,!r||!Ft(this,ao).size)return r;const o=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const a=[0];for(let l=1;l<o.length;l++){const{hidden:s,transferTo:u}=Ft(this,ao).get(l)??{};if(s?a.push(null):(a.push(r.length),r.push(o[l]),this.hasIndices&&r.indices.push(i[l])),u&&o[l]!==void 0){const f=a[u];if(!f)throw new Error(`Invalid capture transfer to "${f}"`);if(r[f]=o[l],this.hasIndices&&(r.indices[f]=i[l]),r.groups){Ft(this,lo)||Hn(this,lo,g3(this.source));const c=Ft(this,lo).get(u);c&&(r.groups[c]=o[l],this.hasIndices&&(r.indices.groups[c]=i[l]))}}}return r},Oo);function h3(e,t,n,r){if(e.index+=t,e.input=n,r){const o=e.indices;for(let a=0;a<o.length;a++){const l=o[a];l&&(o[a]=[l[0]+t,l[1]+t])}const i=o.groups;i&&Object.keys(i).forEach(a=>{const l=i[a];l&&(i[a]=[l[0]+t,l[1]+t])})}}function p3(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,o]of t)for(const i of o)as(n,i,{}).transferTo=r;return n}function g3(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,o=0,i;for(;i=t.exec(e);){const{0:a,groups:{capture:l,name:s}}=i;a==="["?r++:r?a==="]"&&r--:l&&(o++,s&&n.set(o,s))}return n}function m3(e,t){const n=y3(e,t);return n.options?new d3(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function y3(e,t){const n=H_(t),r=D_(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Jm}),o=Vz(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=t3(o,n),a=Dz(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),l=kz(a.pattern),s=Mz(l.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),u={pattern:s.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const f=s.hiddenCaptures.sort((m,v)=>m-v),c=Array.from(s.captureTransfers),d=o._strategy,h=u.pattern.length>=n.lazyCompileLength;(f.length||c.length||d||h)&&(u.options={...f.length&&{hiddenCaptures:f},...c.length&&{transfers:c},...d&&{strategy:d},...h&&{lazyCompile:h}})}return u}function v3(e,t){return m3(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Z_(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>v3(n,{target:t.target})),{createScanner(n){return new NI(n,t)},createString(n){return{content:n}}}}var ty=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function b3(){return 2147483648}function S3(){return typeof performance<"u"?performance.now():Date.now()}const E3=(e,t)=>e+(t-e%t)%t;async function w3(e){let t,n;const r={};function o(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,m,v){r.HEAPU8.copyWithin(h,m,m+v)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function l(h){const m=r.HEAPU8.length;h=h>>>0;const v=b3();if(h>v)return!1;for(let E=1;E<=4;E*=2){let y=m*(1+.2/E);y=Math.min(y,h+100663296);const p=Math.min(v,E3(Math.max(h,y),65536));if(a(p))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,v=1024){const E=m+v;let y=m;for(;h[y]&&!(y>=E);)++y;if(y-m>16&&h.buffer&&s)return s.decode(h.subarray(m,y));let p="";for(;m<y;){let b=h[m++];if(!(b&128)){p+=String.fromCharCode(b);continue}const S=h[m++]&63;if((b&224)===192){p+=String.fromCharCode((b&31)<<6|S);continue}const w=h[m++]&63;if((b&240)===224?b=(b&15)<<12|S<<6|w:b=(b&7)<<18|S<<12|w<<6|h[m++]&63,b<65536)p+=String.fromCharCode(b);else{const C=b-65536;p+=String.fromCharCode(55296|C>>10,56320|C&1023)}}return p}function f(h,m){return h?u(r.HEAPU8,h,m):""}const c={emscripten_get_now:S3,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function d(){const m=await e({env:c,wasi_snapshot_preview1:c});t=m.memory,o(t.buffer),Object.assign(r,m),r.UTF8ToString=f}return await d(),r}var R3=Object.defineProperty,C3=(e,t,n)=>t in e?R3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t,n)=>C3(e,typeof t!="symbol"?t+"":t,n);let _t=null;function _3(e){throw new ty(e.UTF8ToString(e.getLastOnigError()))}class Gf{constructor(t){St(this,"utf16Length"),St(this,"utf8Length"),St(this,"utf16Value"),St(this,"utf8Value"),St(this,"utf16OffsetToUtf8"),St(this,"utf8OffsetToUtf16");const n=t.length,r=Gf._utf8ByteLength(t),o=r!==n,i=o?new Uint32Array(n+1):null;o&&(i[n]=r);const a=o?new Uint32Array(r+1):null;o&&(a[r]=n);const l=new Uint8Array(r);let s=0;for(let u=0;u<n;u++){const f=t.charCodeAt(u);let c=f,d=!1;if(f>=55296&&f<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(c=(f-55296<<10)+65536|h-56320,d=!0)}o&&(i[u]=s,d&&(i[u+1]=s),c<=127?a[s+0]=u:c<=2047?(a[s+0]=u,a[s+1]=u):c<=65535?(a[s+0]=u,a[s+1]=u,a[s+2]=u):(a[s+0]=u,a[s+1]=u,a[s+2]=u,a[s+3]=u)),c<=127?l[s++]=c:c<=2047?(l[s++]=192|(c&1984)>>>6,l[s++]=128|(c&63)>>>0):c<=65535?(l[s++]=224|(c&61440)>>>12,l[s++]=128|(c&4032)>>>6,l[s++]=128|(c&63)>>>0):(l[s++]=240|(c&1835008)>>>18,l[s++]=128|(c&258048)>>>12,l[s++]=128|(c&4032)>>>6,l[s++]=128|(c&63)>>>0),d&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,o=t.length;r<o;r++){const i=t.charCodeAt(r);let a=i,l=!1;if(i>=55296&&i<=56319&&r+1<o){const s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(a=(i-55296<<10)+65536|s-56320,l=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,l&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const jf=class er{constructor(t){if(St(this,"id",++er.LAST_ID),St(this,"_onigBinding"),St(this,"content"),St(this,"utf16Length"),St(this,"utf8Length"),St(this,"utf16OffsetToUtf8"),St(this,"utf8OffsetToUtf16"),St(this,"ptr"),!_t)throw new ty("Must invoke loadWasm first.");this._onigBinding=_t,this.content=t;const n=new Gf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!er._sharedPtrInUse?(er._sharedPtr||(er._sharedPtr=_t.omalloc(1e4)),er._sharedPtrInUse=!0,_t.HEAPU8.set(n.utf8Value,er._sharedPtr),this.ptr=er._sharedPtr):this.ptr=n.createString(_t)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===er._sharedPtr?er._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};St(jf,"LAST_ID",0);St(jf,"_sharedPtr",0);St(jf,"_sharedPtrInUse",!1);let W_=jf;class x3{constructor(t){if(St(this,"_onigBinding"),St(this,"_ptr"),!_t)throw new ty("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,s=t.length;l<s;l++){const u=new Gf(t[l]);n[l]=u.createString(_t),r[l]=u.utf8Length}const o=_t.omalloc(4*t.length);_t.HEAPU32.set(n,o/4);const i=_t.omalloc(4*t.length);_t.HEAPU32.set(r,i/4);const a=_t.createOnigScanner(o,i,t.length);for(let l=0,s=t.length;l<s;l++)_t.ofree(n[l]);_t.ofree(i),_t.ofree(o),a===0&&_3(_t),this._onigBinding=_t,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof t=="string"){t=new W_(t);const i=this._findNextMatchSync(t,n,!1,o);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,r,o){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(a===0)return null;const l=i.HEAPU32;let s=a/4;const u=l[s++],f=l[s++],c=[];for(let d=0;d<f;d++){const h=t.convertUtf8OffsetToUtf16(l[s++]),m=t.convertUtf8OffsetToUtf16(l[s++]);c[d]={start:h,end:m,length:m-h}}return{index:u,captureIndices:c}}}function T3(e){return typeof e.instantiator=="function"}function A3(e){return typeof e.default=="function"}function O3(e){return typeof e.data<"u"}function M3(e){return typeof Response<"u"&&e instanceof Response}function k3(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let gu;function ny(e){if(gu)return gu;async function t(){_t=await w3(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),T3(r)?r=await r.instantiator(n):A3(r)?r=await r.default(n):(O3(r)&&(r=r.data),M3(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await L3(r)(n):r=await D3(r)(n):k3(r)?r=await gh(r)(n):r instanceof WebAssembly.Module?r=await gh(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await gh(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return gu=t(),gu}function gh(e){return t=>WebAssembly.instantiate(e,t)}function L3(e){return t=>WebAssembly.instantiateStreaming(e,t)}function D3(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let J_;function N3(e){J_=e}function P3(){return J_}async function ex(e){return e&&await ny(e),{createScanner(t){return new x3(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new W_(t)}}}const I3=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:ex,getDefaultWasmLoader:P3,loadWasm:ny,setDefaultWasmLoader:N3},Symbol.toStringTag,{value:"Module"}));var z3=HN({});jN(z3,I3);const tx=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>V(()=>import("./andromeeda-C4gqWexZ.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>V(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>V(()=>import("./ayu-dark-DYE7WIF3.js"),[])},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>V(()=>import("./ayu-light-BA47KaF1.js"),[])},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>V(()=>import("./ayu-mirage-32ctXXKs.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>V(()=>import("./catppuccin-frappe-DFWUc33u.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>V(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>V(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>V(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>V(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>V(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>V(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>V(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>V(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>V(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>V(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>V(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>V(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>V(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>V(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>V(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>V(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>V(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>V(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>V(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>V(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>V(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[])},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>V(()=>import("./horizon-BUw7H-hv.js"),[])},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>V(()=>import("./horizon-bright-CUuTKBJd.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>V(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>V(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>V(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>V(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>V(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>V(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>V(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>V(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>V(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>V(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>V(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>V(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>V(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>V(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>V(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>V(()=>import("./night-owl-light-CMTm3GFP.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>V(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>V(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>V(()=>import("./one-light-C3Wv6jpd.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>V(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>V(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>V(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>V(()=>import("./rose-pine-qdsjHGoJ.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>V(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>V(()=>import("./rose-pine-moon-D4_iv3hh.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>V(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>V(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>V(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>V(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>V(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>V(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>V(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>V(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>V(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>V(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>V(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],nx=Object.fromEntries(tx.map(e=>[e.id,e.import])),Vf=[{id:"markdown",name:"Markdown",aliases:["md"],import:()=>V(()=>import("./markdown-CKXSK5AY.js"),[])},{id:"mdx",name:"MDX",import:()=>V(()=>import("./mdx-BWRhHdFl.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>V(()=>import("./javascript-XPxc2APE.js"),[])},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>V(()=>import("./typescript-DttGkNCf.js"),[])},{id:"jsx",name:"JSX",import:()=>V(()=>import("./jsx-BGEKFWBk.js"),[])},{id:"tsx",name:"TSX",import:()=>V(()=>import("./tsx-Dio8iE-N.js"),[])},{id:"html",name:"HTML",import:()=>V(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]))},{id:"css",name:"CSS",import:()=>V(()=>import("./css-CLj8gQPS.js"),[])},{id:"scss",name:"SCSS",import:()=>V(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([3,2]))},{id:"less",name:"Less",import:()=>V(()=>import("./less-C76OjOdF.js"),[])},{id:"vue",name:"Vue",import:()=>V(()=>import("./vue-DMJtu8ND.js"),__vite__mapDeps([4,2,1,5,6,0]))},{id:"svelte",name:"Svelte",import:()=>V(()=>import("./svelte-DR4MIrkg.js"),__vite__mapDeps([7,1,5,2]))},{id:"json",name:"JSON",import:()=>V(()=>import("./json-CjLXzM_z.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>V(()=>import("./jsonc-BYi4HS05.js"),[])},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>V(()=>import("./yaml-B92AUxDB.js"),[])},{id:"toml",name:"TOML",import:()=>V(()=>import("./toml-Btlk-g9G.js"),[])},{id:"xml",name:"XML",import:()=>V(()=>import("./xml-DtyAt_xK.js"),__vite__mapDeps([8,9]))},{id:"ini",name:"INI",aliases:["properties"],import:()=>V(()=>import("./ini-DOGW4-0C.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>V(()=>import("./python-DgE28U1V.js"),[])},{id:"java",name:"Java",import:()=>V(()=>import("./java-B2AjWfgk.js"),[])},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>V(()=>import("./kotlin-DwKqsDKK.js"),[])},{id:"go",name:"Go",import:()=>V(()=>import("./go-C27-OAKa.js"),[])},{id:"rust",name:"Rust",aliases:["rs"],import:()=>V(()=>import("./rust-DJErdhjk.js"),[])},{id:"c",name:"C",import:()=>V(()=>import("./c-CyUOlKFr.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>V(()=>import("./cpp-Bp17OOWP.js"),__vite__mapDeps([10,11,12]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>V(()=>import("./csharp-DieIJxYJ.js"),[])},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>V(()=>import("./ruby-CM5gBc7p.js"),__vite__mapDeps([13,0,1,2,8,9,12,14,5,15,16,10,11,17,18,19]))},{id:"php",name:"PHP",import:()=>V(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([20,0,1,2,8,9,12,6]))},{id:"swift",name:"Swift",import:()=>V(()=>import("./swift-DjrYMa62.js"),[])},{id:"lua",name:"Lua",import:()=>V(()=>import("./lua-JmSlR1pZ.js"),__vite__mapDeps([18,11]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>V(()=>import("./shellscript-CE-5zpiL.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>V(()=>import("./shellsession-BhddCRKA.js"),__vite__mapDeps([21,17]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>V(()=>import("./powershell-DdRAnR4Z.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>V(()=>import("./docker-DIG_IqVK.js"),[])},{id:"nginx",name:"Nginx",import:()=>V(()=>import("./nginx-bBKbG2uI.js"),__vite__mapDeps([22,18,11]))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>V(()=>import("./make-s9FKP0VE.js"),[])},{id:"cmake",name:"CMake",import:()=>V(()=>import("./cmake-Cv5ljclQ.js"),[])},{id:"sql",name:"SQL",import:()=>V(()=>import("./sql-CKXjX23X.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>V(()=>import("./graphql-By4-2MiP.js"),__vite__mapDeps([14,1,5,15,16]))},{id:"diff",name:"Diff",import:()=>V(()=>import("./diff-BlzBhZx2.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>V(()=>import("./proto-BZ_yZy5q.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>V(()=>import("./wasm-LUzQYg3H.js"),[])}],rx=Vf,ox=Object.fromEntries(Vf.map(e=>[e.id,e.import])),B3=Object.fromEntries(Vf.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))??[]})),ix={...ox,...B3},U3=ox,$3=Object.fromEntries(rx.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.id]))??[]})),ax=MI({langs:ix,themes:nx,engine:Z_}),{codeToHtml:H3,codeToHast:G3,codeToTokensBase:j3,codeToTokens:V3,codeToTokensWithThemes:F3,getSingletonHighlighter:q3,getLastGrammarState:Y3}=LI(ax),YU=Object.freeze(Object.defineProperty({__proto__:null,bundledLanguages:ix,bundledLanguagesAlias:$3,bundledLanguagesBase:U3,bundledLanguagesInfo:rx,bundledThemes:nx,bundledThemesInfo:tx,codeToHast:G3,codeToHtml:H3,codeToTokens:V3,codeToTokensBase:j3,codeToTokensWithThemes:F3,createCssVariablesTheme:DI,createHighlighter:ax,createJavaScriptRegexEngine:Z_,createOnigurumaEngine:ex,getLastGrammarState:Y3,getSingletonHighlighter:q3,getTokenStyleObject:is,loadWasm:ny,normalizeTheme:Pf,stringifyTokenStyle:Bc,supportedLanguagesInfo:Vf},Symbol.toStringTag,{value:"Module"})),lx=g.createContext(void 0);function Uo(e){const t=g.useContext(lx);if(t===void 0&&!e)throw new Error(et(47));return t}function X3(){return{...Nm(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const K3={...Pm,disabled:fe(e=>e.disabled),instantType:fe(e=>e.instantType),openMethod:fe(e=>e.openMethod),openChangeReason:fe(e=>e.openChangeReason),modal:fe(e=>e.modal),stickIfOpen:fe(e=>e.stickIfOpen),titleElementId:fe(e=>e.titleElementId),descriptionElementId:fe(e=>e.descriptionElementId),openOnHover:fe(e=>e.openOnHover),closeDelay:fe(e=>e.closeDelay)};class Ff extends Rf{constructor(n){const r={...X3(),...n};r.open&&(n==null?void 0:n.mounted)===void 0&&(r.mounted=!0);super(r,{popupRef:g.createRef(),backdropRef:g.createRef(),internalBackdropRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:g.createRef(),beforeContentFocusGuardRef:g.createRef(),stickIfOpenTimeout:new Zn,triggerElements:new Os},K3);z(this,"setOpen",(n,r)=>{var f,c;const o=r.reason===yt,i=r.reason===Yn&&r.event.detail===0,a=!n&&(r.reason===Ts||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(c=(f=this.context).onOpenChange)==null||c.call(f,n,r),r.isCanceled)return;const l={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger},s=this.state.floatingRootContext.context.events;s==null||s.emit("openchange",l);const u=()=>{var m;const d={open:n,openChangeReason:r.reason},h=((m=r.trigger)==null?void 0:m.id)??null;(h||n)&&(d.activeTriggerId=h,d.activeTriggerElement=r.trigger??null),this.update(d)};o?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(NR,()=>{this.set("stickIfOpen",!1)}),zt.flushSync(u)):u(),i||a?this.set("instantType",i?"click":"dismiss"):r.reason===Vr?this.set("instantType","focus"):this.set("instantType",void 0)});z(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(n,r){const o=an(()=>n??new Ff(r)).current;return cm(o.disposeEffect),o}}function b0({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:a=!1,handle:l,triggerId:s,defaultTriggerId:u=null}=e,f=Ff.useStore(l==null?void 0:l.store,{open:n??r,modal:a,activeTriggerId:s!==void 0?s:u});f.useControlledProp("open",n,r),f.useControlledProp("activeTriggerId",s,u);const c=f.useState("open"),d=f.useState("positionerElement"),h=f.useState("payload"),m=f.useState("openChangeReason");f.useContextCallback("onOpenChange",o),f.useContextCallback("onOpenChangeComplete",i);const{openMethod:v,triggerProps:E,reset:y}=zC(c);Lm(f);const{forceUnmount:p}=Dm(c,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null}),y()});PC(c&&a===!0&&m!==yt&&v!=="touch",d),g.useEffect(()=>{c||f.context.stickIfOpenTimeout.clear()},[f,c]);const b=g.useCallback(M=>{const x=xe(M);return x.preventUnmountOnClose=()=>{f.set("preventUnmountingOnClose",!0)},x},[f]),S=g.useCallback(()=>{f.setOpen(!1,b(yi))},[f,b]);g.useImperativeHandle(e.actionsRef,()=>({unmount:p,close:S}),[p,S]);const w=Im({popupStore:f,onOpenChange:f.setOpen}),C=Om(w,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),R=uC(w),{getReferenceProps:T,getFloatingProps:O,getTriggerProps:L}=qa([C,R]),I=g.useMemo(()=>T(E),[T,E]),B=g.useMemo(()=>L(E),[L,E]),A=g.useMemo(()=>O(),[O]);f.useSyncedValues({modal:a,openMethod:v,activeTriggerProps:I,inactiveTriggerProps:B,popupProps:A,floatingRootContext:w,nested:pr()!=null});const D=g.useMemo(()=>({store:f}),[f]);return ee.jsx(lx.Provider,{value:D,children:typeof t=="function"?t({payload:h}):t})}function XU(e){return Uo(!0)?ee.jsx(b0,{props:e}):ee.jsx(LR,{children:ee.jsx(b0,{props:e})})}const Q3=300,KU=g.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,handle:l,payload:s,openOnHover:u=!1,delay:f=Q3,closeDelay:c=0,id:d,...h}=t,m=Uo(!0),v=(l==null?void 0:l.store)??(m==null?void 0:m.store);if(!v)throw new Error(et(74));const E=Mi(d),y=v.useState("isTriggerActive",E),p=v.useState("floatingRootContext"),b=v.useState("isOpenedByTrigger",E),S=g.useRef(null),{registerTrigger:w,isMountedByThisTrigger:C}=km(E,S,v,{payload:s,disabled:i,openOnHover:u,closeDelay:c}),R=v.useState("openChangeReason"),T=v.useState("stickIfOpen"),O=v.useState("openMethod"),L=Cf(p,{enabled:p!=null&&u&&(O!=="touch"||R!==Yn),mouseOnly:!0,move:!1,handleClose:xf(),restMs:f,delay:{close:c},triggerElementRef:S,isActiveTrigger:y}),I=Tm(p,{enabled:p!=null,stickIfOpen:T}),B=qa([I]),A=v.useState("triggerProps",C),D=g.useMemo(()=>({disabled:i,open:b}),[i,b]),{getButtonProps:M,buttonRef:x}=Ls({disabled:i,native:a}),N=g.useMemo(()=>({open(U){return U&&R===Yn?Lp.open(U):Um.open(U)}}),[R]),_=Ue("button",t,{state:D,ref:[x,n,w,S],props:[B.getReferenceProps(),L,A,{[PR]:"",id:E},h,M],stateAttributesMapping:N}),k=g.useRef(null),P=W(U=>{zt.flushSync(()=>{v.setOpen(!1,xe(Vr,U.nativeEvent,U.currentTarget))});const G=TR(k.current);G==null||G.focus()}),q=W(U=>{var ue;const G=v.select("positionerElement");if(G&&ci(U,G))(ue=v.context.beforeContentFocusGuardRef.current)==null||ue.focus();else{zt.flushSync(()=>{v.setOpen(!1,xe(Vr,U.nativeEvent,U.currentTarget))});let te=xR(S.current);for(;te!==null&&Re(G,te)||te!=null&&te.hasAttribute("aria-hidden");){const ce=te;if(te=Sf(te),te===ce)break}te==null||te.focus()}});return y?ee.jsxs(g.Fragment,{children:[ee.jsx(Xn,{ref:k,onFocus:P}),ee.jsx(g.Fragment,{children:_},E),ee.jsx(Xn,{ref:v.context.triggerFocusTargetRef,onFocus:q})]}):ee.jsx(g.Fragment,{children:_},E)}),sx=g.createContext(void 0);function Z3(){const e=g.useContext(sx);if(e===void 0)throw new Error(et(45));return e}const QU=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=Uo();return i.useState("mounted")||r?ee.jsx(sx.Provider,{value:r,children:ee.jsx(GR,{ref:n,...o,renderGuards:!1})}):null}),ux=g.createContext(void 0);function cx(){const e=g.useContext(ux);if(!e)throw new Error(et(46));return e}const ZU=g.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:l="bottom",align:s="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:E=Sm,...y}=t,{store:p}=Uo(),b=Z3(),S=bm(),w=p.useState("floatingRootContext"),C=p.useState("mounted"),R=p.useState("open"),T=p.useState("openChangeReason"),O=p.useState("activeTriggerElement"),L=p.useState("modal"),I=p.useState("positionerElement"),B=p.useState("instantType"),A=p.useState("transitionStatus"),D=g.useRef(null),M=As(I,!1,!1),x=$m({anchor:i,floatingRootContext:w,positionMethod:a,mounted:C,side:l,sideOffset:u,align:s,alignOffset:f,arrowPadding:h,collisionBoundary:c,collisionPadding:d,sticky:m,disableAnchorTracking:v,keepMounted:b,nodeId:S,collisionAvoidance:E,adaptiveOrigin:pC}),N=g.useMemo(()=>{const G={};return R||(G.pointerEvents="none"),{role:"presentation",hidden:!C,style:{...x.positionerStyles,...G}}},[R,C,x.positionerStyles]),_=g.useMemo(()=>({props:N,...x}),[N,x]),k=w==null?void 0:w.select("domReferenceElement");ie(()=>{const G=k,ue=D.current;if(G&&(D.current=G),ue&&G&&G!==ue){p.set("instantType",void 0);const te=new AbortController;return M(()=>{p.set("instantType","trigger-change")},te.signal),()=>{te.abort()}}},[k,M,p]);const P=g.useMemo(()=>({open:R,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:B}),[R,_.side,_.align,_.anchorHidden,B]),q=g.useCallback(G=>{p.set("positionerElement",G)},[p]),U=Ue("div",t,{state:P,props:[_.props,Ms(A),y],ref:[n,q],stateAttributesMapping:Xr});return ee.jsxs(ux.Provider,{value:_,children:[C&&L===!0&&T!==yt&&ee.jsx(NC,{ref:p.context.internalBackdropRef,inert:ks(!R),cutout:O}),ee.jsx(kR,{id:S,children:U})]})}),W3={...Xr,...Ya},WU=g.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:a,...l}=t,{store:s}=Uo(),u=cx(),f=_C()!=null,c=Af(),d=s.useState("open"),h=s.useState("openMethod"),m=s.useState("instantType"),v=s.useState("transitionStatus"),E=s.useState("popupProps"),y=s.useState("titleElementId"),p=s.useState("descriptionElementId"),b=s.useState("modal"),S=s.useState("mounted"),w=s.useState("openChangeReason"),C=s.useState("popupElement"),R=s.useState("payload"),T=s.useState("positionerElement"),O=s.useState("activeTriggerElement"),L=s.useState("floatingRootContext");Fa({open:d,ref:s.context.popupRef,onComplete(){var U,G;d&&((G=(U=s.context).onOpenChangeComplete)==null||G.call(U,!0))}});const I=s.useState("disabled"),B=s.useState("openOnHover"),A=s.useState("closeDelay");zm(L,{enabled:B&&!I,closeDelay:A});function D(U){return U==="touch"?s.context.popupRef.current:!0}const M=i===void 0?D:i,x=g.useMemo(()=>({open:d,side:u.side,align:u.align,instant:m,transitionStatus:v}),[d,u.side,u.align,m,v]),N=g.useCallback(U=>{s.set("popupElement",U)},[s]);function _(){L.context.events.emit("measure-layout")}function k(U,G){L.context.events.emit("measure-layout-complete",{previousDimensions:U,nextDimensions:G})}const P=g.useCallback(()=>s.context.triggerElements.size>1,[s]);mC({popupElement:C,positionerElement:T,mounted:S,content:R,enabled:P,onMeasureLayout:_,onMeasureLayoutComplete:k,side:u.side,direction:c});const q=Ue("div",t,{state:x,ref:[n,s.context.popupRef,N],props:[E,{"aria-labelledby":y,"aria-describedby":p,onKeyDown(U){f&&LC.has(U.key)&&U.stopPropagation()}},Ms(v),l],stateAttributesMapping:W3});return ee.jsx(jR,{context:L,openInteractionType:h,modal:b==="trap-focus",disabled:!S||w===yt,initialFocus:M,returnFocus:a,restoreFocus:"popup",previousFocusableElement:tt(O)?O:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:q})}),JU=g.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=Uo(),l=a.useState("open"),{arrowRef:s,side:u,align:f,arrowUncentered:c,arrowStyles:d}=cx(),h=g.useMemo(()=>({open:l,side:u,align:f,uncentered:c}),[l,u,f,c]);return Ue("div",t,{state:h,ref:[n,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:Xr})}),J3={...Xr,...Ya},e$=g.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=Uo(),l=a.useState("open"),s=a.useState("mounted"),u=a.useState("transitionStatus"),f=a.useState("openChangeReason"),c=g.useMemo(()=>({open:l,transitionStatus:u}),[l,u]);return Ue("div",t,{state:c,ref:[a.context.backdropRef,n],props:[{role:"presentation",hidden:!s,style:{pointerEvents:f===yt?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:J3})});let S0=function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e}({});const eB={activationDirection:e=>e?{"data-activation-direction":e}:null},t$=g.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{store:l}=Uo(),s=l.useState("activeTriggerElement"),u=l.useState("open"),f=l.useState("floatingRootContext"),c=yC(u?s:null),d=g.useRef(null),[h,m]=g.useState(null),[v,E]=g.useState(null),y=g.useRef(null),p=g.useRef(null),b=As(y,!0,!1),S=Oi(),[w,C]=g.useState(null),[R,T]=g.useState(!1);ie(()=>{const M=y.current;if(!M)return;const x=document.createElement("div");for(const N of Array.from(M.childNodes))x.appendChild(N.cloneNode(!0));d.current=x});const O=W(()=>{var M,x,N;(M=y.current)==null||M.style.setProperty("animation","none"),(x=y.current)==null||x.style.setProperty("transition","none"),(N=p.current)==null||N.style.setProperty("display","none")}),L=W(M=>{var x,N,_;(x=y.current)==null||x.style.removeProperty("animation"),(N=y.current)==null||N.style.removeProperty("transition"),(_=p.current)==null||_.style.removeProperty("display"),w||C(M.previousDimensions)});g.useEffect(()=>(f.context.events.on("measure-layout",O),f.context.events.on("measure-layout-complete",L),()=>{f.context.events.off("measure-layout",O),f.context.events.off("measure-layout-complete",L)}),[f,O,L]);const I=g.useRef(null);ie(()=>{if(s&&c&&s!==c&&I.current!==s&&d.current){m(d.current),T(!0);const M=nB(c,s);E(M),S.request(()=>{S.request(()=>{T(!1),b(()=>{m(null),C(null),d.current=null})})}),I.current=s}},[s,c,h,b,S]);const B=h!=null;let A;B?A=ee.jsxs(g.Fragment,{children:[ee.jsx("div",{"data-previous":!0,inert:ks(!0),ref:p,style:{[S0.popupWidth]:`${w==null?void 0:w.width}px`,[S0.popupHeight]:`${w==null?void 0:w.height}px`,position:"absolute"},"data-ending-style":R?void 0:""},"previous"),ee.jsx("div",{"data-current":!0,ref:y,"data-starting-style":R?"":void 0,children:i},"current")]}):A=ee.jsx("div",{"data-current":!0,ref:y,children:i},"current"),ie(()=>{const M=p.current;!M||!h||M.replaceChildren(...Array.from(h.childNodes))},[h]);const D=g.useMemo(()=>({activationDirection:tB(v),transitioning:B}),[v,B]);return Ue("div",t,{state:D,ref:n,props:[a,{children:A}],stateAttributesMapping:eB})});function tB(e){if(e)return`${E0(e.horizontal,5,"right","left")} ${E0(e.vertical,5,"down","up")}`}function E0(e,t,n,r){return e>t?n:e<-t?r:""}function nB(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-o.x,vertical:i.y-o.y}}class rB{constructor(){this.store=new Ff}open(t){const n=t?this.store.context.triggerElements.getById(t)??void 0:void 0;if(t&&!n)throw new Error(et(80,t));this.store.setOpen(!0,xe(yi,void 0,n))}close(){this.store.setOpen(!1,xe(yi,void 0,void 0))}get isOpen(){return this.store.state.open}}function n$(){return new rB}let w0=0;function fx(e){return w0+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${w0}`}const ry=g.createContext(void 0);function oy(){const e=g.useContext(ry);if(!e)throw new Error(et(73));return e}function mh(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 r$=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,l]=g.useState([]),[s,u]=g.useState(!1),[f,c]=g.useState(!1),[d,h]=g.useState(null);a.length===0&&(s&&u(!1),f&&c(!1));const m=s||f,v=g.useRef(new Map),E=g.useRef(null),y=g.useRef(!0),p=g.useRef(!1);function b(A){var _,k;const D=en(Xt(E.current));if(!E.current||!Re(E.current,D)||!Sc(D))return;const M=a.findIndex(P=>P.id===A);let x=null,N=M+1;for(;N<a.length;){if(a[N].transitionStatus!=="ending"){x=a[N];break}N+=1}if(!x)for(N=M-1;N>=0;){if(a[N].transitionStatus!=="ending"){x=a[N];break}N-=1}x?(k=(_=x.ref)==null?void 0:_.current)==null||k.focus():d==null||d.focus({preventScroll:!0})}const S=W(()=>{p.current||(p.current=!0,v.current.forEach(A=>{if(A.timeout){A.timeout.clear();const D=Date.now()-A.start,M=A.delay-D;A.remaining=M>0?M:0}}))}),w=W(()=>{p.current&&(p.current=!1,v.current.forEach((A,D)=>{A.remaining=A.remaining>0?A.remaining:A.delay,A.timeout??(A.timeout=Zn.create()),A.timeout.start(A.remaining,()=>{v.current.delete(D),A.callback()}),A.start=Date.now()}))}),C=W(A=>{var x;l(N=>{const _=N.map(P=>P.id===A?{...P,transitionStatus:"ending",height:0}:P),k=_.filter(P=>P.transitionStatus!=="ending");return _.map(P=>{if(P.transitionStatus==="ending")return P;const q=k.indexOf(P)>=o;return{...P,limited:q}})});const D=v.current.get(A);D&&D.timeout&&(D.timeout.clear(),v.current.delete(A));const M=a.find(N=>N.id===A);(x=M==null?void 0:M.onClose)==null||x.call(M),b(A),a.length===1&&(u(!1),c(!1))}),R=W(A=>{var M;l(x=>x.filter(N=>N.id!==A));const D=a.find(x=>x.id===A);(M=D==null?void 0:D.onRemove)==null||M.call(D)}),T=W((A,D,M)=>{const x=Date.now(),N=y.current&&!s&&!f,_=N?Zn.create():void 0;_==null||_.start(D,()=>{v.current.delete(A),M()}),v.current.set(A,{timeout:_,start:N?x:0,delay:D,remaining:D,callback:M})}),O=W(A=>{const D=A.id||fx("toast"),M={...A,id:D,transitionStatus:"starting"};l(N=>{const _=[M,...N],k=_.filter(P=>P.transitionStatus!=="ending");if(k.length>o){const P=k.length-o,q=k.slice(-P);return _.map(U=>q.some(G=>G.id===U.id)?{...U,limited:!0}:{...U,limited:!1})}return _.map(P=>({...P,limited:!1}))});const x=M.timeout??r;return M.type!=="loading"&&x>0&&T(D,x,()=>C(D)),(s||f||!y.current)&&S(),D}),L=W((A,D)=>{l(M=>M.map(x=>x.id===A?{...x,...D}:x))}),I=W((A,D)=>{const M=mh(D.loading),x=O({...M,type:"loading"}),N=A.then(_=>{const k=mh(D.success,_);L(x,{...k,type:"success"});const P=k.timeout??r;return P>0&&T(x,P,()=>C(x)),(s||f||!y.current)&&S(),_}).catch(_=>{const k=mh(D.error,_);L(x,{...k,type:"error"});const P=k.timeout??r;return P>0&&T(x,P,()=>C(x)),(s||f||!y.current)&&S(),Promise.reject(_)});return{}.hasOwnProperty.call(D,"setPromise")&&D.setPromise(N),N});g.useEffect(function(){return i?i[" subscribe"](({action:M,options:x})=>{const N=x.id;M==="promise"&&x.promise?I(x.promise,x):M==="update"&&N?L(N,x):M==="close"&&N?C(N):O(x)}):void 0},[O,L,T,r,i,I,C]);const B=g.useMemo(()=>({toasts:a,setToasts:l,hovering:s,setHovering:u,focused:f,setFocused:c,expanded:m,add:O,close:C,remove:R,update:L,promise:I,pauseTimers:S,resumeTimers:w,prevFocusElement:d,setPrevFocusElement:h,viewportRef:E,scheduleTimer:T,windowFocusedRef:y}),[O,C,f,s,m,S,d,I,R,w,T,a,L]);return ee.jsx(ry.Provider,{value:B,children:n})},oB=g.createContext(void 0);let iB=function(e){return e.frontmostHeight="--toast-frontmost-height",e}({});const o$=g.forwardRef(function(t,n){var _;const{render:r,className:o,children:i,...a}=t,{toasts:l,pauseTimers:s,resumeTimers:u,setHovering:f,setFocused:c,viewportRef:d,windowFocusedRef:h,prevFocusElement:m,setPrevFocusElement:v,expanded:E,focused:y}=oy(),p=g.useRef(!1),b=g.useRef(!1),S=l.length,w=((_=l[0])==null?void 0:_.height)??0,C=g.useMemo(()=>l.some(k=>k.transitionStatus==="ending"),[l]);g.useEffect(()=>{if(!d.current)return;function k(q){var U;S!==0&&q.key==="F6"&&q.target!==d.current&&(q.preventDefault(),v(en(Xt(d.current))),(U=d.current)==null||U.focus({preventScroll:!0}),s(),c(!0))}const P=at(d.current);return P.addEventListener("keydown",k),()=>{P.removeEventListener("keydown",k)}},[s,c,v,S,d]),g.useEffect(()=>{if(!d.current||!S)return;const k=at(d.current);function P(U){U.target===k&&(h.current=!1,s())}function q(U){if(U.relatedTarget||U.target===k)return;const G=At(U),ue=en(Xt(d.current));(!Re(d.current,G)||!Sc(ue))&&u(),setTimeout(()=>{h.current=!0})}return k.addEventListener("blur",P,!0),k.addEventListener("focus",q,!0),()=>{k.removeEventListener("blur",P,!0),k.removeEventListener("focus",q,!0)}},[s,u,d,h,c,S]),g.useEffect(()=>{const k=d.current;if(!k||S===0)return;const P=Xt(k);function q(U){if(U.pointerType!=="touch")return;const G=At(U);Re(k,G)||(u(),f(!1),c(!1))}return P.addEventListener("pointerdown",q,!0),()=>{P.removeEventListener("pointerdown",q,!0)}},[S,u,c,f,d]);function R(k){var P,q,U;d.current&&(p.current=!0,k.relatedTarget===d.current?(U=(q=(P=l[0])==null?void 0:P.ref)==null?void 0:q.current)==null||U.focus():m==null||m.focus({preventScroll:!0}))}function T(k){k.key==="Tab"&&k.shiftKey&&k.target===d.current&&(k.preventDefault(),m==null||m.focus({preventScroll:!0}),u())}g.useEffect(()=>{!h.current||C||!b.current||(u(),f(!1),b.current=!1)},[C,u,f,h]);function O(){s(),f(!0),b.current=!1}function L(){l.some(k=>k.transitionStatus==="ending")?b.current=!0:(u(),f(!1))}function I(){if(p.current){p.current=!1;return}y||Sc(Xt(d.current).activeElement)&&(c(!0),s())}function B(k){!y||Re(d.current,k.relatedTarget)||(c(!1),u())}const A={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:O,onMouseMove:O,onMouseLeave:L,onFocus:I,onBlur:B,onKeyDown:T,onClick:I},D=g.useMemo(()=>({expanded:E}),[E]),M=Ue("div",t,{ref:[n,d],state:D,props:[A,{style:{[iB.frontmostHeight]:w?`${w}px`:void 0}},a,{children:ee.jsxs(g.Fragment,{children:[S>0&&m&&ee.jsx(Xn,{onFocus:R}),i,S>0&&m&&ee.jsx(Xn,{onFocus:R})]})}]}),x=g.useMemo(()=>({viewportRef:d}),[d]),N=g.useMemo(()=>l.filter(k=>k.priority==="high"),[l]);return ee.jsxs(oB.Provider,{value:x,children:[S>0&&m&&ee.jsx(Xn,{onFocus:R}),M,!y&&N.length>0&&ee.jsx("div",{style:Cm,children:N.map(k=>ee.jsxs("div",{role:"alert","aria-atomic":!0,children:[ee.jsx("div",{children:k.title}),ee.jsx("div",{children:k.description})]},k.id))})]})}),dx=g.createContext(void 0);function Si(){const e=g.useContext(dx);if(!e)throw new Error(et(66));return e}let qo=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 aB={...Ya,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},cl=40,lB=10,Zr=.5,sB=1;function R0(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 uB(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const l=a[1].split(", ").map(parseFloat);l.length===6?(r=l[4],o=l[5],i=Math.sqrt(l[0]*l[0]+l[1]*l[1])):l.length===16&&(r=l[12],o=l[13],i=l[0])}}return{x:r,y:o,scale:i}}const i$=g.forwardRef(function(t,n){var ae;const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...l}=t,s=((ae=r.positionerProps)==null?void 0:ae.anchor)!==void 0;let u=[];s||(u=Array.isArray(a)?a:[a]);const f=u.length>0,{toasts:c,focused:d,close:h,remove:m,setToasts:v,pauseTimers:E,expanded:y,setHovering:p}=oy(),[b,S]=g.useState(void 0),[w,C]=g.useState(!1),[R,T]=g.useState(!1),[O,L]=g.useState(!1),[I,B]=g.useState({x:0,y:0}),[A,D]=g.useState({x:0,y:0,scale:1}),[M,x]=g.useState(),[N,_]=g.useState(),[k,P]=g.useState(null),q=g.useRef(null),U=g.useRef({x:0,y:0}),G=g.useRef({x:0,y:0,scale:1}),ue=g.useRef(void 0),te=g.useRef(0),ce=g.useRef(!1),oe=g.useRef({x:0,y:0}),J=g.useRef(!1),Se=g.useMemo(()=>c.indexOf(r),[r,c]),Ae=g.useMemo(()=>c.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,c]),H=g.useMemo(()=>c.slice(0,c.indexOf(r)).reduce((j,Z)=>j+(Z.height||0),0),[c,r]);Fa({open:r.transitionStatus!=="ending",ref:q,onComplete(){r.transitionStatus==="ending"&&m(r.id)}});const Y=W((j=!1)=>{const Z=q.current;if(!Z)return;const ye=Z.style.height;Z.style.height="auto";const ge=Z.offsetHeight;Z.style.height=ye;function be(){v(Te=>Te.map(Ne=>Ne.id===r.id?{...Ne,ref:q,height:ge,transitionStatus:void 0}:Ne))}j?zt.flushSync(be):be()});ie(Y,[Y]);function ne(j,Z){let ye=j,ge=Z;return!u.includes("left")&&!u.includes("right")?ye=j>0?j**Zr:-(Math.abs(j)**Zr):(!u.includes("right")&&j>0&&(ye=j**Zr),!u.includes("left")&&j<0&&(ye=-(Math.abs(j)**Zr))),!u.includes("up")&&!u.includes("down")?ge=Z>0?Z**Zr:-(Math.abs(Z)**Zr):(!u.includes("down")&&Z>0&&(ge=Z**Zr),!u.includes("up")&&Z<0&&(ge=-(Math.abs(Z)**Zr))),{x:ye,y:ge}}function De(j){var ge;if(j.button!==0)return;j.pointerType==="touch"&&E();const Z=At(j.nativeEvent);if(!(Z&&Z.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(ce.current=!1,ue.current=void 0,te.current=0,U.current={x:j.clientX,y:j.clientY},oe.current=U.current,q.current){const be=uB(q.current);G.current=be,D(be),B({x:be.x,y:be.y})}p(!0),C(!0),T(!1),P(null),J.current=!0,(ge=q.current)==null||ge.setPointerCapture(j.pointerId)}}function pe(j){if(!w)return;j.preventDefault(),J.current&&(U.current={x:j.clientX,y:j.clientY},J.current=!1);const{clientY:Z,clientX:ye,movementX:ge,movementY:be}=j;(be<0&&Z>oe.current.y||be>0&&Z<oe.current.y)&&(oe.current={x:oe.current.x,y:Z}),(ge<0&&ye>oe.current.x||ge>0&&ye<oe.current.x)&&(oe.current={x:ye,y:oe.current.y});const Te=ye-U.current.x,Ne=Z-U.current.y,Gt=Z-oe.current.y,cn=ye-oe.current.x;if(!R&&Math.sqrt(Te*Te+Ne*Ne)>=sB&&(T(!0),k===null)){const Ie=u.includes("left")||u.includes("right"),st=u.includes("up")||u.includes("down");if(Ie&&st){const Vt=Math.abs(Te),rt=Math.abs(Ne);P(Vt>rt?"horizontal":"vertical")}}let he;if(!ue.current)k==="vertical"?Ne>0?he="down":Ne<0&&(he="up"):k==="horizontal"?Te>0?he="right":Te<0&&(he="left"):Math.abs(Te)>=Math.abs(Ne)?he=Te>0?"right":"left":he=Ne>0?"down":"up",he&&u.includes(he)&&(ue.current=he,te.current=R0(he,Te,Ne),S(he));else{const jt=ue.current,Ie=R0(jt,cn,Gt);Ie>cl?(ce.current=!1,S(jt)):!(u.includes("left")&&u.includes("right"))&&!(u.includes("up")&&u.includes("down"))&&te.current-Ie>=lB&&(ce.current=!0)}const Pe=ne(Te,Ne);let lt=G.current.x,Kr=G.current.y;k==="horizontal"?(u.includes("left")||u.includes("right"))&&(lt+=Pe.x):(k==="vertical"||(u.includes("left")||u.includes("right"))&&(lt+=Pe.x),(u.includes("up")||u.includes("down"))&&(Kr+=Pe.y)),B({x:lt,y:Kr})}function Q(j){var Te;if(!w)return;if(C(!1),T(!1),P(null),(Te=q.current)==null||Te.releasePointerCapture(j.pointerId),ce.current){B({x:A.x,y:A.y}),S(void 0);return}let Z=!1;const ye=I.x-A.x,ge=I.y-A.y;let be;for(const Ne of u){switch(Ne){case"right":ye>cl&&(Z=!0,be="right");break;case"left":ye<-cl&&(Z=!0,be="left");break;case"down":ge>cl&&(Z=!0,be="down");break;case"up":ge<-cl&&(Z=!0,be="up");break}if(Z)break}Z?(S(be),L(!0),h(r.id)):(B({x:A.x,y:A.y}),S(void 0))}function K(j){if(j.key==="Escape"){if(!q.current||!Re(q.current,en(Xt(q.current))))return;h(r.id)}}g.useEffect(()=>{if(!f)return;const j=q.current;if(!j)return;function Z(ye){Re(j,ye.target)&&ye.preventDefault()}return j.addEventListener("touchmove",Z,{passive:!1}),()=>{j.removeEventListener("touchmove",Z)}},[f]);function re(){if(!w&&I.x===A.x&&I.y===A.y&&!O)return{[qo.swipeMovementX]:"0px",[qo.swipeMovementY]:"0px"};const j=I.x-A.x,Z=I.y-A.y;return{transition:w?"none":void 0,transform:w?`translateX(${I.x}px) translateY(${I.y}px) scale(${A.scale})`:void 0,[qo.swipeMovementX]:`${j}px`,[qo.swipeMovementY]:`${Z}px`}}const de=r.priority==="high",me={role:de?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":N,"aria-hidden":de&&!d?!0:void 0,onPointerDown:f?De:void 0,onPointerMove:f?pe:void 0,onPointerUp:f?Q:void 0,onKeyDown:K,inert:ks(r.limited),style:{...re(),[qo.index]:r.transitionStatus==="ending"?Se:Ae,[qo.offsetY]:`${H}px`,[qo.height]:r.height?`${r.height}px`:void 0}},le=g.useMemo(()=>({rootRef:q,toast:r,titleId:M,setTitleId:x,descriptionId:N,setDescriptionId:_,swiping:w,swipeDirection:b,recalculateHeight:Y,index:Se,visibleIndex:Ae,expanded:y}),[r,M,N,w,b,Y,Se,Ae,y]),se=g.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:le.swiping,swipeDirection:le.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,le.swiping,le.swipeDirection]),X=Ue("div",t,{ref:[n,le.rootRef],state:se,stateAttributesMapping:aB,props:[me,l]});return ee.jsx(dx.Provider,{value:le,children:X})}),a$=g.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:l,recalculateHeight:s}=Si(),u=g.useRef(null);ie(()=>{const h=u.current;if(!h||(s(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const m=new ResizeObserver(()=>s(!0)),v=new MutationObserver(()=>s(!0));return m.observe(h),v.observe(h,{childList:!0,subtree:!0,characterData:!0}),()=>{m.disconnect(),v.disconnect()}},[s]);const f=a>0,c=g.useMemo(()=>({expanded:l,behind:f}),[l,f]);return Ue("div",t,{ref:[n,u],state:c,props:i})}),l$=g.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...l}=t,{toast:s}=Si(),u=a??s.description,f=!!u,c=Yr(i),{setDescriptionId:d}=Si();ie(()=>{if(f)return d(c),()=>{d(void 0)}},[f,c,d]);const h=g.useMemo(()=>({type:s.type}),[s.type]),m=Ue("p",t,{ref:n,state:h,props:{...l,id:c,children:u}});return f?m:null}),s$=g.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...l}=t,{toast:s}=Si(),u=a??s.title,f=!!u,c=Yr(i),{setTitleId:d}=Si();ie(()=>{if(f)return d(c),()=>{d(void 0)}},[f,c,d]);const h=g.useMemo(()=>({type:s.type}),[s.type]),m=Ue("h2",t,{ref:n,state:h,props:{...l,id:c,children:u}});return f?m:null}),u$=g.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...l}=t,{close:s,expanded:u}=oy(),{toast:f}=Si(),[c,d]=g.useState(!1),{getButtonProps:h,buttonRef:m}=Ls({disabled:i,native:a}),v=g.useMemo(()=>({type:f.type}),[f.type]);return Ue("button",t,{ref:[n,m],state:v,props:[{"aria-hidden":!u&&!c,onClick(){s(f.id)},onFocus(){d(!0)},onBlur(){d(!1)}},l,h]})}),c$=g.forwardRef(function(t,n){var v;const{render:r,className:o,disabled:i,nativeButton:a=!0,...l}=t,{toast:s}=Si(),u=((v=s.actionProps)==null?void 0:v.children)??l.children,f=!!u,{getButtonProps:c,buttonRef:d}=Ls({disabled:i,native:a}),h=g.useMemo(()=>({type:s.type}),[s.type]),m=Ue("button",t,{ref:[n,d],state:h,props:[l,s.actionProps,c,{children:u}]});return f?m:null}),f$=fC;function d$(){const e=g.useContext(ry);if(!e)throw new Error(et(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return g.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}function h$(){const e=[];function t(n){e.forEach(r=>r(n))}return{" subscribe":function(r){return e.push(r),()=>{const o=e.indexOf(r);o!==-1&&e.splice(o,1)}},add(n){const r=n.id||fx("toast"),o={...n,id:r,transitionStatus:"starting"};return t({action:"add",options:o}),r},close(n){t({action:"close",options:{id:n}})},update(n,r){t({action:"update",options:{...r,id:n}})},promise(n,r){let o=n;return t({action:"promise",options:{...r,promise:n,setPromise(i){o=i}}}),o}}}function qf(){return typeof window<"u"}function Za(e){return hx(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $o(e){var t;return(t=(hx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hx(e){return qf()?e instanceof Node||e instanceof En(e).Node:!1}function tn(e){return qf()?e instanceof Element||e instanceof En(e).Element:!1}function Ho(e){return qf()?e instanceof HTMLElement||e instanceof En(e).HTMLElement:!1}function C0(e){return!qf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof En(e).ShadowRoot}function Yf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function cB(e){return/^(table|td|th)$/.test(Za(e))}function Xf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fB=/transform|translate|scale|rotate|perspective|filter/,dB=/paint|layout|strict|content/,Yo=e=>!!e&&e!=="none";let yh;function iy(e){const t=tn(e)?ur(e):e;return Yo(t.transform)||Yo(t.translate)||Yo(t.scale)||Yo(t.rotate)||Yo(t.perspective)||!ay()&&(Yo(t.backdropFilter)||Yo(t.filter))||fB.test(t.willChange||"")||dB.test(t.contain||"")}function hB(e){let t=Ei(e);for(;Ho(t)&&!ls(t);){if(iy(t))return t;if(Xf(t))return null;t=Ei(t)}return null}function ay(){return yh==null&&(yh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yh}function ls(e){return/^(html|body|#document)$/.test(Za(e))}function ur(e){return En(e).getComputedStyle(e)}function Kf(e){return tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ei(e){if(Za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||C0(e)&&e.host||$o(e);return C0(t)?t.host:t}function px(e){const t=Ei(e);return ls(t)?(e.ownerDocument||e).body:Ho(t)&&Yf(t)?t:px(t)}function gx(e,t,n){var r;t===void 0&&(t=[]);const o=px(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=En(o);return i?(Zp(a),t.concat(a,a.visualViewport||[],Yf(o)?o:[],[])):t.concat(o,gx(o,[]))}function Zp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Wp=Math.min,da=Math.max,jc=Math.round,Ir=e=>({x:e,y:e}),pB={left:"right",right:"left",bottom:"top",top:"bottom"};function gB(e,t,n){return da(e,Wp(t,n))}function Qf(e,t){return typeof e=="function"?e(t):e}function La(e){return e.split("-")[0]}function Zf(e){return e.split("-")[1]}function mx(e){return e==="x"?"y":"x"}function yx(e){return e==="y"?"height":"width"}function go(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vx(e){return mx(go(e))}function mB(e,t,n){n===void 0&&(n=!1);const r=Zf(e),o=vx(e),i=yx(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Vc(a)),[a,Vc(a)]}function yB(e){const t=Vc(e);return[Jp(e),t,Jp(t)]}function Jp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _0=["left","right"],x0=["right","left"],vB=["top","bottom"],bB=["bottom","top"];function SB(e,t,n){switch(e){case"top":case"bottom":return n?t?x0:_0:t?_0:x0;case"left":case"right":return t?vB:bB;default:return[]}}function EB(e,t,n,r){const o=Zf(e);let i=SB(La(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Jp)))),i}function Vc(e){const t=La(e);return pB[t]+e.slice(t.length)}function wB(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function RB(e){return typeof e!="number"?wB(e):{top:e,right:e,bottom:e,left:e}}function Fc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var CB=typeof document<"u",_B=function(){},eg=CB?g.useLayoutEffect:_B;const xB={...Xc},TB=xB.useInsertionEffect,AB=TB||(e=>e());function OB(e){const t=g.useRef(()=>{});return AB(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function T0(e,t,n){let{reference:r,floating:o}=e;const i=go(t),a=vx(t),l=yx(a),s=La(t),u=i==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let h;switch(s){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}const m=Zf(t);return m&&(h[a]+=d*(m==="end"?1:-1)*(n&&u?-1:1)),h}async function MB(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:h=0}=Qf(t,e),m=RB(h),E=l[d?c==="floating"?"reference":"floating":c],y=Fc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(E)))==null||n?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:s})),p=c==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(b))&&await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1},w=Fc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:b,strategy:s}):p);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const kB=50,LB=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:MB},s=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=T0(u,r,s),d=r,h=0;const m={};for(let v=0;v<i.length;v++){const E=i[v];if(!E)continue;const{name:y,fn:p}=E,{x:b,y:S,data:w,reset:C}=await p({x:f,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=b??f,c=S??c,m[y]={...m[y],...w},C&&h<kB&&(h++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:c}=T0(u,d,s)),v=-1)}return{x:f,y:c,placement:d,strategy:o,middlewareData:m}},DB=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...E}=Qf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=La(o),p=go(l),b=La(l)===l,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),w=d||(b||!v?[Vc(l)]:yB(l)),C=m!=="none";!d&&C&&w.push(...EB(l,v,m,S));const R=[l,...w],T=await s.detectOverflow(t,E),O=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[y]),c){const D=mB(o,a,S);O.push(T[D[0]],T[D[1]])}if(L=[...L,{placement:o,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,M=R[D];if(M&&(!(c==="alignment"?p!==go(M):!1)||L.every(_=>go(_.placement)===p?_.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:M}};let x=(B=L.filter(N=>N.overflows[0]<=0).sort((N,_)=>N.overflows[1]-_.overflows[1])[0])==null?void 0:B.placement;if(!x)switch(h){case"bestFit":{var A;const N=(A=L.filter(_=>{if(C){const k=go(_.placement);return k===p||k==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(k=>k>0).reduce((k,P)=>k+P,0)]).sort((_,k)=>_[1]-k[1])[0])==null?void 0:A[0];N&&(x=N);break}case"initialPlacement":x=l;break}if(o!==x)return{reset:{placement:x}}}return{}}}},NB=new Set(["left","top"]);async function PB(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=La(n),l=Zf(n),s=go(n)==="y",u=NB.has(a)?-1:1,f=i&&s?-1:1,c=Qf(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof m=="number"&&(h=l==="end"?m*-1:m),s?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const IB=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await PB(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},zB=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:p=>{let{x:b,y:S}=p;return{x:b,y:S}}},...u}=Qf(e,t),f={x:n,y:r},c=await i.detectOverflow(t,u),d=go(o),h=mx(d);let m=f[h],v=f[d];const E=(p,b)=>gB(b+c[p==="y"?"top":"left"],b,b-c[p==="y"?"bottom":"right"]);a&&(m=E(h,m)),l&&(v=E(d,v));const y=s.fn({...t,[h]:m,[d]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:a,[d]:l}}}}}};function bx(e){const t=ur(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ho(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=jc(n)!==i||jc(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Sx(e){return tn(e)?e:e.contextElement}function ha(e){const t=Sx(e);if(!Ho(t))return Ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=bx(t);let a=(i?jc(n.width):n.width)/r,l=(i?jc(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const BB=Ir(0);function Ex(e){const t=En(e);return!ay()||!t.visualViewport?BB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UB(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===En(e)}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Sx(e);let a=Ir(1);t&&(r?tn(r)&&(a=ha(r)):a=ha(e));const l=UB(i,n,r)?Ex(i):Ir(0);let s=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,f=o.width/a.x,c=o.height/a.y;if(i&&r){const d=En(i),h=tn(r)?En(r):r;let m=d,v=Zp(m);for(;v&&h!==m;){const E=ha(v),y=v.getBoundingClientRect(),p=ur(v),b=y.left+(v.clientLeft+parseFloat(p.paddingLeft))*E.x,S=y.top+(v.clientTop+parseFloat(p.paddingTop))*E.y;s*=E.x,u*=E.y,f*=E.x,c*=E.y,s+=b,u+=S,m=En(v),v=Zp(m)}}return Fc({width:f,height:c,x:s,y:u})}function Wf(e,t){const n=Kf(e).scrollLeft;return t?t.left+n:ss($o(e)).left+n}function wx(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wf(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function $B(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=$o(r),l=t?Xf(t.floating):!1;if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},u=Ir(1);const f=Ir(0),c=Ho(r);if((c||!i)&&((Za(r)!=="body"||Yf(a))&&(s=Kf(r)),c)){const h=ss(r);u=ha(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const d=a&&!c&&!i?wx(a,s):Ir(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+f.x+d.x,y:n.y*u.y-s.scrollTop*u.y+f.y+d.y}}function HB(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function GB(e){const t=Kf(e),n=e.ownerDocument.body,r=da(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=da(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+Wf(e);const a=-t.scrollTop;return ur(n).direction==="rtl"&&(i+=da(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:a}}const jB=25;function VB(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=En(e),i=$o(e),a=o.visualViewport;let l=i.clientWidth,s=i.clientHeight,u=0,f=0;if(a){const d=!ay()||t==="fixed";r?d||(u=-a.offsetLeft,f=-a.offsetTop):(l=a.width,s=a.height,d&&(u=a.offsetLeft,f=a.offsetTop))}if(Wf(i)<=0){const d=i.ownerDocument,h=d.body,m=getComputedStyle(h),v=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,E=Math.abs(i.clientWidth-h.clientWidth-v),y=getComputedStyle(i).scrollbarGutter==="stable both-edges"?E/2:E;y<=jB&&(l-=y)}return{width:l,height:s,x:u,y:f}}function FB(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ha(e),a=e.clientWidth*i.x,l=e.clientHeight*i.y,s=o*i.x,u=r*i.y;return{width:a,height:l,x:s,y:u}}function A0(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=VB(e,n,t);else if(t==="document")r=GB($o(e));else if(tn(t))r=FB(t,n);else{const o=Ex(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fc(r)}function qB(e,t){const n=t.get(e);if(n)return n;let r=gx(e,[]).filter(l=>tn(l)&&Za(l)!=="body"),o=null;const i=ur(e).position==="fixed";let a=i?Ei(e):e;for(;tn(a)&&!ls(a);){const l=ur(a),s=iy(a),u=o?o.position:i?"fixed":"";!s&&(u==="fixed"||u==="absolute"&&l.position==="static")?r=r.filter(c=>c!==a):o=l,a=Ei(a)}return t.set(e,r),r}function YB(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Xf(t)?[]:qB(t,this._c):[].concat(n),r],l=A0(t,a[0],o);let s=l.top,u=l.right,f=l.bottom,c=l.left;for(let d=1;d<a.length;d++){const h=A0(t,a[d],o);s=da(h.top,s),u=Wp(h.right,u),f=Wp(h.bottom,f),c=da(h.left,c)}return{width:u-c,height:f-s,x:c,y:s}}function XB(e){const{width:t,height:n}=bx(e);return{width:t,height:n}}function KB(e,t,n){const r=Ho(t),o=$o(t),i=n==="fixed",a=ss(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Ir(0);if((r||!i)&&((Za(t)!=="body"||Yf(o))&&(l=Kf(t)),r)){const d=ss(t,!0,i,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}!r&&o&&(s.x=Wf(o));const u=o&&!r&&!i?wx(o,l):Ir(0),f=a.left+l.scrollLeft-s.x-u.x,c=a.top+l.scrollTop-s.y-u.y;return{x:f,y:c,width:a.width,height:a.height}}function vh(e){return ur(e).position==="static"}function O0(e,t){if(!Ho(e)||ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $o(e)===n&&(n=n.ownerDocument.body),n}function Rx(e,t){const n=En(e);if(Xf(e))return n;if(!Ho(e)){let o=Ei(e);for(;o&&!ls(o);){if(tn(o)&&!vh(o))return o;o=Ei(o)}return n}let r=O0(e,t);for(;r&&cB(r)&&vh(r);)r=O0(r,t);return r&&ls(r)&&vh(r)&&!iy(r)?n:r||hB(e)||n}const QB=async function(e){const t=this.getOffsetParent||Rx,n=this.getDimensions,r=await n(e.floating);return{reference:KB(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZB(e){return ur(e).direction==="rtl"}const WB={convertOffsetParentRelativeRectToViewportRelativeRect:$B,getDocumentElement:$o,getClippingRect:YB,getOffsetParent:Rx,getElementRects:QB,getClientRects:HB,getDimensions:XB,getScale:ha,isElement:tn,isRTL:ZB},JB=IB,eU=zB,tU=DB,nU=(e,t,n)=>{const r=new Map,o=n??{},i={...WB,...o.platform,_c:r};return LB(e,t,{...o,platform:i})};var rU=typeof document<"u",oU=function(){},Gu=rU?g.useLayoutEffect:oU;function qc(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,o;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(!qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!qc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Cx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function M0(e,t){const n=Cx(e);return Math.round(t*n)/n}function bh(e){const t=g.useRef(e);return Gu(()=>{t.current=e}),t}function iU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[f,c]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=g.useState(r);qc(d,r)||h(r);const[m,v]=g.useState(null),[E,y]=g.useState(null),p=g.useCallback(_=>{_!==C.current&&(C.current=_,v(_))},[]),b=g.useCallback(_=>{_!==R.current&&(R.current=_,y(_))},[]),S=i||m,w=a||E,C=g.useRef(null),R=g.useRef(null),T=g.useRef(f),O=s!=null,L=bh(s),I=bh(o),B=bh(u),A=g.useCallback(()=>{if(!C.current||!R.current)return;const _={placement:t,strategy:n,middleware:d};I.current&&(_.platform=I.current),nU(C.current,R.current,_).then(k=>{const P={...k,isPositioned:B.current!==!1};D.current&&!qc(T.current,P)&&(T.current=P,zt.flushSync(()=>{c(P)}))})},[d,t,n,I,B]);Gu(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(_=>({..._,isPositioned:!1})))},[u]);const D=g.useRef(!1);Gu(()=>(D.current=!0,()=>{D.current=!1}),[]),Gu(()=>{if(S&&(C.current=S),w&&(R.current=w),S&&w){if(L.current)return L.current(S,w,A);A()}},[S,w,A,L,O]);const M=g.useMemo(()=>({reference:C,floating:R,setReference:p,setFloating:b}),[p,b]),x=g.useMemo(()=>({reference:S,floating:w}),[S,w]),N=g.useMemo(()=>{const _={position:n,left:0,top:0};if(!x.floating)return _;const k=M0(x.floating,f.x),P=M0(x.floating,f.y);return l?{..._,transform:"translate("+k+"px, "+P+"px)",...Cx(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:P}},[n,l,x.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:A,refs:M,elements:x,floatingStyles:N}),[f,A,M,x,N])}const p$=(e,t)=>{const n=JB(e);return{name:n.name,fn:n.fn,options:[e,t]}},g$=(e,t)=>{const n=eU(e);return{name:n.name,fn:n.fn,options:[e,t]}},m$=(e,t)=>{const n=tU(e);return{name:n.name,fn:n.fn,options:[e,t]}},aU={...Xc};let k0=!1,lU=0;const L0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+lU++;function sU(){const[e,t]=g.useState(()=>k0?L0():void 0);return eg(()=>{e==null&&t(L0())},[]),g.useEffect(()=>{k0=!0},[]),e}const uU=aU.useId,cU=uU||sU;function fU(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(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 dU=g.createContext(null),hU=g.createContext(null),pU=()=>{var e;return((e=g.useContext(dU))==null?void 0:e.id)||null},gU=()=>g.useContext(hU);function mU(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=cU(),i=g.useRef({}),[a]=g.useState(()=>fU()),l=pU()!=null,[s,u]=g.useState(r.reference),f=OB((h,m,v)=>{i.current.openEvent=h?m:void 0,a.emit("openchange",{open:h,event:m,reason:v,nested:l}),n==null||n(h,m,v)}),c=g.useMemo(()=>({setPositionReference:u}),[]),d=g.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return g.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:d,events:a,floatingId:o,refs:c}),[t,f,d,a,o,c])}function y$(e){var t,n;let{elements:r,...o}=e===void 0?{}:e;const{nodeId:i}=o,a=mU({...o,elements:{reference:(t=r==null?void 0:r.reference)!=null?t:null,floating:(n=r==null?void 0:r.floating)!=null?n:null}}),l=o.rootContext||a,s=l.elements,[u,f]=g.useState(null),[c,d]=g.useState(null),m=(s==null?void 0:s.domReference)||u,v=g.useRef(null),E=gU();eg(()=>{m&&(v.current=m)},[m]);const y=iU({...o,elements:{...s,...c&&{reference:c}}}),p=g.useCallback(R=>{const T=tn(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;d(T),y.refs.setReference(T)},[y.refs]),b=g.useCallback(R=>{(tn(R)||R===null)&&(v.current=R,f(R)),(tn(y.refs.reference.current)||y.refs.reference.current===null||R!==null&&!tn(R))&&y.refs.setReference(R)},[y.refs]),S=g.useMemo(()=>({...y.refs,setReference:b,setPositionReference:p,domReference:v}),[y.refs,b,p]),w=g.useMemo(()=>({...y.elements,domReference:m}),[y.elements,m]),C=g.useMemo(()=>({...y,...l,refs:S,elements:w,nodeId:i}),[y,S,w,i,l]);return eg(()=>{l.dataRef.current.floatingContext=C;const R=E==null?void 0:E.nodesRef.current.find(T=>T.id===i);R&&(R.context=C)}),g.useMemo(()=>({...y,context:C,refs:S,elements:w}),[y,S,w,C])}export{s$ as $,rx as A,tx as B,is as C,KU as D,ZU as E,WU as F,JU as G,t$ as H,QU as I,n$ as J,e$ as K,Yb as L,DU as M,b_ as N,J2 as O,XU as P,Ym as Q,o1 as R,GU as S,_U as T,Q2 as U,wP as V,RP as W,qU as X,i$ as Y,a$ as Z,V as _,Xc as a,u$ as a0,l$ as a1,c$ as a2,h$ as a3,r$ as a4,f$ as a5,o$ as a6,d$ as a7,bU as a8,EU as a9,yO as aa,wU as ab,LO as ac,RU as ad,Jw as ae,O2 as af,Lc as ag,rI as ah,Ht as ai,Up as aj,ka as ak,m3 as al,p$ as am,m$ as an,g$ as ao,y$ as ap,nU as aq,JB as ar,tU as as,eU as at,YU as au,zt as b,SU as c,vU as d,TU as e,AU as f,Ux as g,OU as h,CU as i,ee as j,xU as k,kU as l,Jl as m,MU as n,NU as o,$U as p,HU as q,g as r,BU as s,UU as t,zU as u,LU as v,IU as w,PU as x,jU as y,ON as z};
|