var YG=Object.defineProperty;var ND=t=>{throw TypeError(t)};var GG=(t,e,n)=>e in t?YG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Dr=(t,e,n)=>GG(t,typeof e!="symbol"?e+"":e,n),pC=(t,e,n)=>e.has(t)||ND("Cannot "+n);var q=(t,e,n)=>(pC(t,e,"read from private field"),n?n.call(t):e.get(t)),at=(t,e,n)=>e.has(t)?ND("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Me=(t,e,n,r)=>(pC(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Fe=(t,e,n)=>(pC(t,e,"access private method"),n);var Od=(t,e,n,r)=>({set _(i){Me(t,e,i,n)},get _(){return q(t,e,r)}});function XG(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function pl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function eP(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var mC={exports:{}},lg={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ID;function KG(){if(ID)return lg;ID=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return lg.Fragment=e,lg.jsx=n,lg.jsxs=n,lg}var BD;function ZG(){return BD||(BD=1,mC.exports=KG()),mC.exports}var a=ZG(),gC={exports:{}},Vt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var LD;function JG(){if(LD)return Vt;LD=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function v(W){return W===null||typeof W!="object"?null:(W=m&&W[m]||W["@@iterator"],typeof W=="function"?W:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function A(W,V,X){this.props=W,this.context=V,this.refs=w,this.updater=X||y}A.prototype.isReactComponent={},A.prototype.setState=function(W,V){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,V,"setState")},A.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function S(){}S.prototype=A.prototype;function C(W,V,X){this.props=W,this.context=V,this.refs=w,this.updater=X||y}var j=C.prototype=new S;j.constructor=C,x(j,A.prototype),j.isPureReactComponent=!0;var _=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function N(W,V,X){var ee=X.ref;return{$$typeof:t,type:W,key:V,ref:ee!==void 0?ee:null,props:X}}function B(W,V){return N(W.type,V,W.props)}function D(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function L(W){var V={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(X){return V[X]})}var U=/\/+/g;function H(W,V){return typeof W=="object"&&W!==null&&W.key!=null?L(""+W.key):V.toString(36)}function z(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(O,O):(W.status="pending",W.then(function(V){W.status==="pending"&&(W.status="fulfilled",W.value=V)},function(V){W.status==="pending"&&(W.status="rejected",W.reason=V)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function I(W,V,X,ee,le){var ve=typeof W;(ve==="undefined"||ve==="boolean")&&(W=null);var me=!1;if(W===null)me=!0;else switch(ve){case"bigint":case"string":case"number":me=!0;break;case"object":switch(W.$$typeof){case t:case e:me=!0;break;case f:return me=W._init,I(me(W._payload),V,X,ee,le)}}if(me)return le=le(W),me=ee===""?"."+H(W,0):ee,_(le)?(X="",me!=null&&(X=me.replace(U,"$&/")+"/"),I(le,V,X,"",function(qe){return qe})):le!=null&&(D(le)&&(le=B(le,X+(le.key==null||W&&W.key===le.key?"":(""+le.key).replace(U,"$&/")+"/")+me)),V.push(le)),1;me=0;var Qe=ee===""?".":ee+":";if(_(W))for(var We=0;We<W.length;We++)ee=W[We],ve=Qe+H(ee,We),me+=I(ee,V,X,ve,le);else if(We=v(W),typeof We=="function")for(W=We.call(W),We=0;!(ee=W.next()).done;)ee=ee.value,ve=Qe+H(ee,We++),me+=I(ee,V,X,ve,le);else if(ve==="object"){if(typeof W.then=="function")return I(z(W),V,X,ee,le);throw V=String(W),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return me}function F(W,V,X){if(W==null)return W;var ee=[],le=0;return I(W,ee,"","",function(ve){return V.call(X,ve,le++)}),ee}function $(W){if(W._status===-1){var V=W._result;V=V(),V.then(function(X){(W._status===0||W._status===-1)&&(W._status=1,W._result=X)},function(X){(W._status===0||W._status===-1)&&(W._status=2,W._result=X)}),W._status===-1&&(W._status=0,W._result=V)}if(W._status===1)return W._result.default;throw W._result}var G=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},Y={map:F,forEach:function(W,V,X){F(W,function(){V.apply(this,arguments)},X)},count:function(W){var V=0;return F(W,function(){V++}),V},toArray:function(W){return F(W,function(V){return V})||[]},only:function(W){if(!D(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return Vt.Activity=p,Vt.Children=Y,Vt.Component=A,Vt.Fragment=n,Vt.Profiler=i,Vt.PureComponent=C,Vt.StrictMode=r,Vt.Suspense=u,Vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Vt.__COMPILER_RUNTIME={__proto__:null,c:function(W){return M.H.useMemoCache(W)}},Vt.cache=function(W){return function(){return W.apply(null,arguments)}},Vt.cacheSignal=function(){return null},Vt.cloneElement=function(W,V,X){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var ee=x({},W.props),le=W.key;if(V!=null)for(ve in V.key!==void 0&&(le=""+V.key),V)!R.call(V,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&V.ref===void 0||(ee[ve]=V[ve]);var ve=arguments.length-2;if(ve===1)ee.children=X;else if(1<ve){for(var me=Array(ve),Qe=0;Qe<ve;Qe++)me[Qe]=arguments[Qe+2];ee.children=me}return N(W.type,le,ee)},Vt.createContext=function(W){return W={$$typeof:o,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:s,_context:W},W},Vt.createElement=function(W,V,X){var ee,le={},ve=null;if(V!=null)for(ee in V.key!==void 0&&(ve=""+V.key),V)R.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(le[ee]=V[ee]);var me=arguments.length-2;if(me===1)le.children=X;else if(1<me){for(var Qe=Array(me),We=0;We<me;We++)Qe[We]=arguments[We+2];le.children=Qe}if(W&&W.defaultProps)for(ee in me=W.defaultProps,me)le[ee]===void 0&&(le[ee]=me[ee]);return N(W,ve,le)},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(W){return{$$typeof:l,render:W}},Vt.isValidElement=D,Vt.lazy=function(W){return{$$typeof:f,_payload:{_status:-1,_result:W},_init:$}},Vt.memo=function(W,V){return{$$typeof:h,type:W,compare:V===void 0?null:V}},Vt.startTransition=function(W){var V=M.T,X={};M.T=X;try{var ee=W(),le=M.S;le!==null&&le(X,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(O,G)}catch(ve){G(ve)}finally{V!==null&&X.types!==null&&(V.types=X.types),M.T=V}},Vt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Vt.use=function(W){return M.H.use(W)},Vt.useActionState=function(W,V,X){return M.H.useActionState(W,V,X)},Vt.useCallback=function(W,V){return M.H.useCallback(W,V)},Vt.useContext=function(W){return M.H.useContext(W)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(W,V){return M.H.useDeferredValue(W,V)},Vt.useEffect=function(W,V){return M.H.useEffect(W,V)},Vt.useEffectEvent=function(W){return M.H.useEffectEvent(W)},Vt.useId=function(){return M.H.useId()},Vt.useImperativeHandle=function(W,V,X){return M.H.useImperativeHandle(W,V,X)},Vt.useInsertionEffect=function(W,V){return M.H.useInsertionEffect(W,V)},Vt.useLayoutEffect=function(W,V){return M.H.useLayoutEffect(W,V)},Vt.useMemo=function(W,V){return M.H.useMemo(W,V)},Vt.useOptimistic=function(W,V){return M.H.useOptimistic(W,V)},Vt.useReducer=function(W,V,X){return M.H.useReducer(W,V,X)},Vt.useRef=function(W){return M.H.useRef(W)},Vt.useState=function(W){return M.H.useState(W)},Vt.useSyncExternalStore=function(W,V,X){return M.H.useSyncExternalStore(W,V,X)},Vt.useTransition=function(){return M.H.useTransition()},Vt.version="19.2.6",Vt}var PD;function nb(){return PD||(PD=1,gC.exports=JG()),gC.exports}var E=nb();const Ln=pl(E),tP=XG({__proto__:null,default:Ln},[E]);var vC={exports:{}},cg={},bC={exports:{}},yC={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var FD;function eX(){return FD||(FD=1,function(t){function e(I,F){var $=I.length;I.push(F);e:for(;0<$;){var G=$-1>>>1,Y=I[G];if(0<i(Y,F))I[G]=F,I[$]=Y,$=G;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var F=I[0],$=I.pop();if($!==F){I[0]=$;e:for(var G=0,Y=I.length,W=Y>>>1;G<W;){var V=2*(G+1)-1,X=I[V],ee=V+1,le=I[ee];if(0>i(X,$))ee<Y&&0>i(le,X)?(I[G]=le,I[ee]=$,G=ee):(I[G]=X,I[V]=$,G=V);else if(ee<Y&&0>i(le,$))I[G]=le,I[ee]=$,G=ee;else break e}}return F}function i(I,F){var $=I.sortIndex-F.sortIndex;return $!==0?$:I.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],h=[],f=1,p=null,m=3,v=!1,y=!1,x=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function j(I){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=I)r(h),F.sortIndex=F.expirationTime,e(u,F);else break;F=n(h)}}function _(I){if(x=!1,j(I),!y)if(n(u)!==null)y=!0,O||(O=!0,L());else{var F=n(h);F!==null&&z(_,F.startTime-I)}}var O=!1,M=-1,R=5,N=-1;function B(){return w?!0:!(t.unstable_now()-N<R)}function D(){if(w=!1,O){var I=t.unstable_now();N=I;var F=!0;try{e:{y=!1,x&&(x=!1,S(M),M=-1),v=!0;var $=m;try{t:{for(j(I),p=n(u);p!==null&&!(p.expirationTime>I&&B());){var G=p.callback;if(typeof G=="function"){p.callback=null,m=p.priorityLevel;var Y=G(p.expirationTime<=I);if(I=t.unstable_now(),typeof Y=="function"){p.callback=Y,j(I),F=!0;break t}p===n(u)&&r(u),j(I)}else r(u);p=n(u)}if(p!==null)F=!0;else{var W=n(h);W!==null&&z(_,W.startTime-I),F=!1}}break e}finally{p=null,m=$,v=!1}F=void 0}}finally{F?L():O=!1}}}var L;if(typeof C=="function")L=function(){C(D)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=D,L=function(){H.postMessage(null)}}else L=function(){A(D,0)};function z(I,F){M=A(function(){I(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(I){I.callback=null},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(I){switch(m){case 1:case 2:case 3:var F=3;break;default:F=m}var $=m;m=F;try{return I()}finally{m=$}},t.unstable_requestPaint=function(){w=!0},t.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var $=m;m=I;try{return F()}finally{m=$}},t.unstable_scheduleCallback=function(I,F,$){var G=t.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?G+$:G):$=G,I){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=$+Y,I={id:f++,callback:F,priorityLevel:I,startTime:$,expirationTime:Y,sortIndex:-1},$>G?(I.sortIndex=$,e(h,I),n(u)===null&&I===n(h)&&(x?(S(M),M=-1):x=!0,z(_,$-G))):(I.sortIndex=Y,e(u,I),y||v||(y=!0,O||(O=!0,L()))),I},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(I){var F=m;return function(){var $=m;m=F;try{return I.apply(this,arguments)}finally{m=$}}}}(yC)),yC}var zD;function tX(){return zD||(zD=1,bC.exports=eX()),bC.exports}var xC={exports:{}},_s={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var HD;function nX(){if(HD)return _s;HD=1;var t=nb();function e(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)h+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(u,h,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:u,containerInfo:h,implementation:f}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,_s.createPortal=function(u,h){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(u,h,null,f)},_s.flushSync=function(u){var h=o.T,f=r.p;try{if(o.T=null,r.p=2,u)return u()}finally{o.T=h,r.p=f,r.d.f()}},_s.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(u,h))},_s.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},_s.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var f=h.as,p=l(f,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;f==="style"?r.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:v}):f==="script"&&r.d.X(u,{crossOrigin:p,integrity:m,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_s.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var f=l(h.as,h.crossOrigin);r.d.M(u,{crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(u)},_s.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var f=h.as,p=l(f,h.crossOrigin);r.d.L(u,f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_s.preloadModule=function(u,h){if(typeof u=="string")if(h){var f=l(h.as,h.crossOrigin);r.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(u)},_s.requestFormReset=function(u){r.d.r(u)},_s.unstable_batchedUpdates=function(u,h){return u(h)},_s.useFormState=function(u,h,f){return o.H.useFormState(u,h,f)},_s.useFormStatus=function(){return o.H.useHostTransitionStatus()},_s.version="19.2.6",_s}var qD;function nP(){if(qD)return xC.exports;qD=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),xC.exports=nX(),xC.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var $D;function rX(){if($D)return cg;$D=1;var t=tX(),e=nb(),n=nP();function r(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function s(c){var d=c,g=c;if(c.alternate)for(;d.return;)d=d.return;else{c=d;do d=c,(d.flags&4098)!==0&&(g=d.return),c=d.return;while(c)}return d.tag===3?g:null}function o(c){if(c.tag===13){var d=c.memoizedState;if(d===null&&(c=c.alternate,c!==null&&(d=c.memoizedState)),d!==null)return d.dehydrated}return null}function l(c){if(c.tag===31){var d=c.memoizedState;if(d===null&&(c=c.alternate,c!==null&&(d=c.memoizedState)),d!==null)return d.dehydrated}return null}function u(c){if(s(c)!==c)throw Error(r(188))}function h(c){var d=c.alternate;if(!d){if(d=s(c),d===null)throw Error(r(188));return d!==c?null:c}for(var g=c,b=d;;){var T=g.return;if(T===null)break;var k=T.alternate;if(k===null){if(b=T.return,b!==null){g=b;continue}break}if(T.child===k.child){for(k=T.child;k;){if(k===g)return u(T),c;if(k===b)return u(T),d;k=k.sibling}throw Error(r(188))}if(g.return!==b.return)g=T,b=k;else{for(var P=!1,Z=T.child;Z;){if(Z===g){P=!0,g=T,b=k;break}if(Z===b){P=!0,b=T,g=k;break}Z=Z.sibling}if(!P){for(Z=k.child;Z;){if(Z===g){P=!0,g=k,b=T;break}if(Z===b){P=!0,b=k,g=T;break}Z=Z.sibling}if(!P)throw Error(r(189))}}if(g.alternate!==b)throw Error(r(190))}if(g.tag!==3)throw Error(r(188));return g.stateNode.current===g?c:d}function f(c){var d=c.tag;if(d===5||d===26||d===27||d===6)return c;for(c=c.child;c!==null;){if(d=f(c),d!==null)return d;c=c.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),C=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function L(c){return c===null||typeof c!="object"?null:(c=D&&c[D]||c["@@iterator"],typeof c=="function"?c:null)}var U=Symbol.for("react.client.reference");function H(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===U?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case x:return"Fragment";case A:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case O:return"SuspenseList";case N:return"Activity"}if(typeof c=="object")switch(c.$$typeof){case y:return"Portal";case C:return c.displayName||"Context";case S:return(c._context.displayName||"Context")+".Consumer";case j:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case M:return d=c.displayName||null,d!==null?d:H(c.type)||"Memo";case R:d=c._payload,c=c._init;try{return H(c(d))}catch{}}return null}var z=Array.isArray,I=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},G=[],Y=-1;function W(c){return{current:c}}function V(c){0>Y||(c.current=G[Y],G[Y]=null,Y--)}function X(c,d){Y++,G[Y]=c.current,c.current=d}var ee=W(null),le=W(null),ve=W(null),me=W(null);function Qe(c,d){switch(X(ve,d),X(le,c),X(ee,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?rD(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=rD(d),c=iD(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}V(ee),X(ee,c)}function We(){V(ee),V(le),V(ve)}function qe(c){c.memoizedState!==null&&X(me,c);var d=ee.current,g=iD(d,c.type);d!==g&&(X(le,c),X(ee,g))}function ae(c){le.current===c&&(V(ee),V(le)),me.current===c&&(V(me),ig._currentValue=$)}var de,Ae;function Te(c){if(de===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);de=d&&d[1]||"",Ae=-1<g.stack.indexOf(`
    at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
`+de+c+Ae}var Ge=!1;function rt(c,d){if(!c||Ge)return"";Ge=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var b={DetermineComponentFrameRoot:function(){try{if(d){var ze=function(){throw Error()};if(Object.defineProperty(ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ze,[])}catch(Ce){var Se=Ce}Reflect.construct(c,[],ze)}else{try{ze.call()}catch(Ce){Se=Ce}c.call(ze.prototype)}}else{try{throw Error()}catch(Ce){Se=Ce}(ze=c())&&typeof ze.catch=="function"&&ze.catch(function(){})}}catch(Ce){if(Ce&&Se&&typeof Ce.stack=="string")return[Ce.stack,Se.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=b.DetermineComponentFrameRoot(),P=k[0],Z=k[1];if(P&&Z){var ie=P.split(`
`),we=Z.split(`
`);for(T=b=0;b<ie.length&&!ie[b].includes("DetermineComponentFrameRoot");)b++;for(;T<we.length&&!we[T].includes("DetermineComponentFrameRoot");)T++;if(b===ie.length||T===we.length)for(b=ie.length-1,T=we.length-1;1<=b&&0<=T&&ie[b]!==we[T];)T--;for(;1<=b&&0<=T;b--,T--)if(ie[b]!==we[T]){if(b!==1||T!==1)do if(b--,T--,0>T||ie[b]!==we[T]){var ke=`
`+ie[b].replace(" at new "," at ");return c.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",c.displayName)),ke}while(1<=b&&0<=T);break}}}finally{Ge=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?Te(g):""}function Ue(c,d){switch(c.tag){case 26:case 27:case 5:return Te(c.type);case 16:return Te("Lazy");case 13:return c.child!==d&&d!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return rt(c.type,!1);case 11:return rt(c.type.render,!1);case 1:return rt(c.type,!0);case 31:return Te("Activity");default:return""}}function Be(c){try{var d="",g=null;do d+=Ue(c,g),g=c,c=c.return;while(c);return d}catch(b){return`
Error generating stack: `+b.message+`
`+b.stack}}var Ee=Object.prototype.hasOwnProperty,Ke=t.unstable_scheduleCallback,Dt=t.unstable_cancelCallback,Je=t.unstable_shouldYield,it=t.unstable_requestPaint,Xe=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,$e=t.unstable_ImmediatePriority,lt=t.unstable_UserBlockingPriority,Rn=t.unstable_NormalPriority,vr=t.unstable_LowPriority,rn=t.unstable_IdlePriority,An=t.log,ht=t.unstable_setDisableYieldValue,fn=null,zt=null;function Nt(c){if(typeof An=="function"&&ht(c),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(fn,c)}catch{}}var tn=Math.clz32?Math.clz32:Jn,cr=Math.log,ln=Math.LN2;function Jn(c){return c>>>=0,c===0?32:31-(cr(c)/ln|0)|0}var Fr=256,It=262144,Cn=4194304;function vt(c){var d=c&42;if(d!==0)return d;switch(c&-c){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 c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function ne(c,d,g){var b=c.pendingLanes;if(b===0)return 0;var T=0,k=c.suspendedLanes,P=c.pingedLanes;c=c.warmLanes;var Z=b&134217727;return Z!==0?(b=Z&~k,b!==0?T=vt(b):(P&=Z,P!==0?T=vt(P):g||(g=Z&~c,g!==0&&(T=vt(g))))):(Z=b&~k,Z!==0?T=vt(Z):P!==0?T=vt(P):g||(g=b&~c,g!==0&&(T=vt(g)))),T===0?0:d!==0&&d!==T&&(d&k)===0&&(k=T&-T,g=d&-d,k>=g||k===32&&(g&4194048)!==0)?d:T}function _e(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function ye(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var c=Cn;return Cn<<=1,(Cn&62914560)===0&&(Cn=4194304),c}function Ht(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function qt(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function et(c,d,g,b,T,k){var P=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var Z=c.entanglements,ie=c.expirationTimes,we=c.hiddenUpdates;for(g=P&~g;0<g;){var ke=31-tn(g),ze=1<<ke;Z[ke]=0,ie[ke]=-1;var Se=we[ke];if(Se!==null)for(we[ke]=null,ke=0;ke<Se.length;ke++){var Ce=Se[ke];Ce!==null&&(Ce.lane&=-536870913)}g&=~ze}b!==0&&Re(c,b,0),k!==0&&T===0&&c.tag!==0&&(c.suspendedLanes|=k&~(P&~d))}function Re(c,d,g){c.pendingLanes|=d,c.suspendedLanes&=~d;var b=31-tn(d);c.entangledLanes|=d,c.entanglements[b]=c.entanglements[b]|1073741824|g&261930}function tt(c,d){var g=c.entangledLanes|=d;for(c=c.entanglements;g;){var b=31-tn(g),T=1<<b;T&d|c[b]&d&&(c[b]|=d),g&=~T}}function jt(c,d){var g=d&-d;return g=(g&42)!==0?1:Ct(g),(g&(c.suspendedLanes|d))!==0?0:g}function Ct(c){switch(c){case 2:c=1;break;case 8:c=4;break;case 32:c=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:c=128;break;case 268435456:c=134217728;break;default:c=0}return c}function nn(c){return c&=-c,2<c?8<c?(c&134217727)!==0?32:268435456:8:2}function Vr(){var c=F.p;return c!==0?c:(c=window.event,c===void 0?32:TD(c.type))}function Yr(c,d){var g=F.p;try{return F.p=c,d()}finally{F.p=g}}var Si=Math.random().toString(36).slice(2),br="__reactFiber$"+Si,Bi="__reactProps$"+Si,vs="__reactContainer$"+Si,ld="__reactEvents$"+Si,bl="__reactListeners$"+Si,hc="__reactHandles$"+Si,ya="__reactResources$"+Si,yr="__reactMarker$"+Si;function Mr(c){delete c[br],delete c[Bi],delete c[ld],delete c[bl],delete c[hc]}function wn(c){var d=c[br];if(d)return d;for(var g=c.parentNode;g;){if(d=g[vs]||g[br]){if(g=d.alternate,d.child!==null||g!==null&&g.child!==null)for(c=hD(c);c!==null;){if(g=c[br])return g;c=hD(c)}return d}c=g,g=c.parentNode}return null}function Gs(c){if(c=c[br]||c[vs]){var d=c.tag;if(d===5||d===6||d===13||d===31||d===26||d===27||d===3)return c}return null}function di(c){var d=c.tag;if(d===5||d===26||d===27||d===6)return c.stateNode;throw Error(r(33))}function Xs(c){var d=c[ya];return d||(d=c[ya]={hoistableStyles:new Map,hoistableScripts:new Map}),d}function zr(c){c[yr]=!0}var bu=new Set,Va={};function bs(c,d){Ze(c,d),Ze(c+"Capture",d)}function Ze(c,d){for(Va[c]=d,c=0;c<d.length;c++)bu.add(d[c])}var kt=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]*$"),Kt={},_n={};function xr(c){return Ee.call(_n,c)?!0:Ee.call(Kt,c)?!1:kt.test(c)?_n[c]=!0:(Kt[c]=!0,!1)}function fi(c,d,g){if(xr(d))if(g===null)c.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":c.removeAttribute(d);return;case"boolean":var b=d.toLowerCase().slice(0,5);if(b!=="data-"&&b!=="aria-"){c.removeAttribute(d);return}}c.setAttribute(d,""+g)}}function Ji(c,d,g){if(g===null)c.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(d);return}c.setAttribute(d,""+g)}}function Qn(c,d,g,b){if(b===null)c.removeAttribute(g);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(g);return}c.setAttributeNS(d,g,""+b)}}function Un(c){switch(typeof c){case"bigint":case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function ys(c){var d=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function yu(c,d,g){var b=Object.getOwnPropertyDescriptor(c.constructor.prototype,d);if(!c.hasOwnProperty(d)&&typeof b<"u"&&typeof b.get=="function"&&typeof b.set=="function"){var T=b.get,k=b.set;return Object.defineProperty(c,d,{configurable:!0,get:function(){return T.call(this)},set:function(P){g=""+P,k.call(this,P)}}),Object.defineProperty(c,d,{enumerable:b.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){c._valueTracker=null,delete c[d]}}}}function dc(c){if(!c._valueTracker){var d=ys(c)?"checked":"value";c._valueTracker=yu(c,d,""+c[d])}}function cd(c){if(!c)return!1;var d=c._valueTracker;if(!d)return!0;var g=d.getValue(),b="";return c&&(b=ys(c)?c.checked?"true":"false":c.value),c=b,c!==g?(d.setValue(c),!0):!1}function xu(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var y0=/[\n"\\]/g;function es(c){return c.replace(y0,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Au(c,d,g,b,T,k,P,Z){c.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?c.type=P:c.removeAttribute("type"),d!=null?P==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Un(d)):c.value!==""+Un(d)&&(c.value=""+Un(d)):P!=="submit"&&P!=="reset"||c.removeAttribute("value"),d!=null?pc(c,P,Un(d)):g!=null?pc(c,P,Un(g)):b!=null&&c.removeAttribute("value"),T==null&&k!=null&&(c.defaultChecked=!!k),T!=null&&(c.checked=T&&typeof T!="function"&&typeof T!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?c.name=""+Un(Z):c.removeAttribute("name")}function fc(c,d,g,b,T,k,P,Z){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(c.type=k),d!=null||g!=null){if(!(k!=="submit"&&k!=="reset"||d!=null)){dc(c);return}g=g!=null?""+Un(g):"",d=d!=null?""+Un(d):g,Z||d===c.value||(c.value=d),c.defaultValue=d}b=b??T,b=typeof b!="function"&&typeof b!="symbol"&&!!b,c.checked=Z?c.checked:!!b,c.defaultChecked=!!b,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(c.name=P),dc(c)}function pc(c,d,g){d==="number"&&xu(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function ii(c,d,g,b){if(c=c.options,d){d={};for(var T=0;T<g.length;T++)d["$"+g[T]]=!0;for(g=0;g<c.length;g++)T=d.hasOwnProperty("$"+c[g].value),c[g].selected!==T&&(c[g].selected=T),T&&b&&(c[g].defaultSelected=!0)}else{for(g=""+Un(g),d=null,T=0;T<c.length;T++){if(c[T].value===g){c[T].selected=!0,b&&(c[T].defaultSelected=!0);return}d!==null||c[T].disabled||(d=c[T])}d!==null&&(d.selected=!0)}}function mc(c,d,g){if(d!=null&&(d=""+Un(d),d!==c.value&&(c.value=d),g==null)){c.defaultValue!==d&&(c.defaultValue=d);return}c.defaultValue=g!=null?""+Un(g):""}function Oo(c,d,g,b){if(d==null){if(b!=null){if(g!=null)throw Error(r(92));if(z(b)){if(1<b.length)throw Error(r(93));b=b[0]}g=b}g==null&&(g=""),d=g}g=Un(d),c.defaultValue=g,b=c.textContent,b===g&&b!==""&&b!==null&&(c.value=b),dc(c)}function Bt(c,d){if(d){var g=c.firstChild;if(g&&g===c.lastChild&&g.nodeType===3){g.nodeValue=d;return}}c.textContent=d}var wu=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 Gr(c,d,g){var b=d.indexOf("--")===0;g==null||typeof g=="boolean"||g===""?b?c.setProperty(d,""):d==="float"?c.cssFloat="":c[d]="":b?c.setProperty(d,g):typeof g!="number"||g===0||wu.has(d)?d==="float"?c.cssFloat=g:c[d]=(""+g).trim():c[d]=g+"px"}function Dn(c,d,g){if(d!=null&&typeof d!="object")throw Error(r(62));if(c=c.style,g!=null){for(var b in g)!g.hasOwnProperty(b)||d!=null&&d.hasOwnProperty(b)||(b.indexOf("--")===0?c.setProperty(b,""):b==="float"?c.cssFloat="":c[b]="");for(var T in d)b=d[T],d.hasOwnProperty(T)&&g[T]!==b&&Gr(c,T,b)}else for(var k in d)d.hasOwnProperty(k)&&Gr(c,k,d[k])}function yl(c){if(c.indexOf("-")===-1)return!1;switch(c){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 xs=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"]]),xl=/^[\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 Ya(c){return xl.test(""+c)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":c}function st(){}var St=null;function Ft(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var an=null,ur=null;function As(c){var d=Gs(c);if(d&&(c=d.stateNode)){var g=c[Bi]||null;e:switch(c=d.stateNode,d.type){case"input":if(Au(c,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name),d=g.name,g.type==="radio"&&d!=null){for(g=c;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll('input[name="'+es(""+d)+'"][type="radio"]'),d=0;d<g.length;d++){var b=g[d];if(b!==c&&b.form===c.form){var T=b[Bi]||null;if(!T)throw Error(r(90));Au(b,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(d=0;d<g.length;d++)b=g[d],b.form===c.form&&cd(b)}break e;case"textarea":mc(c,g.value,g.defaultValue);break e;case"select":d=g.value,d!=null&&ii(c,!!g.multiple,d,!1)}}}var gc=!1;function Su(c,d,g){if(gc)return c(d,g);gc=!0;try{var b=c(d);return b}finally{if(gc=!1,(an!==null||ur!==null)&&(Qy(),an&&(d=an,c=ur,ur=an=null,As(d),c)))for(d=0;d<c.length;d++)As(c[d])}}function Ga(c,d){var g=c.stateNode;if(g===null)return null;var b=g[Bi]||null;if(b===null)return null;g=b[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(c=c.type,b=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!b;break e;default:c=!1}if(c)return null;if(g&&typeof g!="function")throw Error(r(231,d,typeof g));return g}var ws=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$f=!1;if(ws)try{var ju={};Object.defineProperty(ju,"passive",{get:function(){$f=!0}}),window.addEventListener("test",ju,ju),window.removeEventListener("test",ju,ju)}catch{$f=!1}var Is=null,Al=null,ud=null;function x0(){if(ud)return ud;var c,d=Al,g=d.length,b,T="value"in Is?Is.value:Is.textContent,k=T.length;for(c=0;c<g&&d[c]===T[c];c++);var P=g-c;for(b=1;b<=P&&d[g-b]===T[k-b];b++);return ud=T.slice(c,1<b?1-b:void 0)}function Pn(c){var d=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&d===13&&(c=13)):c=d,c===10&&(c=13),32<=c||c===13?c:0}function Wn(){return!0}function Eo(){return!1}function kn(c){function d(g,b,T,k,P){this._reactName=g,this._targetInst=T,this.type=b,this.nativeEvent=k,this.target=P,this.currentTarget=null;for(var Z in c)c.hasOwnProperty(Z)&&(g=c[Z],this[Z]=g?g(k):k[Z]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Wn:Eo,this.isPropagationStopped=Eo,this}return p(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){},isPersistent:Wn}),d}var hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hr=kn(hr),Nn=p({},hr,{view:0,detail:0}),Cu=kn(Nn),_u,A0,Ks,Bs=p({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:w0,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==Ks&&(Ks&&c.type==="mousemove"?(_u=c.screenX-Ks.screenX,A0=c.screenY-Ks.screenY):A0=_u=0,Ks=c),_u)},movementY:function(c){return"movementY"in c?c.movementY:A0}}),Zb=kn(Bs),AS=p({},Bs,{dataTransfer:0}),wS=kn(AS),SS=p({},Nn,{relatedTarget:0}),xa=kn(SS),wl=p({},hr,{animationName:0,elapsedTime:0,pseudoElement:0}),vc=kn(wl),Tu=p({},hr,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),jS=kn(Tu),Xa=p({},hr,{data:0}),Jb=kn(Xa),ey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ty={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"},hd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dd(c){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(c):(c=hd[c])?!!d[c]:!1}function w0(){return dd}var S0=p({},Nn,{key:function(c){if(c.key){var d=ey[c.key]||c.key;if(d!=="Unidentified")return d}return c.type==="keypress"?(c=Pn(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?ty[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:w0,charCode:function(c){return c.type==="keypress"?Pn(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?Pn(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),CS=kn(S0),bc=p({},Bs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mo=kn(bc),fd=p({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:w0}),ny=kn(fd),j0=p({},hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),C0=kn(j0),_0=p({},Bs,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),ry=kn(_0),iy=p({},hr,{newState:0,oldState:0}),sy=kn(iy),ay=[9,13,27,32],Qf=ws&&"CompositionEvent"in window,ku=null;ws&&"documentMode"in document&&(ku=document.documentMode);var _S=ws&&"TextEvent"in window&&!ku,T0=ws&&(!Qf||ku&&8<ku&&11>=ku),k0=" ",yc=!1;function pd(c,d){switch(c){case"keyup":return ay.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function si(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var xc=!1;function Xr(c,d){switch(c){case"compositionend":return si(d);case"keypress":return d.which!==32?null:(yc=!0,k0);case"textInput":return c=d.data,c===k0&&yc?null:c;default:return null}}function oy(c,d){if(xc)return c==="compositionend"||!Qf&&pd(c,d)?(c=x0(),ud=Al=Is=null,xc=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return T0&&d.locale!=="ko"?null:d.data;default:return null}}var O0={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 Ou(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d==="input"?!!O0[c.type]:d==="textarea"}function ly(c,d,g,b){an?ur?ur.push(b):ur=[b]:an=b,d=Ky(d,"onChange"),0<d.length&&(g=new Hr("onChange","change",null,g,b),c.push({event:g,listeners:d}))}var md=null,Ac=null;function Q(c){KR(c,0)}function K(c){var d=di(c);if(cd(d))return c}function J(c,d){if(c==="change")return d}var te=!1;if(ws){var ce;if(ws){var ge="oninput"in document;if(!ge){var Ne=document.createElement("div");Ne.setAttribute("oninput","return;"),ge=typeof Ne.oninput=="function"}ce=ge}else ce=!1;te=ce&&(!document.documentMode||9<document.documentMode)}function Ve(){md&&(md.detachEvent("onpropertychange",nt),Ac=md=null)}function nt(c){if(c.propertyName==="value"&&K(Ac)){var d=[];ly(d,Ac,c,Ft(c)),Su(Q,d)}}function pt(c,d,g){c==="focusin"?(Ve(),md=d,Ac=g,md.attachEvent("onpropertychange",nt)):c==="focusout"&&Ve()}function gt(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return K(Ac)}function xt(c,d){if(c==="click")return K(d)}function $t(c,d){if(c==="input"||c==="change")return K(d)}function Tn(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var Qt=typeof Object.is=="function"?Object.is:Tn;function Gt(c,d){if(Qt(c,d))return!0;if(typeof c!="object"||c===null||typeof d!="object"||d===null)return!1;var g=Object.keys(c),b=Object.keys(d);if(g.length!==b.length)return!1;for(b=0;b<g.length;b++){var T=g[b];if(!Ee.call(d,T)||!Qt(c[T],d[T]))return!1}return!0}function Lt(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function Ot(c,d){var g=Lt(c);c=0;for(var b;g;){if(g.nodeType===3){if(b=c+g.textContent.length,c<=d&&b>=d)return{node:g,offset:d-c};c=b}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=Lt(g)}}function er(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?er(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function Ar(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=xu(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=xu(c.document)}return d}function Kr(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var Fn=ws&&"documentMode"in document&&11>=document.documentMode,Vn=null,ts=null,ai=null,Ss=!1;function Zs(c,d,g){var b=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Ss||Vn==null||Vn!==xu(b)||(b=Vn,"selectionStart"in b&&Kr(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),ai&&Gt(ai,b)||(ai=b,b=Ky(ts,"onSelect"),0<b.length&&(d=new Hr("onSelect","select",null,d,g),c.push({event:d,listeners:b}),d.target=Vn)))}function Li(c,d){var g={};return g[c.toLowerCase()]=d.toLowerCase(),g["Webkit"+c]="webkit"+d,g["Moz"+c]="moz"+d,g}var pi={animationend:Li("Animation","AnimationEnd"),animationiteration:Li("Animation","AnimationIteration"),animationstart:Li("Animation","AnimationStart"),transitionrun:Li("Transition","TransitionRun"),transitionstart:Li("Transition","TransitionStart"),transitioncancel:Li("Transition","TransitionCancel"),transitionend:Li("Transition","TransitionEnd")},js={},Js={};ws&&(Js=document.createElement("div").style,"AnimationEvent"in window||(delete pi.animationend.animation,delete pi.animationiteration.animation,delete pi.animationstart.animation),"TransitionEvent"in window||delete pi.transitionend.transition);function Pi(c){if(js[c])return js[c];if(!pi[c])return c;var d=pi[c],g;for(g in d)if(d.hasOwnProperty(g)&&g in Js)return js[c]=d[g];return c}var Fi=Pi("animationend"),Cs=Pi("animationiteration"),Sl=Pi("animationstart"),ns=Pi("transitionrun"),cy=Pi("transitionstart"),EY=Pi("transitioncancel"),E4=Pi("transitionend"),M4=new Map,TS="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(" ");TS.push("scrollEnd");function Ro(c,d){M4.set(c,d),bs(d,[c])}var uy=typeof reportError=="function"?reportError:function(c){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof c=="object"&&c!==null&&typeof c.message=="string"?String(c.message):String(c),error:c});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",c);return}console.error(c)},Ka=[],Uf=0,kS=0;function hy(){for(var c=Uf,d=kS=Uf=0;d<c;){var g=Ka[d];Ka[d++]=null;var b=Ka[d];Ka[d++]=null;var T=Ka[d];Ka[d++]=null;var k=Ka[d];if(Ka[d++]=null,b!==null&&T!==null){var P=b.pending;P===null?T.next=T:(T.next=P.next,P.next=T),b.pending=T}k!==0&&R4(g,T,k)}}function dy(c,d,g,b){Ka[Uf++]=c,Ka[Uf++]=d,Ka[Uf++]=g,Ka[Uf++]=b,kS|=b,c.lanes|=b,c=c.alternate,c!==null&&(c.lanes|=b)}function OS(c,d,g,b){return dy(c,d,g,b),fy(c)}function gd(c,d){return dy(c,null,null,d),fy(c)}function R4(c,d,g){c.lanes|=g;var b=c.alternate;b!==null&&(b.lanes|=g);for(var T=!1,k=c.return;k!==null;)k.childLanes|=g,b=k.alternate,b!==null&&(b.childLanes|=g),k.tag===22&&(c=k.stateNode,c===null||c._visibility&1||(T=!0)),c=k,k=k.return;return c.tag===3?(k=c.stateNode,T&&d!==null&&(T=31-tn(g),c=k.hiddenUpdates,b=c[T],b===null?c[T]=[d]:b.push(d),d.lane=g|536870912),k):null}function fy(c){if(50<K0)throw K0=0,Pj=null,Error(r(185));for(var d=c.return;d!==null;)c=d,d=c.return;return c.tag===3?c.stateNode:null}var Wf={};function MY(c,d,g,b){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Aa(c,d,g,b){return new MY(c,d,g,b)}function ES(c){return c=c.prototype,!(!c||!c.isReactComponent)}function wc(c,d){var g=c.alternate;return g===null?(g=Aa(c.tag,d,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=d,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&65011712,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,d=c.dependencies,g.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g.refCleanup=c.refCleanup,g}function D4(c,d){c.flags&=65011714;var g=c.alternate;return g===null?(c.childLanes=0,c.lanes=d,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=g.childLanes,c.lanes=g.lanes,c.child=g.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=g.memoizedProps,c.memoizedState=g.memoizedState,c.updateQueue=g.updateQueue,c.type=g.type,d=g.dependencies,c.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),c}function py(c,d,g,b,T,k){var P=0;if(b=c,typeof c=="function")ES(c)&&(P=1);else if(typeof c=="string")P=BG(c,g,ee.current)?26:c==="html"||c==="head"||c==="body"?27:5;else e:switch(c){case N:return c=Aa(31,g,d,T),c.elementType=N,c.lanes=k,c;case x:return vd(g.children,T,k,d);case w:P=8,T|=24;break;case A:return c=Aa(12,g,d,T|2),c.elementType=A,c.lanes=k,c;case _:return c=Aa(13,g,d,T),c.elementType=_,c.lanes=k,c;case O:return c=Aa(19,g,d,T),c.elementType=O,c.lanes=k,c;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case C:P=10;break e;case S:P=9;break e;case j:P=11;break e;case M:P=14;break e;case R:P=16,b=null;break e}P=29,g=Error(r(130,c===null?"null":typeof c,"")),b=null}return d=Aa(P,g,d,T),d.elementType=c,d.type=b,d.lanes=k,d}function vd(c,d,g,b){return c=Aa(7,c,b,d),c.lanes=g,c}function MS(c,d,g){return c=Aa(6,c,null,d),c.lanes=g,c}function N4(c){var d=Aa(18,null,null,0);return d.stateNode=c,d}function RS(c,d,g){return d=Aa(4,c.children!==null?c.children:[],c.key,d),d.lanes=g,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}var I4=new WeakMap;function Za(c,d){if(typeof c=="object"&&c!==null){var g=I4.get(c);return g!==void 0?g:(d={value:c,source:d,stack:Be(d)},I4.set(c,d),d)}return{value:c,source:d,stack:Be(d)}}var Vf=[],Yf=0,my=null,E0=0,Ja=[],eo=0,Eu=null,jl=1,Cl="";function Sc(c,d){Vf[Yf++]=E0,Vf[Yf++]=my,my=c,E0=d}function B4(c,d,g){Ja[eo++]=jl,Ja[eo++]=Cl,Ja[eo++]=Eu,Eu=c;var b=jl;c=Cl;var T=32-tn(b)-1;b&=~(1<<T),g+=1;var k=32-tn(d)+T;if(30<k){var P=T-T%5;k=(b&(1<<P)-1).toString(32),b>>=P,T-=P,jl=1<<32-tn(d)+T|g<<T|b,Cl=k+c}else jl=1<<k|g<<T|b,Cl=c}function DS(c){c.return!==null&&(Sc(c,1),B4(c,1,0))}function NS(c){for(;c===my;)my=Vf[--Yf],Vf[Yf]=null,E0=Vf[--Yf],Vf[Yf]=null;for(;c===Eu;)Eu=Ja[--eo],Ja[eo]=null,Cl=Ja[--eo],Ja[eo]=null,jl=Ja[--eo],Ja[eo]=null}function L4(c,d){Ja[eo++]=jl,Ja[eo++]=Cl,Ja[eo++]=Eu,jl=d.id,Cl=d.overflow,Eu=c}var rs=null,wr=null,bn=!1,Mu=null,to=!1,IS=Error(r(519));function Ru(c){var d=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw M0(Za(d,c)),IS}function P4(c){var d=c.stateNode,g=c.type,b=c.memoizedProps;switch(d[br]=c,d[Bi]=b,g){case"dialog":un("cancel",d),un("close",d);break;case"iframe":case"object":case"embed":un("load",d);break;case"video":case"audio":for(g=0;g<J0.length;g++)un(J0[g],d);break;case"source":un("error",d);break;case"img":case"image":case"link":un("error",d),un("load",d);break;case"details":un("toggle",d);break;case"input":un("invalid",d),fc(d,b.value,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name,!0);break;case"select":un("invalid",d);break;case"textarea":un("invalid",d),Oo(d,b.value,b.defaultValue,b.children)}g=b.children,typeof g!="string"&&typeof g!="number"&&typeof g!="bigint"||d.textContent===""+g||b.suppressHydrationWarning===!0||tD(d.textContent,g)?(b.popover!=null&&(un("beforetoggle",d),un("toggle",d)),b.onScroll!=null&&un("scroll",d),b.onScrollEnd!=null&&un("scrollend",d),b.onClick!=null&&(d.onclick=st),d=!0):d=!1,d||Ru(c,!0)}function F4(c){for(rs=c.return;rs;)switch(rs.tag){case 5:case 31:case 13:to=!1;return;case 27:case 3:to=!0;return;default:rs=rs.return}}function Gf(c){if(c!==rs)return!1;if(!bn)return F4(c),bn=!0,!1;var d=c.tag,g;if((g=d!==3&&d!==27)&&((g=d===5)&&(g=c.type,g=!(g!=="form"&&g!=="button")||Jj(c.type,c.memoizedProps)),g=!g),g&&wr&&Ru(c),F4(c),d===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));wr=uD(c)}else if(d===31){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));wr=uD(c)}else d===27?(d=wr,Wu(c.type)?(c=iC,iC=null,wr=c):wr=d):wr=rs?ro(c.stateNode.nextSibling):null;return!0}function bd(){wr=rs=null,bn=!1}function BS(){var c=Mu;return c!==null&&(ra===null?ra=c:ra.push.apply(ra,c),Mu=null),c}function M0(c){Mu===null?Mu=[c]:Mu.push(c)}var LS=W(null),yd=null,jc=null;function Du(c,d,g){X(LS,d._currentValue),d._currentValue=g}function Cc(c){c._currentValue=LS.current,V(LS)}function PS(c,d,g){for(;c!==null;){var b=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,b!==null&&(b.childLanes|=d)):b!==null&&(b.childLanes&d)!==d&&(b.childLanes|=d),c===g)break;c=c.return}}function FS(c,d,g,b){var T=c.child;for(T!==null&&(T.return=c);T!==null;){var k=T.dependencies;if(k!==null){var P=T.child;k=k.firstContext;e:for(;k!==null;){var Z=k;k=T;for(var ie=0;ie<d.length;ie++)if(Z.context===d[ie]){k.lanes|=g,Z=k.alternate,Z!==null&&(Z.lanes|=g),PS(k.return,g,c),b||(P=null);break e}k=Z.next}}else if(T.tag===18){if(P=T.return,P===null)throw Error(r(341));P.lanes|=g,k=P.alternate,k!==null&&(k.lanes|=g),PS(P,g,c),P=null}else P=T.child;if(P!==null)P.return=T;else for(P=T;P!==null;){if(P===c){P=null;break}if(T=P.sibling,T!==null){T.return=P.return,P=T;break}P=P.return}T=P}}function Xf(c,d,g,b){c=null;for(var T=d,k=!1;T!==null;){if(!k){if((T.flags&524288)!==0)k=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var P=T.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var Z=T.type;Qt(T.pendingProps.value,P.value)||(c!==null?c.push(Z):c=[Z])}}else if(T===me.current){if(P=T.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(c!==null?c.push(ig):c=[ig])}T=T.return}c!==null&&FS(d,c,g,b),d.flags|=262144}function gy(c){for(c=c.firstContext;c!==null;){if(!Qt(c.context._currentValue,c.memoizedValue))return!0;c=c.next}return!1}function xd(c){yd=c,jc=null,c=c.dependencies,c!==null&&(c.firstContext=null)}function is(c){return z4(yd,c)}function vy(c,d){return yd===null&&xd(c),z4(c,d)}function z4(c,d){var g=d._currentValue;if(d={context:d,memoizedValue:g,next:null},jc===null){if(c===null)throw Error(r(308));jc=d,c.dependencies={lanes:0,firstContext:d},c.flags|=524288}else jc=jc.next=d;return g}var RY=typeof AbortController<"u"?AbortController:function(){var c=[],d=this.signal={aborted:!1,addEventListener:function(g,b){c.push(b)}};this.abort=function(){d.aborted=!0,c.forEach(function(g){return g()})}},DY=t.unstable_scheduleCallback,NY=t.unstable_NormalPriority,mi={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zS(){return{controller:new RY,data:new Map,refCount:0}}function R0(c){c.refCount--,c.refCount===0&&DY(NY,function(){c.controller.abort()})}var D0=null,HS=0,Kf=0,Zf=null;function IY(c,d){if(D0===null){var g=D0=[];HS=0,Kf=Qj(),Zf={status:"pending",value:void 0,then:function(b){g.push(b)}}}return HS++,d.then(H4,H4),d}function H4(){if(--HS===0&&D0!==null){Zf!==null&&(Zf.status="fulfilled");var c=D0;D0=null,Kf=0,Zf=null;for(var d=0;d<c.length;d++)(0,c[d])()}}function BY(c,d){var g=[],b={status:"pending",value:null,reason:null,then:function(T){g.push(T)}};return c.then(function(){b.status="fulfilled",b.value=d;for(var T=0;T<g.length;T++)(0,g[T])(d)},function(T){for(b.status="rejected",b.reason=T,T=0;T<g.length;T++)(0,g[T])(void 0)}),b}var q4=I.S;I.S=function(c,d){CR=Xe(),typeof d=="object"&&d!==null&&typeof d.then=="function"&&IY(c,d),q4!==null&&q4(c,d)};var Ad=W(null);function qS(){var c=Ad.current;return c!==null?c:ir.pooledCache}function by(c,d){d===null?X(Ad,Ad.current):X(Ad,d.pool)}function $4(){var c=qS();return c===null?null:{parent:mi._currentValue,pool:c}}var Jf=Error(r(460)),$S=Error(r(474)),yy=Error(r(542)),xy={then:function(){}};function Q4(c){return c=c.status,c==="fulfilled"||c==="rejected"}function U4(c,d,g){switch(g=c[g],g===void 0?c.push(d):g!==d&&(d.then(st,st),d=g),d.status){case"fulfilled":return d.value;case"rejected":throw c=d.reason,V4(c),c;default:if(typeof d.status=="string")d.then(st,st);else{if(c=ir,c!==null&&100<c.shellSuspendCounter)throw Error(r(482));c=d,c.status="pending",c.then(function(b){if(d.status==="pending"){var T=d;T.status="fulfilled",T.value=b}},function(b){if(d.status==="pending"){var T=d;T.status="rejected",T.reason=b}})}switch(d.status){case"fulfilled":return d.value;case"rejected":throw c=d.reason,V4(c),c}throw Sd=d,Jf}}function wd(c){try{var d=c._init;return d(c._payload)}catch(g){throw g!==null&&typeof g=="object"&&typeof g.then=="function"?(Sd=g,Jf):g}}var Sd=null;function W4(){if(Sd===null)throw Error(r(459));var c=Sd;return Sd=null,c}function V4(c){if(c===Jf||c===yy)throw Error(r(483))}var ep=null,N0=0;function Ay(c){var d=N0;return N0+=1,ep===null&&(ep=[]),U4(ep,c,d)}function I0(c,d){d=d.props.ref,c.ref=d!==void 0?d:null}function wy(c,d){throw d.$$typeof===m?Error(r(525)):(c=Object.prototype.toString.call(d),Error(r(31,c==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":c)))}function Y4(c){function d(he,ue){if(c){var xe=he.deletions;xe===null?(he.deletions=[ue],he.flags|=16):xe.push(ue)}}function g(he,ue){if(!c)return null;for(;ue!==null;)d(he,ue),ue=ue.sibling;return null}function b(he){for(var ue=new Map;he!==null;)he.key!==null?ue.set(he.key,he):ue.set(he.index,he),he=he.sibling;return ue}function T(he,ue){return he=wc(he,ue),he.index=0,he.sibling=null,he}function k(he,ue,xe){return he.index=xe,c?(xe=he.alternate,xe!==null?(xe=xe.index,xe<ue?(he.flags|=67108866,ue):xe):(he.flags|=67108866,ue)):(he.flags|=1048576,ue)}function P(he){return c&&he.alternate===null&&(he.flags|=67108866),he}function Z(he,ue,xe,Le){return ue===null||ue.tag!==6?(ue=MS(xe,he.mode,Le),ue.return=he,ue):(ue=T(ue,xe),ue.return=he,ue)}function ie(he,ue,xe,Le){var Rt=xe.type;return Rt===x?ke(he,ue,xe.props.children,Le,xe.key):ue!==null&&(ue.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===R&&wd(Rt)===ue.type)?(ue=T(ue,xe.props),I0(ue,xe),ue.return=he,ue):(ue=py(xe.type,xe.key,xe.props,null,he.mode,Le),I0(ue,xe),ue.return=he,ue)}function we(he,ue,xe,Le){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==xe.containerInfo||ue.stateNode.implementation!==xe.implementation?(ue=RS(xe,he.mode,Le),ue.return=he,ue):(ue=T(ue,xe.children||[]),ue.return=he,ue)}function ke(he,ue,xe,Le,Rt){return ue===null||ue.tag!==7?(ue=vd(xe,he.mode,Le,Rt),ue.return=he,ue):(ue=T(ue,xe),ue.return=he,ue)}function ze(he,ue,xe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=MS(""+ue,he.mode,xe),ue.return=he,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return xe=py(ue.type,ue.key,ue.props,null,he.mode,xe),I0(xe,ue),xe.return=he,xe;case y:return ue=RS(ue,he.mode,xe),ue.return=he,ue;case R:return ue=wd(ue),ze(he,ue,xe)}if(z(ue)||L(ue))return ue=vd(ue,he.mode,xe,null),ue.return=he,ue;if(typeof ue.then=="function")return ze(he,Ay(ue),xe);if(ue.$$typeof===C)return ze(he,vy(he,ue),xe);wy(he,ue)}return null}function Se(he,ue,xe,Le){var Rt=ue!==null?ue.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return Rt!==null?null:Z(he,ue,""+xe,Le);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case v:return xe.key===Rt?ie(he,ue,xe,Le):null;case y:return xe.key===Rt?we(he,ue,xe,Le):null;case R:return xe=wd(xe),Se(he,ue,xe,Le)}if(z(xe)||L(xe))return Rt!==null?null:ke(he,ue,xe,Le,null);if(typeof xe.then=="function")return Se(he,ue,Ay(xe),Le);if(xe.$$typeof===C)return Se(he,ue,vy(he,xe),Le);wy(he,xe)}return null}function Ce(he,ue,xe,Le,Rt){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return he=he.get(xe)||null,Z(ue,he,""+Le,Rt);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case v:return he=he.get(Le.key===null?xe:Le.key)||null,ie(ue,he,Le,Rt);case y:return he=he.get(Le.key===null?xe:Le.key)||null,we(ue,he,Le,Rt);case R:return Le=wd(Le),Ce(he,ue,xe,Le,Rt)}if(z(Le)||L(Le))return he=he.get(xe)||null,ke(ue,he,Le,Rt,null);if(typeof Le.then=="function")return Ce(he,ue,xe,Ay(Le),Rt);if(Le.$$typeof===C)return Ce(he,ue,xe,vy(ue,Le),Rt);wy(ue,Le)}return null}function wt(he,ue,xe,Le){for(var Rt=null,On=null,Tt=ue,Jt=ue=0,mn=null;Tt!==null&&Jt<xe.length;Jt++){Tt.index>Jt?(mn=Tt,Tt=null):mn=Tt.sibling;var En=Se(he,Tt,xe[Jt],Le);if(En===null){Tt===null&&(Tt=mn);break}c&&Tt&&En.alternate===null&&d(he,Tt),ue=k(En,ue,Jt),On===null?Rt=En:On.sibling=En,On=En,Tt=mn}if(Jt===xe.length)return g(he,Tt),bn&&Sc(he,Jt),Rt;if(Tt===null){for(;Jt<xe.length;Jt++)Tt=ze(he,xe[Jt],Le),Tt!==null&&(ue=k(Tt,ue,Jt),On===null?Rt=Tt:On.sibling=Tt,On=Tt);return bn&&Sc(he,Jt),Rt}for(Tt=b(Tt);Jt<xe.length;Jt++)mn=Ce(Tt,he,Jt,xe[Jt],Le),mn!==null&&(c&&mn.alternate!==null&&Tt.delete(mn.key===null?Jt:mn.key),ue=k(mn,ue,Jt),On===null?Rt=mn:On.sibling=mn,On=mn);return c&&Tt.forEach(function(Ku){return d(he,Ku)}),bn&&Sc(he,Jt),Rt}function Pt(he,ue,xe,Le){if(xe==null)throw Error(r(151));for(var Rt=null,On=null,Tt=ue,Jt=ue=0,mn=null,En=xe.next();Tt!==null&&!En.done;Jt++,En=xe.next()){Tt.index>Jt?(mn=Tt,Tt=null):mn=Tt.sibling;var Ku=Se(he,Tt,En.value,Le);if(Ku===null){Tt===null&&(Tt=mn);break}c&&Tt&&Ku.alternate===null&&d(he,Tt),ue=k(Ku,ue,Jt),On===null?Rt=Ku:On.sibling=Ku,On=Ku,Tt=mn}if(En.done)return g(he,Tt),bn&&Sc(he,Jt),Rt;if(Tt===null){for(;!En.done;Jt++,En=xe.next())En=ze(he,En.value,Le),En!==null&&(ue=k(En,ue,Jt),On===null?Rt=En:On.sibling=En,On=En);return bn&&Sc(he,Jt),Rt}for(Tt=b(Tt);!En.done;Jt++,En=xe.next())En=Ce(Tt,he,Jt,En.value,Le),En!==null&&(c&&En.alternate!==null&&Tt.delete(En.key===null?Jt:En.key),ue=k(En,ue,Jt),On===null?Rt=En:On.sibling=En,On=En);return c&&Tt.forEach(function(VG){return d(he,VG)}),bn&&Sc(he,Jt),Rt}function rr(he,ue,xe,Le){if(typeof xe=="object"&&xe!==null&&xe.type===x&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case v:e:{for(var Rt=xe.key;ue!==null;){if(ue.key===Rt){if(Rt=xe.type,Rt===x){if(ue.tag===7){g(he,ue.sibling),Le=T(ue,xe.props.children),Le.return=he,he=Le;break e}}else if(ue.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===R&&wd(Rt)===ue.type){g(he,ue.sibling),Le=T(ue,xe.props),I0(Le,xe),Le.return=he,he=Le;break e}g(he,ue);break}else d(he,ue);ue=ue.sibling}xe.type===x?(Le=vd(xe.props.children,he.mode,Le,xe.key),Le.return=he,he=Le):(Le=py(xe.type,xe.key,xe.props,null,he.mode,Le),I0(Le,xe),Le.return=he,he=Le)}return P(he);case y:e:{for(Rt=xe.key;ue!==null;){if(ue.key===Rt)if(ue.tag===4&&ue.stateNode.containerInfo===xe.containerInfo&&ue.stateNode.implementation===xe.implementation){g(he,ue.sibling),Le=T(ue,xe.children||[]),Le.return=he,he=Le;break e}else{g(he,ue);break}else d(he,ue);ue=ue.sibling}Le=RS(xe,he.mode,Le),Le.return=he,he=Le}return P(he);case R:return xe=wd(xe),rr(he,ue,xe,Le)}if(z(xe))return wt(he,ue,xe,Le);if(L(xe)){if(Rt=L(xe),typeof Rt!="function")throw Error(r(150));return xe=Rt.call(xe),Pt(he,ue,xe,Le)}if(typeof xe.then=="function")return rr(he,ue,Ay(xe),Le);if(xe.$$typeof===C)return rr(he,ue,vy(he,xe),Le);wy(he,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,ue!==null&&ue.tag===6?(g(he,ue.sibling),Le=T(ue,xe),Le.return=he,he=Le):(g(he,ue),Le=MS(xe,he.mode,Le),Le.return=he,he=Le),P(he)):g(he,ue)}return function(he,ue,xe,Le){try{N0=0;var Rt=rr(he,ue,xe,Le);return ep=null,Rt}catch(Tt){if(Tt===Jf||Tt===yy)throw Tt;var On=Aa(29,Tt,null,he.mode);return On.lanes=Le,On.return=he,On}finally{}}}var jd=Y4(!0),G4=Y4(!1),Nu=!1;function QS(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function US(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function Iu(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function Bu(c,d,g){var b=c.updateQueue;if(b===null)return null;if(b=b.shared,(In&2)!==0){var T=b.pending;return T===null?d.next=d:(d.next=T.next,T.next=d),b.pending=d,d=fy(c),R4(c,null,g),d}return dy(c,b,d,g),fy(c)}function B0(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var b=d.lanes;b&=c.pendingLanes,g|=b,d.lanes=g,tt(c,g)}}function WS(c,d){var g=c.updateQueue,b=c.alternate;if(b!==null&&(b=b.updateQueue,g===b)){var T=null,k=null;if(g=g.firstBaseUpdate,g!==null){do{var P={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};k===null?T=k=P:k=k.next=P,g=g.next}while(g!==null);k===null?T=k=d:k=k.next=d}else T=k=d;g={baseState:b.baseState,firstBaseUpdate:T,lastBaseUpdate:k,shared:b.shared,callbacks:b.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var VS=!1;function L0(){if(VS){var c=Zf;if(c!==null)throw c}}function P0(c,d,g,b){VS=!1;var T=c.updateQueue;Nu=!1;var k=T.firstBaseUpdate,P=T.lastBaseUpdate,Z=T.shared.pending;if(Z!==null){T.shared.pending=null;var ie=Z,we=ie.next;ie.next=null,P===null?k=we:P.next=we,P=ie;var ke=c.alternate;ke!==null&&(ke=ke.updateQueue,Z=ke.lastBaseUpdate,Z!==P&&(Z===null?ke.firstBaseUpdate=we:Z.next=we,ke.lastBaseUpdate=ie))}if(k!==null){var ze=T.baseState;P=0,ke=we=ie=null,Z=k;do{var Se=Z.lane&-536870913,Ce=Se!==Z.lane;if(Ce?(pn&Se)===Se:(b&Se)===Se){Se!==0&&Se===Kf&&(VS=!0),ke!==null&&(ke=ke.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var wt=c,Pt=Z;Se=d;var rr=g;switch(Pt.tag){case 1:if(wt=Pt.payload,typeof wt=="function"){ze=wt.call(rr,ze,Se);break e}ze=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=Pt.payload,Se=typeof wt=="function"?wt.call(rr,ze,Se):wt,Se==null)break e;ze=p({},ze,Se);break e;case 2:Nu=!0}}Se=Z.callback,Se!==null&&(c.flags|=64,Ce&&(c.flags|=8192),Ce=T.callbacks,Ce===null?T.callbacks=[Se]:Ce.push(Se))}else Ce={lane:Se,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},ke===null?(we=ke=Ce,ie=ze):ke=ke.next=Ce,P|=Se;if(Z=Z.next,Z===null){if(Z=T.shared.pending,Z===null)break;Ce=Z,Z=Ce.next,Ce.next=null,T.lastBaseUpdate=Ce,T.shared.pending=null}}while(!0);ke===null&&(ie=ze),T.baseState=ie,T.firstBaseUpdate=we,T.lastBaseUpdate=ke,k===null&&(T.shared.lanes=0),Hu|=P,c.lanes=P,c.memoizedState=ze}}function X4(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function K4(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;c<g.length;c++)X4(g[c],d)}var tp=W(null),Sy=W(0);function Z4(c,d){c=Nc,X(Sy,c),X(tp,d),Nc=c|d.baseLanes}function YS(){X(Sy,Nc),X(tp,tp.current)}function GS(){Nc=Sy.current,V(tp),V(Sy)}var wa=W(null),no=null;function Lu(c){var d=c.alternate;X(oi,oi.current&1),X(wa,c),no===null&&(d===null||tp.current!==null||d.memoizedState!==null)&&(no=c)}function XS(c){X(oi,oi.current),X(wa,c),no===null&&(no=c)}function J4(c){c.tag===22?(X(oi,oi.current),X(wa,c),no===null&&(no=c)):Pu()}function Pu(){X(oi,oi.current),X(wa,wa.current)}function Sa(c){V(wa),no===c&&(no=null),V(oi)}var oi=W(0);function jy(c){for(var d=c;d!==null;){if(d.tag===13){var g=d.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||nC(g)||rC(g)))return d}else if(d.tag===19&&(d.memoizedProps.revealOrder==="forwards"||d.memoizedProps.revealOrder==="backwards"||d.memoizedProps.revealOrder==="unstable_legacy-backwards"||d.memoizedProps.revealOrder==="together")){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var _c=0,Zt=null,tr=null,gi=null,Cy=!1,np=!1,Cd=!1,_y=0,F0=0,rp=null,LY=0;function Zr(){throw Error(r(321))}function KS(c,d){if(d===null)return!1;for(var g=0;g<d.length&&g<c.length;g++)if(!Qt(c[g],d[g]))return!1;return!0}function ZS(c,d,g,b,T,k){return _c=k,Zt=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,I.H=c===null||c.memoizedState===null?BM:fj,Cd=!1,k=g(b,T),Cd=!1,np&&(k=tM(d,g,b,T)),eM(c),k}function eM(c){I.H=q0;var d=tr!==null&&tr.next!==null;if(_c=0,gi=tr=Zt=null,Cy=!1,F0=0,rp=null,d)throw Error(r(300));c===null||vi||(c=c.dependencies,c!==null&&gy(c)&&(vi=!0))}function tM(c,d,g,b){Zt=c;var T=0;do{if(np&&(rp=null),F0=0,np=!1,25<=T)throw Error(r(301));if(T+=1,gi=tr=null,c.updateQueue!=null){var k=c.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}I.H=LM,k=d(g,b)}while(np);return k}function PY(){var c=I.H,d=c.useState()[0];return d=typeof d.then=="function"?z0(d):d,c=c.useState()[0],(tr!==null?tr.memoizedState:null)!==c&&(Zt.flags|=1024),d}function JS(){var c=_y!==0;return _y=0,c}function ej(c,d,g){d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~g}function tj(c){if(Cy){for(c=c.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}Cy=!1}_c=0,gi=tr=Zt=null,np=!1,F0=_y=0,rp=null}function Ls(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gi===null?Zt.memoizedState=gi=c:gi=gi.next=c,gi}function li(){if(tr===null){var c=Zt.alternate;c=c!==null?c.memoizedState:null}else c=tr.next;var d=gi===null?Zt.memoizedState:gi.next;if(d!==null)gi=d,tr=c;else{if(c===null)throw Zt.alternate===null?Error(r(467)):Error(r(310));tr=c,c={memoizedState:tr.memoizedState,baseState:tr.baseState,baseQueue:tr.baseQueue,queue:tr.queue,next:null},gi===null?Zt.memoizedState=gi=c:gi=gi.next=c}return gi}function Ty(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function z0(c){var d=F0;return F0+=1,rp===null&&(rp=[]),c=U4(rp,c,d),d=Zt,(gi===null?d.memoizedState:gi.next)===null&&(d=d.alternate,I.H=d===null||d.memoizedState===null?BM:fj),c}function ky(c){if(c!==null&&typeof c=="object"){if(typeof c.then=="function")return z0(c);if(c.$$typeof===C)return is(c)}throw Error(r(438,String(c)))}function nj(c){var d=null,g=Zt.updateQueue;if(g!==null&&(d=g.memoCache),d==null){var b=Zt.alternate;b!==null&&(b=b.updateQueue,b!==null&&(b=b.memoCache,b!=null&&(d={data:b.data.map(function(T){return T.slice()}),index:0})))}if(d==null&&(d={data:[],index:0}),g===null&&(g=Ty(),Zt.updateQueue=g),g.memoCache=d,g=d.data[d.index],g===void 0)for(g=d.data[d.index]=Array(c),b=0;b<c;b++)g[b]=B;return d.index++,g}function Tc(c,d){return typeof d=="function"?d(c):d}function Oy(c){var d=li();return rj(d,tr,c)}function rj(c,d,g){var b=c.queue;if(b===null)throw Error(r(311));b.lastRenderedReducer=g;var T=c.baseQueue,k=b.pending;if(k!==null){if(T!==null){var P=T.next;T.next=k.next,k.next=P}d.baseQueue=T=k,b.pending=null}if(k=c.baseState,T===null)c.memoizedState=k;else{d=T.next;var Z=P=null,ie=null,we=d,ke=!1;do{var ze=we.lane&-536870913;if(ze!==we.lane?(pn&ze)===ze:(_c&ze)===ze){var Se=we.revertLane;if(Se===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,gesture:null,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null}),ze===Kf&&(ke=!0);else if((_c&Se)===Se){we=we.next,Se===Kf&&(ke=!0);continue}else ze={lane:0,revertLane:we.revertLane,gesture:null,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},ie===null?(Z=ie=ze,P=k):ie=ie.next=ze,Zt.lanes|=Se,Hu|=Se;ze=we.action,Cd&&g(k,ze),k=we.hasEagerState?we.eagerState:g(k,ze)}else Se={lane:ze,revertLane:we.revertLane,gesture:we.gesture,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},ie===null?(Z=ie=Se,P=k):ie=ie.next=Se,Zt.lanes|=ze,Hu|=ze;we=we.next}while(we!==null&&we!==d);if(ie===null?P=k:ie.next=Z,!Qt(k,c.memoizedState)&&(vi=!0,ke&&(g=Zf,g!==null)))throw g;c.memoizedState=k,c.baseState=P,c.baseQueue=ie,b.lastRenderedState=k}return T===null&&(b.lanes=0),[c.memoizedState,b.dispatch]}function ij(c){var d=li(),g=d.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=c;var b=g.dispatch,T=g.pending,k=d.memoizedState;if(T!==null){g.pending=null;var P=T=T.next;do k=c(k,P.action),P=P.next;while(P!==T);Qt(k,d.memoizedState)||(vi=!0),d.memoizedState=k,d.baseQueue===null&&(d.baseState=k),g.lastRenderedState=k}return[k,b]}function nM(c,d,g){var b=Zt,T=li(),k=bn;if(k){if(g===void 0)throw Error(r(407));g=g()}else g=d();var P=!Qt((tr||T).memoizedState,g);if(P&&(T.memoizedState=g,vi=!0),T=T.queue,oj(sM.bind(null,b,T,c),[c]),T.getSnapshot!==d||P||gi!==null&&gi.memoizedState.tag&1){if(b.flags|=2048,ip(9,{destroy:void 0},iM.bind(null,b,T,g,d),null),ir===null)throw Error(r(349));k||(_c&127)!==0||rM(b,d,g)}return g}function rM(c,d,g){c.flags|=16384,c={getSnapshot:d,value:g},d=Zt.updateQueue,d===null?(d=Ty(),Zt.updateQueue=d,d.stores=[c]):(g=d.stores,g===null?d.stores=[c]:g.push(c))}function iM(c,d,g,b){d.value=g,d.getSnapshot=b,aM(d)&&oM(c)}function sM(c,d,g){return g(function(){aM(d)&&oM(c)})}function aM(c){var d=c.getSnapshot;c=c.value;try{var g=d();return!Qt(c,g)}catch{return!0}}function oM(c){var d=gd(c,2);d!==null&&ia(d,c,2)}function sj(c){var d=Ls();if(typeof c=="function"){var g=c;if(c=g(),Cd){Nt(!0);try{g()}finally{Nt(!1)}}}return d.memoizedState=d.baseState=c,d.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tc,lastRenderedState:c},d}function lM(c,d,g,b){return c.baseState=g,rj(c,tr,typeof b=="function"?b:Tc)}function FY(c,d,g,b,T){if(Ry(c))throw Error(r(485));if(c=d.action,c!==null){var k={payload:T,action:c,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){k.listeners.push(P)}};I.T!==null?g(!0):k.isTransition=!1,b(k),g=d.pending,g===null?(k.next=d.pending=k,cM(d,k)):(k.next=g.next,d.pending=g.next=k)}}function cM(c,d){var g=d.action,b=d.payload,T=c.state;if(d.isTransition){var k=I.T,P={};I.T=P;try{var Z=g(T,b),ie=I.S;ie!==null&&ie(P,Z),uM(c,d,Z)}catch(we){aj(c,d,we)}finally{k!==null&&P.types!==null&&(k.types=P.types),I.T=k}}else try{k=g(T,b),uM(c,d,k)}catch(we){aj(c,d,we)}}function uM(c,d,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(b){hM(c,d,b)},function(b){return aj(c,d,b)}):hM(c,d,g)}function hM(c,d,g){d.status="fulfilled",d.value=g,dM(d),c.state=g,d=c.pending,d!==null&&(g=d.next,g===d?c.pending=null:(g=g.next,d.next=g,cM(c,g)))}function aj(c,d,g){var b=c.pending;if(c.pending=null,b!==null){b=b.next;do d.status="rejected",d.reason=g,dM(d),d=d.next;while(d!==b)}c.action=null}function dM(c){c=c.listeners;for(var d=0;d<c.length;d++)(0,c[d])()}function fM(c,d){return d}function pM(c,d){if(bn){var g=ir.formState;if(g!==null){e:{var b=Zt;if(bn){if(wr){t:{for(var T=wr,k=to;T.nodeType!==8;){if(!k){T=null;break t}if(T=ro(T.nextSibling),T===null){T=null;break t}}k=T.data,T=k==="F!"||k==="F"?T:null}if(T){wr=ro(T.nextSibling),b=T.data==="F!";break e}}Ru(b)}b=!1}b&&(d=g[0])}}return g=Ls(),g.memoizedState=g.baseState=d,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fM,lastRenderedState:d},g.queue=b,g=DM.bind(null,Zt,b),b.dispatch=g,b=sj(!1),k=dj.bind(null,Zt,!1,b.queue),b=Ls(),T={state:d,dispatch:null,action:c,pending:null},b.queue=T,g=FY.bind(null,Zt,T,k,g),T.dispatch=g,b.memoizedState=c,[d,g,!1]}function mM(c){var d=li();return gM(d,tr,c)}function gM(c,d,g){if(d=rj(c,d,fM)[0],c=Oy(Tc)[0],typeof d=="object"&&d!==null&&typeof d.then=="function")try{var b=z0(d)}catch(P){throw P===Jf?yy:P}else b=d;d=li();var T=d.queue,k=T.dispatch;return g!==d.memoizedState&&(Zt.flags|=2048,ip(9,{destroy:void 0},zY.bind(null,T,g),null)),[b,k,c]}function zY(c,d){c.action=d}function vM(c){var d=li(),g=tr;if(g!==null)return gM(d,g,c);li(),d=d.memoizedState,g=li();var b=g.queue.dispatch;return g.memoizedState=c,[d,b,!1]}function ip(c,d,g,b){return c={tag:c,create:g,deps:b,inst:d,next:null},d=Zt.updateQueue,d===null&&(d=Ty(),Zt.updateQueue=d),g=d.lastEffect,g===null?d.lastEffect=c.next=c:(b=g.next,g.next=c,c.next=b,d.lastEffect=c),c}function bM(){return li().memoizedState}function Ey(c,d,g,b){var T=Ls();Zt.flags|=c,T.memoizedState=ip(1|d,{destroy:void 0},g,b===void 0?null:b)}function My(c,d,g,b){var T=li();b=b===void 0?null:b;var k=T.memoizedState.inst;tr!==null&&b!==null&&KS(b,tr.memoizedState.deps)?T.memoizedState=ip(d,k,g,b):(Zt.flags|=c,T.memoizedState=ip(1|d,k,g,b))}function yM(c,d){Ey(8390656,8,c,d)}function oj(c,d){My(2048,8,c,d)}function HY(c){Zt.flags|=4;var d=Zt.updateQueue;if(d===null)d=Ty(),Zt.updateQueue=d,d.events=[c];else{var g=d.events;g===null?d.events=[c]:g.push(c)}}function xM(c){var d=li().memoizedState;return HY({ref:d,nextImpl:c}),function(){if((In&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}function AM(c,d){return My(4,2,c,d)}function wM(c,d){return My(4,4,c,d)}function SM(c,d){if(typeof d=="function"){c=c();var g=d(c);return function(){typeof g=="function"?g():d(null)}}if(d!=null)return c=c(),d.current=c,function(){d.current=null}}function jM(c,d,g){g=g!=null?g.concat([c]):null,My(4,4,SM.bind(null,d,c),g)}function lj(){}function CM(c,d){var g=li();d=d===void 0?null:d;var b=g.memoizedState;return d!==null&&KS(d,b[1])?b[0]:(g.memoizedState=[c,d],c)}function _M(c,d){var g=li();d=d===void 0?null:d;var b=g.memoizedState;if(d!==null&&KS(d,b[1]))return b[0];if(b=c(),Cd){Nt(!0);try{c()}finally{Nt(!1)}}return g.memoizedState=[b,d],b}function cj(c,d,g){return g===void 0||(_c&1073741824)!==0&&(pn&261930)===0?c.memoizedState=d:(c.memoizedState=g,c=TR(),Zt.lanes|=c,Hu|=c,g)}function TM(c,d,g,b){return Qt(g,d)?g:tp.current!==null?(c=cj(c,g,b),Qt(c,d)||(vi=!0),c):(_c&42)===0||(_c&1073741824)!==0&&(pn&261930)===0?(vi=!0,c.memoizedState=g):(c=TR(),Zt.lanes|=c,Hu|=c,d)}function kM(c,d,g,b,T){var k=F.p;F.p=k!==0&&8>k?k:8;var P=I.T,Z={};I.T=Z,dj(c,!1,d,g);try{var ie=T(),we=I.S;if(we!==null&&we(Z,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var ke=BY(ie,b);H0(c,d,ke,_a(c))}else H0(c,d,b,_a(c))}catch(ze){H0(c,d,{then:function(){},status:"rejected",reason:ze},_a())}finally{F.p=k,P!==null&&Z.types!==null&&(P.types=Z.types),I.T=P}}function qY(){}function uj(c,d,g,b){if(c.tag!==5)throw Error(r(476));var T=OM(c).queue;kM(c,T,d,$,g===null?qY:function(){return EM(c),g(b)})}function OM(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tc,lastRenderedState:$},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tc,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function EM(c){var d=OM(c);d.next===null&&(d=c.alternate.memoizedState),H0(c,d.next.queue,{},_a())}function hj(){return is(ig)}function MM(){return li().memoizedState}function RM(){return li().memoizedState}function $Y(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=_a();c=Iu(g);var b=Bu(d,c,g);b!==null&&(ia(b,d,g),B0(b,d,g)),d={cache:zS()},c.payload=d;return}d=d.return}}function QY(c,d,g){var b=_a();g={lane:b,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Ry(c)?NM(d,g):(g=OS(c,d,g,b),g!==null&&(ia(g,c,b),IM(g,d,b)))}function DM(c,d,g){var b=_a();H0(c,d,g,b)}function H0(c,d,g,b){var T={lane:b,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Ry(c))NM(d,T);else{var k=c.alternate;if(c.lanes===0&&(k===null||k.lanes===0)&&(k=d.lastRenderedReducer,k!==null))try{var P=d.lastRenderedState,Z=k(P,g);if(T.hasEagerState=!0,T.eagerState=Z,Qt(Z,P))return dy(c,d,T,0),ir===null&&hy(),!1}catch{}finally{}if(g=OS(c,d,T,b),g!==null)return ia(g,c,b),IM(g,d,b),!0}return!1}function dj(c,d,g,b){if(b={lane:2,revertLane:Qj(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Ry(c)){if(d)throw Error(r(479))}else d=OS(c,g,b,2),d!==null&&ia(d,c,2)}function Ry(c){var d=c.alternate;return c===Zt||d!==null&&d===Zt}function NM(c,d){np=Cy=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function IM(c,d,g){if((g&4194048)!==0){var b=d.lanes;b&=c.pendingLanes,g|=b,d.lanes=g,tt(c,g)}}var q0={readContext:is,use:ky,useCallback:Zr,useContext:Zr,useEffect:Zr,useImperativeHandle:Zr,useLayoutEffect:Zr,useInsertionEffect:Zr,useMemo:Zr,useReducer:Zr,useRef:Zr,useState:Zr,useDebugValue:Zr,useDeferredValue:Zr,useTransition:Zr,useSyncExternalStore:Zr,useId:Zr,useHostTransitionStatus:Zr,useFormState:Zr,useActionState:Zr,useOptimistic:Zr,useMemoCache:Zr,useCacheRefresh:Zr};q0.useEffectEvent=Zr;var BM={readContext:is,use:ky,useCallback:function(c,d){return Ls().memoizedState=[c,d===void 0?null:d],c},useContext:is,useEffect:yM,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,Ey(4194308,4,SM.bind(null,d,c),g)},useLayoutEffect:function(c,d){return Ey(4194308,4,c,d)},useInsertionEffect:function(c,d){Ey(4,2,c,d)},useMemo:function(c,d){var g=Ls();d=d===void 0?null:d;var b=c();if(Cd){Nt(!0);try{c()}finally{Nt(!1)}}return g.memoizedState=[b,d],b},useReducer:function(c,d,g){var b=Ls();if(g!==void 0){var T=g(d);if(Cd){Nt(!0);try{g(d)}finally{Nt(!1)}}}else T=d;return b.memoizedState=b.baseState=T,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:T},b.queue=c,c=c.dispatch=QY.bind(null,Zt,c),[b.memoizedState,c]},useRef:function(c){var d=Ls();return c={current:c},d.memoizedState=c},useState:function(c){c=sj(c);var d=c.queue,g=DM.bind(null,Zt,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:lj,useDeferredValue:function(c,d){var g=Ls();return cj(g,c,d)},useTransition:function(){var c=sj(!1);return c=kM.bind(null,Zt,c.queue,!0,!1),Ls().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var b=Zt,T=Ls();if(bn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),ir===null)throw Error(r(349));(pn&127)!==0||rM(b,d,g)}T.memoizedState=g;var k={value:g,getSnapshot:d};return T.queue=k,yM(sM.bind(null,b,k,c),[c]),b.flags|=2048,ip(9,{destroy:void 0},iM.bind(null,b,k,g,d),null),g},useId:function(){var c=Ls(),d=ir.identifierPrefix;if(bn){var g=Cl,b=jl;g=(b&~(1<<32-tn(b)-1)).toString(32)+g,d="_"+d+"R_"+g,g=_y++,0<g&&(d+="H"+g.toString(32)),d+="_"}else g=LY++,d="_"+d+"r_"+g.toString(32)+"_";return c.memoizedState=d},useHostTransitionStatus:hj,useFormState:pM,useActionState:pM,useOptimistic:function(c){var d=Ls();d.memoizedState=d.baseState=c;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return d.queue=g,d=dj.bind(null,Zt,!0,g),g.dispatch=d,[c,d]},useMemoCache:nj,useCacheRefresh:function(){return Ls().memoizedState=$Y.bind(null,Zt)},useEffectEvent:function(c){var d=Ls(),g={impl:c};return d.memoizedState=g,function(){if((In&2)!==0)throw Error(r(440));return g.impl.apply(void 0,arguments)}}},fj={readContext:is,use:ky,useCallback:CM,useContext:is,useEffect:oj,useImperativeHandle:jM,useInsertionEffect:AM,useLayoutEffect:wM,useMemo:_M,useReducer:Oy,useRef:bM,useState:function(){return Oy(Tc)},useDebugValue:lj,useDeferredValue:function(c,d){var g=li();return TM(g,tr.memoizedState,c,d)},useTransition:function(){var c=Oy(Tc)[0],d=li().memoizedState;return[typeof c=="boolean"?c:z0(c),d]},useSyncExternalStore:nM,useId:MM,useHostTransitionStatus:hj,useFormState:mM,useActionState:mM,useOptimistic:function(c,d){var g=li();return lM(g,tr,c,d)},useMemoCache:nj,useCacheRefresh:RM};fj.useEffectEvent=xM;var LM={readContext:is,use:ky,useCallback:CM,useContext:is,useEffect:oj,useImperativeHandle:jM,useInsertionEffect:AM,useLayoutEffect:wM,useMemo:_M,useReducer:ij,useRef:bM,useState:function(){return ij(Tc)},useDebugValue:lj,useDeferredValue:function(c,d){var g=li();return tr===null?cj(g,c,d):TM(g,tr.memoizedState,c,d)},useTransition:function(){var c=ij(Tc)[0],d=li().memoizedState;return[typeof c=="boolean"?c:z0(c),d]},useSyncExternalStore:nM,useId:MM,useHostTransitionStatus:hj,useFormState:vM,useActionState:vM,useOptimistic:function(c,d){var g=li();return tr!==null?lM(g,tr,c,d):(g.baseState=c,[c,g.queue.dispatch])},useMemoCache:nj,useCacheRefresh:RM};LM.useEffectEvent=xM;function pj(c,d,g,b){d=c.memoizedState,g=g(b,d),g=g==null?d:p({},d,g),c.memoizedState=g,c.lanes===0&&(c.updateQueue.baseState=g)}var mj={enqueueSetState:function(c,d,g){c=c._reactInternals;var b=_a(),T=Iu(b);T.payload=d,g!=null&&(T.callback=g),d=Bu(c,T,b),d!==null&&(ia(d,c,b),B0(d,c,b))},enqueueReplaceState:function(c,d,g){c=c._reactInternals;var b=_a(),T=Iu(b);T.tag=1,T.payload=d,g!=null&&(T.callback=g),d=Bu(c,T,b),d!==null&&(ia(d,c,b),B0(d,c,b))},enqueueForceUpdate:function(c,d){c=c._reactInternals;var g=_a(),b=Iu(g);b.tag=2,d!=null&&(b.callback=d),d=Bu(c,b,g),d!==null&&(ia(d,c,g),B0(d,c,g))}};function PM(c,d,g,b,T,k,P){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(b,k,P):d.prototype&&d.prototype.isPureReactComponent?!Gt(g,b)||!Gt(T,k):!0}function FM(c,d,g,b){c=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(g,b),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(g,b),d.state!==c&&mj.enqueueReplaceState(d,d.state,null)}function _d(c,d){var g=d;if("ref"in d){g={};for(var b in d)b!=="ref"&&(g[b]=d[b])}if(c=c.defaultProps){g===d&&(g=p({},g));for(var T in c)g[T]===void 0&&(g[T]=c[T])}return g}function zM(c){uy(c)}function HM(c){console.error(c)}function qM(c){uy(c)}function Dy(c,d){try{var g=c.onUncaughtError;g(d.value,{componentStack:d.stack})}catch(b){setTimeout(function(){throw b})}}function $M(c,d,g){try{var b=c.onCaughtError;b(g.value,{componentStack:g.stack,errorBoundary:d.tag===1?d.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function gj(c,d,g){return g=Iu(g),g.tag=3,g.payload={element:null},g.callback=function(){Dy(c,d)},g}function QM(c){return c=Iu(c),c.tag=3,c}function UM(c,d,g,b){var T=g.type.getDerivedStateFromError;if(typeof T=="function"){var k=b.value;c.payload=function(){return T(k)},c.callback=function(){$M(d,g,b)}}var P=g.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(c.callback=function(){$M(d,g,b),typeof T!="function"&&(qu===null?qu=new Set([this]):qu.add(this));var Z=b.stack;this.componentDidCatch(b.value,{componentStack:Z!==null?Z:""})})}function UY(c,d,g,b,T){if(g.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(d=g.alternate,d!==null&&Xf(d,g,T,!0),g=wa.current,g!==null){switch(g.tag){case 31:case 13:return no===null?Uy():g.alternate===null&&Jr===0&&(Jr=3),g.flags&=-257,g.flags|=65536,g.lanes=T,b===xy?g.flags|=16384:(d=g.updateQueue,d===null?g.updateQueue=new Set([b]):d.add(b),Hj(c,b,T)),!1;case 22:return g.flags|=65536,b===xy?g.flags|=16384:(d=g.updateQueue,d===null?(d={transitions:null,markerInstances:null,retryQueue:new Set([b])},g.updateQueue=d):(g=d.retryQueue,g===null?d.retryQueue=new Set([b]):g.add(b)),Hj(c,b,T)),!1}throw Error(r(435,g.tag))}return Hj(c,b,T),Uy(),!1}if(bn)return d=wa.current,d!==null?((d.flags&65536)===0&&(d.flags|=256),d.flags|=65536,d.lanes=T,b!==IS&&(c=Error(r(422),{cause:b}),M0(Za(c,g)))):(b!==IS&&(d=Error(r(423),{cause:b}),M0(Za(d,g))),c=c.current.alternate,c.flags|=65536,T&=-T,c.lanes|=T,b=Za(b,g),T=gj(c.stateNode,b,T),WS(c,T),Jr!==4&&(Jr=2)),!1;var k=Error(r(520),{cause:b});if(k=Za(k,g),X0===null?X0=[k]:X0.push(k),Jr!==4&&(Jr=2),d===null)return!0;b=Za(b,g),g=d;do{switch(g.tag){case 3:return g.flags|=65536,c=T&-T,g.lanes|=c,c=gj(g.stateNode,b,c),WS(g,c),!1;case 1:if(d=g.type,k=g.stateNode,(g.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(qu===null||!qu.has(k))))return g.flags|=65536,T&=-T,g.lanes|=T,T=QM(T),UM(T,c,g,b),WS(g,T),!1}g=g.return}while(g!==null);return!1}var vj=Error(r(461)),vi=!1;function ss(c,d,g,b){d.child=c===null?G4(d,null,g,b):jd(d,c.child,g,b)}function WM(c,d,g,b,T){g=g.render;var k=d.ref;if("ref"in b){var P={};for(var Z in b)Z!=="ref"&&(P[Z]=b[Z])}else P=b;return xd(d),b=ZS(c,d,g,P,k,T),Z=JS(),c!==null&&!vi?(ej(c,d,T),kc(c,d,T)):(bn&&Z&&DS(d),d.flags|=1,ss(c,d,b,T),d.child)}function VM(c,d,g,b,T){if(c===null){var k=g.type;return typeof k=="function"&&!ES(k)&&k.defaultProps===void 0&&g.compare===null?(d.tag=15,d.type=k,YM(c,d,k,b,T)):(c=py(g.type,null,b,d,d.mode,T),c.ref=d.ref,c.return=d,d.child=c)}if(k=c.child,!Cj(c,T)){var P=k.memoizedProps;if(g=g.compare,g=g!==null?g:Gt,g(P,b)&&c.ref===d.ref)return kc(c,d,T)}return d.flags|=1,c=wc(k,b),c.ref=d.ref,c.return=d,d.child=c}function YM(c,d,g,b,T){if(c!==null){var k=c.memoizedProps;if(Gt(k,b)&&c.ref===d.ref)if(vi=!1,d.pendingProps=b=k,Cj(c,T))(c.flags&131072)!==0&&(vi=!0);else return d.lanes=c.lanes,kc(c,d,T)}return bj(c,d,g,b,T)}function GM(c,d,g,b){var T=b.children,k=c!==null?c.memoizedState:null;if(c===null&&d.stateNode===null&&(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),b.mode==="hidden"){if((d.flags&128)!==0){if(k=k!==null?k.baseLanes|g:g,c!==null){for(b=d.child=c.child,T=0;b!==null;)T=T|b.lanes|b.childLanes,b=b.sibling;b=T&~k}else b=0,d.child=null;return XM(c,d,k,g,b)}if((g&536870912)!==0)d.memoizedState={baseLanes:0,cachePool:null},c!==null&&by(d,k!==null?k.cachePool:null),k!==null?Z4(d,k):YS(),J4(d);else return b=d.lanes=536870912,XM(c,d,k!==null?k.baseLanes|g:g,g,b)}else k!==null?(by(d,k.cachePool),Z4(d,k),Pu(),d.memoizedState=null):(c!==null&&by(d,null),YS(),Pu());return ss(c,d,T,g),d.child}function $0(c,d){return c!==null&&c.tag===22||d.stateNode!==null||(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.sibling}function XM(c,d,g,b,T){var k=qS();return k=k===null?null:{parent:mi._currentValue,pool:k},d.memoizedState={baseLanes:g,cachePool:k},c!==null&&by(d,null),YS(),J4(d),c!==null&&Xf(c,d,b,!0),d.childLanes=T,null}function Ny(c,d){return d=By({mode:d.mode,children:d.children},c.mode),d.ref=c.ref,c.child=d,d.return=c,d}function KM(c,d,g){return jd(d,c.child,null,g),c=Ny(d,d.pendingProps),c.flags|=2,Sa(d),d.memoizedState=null,c}function WY(c,d,g){var b=d.pendingProps,T=(d.flags&128)!==0;if(d.flags&=-129,c===null){if(bn){if(b.mode==="hidden")return c=Ny(d,b),d.lanes=536870912,$0(null,c);if(XS(d),(c=wr)?(c=cD(c,to),c=c!==null&&c.data==="&"?c:null,c!==null&&(d.memoizedState={dehydrated:c,treeContext:Eu!==null?{id:jl,overflow:Cl}:null,retryLane:536870912,hydrationErrors:null},g=N4(c),g.return=d,d.child=g,rs=d,wr=null)):c=null,c===null)throw Ru(d);return d.lanes=536870912,null}return Ny(d,b)}var k=c.memoizedState;if(k!==null){var P=k.dehydrated;if(XS(d),T)if(d.flags&256)d.flags&=-257,d=KM(c,d,g);else if(d.memoizedState!==null)d.child=c.child,d.flags|=128,d=null;else throw Error(r(558));else if(vi||Xf(c,d,g,!1),T=(g&c.childLanes)!==0,vi||T){if(b=ir,b!==null&&(P=jt(b,g),P!==0&&P!==k.retryLane))throw k.retryLane=P,gd(c,P),ia(b,c,P),vj;Uy(),d=KM(c,d,g)}else c=k.treeContext,wr=ro(P.nextSibling),rs=d,bn=!0,Mu=null,to=!1,c!==null&&L4(d,c),d=Ny(d,b),d.flags|=4096;return d}return c=wc(c.child,{mode:b.mode,children:b.children}),c.ref=d.ref,d.child=c,c.return=d,c}function Iy(c,d){var g=d.ref;if(g===null)c!==null&&c.ref!==null&&(d.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(r(284));(c===null||c.ref!==g)&&(d.flags|=4194816)}}function bj(c,d,g,b,T){return xd(d),g=ZS(c,d,g,b,void 0,T),b=JS(),c!==null&&!vi?(ej(c,d,T),kc(c,d,T)):(bn&&b&&DS(d),d.flags|=1,ss(c,d,g,T),d.child)}function ZM(c,d,g,b,T,k){return xd(d),d.updateQueue=null,g=tM(d,b,g,T),eM(c),b=JS(),c!==null&&!vi?(ej(c,d,k),kc(c,d,k)):(bn&&b&&DS(d),d.flags|=1,ss(c,d,g,k),d.child)}function JM(c,d,g,b,T){if(xd(d),d.stateNode===null){var k=Wf,P=g.contextType;typeof P=="object"&&P!==null&&(k=is(P)),k=new g(b,k),d.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=mj,d.stateNode=k,k._reactInternals=d,k=d.stateNode,k.props=b,k.state=d.memoizedState,k.refs={},QS(d),P=g.contextType,k.context=typeof P=="object"&&P!==null?is(P):Wf,k.state=d.memoizedState,P=g.getDerivedStateFromProps,typeof P=="function"&&(pj(d,g,P,b),k.state=d.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(P=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),P!==k.state&&mj.enqueueReplaceState(k,k.state,null),P0(d,b,k,T),L0(),k.state=d.memoizedState),typeof k.componentDidMount=="function"&&(d.flags|=4194308),b=!0}else if(c===null){k=d.stateNode;var Z=d.memoizedProps,ie=_d(g,Z);k.props=ie;var we=k.context,ke=g.contextType;P=Wf,typeof ke=="object"&&ke!==null&&(P=is(ke));var ze=g.getDerivedStateFromProps;ke=typeof ze=="function"||typeof k.getSnapshotBeforeUpdate=="function",Z=d.pendingProps!==Z,ke||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(Z||we!==P)&&FM(d,k,b,P),Nu=!1;var Se=d.memoizedState;k.state=Se,P0(d,b,k,T),L0(),we=d.memoizedState,Z||Se!==we||Nu?(typeof ze=="function"&&(pj(d,g,ze,b),we=d.memoizedState),(ie=Nu||PM(d,g,ie,b,Se,we,P))?(ke||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(d.flags|=4194308)):(typeof k.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=b,d.memoizedState=we),k.props=b,k.state=we,k.context=P,b=ie):(typeof k.componentDidMount=="function"&&(d.flags|=4194308),b=!1)}else{k=d.stateNode,US(c,d),P=d.memoizedProps,ke=_d(g,P),k.props=ke,ze=d.pendingProps,Se=k.context,we=g.contextType,ie=Wf,typeof we=="object"&&we!==null&&(ie=is(we)),Z=g.getDerivedStateFromProps,(we=typeof Z=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(P!==ze||Se!==ie)&&FM(d,k,b,ie),Nu=!1,Se=d.memoizedState,k.state=Se,P0(d,b,k,T),L0();var Ce=d.memoizedState;P!==ze||Se!==Ce||Nu||c!==null&&c.dependencies!==null&&gy(c.dependencies)?(typeof Z=="function"&&(pj(d,g,Z,b),Ce=d.memoizedState),(ke=Nu||PM(d,g,ke,b,Se,Ce,ie)||c!==null&&c.dependencies!==null&&gy(c.dependencies))?(we||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(b,Ce,ie),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(b,Ce,ie)),typeof k.componentDidUpdate=="function"&&(d.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof k.componentDidUpdate!="function"||P===c.memoizedProps&&Se===c.memoizedState||(d.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===c.memoizedProps&&Se===c.memoizedState||(d.flags|=1024),d.memoizedProps=b,d.memoizedState=Ce),k.props=b,k.state=Ce,k.context=ie,b=ke):(typeof k.componentDidUpdate!="function"||P===c.memoizedProps&&Se===c.memoizedState||(d.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===c.memoizedProps&&Se===c.memoizedState||(d.flags|=1024),b=!1)}return k=b,Iy(c,d),b=(d.flags&128)!==0,k||b?(k=d.stateNode,g=b&&typeof g.getDerivedStateFromError!="function"?null:k.render(),d.flags|=1,c!==null&&b?(d.child=jd(d,c.child,null,T),d.child=jd(d,null,g,T)):ss(c,d,g,T),d.memoizedState=k.state,c=d.child):c=kc(c,d,T),c}function eR(c,d,g,b){return bd(),d.flags|=256,ss(c,d,g,b),d.child}var yj={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xj(c){return{baseLanes:c,cachePool:$4()}}function Aj(c,d,g){return c=c!==null?c.childLanes&~g:0,d&&(c|=Ca),c}function tR(c,d,g){var b=d.pendingProps,T=!1,k=(d.flags&128)!==0,P;if((P=k)||(P=c!==null&&c.memoizedState===null?!1:(oi.current&2)!==0),P&&(T=!0,d.flags&=-129),P=(d.flags&32)!==0,d.flags&=-33,c===null){if(bn){if(T?Lu(d):Pu(),(c=wr)?(c=cD(c,to),c=c!==null&&c.data!=="&"?c:null,c!==null&&(d.memoizedState={dehydrated:c,treeContext:Eu!==null?{id:jl,overflow:Cl}:null,retryLane:536870912,hydrationErrors:null},g=N4(c),g.return=d,d.child=g,rs=d,wr=null)):c=null,c===null)throw Ru(d);return rC(c)?d.lanes=32:d.lanes=536870912,null}var Z=b.children;return b=b.fallback,T?(Pu(),T=d.mode,Z=By({mode:"hidden",children:Z},T),b=vd(b,T,g,null),Z.return=d,b.return=d,Z.sibling=b,d.child=Z,b=d.child,b.memoizedState=xj(g),b.childLanes=Aj(c,P,g),d.memoizedState=yj,$0(null,b)):(Lu(d),wj(d,Z))}var ie=c.memoizedState;if(ie!==null&&(Z=ie.dehydrated,Z!==null)){if(k)d.flags&256?(Lu(d),d.flags&=-257,d=Sj(c,d,g)):d.memoizedState!==null?(Pu(),d.child=c.child,d.flags|=128,d=null):(Pu(),Z=b.fallback,T=d.mode,b=By({mode:"visible",children:b.children},T),Z=vd(Z,T,g,null),Z.flags|=2,b.return=d,Z.return=d,b.sibling=Z,d.child=b,jd(d,c.child,null,g),b=d.child,b.memoizedState=xj(g),b.childLanes=Aj(c,P,g),d.memoizedState=yj,d=$0(null,b));else if(Lu(d),rC(Z)){if(P=Z.nextSibling&&Z.nextSibling.dataset,P)var we=P.dgst;P=we,b=Error(r(419)),b.stack="",b.digest=P,M0({value:b,source:null,stack:null}),d=Sj(c,d,g)}else if(vi||Xf(c,d,g,!1),P=(g&c.childLanes)!==0,vi||P){if(P=ir,P!==null&&(b=jt(P,g),b!==0&&b!==ie.retryLane))throw ie.retryLane=b,gd(c,b),ia(P,c,b),vj;nC(Z)||Uy(),d=Sj(c,d,g)}else nC(Z)?(d.flags|=192,d.child=c.child,d=null):(c=ie.treeContext,wr=ro(Z.nextSibling),rs=d,bn=!0,Mu=null,to=!1,c!==null&&L4(d,c),d=wj(d,b.children),d.flags|=4096);return d}return T?(Pu(),Z=b.fallback,T=d.mode,ie=c.child,we=ie.sibling,b=wc(ie,{mode:"hidden",children:b.children}),b.subtreeFlags=ie.subtreeFlags&65011712,we!==null?Z=wc(we,Z):(Z=vd(Z,T,g,null),Z.flags|=2),Z.return=d,b.return=d,b.sibling=Z,d.child=b,$0(null,b),b=d.child,Z=c.child.memoizedState,Z===null?Z=xj(g):(T=Z.cachePool,T!==null?(ie=mi._currentValue,T=T.parent!==ie?{parent:ie,pool:ie}:T):T=$4(),Z={baseLanes:Z.baseLanes|g,cachePool:T}),b.memoizedState=Z,b.childLanes=Aj(c,P,g),d.memoizedState=yj,$0(c.child,b)):(Lu(d),g=c.child,c=g.sibling,g=wc(g,{mode:"visible",children:b.children}),g.return=d,g.sibling=null,c!==null&&(P=d.deletions,P===null?(d.deletions=[c],d.flags|=16):P.push(c)),d.child=g,d.memoizedState=null,g)}function wj(c,d){return d=By({mode:"visible",children:d},c.mode),d.return=c,c.child=d}function By(c,d){return c=Aa(22,c,null,d),c.lanes=0,c}function Sj(c,d,g){return jd(d,c.child,null,g),c=wj(d,d.pendingProps.children),c.flags|=2,d.memoizedState=null,c}function nR(c,d,g){c.lanes|=d;var b=c.alternate;b!==null&&(b.lanes|=d),PS(c.return,d,g)}function jj(c,d,g,b,T,k){var P=c.memoizedState;P===null?c.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:b,tail:g,tailMode:T,treeForkCount:k}:(P.isBackwards=d,P.rendering=null,P.renderingStartTime=0,P.last=b,P.tail=g,P.tailMode=T,P.treeForkCount=k)}function rR(c,d,g){var b=d.pendingProps,T=b.revealOrder,k=b.tail;b=b.children;var P=oi.current,Z=(P&2)!==0;if(Z?(P=P&1|2,d.flags|=128):P&=1,X(oi,P),ss(c,d,b,g),b=bn?E0:0,!Z&&c!==null&&(c.flags&128)!==0)e:for(c=d.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&nR(c,g,d);else if(c.tag===19)nR(c,g,d);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===d)break e;for(;c.sibling===null;){if(c.return===null||c.return===d)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}switch(T){case"forwards":for(g=d.child,T=null;g!==null;)c=g.alternate,c!==null&&jy(c)===null&&(T=g),g=g.sibling;g=T,g===null?(T=d.child,d.child=null):(T=g.sibling,g.sibling=null),jj(d,!1,T,g,k,b);break;case"backwards":case"unstable_legacy-backwards":for(g=null,T=d.child,d.child=null;T!==null;){if(c=T.alternate,c!==null&&jy(c)===null){d.child=T;break}c=T.sibling,T.sibling=g,g=T,T=c}jj(d,!0,g,null,k,b);break;case"together":jj(d,!1,null,null,void 0,b);break;default:d.memoizedState=null}return d.child}function kc(c,d,g){if(c!==null&&(d.dependencies=c.dependencies),Hu|=d.lanes,(g&d.childLanes)===0)if(c!==null){if(Xf(c,d,g,!1),(g&d.childLanes)===0)return null}else return null;if(c!==null&&d.child!==c.child)throw Error(r(153));if(d.child!==null){for(c=d.child,g=wc(c,c.pendingProps),d.child=g,g.return=d;c.sibling!==null;)c=c.sibling,g=g.sibling=wc(c,c.pendingProps),g.return=d;g.sibling=null}return d.child}function Cj(c,d){return(c.lanes&d)!==0?!0:(c=c.dependencies,!!(c!==null&&gy(c)))}function VY(c,d,g){switch(d.tag){case 3:Qe(d,d.stateNode.containerInfo),Du(d,mi,c.memoizedState.cache),bd();break;case 27:case 5:qe(d);break;case 4:Qe(d,d.stateNode.containerInfo);break;case 10:Du(d,d.type,d.memoizedProps.value);break;case 31:if(d.memoizedState!==null)return d.flags|=128,XS(d),null;break;case 13:var b=d.memoizedState;if(b!==null)return b.dehydrated!==null?(Lu(d),d.flags|=128,null):(g&d.child.childLanes)!==0?tR(c,d,g):(Lu(d),c=kc(c,d,g),c!==null?c.sibling:null);Lu(d);break;case 19:var T=(c.flags&128)!==0;if(b=(g&d.childLanes)!==0,b||(Xf(c,d,g,!1),b=(g&d.childLanes)!==0),T){if(b)return rR(c,d,g);d.flags|=128}if(T=d.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),X(oi,oi.current),b)break;return null;case 22:return d.lanes=0,GM(c,d,g,d.pendingProps);case 24:Du(d,mi,c.memoizedState.cache)}return kc(c,d,g)}function iR(c,d,g){if(c!==null)if(c.memoizedProps!==d.pendingProps)vi=!0;else{if(!Cj(c,g)&&(d.flags&128)===0)return vi=!1,VY(c,d,g);vi=(c.flags&131072)!==0}else vi=!1,bn&&(d.flags&1048576)!==0&&B4(d,E0,d.index);switch(d.lanes=0,d.tag){case 16:e:{var b=d.pendingProps;if(c=wd(d.elementType),d.type=c,typeof c=="function")ES(c)?(b=_d(c,b),d.tag=1,d=JM(null,d,c,b,g)):(d.tag=0,d=bj(null,d,c,b,g));else{if(c!=null){var T=c.$$typeof;if(T===j){d.tag=11,d=WM(null,d,c,b,g);break e}else if(T===M){d.tag=14,d=VM(null,d,c,b,g);break e}}throw d=H(c)||c,Error(r(306,d,""))}}return d;case 0:return bj(c,d,d.type,d.pendingProps,g);case 1:return b=d.type,T=_d(b,d.pendingProps),JM(c,d,b,T,g);case 3:e:{if(Qe(d,d.stateNode.containerInfo),c===null)throw Error(r(387));b=d.pendingProps;var k=d.memoizedState;T=k.element,US(c,d),P0(d,b,null,g);var P=d.memoizedState;if(b=P.cache,Du(d,mi,b),b!==k.cache&&FS(d,[mi],g,!0),L0(),b=P.element,k.isDehydrated)if(k={element:b,isDehydrated:!1,cache:P.cache},d.updateQueue.baseState=k,d.memoizedState=k,d.flags&256){d=eR(c,d,b,g);break e}else if(b!==T){T=Za(Error(r(424)),d),M0(T),d=eR(c,d,b,g);break e}else{switch(c=d.stateNode.containerInfo,c.nodeType){case 9:c=c.body;break;default:c=c.nodeName==="HTML"?c.ownerDocument.body:c}for(wr=ro(c.firstChild),rs=d,bn=!0,Mu=null,to=!0,g=G4(d,null,b,g),d.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling}else{if(bd(),b===T){d=kc(c,d,g);break e}ss(c,d,b,g)}d=d.child}return d;case 26:return Iy(c,d),c===null?(g=mD(d.type,null,d.pendingProps,null))?d.memoizedState=g:bn||(g=d.type,c=d.pendingProps,b=Zy(ve.current).createElement(g),b[br]=d,b[Bi]=c,as(b,g,c),zr(b),d.stateNode=b):d.memoizedState=mD(d.type,c.memoizedProps,d.pendingProps,c.memoizedState),null;case 27:return qe(d),c===null&&bn&&(b=d.stateNode=dD(d.type,d.pendingProps,ve.current),rs=d,to=!0,T=wr,Wu(d.type)?(iC=T,wr=ro(b.firstChild)):wr=T),ss(c,d,d.pendingProps.children,g),Iy(c,d),c===null&&(d.flags|=4194304),d.child;case 5:return c===null&&bn&&((T=b=wr)&&(b=SG(b,d.type,d.pendingProps,to),b!==null?(d.stateNode=b,rs=d,wr=ro(b.firstChild),to=!1,T=!0):T=!1),T||Ru(d)),qe(d),T=d.type,k=d.pendingProps,P=c!==null?c.memoizedProps:null,b=k.children,Jj(T,k)?b=null:P!==null&&Jj(T,P)&&(d.flags|=32),d.memoizedState!==null&&(T=ZS(c,d,PY,null,null,g),ig._currentValue=T),Iy(c,d),ss(c,d,b,g),d.child;case 6:return c===null&&bn&&((c=g=wr)&&(g=jG(g,d.pendingProps,to),g!==null?(d.stateNode=g,rs=d,wr=null,c=!0):c=!1),c||Ru(d)),null;case 13:return tR(c,d,g);case 4:return Qe(d,d.stateNode.containerInfo),b=d.pendingProps,c===null?d.child=jd(d,null,b,g):ss(c,d,b,g),d.child;case 11:return WM(c,d,d.type,d.pendingProps,g);case 7:return ss(c,d,d.pendingProps,g),d.child;case 8:return ss(c,d,d.pendingProps.children,g),d.child;case 12:return ss(c,d,d.pendingProps.children,g),d.child;case 10:return b=d.pendingProps,Du(d,d.type,b.value),ss(c,d,b.children,g),d.child;case 9:return T=d.type._context,b=d.pendingProps.children,xd(d),T=is(T),b=b(T),d.flags|=1,ss(c,d,b,g),d.child;case 14:return VM(c,d,d.type,d.pendingProps,g);case 15:return YM(c,d,d.type,d.pendingProps,g);case 19:return rR(c,d,g);case 31:return WY(c,d,g);case 22:return GM(c,d,g,d.pendingProps);case 24:return xd(d),b=is(mi),c===null?(T=qS(),T===null&&(T=ir,k=zS(),T.pooledCache=k,k.refCount++,k!==null&&(T.pooledCacheLanes|=g),T=k),d.memoizedState={parent:b,cache:T},QS(d),Du(d,mi,T)):((c.lanes&g)!==0&&(US(c,d),P0(d,null,null,g),L0()),T=c.memoizedState,k=d.memoizedState,T.parent!==b?(T={parent:b,cache:b},d.memoizedState=T,d.lanes===0&&(d.memoizedState=d.updateQueue.baseState=T),Du(d,mi,b)):(b=k.cache,Du(d,mi,b),b!==T.cache&&FS(d,[mi],g,!0))),ss(c,d,d.pendingProps.children,g),d.child;case 29:throw d.pendingProps}throw Error(r(156,d.tag))}function Oc(c){c.flags|=4}function _j(c,d,g,b,T){if((d=(c.mode&32)!==0)&&(d=!1),d){if(c.flags|=16777216,(T&335544128)===T)if(c.stateNode.complete)c.flags|=8192;else if(MR())c.flags|=8192;else throw Sd=xy,$S}else c.flags&=-16777217}function sR(c,d){if(d.type!=="stylesheet"||(d.state.loading&4)!==0)c.flags&=-16777217;else if(c.flags|=16777216,!xD(d))if(MR())c.flags|=8192;else throw Sd=xy,$S}function Ly(c,d){d!==null&&(c.flags|=4),c.flags&16384&&(d=c.tag!==22?He():536870912,c.lanes|=d,lp|=d)}function Q0(c,d){if(!bn)switch(c.tailMode){case"hidden":d=c.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?c.tail=null:g.sibling=null;break;case"collapsed":g=c.tail;for(var b=null;g!==null;)g.alternate!==null&&(b=g),g=g.sibling;b===null?d||c.tail===null?c.tail=null:c.tail.sibling=null:b.sibling=null}}function Sr(c){var d=c.alternate!==null&&c.alternate.child===c.child,g=0,b=0;if(d)for(var T=c.child;T!==null;)g|=T.lanes|T.childLanes,b|=T.subtreeFlags&65011712,b|=T.flags&65011712,T.return=c,T=T.sibling;else for(T=c.child;T!==null;)g|=T.lanes|T.childLanes,b|=T.subtreeFlags,b|=T.flags,T.return=c,T=T.sibling;return c.subtreeFlags|=b,c.childLanes=g,d}function YY(c,d,g){var b=d.pendingProps;switch(NS(d),d.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sr(d),null;case 1:return Sr(d),null;case 3:return g=d.stateNode,b=null,c!==null&&(b=c.memoizedState.cache),d.memoizedState.cache!==b&&(d.flags|=2048),Cc(mi),We(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(c===null||c.child===null)&&(Gf(d)?Oc(d):c===null||c.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,BS())),Sr(d),null;case 26:var T=d.type,k=d.memoizedState;return c===null?(Oc(d),k!==null?(Sr(d),sR(d,k)):(Sr(d),_j(d,T,null,b,g))):k?k!==c.memoizedState?(Oc(d),Sr(d),sR(d,k)):(Sr(d),d.flags&=-16777217):(c=c.memoizedProps,c!==b&&Oc(d),Sr(d),_j(d,T,c,b,g)),null;case 27:if(ae(d),g=ve.current,T=d.type,c!==null&&d.stateNode!=null)c.memoizedProps!==b&&Oc(d);else{if(!b){if(d.stateNode===null)throw Error(r(166));return Sr(d),null}c=ee.current,Gf(d)?P4(d):(c=dD(T,b,g),d.stateNode=c,Oc(d))}return Sr(d),null;case 5:if(ae(d),T=d.type,c!==null&&d.stateNode!=null)c.memoizedProps!==b&&Oc(d);else{if(!b){if(d.stateNode===null)throw Error(r(166));return Sr(d),null}if(k=ee.current,Gf(d))P4(d);else{var P=Zy(ve.current);switch(k){case 1:k=P.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:k=P.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":k=P.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":k=P.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":k=P.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof b.is=="string"?P.createElement("select",{is:b.is}):P.createElement("select"),b.multiple?k.multiple=!0:b.size&&(k.size=b.size);break;default:k=typeof b.is=="string"?P.createElement(T,{is:b.is}):P.createElement(T)}}k[br]=d,k[Bi]=b;e:for(P=d.child;P!==null;){if(P.tag===5||P.tag===6)k.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===d)break e;for(;P.sibling===null;){if(P.return===null||P.return===d)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}d.stateNode=k;e:switch(as(k,T,b),T){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}b&&Oc(d)}}return Sr(d),_j(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==b&&Oc(d);else{if(typeof b!="string"&&d.stateNode===null)throw Error(r(166));if(c=ve.current,Gf(d)){if(c=d.stateNode,g=d.memoizedProps,b=null,T=rs,T!==null)switch(T.tag){case 27:case 5:b=T.memoizedProps}c[br]=d,c=!!(c.nodeValue===g||b!==null&&b.suppressHydrationWarning===!0||tD(c.nodeValue,g)),c||Ru(d,!0)}else c=Zy(c).createTextNode(b),c[br]=d,d.stateNode=c}return Sr(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(b=Gf(d),g!==null){if(c===null){if(!b)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[br]=d}else bd(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Sr(d),c=!1}else g=BS(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(Sa(d),d):(Sa(d),null);if((d.flags&128)!==0)throw Error(r(558))}return Sr(d),null;case 13:if(b=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(T=Gf(d),b!==null&&b.dehydrated!==null){if(c===null){if(!T)throw Error(r(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[br]=d}else bd(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Sr(d),T=!1}else T=BS(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=T),T=!0;if(!T)return d.flags&256?(Sa(d),d):(Sa(d),null)}return Sa(d),(d.flags&128)!==0?(d.lanes=g,d):(g=b!==null,c=c!==null&&c.memoizedState!==null,g&&(b=d.child,T=null,b.alternate!==null&&b.alternate.memoizedState!==null&&b.alternate.memoizedState.cachePool!==null&&(T=b.alternate.memoizedState.cachePool.pool),k=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(k=b.memoizedState.cachePool.pool),k!==T&&(b.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),Ly(d,d.updateQueue),Sr(d),null);case 4:return We(),c===null&&Yj(d.stateNode.containerInfo),Sr(d),null;case 10:return Cc(d.type),Sr(d),null;case 19:if(V(oi),b=d.memoizedState,b===null)return Sr(d),null;if(T=(d.flags&128)!==0,k=b.rendering,k===null)if(T)Q0(b,!1);else{if(Jr!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(k=jy(c),k!==null){for(d.flags|=128,Q0(b,!1),c=k.updateQueue,d.updateQueue=c,Ly(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)D4(g,c),g=g.sibling;return X(oi,oi.current&1|2),bn&&Sc(d,b.treeForkCount),d.child}c=c.sibling}b.tail!==null&&Xe()>qy&&(d.flags|=128,T=!0,Q0(b,!1),d.lanes=4194304)}else{if(!T)if(c=jy(k),c!==null){if(d.flags|=128,T=!0,c=c.updateQueue,d.updateQueue=c,Ly(d,c),Q0(b,!0),b.tail===null&&b.tailMode==="hidden"&&!k.alternate&&!bn)return Sr(d),null}else 2*Xe()-b.renderingStartTime>qy&&g!==536870912&&(d.flags|=128,T=!0,Q0(b,!1),d.lanes=4194304);b.isBackwards?(k.sibling=d.child,d.child=k):(c=b.last,c!==null?c.sibling=k:d.child=k,b.last=k)}return b.tail!==null?(c=b.tail,b.rendering=c,b.tail=c.sibling,b.renderingStartTime=Xe(),c.sibling=null,g=oi.current,X(oi,T?g&1|2:g&1),bn&&Sc(d,b.treeForkCount),c):(Sr(d),null);case 22:case 23:return Sa(d),GS(),b=d.memoizedState!==null,c!==null?c.memoizedState!==null!==b&&(d.flags|=8192):b&&(d.flags|=8192),b?(g&536870912)!==0&&(d.flags&128)===0&&(Sr(d),d.subtreeFlags&6&&(d.flags|=8192)):Sr(d),g=d.updateQueue,g!==null&&Ly(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==g&&(d.flags|=2048),c!==null&&V(Ad),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Cc(mi),Sr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function GY(c,d){switch(NS(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return Cc(mi),We(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return ae(d),null;case 31:if(d.memoizedState!==null){if(Sa(d),d.alternate===null)throw Error(r(340));bd()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(Sa(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));bd()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return V(oi),null;case 4:return We(),null;case 10:return Cc(d.type),null;case 22:case 23:return Sa(d),GS(),c!==null&&V(Ad),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return Cc(mi),null;case 25:return null;default:return null}}function aR(c,d){switch(NS(d),d.tag){case 3:Cc(mi),We();break;case 26:case 27:case 5:ae(d);break;case 4:We();break;case 31:d.memoizedState!==null&&Sa(d);break;case 13:Sa(d);break;case 19:V(oi);break;case 10:Cc(d.type);break;case 22:case 23:Sa(d),GS(),c!==null&&V(Ad);break;case 24:Cc(mi)}}function U0(c,d){try{var g=d.updateQueue,b=g!==null?g.lastEffect:null;if(b!==null){var T=b.next;g=T;do{if((g.tag&c)===c){b=void 0;var k=g.create,P=g.inst;b=k(),P.destroy=b}g=g.next}while(g!==T)}}catch(Z){Gn(d,d.return,Z)}}function Fu(c,d,g){try{var b=d.updateQueue,T=b!==null?b.lastEffect:null;if(T!==null){var k=T.next;b=k;do{if((b.tag&c)===c){var P=b.inst,Z=P.destroy;if(Z!==void 0){P.destroy=void 0,T=d;var ie=g,we=Z;try{we()}catch(ke){Gn(T,ie,ke)}}}b=b.next}while(b!==k)}}catch(ke){Gn(d,d.return,ke)}}function oR(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{K4(d,g)}catch(b){Gn(c,c.return,b)}}}function lR(c,d,g){g.props=_d(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(b){Gn(c,d,b)}}function W0(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var b=c.stateNode;break;case 30:b=c.stateNode;break;default:b=c.stateNode}typeof g=="function"?c.refCleanup=g(b):g.current=b}}catch(T){Gn(c,d,T)}}function _l(c,d){var g=c.ref,b=c.refCleanup;if(g!==null)if(typeof b=="function")try{b()}catch(T){Gn(c,d,T)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(T){Gn(c,d,T)}else g.current=null}function cR(c){var d=c.type,g=c.memoizedProps,b=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&b.focus();break e;case"img":g.src?b.src=g.src:g.srcSet&&(b.srcset=g.srcSet)}}catch(T){Gn(c,c.return,T)}}function Tj(c,d,g){try{var b=c.stateNode;vG(b,c.type,g,d),b[Bi]=d}catch(T){Gn(c,c.return,T)}}function uR(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&Wu(c.type)||c.tag===4}function kj(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||uR(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&Wu(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function Oj(c,d,g){var b=c.tag;if(b===5||b===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=st));else if(b!==4&&(b===27&&Wu(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for(Oj(c,d,g),c=c.sibling;c!==null;)Oj(c,d,g),c=c.sibling}function Py(c,d,g){var b=c.tag;if(b===5||b===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(b!==4&&(b===27&&Wu(c.type)&&(g=c.stateNode),c=c.child,c!==null))for(Py(c,d,g),c=c.sibling;c!==null;)Py(c,d,g),c=c.sibling}function hR(c){var d=c.stateNode,g=c.memoizedProps;try{for(var b=c.type,T=d.attributes;T.length;)d.removeAttributeNode(T[0]);as(d,b,g),d[br]=c,d[Bi]=g}catch(k){Gn(c,c.return,k)}}var Ec=!1,bi=!1,Ej=!1,dR=typeof WeakSet=="function"?WeakSet:Set,zi=null;function XY(c,d){if(c=c.containerInfo,Kj=s1,c=Ar(c),Kr(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var b=g.getSelection&&g.getSelection();if(b&&b.rangeCount!==0){g=b.anchorNode;var T=b.anchorOffset,k=b.focusNode;b=b.focusOffset;try{g.nodeType,k.nodeType}catch{g=null;break e}var P=0,Z=-1,ie=-1,we=0,ke=0,ze=c,Se=null;t:for(;;){for(var Ce;ze!==g||T!==0&&ze.nodeType!==3||(Z=P+T),ze!==k||b!==0&&ze.nodeType!==3||(ie=P+b),ze.nodeType===3&&(P+=ze.nodeValue.length),(Ce=ze.firstChild)!==null;)Se=ze,ze=Ce;for(;;){if(ze===c)break t;if(Se===g&&++we===T&&(Z=P),Se===k&&++ke===b&&(ie=P),(Ce=ze.nextSibling)!==null)break;ze=Se,Se=ze.parentNode}ze=Ce}g=Z===-1||ie===-1?null:{start:Z,end:ie}}else g=null}g=g||{start:0,end:0}}else g=null;for(Zj={focusedElem:c,selectionRange:g},s1=!1,zi=d;zi!==null;)if(d=zi,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,zi=c;else for(;zi!==null;){switch(d=zi,k=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g<c.length;g++)T=c[g],T.ref.impl=T.nextImpl;break;case 11:case 15:break;case 1:if((c&1024)!==0&&k!==null){c=void 0,g=d,T=k.memoizedProps,k=k.memoizedState,b=g.stateNode;try{var wt=_d(g.type,T);c=b.getSnapshotBeforeUpdate(wt,k),b.__reactInternalSnapshotBeforeUpdate=c}catch(Pt){Gn(g,g.return,Pt)}}break;case 3:if((c&1024)!==0){if(c=d.stateNode.containerInfo,g=c.nodeType,g===9)tC(c);else if(g===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":tC(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((c&1024)!==0)throw Error(r(163))}if(c=d.sibling,c!==null){c.return=d.return,zi=c;break}zi=d.return}}function fR(c,d,g){var b=g.flags;switch(g.tag){case 0:case 11:case 15:Rc(c,g),b&4&&U0(5,g);break;case 1:if(Rc(c,g),b&4)if(c=g.stateNode,d===null)try{c.componentDidMount()}catch(P){Gn(g,g.return,P)}else{var T=_d(g.type,d.memoizedProps);d=d.memoizedState;try{c.componentDidUpdate(T,d,c.__reactInternalSnapshotBeforeUpdate)}catch(P){Gn(g,g.return,P)}}b&64&&oR(g),b&512&&W0(g,g.return);break;case 3:if(Rc(c,g),b&64&&(c=g.updateQueue,c!==null)){if(d=null,g.child!==null)switch(g.child.tag){case 27:case 5:d=g.child.stateNode;break;case 1:d=g.child.stateNode}try{K4(c,d)}catch(P){Gn(g,g.return,P)}}break;case 27:d===null&&b&4&&hR(g);case 26:case 5:Rc(c,g),d===null&&b&4&&cR(g),b&512&&W0(g,g.return);break;case 12:Rc(c,g);break;case 31:Rc(c,g),b&4&&gR(c,g);break;case 13:Rc(c,g),b&4&&vR(c,g),b&64&&(c=g.memoizedState,c!==null&&(c=c.dehydrated,c!==null&&(g=sG.bind(null,g),CG(c,g))));break;case 22:if(b=g.memoizedState!==null||Ec,!b){d=d!==null&&d.memoizedState!==null||bi,T=Ec;var k=bi;Ec=b,(bi=d)&&!k?Dc(c,g,(g.subtreeFlags&8772)!==0):Rc(c,g),Ec=T,bi=k}break;case 30:break;default:Rc(c,g)}}function pR(c){var d=c.alternate;d!==null&&(c.alternate=null,pR(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&Mr(d)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}var Rr=null,ea=!1;function Mc(c,d,g){for(g=g.child;g!==null;)mR(c,d,g),g=g.sibling}function mR(c,d,g){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(fn,g)}catch{}switch(g.tag){case 26:bi||_l(g,d),Mc(c,d,g),g.memoizedState?g.memoizedState.count--:g.stateNode&&(g=g.stateNode,g.parentNode.removeChild(g));break;case 27:bi||_l(g,d);var b=Rr,T=ea;Wu(g.type)&&(Rr=g.stateNode,ea=!1),Mc(c,d,g),tg(g.stateNode),Rr=b,ea=T;break;case 5:bi||_l(g,d);case 6:if(b=Rr,T=ea,Rr=null,Mc(c,d,g),Rr=b,ea=T,Rr!==null)if(ea)try{(Rr.nodeType===9?Rr.body:Rr.nodeName==="HTML"?Rr.ownerDocument.body:Rr).removeChild(g.stateNode)}catch(k){Gn(g,d,k)}else try{Rr.removeChild(g.stateNode)}catch(k){Gn(g,d,k)}break;case 18:Rr!==null&&(ea?(c=Rr,oD(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,g.stateNode),gp(c)):oD(Rr,g.stateNode));break;case 4:b=Rr,T=ea,Rr=g.stateNode.containerInfo,ea=!0,Mc(c,d,g),Rr=b,ea=T;break;case 0:case 11:case 14:case 15:Fu(2,g,d),bi||Fu(4,g,d),Mc(c,d,g);break;case 1:bi||(_l(g,d),b=g.stateNode,typeof b.componentWillUnmount=="function"&&lR(g,d,b)),Mc(c,d,g);break;case 21:Mc(c,d,g);break;case 22:bi=(b=bi)||g.memoizedState!==null,Mc(c,d,g),bi=b;break;default:Mc(c,d,g)}}function gR(c,d){if(d.memoizedState===null&&(c=d.alternate,c!==null&&(c=c.memoizedState,c!==null))){c=c.dehydrated;try{gp(c)}catch(g){Gn(d,d.return,g)}}}function vR(c,d){if(d.memoizedState===null&&(c=d.alternate,c!==null&&(c=c.memoizedState,c!==null&&(c=c.dehydrated,c!==null))))try{gp(c)}catch(g){Gn(d,d.return,g)}}function KY(c){switch(c.tag){case 31:case 13:case 19:var d=c.stateNode;return d===null&&(d=c.stateNode=new dR),d;case 22:return c=c.stateNode,d=c._retryCache,d===null&&(d=c._retryCache=new dR),d;default:throw Error(r(435,c.tag))}}function Fy(c,d){var g=KY(c);d.forEach(function(b){if(!g.has(b)){g.add(b);var T=aG.bind(null,c,b);b.then(T,T)}})}function ta(c,d){var g=d.deletions;if(g!==null)for(var b=0;b<g.length;b++){var T=g[b],k=c,P=d,Z=P;e:for(;Z!==null;){switch(Z.tag){case 27:if(Wu(Z.type)){Rr=Z.stateNode,ea=!1;break e}break;case 5:Rr=Z.stateNode,ea=!1;break e;case 3:case 4:Rr=Z.stateNode.containerInfo,ea=!0;break e}Z=Z.return}if(Rr===null)throw Error(r(160));mR(k,P,T),Rr=null,ea=!1,k=T.alternate,k!==null&&(k.return=null),T.return=null}if(d.subtreeFlags&13886)for(d=d.child;d!==null;)bR(d,c),d=d.sibling}var Do=null;function bR(c,d){var g=c.alternate,b=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:ta(d,c),na(c),b&4&&(Fu(3,c,c.return),U0(3,c),Fu(5,c,c.return));break;case 1:ta(d,c),na(c),b&512&&(bi||g===null||_l(g,g.return)),b&64&&Ec&&(c=c.updateQueue,c!==null&&(b=c.callbacks,b!==null&&(g=c.shared.hiddenCallbacks,c.shared.hiddenCallbacks=g===null?b:g.concat(b))));break;case 26:var T=Do;if(ta(d,c),na(c),b&512&&(bi||g===null||_l(g,g.return)),b&4){var k=g!==null?g.memoizedState:null;if(b=c.memoizedState,g===null)if(b===null)if(c.stateNode===null){e:{b=c.type,g=c.memoizedProps,T=T.ownerDocument||T;t:switch(b){case"title":k=T.getElementsByTagName("title")[0],(!k||k[yr]||k[br]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=T.createElement(b),T.head.insertBefore(k,T.querySelector("head > title"))),as(k,b,g),k[br]=c,zr(k),b=k;break e;case"link":var P=bD("link","href",T).get(b+(g.href||""));if(P){for(var Z=0;Z<P.length;Z++)if(k=P[Z],k.getAttribute("href")===(g.href==null||g.href===""?null:g.href)&&k.getAttribute("rel")===(g.rel==null?null:g.rel)&&k.getAttribute("title")===(g.title==null?null:g.title)&&k.getAttribute("crossorigin")===(g.crossOrigin==null?null:g.crossOrigin)){P.splice(Z,1);break t}}k=T.createElement(b),as(k,b,g),T.head.appendChild(k);break;case"meta":if(P=bD("meta","content",T).get(b+(g.content||""))){for(Z=0;Z<P.length;Z++)if(k=P[Z],k.getAttribute("content")===(g.content==null?null:""+g.content)&&k.getAttribute("name")===(g.name==null?null:g.name)&&k.getAttribute("property")===(g.property==null?null:g.property)&&k.getAttribute("http-equiv")===(g.httpEquiv==null?null:g.httpEquiv)&&k.getAttribute("charset")===(g.charSet==null?null:g.charSet)){P.splice(Z,1);break t}}k=T.createElement(b),as(k,b,g),T.head.appendChild(k);break;default:throw Error(r(468,b))}k[br]=c,zr(k),b=k}c.stateNode=b}else yD(T,c.type,c.stateNode);else c.stateNode=vD(T,b,c.memoizedProps);else k!==b?(k===null?g.stateNode!==null&&(g=g.stateNode,g.parentNode.removeChild(g)):k.count--,b===null?yD(T,c.type,c.stateNode):vD(T,b,c.memoizedProps)):b===null&&c.stateNode!==null&&Tj(c,c.memoizedProps,g.memoizedProps)}break;case 27:ta(d,c),na(c),b&512&&(bi||g===null||_l(g,g.return)),g!==null&&b&4&&Tj(c,c.memoizedProps,g.memoizedProps);break;case 5:if(ta(d,c),na(c),b&512&&(bi||g===null||_l(g,g.return)),c.flags&32){T=c.stateNode;try{Bt(T,"")}catch(wt){Gn(c,c.return,wt)}}b&4&&c.stateNode!=null&&(T=c.memoizedProps,Tj(c,T,g!==null?g.memoizedProps:T)),b&1024&&(Ej=!0);break;case 6:if(ta(d,c),na(c),b&4){if(c.stateNode===null)throw Error(r(162));b=c.memoizedProps,g=c.stateNode;try{g.nodeValue=b}catch(wt){Gn(c,c.return,wt)}}break;case 3:if(t1=null,T=Do,Do=Jy(d.containerInfo),ta(d,c),Do=T,na(c),b&4&&g!==null&&g.memoizedState.isDehydrated)try{gp(d.containerInfo)}catch(wt){Gn(c,c.return,wt)}Ej&&(Ej=!1,yR(c));break;case 4:b=Do,Do=Jy(c.stateNode.containerInfo),ta(d,c),na(c),Do=b;break;case 12:ta(d,c),na(c);break;case 31:ta(d,c),na(c),b&4&&(b=c.updateQueue,b!==null&&(c.updateQueue=null,Fy(c,b)));break;case 13:ta(d,c),na(c),c.child.flags&8192&&c.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(Hy=Xe()),b&4&&(b=c.updateQueue,b!==null&&(c.updateQueue=null,Fy(c,b)));break;case 22:T=c.memoizedState!==null;var ie=g!==null&&g.memoizedState!==null,we=Ec,ke=bi;if(Ec=we||T,bi=ke||ie,ta(d,c),bi=ke,Ec=we,na(c),b&8192)e:for(d=c.stateNode,d._visibility=T?d._visibility&-2:d._visibility|1,T&&(g===null||ie||Ec||bi||Td(c)),g=null,d=c;;){if(d.tag===5||d.tag===26){if(g===null){ie=g=d;try{if(k=ie.stateNode,T)P=k.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{Z=ie.stateNode;var ze=ie.memoizedProps.style,Se=ze!=null&&ze.hasOwnProperty("display")?ze.display:null;Z.style.display=Se==null||typeof Se=="boolean"?"":(""+Se).trim()}}catch(wt){Gn(ie,ie.return,wt)}}}else if(d.tag===6){if(g===null){ie=d;try{ie.stateNode.nodeValue=T?"":ie.memoizedProps}catch(wt){Gn(ie,ie.return,wt)}}}else if(d.tag===18){if(g===null){ie=d;try{var Ce=ie.stateNode;T?lD(Ce,!0):lD(ie.stateNode,!1)}catch(wt){Gn(ie,ie.return,wt)}}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===c)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break e;for(;d.sibling===null;){if(d.return===null||d.return===c)break e;g===d&&(g=null),d=d.return}g===d&&(g=null),d.sibling.return=d.return,d=d.sibling}b&4&&(b=c.updateQueue,b!==null&&(g=b.retryQueue,g!==null&&(b.retryQueue=null,Fy(c,g))));break;case 19:ta(d,c),na(c),b&4&&(b=c.updateQueue,b!==null&&(c.updateQueue=null,Fy(c,b)));break;case 30:break;case 21:break;default:ta(d,c),na(c)}}function na(c){var d=c.flags;if(d&2){try{for(var g,b=c.return;b!==null;){if(uR(b)){g=b;break}b=b.return}if(g==null)throw Error(r(160));switch(g.tag){case 27:var T=g.stateNode,k=kj(c);Py(c,k,T);break;case 5:var P=g.stateNode;g.flags&32&&(Bt(P,""),g.flags&=-33);var Z=kj(c);Py(c,Z,P);break;case 3:case 4:var ie=g.stateNode.containerInfo,we=kj(c);Oj(c,we,ie);break;default:throw Error(r(161))}}catch(ke){Gn(c,c.return,ke)}c.flags&=-3}d&4096&&(c.flags&=-4097)}function yR(c){if(c.subtreeFlags&1024)for(c=c.child;c!==null;){var d=c;yR(d),d.tag===5&&d.flags&1024&&d.stateNode.reset(),c=c.sibling}}function Rc(c,d){if(d.subtreeFlags&8772)for(d=d.child;d!==null;)fR(c,d.alternate,d),d=d.sibling}function Td(c){for(c=c.child;c!==null;){var d=c;switch(d.tag){case 0:case 11:case 14:case 15:Fu(4,d,d.return),Td(d);break;case 1:_l(d,d.return);var g=d.stateNode;typeof g.componentWillUnmount=="function"&&lR(d,d.return,g),Td(d);break;case 27:tg(d.stateNode);case 26:case 5:_l(d,d.return),Td(d);break;case 22:d.memoizedState===null&&Td(d);break;case 30:Td(d);break;default:Td(d)}c=c.sibling}}function Dc(c,d,g){for(g=g&&(d.subtreeFlags&8772)!==0,d=d.child;d!==null;){var b=d.alternate,T=c,k=d,P=k.flags;switch(k.tag){case 0:case 11:case 15:Dc(T,k,g),U0(4,k);break;case 1:if(Dc(T,k,g),b=k,T=b.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(we){Gn(b,b.return,we)}if(b=k,T=b.updateQueue,T!==null){var Z=b.stateNode;try{var ie=T.shared.hiddenCallbacks;if(ie!==null)for(T.shared.hiddenCallbacks=null,T=0;T<ie.length;T++)X4(ie[T],Z)}catch(we){Gn(b,b.return,we)}}g&&P&64&&oR(k),W0(k,k.return);break;case 27:hR(k);case 26:case 5:Dc(T,k,g),g&&b===null&&P&4&&cR(k),W0(k,k.return);break;case 12:Dc(T,k,g);break;case 31:Dc(T,k,g),g&&P&4&&gR(T,k);break;case 13:Dc(T,k,g),g&&P&4&&vR(T,k);break;case 22:k.memoizedState===null&&Dc(T,k,g),W0(k,k.return);break;case 30:break;default:Dc(T,k,g)}d=d.sibling}}function Mj(c,d){var g=null;c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),c=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(c=d.memoizedState.cachePool.pool),c!==g&&(c!=null&&c.refCount++,g!=null&&R0(g))}function Rj(c,d){c=null,d.alternate!==null&&(c=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==c&&(d.refCount++,c!=null&&R0(c))}function No(c,d,g,b){if(d.subtreeFlags&10256)for(d=d.child;d!==null;)xR(c,d,g,b),d=d.sibling}function xR(c,d,g,b){var T=d.flags;switch(d.tag){case 0:case 11:case 15:No(c,d,g,b),T&2048&&U0(9,d);break;case 1:No(c,d,g,b);break;case 3:No(c,d,g,b),T&2048&&(c=null,d.alternate!==null&&(c=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==c&&(d.refCount++,c!=null&&R0(c)));break;case 12:if(T&2048){No(c,d,g,b),c=d.stateNode;try{var k=d.memoizedProps,P=k.id,Z=k.onPostCommit;typeof Z=="function"&&Z(P,d.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(ie){Gn(d,d.return,ie)}}else No(c,d,g,b);break;case 31:No(c,d,g,b);break;case 13:No(c,d,g,b);break;case 23:break;case 22:k=d.stateNode,P=d.alternate,d.memoizedState!==null?k._visibility&2?No(c,d,g,b):V0(c,d):k._visibility&2?No(c,d,g,b):(k._visibility|=2,sp(c,d,g,b,(d.subtreeFlags&10256)!==0||!1)),T&2048&&Mj(P,d);break;case 24:No(c,d,g,b),T&2048&&Rj(d.alternate,d);break;default:No(c,d,g,b)}}function sp(c,d,g,b,T){for(T=T&&((d.subtreeFlags&10256)!==0||!1),d=d.child;d!==null;){var k=c,P=d,Z=g,ie=b,we=P.flags;switch(P.tag){case 0:case 11:case 15:sp(k,P,Z,ie,T),U0(8,P);break;case 23:break;case 22:var ke=P.stateNode;P.memoizedState!==null?ke._visibility&2?sp(k,P,Z,ie,T):V0(k,P):(ke._visibility|=2,sp(k,P,Z,ie,T)),T&&we&2048&&Mj(P.alternate,P);break;case 24:sp(k,P,Z,ie,T),T&&we&2048&&Rj(P.alternate,P);break;default:sp(k,P,Z,ie,T)}d=d.sibling}}function V0(c,d){if(d.subtreeFlags&10256)for(d=d.child;d!==null;){var g=c,b=d,T=b.flags;switch(b.tag){case 22:V0(g,b),T&2048&&Mj(b.alternate,b);break;case 24:V0(g,b),T&2048&&Rj(b.alternate,b);break;default:V0(g,b)}d=d.sibling}}var Y0=8192;function ap(c,d,g){if(c.subtreeFlags&Y0)for(c=c.child;c!==null;)AR(c,d,g),c=c.sibling}function AR(c,d,g){switch(c.tag){case 26:ap(c,d,g),c.flags&Y0&&c.memoizedState!==null&&LG(g,Do,c.memoizedState,c.memoizedProps);break;case 5:ap(c,d,g);break;case 3:case 4:var b=Do;Do=Jy(c.stateNode.containerInfo),ap(c,d,g),Do=b;break;case 22:c.memoizedState===null&&(b=c.alternate,b!==null&&b.memoizedState!==null?(b=Y0,Y0=16777216,ap(c,d,g),Y0=b):ap(c,d,g));break;default:ap(c,d,g)}}function wR(c){var d=c.alternate;if(d!==null&&(c=d.child,c!==null)){d.child=null;do d=c.sibling,c.sibling=null,c=d;while(c!==null)}}function G0(c){var d=c.deletions;if((c.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var b=d[g];zi=b,jR(b,c)}wR(c)}if(c.subtreeFlags&10256)for(c=c.child;c!==null;)SR(c),c=c.sibling}function SR(c){switch(c.tag){case 0:case 11:case 15:G0(c),c.flags&2048&&Fu(9,c,c.return);break;case 3:G0(c);break;case 12:G0(c);break;case 22:var d=c.stateNode;c.memoizedState!==null&&d._visibility&2&&(c.return===null||c.return.tag!==13)?(d._visibility&=-3,zy(c)):G0(c);break;default:G0(c)}}function zy(c){var d=c.deletions;if((c.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var b=d[g];zi=b,jR(b,c)}wR(c)}for(c=c.child;c!==null;){switch(d=c,d.tag){case 0:case 11:case 15:Fu(8,d,d.return),zy(d);break;case 22:g=d.stateNode,g._visibility&2&&(g._visibility&=-3,zy(d));break;default:zy(d)}c=c.sibling}}function jR(c,d){for(;zi!==null;){var g=zi;switch(g.tag){case 0:case 11:case 15:Fu(8,g,d);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var b=g.memoizedState.cachePool.pool;b!=null&&b.refCount++}break;case 24:R0(g.memoizedState.cache)}if(b=g.child,b!==null)b.return=g,zi=b;else e:for(g=c;zi!==null;){b=zi;var T=b.sibling,k=b.return;if(pR(b),b===g){zi=null;break e}if(T!==null){T.return=k,zi=T;break e}zi=k}}}var ZY={getCacheForType:function(c){var d=is(mi),g=d.data.get(c);return g===void 0&&(g=c(),d.data.set(c,g)),g},cacheSignal:function(){return is(mi).controller.signal}},JY=typeof WeakMap=="function"?WeakMap:Map,In=0,ir=null,cn=null,pn=0,Yn=0,ja=null,zu=!1,op=!1,Dj=!1,Nc=0,Jr=0,Hu=0,kd=0,Nj=0,Ca=0,lp=0,X0=null,ra=null,Ij=!1,Hy=0,CR=0,qy=1/0,$y=null,qu=null,ji=0,$u=null,cp=null,Ic=0,Bj=0,Lj=null,_R=null,K0=0,Pj=null;function _a(){return(In&2)!==0&&pn!==0?pn&-pn:I.T!==null?Qj():Vr()}function TR(){if(Ca===0)if((pn&536870912)===0||bn){var c=It;It<<=1,(It&3932160)===0&&(It=262144),Ca=c}else Ca=536870912;return c=wa.current,c!==null&&(c.flags|=32),Ca}function ia(c,d,g){(c===ir&&(Yn===2||Yn===9)||c.cancelPendingCommit!==null)&&(up(c,0),Qu(c,pn,Ca,!1)),qt(c,g),((In&2)===0||c!==ir)&&(c===ir&&((In&2)===0&&(kd|=g),Jr===4&&Qu(c,pn,Ca,!1)),Tl(c))}function kR(c,d,g){if((In&6)!==0)throw Error(r(327));var b=!g&&(d&127)===0&&(d&c.expiredLanes)===0||_e(c,d),T=b?nG(c,d):zj(c,d,!0),k=b;do{if(T===0){op&&!b&&Qu(c,d,0,!1);break}else{if(g=c.current.alternate,k&&!eG(g)){T=zj(c,d,!1),k=!1;continue}if(T===2){if(k=d,c.errorRecoveryDisabledLanes&k)var P=0;else P=c.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){d=P;e:{var Z=c;T=X0;var ie=Z.current.memoizedState.isDehydrated;if(ie&&(up(Z,P).flags|=256),P=zj(Z,P,!1),P!==2){if(Dj&&!ie){Z.errorRecoveryDisabledLanes|=k,kd|=k,T=4;break e}k=ra,ra=T,k!==null&&(ra===null?ra=k:ra.push.apply(ra,k))}T=P}if(k=!1,T!==2)continue}}if(T===1){up(c,0),Qu(c,d,0,!0);break}e:{switch(b=c,k=T,k){case 0:case 1:throw Error(r(345));case 4:if((d&4194048)!==d)break;case 6:Qu(b,d,Ca,!zu);break e;case 2:ra=null;break;case 3:case 5:break;default:throw Error(r(329))}if((d&62914560)===d&&(T=Hy+300-Xe(),10<T)){if(Qu(b,d,Ca,!zu),ne(b,0,!0)!==0)break e;Ic=d,b.timeoutHandle=sD(OR.bind(null,b,g,ra,$y,Ij,d,Ca,kd,lp,zu,k,"Throttled",-0,0),T);break e}OR(b,g,ra,$y,Ij,d,Ca,kd,lp,zu,k,null,-0,0)}}break}while(!0);Tl(c)}function OR(c,d,g,b,T,k,P,Z,ie,we,ke,ze,Se,Ce){if(c.timeoutHandle=-1,ze=d.subtreeFlags,ze&8192||(ze&16785408)===16785408){ze={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:st},AR(d,k,ze);var wt=(k&62914560)===k?Hy-Xe():(k&4194048)===k?CR-Xe():0;if(wt=PG(ze,wt),wt!==null){Ic=k,c.cancelPendingCommit=wt(LR.bind(null,c,d,k,g,b,T,P,Z,ie,ke,ze,null,Se,Ce)),Qu(c,k,P,!we);return}}LR(c,d,k,g,b,T,P,Z,ie)}function eG(c){for(var d=c;;){var g=d.tag;if((g===0||g===11||g===15)&&d.flags&16384&&(g=d.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var b=0;b<g.length;b++){var T=g[b],k=T.getSnapshot;T=T.value;try{if(!Qt(k(),T))return!1}catch{return!1}}if(g=d.child,d.subtreeFlags&16384&&g!==null)g.return=d,d=g;else{if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Qu(c,d,g,b){d&=~Nj,d&=~kd,c.suspendedLanes|=d,c.pingedLanes&=~d,b&&(c.warmLanes|=d),b=c.expirationTimes;for(var T=d;0<T;){var k=31-tn(T),P=1<<k;b[k]=-1,T&=~P}g!==0&&Re(c,g,d)}function Qy(){return(In&6)===0?(Z0(0),!1):!0}function Fj(){if(cn!==null){if(Yn===0)var c=cn.return;else c=cn,jc=yd=null,tj(c),ep=null,N0=0,c=cn;for(;c!==null;)aR(c.alternate,c),c=c.return;cn=null}}function up(c,d){var g=c.timeoutHandle;g!==-1&&(c.timeoutHandle=-1,xG(g)),g=c.cancelPendingCommit,g!==null&&(c.cancelPendingCommit=null,g()),Ic=0,Fj(),ir=c,cn=g=wc(c.current,null),pn=d,Yn=0,ja=null,zu=!1,op=_e(c,d),Dj=!1,lp=Ca=Nj=kd=Hu=Jr=0,ra=X0=null,Ij=!1,(d&8)!==0&&(d|=d&32);var b=c.entangledLanes;if(b!==0)for(c=c.entanglements,b&=d;0<b;){var T=31-tn(b),k=1<<T;d|=c[T],b&=~k}return Nc=d,hy(),g}function ER(c,d){Zt=null,I.H=q0,d===Jf||d===yy?(d=W4(),Yn=3):d===$S?(d=W4(),Yn=4):Yn=d===vj?8:d!==null&&typeof d=="object"&&typeof d.then=="function"?6:1,ja=d,cn===null&&(Jr=1,Dy(c,Za(d,c.current)))}function MR(){var c=wa.current;return c===null?!0:(pn&4194048)===pn?no===null:(pn&62914560)===pn||(pn&536870912)!==0?c===no:!1}function RR(){var c=I.H;return I.H=q0,c===null?q0:c}function DR(){var c=I.A;return I.A=ZY,c}function Uy(){Jr=4,zu||(pn&4194048)!==pn&&wa.current!==null||(op=!0),(Hu&134217727)===0&&(kd&134217727)===0||ir===null||Qu(ir,pn,Ca,!1)}function zj(c,d,g){var b=In;In|=2;var T=RR(),k=DR();(ir!==c||pn!==d)&&($y=null,up(c,d)),d=!1;var P=Jr;e:do try{if(Yn!==0&&cn!==null){var Z=cn,ie=ja;switch(Yn){case 8:Fj(),P=6;break e;case 3:case 2:case 9:case 6:wa.current===null&&(d=!0);var we=Yn;if(Yn=0,ja=null,hp(c,Z,ie,we),g&&op){P=0;break e}break;default:we=Yn,Yn=0,ja=null,hp(c,Z,ie,we)}}tG(),P=Jr;break}catch(ke){ER(c,ke)}while(!0);return d&&c.shellSuspendCounter++,jc=yd=null,In=b,I.H=T,I.A=k,cn===null&&(ir=null,pn=0,hy()),P}function tG(){for(;cn!==null;)NR(cn)}function nG(c,d){var g=In;In|=2;var b=RR(),T=DR();ir!==c||pn!==d?($y=null,qy=Xe()+500,up(c,d)):op=_e(c,d);e:do try{if(Yn!==0&&cn!==null){d=cn;var k=ja;t:switch(Yn){case 1:Yn=0,ja=null,hp(c,d,k,1);break;case 2:case 9:if(Q4(k)){Yn=0,ja=null,IR(d);break}d=function(){Yn!==2&&Yn!==9||ir!==c||(Yn=7),Tl(c)},k.then(d,d);break e;case 3:Yn=7;break e;case 4:Yn=5;break e;case 7:Q4(k)?(Yn=0,ja=null,IR(d)):(Yn=0,ja=null,hp(c,d,k,7));break;case 5:var P=null;switch(cn.tag){case 26:P=cn.memoizedState;case 5:case 27:var Z=cn;if(P?xD(P):Z.stateNode.complete){Yn=0,ja=null;var ie=Z.sibling;if(ie!==null)cn=ie;else{var we=Z.return;we!==null?(cn=we,Wy(we)):cn=null}break t}}Yn=0,ja=null,hp(c,d,k,5);break;case 6:Yn=0,ja=null,hp(c,d,k,6);break;case 8:Fj(),Jr=6;break e;default:throw Error(r(462))}}rG();break}catch(ke){ER(c,ke)}while(!0);return jc=yd=null,I.H=b,I.A=T,In=g,cn!==null?0:(ir=null,pn=0,hy(),Jr)}function rG(){for(;cn!==null&&!Je();)NR(cn)}function NR(c){var d=iR(c.alternate,c,Nc);c.memoizedProps=c.pendingProps,d===null?Wy(c):cn=d}function IR(c){var d=c,g=d.alternate;switch(d.tag){case 15:case 0:d=ZM(g,d,d.pendingProps,d.type,void 0,pn);break;case 11:d=ZM(g,d,d.pendingProps,d.type.render,d.ref,pn);break;case 5:tj(d);default:aR(g,d),d=cn=D4(d,Nc),d=iR(g,d,Nc)}c.memoizedProps=c.pendingProps,d===null?Wy(c):cn=d}function hp(c,d,g,b){jc=yd=null,tj(d),ep=null,N0=0;var T=d.return;try{if(UY(c,T,d,g,pn)){Jr=1,Dy(c,Za(g,c.current)),cn=null;return}}catch(k){if(T!==null)throw cn=T,k;Jr=1,Dy(c,Za(g,c.current)),cn=null;return}d.flags&32768?(bn||b===1?c=!0:op||(pn&536870912)!==0?c=!1:(zu=c=!0,(b===2||b===9||b===3||b===6)&&(b=wa.current,b!==null&&b.tag===13&&(b.flags|=16384))),BR(d,c)):Wy(d)}function Wy(c){var d=c;do{if((d.flags&32768)!==0){BR(d,zu);return}c=d.return;var g=YY(d.alternate,d,Nc);if(g!==null){cn=g;return}if(d=d.sibling,d!==null){cn=d;return}cn=d=c}while(d!==null);Jr===0&&(Jr=5)}function BR(c,d){do{var g=GY(c.alternate,c);if(g!==null){g.flags&=32767,cn=g;return}if(g=c.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!d&&(c=c.sibling,c!==null)){cn=c;return}cn=c=g}while(c!==null);Jr=6,cn=null}function LR(c,d,g,b,T,k,P,Z,ie){c.cancelPendingCommit=null;do Vy();while(ji!==0);if((In&6)!==0)throw Error(r(327));if(d!==null){if(d===c.current)throw Error(r(177));if(k=d.lanes|d.childLanes,k|=kS,et(c,g,k,P,Z,ie),c===ir&&(cn=ir=null,pn=0),cp=d,$u=c,Ic=g,Bj=k,Lj=T,_R=b,(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?(c.callbackNode=null,c.callbackPriority=0,oG(Rn,function(){return qR(),null})):(c.callbackNode=null,c.callbackPriority=0),b=(d.flags&13878)!==0,(d.subtreeFlags&13878)!==0||b){b=I.T,I.T=null,T=F.p,F.p=2,P=In,In|=4;try{XY(c,d,g)}finally{In=P,F.p=T,I.T=b}}ji=1,PR(),FR(),zR()}}function PR(){if(ji===1){ji=0;var c=$u,d=cp,g=(d.flags&13878)!==0;if((d.subtreeFlags&13878)!==0||g){g=I.T,I.T=null;var b=F.p;F.p=2;var T=In;In|=4;try{bR(d,c);var k=Zj,P=Ar(c.containerInfo),Z=k.focusedElem,ie=k.selectionRange;if(P!==Z&&Z&&Z.ownerDocument&&er(Z.ownerDocument.documentElement,Z)){if(ie!==null&&Kr(Z)){var we=ie.start,ke=ie.end;if(ke===void 0&&(ke=we),"selectionStart"in Z)Z.selectionStart=we,Z.selectionEnd=Math.min(ke,Z.value.length);else{var ze=Z.ownerDocument||document,Se=ze&&ze.defaultView||window;if(Se.getSelection){var Ce=Se.getSelection(),wt=Z.textContent.length,Pt=Math.min(ie.start,wt),rr=ie.end===void 0?Pt:Math.min(ie.end,wt);!Ce.extend&&Pt>rr&&(P=rr,rr=Pt,Pt=P);var he=Ot(Z,Pt),ue=Ot(Z,rr);if(he&&ue&&(Ce.rangeCount!==1||Ce.anchorNode!==he.node||Ce.anchorOffset!==he.offset||Ce.focusNode!==ue.node||Ce.focusOffset!==ue.offset)){var xe=ze.createRange();xe.setStart(he.node,he.offset),Ce.removeAllRanges(),Pt>rr?(Ce.addRange(xe),Ce.extend(ue.node,ue.offset)):(xe.setEnd(ue.node,ue.offset),Ce.addRange(xe))}}}}for(ze=[],Ce=Z;Ce=Ce.parentNode;)Ce.nodeType===1&&ze.push({element:Ce,left:Ce.scrollLeft,top:Ce.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<ze.length;Z++){var Le=ze[Z];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}s1=!!Kj,Zj=Kj=null}finally{In=T,F.p=b,I.T=g}}c.current=d,ji=2}}function FR(){if(ji===2){ji=0;var c=$u,d=cp,g=(d.flags&8772)!==0;if((d.subtreeFlags&8772)!==0||g){g=I.T,I.T=null;var b=F.p;F.p=2;var T=In;In|=4;try{fR(c,d.alternate,d)}finally{In=T,F.p=b,I.T=g}}ji=3}}function zR(){if(ji===4||ji===3){ji=0,it();var c=$u,d=cp,g=Ic,b=_R;(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?ji=5:(ji=0,cp=$u=null,HR(c,c.pendingLanes));var T=c.pendingLanes;if(T===0&&(qu=null),nn(g),d=d.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(fn,d,void 0,(d.current.flags&128)===128)}catch{}if(b!==null){d=I.T,T=F.p,F.p=2,I.T=null;try{for(var k=c.onRecoverableError,P=0;P<b.length;P++){var Z=b[P];k(Z.value,{componentStack:Z.stack})}}finally{I.T=d,F.p=T}}(Ic&3)!==0&&Vy(),Tl(c),T=c.pendingLanes,(g&261930)!==0&&(T&42)!==0?c===Pj?K0++:(K0=0,Pj=c):K0=0,Z0(0)}}function HR(c,d){(c.pooledCacheLanes&=d)===0&&(d=c.pooledCache,d!=null&&(c.pooledCache=null,R0(d)))}function Vy(){return PR(),FR(),zR(),qR()}function qR(){if(ji!==5)return!1;var c=$u,d=Bj;Bj=0;var g=nn(Ic),b=I.T,T=F.p;try{F.p=32>g?32:g,I.T=null,g=Lj,Lj=null;var k=$u,P=Ic;if(ji=0,cp=$u=null,Ic=0,(In&6)!==0)throw Error(r(331));var Z=In;if(In|=4,SR(k.current),xR(k,k.current,P,g),In=Z,Z0(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(fn,k)}catch{}return!0}finally{F.p=T,I.T=b,HR(c,d)}}function $R(c,d,g){d=Za(g,d),d=gj(c.stateNode,d,2),c=Bu(c,d,2),c!==null&&(qt(c,2),Tl(c))}function Gn(c,d,g){if(c.tag===3)$R(c,c,g);else for(;d!==null;){if(d.tag===3){$R(d,c,g);break}else if(d.tag===1){var b=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(qu===null||!qu.has(b))){c=Za(g,c),g=QM(2),b=Bu(d,g,2),b!==null&&(UM(g,b,d,c),qt(b,2),Tl(b));break}}d=d.return}}function Hj(c,d,g){var b=c.pingCache;if(b===null){b=c.pingCache=new JY;var T=new Set;b.set(d,T)}else T=b.get(d),T===void 0&&(T=new Set,b.set(d,T));T.has(g)||(Dj=!0,T.add(g),c=iG.bind(null,c,d,g),d.then(c,c))}function iG(c,d,g){var b=c.pingCache;b!==null&&b.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,ir===c&&(pn&g)===g&&(Jr===4||Jr===3&&(pn&62914560)===pn&&300>Xe()-Hy?(In&2)===0&&up(c,0):Nj|=g,lp===pn&&(lp=0)),Tl(c)}function QR(c,d){d===0&&(d=He()),c=gd(c,d),c!==null&&(qt(c,d),Tl(c))}function sG(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),QR(c,g)}function aG(c,d){var g=0;switch(c.tag){case 31:case 13:var b=c.stateNode,T=c.memoizedState;T!==null&&(g=T.retryLane);break;case 19:b=c.stateNode;break;case 22:b=c.stateNode._retryCache;break;default:throw Error(r(314))}b!==null&&b.delete(d),QR(c,g)}function oG(c,d){return Ke(c,d)}var Yy=null,dp=null,qj=!1,Gy=!1,$j=!1,Uu=0;function Tl(c){c!==dp&&c.next===null&&(dp===null?Yy=dp=c:dp=dp.next=c),Gy=!0,qj||(qj=!0,cG())}function Z0(c,d){if(!$j&&Gy){$j=!0;do for(var g=!1,b=Yy;b!==null;){if(c!==0){var T=b.pendingLanes;if(T===0)var k=0;else{var P=b.suspendedLanes,Z=b.pingedLanes;k=(1<<31-tn(42|c)+1)-1,k&=T&~(P&~Z),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(g=!0,YR(b,k))}else k=pn,k=ne(b,b===ir?k:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(k&3)===0||_e(b,k)||(g=!0,YR(b,k));b=b.next}while(g);$j=!1}}function lG(){UR()}function UR(){Gy=qj=!1;var c=0;Uu!==0&&yG()&&(c=Uu);for(var d=Xe(),g=null,b=Yy;b!==null;){var T=b.next,k=WR(b,d);k===0?(b.next=null,g===null?Yy=T:g.next=T,T===null&&(dp=g)):(g=b,(c!==0||(k&3)!==0)&&(Gy=!0)),b=T}ji!==0&&ji!==5||Z0(c),Uu!==0&&(Uu=0)}function WR(c,d){for(var g=c.suspendedLanes,b=c.pingedLanes,T=c.expirationTimes,k=c.pendingLanes&-62914561;0<k;){var P=31-tn(k),Z=1<<P,ie=T[P];ie===-1?((Z&g)===0||(Z&b)!==0)&&(T[P]=ye(Z,d)):ie<=d&&(c.expiredLanes|=Z),k&=~Z}if(d=ir,g=pn,g=ne(c,c===d?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),b=c.callbackNode,g===0||c===d&&(Yn===2||Yn===9)||c.cancelPendingCommit!==null)return b!==null&&b!==null&&Dt(b),c.callbackNode=null,c.callbackPriority=0;if((g&3)===0||_e(c,g)){if(d=g&-g,d===c.callbackPriority)return d;switch(b!==null&&Dt(b),nn(g)){case 2:case 8:g=lt;break;case 32:g=Rn;break;case 268435456:g=rn;break;default:g=Rn}return b=VR.bind(null,c),g=Ke(g,b),c.callbackPriority=d,c.callbackNode=g,d}return b!==null&&b!==null&&Dt(b),c.callbackPriority=2,c.callbackNode=null,2}function VR(c,d){if(ji!==0&&ji!==5)return c.callbackNode=null,c.callbackPriority=0,null;var g=c.callbackNode;if(Vy()&&c.callbackNode!==g)return null;var b=pn;return b=ne(c,c===ir?b:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),b===0?null:(kR(c,b,d),WR(c,Xe()),c.callbackNode!=null&&c.callbackNode===g?VR.bind(null,c):null)}function YR(c,d){if(Vy())return null;kR(c,d,!0)}function cG(){AG(function(){(In&6)!==0?Ke($e,lG):UR()})}function Qj(){if(Uu===0){var c=Kf;c===0&&(c=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),Uu=c}return Uu}function GR(c){return c==null||typeof c=="symbol"||typeof c=="boolean"?null:typeof c=="function"?c:Ya(""+c)}function XR(c,d){var g=d.ownerDocument.createElement("input");return g.name=d.name,g.value=d.value,c.id&&g.setAttribute("form",c.id),d.parentNode.insertBefore(g,d),c=new FormData(c),g.parentNode.removeChild(g),c}function uG(c,d,g,b,T){if(d==="submit"&&g&&g.stateNode===T){var k=GR((T[Bi]||null).action),P=b.submitter;P&&(d=(d=P[Bi]||null)?GR(d.formAction):P.getAttribute("formAction"),d!==null&&(k=d,P=null));var Z=new Hr("action","action",null,b,T);c.push({event:Z,listeners:[{instance:null,listener:function(){if(b.defaultPrevented){if(Uu!==0){var ie=P?XR(T,P):new FormData(T);uj(g,{pending:!0,data:ie,method:T.method,action:k},null,ie)}}else typeof k=="function"&&(Z.preventDefault(),ie=P?XR(T,P):new FormData(T),uj(g,{pending:!0,data:ie,method:T.method,action:k},k,ie))},currentTarget:T}]})}}for(var Uj=0;Uj<TS.length;Uj++){var Wj=TS[Uj],hG=Wj.toLowerCase(),dG=Wj[0].toUpperCase()+Wj.slice(1);Ro(hG,"on"+dG)}Ro(Fi,"onAnimationEnd"),Ro(Cs,"onAnimationIteration"),Ro(Sl,"onAnimationStart"),Ro("dblclick","onDoubleClick"),Ro("focusin","onFocus"),Ro("focusout","onBlur"),Ro(ns,"onTransitionRun"),Ro(cy,"onTransitionStart"),Ro(EY,"onTransitionCancel"),Ro(E4,"onTransitionEnd"),Ze("onMouseEnter",["mouseout","mouseover"]),Ze("onMouseLeave",["mouseout","mouseover"]),Ze("onPointerEnter",["pointerout","pointerover"]),Ze("onPointerLeave",["pointerout","pointerover"]),bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bs("onBeforeInput",["compositionend","keypress","textInput","paste"]),bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var J0="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(" "),fG=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(J0));function KR(c,d){d=(d&4)!==0;for(var g=0;g<c.length;g++){var b=c[g],T=b.event;b=b.listeners;e:{var k=void 0;if(d)for(var P=b.length-1;0<=P;P--){var Z=b[P],ie=Z.instance,we=Z.currentTarget;if(Z=Z.listener,ie!==k&&T.isPropagationStopped())break e;k=Z,T.currentTarget=we;try{k(T)}catch(ke){uy(ke)}T.currentTarget=null,k=ie}else for(P=0;P<b.length;P++){if(Z=b[P],ie=Z.instance,we=Z.currentTarget,Z=Z.listener,ie!==k&&T.isPropagationStopped())break e;k=Z,T.currentTarget=we;try{k(T)}catch(ke){uy(ke)}T.currentTarget=null,k=ie}}}}function un(c,d){var g=d[ld];g===void 0&&(g=d[ld]=new Set);var b=c+"__bubble";g.has(b)||(ZR(d,c,2,!1),g.add(b))}function Vj(c,d,g){var b=0;d&&(b|=4),ZR(g,c,b,d)}var Xy="_reactListening"+Math.random().toString(36).slice(2);function Yj(c){if(!c[Xy]){c[Xy]=!0,bu.forEach(function(g){g!=="selectionchange"&&(fG.has(g)||Vj(g,!1,c),Vj(g,!0,c))});var d=c.nodeType===9?c:c.ownerDocument;d===null||d[Xy]||(d[Xy]=!0,Vj("selectionchange",!1,d))}}function ZR(c,d,g,b){switch(TD(d)){case 2:var T=HG;break;case 8:T=qG;break;default:T=cC}g=T.bind(null,d,g,c),T=void 0,!$f||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(T=!0),b?T!==void 0?c.addEventListener(d,g,{capture:!0,passive:T}):c.addEventListener(d,g,!0):T!==void 0?c.addEventListener(d,g,{passive:T}):c.addEventListener(d,g,!1)}function Gj(c,d,g,b,T){var k=b;if((d&1)===0&&(d&2)===0&&b!==null)e:for(;;){if(b===null)return;var P=b.tag;if(P===3||P===4){var Z=b.stateNode.containerInfo;if(Z===T)break;if(P===4)for(P=b.return;P!==null;){var ie=P.tag;if((ie===3||ie===4)&&P.stateNode.containerInfo===T)return;P=P.return}for(;Z!==null;){if(P=wn(Z),P===null)return;if(ie=P.tag,ie===5||ie===6||ie===26||ie===27){b=k=P;continue e}Z=Z.parentNode}}b=b.return}Su(function(){var we=k,ke=Ft(g),ze=[];e:{var Se=M4.get(c);if(Se!==void 0){var Ce=Hr,wt=c;switch(c){case"keypress":if(Pn(g)===0)break e;case"keydown":case"keyup":Ce=CS;break;case"focusin":wt="focus",Ce=xa;break;case"focusout":wt="blur",Ce=xa;break;case"beforeblur":case"afterblur":Ce=xa;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ce=Zb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=wS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=ny;break;case Fi:case Cs:case Sl:Ce=vc;break;case E4:Ce=C0;break;case"scroll":case"scrollend":Ce=Cu;break;case"wheel":Ce=ry;break;case"copy":case"cut":case"paste":Ce=jS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=Mo;break;case"toggle":case"beforetoggle":Ce=sy}var Pt=(d&4)!==0,rr=!Pt&&(c==="scroll"||c==="scrollend"),he=Pt?Se!==null?Se+"Capture":null:Se;Pt=[];for(var ue=we,xe;ue!==null;){var Le=ue;if(xe=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||xe===null||he===null||(Le=Ga(ue,he),Le!=null&&Pt.push(eg(ue,Le,xe))),rr)break;ue=ue.return}0<Pt.length&&(Se=new Ce(Se,wt,null,g,ke),ze.push({event:Se,listeners:Pt}))}}if((d&7)===0){e:{if(Se=c==="mouseover"||c==="pointerover",Ce=c==="mouseout"||c==="pointerout",Se&&g!==St&&(wt=g.relatedTarget||g.fromElement)&&(wn(wt)||wt[vs]))break e;if((Ce||Se)&&(Se=ke.window===ke?ke:(Se=ke.ownerDocument)?Se.defaultView||Se.parentWindow:window,Ce?(wt=g.relatedTarget||g.toElement,Ce=we,wt=wt?wn(wt):null,wt!==null&&(rr=s(wt),Pt=wt.tag,wt!==rr||Pt!==5&&Pt!==27&&Pt!==6)&&(wt=null)):(Ce=null,wt=we),Ce!==wt)){if(Pt=Zb,Le="onMouseLeave",he="onMouseEnter",ue="mouse",(c==="pointerout"||c==="pointerover")&&(Pt=Mo,Le="onPointerLeave",he="onPointerEnter",ue="pointer"),rr=Ce==null?Se:di(Ce),xe=wt==null?Se:di(wt),Se=new Pt(Le,ue+"leave",Ce,g,ke),Se.target=rr,Se.relatedTarget=xe,Le=null,wn(ke)===we&&(Pt=new Pt(he,ue+"enter",wt,g,ke),Pt.target=xe,Pt.relatedTarget=rr,Le=Pt),rr=Le,Ce&&wt)t:{for(Pt=pG,he=Ce,ue=wt,xe=0,Le=he;Le;Le=Pt(Le))xe++;Le=0;for(var Rt=ue;Rt;Rt=Pt(Rt))Le++;for(;0<xe-Le;)he=Pt(he),xe--;for(;0<Le-xe;)ue=Pt(ue),Le--;for(;xe--;){if(he===ue||ue!==null&&he===ue.alternate){Pt=he;break t}he=Pt(he),ue=Pt(ue)}Pt=null}else Pt=null;Ce!==null&&JR(ze,Se,Ce,Pt,!1),wt!==null&&rr!==null&&JR(ze,rr,wt,Pt,!0)}}e:{if(Se=we?di(we):window,Ce=Se.nodeName&&Se.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&Se.type==="file")var On=J;else if(Ou(Se))if(te)On=$t;else{On=gt;var Tt=pt}else Ce=Se.nodeName,!Ce||Ce.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?we&&yl(we.elementType)&&(On=J):On=xt;if(On&&(On=On(c,we))){ly(ze,On,g,ke);break e}Tt&&Tt(c,Se,we),c==="focusout"&&we&&Se.type==="number"&&we.memoizedProps.value!=null&&pc(Se,"number",Se.value)}switch(Tt=we?di(we):window,c){case"focusin":(Ou(Tt)||Tt.contentEditable==="true")&&(Vn=Tt,ts=we,ai=null);break;case"focusout":ai=ts=Vn=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,Zs(ze,g,ke);break;case"selectionchange":if(Fn)break;case"keydown":case"keyup":Zs(ze,g,ke)}var Jt;if(Qf)e:{switch(c){case"compositionstart":var mn="onCompositionStart";break e;case"compositionend":mn="onCompositionEnd";break e;case"compositionupdate":mn="onCompositionUpdate";break e}mn=void 0}else xc?pd(c,g)&&(mn="onCompositionEnd"):c==="keydown"&&g.keyCode===229&&(mn="onCompositionStart");mn&&(T0&&g.locale!=="ko"&&(xc||mn!=="onCompositionStart"?mn==="onCompositionEnd"&&xc&&(Jt=x0()):(Is=ke,Al="value"in Is?Is.value:Is.textContent,xc=!0)),Tt=Ky(we,mn),0<Tt.length&&(mn=new Jb(mn,c,null,g,ke),ze.push({event:mn,listeners:Tt}),Jt?mn.data=Jt:(Jt=si(g),Jt!==null&&(mn.data=Jt)))),(Jt=_S?Xr(c,g):oy(c,g))&&(mn=Ky(we,"onBeforeInput"),0<mn.length&&(Tt=new Jb("onBeforeInput","beforeinput",null,g,ke),ze.push({event:Tt,listeners:mn}),Tt.data=Jt)),uG(ze,c,we,g,ke)}KR(ze,d)})}function eg(c,d,g){return{instance:c,listener:d,currentTarget:g}}function Ky(c,d){for(var g=d+"Capture",b=[];c!==null;){var T=c,k=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||k===null||(T=Ga(c,g),T!=null&&b.unshift(eg(c,T,k)),T=Ga(c,d),T!=null&&b.push(eg(c,T,k))),c.tag===3)return b;c=c.return}return[]}function pG(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5&&c.tag!==27);return c||null}function JR(c,d,g,b,T){for(var k=d._reactName,P=[];g!==null&&g!==b;){var Z=g,ie=Z.alternate,we=Z.stateNode;if(Z=Z.tag,ie!==null&&ie===b)break;Z!==5&&Z!==26&&Z!==27||we===null||(ie=we,T?(we=Ga(g,k),we!=null&&P.unshift(eg(g,we,ie))):T||(we=Ga(g,k),we!=null&&P.push(eg(g,we,ie)))),g=g.return}P.length!==0&&c.push({event:d,listeners:P})}var mG=/\r\n?/g,gG=/\u0000|\uFFFD/g;function eD(c){return(typeof c=="string"?c:""+c).replace(mG,`
`).replace(gG,"")}function tD(c,d){return d=eD(d),eD(c)===d}function nr(c,d,g,b,T,k){switch(g){case"children":typeof b=="string"?d==="body"||d==="textarea"&&b===""||Bt(c,b):(typeof b=="number"||typeof b=="bigint")&&d!=="body"&&Bt(c,""+b);break;case"className":Ji(c,"class",b);break;case"tabIndex":Ji(c,"tabindex",b);break;case"dir":case"role":case"viewBox":case"width":case"height":Ji(c,g,b);break;case"style":Dn(c,b,k);break;case"data":if(d!=="object"){Ji(c,"data",b);break}case"src":case"href":if(b===""&&(d!=="a"||g!=="href")){c.removeAttribute(g);break}if(b==null||typeof b=="function"||typeof b=="symbol"||typeof b=="boolean"){c.removeAttribute(g);break}b=Ya(""+b),c.setAttribute(g,b);break;case"action":case"formAction":if(typeof b=="function"){c.setAttribute(g,"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 k=="function"&&(g==="formAction"?(d!=="input"&&nr(c,d,"name",T.name,T,null),nr(c,d,"formEncType",T.formEncType,T,null),nr(c,d,"formMethod",T.formMethod,T,null),nr(c,d,"formTarget",T.formTarget,T,null)):(nr(c,d,"encType",T.encType,T,null),nr(c,d,"method",T.method,T,null),nr(c,d,"target",T.target,T,null)));if(b==null||typeof b=="symbol"||typeof b=="boolean"){c.removeAttribute(g);break}b=Ya(""+b),c.setAttribute(g,b);break;case"onClick":b!=null&&(c.onclick=st);break;case"onScroll":b!=null&&un("scroll",c);break;case"onScrollEnd":b!=null&&un("scrollend",c);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(r(61));if(g=b.__html,g!=null){if(T.children!=null)throw Error(r(60));c.innerHTML=g}}break;case"multiple":c.multiple=b&&typeof b!="function"&&typeof b!="symbol";break;case"muted":c.muted=b&&typeof b!="function"&&typeof b!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(b==null||typeof b=="function"||typeof b=="boolean"||typeof b=="symbol"){c.removeAttribute("xlink:href");break}g=Ya(""+b),c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",g);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":b!=null&&typeof b!="function"&&typeof b!="symbol"?c.setAttribute(g,""+b):c.removeAttribute(g);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":b&&typeof b!="function"&&typeof b!="symbol"?c.setAttribute(g,""):c.removeAttribute(g);break;case"capture":case"download":b===!0?c.setAttribute(g,""):b!==!1&&b!=null&&typeof b!="function"&&typeof b!="symbol"?c.setAttribute(g,b):c.removeAttribute(g);break;case"cols":case"rows":case"size":case"span":b!=null&&typeof b!="function"&&typeof b!="symbol"&&!isNaN(b)&&1<=b?c.setAttribute(g,b):c.removeAttribute(g);break;case"rowSpan":case"start":b==null||typeof b=="function"||typeof b=="symbol"||isNaN(b)?c.removeAttribute(g):c.setAttribute(g,b);break;case"popover":un("beforetoggle",c),un("toggle",c),fi(c,"popover",b);break;case"xlinkActuate":Qn(c,"http://www.w3.org/1999/xlink","xlink:actuate",b);break;case"xlinkArcrole":Qn(c,"http://www.w3.org/1999/xlink","xlink:arcrole",b);break;case"xlinkRole":Qn(c,"http://www.w3.org/1999/xlink","xlink:role",b);break;case"xlinkShow":Qn(c,"http://www.w3.org/1999/xlink","xlink:show",b);break;case"xlinkTitle":Qn(c,"http://www.w3.org/1999/xlink","xlink:title",b);break;case"xlinkType":Qn(c,"http://www.w3.org/1999/xlink","xlink:type",b);break;case"xmlBase":Qn(c,"http://www.w3.org/XML/1998/namespace","xml:base",b);break;case"xmlLang":Qn(c,"http://www.w3.org/XML/1998/namespace","xml:lang",b);break;case"xmlSpace":Qn(c,"http://www.w3.org/XML/1998/namespace","xml:space",b);break;case"is":fi(c,"is",b);break;case"innerText":case"textContent":break;default:(!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(g=xs.get(g)||g,fi(c,g,b))}}function Xj(c,d,g,b,T,k){switch(g){case"style":Dn(c,b,k);break;case"dangerouslySetInnerHTML":if(b!=null){if(typeof b!="object"||!("__html"in b))throw Error(r(61));if(g=b.__html,g!=null){if(T.children!=null)throw Error(r(60));c.innerHTML=g}}break;case"children":typeof b=="string"?Bt(c,b):(typeof b=="number"||typeof b=="bigint")&&Bt(c,""+b);break;case"onScroll":b!=null&&un("scroll",c);break;case"onScrollEnd":b!=null&&un("scrollend",c);break;case"onClick":b!=null&&(c.onclick=st);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Va.hasOwnProperty(g))e:{if(g[0]==="o"&&g[1]==="n"&&(T=g.endsWith("Capture"),d=g.slice(2,T?g.length-7:void 0),k=c[Bi]||null,k=k!=null?k[g]:null,typeof k=="function"&&c.removeEventListener(d,k,T),typeof b=="function")){typeof k!="function"&&k!==null&&(g in c?c[g]=null:c.hasAttribute(g)&&c.removeAttribute(g)),c.addEventListener(d,b,T);break e}g in c?c[g]=b:b===!0?c.setAttribute(g,""):fi(c,g,b)}}}function as(c,d,g){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":un("error",c),un("load",c);var b=!1,T=!1,k;for(k in g)if(g.hasOwnProperty(k)){var P=g[k];if(P!=null)switch(k){case"src":b=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:nr(c,d,k,P,g,null)}}T&&nr(c,d,"srcSet",g.srcSet,g,null),b&&nr(c,d,"src",g.src,g,null);return;case"input":un("invalid",c);var Z=k=P=T=null,ie=null,we=null;for(b in g)if(g.hasOwnProperty(b)){var ke=g[b];if(ke!=null)switch(b){case"name":T=ke;break;case"type":P=ke;break;case"checked":ie=ke;break;case"defaultChecked":we=ke;break;case"value":k=ke;break;case"defaultValue":Z=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,d));break;default:nr(c,d,b,ke,g,null)}}fc(c,k,Z,ie,we,P,T,!1);return;case"select":un("invalid",c),b=P=k=null;for(T in g)if(g.hasOwnProperty(T)&&(Z=g[T],Z!=null))switch(T){case"value":k=Z;break;case"defaultValue":P=Z;break;case"multiple":b=Z;default:nr(c,d,T,Z,g,null)}d=k,g=P,c.multiple=!!b,d!=null?ii(c,!!b,d,!1):g!=null&&ii(c,!!b,g,!0);return;case"textarea":un("invalid",c),k=T=b=null;for(P in g)if(g.hasOwnProperty(P)&&(Z=g[P],Z!=null))switch(P){case"value":b=Z;break;case"defaultValue":T=Z;break;case"children":k=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:nr(c,d,P,Z,g,null)}Oo(c,b,T,k);return;case"option":for(ie in g)if(g.hasOwnProperty(ie)&&(b=g[ie],b!=null))switch(ie){case"selected":c.selected=b&&typeof b!="function"&&typeof b!="symbol";break;default:nr(c,d,ie,b,g,null)}return;case"dialog":un("beforetoggle",c),un("toggle",c),un("cancel",c),un("close",c);break;case"iframe":case"object":un("load",c);break;case"video":case"audio":for(b=0;b<J0.length;b++)un(J0[b],c);break;case"image":un("error",c),un("load",c);break;case"details":un("toggle",c);break;case"embed":case"source":case"link":un("error",c),un("load",c);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(we in g)if(g.hasOwnProperty(we)&&(b=g[we],b!=null))switch(we){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,d));default:nr(c,d,we,b,g,null)}return;default:if(yl(d)){for(ke in g)g.hasOwnProperty(ke)&&(b=g[ke],b!==void 0&&Xj(c,d,ke,b,g,void 0));return}}for(Z in g)g.hasOwnProperty(Z)&&(b=g[Z],b!=null&&nr(c,d,Z,b,g,null))}function vG(c,d,g,b){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,k=null,P=null,Z=null,ie=null,we=null,ke=null;for(Ce in g){var ze=g[Ce];if(g.hasOwnProperty(Ce)&&ze!=null)switch(Ce){case"checked":break;case"value":break;case"defaultValue":ie=ze;default:b.hasOwnProperty(Ce)||nr(c,d,Ce,null,b,ze)}}for(var Se in b){var Ce=b[Se];if(ze=g[Se],b.hasOwnProperty(Se)&&(Ce!=null||ze!=null))switch(Se){case"type":k=Ce;break;case"name":T=Ce;break;case"checked":we=Ce;break;case"defaultChecked":ke=Ce;break;case"value":P=Ce;break;case"defaultValue":Z=Ce;break;case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(r(137,d));break;default:Ce!==ze&&nr(c,d,Se,Ce,b,ze)}}Au(c,P,Z,ie,we,ke,k,T);return;case"select":Ce=P=Z=Se=null;for(k in g)if(ie=g[k],g.hasOwnProperty(k)&&ie!=null)switch(k){case"value":break;case"multiple":Ce=ie;default:b.hasOwnProperty(k)||nr(c,d,k,null,b,ie)}for(T in b)if(k=b[T],ie=g[T],b.hasOwnProperty(T)&&(k!=null||ie!=null))switch(T){case"value":Se=k;break;case"defaultValue":Z=k;break;case"multiple":P=k;default:k!==ie&&nr(c,d,T,k,b,ie)}d=Z,g=P,b=Ce,Se!=null?ii(c,!!g,Se,!1):!!b!=!!g&&(d!=null?ii(c,!!g,d,!0):ii(c,!!g,g?[]:"",!1));return;case"textarea":Ce=Se=null;for(Z in g)if(T=g[Z],g.hasOwnProperty(Z)&&T!=null&&!b.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:nr(c,d,Z,null,b,T)}for(P in b)if(T=b[P],k=g[P],b.hasOwnProperty(P)&&(T!=null||k!=null))switch(P){case"value":Se=T;break;case"defaultValue":Ce=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:T!==k&&nr(c,d,P,T,b,k)}mc(c,Se,Ce);return;case"option":for(var wt in g)if(Se=g[wt],g.hasOwnProperty(wt)&&Se!=null&&!b.hasOwnProperty(wt))switch(wt){case"selected":c.selected=!1;break;default:nr(c,d,wt,null,b,Se)}for(ie in b)if(Se=b[ie],Ce=g[ie],b.hasOwnProperty(ie)&&Se!==Ce&&(Se!=null||Ce!=null))switch(ie){case"selected":c.selected=Se&&typeof Se!="function"&&typeof Se!="symbol";break;default:nr(c,d,ie,Se,b,Ce)}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 Pt in g)Se=g[Pt],g.hasOwnProperty(Pt)&&Se!=null&&!b.hasOwnProperty(Pt)&&nr(c,d,Pt,null,b,Se);for(we in b)if(Se=b[we],Ce=g[we],b.hasOwnProperty(we)&&Se!==Ce&&(Se!=null||Ce!=null))switch(we){case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(r(137,d));break;default:nr(c,d,we,Se,b,Ce)}return;default:if(yl(d)){for(var rr in g)Se=g[rr],g.hasOwnProperty(rr)&&Se!==void 0&&!b.hasOwnProperty(rr)&&Xj(c,d,rr,void 0,b,Se);for(ke in b)Se=b[ke],Ce=g[ke],!b.hasOwnProperty(ke)||Se===Ce||Se===void 0&&Ce===void 0||Xj(c,d,ke,Se,b,Ce);return}}for(var he in g)Se=g[he],g.hasOwnProperty(he)&&Se!=null&&!b.hasOwnProperty(he)&&nr(c,d,he,null,b,Se);for(ze in b)Se=b[ze],Ce=g[ze],!b.hasOwnProperty(ze)||Se===Ce||Se==null&&Ce==null||nr(c,d,ze,Se,b,Ce)}function nD(c){switch(c){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bG(){if(typeof performance.getEntriesByType=="function"){for(var c=0,d=0,g=performance.getEntriesByType("resource"),b=0;b<g.length;b++){var T=g[b],k=T.transferSize,P=T.initiatorType,Z=T.duration;if(k&&Z&&nD(P)){for(P=0,Z=T.responseEnd,b+=1;b<g.length;b++){var ie=g[b],we=ie.startTime;if(we>Z)break;var ke=ie.transferSize,ze=ie.initiatorType;ke&&nD(ze)&&(ie=ie.responseEnd,P+=ke*(ie<Z?1:(Z-we)/(ie-we)))}if(--b,d+=8*(k+P)/(T.duration/1e3),c++,10<c)break}}if(0<c)return d/c/1e6}return navigator.connection&&(c=navigator.connection.downlink,typeof c=="number")?c:5}var Kj=null,Zj=null;function Zy(c){return c.nodeType===9?c:c.ownerDocument}function rD(c){switch(c){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iD(c,d){if(c===0)switch(d){case"svg":return 1;case"math":return 2;default:return 0}return c===1&&d==="foreignObject"?0:c}function Jj(c,d){return c==="textarea"||c==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.children=="bigint"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var eC=null;function yG(){var c=window.event;return c&&c.type==="popstate"?c===eC?!1:(eC=c,!0):(eC=null,!1)}var sD=typeof setTimeout=="function"?setTimeout:void 0,xG=typeof clearTimeout=="function"?clearTimeout:void 0,aD=typeof Promise=="function"?Promise:void 0,AG=typeof queueMicrotask=="function"?queueMicrotask:typeof aD<"u"?function(c){return aD.resolve(null).then(c).catch(wG)}:sD;function wG(c){setTimeout(function(){throw c})}function Wu(c){return c==="head"}function oD(c,d){var g=d,b=0;do{var T=g.nextSibling;if(c.removeChild(g),T&&T.nodeType===8)if(g=T.data,g==="/$"||g==="/&"){if(b===0){c.removeChild(T),gp(d);return}b--}else if(g==="$"||g==="$?"||g==="$~"||g==="$!"||g==="&")b++;else if(g==="html")tg(c.ownerDocument.documentElement);else if(g==="head"){g=c.ownerDocument.head,tg(g);for(var k=g.firstChild;k;){var P=k.nextSibling,Z=k.nodeName;k[yr]||Z==="SCRIPT"||Z==="STYLE"||Z==="LINK"&&k.rel.toLowerCase()==="stylesheet"||g.removeChild(k),k=P}}else g==="body"&&tg(c.ownerDocument.body);g=T}while(g);gp(d)}function lD(c,d){var g=c;c=0;do{var b=g.nextSibling;if(g.nodeType===1?d?(g._stashedDisplay=g.style.display,g.style.display="none"):(g.style.display=g._stashedDisplay||"",g.getAttribute("style")===""&&g.removeAttribute("style")):g.nodeType===3&&(d?(g._stashedText=g.nodeValue,g.nodeValue=""):g.nodeValue=g._stashedText||""),b&&b.nodeType===8)if(g=b.data,g==="/$"){if(c===0)break;c--}else g!=="$"&&g!=="$?"&&g!=="$~"&&g!=="$!"||c++;g=b}while(g)}function tC(c){var d=c.firstChild;for(d&&d.nodeType===10&&(d=d.nextSibling);d;){var g=d;switch(d=d.nextSibling,g.nodeName){case"HTML":case"HEAD":case"BODY":tC(g),Mr(g);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(g.rel.toLowerCase()==="stylesheet")continue}c.removeChild(g)}}function SG(c,d,g,b){for(;c.nodeType===1;){var T=g;if(c.nodeName.toLowerCase()!==d.toLowerCase()){if(!b&&(c.nodeName!=="INPUT"||c.type!=="hidden"))break}else if(b){if(!c[yr])switch(d){case"meta":if(!c.hasAttribute("itemprop"))break;return c;case"link":if(k=c.getAttribute("rel"),k==="stylesheet"&&c.hasAttribute("data-precedence"))break;if(k!==T.rel||c.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||c.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||c.getAttribute("title")!==(T.title==null?null:T.title))break;return c;case"style":if(c.hasAttribute("data-precedence"))break;return c;case"script":if(k=c.getAttribute("src"),(k!==(T.src==null?null:T.src)||c.getAttribute("type")!==(T.type==null?null:T.type)||c.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&k&&c.hasAttribute("async")&&!c.hasAttribute("itemprop"))break;return c;default:return c}}else if(d==="input"&&c.type==="hidden"){var k=T.name==null?null:""+T.name;if(T.type==="hidden"&&c.getAttribute("name")===k)return c}else return c;if(c=ro(c.nextSibling),c===null)break}return null}function jG(c,d,g){if(d==="")return null;for(;c.nodeType!==3;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!g||(c=ro(c.nextSibling),c===null))return null;return c}function cD(c,d){for(;c.nodeType!==8;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!d||(c=ro(c.nextSibling),c===null))return null;return c}function nC(c){return c.data==="$?"||c.data==="$~"}function rC(c){return c.data==="$!"||c.data==="$?"&&c.ownerDocument.readyState!=="loading"}function CG(c,d){var g=c.ownerDocument;if(c.data==="$~")c._reactRetry=d;else if(c.data!=="$?"||g.readyState!=="loading")d();else{var b=function(){d(),g.removeEventListener("DOMContentLoaded",b)};g.addEventListener("DOMContentLoaded",b),c._reactRetry=b}}function ro(c){for(;c!=null;c=c.nextSibling){var d=c.nodeType;if(d===1||d===3)break;if(d===8){if(d=c.data,d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"||d==="F!"||d==="F")break;if(d==="/$"||d==="/&")return null}}return c}var iC=null;function uD(c){c=c.nextSibling;for(var d=0;c;){if(c.nodeType===8){var g=c.data;if(g==="/$"||g==="/&"){if(d===0)return ro(c.nextSibling);d--}else g!=="$"&&g!=="$!"&&g!=="$?"&&g!=="$~"&&g!=="&"||d++}c=c.nextSibling}return null}function hD(c){c=c.previousSibling;for(var d=0;c;){if(c.nodeType===8){var g=c.data;if(g==="$"||g==="$!"||g==="$?"||g==="$~"||g==="&"){if(d===0)return c;d--}else g!=="/$"&&g!=="/&"||d++}c=c.previousSibling}return null}function dD(c,d,g){switch(d=Zy(g),c){case"html":if(c=d.documentElement,!c)throw Error(r(452));return c;case"head":if(c=d.head,!c)throw Error(r(453));return c;case"body":if(c=d.body,!c)throw Error(r(454));return c;default:throw Error(r(451))}}function tg(c){for(var d=c.attributes;d.length;)c.removeAttributeNode(d[0]);Mr(c)}var io=new Map,fD=new Set;function Jy(c){return typeof c.getRootNode=="function"?c.getRootNode():c.nodeType===9?c:c.ownerDocument}var Bc=F.d;F.d={f:_G,r:TG,D:kG,C:OG,L:EG,m:MG,X:DG,S:RG,M:NG};function _G(){var c=Bc.f(),d=Qy();return c||d}function TG(c){var d=Gs(c);d!==null&&d.tag===5&&d.type==="form"?EM(d):Bc.r(c)}var fp=typeof document>"u"?null:document;function pD(c,d,g){var b=fp;if(b&&typeof d=="string"&&d){var T=es(d);T='link[rel="'+c+'"][href="'+T+'"]',typeof g=="string"&&(T+='[crossorigin="'+g+'"]'),fD.has(T)||(fD.add(T),c={rel:c,crossOrigin:g,href:d},b.querySelector(T)===null&&(d=b.createElement("link"),as(d,"link",c),zr(d),b.head.appendChild(d)))}}function kG(c){Bc.D(c),pD("dns-prefetch",c,null)}function OG(c,d){Bc.C(c,d),pD("preconnect",c,d)}function EG(c,d,g){Bc.L(c,d,g);var b=fp;if(b&&c&&d){var T='link[rel="preload"][as="'+es(d)+'"]';d==="image"&&g&&g.imageSrcSet?(T+='[imagesrcset="'+es(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(T+='[imagesizes="'+es(g.imageSizes)+'"]')):T+='[href="'+es(c)+'"]';var k=T;switch(d){case"style":k=pp(c);break;case"script":k=mp(c)}io.has(k)||(c=p({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),io.set(k,c),b.querySelector(T)!==null||d==="style"&&b.querySelector(ng(k))||d==="script"&&b.querySelector(rg(k))||(d=b.createElement("link"),as(d,"link",c),zr(d),b.head.appendChild(d)))}}function MG(c,d){Bc.m(c,d);var g=fp;if(g&&c){var b=d&&typeof d.as=="string"?d.as:"script",T='link[rel="modulepreload"][as="'+es(b)+'"][href="'+es(c)+'"]',k=T;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=mp(c)}if(!io.has(k)&&(c=p({rel:"modulepreload",href:c},d),io.set(k,c),g.querySelector(T)===null)){switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(rg(k)))return}b=g.createElement("link"),as(b,"link",c),zr(b),g.head.appendChild(b)}}}function RG(c,d,g){Bc.S(c,d,g);var b=fp;if(b&&c){var T=Xs(b).hoistableStyles,k=pp(c);d=d||"default";var P=T.get(k);if(!P){var Z={loading:0,preload:null};if(P=b.querySelector(ng(k)))Z.loading=5;else{c=p({rel:"stylesheet",href:c,"data-precedence":d},g),(g=io.get(k))&&sC(c,g);var ie=P=b.createElement("link");zr(ie),as(ie,"link",c),ie._p=new Promise(function(we,ke){ie.onload=we,ie.onerror=ke}),ie.addEventListener("load",function(){Z.loading|=1}),ie.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,e1(P,d,b)}P={type:"stylesheet",instance:P,count:1,state:Z},T.set(k,P)}}}function DG(c,d){Bc.X(c,d);var g=fp;if(g&&c){var b=Xs(g).hoistableScripts,T=mp(c),k=b.get(T);k||(k=g.querySelector(rg(T)),k||(c=p({src:c,async:!0},d),(d=io.get(T))&&aC(c,d),k=g.createElement("script"),zr(k),as(k,"link",c),g.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},b.set(T,k))}}function NG(c,d){Bc.M(c,d);var g=fp;if(g&&c){var b=Xs(g).hoistableScripts,T=mp(c),k=b.get(T);k||(k=g.querySelector(rg(T)),k||(c=p({src:c,async:!0,type:"module"},d),(d=io.get(T))&&aC(c,d),k=g.createElement("script"),zr(k),as(k,"link",c),g.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},b.set(T,k))}}function mD(c,d,g,b){var T=(T=ve.current)?Jy(T):null;if(!T)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=pp(g.href),g=Xs(T).hoistableStyles,b=g.get(d),b||(b={type:"style",instance:null,count:0,state:null},g.set(d,b)),b):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=pp(g.href);var k=Xs(T).hoistableStyles,P=k.get(c);if(P||(T=T.ownerDocument||T,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(c,P),(k=T.querySelector(ng(c)))&&!k._p&&(P.instance=k,P.state.loading=5),io.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},io.set(c,g),k||IG(T,c,g,P.state))),d&&b===null)throw Error(r(528,""));return P}if(d&&b!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=mp(g),g=Xs(T).hoistableScripts,b=g.get(d),b||(b={type:"script",instance:null,count:0,state:null},g.set(d,b)),b):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function pp(c){return'href="'+es(c)+'"'}function ng(c){return'link[rel="stylesheet"]['+c+"]"}function gD(c){return p({},c,{"data-precedence":c.precedence,precedence:null})}function IG(c,d,g,b){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?b.loading=1:(d=c.createElement("link"),b.preload=d,d.addEventListener("load",function(){return b.loading|=1}),d.addEventListener("error",function(){return b.loading|=2}),as(d,"link",g),zr(d),c.head.appendChild(d))}function mp(c){return'[src="'+es(c)+'"]'}function rg(c){return"script[async]"+c}function vD(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var b=c.querySelector('style[data-href~="'+es(g.href)+'"]');if(b)return d.instance=b,zr(b),b;var T=p({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return b=(c.ownerDocument||c).createElement("style"),zr(b),as(b,"style",T),e1(b,g.precedence,c),d.instance=b;case"stylesheet":T=pp(g.href);var k=c.querySelector(ng(T));if(k)return d.state.loading|=4,d.instance=k,zr(k),k;b=gD(g),(T=io.get(T))&&sC(b,T),k=(c.ownerDocument||c).createElement("link"),zr(k);var P=k;return P._p=new Promise(function(Z,ie){P.onload=Z,P.onerror=ie}),as(k,"link",b),d.state.loading|=4,e1(k,g.precedence,c),d.instance=k;case"script":return k=mp(g.src),(T=c.querySelector(rg(k)))?(d.instance=T,zr(T),T):(b=g,(T=io.get(k))&&(b=p({},g),aC(b,T)),c=c.ownerDocument||c,T=c.createElement("script"),zr(T),as(T,"link",b),c.head.appendChild(T),d.instance=T);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(b=d.instance,d.state.loading|=4,e1(b,g.precedence,c));return d.instance}function e1(c,d,g){for(var b=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=b.length?b[b.length-1]:null,k=T,P=0;P<b.length;P++){var Z=b[P];if(Z.dataset.precedence===d)k=Z;else if(k!==T)break}k?k.parentNode.insertBefore(c,k.nextSibling):(d=g.nodeType===9?g.head:g,d.insertBefore(c,d.firstChild))}function sC(c,d){c.crossOrigin==null&&(c.crossOrigin=d.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=d.referrerPolicy),c.title==null&&(c.title=d.title)}function aC(c,d){c.crossOrigin==null&&(c.crossOrigin=d.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=d.referrerPolicy),c.integrity==null&&(c.integrity=d.integrity)}var t1=null;function bD(c,d,g){if(t1===null){var b=new Map,T=t1=new Map;T.set(g,b)}else T=t1,b=T.get(g),b||(b=new Map,T.set(g,b));if(b.has(c))return b;for(b.set(c,null),g=g.getElementsByTagName(c),T=0;T<g.length;T++){var k=g[T];if(!(k[yr]||k[br]||c==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var P=k.getAttribute(d)||"";P=c+P;var Z=b.get(P);Z?Z.push(k):b.set(P,[k])}}return b}function yD(c,d,g){c=c.ownerDocument||c,c.head.insertBefore(g,d==="title"?c.querySelector("head > title"):null)}function BG(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function xD(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function LG(c,d,g,b){if(g.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var T=pp(b.href),k=d.querySelector(ng(T));if(k){d=k._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=n1.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=k,zr(k);return}k=d.ownerDocument||d,b=gD(b),(T=io.get(T))&&sC(b,T),k=k.createElement("link"),zr(k);var P=k;P._p=new Promise(function(Z,ie){P.onload=Z,P.onerror=ie}),as(k,"link",b),g.instance=k}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=n1.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var oC=0;function PG(c,d){return c.stylesheets&&c.count===0&&i1(c,c.stylesheets),0<c.count||0<c.imgCount?function(g){var b=setTimeout(function(){if(c.stylesheets&&i1(c,c.stylesheets),c.unsuspend){var k=c.unsuspend;c.unsuspend=null,k()}},6e4+d);0<c.imgBytes&&oC===0&&(oC=62500*bG());var T=setTimeout(function(){if(c.waitingForImages=!1,c.count===0&&(c.stylesheets&&i1(c,c.stylesheets),c.unsuspend)){var k=c.unsuspend;c.unsuspend=null,k()}},(c.imgBytes>oC?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(b),clearTimeout(T)}}:null}function n1(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)i1(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var r1=null;function i1(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,r1=new Map,d.forEach(FG,c),r1=null,n1.call(c))}function FG(c,d){if(!(d.state.loading&4)){var g=r1.get(c);if(g)var b=g.get(null);else{g=new Map,r1.set(c,g);for(var T=c.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<T.length;k++){var P=T[k];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(g.set(P.dataset.precedence,P),b=P)}b&&g.set(null,b)}T=d.instance,P=T.getAttribute("data-precedence"),k=g.get(P)||b,k===b&&g.set(null,T),g.set(P,T),this.count++,b=n1.bind(this),T.addEventListener("load",b),T.addEventListener("error",b),k?k.parentNode.insertBefore(T,k.nextSibling):(c=c.nodeType===9?c.head:c,c.insertBefore(T,c.firstChild)),d.state.loading|=4}}var ig={$$typeof:C,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function zG(c,d,g,b,T,k,P,Z,ie){this.tag=1,this.containerInfo=c,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=Ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.hiddenUpdates=Ht(null),this.identifierPrefix=b,this.onUncaughtError=T,this.onCaughtError=k,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function AD(c,d,g,b,T,k,P,Z,ie,we,ke,ze){return c=new zG(c,d,g,P,ie,we,ke,ze,Z),d=1,k===!0&&(d|=24),k=Aa(3,null,null,d),c.current=k,k.stateNode=c,d=zS(),d.refCount++,c.pooledCache=d,d.refCount++,k.memoizedState={element:b,isDehydrated:g,cache:d},QS(k),c}function wD(c){return c?(c=Wf,c):Wf}function SD(c,d,g,b,T,k){T=wD(T),b.context===null?b.context=T:b.pendingContext=T,b=Iu(d),b.payload={element:g},k=k===void 0?null:k,k!==null&&(b.callback=k),g=Bu(c,b,d),g!==null&&(ia(g,c,d),B0(g,c,d))}function jD(c,d){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g<d?g:d}}function lC(c,d){jD(c,d),(c=c.alternate)&&jD(c,d)}function CD(c){if(c.tag===13||c.tag===31){var d=gd(c,67108864);d!==null&&ia(d,c,67108864),lC(c,67108864)}}function _D(c){if(c.tag===13||c.tag===31){var d=_a();d=Ct(d);var g=gd(c,d);g!==null&&ia(g,c,d),lC(c,d)}}var s1=!0;function HG(c,d,g,b){var T=I.T;I.T=null;var k=F.p;try{F.p=2,cC(c,d,g,b)}finally{F.p=k,I.T=T}}function qG(c,d,g,b){var T=I.T;I.T=null;var k=F.p;try{F.p=8,cC(c,d,g,b)}finally{F.p=k,I.T=T}}function cC(c,d,g,b){if(s1){var T=uC(b);if(T===null)Gj(c,d,b,a1,g),kD(c,b);else if(QG(T,c,d,g,b))b.stopPropagation();else if(kD(c,b),d&4&&-1<$G.indexOf(c)){for(;T!==null;){var k=Gs(T);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var P=vt(k.pendingLanes);if(P!==0){var Z=k;for(Z.pendingLanes|=2,Z.entangledLanes|=2;P;){var ie=1<<31-tn(P);Z.entanglements[1]|=ie,P&=~ie}Tl(k),(In&6)===0&&(qy=Xe()+500,Z0(0))}}break;case 31:case 13:Z=gd(k,2),Z!==null&&ia(Z,k,2),Qy(),lC(k,2)}if(k=uC(b),k===null&&Gj(c,d,b,a1,g),k===T)break;T=k}T!==null&&b.stopPropagation()}else Gj(c,d,b,null,g)}}function uC(c){return c=Ft(c),hC(c)}var a1=null;function hC(c){if(a1=null,c=wn(c),c!==null){var d=s(c);if(d===null)c=null;else{var g=d.tag;if(g===13){if(c=o(d),c!==null)return c;c=null}else if(g===31){if(c=l(d),c!==null)return c;c=null}else if(g===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;c=null}else d!==c&&(c=null)}}return a1=c,null}function TD(c){switch(c){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(Oe()){case $e:return 2;case lt:return 8;case Rn:case vr:return 32;case rn:return 268435456;default:return 32}default:return 32}}var dC=!1,Vu=null,Yu=null,Gu=null,sg=new Map,ag=new Map,Xu=[],$G="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 kD(c,d){switch(c){case"focusin":case"focusout":Vu=null;break;case"dragenter":case"dragleave":Yu=null;break;case"mouseover":case"mouseout":Gu=null;break;case"pointerover":case"pointerout":sg.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":ag.delete(d.pointerId)}}function og(c,d,g,b,T,k){return c===null||c.nativeEvent!==k?(c={blockedOn:d,domEventName:g,eventSystemFlags:b,nativeEvent:k,targetContainers:[T]},d!==null&&(d=Gs(d),d!==null&&CD(d)),c):(c.eventSystemFlags|=b,d=c.targetContainers,T!==null&&d.indexOf(T)===-1&&d.push(T),c)}function QG(c,d,g,b,T){switch(d){case"focusin":return Vu=og(Vu,c,d,g,b,T),!0;case"dragenter":return Yu=og(Yu,c,d,g,b,T),!0;case"mouseover":return Gu=og(Gu,c,d,g,b,T),!0;case"pointerover":var k=T.pointerId;return sg.set(k,og(sg.get(k)||null,c,d,g,b,T)),!0;case"gotpointercapture":return k=T.pointerId,ag.set(k,og(ag.get(k)||null,c,d,g,b,T)),!0}return!1}function OD(c){var d=wn(c.target);if(d!==null){var g=s(d);if(g!==null){if(d=g.tag,d===13){if(d=o(g),d!==null){c.blockedOn=d,Yr(c.priority,function(){_D(g)});return}}else if(d===31){if(d=l(g),d!==null){c.blockedOn=d,Yr(c.priority,function(){_D(g)});return}}else if(d===3&&g.stateNode.current.memoizedState.isDehydrated){c.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}c.blockedOn=null}function o1(c){if(c.blockedOn!==null)return!1;for(var d=c.targetContainers;0<d.length;){var g=uC(c.nativeEvent);if(g===null){g=c.nativeEvent;var b=new g.constructor(g.type,g);St=b,g.target.dispatchEvent(b),St=null}else return d=Gs(g),d!==null&&CD(d),c.blockedOn=g,!1;d.shift()}return!0}function ED(c,d,g){o1(c)&&g.delete(d)}function UG(){dC=!1,Vu!==null&&o1(Vu)&&(Vu=null),Yu!==null&&o1(Yu)&&(Yu=null),Gu!==null&&o1(Gu)&&(Gu=null),sg.forEach(ED),ag.forEach(ED)}function l1(c,d){c.blockedOn===d&&(c.blockedOn=null,dC||(dC=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,UG)))}var c1=null;function MD(c){c1!==c&&(c1=c,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){c1===c&&(c1=null);for(var d=0;d<c.length;d+=3){var g=c[d],b=c[d+1],T=c[d+2];if(typeof b!="function"){if(hC(b||g)===null)continue;break}var k=Gs(g);k!==null&&(c.splice(d,3),d-=3,uj(k,{pending:!0,data:T,method:g.method,action:b},b,T))}}))}function gp(c){function d(ie){return l1(ie,c)}Vu!==null&&l1(Vu,c),Yu!==null&&l1(Yu,c),Gu!==null&&l1(Gu,c),sg.forEach(d),ag.forEach(d);for(var g=0;g<Xu.length;g++){var b=Xu[g];b.blockedOn===c&&(b.blockedOn=null)}for(;0<Xu.length&&(g=Xu[0],g.blockedOn===null);)OD(g),g.blockedOn===null&&Xu.shift();if(g=(c.ownerDocument||c).$$reactFormReplay,g!=null)for(b=0;b<g.length;b+=3){var T=g[b],k=g[b+1],P=T[Bi]||null;if(typeof k=="function")P||MD(g);else if(P){var Z=null;if(k&&k.hasAttribute("formAction")){if(T=k,P=k[Bi]||null)Z=P.formAction;else if(hC(T)!==null)continue}else Z=P.action;typeof Z=="function"?g[b+1]=Z:(g.splice(b,3),b-=3),MD(g)}}}function RD(){function c(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(P){return T=P})},focusReset:"manual",scroll:"manual"})}function d(){T!==null&&(T(),T=null),b||setTimeout(g,20)}function g(){if(!b&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var b=!1,T=null;return navigation.addEventListener("navigate",c),navigation.addEventListener("navigatesuccess",d),navigation.addEventListener("navigateerror",d),setTimeout(g,100),function(){b=!0,navigation.removeEventListener("navigate",c),navigation.removeEventListener("navigatesuccess",d),navigation.removeEventListener("navigateerror",d),T!==null&&(T(),T=null)}}}function fC(c){this._internalRoot=c}u1.prototype.render=fC.prototype.render=function(c){var d=this._internalRoot;if(d===null)throw Error(r(409));var g=d.current,b=_a();SD(g,b,c,d,null,null)},u1.prototype.unmount=fC.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var d=c.containerInfo;SD(c.current,2,null,c,null,null),Qy(),d[vs]=null}};function u1(c){this._internalRoot=c}u1.prototype.unstable_scheduleHydration=function(c){if(c){var d=Vr();c={blockedOn:null,target:c,priority:d};for(var g=0;g<Xu.length&&d!==0&&d<Xu[g].priority;g++);Xu.splice(g,0,c),g===0&&OD(c)}};var DD=e.version;if(DD!=="19.2.6")throw Error(r(527,DD,"19.2.6"));F.findDOMNode=function(c){var d=c._reactInternals;if(d===void 0)throw typeof c.render=="function"?Error(r(188)):(c=Object.keys(c).join(","),Error(r(268,c)));return c=h(d),c=c!==null?f(c):null,c=c===null?null:c.stateNode,c};var WG={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var h1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!h1.isDisabled&&h1.supportsFiber)try{fn=h1.inject(WG),zt=h1}catch{}}return cg.createRoot=function(c,d){if(!i(c))throw Error(r(299));var g=!1,b="",T=zM,k=HM,P=qM;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onUncaughtError!==void 0&&(T=d.onUncaughtError),d.onCaughtError!==void 0&&(k=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError)),d=AD(c,1,!1,null,null,g,b,null,T,k,P,RD),c[vs]=d.current,Yj(c),new fC(d)},cg.hydrateRoot=function(c,d,g){if(!i(c))throw Error(r(299));var b=!1,T="",k=zM,P=HM,Z=qM,ie=null;return g!=null&&(g.unstable_strictMode===!0&&(b=!0),g.identifierPrefix!==void 0&&(T=g.identifierPrefix),g.onUncaughtError!==void 0&&(k=g.onUncaughtError),g.onCaughtError!==void 0&&(P=g.onCaughtError),g.onRecoverableError!==void 0&&(Z=g.onRecoverableError),g.formState!==void 0&&(ie=g.formState)),d=AD(c,1,!0,d,g??null,b,T,ie,k,P,Z,RD),d.context=wD(null),g=d.current,b=_a(),b=Ct(b),T=Iu(b),T.callback=null,Bu(g,T,b),g=b,d.current.lanes=g,qt(d,g),Tl(d),c[vs]=d.current,Yj(c),new u1(d)},cg.version="19.2.6",cg}var QD;function iX(){if(QD)return vC.exports;QD=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),vC.exports=rX(),vC.exports}var sX=iX();const aX=pl(sX),oX="_link_88ik9_12",d1={link:oX},lX="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='115.333px'%20height='114px'%20viewBox='0%200%20115.333%20114'%20enable-background='new%200%200%20115.333%20114'%20xml:space='preserve'%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3cg%3e%3cpath%20fill='%23EEEEEE'%20d='M56.667,0.667C25.372,0.667,0,26.036,0,57.332c0,31.295,25.372,56.666,56.667,56.666%20s56.666-25.371,56.666-56.666C113.333,26.036,87.961,0.667,56.667,0.667z%20M56.667,106.722c-8.904,0-16.123-5.948-16.123-13.283%20H72.79C72.79,100.773,65.571,106.722,56.667,106.722z%20M83.297,89.04H30.034v-9.658h53.264V89.04z%20M83.106,74.411h-52.92%20c-0.176-0.203-0.356-0.403-0.526-0.609c-5.452-6.62-6.736-10.076-7.983-13.598c-0.021-0.116,6.611,1.355,11.314,2.413%20c0,0,2.42,0.56,5.958,1.205c-3.397-3.982-5.414-9.044-5.414-14.218c0-11.359,8.712-21.285,5.569-29.308%20c3.059,0.249,6.331,6.456,6.552,16.161c3.252-4.494,4.613-12.701,4.613-17.733c0-5.21,3.433-11.262,6.867-11.469%20c-3.061,5.045,0.793,9.37,4.219,20.099c1.285,4.03,1.121,10.812,2.113,15.113C63.797,33.534,65.333,20.5,71,16%20c-2.5,5.667,0.37,12.758,2.333,16.167c3.167,5.5,5.087,9.667,5.087,17.548c0,5.284-1.951,10.259-5.242,14.148%20c3.742-0.702,6.326-1.335,6.326-1.335l12.152-2.371C91.657,60.156,89.891,67.418,83.106,74.411z'/%3e%3c/g%3e%3c/svg%3e";function ni(t){return Object.keys(t)}function AC(t){return t&&typeof t=="object"&&!Array.isArray(t)}function hO(t,e){const n={...t},r=e;return AC(t)&&AC(e)&&Object.keys(e).forEach(i=>{AC(r[i])&&i in t?n[i]=hO(n[i],r[i]):n[i]=r[i]}),n}function cX(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function uX(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function ov(t){const e=uX(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function UD(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function rP(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const i=`${r/16}${t}`;return e?UD(i):i}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(s=>n(s)).join(",");if(r.includes(" "))return r.split(" ").map(s=>n(s)).join(" ");const i=r.replace("px","");if(!Number.isNaN(Number(i))){const s=`${Number(i)/16}${t}`;return e?UD(s):s}}return r}return n}const fe=rP("rem",{shouldScale:!0}),Rs=rP("em");function rb(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function iP(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(n=>e.test(n))}return!1}function dO(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==E.Fragment:!1}function Ki(t){const e=E.createContext(null);return[e,()=>{const r=E.use(e);if(r===null)throw new Error(t);return r}]}function Zx(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function Jx(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function hX(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function dX(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function fX(t,e,n){return Jx(t,n)===Jx(e,n)}function mw({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:s="rtl",orientation:o}){return l=>{var y;n==null||n(l);const u=Array.from(((y=Jx(l.currentTarget,t))==null?void 0:y.querySelectorAll(e))||[]).filter(x=>fX(l.currentTarget,x,t)),h=u.findIndex(x=>l.currentTarget===x),f=dX(h,u,r),p=hX(h,u,r),m=s==="rtl"?p:f,v=s==="rtl"?f:p;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[m].focus(),i&&u[m].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[v].focus(),i&&u[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),i&&u[p].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[f].focus(),i&&u[f].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const x=u.length-1;!u[x].disabled&&u[x].focus();break}}}}const pX={app:100,modal:200,popover:300,overlay:400,max:9999};function xo(t){return pX[t]}const eA=()=>{};function mX(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||eA:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function Ut(t,e="size",n=!0){if(t!==void 0)return iP(t)?n?fe(t):t:`var(--${e}-${t})`}function Vi(t){return Ut(t,"mantine-spacing")}function Zn(t){return t===void 0?"var(--mantine-radius-default)":Ut(t,"mantine-radius")}function Or(t){return Ut(t,"mantine-font-size")}function sP(t){return Ut(t,"mantine-line-height",!1)}function fO(t){if(t)return Ut(t,"mantine-shadow",!1)}function Yi(t,e){return n=>{t==null||t(n),e==null||e(n)}}function pO(t,e){return t in e?ov(e[t]):ov(t)}function z3(t,e){const n=t.map(r=>({value:r,px:pO(r,e)}));return n.sort((r,i)=>r.px-i.px),n}function Hp(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function gX(t,e,n){var r;return n?Array.from(((r=Jx(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(i=>i===n):null}function Eh(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function Cm(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function vX(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:r}=n;if(r!==Object.keys(e).length)return!1;for(let i=0;i<r;i+=1){const s=n[i];if(!(s in e)||t[s]!==e[s]&&!(Number.isNaN(t[s])&&Number.isNaN(e[s])))return!1}return!0}function Np(t){const e=E.useRef(t);return E.useEffect(()=>{e.current=t}),E.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function gw(t,e){const{delay:n,flushOnUnmount:r,leading:i,maxWait:s}=typeof e=="number"?{delay:e,flushOnUnmount:!1,leading:!1,maxWait:void 0}:e,o=Np(t),l=E.useRef(0),u=E.useRef(0),h=E.useRef(null),f=E.useMemo(()=>{const p=Object.assign((...m)=>{window.clearTimeout(l.current),h.current=m;const v=p._isFirstCall;p._isFirstCall=!1;function y(){window.clearTimeout(l.current),window.clearTimeout(u.current),l.current=0,u.current=0,p._isFirstCall=!0,p._hasPendingCallback=!1}function x(){s!==void 0&&u.current===0&&(u.current=window.setTimeout(()=>{if(l.current!==0){const S=h.current;y(),o(...S)}},s))}if(i&&v){o(...m);const S=()=>{y()},C=()=>{l.current!==0&&(y(),o(...m))},j=()=>{y()};p.flush=C,p.cancel=j,l.current=window.setTimeout(S,n),x();return}if(i&&!v){p._hasPendingCallback=!0;const S=()=>{l.current!==0&&(y(),o(...m))},C=()=>{y()};p.flush=S,p.cancel=C;const j=()=>{y()};l.current=window.setTimeout(j,n),x();return}p._hasPendingCallback=!0;const w=()=>{l.current!==0&&(y(),o(...m))},A=()=>{y()};p.flush=w,p.cancel=A,l.current=window.setTimeout(w,n),x()},{flush:()=>{},cancel:()=>{},isPending:()=>p._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return p},[o,n,i,s]);return E.useEffect(()=>()=>{r?f.flush():f.cancel()},[f,r]),f}const bX=["mousedown","touchstart"];function yX(t,e,n,r=!0){const i=E.useRef(null),s=e||bX,o=E.useEffectEvent(u=>{const{target:h}=u??{};if(!document.body.contains(h)&&(h==null?void 0:h.tagName)!=="HTML")return;const f=u.composedPath();Array.isArray(n)?n.every(p=>!!p&&!f.includes(p))&&t(u):i.current&&!f.includes(i.current)&&t(u)}),l=s.join(",");return E.useEffect(()=>{if(!r)return;const u=l.split(",");return u.forEach(h=>document.addEventListener(h,o)),()=>{u.forEach(h=>document.removeEventListener(h,o))}},[l,r]),i}function aP(t={}){const e=t.timeout??2e3,[n,r]=E.useState(null),[i,s]=E.useState(!1),o=E.useRef(null);E.useEffect(()=>()=>{window.clearTimeout(o.current)},[]);const l=f=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>s(!1),e),s(f)};return{copy:f=>{"clipboard"in navigator?navigator.clipboard.writeText(f).then(()=>{r(null),l(!0)}).catch(p=>r(p)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{s(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}function xX(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function oP(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=E.useState(n?e:xX(t));return E.useEffect(()=>{try{if("matchMedia"in window){const s=window.matchMedia(t);i(s.matches);const o=l=>i(l.matches);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}}}catch{return}},[t]),r||!1}function lP(t,e){return oP("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}function ib(t,e,n={leading:!1}){const[r,i]=E.useState(t),s=E.useRef(!1),o=E.useRef(null),l=E.useRef(!1),u=E.useRef(t);u.current=t;const h=E.useCallback(()=>{window.clearTimeout(o.current),o.current=null,l.current=!1},[]),f=E.useCallback(()=>{o.current&&(h(),l.current=!1,i(u.current))},[]);return E.useEffect(()=>{s.current&&(!l.current&&n.leading?(l.current=!0,i(t)):(h(),o.current=window.setTimeout(()=>{l.current=!1,i(t)},e)))},[t,n.leading,e]),E.useEffect(()=>(s.current=!0,h),[]),[r,h,{cancel:h,flush:f}]}const Jh=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ll(t,e){const n=E.useRef(!1);E.useEffect(()=>()=>{n.current=!1},[]),E.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function cP({opened:t,shouldReturnFocus:e=!0}){const n=E.useRef(null),r=()=>{var i;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((i=n.current)==null||i.focus({preventScroll:!0}))};return ll(()=>{let i=-1;const s=o=>{o.key==="Tab"&&window.clearTimeout(i)};if(document.addEventListener("keydown",s),t)n.current=document.activeElement;else if(e){const o=document.activeElement;i=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener("keydown",s)}},[t,e]),r}const AX=/input|select|textarea|button|object/,uP="a, input, select, textarea, button, object, [tabindex]";function wX(t){return t.style.display==="none"}function SX(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let e=t;for(;e&&!(e===document.body||e.nodeType===11);){if(wX(e))return!1;e=e.parentNode}return!0}function hP(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function H3(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(hP(t));return(AX.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&SX(t)}function dP(t){const e=hP(t);return(Number.isNaN(e)||e>=0)&&H3(t)}function jX(t){return Array.from(t.querySelectorAll(uP)).filter(dP)}function CX(t,e){const n=jX(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],i=t.getRootNode();let s=r===i.activeElement||t===i.activeElement;const o=i.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(s=n.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===o.getAttribute("name")).includes(r)),!s)return;e.preventDefault();const l=n[e.shiftKey?n.length-1:0];l&&l.focus()}function _X(t=!0){const e=E.useRef(null),n=i=>{let s=i.querySelector("[data-autofocus]");if(!s){const o=Array.from(i.querySelectorAll(uP));s=o.find(dP)||o.find(H3)||null,!s&&H3(i)&&(s=i)}s?s.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",i)},r=E.useCallback(i=>{if(t){if(i===null){e.current=null;return}e.current!==i&&(setTimeout(()=>{i.getRootNode()?n(i):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",i)}),e.current=i)}},[t]);return E.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>{e.current&&n(e.current)});const i=s=>{s.key==="Tab"&&e.current&&CX(e.current,s)};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t]),r}const TX=t=>(t+1)%1e6;function kX(){const[,t]=E.useReducer(TX,0);return t}function Ri(t){const[e,n]=E.useState(`mantine-${E.useId().replace(/:/g,"")}`);return Jh(()=>{n(Cm())},[]),typeof t=="string"?t:e}function tA(t,e,n){const r=E.useEffectEvent(e);E.useEffect(()=>(window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n)),[t])}function OX(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function EX(t){try{return t&&JSON.parse(t)}catch{return t}}function MX(t){return{getItem:i=>{try{return window[t].getItem(i)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(i,s)=>{try{window[t].setItem(i,s)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:i=>{try{window[t].removeItem(i)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function RX(t,e){const n="mantine-local-storage",{getItem:r,setItem:i,removeItem:s}=MX(t);return function({key:l,defaultValue:u,getInitialValueInEffect:h=!0,sync:f=!0,deserialize:p=EX,serialize:m=v=>OX(v,e)}){const v=E.useCallback(S=>{let C;try{C=typeof window>"u"||!(t in window)||window[t]===null||!!S}catch{C=!0}if(C)return u;const j=r(l);return j!==null?p(j):u},[l,u]),[y,x]=E.useState(v(h)),w=E.useCallback(S=>{S instanceof Function?x(C=>{const j=S(C);return i(l,m(j)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:j}}))}),j}):(i(l,m(S)),window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:S}})),x(S))},[l]),A=E.useCallback(()=>{s(l),x(u),window.dispatchEvent(new CustomEvent(n,{detail:{key:l,value:u}}))},[l,u]);return tA("storage",S=>{f&&S.storageArea===window[t]&&S.key===l&&x(p(S.newValue??void 0))}),tA(n,S=>{f&&S.detail.key===l&&x(S.detail.value)}),E.useEffect(()=>{u!==void 0&&y===void 0&&w(u)},[u,y,w]),E.useEffect(()=>{const S=v();S!==void 0&&w(S)},[l]),[y===void 0?u:y,w,A]}}function sb(t){return RX("localStorage","use-local-storage")(t)}function nA(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function mO(...t){const e=new Map;return n=>{if(t.forEach(r=>{const i=nA(r,n);i&&e.set(r,i)}),e.size>0)return()=>{t.forEach(r=>{const i=e.get(r);i&&typeof i=="function"?i():nA(r,null)}),e.clear()}}}function qn(...t){return E.useCallback(mO(...t),t)}function Xi({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[i,s]=E.useState(e!==void 0?e:n),o=(l,...u)=>{s(l),r==null||r(l,...u)};return t!==void 0?[t,r,!0]:[i,o,!1]}function Zu(t,e){const n=e-t+1;return Array.from({length:n},(r,i)=>i+t)}const f1="dots";function DX({total:t,siblings:e=1,boundaries:n=1,page:r,initialPage:i,onChange:s,startValue:o=1}){const l=Math.max(Math.trunc(o),1),u=Math.max(Math.trunc(t),l),h=u-l+1,f=i??l,[p,m]=Xi({value:r,onChange:s,defaultValue:f,finalValue:f}),v=E.useCallback(S=>{S<l?m(l):S>u?m(u):m(S)},[l,u,m]),y=E.useCallback(()=>v(p+1),[p,v]),x=E.useCallback(()=>v(p-1),[p,v]),w=E.useCallback(()=>v(l),[v,l]),A=E.useCallback(()=>v(u),[u,v]);return{range:E.useMemo(()=>{if(e*2+3+n*2>=h)return Zu(l,u);const S=Math.max(p-e,l+n-1),C=Math.min(p+e,u-n),j=S>l+n+1,_=C<u-n;if(!j&&_)return[...Zu(l,l+(e*2+n+2)-1),f1,...Zu(u-(n-1),u)];if(j&&!_){const O=n+1+2*e;return[...Zu(l,l+n-1),f1,...Zu(u-O,u)]}return[...Zu(l,l+n-1),f1,...Zu(S,C),f1,...Zu(u-n+1,u)]},[h,e,p,l,u,n]),active:p,setPage:v,next:y,previous:x,first:w,last:A}}function ab(t,e){return oP("(prefers-reduced-motion: reduce)",t,e)}const NX={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function IX(t){const e=E.useRef(0),[n,r]=E.useState(NX),i=E.useRef(null);return[E.useCallback(s=>{i.current&&(i.current.disconnect(),i.current=null),e.current&&cancelAnimationFrame(e.current),s&&(i.current=new ResizeObserver(o=>{const l=o[0];l&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{var h,f;const u=((h=l.borderBoxSize)==null?void 0:h[0])||((f=l.contentBoxSize)==null?void 0:f[0]);if(u){const p=u.inlineSize,m=u.blockSize;r({width:p,height:m,x:l.contentRect.x,y:l.contentRect.y,top:l.contentRect.top,left:l.contentRect.left,bottom:l.contentRect.bottom,right:l.contentRect.right})}else r(l.contentRect)}))}),i.current.observe(s,t))},[t]),n]}function BX(t){const[e,{width:n,height:r}]=IX(t);return{ref:e,width:n,height:r}}function LX(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!vX(t[n],e[n]))return!1;return!0}function PX(t){const e=E.useRef([]),n=E.useRef(0);return LX(e.current,t)||(e.current=t,n.current+=1),[n.current]}function FX(t,e){E.useEffect(t,PX(e))}function ob(t=!1,e={}){const[n,r]=E.useState(t),i=E.useCallback(()=>{r(o=>{var l;return o||((l=e.onOpen)==null||l.call(e),!0)})},[e.onOpen]),s=E.useCallback(()=>{r(o=>{var l;return o&&((l=e.onClose)==null||l.call(e),!1)})},[e.onClose]);return[n,{open:i,close:s,toggle:E.useCallback(()=>{n?s():i()},[s,i,n]),set:r}]}function zX(t,e,n={autoInvoke:!1}){const r=E.useRef(null),i=Np(t),s=E.useCallback((...l)=>{r.current||(r.current=window.setTimeout(()=>{i(...l),r.current=null},e))},[e]),o=E.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return E.useEffect(()=>(n.autoInvoke&&s(),o),[o,s]),{start:s,clear:o}}function HX(t){const e=E.useRef(void 0);return E.useEffect(()=>{e.current=t},[t]),e.current}function qX(t,e,n){const r=E.useRef(null);E.useEffect(()=>{r.current&&(r.current.disconnect(),r.current=null);const i=typeof n=="function"?n():n;return i&&(r.current=new MutationObserver(t),r.current.observe(i,e)),()=>{r.current&&(r.current.disconnect(),r.current=null)}},[t,e,n])}function $X(){const[t,e]=E.useState(!1);return E.useEffect(()=>e(!0),[]),t}var Kc=nP();const Og=pl(Kc);function QX(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function wC(t){return t.current?t.current.scrollHeight:"auto"}function UX({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n,onTransitionStart:r,expanded:i,keepMounted:s}){const o={height:0,overflow:"hidden",...s?{}:{display:"none"}},l=E.useEffectEvent(()=>r==null?void 0:r()),u=E.useRef(null),[h,f]=E.useState(i?{}:o),[p,m]=E.useState(i?"entered":"exited"),v=A=>{Kc.flushSync(()=>f(A))},y=A=>{v(S=>({...S,...A}))},x=A=>{const S=t??QX(A);return{transition:`height ${S}ms ${e}, opacity ${S}ms ${e}`}};ll(()=>{t!==0&&l(),i?window.requestAnimationFrame(()=>{Kc.flushSync(()=>m("entering")),y({willChange:"height",display:"block",overflow:"hidden"}),window.requestAnimationFrame(()=>{const A=wC(u);y({...x(A),height:A})})}):window.requestAnimationFrame(()=>{Kc.flushSync(()=>m("exiting"));const A=wC(u);y({...x(A),willChange:"height",height:A}),window.requestAnimationFrame(()=>y({height:0,overflow:"hidden"}))})},[i]);const w=A=>{if(!(A.target!==u.current||A.propertyName!=="height"))if(i){const S=wC(u);S===h.height?v({}):y({height:S}),m("entered"),n==null||n()}else h.height===0&&(v(o),m("exited"),n==null||n())};return{state:p,getCollapseProps:A=>({"aria-hidden":!i,inert:!i,ref:mO(u,A==null?void 0:A.ref),onTransitionEnd:w,style:{boxSizing:"border-box",...A==null?void 0:A.style,...h}})}}function WX(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function SC(t){return t.current?t.current.scrollWidth:"auto"}function VX({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n,onTransitionStart:r,expanded:i,keepMounted:s}){const o={width:0,overflow:"hidden",...s?{}:{display:"none"}},l=E.useEffectEvent(()=>r==null?void 0:r()),u=E.useRef(null),[h,f]=E.useState(i?{}:o),[p,m]=E.useState(i?"entered":"exited"),v=A=>{Kc.flushSync(()=>f(A))},y=A=>{v(S=>({...S,...A}))},x=A=>{const S=t??WX(A);return{transition:`width ${S}ms ${e}, opacity ${S}ms ${e}`}};ll(()=>{t!==0&&l(),i?window.requestAnimationFrame(()=>{Kc.flushSync(()=>m("entering")),y({willChange:"width",display:"block",overflow:"hidden"}),window.requestAnimationFrame(()=>{const A=SC(u);y({...x(A),width:A})})}):window.requestAnimationFrame(()=>{Kc.flushSync(()=>m("exiting"));const A=SC(u);y({...x(A),willChange:"width",width:A}),window.requestAnimationFrame(()=>y({width:0,overflow:"hidden"}))})},[i]);const w=A=>{if(!(A.target!==u.current||A.propertyName!=="width"))if(i){const S=SC(u);S===h.width?v({}):y({width:S}),m("entered"),n==null||n()}else h.width===0&&(v(o),m("exited"),n==null||n())};return{state:p,getCollapseProps:A=>({"aria-hidden":!i,inert:!i,ref:mO(u,A==null?void 0:A.ref),onTransitionEnd:w,style:{boxSizing:"border-box",...A==null?void 0:A.style,...h}})}}var YX={};function fP(){return"development"}function vw(t){var n;const e=Ln.version;return typeof Ln.version!="string"||e.startsWith("18.")?t==null?void 0:t.ref:(n=t==null?void 0:t.props)==null?void 0:n.ref}function GX(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"}function fx(t,e=document){const n=e.querySelector(t);if(n)return n;const r=e.querySelectorAll("*");for(let i=0;i<r.length;i+=1){const s=r[i];if(s.shadowRoot){const o=fx(t,s.shadowRoot);if(o)return o}}return null}function $c(t,e=document){const n=[],r=e.querySelectorAll(t);n.push(...Array.from(r));const i=e.querySelectorAll("*");for(let s=0;s<i.length;s+=1){const o=i[s];if(o.shadowRoot){const l=$c(t,o.shadowRoot);n.push(...l)}}return n}function Lc(t){if(!t)return document;const e=t.getRootNode();return e instanceof ShadowRoot||e instanceof Document?e:document}function Rf(t){const e=E.Children.toArray(t);return e.length!==1||!dO(e[0])?null:e[0]}function pP(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=pP(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pr(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=pP(t))&&(r&&(r+=" "),r+=e);return r}const XX={};function KX(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,i])=>{e[r]?e[r]=Pr(e[r],i):e[r]=i})}),e}function lv({theme:t,classNames:e,props:n,stylesCtx:r}){return KX((Array.isArray(e)?e:[e]).map(i=>typeof i=="function"?i(t,n,r):i||XX))}function rA({theme:t,styles:e,props:n,stylesCtx:r}){const i=Array.isArray(e)?e:[e],s={};for(const o of i)typeof o=="function"?Object.assign(s,o(t,n,r)):o&&Object.assign(s,o);return s}function WD(t){return t==="auto"||t==="dark"||t==="light"}function ZX({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return WD(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&WD(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}function cv(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function JX(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function eK(t){let e=t.replace("#","");if(e.length===3){const r=e.split("");e=[r[0],r[0],r[1],r[1],r[2],r[2]].join("")}if(e.length===8){const r=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:r}}const n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function tK(t){const[e,n,r,i]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:i===void 0?1:i}}function nK(t){const e=t.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!e)return{r:0,g:0,b:0,a:1};const n=parseInt(e[1],10),r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100,s=e[5]?parseFloat(e[5]):void 0,o=(1-Math.abs(2*i-1))*r,l=n/60,u=o*(1-Math.abs(l%2-1)),h=i-o/2;let f,p,m;return l>=0&&l<1?(f=o,p=u,m=0):l>=1&&l<2?(f=u,p=o,m=0):l>=2&&l<3?(f=0,p=o,m=u):l>=3&&l<4?(f=0,p=u,m=o):l>=4&&l<5?(f=u,p=0,m=o):(f=o,p=0,m=u),{r:Math.round((f+h)*255),g:Math.round((p+h)*255),b:Math.round((m+h)*255),a:s||1}}function bw(t){return JX(t)?eK(t):t.startsWith("rgb")?tK(t):t.startsWith("hsl")?nK(t):{r:0,g:0,b:0,a:1}}function jC(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function rK(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function iK(t){if(t.startsWith("oklch("))return(rK(t)||0)/100;const{r:e,g:n,b:r}=bw(t),i=e/255,s=n/255,o=r/255,l=jC(i),u=jC(s),h=jC(o);return .2126*l+.7152*u+.0722*h}function ug(t,e=.179){return t.startsWith("var(")?!1:iK(t)>e}function hu({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:ug(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:ug(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:ug(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,i]=t.split("."),s=i?Number(i):void 0,o=r in e.colors;if(o){const l=s!==void 0?e.colors[r][s]:e.colors[r][cv(e,n||"light")];return{color:r,value:l,shade:s,isThemeColor:o,isLight:ug(l,e.luminanceThreshold),variable:i?`--mantine-color-${r}-${s}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:o,isLight:ug(t,e.luminanceThreshold),shade:s,variable:void 0}}function gr(t,e){const n=hu({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function Hd(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:i,a:s}=bw(t),o=1-e,l=u=>Math.round(u*o);return`rgba(${l(n)}, ${l(r)}, ${l(i)}, ${s})`}function q3(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)??e.defaultGradient.deg??0},r=gr(n.from,e),i=gr(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function oh(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var("))return`color-mix(in srgb, ${t}, transparent ${(1-e)*100}%)`;if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:i}=bw(t);return`rgba(${n}, ${r}, ${i}, ${e})`}const VD=oh,sK=({color:t,theme:e,variant:n,gradient:r,autoContrast:i})=>{const s=hu({color:t,theme:e}),o=typeof i=="boolean"?i:e.autoContrast;if(n==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(n==="filled"){const l=o&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?s.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:l,border:`${fe(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${s.shade===9?8:s.shade+1})`,color:l,border:`${fe(1)} solid transparent`}:{background:t,hover:Hd(t,.1),color:l,border:`${fe(1)} solid transparent`}}if(n==="light"){if(s.isThemeColor){if(s.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`};const l=e.colors[s.color][s.shade];return{background:l,hover:Hd(l,.1),color:`var(--mantine-color-${s.color}-light-color)`,border:`${fe(1)} solid transparent`}}return{background:oh(t,.1),hover:oh(t,.12),color:t,border:`${fe(1)} solid transparent`}}if(n==="outline")return s.isThemeColor?s.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${fe(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:oh(e.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${fe(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:oh(t,.05),color:t,border:`${fe(1)} solid ${t}`};if(n==="subtle"){if(s.isThemeColor){if(s.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`};const l=e.colors[s.color][s.shade];return{background:"transparent",hover:oh(l,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${fe(1)} solid transparent`}}return{background:"transparent",hover:oh(t,.12),color:t,border:`${fe(1)} solid transparent`}}return n==="transparent"?s.isThemeColor?s.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${fe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${fe(1)} solid transparent`}:n==="white"?s.isThemeColor?s.shade===void 0?{background:"var(--mantine-color-white)",hover:Hd(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hd(e.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${fe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hd(e.white,.01),color:t,border:`${fe(1)} solid transparent`}:n==="gradient"?{background:q3(r,e),hover:q3(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${fe(1)} solid var(--mantine-color-default-border)`}:{}};function mP(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, white ${e*100}%)`;const{r:n,g:r,b:i,a:s}=bw(t),o=l=>Math.round(l+(255-l)*e);return`rgba(${o(n)}, ${o(r)}, ${o(i)}, ${s})`}function ed({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&hu({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function YD(t,e){return ed({color:t.colors[t.primaryColor][cv(t,e)],theme:t,autoContrast:null})}function Ym(t,e){return typeof t=="boolean"?t:e.autoContrast}const gO=E.createContext(null);function nc(){const t=E.use(gO);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function aK(){return nc().cssVariablesResolver}function oK(){return nc().classNamesPrefix}function yw(){return nc().getStyleNonce}function lK(){return nc().withStaticClasses}function cK(){return nc().headless}function uK(){var t;return(t=nc().stylesTransform)==null?void 0:t.sx}function hK(){var t;return(t=nc().stylesTransform)==null?void 0:t.styles}function Gm(){return nc().env||"default"}function dK(){return nc().deduplicateInlineStyles}function GD(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function gP({keepTransitions:t}={}){var f;const e=E.useRef(eA),n=E.useRef(-1),r=E.use(gO),i=E.useRef((f=yw())==null?void 0:f());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const s=p=>{r.setColorScheme(p),e.current=t?()=>{}:GD(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var m;(m=e.current)==null||m.call(e)},10)},o=()=>{r.clearColorScheme(),e.current=t?()=>{}:GD(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var p;(p=e.current)==null||p.call(e)},10)},l=lP("light",{getInitialValueInEffect:!1}),u=r.colorScheme==="auto"?l:r.colorScheme,h=E.useCallback(()=>s(u==="light"?"dark":"light"),[s,u]);return E.useEffect(()=>()=>{var p;(p=e.current)==null||p.call(e),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:s,clearColorScheme:o,toggleColorScheme:h}}function vp(t,e){var i,s;const n=typeof window<"u"&&"matchMedia"in window&&((i=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:i.matches),r=t!=="auto"?t:n?"dark":"light";(s=e())==null||s.setAttribute("data-mantine-color-scheme",r)}function fK({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const i=E.useRef(null),[s,o]=E.useState(()=>t.get(e)),l=r||s,u=E.useCallback(f=>{r||(vp(f,n),o(f),t.set(f))},[t.set,l,r]),h=E.useCallback(()=>{o(e),vp(e,n),t.clear()},[t.clear,e]);return E.useEffect(()=>(t.subscribe(u),t.unsubscribe),[t.subscribe,t.unsubscribe]),Jh(()=>{vp(t.get(e),n)},[]),E.useEffect(()=>{var p;if(r)return vp(r,n),()=>{};r===void 0&&vp(s,n),typeof window<"u"&&"matchMedia"in window&&(i.current=window.matchMedia("(prefers-color-scheme: dark)"));const f=m=>{s==="auto"&&vp(m.matches?"dark":"light",n)};return(p=i.current)==null||p.addEventListener("change",f),()=>{var m;return(m=i.current)==null?void 0:m.removeEventListener("change",f)}},[s,r]),{colorScheme:l,setColorScheme:u,clearColorScheme:h}}function xw(t,e={getInitialValueInEffect:!0}){const n=lP(t,e),{colorScheme:r}=gP();return r==="auto"?n:r}const pK={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},XD="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",vO={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:pK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:sK,autoContrast:!1,luminanceThreshold:.3,fontFamily:XD,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:XD,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:fe(34),lineHeight:"1.3"},h2:{fontSize:fe(26),lineHeight:"1.35"},h3:{fontSize:fe(22),lineHeight:"1.4"},h4:{fontSize:fe(18),lineHeight:"1.45"},h5:{fontSize:fe(16),lineHeight:"1.5"},h6:{fontSize:fe(14),lineHeight:"1.5"}}},fontSizes:{xs:fe(12),sm:fe(14),md:fe(16),lg:fe(18),xl:fe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:fe(2),sm:fe(4),md:fe(8),lg:fe(16),xl:fe(32)},spacing:{xs:fe(10),sm:fe(12),md:fe(16),lg:fe(20),xl:fe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), 0 ${fe(1)} ${fe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(10)} ${fe(15)} ${fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${fe(7)} ${fe(7)} ${fe(-5)}`,md:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(20)} ${fe(25)} ${fe(-5)}, rgba(0, 0, 0, 0.04) 0 ${fe(10)} ${fe(10)} ${fe(-5)}`,lg:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(28)} ${fe(23)} ${fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${fe(12)} ${fe(12)} ${fe(-7)}`,xl:`0 ${fe(1)} ${fe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${fe(36)} ${fe(28)} ${fe(-7)}, rgba(0, 0, 0, 0.04) 0 ${fe(17)} ${fe(17)} ${fe(-7)}`},other:{},components:{}},mK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",KD="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function CC(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function ZD(t){if(!(t.primaryColor in t.colors))throw new Error(mK);if(typeof t.primaryShade=="object"&&(!CC(t.primaryShade.dark)||!CC(t.primaryShade.light)))throw new Error(KD);if(typeof t.primaryShade=="number"&&!CC(t.primaryShade))throw new Error(KD)}function gK(t,e){var r;if(!e)return ZD(t),t;const n=hO(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),ZD(n),n}const bO=E.createContext(null),vK=()=>E.use(bO)||vO;function Ni(){const t=E.use(bO);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function vP({theme:t,children:e,inherit:n=!0}){const r=vK();return a.jsx(bO,{value:E.useMemo(()=>gK(n?r:vO,t),[t,r,n]),children:e})}vP.displayName="@mantine/core/MantineThemeProvider";function _C(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function bP(t,e){const n=e?[e]:[":root",":host"],r=_C(t.variables),i=r?`${n.join(", ")}{${r}}`:"",s=_C(t.dark),o=_C(t.light),l=u=>n.map(h=>h===":host"?`${h}([data-mantine-color-scheme="${u}"])`:`${h}[data-mantine-color-scheme="${u}"]`).join(", ");return`${i}

${s?`${l("dark")}{${s}}`:""}

${o?`${l("light")}{${o}}`:""}`}function p1({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:i=!0}){if(!t.colors[e])return{};if(n==="light"){const l=cv(t,"light"),u={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${l})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${l===9?8:l+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${l})`,[`--mantine-color-${r}-outline-hover`]:VD(t.colors[e][l],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...u}:u}const s=cv(t,"dark"),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:Hd(t.colors[e][9],.5),[`--mantine-color-${r}-light-hover`]:Hd(t.colors[e][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:VD(t.colors[e][Math.max(s-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...o}:o}function bK(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Ed(t,e,n){ni(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const yP=t=>{const e=cv(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:fe(t.defaultRadius),r={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":YD(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":YD(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Ed(r.variables,t.breakpoints,"breakpoint"),Ed(r.variables,t.spacing,"spacing"),Ed(r.variables,t.fontSizes,"font-size"),Ed(r.variables,t.lineHeights,"line-height"),Ed(r.variables,t.shadows,"shadow"),Ed(r.variables,t.radius,"radius"),Ed(r.variables,t.fontWeights,"font-weight"),t.colors[t.primaryColor].forEach((s,o)=>{r.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${t.primaryColor}-${o})`}),ni(t.colors).forEach(s=>{const o=t.colors[s];if(bK(o)){Object.assign(r.light,p1({theme:t,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,p1({theme:t,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,u)=>{r.variables[`--mantine-color-${s}-${u}`]=l}),Object.assign(r.light,p1({theme:t,color:s,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,p1({theme:t,color:s,colorScheme:"dark",withColorValues:!1}))});const i=t.headings.sizes;return ni(i).forEach(s=>{r.variables[`--mantine-${s}-font-size`]=i[s].fontSize,r.variables[`--mantine-${s}-line-height`]=i[s].lineHeight,r.variables[`--mantine-${s}-font-weight`]=i[s].fontWeight||t.headings.fontWeight}),r};function yK(){const t=Ni(),e=yw(),n=ni(t.breakpoints).reduce((r,i)=>{const s=t.breakpoints[i].includes("px"),o=ov(t.breakpoints[i]);return`${r}@media (max-width: ${s?`${o-.1}px`:Rs(o-.1)}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${s?`${o}px`:Rs(o)}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return a.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function xK({theme:t,generator:e}){const n=yP(t),r=e==null?void 0:e(t);return r?hO(n,r):n}const TC=yP(vO);function AK(t){const e={variables:{},light:{},dark:{}};return ni(t.variables).forEach(n=>{TC.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),ni(t.light).forEach(n=>{TC.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),ni(t.dark).forEach(n=>{TC.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function wK(t){return bP({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function xP({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=Ni(),r=yw(),i=xK({theme:n,generator:aK()}),s=(t===void 0||t===":root"||t===":host")&&e,o=bP(s?AK(i):i,t);return o?a.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${o}${s?"":wK(t)}`}}):null}xP.displayName="@mantine/CssVariables";function SK({respectReducedMotion:t,getRootElement:e}){Jh(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}function AP({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:s=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:u="mantine",colorSchemeManager:h=ZX(),defaultColorScheme:f="light",getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:v,stylesTransform:y,env:x,deduplicateInlineStyles:w=!1}){const{colorScheme:A,setColorScheme:S,clearColorScheme:C}=fK({defaultColorScheme:f,forceColorScheme:v,manager:h,getRootElement:p});return SK({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:p}),a.jsx(gO,{value:{colorScheme:A,setColorScheme:S,clearColorScheme:C,getRootElement:p,classNamesPrefix:u,getStyleNonce:n,cssVariablesResolver:m,cssVariablesSelector:l??":root",withStaticClasses:r,stylesTransform:y,env:x,deduplicateInlineStyles:w},children:a.jsxs(vP,{theme:t,children:[o&&a.jsx(xP,{cssVariablesSelector:l,deduplicateCssVariables:s}),i&&a.jsx(yK,{}),e]})})}AP.displayName="@mantine/core/MantineProvider";function je(t,e,n){var o;const r=Ni(),i=(o=r.components[t])==null?void 0:o.defaultProps,s=typeof i=="function"?i(r):i;return{...e,...s,...rb(n)}}function Ao({classNames:t,styles:e,props:n,stylesCtx:r}){const i=Ni();return{resolvedClassNames:t===void 0?void 0:lv({theme:i,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:e===void 0?void 0:rA({theme:i,styles:e,props:n,stylesCtx:r||void 0})}}const jK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function CK({theme:t,options:e,unstyled:n}){return Pr((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||jK[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function _K({selector:t,stylesCtx:e,options:n,props:r,theme:i}){return lv({theme:i,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function TK({selector:t,stylesCtx:e,theme:n,classNames:r,props:i}){return lv({theme:n,classNames:r,props:i,stylesCtx:e})[t]}function kK({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function OK({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function EK({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(i=>`${e}-${i}-${n}`)}function MK({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function RK({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:s,resolvedThemeClassNames:o,classes:l,unstyled:u,className:h,rootSelector:f,props:p,stylesCtx:m,withStaticClasses:v,headless:y,transformedStyles:x}){return Pr(CK({theme:t,options:e,unstyled:u||y}),o.map(w=>w[r]),MK({options:e,classes:l,selector:r,unstyled:u||y}),s[r],TK({selector:r,stylesCtx:m,theme:t,classNames:x,props:p}),_K({selector:r,stylesCtx:m,options:e,props:p,theme:t}),kK({rootSelector:f,selector:r,className:h}),OK({selector:r,classes:l,unstyled:u||y}),v&&!y&&EK({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function yO({style:t,theme:e}){return Array.isArray(t)?t.reduce((n,r)=>({...n,...yO({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function DK({theme:t,selector:e,options:n,props:r,stylesCtx:i,rootSelector:s,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:u,resolvedVars:h,resolvedRootStyle:f}){return{...u[e],...l[e],...!o&&rA({theme:t,styles:n==null?void 0:n.styles,props:(n==null?void 0:n.props)||r,stylesCtx:i})[e],...h[e],...s===e?f:null,...yO({style:n==null?void 0:n.style,theme:t})}}function NK(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...rb(n[r])}}),e),{})}function IK({props:t,stylesCtx:e,themeName:n,theme:r}){var o;const i=(o=hK())==null?void 0:o();return{getTransformedStyles:l=>i?[...l.map(u=>i(u,{props:t,theme:r,ctx:e})),...n.map(u=>{var h;return i((h=r.components[u])==null?void 0:h.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!i}}function ft({name:t,classes:e,props:n,stylesCtx:r,className:i,style:s,rootSelector:o="root",unstyled:l,classNames:u,styles:h,vars:f,varsResolver:p,attributes:m}){var B;const v=Ni(),y=oK(),x=lK(),w=cK(),A=(Array.isArray(t)?t:[t]).filter(D=>D),{withStylesTransform:S,getTransformedStyles:C}=IK({props:n,stylesCtx:r,themeName:A,theme:v}),j=lv({theme:v,classNames:u,props:n,stylesCtx:r}),_=A.map(D=>{var L;return lv({theme:v,classNames:(L=v.components[D])==null?void 0:L.classNames,props:n,stylesCtx:r})}),O=S?{}:rA({theme:v,styles:h,props:n,stylesCtx:r}),M={};if(!S)for(const D of A){const L=rA({theme:v,styles:(B=v.components[D])==null?void 0:B.styles,props:n,stylesCtx:r});for(const U of Object.keys(L))M[U]={...M[U],...L[U]}}const R=NK([w?{}:p==null?void 0:p(v,n,r),...A.map(D=>{var L,U,H;return(H=(U=(L=v.components)==null?void 0:L[D])==null?void 0:U.vars)==null?void 0:H.call(U,v,n,r)}),f==null?void 0:f(v,n,r)]),N=yO({style:s,theme:v});return(D,L)=>({...m==null?void 0:m[D],className:RK({theme:v,options:L,themeName:A,selector:D,classNamesPrefix:y,resolvedClassNames:j,resolvedThemeClassNames:_,classes:e,unstyled:l,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:x,headless:w,transformedStyles:C([L==null?void 0:L.styles,h])}),style:DK({theme:v,selector:D,options:L,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:S,resolvedStyles:O,resolvedThemeStyles:M,resolvedVars:R,resolvedRootStyle:N})})}function Vg(t){return ni(t).reduce((e,n)=>t[n]!==void 0?`${e}${cX(n)}:${t[n]};`:e,"").trim()}function BK({selector:t,styles:e,media:n,container:r}){const i=e?Vg(e):"",s=Array.isArray(n)?n.map(l=>`@media${l.query}{${t}{${Vg(l.styles)}}}`):[],o=Array.isArray(r)?r.map(l=>`@container ${l.query}{${t}{${Vg(l.styles)}}}`):[];return`${i?`${t}{${i}}`:""}${s.join("")}${o.join("")}`.trim()}function LK(t){let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n)&4294967295;return(e>>>0).toString(36)}function Aw({deduplicate:t,...e}){const n=yw(),r=BK(e);return t?a.jsx("style",{href:`mantine-${LK(r)}`,precedence:"mantine",nonce:n==null?void 0:n(),children:r}):a.jsx("style",{"data-mantine-styles":"inline",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:r}})}function PK(t){let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n)&4294967295;return(e>>>0).toString(36)}function FK(t,e){return`__mdi__-${PK(`${t?Vg(t):""}|${Array.isArray(e)?e.map(n=>`${n.query}:${Vg(n.styles)}`).join("|"):""}`)}`}function lb(t){const{m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:l,me:u,ms:h,mis:f,mie:p,p:m,px:v,py:y,pt:x,pb:w,pl:A,pr:S,pe:C,ps:j,pis:_,pie:O,bd:M,bdrs:R,bg:N,c:B,opacity:D,ff:L,fz:U,fw:H,lts:z,ta:I,lh:F,fs:$,tt:G,td:Y,w:W,miw:V,maw:X,h:ee,mih:le,mah:ve,bgsz:me,bgp:Qe,bgr:We,bga:qe,pos:ae,top:de,left:Ae,bottom:Te,right:Ge,inset:rt,display:Ue,flex:Be,hiddenFrom:Ee,visibleFrom:Ke,lightHidden:Dt,darkHidden:Je,sx:it,...Xe}=t;return{styleProps:rb({m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:l,me:u,ms:h,mis:f,mie:p,p:m,px:v,py:y,pt:x,pb:w,pl:A,pr:S,pis:_,pie:O,pe:C,ps:j,bd:M,bg:N,c:B,opacity:D,ff:L,fz:U,fw:H,lts:z,ta:I,lh:F,fs:$,tt:G,td:Y,w:W,miw:V,maw:X,h:ee,mih:le,mah:ve,bgsz:me,bgp:Qe,bgr:We,bga:qe,pos:ae,top:de,left:Ae,bottom:Te,right:Ge,inset:rt,display:Ue,flex:Be,bdrs:R,hiddenFrom:Ee,visibleFrom:Ke,lightHidden:Dt,darkHidden:Je,sx:it}),rest:Xe}}const zK={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function xO(t,e){const n=hu({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function HK(t,e){const n=hu({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:xO(t,e)}function qK(t,e){if(typeof t=="number")return fe(t);if(typeof t=="string"){const[n,r,...i]=t.split(" ").filter(o=>o.trim()!=="");let s=`${fe(n)}`;return r&&(s+=` ${r}`),i.length>0&&(s+=` ${xO(i.join(" "),e)}`),s.trim()}return t}const JD={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function $K(t){return typeof t=="string"&&t in JD?JD[t]:t}const QK=["h1","h2","h3","h4","h5","h6"];function UK(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&QK.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?fe(t):t}function WK(t){return t}const VK=["h1","h2","h3","h4","h5","h6"];function YK(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&VK.includes(t)?`var(--mantine-${t}-line-height)`:t}function GK(t,e){return typeof t=="string"&&t in e.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?fe(t):t}function XK(t){return typeof t=="number"?fe(t):t}function KK(t,e){if(typeof t=="number")return fe(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return fe(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const kC={color:xO,textColor:HK,fontSize:UK,spacing:KK,radius:GK,identity:WK,size:XK,lineHeight:YK,fontFamily:$K,border:qK};function e8(t){return t.replace("(min-width: ","").replace("em)","")}function ZK({media:t,...e}){const n=Object.keys(t).sort((r,i)=>Number(e8(r))-Number(e8(i))).map(r=>({query:r,styles:t[r]}));return{...e,media:n}}function JK(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function eZ(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function tZ(t){return typeof t=="object"&&t!==null?ni(t).filter(e=>e!=="base"):[]}function nZ(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function rZ({styleProps:t,data:e,theme:n}){return ZK(ni(t).reduce((r,i)=>{if(i==="hiddenFrom"||i==="visibleFrom"||i==="sx")return r;const s=e[i],o=Array.isArray(s.property)?s.property:[s.property],l=eZ(t[i]);if(!JK(t[i]))return o.forEach(h=>{r.inlineStyles[h]=kC[s.type](l,n)}),r;r.hasResponsiveStyles=!0;const u=tZ(t[i]);return o.forEach(h=>{l!=null&&(r.styles[h]=kC[s.type](l,n)),u.forEach(f=>{const p=`(min-width: ${n.breakpoints[f]})`;r.media[p]={...r.media[p],[h]:kC[s.type](nZ(t[i],f),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function wP(){return`__m__-${E.useId().replace(/[:«»]/g,"")}`}function AO(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...AO(r,e)}),{}):typeof t=="function"?t(e):t??{}}function iZ(t){return t}const SP=iZ;function jP(t){return t}function Ie(t){const e=t;return e.extend=jP,e.withProps=n=>{const r=i=>a.jsx(e,{...n,...i});return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function Xm(t){return Ie(t)}function Zi(t){const e=t;return e.withProps=n=>{const r=i=>a.jsx(e,{...n,...i});return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=jP,e}function CP(t){return`data-${(t.startsWith("data-")?t.slice(5):t).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function sZ(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[CP(n)]=t[n]),e},{})}function _P(t){return t?typeof t=="string"?{[CP(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,..._P(n)}),{}):sZ(t):null}function $3(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...$3(r,e)}),{}):typeof t=="function"?t(e):t??{}}function aZ({theme:t,style:e,vars:n,styleProps:r}){const i=$3(e,t),s=$3(n,t);return{...i,...s,...r}}function TP({component:t,style:e,__vars:n,className:r,variant:i,mod:s,size:o,hiddenFrom:l,visibleFrom:u,lightHidden:h,darkHidden:f,renderRoot:p,__size:m,ref:v,...y}){var N,B;const x=Ni(),w=t||"div",{styleProps:A,rest:S}=lb(y),C=(B=(N=uK())==null?void 0:N())==null?void 0:B(A.sx),j=wP(),_=rZ({styleProps:A,theme:x,data:zK}),O=dK(),M=O&&_.hasResponsiveStyles?FK(_.styles,_.media):j,R={ref:v,style:aZ({theme:x,style:e,vars:n,styleProps:_.inlineStyles}),className:Pr(r,C,{[M]:_.hasResponsiveStyles,"mantine-light-hidden":h,"mantine-dark-hidden":f,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${u}`]:u}),"data-variant":i,"data-size":iP(o)?void 0:o||void 0,size:m,..._P(s),...S};return a.jsxs(a.Fragment,{children:[_.hasResponsiveStyles&&a.jsx(Aw,{selector:`.${M}`,styles:_.styles,media:_.media,deduplicate:O}),typeof p=="function"?p(R):a.jsx(w,{...R})]})}TP.displayName="@mantine/core/Box";const be=SP(TP),oZ=E.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Df(){return E.use(oZ)}const lZ={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0,orientation:"vertical"},ww=Ie(t=>{const{children:e,expanded:n,transitionDuration:r,transitionTimingFunction:i,style:s,onTransitionEnd:o,onTransitionStart:l,animateOpacity:u,keepMounted:h,ref:f,orientation:p,...m}=je("Collapse",lZ,t),v=Gm(),y=Ni(),x=ab(),w=y.respectReducedMotion&&x?0:r,A=(p==="horizontal"?VX:UX)({expanded:n,transitionDuration:w,transitionTimingFunction:i,onTransitionEnd:o,onTransitionStart:l,keepMounted:!1});if(w===0)return h===!0&&v!=="test"?a.jsx(E.Activity,{mode:n?"visible":"hidden",children:a.jsx(be,{...m,children:e})}):n?a.jsx(be,{...m,children:e}):null;const S=A.state==="exited";let C;return h===!1?C=S?null:e:h===!0?C=a.jsx(E.Activity,{mode:S?"hidden":"visible",children:e}):C=e,a.jsx(be,{...m,...A.getCollapseProps({style:{opacity:n||!u?1:0,transition:u?`opacity ${w}ms ${i}`:"none",...AO(s,y)},ref:f}),children:C})});ww.displayName="@mantine/core/Collapse";const[cZ,wo]=Ki("ScrollArea.Root component was not found in tree");function Bh(t,e){const n=E.useEffectEvent(e);Jh(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t])}function uZ(t){const{style:e,...n}=t,r=wo(),[i,s]=E.useState(0),[o,l]=E.useState(0),u=!!(i&&o);return Bh(r.scrollbarX,()=>{var f;const h=((f=r.scrollbarX)==null?void 0:f.offsetHeight)||0;r.onCornerHeightChange(h),l(h)}),Bh(r.scrollbarY,()=>{var f;const h=((f=r.scrollbarY)==null?void 0:f.offsetWidth)||0;r.onCornerWidthChange(h),s(h)}),u?a.jsx("div",{...n,style:{...e,width:i,height:o}}):null}function hZ(t){const e=wo(),n=!!(e.scrollbarX&&e.scrollbarY);return e.type!=="scroll"&&n?a.jsx(uZ,{...t}):null}const dZ={scrollHideDelay:1e3,type:"hover"};function kP(t){const{type:e,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:s,...o}=je("ScrollAreaRoot",dZ,t),[l,u]=E.useState(null),[h,f]=E.useState(null),[p,m]=E.useState(null),[v,y]=E.useState(null),[x,w]=E.useState(null),[A,S]=E.useState(0),[C,j]=E.useState(0),[_,O]=E.useState(!1),[M,R]=E.useState(!1),N=qn(s,B=>u(B));return a.jsx(cZ,{value:{type:e,scrollHideDelay:n,scrollArea:l,viewport:h,onViewportChange:f,content:p,onContentChange:m,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:_,onScrollbarXEnabledChange:O,scrollbarY:x,onScrollbarYChange:w,scrollbarYEnabled:M,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:j,getStyles:i},children:a.jsx(be,{...o,ref:N,__vars:{"--sa-corner-width":r!=="xy"?"0px":`${A}px`,"--sa-corner-height":r!=="xy"?"0px":`${C}px`}})})}kP.displayName="@mantine/core/ScrollAreaRoot";function OP(t,e){const n=t/e;return Number.isNaN(n)?0:n}function Sw(t){const e=OP(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function EP(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function fZ(t,[e,n]){return Math.min(n,Math.max(e,t))}function t8(t,e,n="ltr"){const r=Sw(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,l=s-r,u=fZ(t,n==="ltr"?[0,o]:[o*-1,0]);return EP([0,o],[0,l])(u)}function pZ(t,e,n,r="ltr"){const i=Sw(n),s=i/2,o=e||s,l=i-o,u=n.scrollbar.paddingStart+o,h=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return EP([u,h],p)(t)}function MP(t,e){return t>0&&t<e}function Sh(t){return t?parseInt(t,10):0}function ff(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t==null||t(r),(n===!1||!r.defaultPrevented)&&(e==null||e(r))}}const[mZ,RP]=Ki("ScrollAreaScrollbar was not found in tree");function DP(t){const{sizes:e,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:u,onResize:h,ref:f,...p}=t,m=wo(),[v,y]=E.useState(null),x=qn(f,R=>y(R)),w=E.useRef(null),A=E.useRef(""),{viewport:S}=m,C=e.content-e.viewport,j=E.useEffectEvent(u),_=Np(o),O=gw(h,10),M=R=>{w.current&&l({x:R.clientX-w.current.left,y:R.clientY-w.current.top})};return E.useEffect(()=>{const R=N=>{const B=N.target;v!=null&&v.contains(B)&&j(N,C)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[S,v,C]),E.useEffect(_,[e,_]),Bh(v,O),Bh(m.content,O),a.jsx(mZ,{value:{scrollbar:v,hasThumb:n,onThumbChange:Np(r),onThumbPointerUp:Np(i),onThumbPositionChange:_,onThumbPointerDown:Np(s)},children:a.jsx("div",{...p,ref:x,"data-mantine-scrollbar":!0,style:{position:"absolute",...p.style},onPointerDown:ff(t.onPointerDown,R=>{R.preventDefault(),R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=v.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(R))}),onPointerMove:ff(t.onPointerMove,M),onPointerUp:ff(t.onPointerUp,R=>{const N=R.target;N.hasPointerCapture(R.pointerId)&&(R.preventDefault(),N.releasePointerCapture(R.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=A.current,w.current=null}})})}const NP=t=>{const{sizes:e,onSizesChange:n,style:r,ref:i,...s}=t,o=wo(),[l,u]=E.useState(),h=E.useRef(null),f=qn(i,h,o.onScrollbarXChange);return E.useEffect(()=>{h.current&&u(getComputedStyle(h.current))},[h]),a.jsx(DP,{"data-orientation":"horizontal",...s,ref:f,sizes:e,style:{...r,"--sa-thumb-width":`${Sw(e)}px`},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollLeft+p.deltaX;t.onWheelScroll(v),MP(v,m)&&p.preventDefault()}},onResize:()=>{h.current&&o.viewport&&l&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Sh(l.paddingLeft),paddingEnd:Sh(l.paddingRight)}})}})};NP.displayName="@mantine/core/ScrollAreaScrollbarX";function IP(t){const{sizes:e,onSizesChange:n,style:r,ref:i,...s}=t,o=wo(),[l,u]=E.useState(),h=E.useRef(null),f=qn(i,h,o.onScrollbarYChange);return E.useEffect(()=>{h.current&&u(window.getComputedStyle(h.current))},[]),a.jsx(DP,{...s,"data-orientation":"vertical",ref:f,sizes:e,style:{"--sa-thumb-height":`${Sw(e)}px`,...r},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const v=o.viewport.scrollTop+p.deltaY;t.onWheelScroll(v),MP(v,m)&&p.preventDefault()}},onResize:()=>{h.current&&o.viewport&&l&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Sh(l.paddingTop),paddingEnd:Sh(l.paddingBottom)}})}})}IP.displayName="@mantine/core/ScrollAreaScrollbarY";function jw(t){const{orientation:e="vertical",...n}=t,{dir:r}=Df(),i=wo(),s=E.useRef(null),o=E.useRef(0),[l,u]=E.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=OP(l.viewport,l.content),f={...n,sizes:l,onSizesChange:u,hasThumb:h>0&&h<1,onThumbChange:m=>{s.current=m},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:m=>{o.current=m}},p=(m,v)=>pZ(m,o.current,l,v);return e==="horizontal"?a.jsx(NP,{...f,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollLeft,v=t8(m,l,r);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=p(m,r))}}):e==="vertical"?a.jsx(IP,{...f,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollTop,v=t8(m,l);l.scrollbar.size===0?s.current.style.setProperty("--thumb-opacity","0"):s.current.style.setProperty("--thumb-opacity","1"),s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=p(m))}}):null}jw.displayName="@mantine/core/ScrollAreaScrollbarVisible";function wO(t){const e=wo(),{forceMount:n,...r}=t,[i,s]=E.useState(!1),o=t.orientation==="horizontal",l=gw(()=>{if(e.viewport){const u=e.viewport.offsetWidth<e.viewport.scrollWidth,h=e.viewport.offsetHeight<e.viewport.scrollHeight;s(o?u:h)}},10);return Bh(e.viewport,l),Bh(e.content,l),n||i?a.jsx(jw,{"data-state":i?"visible":"hidden",...r}):null}wO.displayName="@mantine/core/ScrollAreaScrollbarAuto";function BP(t){const{forceMount:e,...n}=t,r=wo(),[i,s]=E.useState(!1);return E.useEffect(()=>{const{scrollArea:o}=r;let l=0;if(o){const u=()=>{window.clearTimeout(l),s(!0)},h=()=>{l=window.setTimeout(()=>s(!1),r.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",h),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",h)}}},[r.scrollArea,r.scrollHideDelay]),e||i?a.jsx(wO,{"data-state":i?"visible":"hidden",...n}):null}BP.displayName="@mantine/core/ScrollAreaScrollbarHover";function gZ(t){const{forceMount:e,...n}=t,r=wo(),i=t.orientation==="horizontal",[s,o]=E.useState("hidden"),l=gw(()=>o("idle"),100);return E.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>o("hidden"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,r.scrollHideDelay]),E.useEffect(()=>{const{viewport:u}=r,h=i?"scrollLeft":"scrollTop";if(u){let f=u[h];const p=()=>{const m=u[h];f!==m&&(o("scrolling"),l()),f=m};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[r.viewport,i,l]),e||s!=="hidden"?a.jsx(jw,{"data-state":s==="hidden"?"hidden":"visible",...n,onPointerEnter:ff(t.onPointerEnter,()=>o("interacting")),onPointerLeave:ff(t.onPointerLeave,()=>o("idle"))}):null}function Q3(t){const{forceMount:e,...n}=t,r=wo(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=r,o=t.orientation==="horizontal";return E.useEffect(()=>(o?i(!0):s(!0),()=>{o?i(!1):s(!1)}),[o,i,s]),r.type==="hover"?a.jsx(BP,{...n,forceMount:e}):r.type==="scroll"?a.jsx(gZ,{...n,forceMount:e}):r.type==="auto"?a.jsx(wO,{...n,forceMount:e}):r.type==="always"?a.jsx(jw,{...n}):null}Q3.displayName="@mantine/core/ScrollAreaScrollbar";function vZ(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,l=n.top!==s.top;(o||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}function LP(t){const{style:e,ref:n,...r}=t,i=wo(),s=RP(),{onThumbPositionChange:o}=s,l=qn(n,f=>s.onThumbChange(f)),u=E.useRef(void 0),h=gw(()=>{u.current&&(u.current(),u.current=void 0)},100);return E.useEffect(()=>{const{viewport:f}=i;if(f){const p=()=>{h(),u.current||(u.current=vZ(f,o),o())};return o(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,h,o]),a.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...e},onPointerDownCapture:ff(t.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;s.onThumbPointerDown({x:m,y:v})}),onPointerUp:ff(t.onPointerUp,s.onThumbPointerUp)})}LP.displayName="@mantine/core/ScrollAreaThumb";function U3(t){const{forceMount:e,...n}=t,r=RP();return e||r.hasThumb?a.jsx(LP,{...n}):null}U3.displayName="@mantine/core/ScrollAreaThumb";function PP({children:t,style:e,ref:n,onWheel:r,...i}){const s=wo(),o=qn(n,s.onViewportChange),l=u=>{if(r==null||r(u),s.scrollbarXEnabled&&s.viewport&&u.shiftKey){const{scrollTop:h,scrollHeight:f,clientHeight:p,scrollWidth:m,clientWidth:v}=s.viewport,y=h<1,x=h>=f-p-1;m>v&&(y||x)&&u.stopPropagation()}};return a.jsx(be,{...i,ref:o,onWheel:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e},children:a.jsx("div",{...s.getStyles("content"),ref:s.onContentChange,children:t})})}PP.displayName="@mantine/core/ScrollAreaViewport";var SO={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function Cw(){return typeof window<"u"}function Km(t){return FP(t)?(t.nodeName||"").toLowerCase():"#document"}function pa(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rc(t){var e;return(e=(FP(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function FP(t){return Cw()?t instanceof Node||t instanceof pa(t).Node:!1}function Tr(t){return Cw()?t instanceof Element||t instanceof pa(t).Element:!1}function So(t){return Cw()?t instanceof HTMLElement||t instanceof pa(t).HTMLElement:!1}function W3(t){return!Cw()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pa(t).ShadowRoot}function cb(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=bo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&i!=="inline"&&i!=="contents"}function bZ(t){return/^(table|td|th)$/.test(Km(t))}function _w(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const yZ=/transform|translate|scale|rotate|perspective|filter/,xZ=/paint|layout|strict|content/,Md=t=>!!t&&t!=="none";let OC;function jO(t){const e=Tr(t)?bo(t):t;return Md(e.transform)||Md(e.translate)||Md(e.scale)||Md(e.rotate)||Md(e.perspective)||!Tw()&&(Md(e.backdropFilter)||Md(e.filter))||yZ.test(e.willChange||"")||xZ.test(e.contain||"")}function AZ(t){let e=iu(t);for(;So(e)&&!Zc(e);){if(jO(e))return e;if(_w(e))return null;e=iu(e)}return null}function Tw(){return OC==null&&(OC=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),OC}function Zc(t){return/^(html|body|#document)$/.test(Km(t))}function bo(t){return pa(t).getComputedStyle(t)}function kw(t){return Tr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function iu(t){if(Km(t)==="html")return t;const e=t.assignedSlot||t.parentNode||W3(t)&&t.host||rc(t);return W3(e)?e.host:e}function zP(t){const e=iu(t);return Zc(e)?t.ownerDocument?t.ownerDocument.body:t.body:So(e)&&cb(e)?e:zP(e)}function Jc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=zP(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=pa(i);if(s){const l=V3(o);return e.concat(o,o.visualViewport||[],cb(i)?i:[],l&&n?Jc(l):[])}else return e.concat(i,Jc(i,[],n))}function V3(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const wZ=["top","right","bottom","left"],cl=Math.min,Es=Math.max,iA=Math.round,m1=Math.floor,Xl=t=>({x:t,y:t}),SZ={left:"right",right:"left",bottom:"top",top:"bottom"};function Y3(t,e,n){return Es(t,cl(e,n))}function ec(t,e){return typeof t=="function"?t(e):t}function ul(t){return t.split("-")[0]}function Zm(t){return t.split("-")[1]}function CO(t){return t==="x"?"y":"x"}function _O(t){return t==="y"?"height":"width"}function tl(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function TO(t){return CO(tl(t))}function jZ(t,e,n){n===void 0&&(n=!1);const r=Zm(t),i=TO(t),s=_O(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=sA(o)),[o,sA(o)]}function CZ(t){const e=sA(t);return[G3(t),e,G3(e)]}function G3(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const n8=["left","right"],r8=["right","left"],_Z=["top","bottom"],TZ=["bottom","top"];function kZ(t,e,n){switch(t){case"top":case"bottom":return n?e?r8:n8:e?n8:r8;case"left":case"right":return e?_Z:TZ;default:return[]}}function OZ(t,e,n,r){const i=Zm(t);let s=kZ(ul(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(G3)))),s}function sA(t){const e=ul(t);return SZ[e]+t.slice(e.length)}function EZ(t){return{top:0,right:0,bottom:0,left:0,...t}}function kO(t){return typeof t!="number"?EZ(t):{top:t,right:t,bottom:t,left:t}}function _m(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function MZ(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function RZ(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function DZ(){return/apple/i.test(navigator.vendor)}function NZ(){return MZ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function IZ(){return RZ().includes("jsdom/")}const i8="data-floating-ui-focusable",BZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function s8(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function uv(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&W3(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function Cp(t){return"composedPath"in t?t.composedPath()[0]:t.target}function EC(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function LZ(t){return t.matches("html,body")}function Wd(t){return(t==null?void 0:t.ownerDocument)||document}function PZ(t){return So(t)&&t.matches(BZ)}function FZ(t){if(!t||IZ())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function zZ(t){return t?t.hasAttribute(i8)?t:t.querySelector("["+i8+"]")||t:null}function px(t,e,n){return n===void 0&&(n=!0),t.filter(i=>{var s;return i.parentId===e&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,...px(t,i.id,n)])}function HZ(t){return"nativeEvent"in t}function X3(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}var qZ=typeof document<"u",$Z=function(){},Kl=qZ?E.useLayoutEffect:$Z;const QZ={...tP};function g1(t){const e=E.useRef(t);return Kl(()=>{e.current=t}),e}const UZ=QZ.useInsertionEffect,WZ=UZ||(t=>t());function Pl(t){const e=E.useRef(()=>{});return WZ(()=>{e.current=t}),E.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function a8(t,e,n){let{reference:r,floating:i}=t;const s=tl(e),o=TO(e),l=_O(o),u=ul(e),h=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let v;switch(u){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Zm(e)){case"start":v[o]-=m*(n&&h?-1:1);break;case"end":v[o]+=m*(n&&h?-1:1);break}return v}async function VZ(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=ec(e,t),y=kO(v),w=l[m?p==="floating"?"reference":"floating":p],A=_m(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:h,rootBoundary:f,strategy:u})),S=p==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),j=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},_=_m(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:C,strategy:u}):S);return{top:(A.top-_.top+y.top)/j.y,bottom:(_.bottom-A.bottom+y.bottom)/j.y,left:(A.left-_.left+y.left)/j.x,right:(_.right-A.right+y.right)/j.x}}const YZ=50,GZ=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:VZ},u=await(o.isRTL==null?void 0:o.isRTL(e));let h=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=a8(h,r,u),m=r,v=0;const y={};for(let x=0;x<s.length;x++){const w=s[x];if(!w)continue;const{name:A,fn:S}=w,{x:C,y:j,data:_,reset:O}=await S({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:y,rects:h,platform:l,elements:{reference:t,floating:e}});f=C??f,p=j??p,y[A]={...y[A],..._},O&&v<YZ&&(v++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(h=O.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:f,y:p}=a8(h,m,u)),x=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:y}},XZ=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:u}=e,{element:h,padding:f=0}=ec(t,e)||{};if(h==null)return{};const p=kO(f),m={x:n,y:r},v=TO(i),y=_O(v),x=await o.getDimensions(h),w=v==="y",A=w?"top":"left",S=w?"bottom":"right",C=w?"clientHeight":"clientWidth",j=s.reference[y]+s.reference[v]-m[v]-s.floating[y],_=m[v]-s.reference[v],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let M=O?O[C]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[C]||s.floating[y]);const R=j/2-_/2,N=M/2-x[y]/2-1,B=cl(p[A],N),D=cl(p[S],N),L=B,U=M-x[y]-D,H=M/2-x[y]/2+R,z=Y3(L,H,U),I=!u.arrow&&Zm(i)!=null&&H!==z&&s.reference[y]/2-(H<L?B:D)-x[y]/2<0,F=I?H<L?H-L:H-U:0;return{[v]:m[v]+F,data:{[v]:z,centerOffset:H-z-F,...I&&{alignmentOffset:F}},reset:I}}}),KZ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:u,elements:h}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...w}=ec(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const A=ul(i),S=tl(l),C=ul(l)===l,j=await(u.isRTL==null?void 0:u.isRTL(h.floating)),_=m||(C||!x?[sA(l)]:CZ(l)),O=y!=="none";!m&&O&&_.push(...OZ(l,x,y,j));const M=[l,..._],R=await u.detectOverflow(e,w),N=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&N.push(R[A]),p){const H=jZ(i,o,j);N.push(R[H[0]],R[H[1]])}if(B=[...B,{placement:i,overflows:N}],!N.every(H=>H<=0)){var D,L;const H=(((D=s.flip)==null?void 0:D.index)||0)+1,z=M[H];if(z&&(!(p==="alignment"?S!==tl(z):!1)||B.every($=>tl($.placement)===S?$.overflows[0]>0:!0)))return{data:{index:H,overflows:B},reset:{placement:z}};let I=(L=B.filter(F=>F.overflows[0]<=0).sort((F,$)=>F.overflows[1]-$.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(v){case"bestFit":{var U;const F=(U=B.filter($=>{if(O){const G=tl($.placement);return G===S||G==="y"}return!0}).map($=>[$.placement,$.overflows.filter(G=>G>0).reduce((G,Y)=>G+Y,0)]).sort(($,G)=>$[1]-G[1])[0])==null?void 0:U[0];F&&(I=F);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function o8(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function l8(t){return wZ.some(e=>t[e]>=0)}const ZZ=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=ec(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),l=o8(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:l8(l)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),l=o8(o,n.floating);return{data:{escapedOffsets:l,escaped:l8(l)}}}default:return{}}}}};function HP(t){const e=cl(...t.map(s=>s.left)),n=cl(...t.map(s=>s.top)),r=Es(...t.map(s=>s.right)),i=Es(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:i-n}}function JZ(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let r=null;for(let i=0;i<e.length;i++){const s=e[i];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(i=>_m(HP(i)))}const eJ=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:s,strategy:o}=e,{padding:l=2,x:u,y:h}=ec(t,e),f=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),p=JZ(f),m=_m(HP(f)),v=kO(l);function y(){if(p.length===2&&p[0].left>p[1].right&&u!=null&&h!=null)return p.find(w=>u>w.left-v.left&&u<w.right+v.right&&h>w.top-v.top&&h<w.bottom+v.bottom)||m;if(p.length>=2){if(tl(n)==="y"){const B=p[0],D=p[p.length-1],L=ul(n)==="top",U=B.top,H=D.bottom,z=L?B.left:D.left,I=L?B.right:D.right,F=I-z,$=H-U;return{top:U,bottom:H,left:z,right:I,width:F,height:$,x:z,y:U}}const w=ul(n)==="left",A=Es(...p.map(B=>B.right)),S=cl(...p.map(B=>B.left)),C=p.filter(B=>w?B.left===S:B.right===A),j=C[0].top,_=C[C.length-1].bottom,O=S,M=A,R=M-O,N=_-j;return{top:j,bottom:_,left:O,right:M,width:R,height:N,x:O,y:j}}return m}const x=await s.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:o});return i.reference.x!==x.reference.x||i.reference.y!==x.reference.y||i.reference.width!==x.reference.width||i.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},qP=new Set(["left","top"]);async function tJ(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ul(n),l=Zm(n),u=tl(n)==="y",h=qP.has(o)?-1:1,f=s&&u?-1:1,p=ec(e,t);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof y=="number"&&(v=l==="end"?y*-1:y),u?{x:v*f,y:m*h}:{x:m*h,y:v*f}}const nJ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:l}=e,u=await tJ(e,t);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:o}}}}},rJ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:S,y:C}=A;return{x:S,y:C}}},...h}=ec(t,e),f={x:n,y:r},p=await s.detectOverflow(e,h),m=tl(ul(i)),v=CO(m);let y=f[v],x=f[m];if(o){const A=v==="y"?"top":"left",S=v==="y"?"bottom":"right",C=y+p[A],j=y-p[S];y=Y3(C,y,j)}if(l){const A=m==="y"?"top":"left",S=m==="y"?"bottom":"right",C=x+p[A],j=x-p[S];x=Y3(C,x,j)}const w=u.fn({...e,[v]:y,[m]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[v]:o,[m]:l}}}}}},iJ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:h=!0}=ec(t,e),f={x:n,y:r},p=tl(i),m=CO(p);let v=f[m],y=f[p];const x=ec(l,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const C=m==="y"?"height":"width",j=s.reference[m]-s.floating[C]+w.mainAxis,_=s.reference[m]+s.reference[C]-w.mainAxis;v<j?v=j:v>_&&(v=_)}if(h){var A,S;const C=m==="y"?"width":"height",j=qP.has(ul(i)),_=s.reference[p]-s.floating[C]+(j&&((A=o.offset)==null?void 0:A[p])||0)+(j?0:w.crossAxis),O=s.reference[p]+s.reference[C]+(j?0:((S=o.offset)==null?void 0:S[p])||0)-(j?w.crossAxis:0);y<_?y=_:y>O&&(y=O)}return{[m]:v,[p]:y}}}},sJ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...h}=ec(t,e),f=await o.detectOverflow(e,h),p=ul(i),m=Zm(i),v=tl(i)==="y",{width:y,height:x}=s.floating;let w,A;p==="top"||p==="bottom"?(w=p,A=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(A=p,w=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,C=y-f.left-f.right,j=cl(x-f[w],S),_=cl(y-f[A],C),O=!e.middlewareData.shift;let M=j,R=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=C),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(M=S),O&&!m){const B=Es(f.left,0),D=Es(f.right,0),L=Es(f.top,0),U=Es(f.bottom,0);v?R=y-2*(B!==0||D!==0?B+D:Es(f.left,f.right)):M=x-2*(L!==0||U!==0?L+U:Es(f.top,f.bottom))}await u({...e,availableWidth:R,availableHeight:M});const N=await o.getDimensions(l.floating);return y!==N.width||x!==N.height?{reset:{rects:!0}}:{}}}};function $P(t){const e=bo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=So(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=iA(n)!==s||iA(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function OO(t){return Tr(t)?t:t.contextElement}function qp(t){const e=OO(t);if(!So(e))return Xl(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=$P(e);let o=(s?iA(n.width):n.width)/r,l=(s?iA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const aJ=Xl(0);function QP(t){const e=pa(t);return!Tw()||!e.visualViewport?aJ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function oJ(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==pa(t)?!1:e}function Af(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=OO(t);let o=Xl(1);e&&(r?Tr(r)&&(o=qp(r)):o=qp(t));const l=oJ(s,n,r)?QP(s):Xl(0);let u=(i.left+l.x)/o.x,h=(i.top+l.y)/o.y,f=i.width/o.x,p=i.height/o.y;if(s){const m=pa(s),v=r&&Tr(r)?pa(r):r;let y=m,x=V3(y);for(;x&&r&&v!==y;){const w=qp(x),A=x.getBoundingClientRect(),S=bo(x),C=A.left+(x.clientLeft+parseFloat(S.paddingLeft))*w.x,j=A.top+(x.clientTop+parseFloat(S.paddingTop))*w.y;u*=w.x,h*=w.y,f*=w.x,p*=w.y,u+=C,h+=j,y=pa(x),x=V3(y)}}return _m({width:f,height:p,x:u,y:h})}function Ow(t,e){const n=kw(t).scrollLeft;return e?e.left+n:Af(rc(t)).left+n}function UP(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Ow(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function lJ(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rc(r),l=e?_w(e.floating):!1;if(r===o||l&&s)return n;let u={scrollLeft:0,scrollTop:0},h=Xl(1);const f=Xl(0),p=So(r);if((p||!p&&!s)&&((Km(r)!=="body"||cb(o))&&(u=kw(r)),p)){const v=Af(r);h=qp(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=o&&!p&&!s?UP(o,u):Xl(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+f.x+m.x,y:n.y*h.y-u.scrollTop*h.y+f.y+m.y}}function cJ(t){return Array.from(t.getClientRects())}function uJ(t){const e=rc(t),n=kw(t),r=t.ownerDocument.body,i=Es(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Es(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ow(t);const l=-n.scrollTop;return bo(r).direction==="rtl"&&(o+=Es(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const c8=25;function hJ(t,e){const n=pa(t),r=rc(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;const f=Tw();(!f||f&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const h=Ow(r);if(h<=0){const f=r.ownerDocument,p=f.body,m=getComputedStyle(p),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-v);y<=c8&&(s-=y)}else h<=c8&&(s+=h);return{width:s,height:o,x:l,y:u}}function dJ(t,e){const n=Af(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=So(t)?qp(t):Xl(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,h=r*s.y;return{width:o,height:l,x:u,y:h}}function u8(t,e,n){let r;if(e==="viewport")r=hJ(t,n);else if(e==="document")r=uJ(rc(t));else if(Tr(e))r=dJ(e,n);else{const i=QP(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return _m(r)}function WP(t,e){const n=iu(t);return n===e||!Tr(n)||Zc(n)?!1:bo(n).position==="fixed"||WP(n,e)}function fJ(t,e){const n=e.get(t);if(n)return n;let r=Jc(t,[],!1).filter(l=>Tr(l)&&Km(l)!=="body"),i=null;const s=bo(t).position==="fixed";let o=s?iu(t):t;for(;Tr(o)&&!Zc(o);){const l=bo(o),u=jO(o);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||cb(o)&&!u&&WP(t,o))?r=r.filter(f=>f!==o):i=l,o=iu(o)}return e.set(t,r),r}function pJ(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?_w(e)?[]:fJ(e,this._c):[].concat(n),r],l=u8(e,o[0],i);let u=l.top,h=l.right,f=l.bottom,p=l.left;for(let m=1;m<o.length;m++){const v=u8(e,o[m],i);u=Es(v.top,u),h=cl(v.right,h),f=cl(v.bottom,f),p=Es(v.left,p)}return{width:h-p,height:f-u,x:p,y:u}}function mJ(t){const{width:e,height:n}=$P(t);return{width:e,height:n}}function gJ(t,e,n){const r=So(e),i=rc(e),s=n==="fixed",o=Af(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Xl(0);function h(){u.x=Ow(i)}if(r||!r&&!s)if((Km(e)!=="body"||cb(i))&&(l=kw(e)),r){const v=Af(e,!0,s,e);u.x=v.x+e.clientLeft,u.y=v.y+e.clientTop}else i&&h();s&&!r&&i&&h();const f=i&&!r&&!s?UP(i,l):Xl(0),p=o.left+l.scrollLeft-u.x-f.x,m=o.top+l.scrollTop-u.y-f.y;return{x:p,y:m,width:o.width,height:o.height}}function MC(t){return bo(t).position==="static"}function h8(t,e){if(!So(t)||bo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rc(t)===n&&(n=n.ownerDocument.body),n}function VP(t,e){const n=pa(t);if(_w(t))return n;if(!So(t)){let i=iu(t);for(;i&&!Zc(i);){if(Tr(i)&&!MC(i))return i;i=iu(i)}return n}let r=h8(t,e);for(;r&&bZ(r)&&MC(r);)r=h8(r,e);return r&&Zc(r)&&MC(r)&&!jO(r)?n:r||AZ(t)||n}const vJ=async function(t){const e=this.getOffsetParent||VP,n=this.getDimensions,r=await n(t.floating);return{reference:gJ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bJ(t){return bo(t).direction==="rtl"}const yJ={convertOffsetParentRelativeRectToViewportRelativeRect:lJ,getDocumentElement:rc,getClippingRect:pJ,getOffsetParent:VP,getElementRects:vJ,getClientRects:cJ,getDimensions:mJ,getScale:qp,isElement:Tr,isRTL:bJ};function YP(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xJ(t,e){let n=null,r;const i=rc(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const h=t.getBoundingClientRect(),{left:f,top:p,width:m,height:v}=h;if(l||e(),!m||!v)return;const y=m1(p),x=m1(i.clientWidth-(f+m)),w=m1(i.clientHeight-(p+v)),A=m1(f),C={rootMargin:-y+"px "+-x+"px "+-w+"px "+-A+"px",threshold:Es(0,cl(1,u))||1};let j=!0;function _(O){const M=O[0].intersectionRatio;if(M!==u){if(!j)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!YP(h,t.getBoundingClientRect())&&o(),j=!1}try{n=new IntersectionObserver(_,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,C)}n.observe(t)}return o(!0),s}function K3(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=OO(t),f=i||s?[...h?Jc(h):[],...e?Jc(e):[]]:[];f.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),s&&A.addEventListener("resize",n)});const p=h&&l?xJ(h,n):null;let m=-1,v=null;o&&(v=new ResizeObserver(A=>{let[S]=A;S&&S.target===h&&v&&e&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(e)})),n()}),h&&!u&&v.observe(h),e&&v.observe(e));let y,x=u?Af(t):null;u&&w();function w(){const A=Af(t);x&&!YP(x,A)&&n(),x=A,y=requestAnimationFrame(w)}return n(),()=>{var A;f.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),p==null||p(),(A=v)==null||A.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const GP=nJ,XP=rJ,KP=KZ,AJ=sJ,wJ=ZZ,d8=XZ,SJ=eJ,jJ=iJ,ZP=(t,e,n)=>{const r=new Map,i={platform:yJ,...n},s={...i.platform,_c:r};return GZ(t,e,{...i,platform:s})};var CJ=typeof document<"u",_J=function(){},mx=CJ?E.useLayoutEffect:_J;function aA(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!aA(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!aA(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function JP(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function f8(t,e){const n=JP(t);return Math.round(e*n)/n}function RC(t){const e=E.useRef(t);return mx(()=>{e.current=t}),e}function TJ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:u,open:h}=t,[f,p]=E.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=E.useState(r);aA(m,r)||v(r);const[y,x]=E.useState(null),[w,A]=E.useState(null),S=E.useCallback($=>{$!==O.current&&(O.current=$,x($))},[]),C=E.useCallback($=>{$!==M.current&&(M.current=$,A($))},[]),j=s||y,_=o||w,O=E.useRef(null),M=E.useRef(null),R=E.useRef(f),N=u!=null,B=RC(u),D=RC(i),L=RC(h),U=E.useCallback(()=>{if(!O.current||!M.current)return;const $={placement:e,strategy:n,middleware:m};D.current&&($.platform=D.current),ZP(O.current,M.current,$).then(G=>{const Y={...G,isPositioned:L.current!==!1};H.current&&!aA(R.current,Y)&&(R.current=Y,Kc.flushSync(()=>{p(Y)}))})},[m,e,n,D,L]);mx(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[h]);const H=E.useRef(!1);mx(()=>(H.current=!0,()=>{H.current=!1}),[]),mx(()=>{if(j&&(O.current=j),_&&(M.current=_),j&&_){if(B.current)return B.current(j,_,U);U()}},[j,_,U,B,N]);const z=E.useMemo(()=>({reference:O,floating:M,setReference:S,setFloating:C}),[S,C]),I=E.useMemo(()=>({reference:j,floating:_}),[j,_]),F=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const G=f8(I.floating,f.x),Y=f8(I.floating,f.y);return l?{...$,transform:"translate("+G+"px, "+Y+"px)",...JP(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:Y}},[n,l,I.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:U,refs:z,elements:I,floatingStyles:F}),[f,U,z,I,F])}const kJ=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?d8({element:r.current,padding:i}).fn(n):{}:r?d8({element:r,padding:i}).fn(n):{}}}},e7=(t,e)=>{const n=GP(t);return{name:n.name,fn:n.fn,options:[t,e]}},EO=(t,e)=>{const n=XP(t);return{name:n.name,fn:n.fn,options:[t,e]}},p8=(t,e)=>({fn:jJ(t).fn,options:[t,e]}),oA=(t,e)=>{const n=KP(t);return{name:n.name,fn:n.fn,options:[t,e]}},OJ=(t,e)=>{const n=AJ(t);return{name:n.name,fn:n.fn,options:[t,e]}},EJ=(t,e)=>{const n=wJ(t);return{name:n.name,fn:n.fn,options:[t,e]}},Yg=(t,e)=>{const n=SJ(t);return{name:n.name,fn:n.fn,options:[t,e]}},t7=(t,e)=>{const n=kJ(t);return{name:n.name,fn:n.fn,options:[t,e]}};function n7(t){const e=E.useRef(void 0),n=E.useCallback(r=>{const i=t.map(s=>{if(s!=null){if(typeof s=="function"){const o=s,l=o(r);return typeof l=="function"?l:()=>{o(null)}}return s.current=r,()=>{s.current=null}}});return()=>{i.forEach(s=>s==null?void 0:s())}},t);return E.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const MJ="data-floating-ui-focusable",m8="active",g8="selected",RJ={...tP};let v8=!1,DJ=0;const b8=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+DJ++;function NJ(){const[t,e]=E.useState(()=>v8?b8():void 0);return Kl(()=>{t==null&&e(b8())},[]),E.useEffect(()=>{v8=!0},[]),t}const IJ=RJ.useId,r7=IJ||NJ;function BJ(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const LJ=E.createContext(null),PJ=E.createContext(null),MO=()=>{var t;return((t=E.useContext(LJ))==null?void 0:t.id)||null},RO=()=>E.useContext(PJ);function DO(t){return"data-floating-ui-"+t}function so(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const y8=DO("safe-polygon");function gx(t,e,n){if(n&&!X3(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const r=t();return typeof r=="number"?r:r==null?void 0:r[e]}return t==null?void 0:t[e]}function DC(t){return typeof t=="function"?t():t}function FJ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,events:s,elements:o}=t,{enabled:l=!0,delay:u=0,handleClose:h=null,mouseOnly:f=!1,restMs:p=0,move:m=!0}=e,v=RO(),y=MO(),x=g1(h),w=g1(u),A=g1(n),S=g1(p),C=E.useRef(),j=E.useRef(-1),_=E.useRef(),O=E.useRef(-1),M=E.useRef(!0),R=E.useRef(!1),N=E.useRef(()=>{}),B=E.useRef(!1),D=Pl(()=>{var F;const $=(F=i.current.openEvent)==null?void 0:F.type;return($==null?void 0:$.includes("mouse"))&&$!=="mousedown"});E.useEffect(()=>{if(!l)return;function F($){let{open:G}=$;G||(so(j),so(O),M.current=!0,B.current=!1)}return s.on("openchange",F),()=>{s.off("openchange",F)}},[l,s]),E.useEffect(()=>{if(!l||!x.current||!n)return;function F(G){D()&&r(!1,G,"hover")}const $=Wd(o.floating).documentElement;return $.addEventListener("mouseleave",F),()=>{$.removeEventListener("mouseleave",F)}},[o.floating,n,r,l,x,D]);const L=E.useCallback(function(F,$,G){$===void 0&&($=!0),G===void 0&&(G="hover");const Y=gx(w.current,"close",C.current);Y&&!_.current?(so(j),j.current=window.setTimeout(()=>r(!1,F,G),Y)):$&&(so(j),r(!1,F,G))},[w,r]),U=Pl(()=>{N.current(),_.current=void 0}),H=Pl(()=>{if(R.current){const F=Wd(o.floating).body;F.style.pointerEvents="",F.removeAttribute(y8),R.current=!1}}),z=Pl(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);E.useEffect(()=>{if(!l)return;function F(V){if(so(j),M.current=!1,f&&!X3(C.current)||DC(S.current)>0&&!gx(w.current,"open"))return;const X=gx(w.current,"open",C.current);X?j.current=window.setTimeout(()=>{A.current||r(!0,V,"hover")},X):n||r(!0,V,"hover")}function $(V){if(z()){H();return}N.current();const X=Wd(o.floating);if(so(O),B.current=!1,x.current&&i.current.floatingContext){n||so(j),_.current=x.current({...i.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){H(),U(),z()||L(V,!0,"safe-polygon")}});const le=_.current;X.addEventListener("mousemove",le),N.current=()=>{X.removeEventListener("mousemove",le)};return}(C.current==="touch"?!uv(o.floating,V.relatedTarget):!0)&&L(V)}function G(V){z()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){H(),U(),z()||L(V)}})(V))}function Y(){so(j)}function W(V){z()||L(V,!1)}if(Tr(o.domReference)){const V=o.domReference,X=o.floating;return n&&V.addEventListener("mouseleave",G),m&&V.addEventListener("mousemove",F,{once:!0}),V.addEventListener("mouseenter",F),V.addEventListener("mouseleave",$),X&&(X.addEventListener("mouseleave",G),X.addEventListener("mouseenter",Y),X.addEventListener("mouseleave",W)),()=>{n&&V.removeEventListener("mouseleave",G),m&&V.removeEventListener("mousemove",F),V.removeEventListener("mouseenter",F),V.removeEventListener("mouseleave",$),X&&(X.removeEventListener("mouseleave",G),X.removeEventListener("mouseenter",Y),X.removeEventListener("mouseleave",W))}}},[o,l,t,f,m,L,U,H,r,n,A,v,w,x,i,z,S]),Kl(()=>{var F;if(l&&n&&(F=x.current)!=null&&(F=F.__options)!=null&&F.blockPointerEvents&&D()){R.current=!0;const G=o.floating;if(Tr(o.domReference)&&G){var $;const Y=Wd(o.floating).body;Y.setAttribute(y8,"");const W=o.domReference,V=v==null||($=v.nodesRef.current.find(X=>X.id===y))==null||($=$.context)==null?void 0:$.elements.floating;return V&&(V.style.pointerEvents=""),Y.style.pointerEvents="none",W.style.pointerEvents="auto",G.style.pointerEvents="auto",()=>{Y.style.pointerEvents="",W.style.pointerEvents="",G.style.pointerEvents=""}}}},[l,n,y,o,v,x,D]),Kl(()=>{n||(C.current=void 0,B.current=!1,U(),H())},[n,U,H]),E.useEffect(()=>()=>{U(),so(j),so(O),H()},[l,o.domReference,U,H]);const I=E.useMemo(()=>{function F($){C.current=$.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove($){const{nativeEvent:G}=$;function Y(){!M.current&&!A.current&&r(!0,G,"hover")}f&&!X3(C.current)||n||DC(S.current)===0||B.current&&$.movementX**2+$.movementY**2<2||(so(O),C.current==="touch"?Y():(B.current=!0,O.current=window.setTimeout(Y,DC(S.current))))}}},[f,r,n,A,S]);return E.useMemo(()=>l?{reference:I}:{},[l,I])}const Z3=()=>{},i7=E.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Z3,setState:Z3,isInstantPhase:!1}),zJ=()=>E.useContext(i7);function HJ(t){const{children:e,delay:n,timeoutMs:r=0}=t,[i,s]=E.useReducer((u,h)=>({...u,...h}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=E.useRef(null),l=E.useCallback(u=>{s({currentId:u})},[]);return Kl(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||s({isInstantPhase:!0}):(i.isInstantPhase&&s({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),a.jsx(i7.Provider,{value:E.useMemo(()=>({...i,setState:s,setCurrentId:l}),[i,l]),children:e})}function qJ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,floatingId:i}=t,{id:s,enabled:o=!0}=e,l=s??i,u=zJ(),{currentId:h,setCurrentId:f,initialDelay:p,setState:m,timeoutMs:v}=u;return Kl(()=>{o&&h&&(m({delay:{open:1,close:gx(p,"close")}}),h!==l&&r(!1))},[o,l,r,m,h,p]),Kl(()=>{function y(){r(!1),m({delay:p,currentId:null})}if(o&&h&&!n&&h===l){if(v){const x=window.setTimeout(y,v);return()=>{clearTimeout(x)}}y()}},[o,n,m,h,l,r,p,v]),Kl(()=>{o&&(f===Z3||!n||f(l))},[o,n,f,l]),u}const $J={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},QJ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},x8=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function UJ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:i,dataRef:s}=t,{enabled:o=!0,escapeKey:l=!0,outsidePress:u=!0,outsidePressEvent:h="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:y}=e,x=RO(),w=Pl(typeof u=="function"?u:()=>!1),A=typeof u=="function"?w:u,S=E.useRef(!1),{escapeKey:C,outsidePress:j}=x8(v),{escapeKey:_,outsidePress:O}=x8(y),M=E.useRef(!1),R=Pl(H=>{var z;if(!n||!o||!l||H.key!=="Escape"||M.current)return;const I=(z=s.current.floatingContext)==null?void 0:z.nodeId,F=x?px(x.nodesRef.current,I):[];if(!C&&(H.stopPropagation(),F.length>0)){let $=!0;if(F.forEach(G=>{var Y;if((Y=G.context)!=null&&Y.open&&!G.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}r(!1,HZ(H)?H.nativeEvent:H,"escape-key")}),N=Pl(H=>{var z;const I=()=>{var F;R(H),(F=Cp(H))==null||F.removeEventListener("keydown",I)};(z=Cp(H))==null||z.addEventListener("keydown",I)}),B=Pl(H=>{var z;const I=s.current.insideReactTree;s.current.insideReactTree=!1;const F=S.current;if(S.current=!1,h==="click"&&F||I||typeof A=="function"&&!A(H))return;const $=Cp(H),G="["+DO("inert")+"]",Y=Wd(i.floating).querySelectorAll(G);let W=Tr($)?$:null;for(;W&&!Zc(W);){const le=iu(W);if(Zc(le)||!Tr(le))break;W=le}if(Y.length&&Tr($)&&!LZ($)&&!uv($,i.floating)&&Array.from(Y).every(le=>!uv(W,le)))return;if(So($)&&U){const le=Zc($),ve=bo($),me=/auto|scroll/,Qe=le||me.test(ve.overflowX),We=le||me.test(ve.overflowY),qe=Qe&&$.clientWidth>0&&$.scrollWidth>$.clientWidth,ae=We&&$.clientHeight>0&&$.scrollHeight>$.clientHeight,de=ve.direction==="rtl",Ae=ae&&(de?H.offsetX<=$.offsetWidth-$.clientWidth:H.offsetX>$.clientWidth),Te=qe&&H.offsetY>$.clientHeight;if(Ae||Te)return}const V=(z=s.current.floatingContext)==null?void 0:z.nodeId,X=x&&px(x.nodesRef.current,V).some(le=>{var ve;return EC(H,(ve=le.context)==null?void 0:ve.elements.floating)});if(EC(H,i.floating)||EC(H,i.domReference)||X)return;const ee=x?px(x.nodesRef.current,V):[];if(ee.length>0){let le=!0;if(ee.forEach(ve=>{var me;if((me=ve.context)!=null&&me.open&&!ve.context.dataRef.current.__outsidePressBubbles){le=!1;return}}),!le)return}r(!1,H,"outside-press")}),D=Pl(H=>{var z;const I=()=>{var F;B(H),(F=Cp(H))==null||F.removeEventListener(h,I)};(z=Cp(H))==null||z.addEventListener(h,I)});E.useEffect(()=>{if(!n||!o)return;s.current.__escapeKeyBubbles=C,s.current.__outsidePressBubbles=j;let H=-1;function z(Y){r(!1,Y,"ancestor-scroll")}function I(){window.clearTimeout(H),M.current=!0}function F(){H=window.setTimeout(()=>{M.current=!1},Tw()?5:0)}const $=Wd(i.floating);l&&($.addEventListener("keydown",_?N:R,_),$.addEventListener("compositionstart",I),$.addEventListener("compositionend",F)),A&&$.addEventListener(h,O?D:B,O);let G=[];return m&&(Tr(i.domReference)&&(G=Jc(i.domReference)),Tr(i.floating)&&(G=G.concat(Jc(i.floating))),!Tr(i.reference)&&i.reference&&i.reference.contextElement&&(G=G.concat(Jc(i.reference.contextElement)))),G=G.filter(Y=>{var W;return Y!==((W=$.defaultView)==null?void 0:W.visualViewport)}),G.forEach(Y=>{Y.addEventListener("scroll",z,{passive:!0})}),()=>{l&&($.removeEventListener("keydown",_?N:R,_),$.removeEventListener("compositionstart",I),$.removeEventListener("compositionend",F)),A&&$.removeEventListener(h,O?D:B,O),G.forEach(Y=>{Y.removeEventListener("scroll",z)}),window.clearTimeout(H)}},[s,i,l,A,h,n,r,m,o,C,j,R,_,N,B,O,D]),E.useEffect(()=>{s.current.insideReactTree=!1},[s,A,h]);const L=E.useMemo(()=>({onKeyDown:R,...f&&{[$J[p]]:H=>{r(!1,H.nativeEvent,"reference-press")},...p!=="click"&&{onClick(H){r(!1,H.nativeEvent,"reference-press")}}}}),[R,r,f,p]),U=E.useMemo(()=>{function H(z){z.button===0&&(S.current=!0)}return{onKeyDown:R,onMouseDown:H,onMouseUp:H,[QJ[h]]:()=>{s.current.insideReactTree=!0}}},[R,h,s]);return E.useMemo(()=>o?{reference:L,floating:U}:{},[o,L,U])}function WJ(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=r7(),s=E.useRef({}),[o]=E.useState(()=>BJ()),l=MO()!=null,[u,h]=E.useState(r.reference),f=Pl((v,y,x)=>{s.current.openEvent=v?y:void 0,o.emit("openchange",{open:v,event:y,reason:x,nested:l}),n==null||n(v,y,x)}),p=E.useMemo(()=>({setPositionReference:h}),[]),m=E.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return E.useMemo(()=>({dataRef:s,open:e,onOpenChange:f,elements:m,events:o,floatingId:i,refs:p}),[e,f,m,o,i,p])}function NO(t){t===void 0&&(t={});const{nodeId:e}=t,n=WJ({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[s,o]=E.useState(null),[l,u]=E.useState(null),f=(i==null?void 0:i.domReference)||s,p=E.useRef(null),m=RO();Kl(()=>{f&&(p.current=f)},[f]);const v=TJ({...t,elements:{...i,...l&&{reference:l}}}),y=E.useCallback(C=>{const j=Tr(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;u(j),v.refs.setReference(j)},[v.refs]),x=E.useCallback(C=>{(Tr(C)||C===null)&&(p.current=C,o(C)),(Tr(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!Tr(C))&&v.refs.setReference(C)},[v.refs]),w=E.useMemo(()=>({...v.refs,setReference:x,setPositionReference:y,domReference:p}),[v.refs,x,y]),A=E.useMemo(()=>({...v.elements,domReference:f}),[v.elements,f]),S=E.useMemo(()=>({...v,...r,refs:w,elements:A,nodeId:e}),[v,w,A,e,r]);return Kl(()=>{r.dataRef.current.floatingContext=S;const C=m==null?void 0:m.nodesRef.current.find(j=>j.id===e);C&&(C.context=S)}),E.useMemo(()=>({...v,context:S,refs:w,elements:A}),[v,w,A,S])}function NC(){return NZ()&&DZ()}function VJ(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:i,dataRef:s,elements:o}=t,{enabled:l=!0,visibleOnly:u=!0}=e,h=E.useRef(!1),f=E.useRef(-1),p=E.useRef(!0);E.useEffect(()=>{if(!l)return;const v=pa(o.domReference);function y(){!n&&So(o.domReference)&&o.domReference===s8(Wd(o.domReference))&&(h.current=!0)}function x(){p.current=!0}function w(){p.current=!1}return v.addEventListener("blur",y),NC()&&(v.addEventListener("keydown",x,!0),v.addEventListener("pointerdown",w,!0)),()=>{v.removeEventListener("blur",y),NC()&&(v.removeEventListener("keydown",x,!0),v.removeEventListener("pointerdown",w,!0))}},[o.domReference,n,l]),E.useEffect(()=>{if(!l)return;function v(y){let{reason:x}=y;(x==="reference-press"||x==="escape-key")&&(h.current=!0)}return i.on("openchange",v),()=>{i.off("openchange",v)}},[i,l]),E.useEffect(()=>()=>{so(f)},[]);const m=E.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(v){if(h.current)return;const y=Cp(v.nativeEvent);if(u&&Tr(y)){if(NC()&&!v.relatedTarget){if(!p.current&&!PZ(y))return}else if(!FZ(y))return}r(!0,v.nativeEvent,"focus")},onBlur(v){h.current=!1;const y=v.relatedTarget,x=v.nativeEvent,w=Tr(y)&&y.hasAttribute(DO("focus-guard"))&&y.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var A;const S=s8(o.domReference?o.domReference.ownerDocument:document);!y&&S===o.domReference||uv((A=s.current.floatingContext)==null?void 0:A.refs.floating.current,S)||uv(o.domReference,S)||w||r(!1,x,"focus")})}}),[s,o.domReference,r,u]);return E.useMemo(()=>l?{reference:m}:{},[l,m])}function IC(t,e,n){const r=new Map,i=n==="item";let s=t;if(i&&t){const{[m8]:o,[g8]:l,...u}=t;s=u}return{...n==="floating"&&{tabIndex:-1,[MJ]:""},...s,...e.map(o=>{const l=o?o[n]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((o,l)=>(l&&Object.entries(l).forEach(u=>{let[h,f]=u;if(!(i&&[m8,g8].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof f=="function"){var p;(p=r.get(h))==null||p.push(f),o[h]=function(){for(var m,v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];return(m=r.get(h))==null?void 0:m.map(w=>w(...y)).find(w=>w!==void 0)}}}else o[h]=f}),o),{})}}function YJ(t){t===void 0&&(t=[]);const e=t.map(l=>l==null?void 0:l.reference),n=t.map(l=>l==null?void 0:l.floating),r=t.map(l=>l==null?void 0:l.item),i=E.useCallback(l=>IC(l,t,"reference"),e),s=E.useCallback(l=>IC(l,t,"floating"),n),o=E.useCallback(l=>IC(l,t,"item"),r);return E.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}const GJ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function XJ(t,e){var n,r;e===void 0&&(e={});const{open:i,elements:s,floatingId:o}=t,{enabled:l=!0,role:u="dialog"}=e,h=r7(),f=((n=s.domReference)==null?void 0:n.id)||h,p=E.useMemo(()=>{var S;return((S=zZ(s.floating))==null?void 0:S.id)||o},[s.floating,o]),m=(r=GJ.get(u))!=null?r:u,y=MO()!=null,x=E.useMemo(()=>m==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":i?p:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:f},...m==="menu"&&y&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[m,p,y,i,f,u]),w=E.useMemo(()=>{const S={id:p,...m&&{role:m}};return m==="tooltip"||u==="label"?S:{...S,...m==="menu"&&{"aria-labelledby":f}}},[m,p,f,u]),A=E.useCallback(S=>{let{active:C,selected:j}=S;const _={role:"option",...C&&{id:p+"-fui-option"}};switch(u){case"select":case"combobox":return{..._,"aria-selected":j}}return{}},[p,u]);return E.useMemo(()=>l?{reference:x,floating:w,item:A}:{},[l,x,w,A])}const s7={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},a7=(t,{scrollbarSize:e,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r==="x"?i=`${n} auto`:r==="y"&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":fe(e),"--scrollarea-over-scroll-behavior":i}}},ma=Ie(t=>{const e=je("ScrollArea",s7,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,scrollbarSize:l,vars:u,type:h,scrollHideDelay:f,viewportProps:p,viewportRef:m,onScrollPositionChange:v,children:y,offsetScrollbars:x,scrollbars:w,onBottomReached:A,onTopReached:S,onLeftReached:C,onRightReached:j,overscrollBehavior:_,startScrollPosition:O,attributes:M,...R}=e,[N,B]=E.useState(!1),[D,L]=E.useState(!1),[U,H]=E.useState(!1),z=E.useRef(!0),I=E.useRef(!1),F=E.useRef(!0),$=E.useRef(!1),G=ft({name:"ScrollArea",props:e,classes:SO,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:M,vars:u,varsResolver:a7}),Y=E.useRef(null),[W,V]=E.useState(null),X=n7([m,Y,E.useCallback(ee=>{V(le=>le===ee?le:ee)},[])]);return Bh(x==="present"?W:null,()=>{const ee=Y.current;ee&&(L(ee.scrollHeight>ee.clientHeight),H(ee.scrollWidth>ee.clientWidth))}),Jh(()=>{O&&Y.current&&Y.current.scrollTo({left:O.x??0,top:O.y??0})},[]),a.jsxs(kP,{getStyles:G,type:h==="never"?"always":h,scrollHideDelay:f,scrollbars:w,...G("root"),...R,children:[a.jsx(PP,{...p,...G("viewport",{style:p==null?void 0:p.style}),ref:X,"data-offset-scrollbars":x===!0?"xy":x||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":x==="present"&&!U?"true":void 0,"data-vertical-hidden":x==="present"&&!D?"true":void 0,onScroll:ee=>{var Ge;(Ge=p==null?void 0:p.onScroll)==null||Ge.call(p,ee),v==null||v({x:ee.currentTarget.scrollLeft,y:ee.currentTarget.scrollTop});const{scrollTop:le,scrollHeight:ve,clientHeight:me,scrollLeft:Qe,scrollWidth:We,clientWidth:qe}=ee.currentTarget,ae=le-(ve-me)>=-.8,de=le===0;ae&&!I.current&&(A==null||A()),de&&!z.current&&(S==null||S()),I.current=ae,z.current=de;const Ae=Qe-(We-qe)>=-.8,Te=Qe===0;Ae&&!$.current&&(j==null||j()),Te&&!F.current&&(C==null||C()),$.current=Ae,F.current=Te},children:y}),(w==="xy"||w==="x")&&a.jsx(Q3,{...G("scrollbar"),orientation:"horizontal","data-hidden":h==="never"||x==="present"&&!U?!0:void 0,forceMount:!0,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:a.jsx(U3,{...G("thumb")})}),(w==="xy"||w==="y")&&a.jsx(Q3,{...G("scrollbar"),orientation:"vertical","data-hidden":h==="never"||x==="present"&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:a.jsx(U3,{...G("thumb")})}),a.jsx(hZ,{...G("corner"),"data-hovered":N||void 0,"data-hidden":h==="never"||void 0})]})});ma.displayName="@mantine/core/ScrollArea";const IO=Ie(t=>{const{children:e,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:s,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:h,viewportRef:f,onScrollPositionChange:p,unstyled:m,variant:v,viewportProps:y,scrollbars:x,style:w,vars:A,onBottomReached:S,onTopReached:C,startScrollPosition:j,onOverflowChange:_,...O}=je("ScrollAreaAutosize",s7,t),M=E.useRef(null),[R,N]=E.useState(null),B=n7([f,M,E.useCallback(H=>{N(z=>z===H?z:H)},[])]),D=E.useRef(!1),L=E.useRef(!1),U=E.useEffectEvent(()=>{const H=M.current;if(!H||!_)return;const z=H.scrollHeight>H.clientHeight;z!==D.current&&(L.current?_(z):(L.current=!0,z&&_(!0)),D.current=z)});return Bh(_?R:null,U),a.jsx(be,{...O,variant:v,style:[{display:"flex",overflow:"hidden"},w],children:a.jsx(be,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...x==="y"&&{minWidth:0},...x==="x"&&{minHeight:0},...x==="xy"&&{minWidth:0,minHeight:0},...x===!1&&{minWidth:0,minHeight:0}},children:a.jsx(ma,{classNames:n,styles:r,scrollHideDelay:s,scrollbarSize:i,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:h,viewportRef:B,onScrollPositionChange:p,unstyled:m,variant:v,viewportProps:y,vars:A,scrollbars:x,onBottomReached:S,onTopReached:C,startScrollPosition:j,"data-autosize":"true",children:e})})})});ma.classes=SO;ma.varsResolver=a7;IO.displayName="@mantine/core/ScrollAreaAutosize";IO.classes=SO;ma.Autosize=IO;var o7={root:"m_87cf2631"};const KJ={__staticSelector:"UnstyledButton"},Br=Zi(t=>{const e=je("UnstyledButton",KJ,t),{className:n,component:r="button",__staticSelector:i,unstyled:s,classNames:o,styles:l,style:u,attributes:h,...f}=e;return a.jsx(be,{...ft({name:i,props:e,classes:o7,className:n,style:u,classNames:o,styles:l,unstyled:s,attributes:h})("root",{focusable:!0}),component:r,type:r==="button"?"button":void 0,...f})});Br.classes=o7;Br.displayName="@mantine/core/UnstyledButton";var l7={root:"m_515a97f8"};const BO=Ie(t=>{const e=je("VisuallyHidden",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,attributes:u,...h}=e;return a.jsx(be,{component:"span",...ft({name:"VisuallyHidden",classes:l7,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:u})("root"),...h})});BO.classes=l7;BO.displayName="@mantine/core/VisuallyHidden";var c7={root:"m_1b7284a3"};const u7=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:Zn(e),"--paper-shadow":fO(n)}}),ub=Zi(t=>{const e=je("Paper",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,withBorder:l,vars:u,radius:h,shadow:f,variant:p,mod:m,attributes:v,...y}=e,x=ft({name:"Paper",props:e,classes:c7,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,vars:u,varsResolver:u7});return a.jsx(be,{mod:[{"data-with-border":l},m],...x("root"),variant:p,...y})});ub.classes=c7;ub.varsResolver=u7;ub.displayName="@mantine/core/Paper";function A8(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function w8(t,e,n,r,i){return t==="center"||r==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:n}:t==="start"?{[i==="ltr"?"left":"right"]:n}:{}}const ZJ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function JJ({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:s,arrowY:o,dir:l}){const[u,h="center"]=t.split("-"),f={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[ZJ[u]]:r},p=-e/2;return u==="left"?{...f,...A8(h,o,n,i),right:p,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:u==="right"?{...f,...A8(h,o,n,i),left:p,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:u==="top"?{...f,...w8(h,s,n,i,l),bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:u==="bottom"?{...f,...w8(h,s,n,i,l),top:p,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function lA({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:s,arrowX:o,arrowY:l,style:u,...h}){const{dir:f}=Df();return s?a.jsx("div",{...h,style:{...u,...JJ({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:f,arrowX:o,arrowY:l})}}):null}lA.displayName="@mantine/core/FloatingArrow";function h7(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),i=n==="right"?"left":"right";return r===void 0?i:`${i}-${r}`}return e}function d7({open:t,close:e,openDelay:n,closeDelay:r}){const i=E.useRef(-1),s=E.useRef(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(s.current)},l=()=>{o(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)},u=()=>{o(),r===0||r===void 0?e():s.current=window.setTimeout(e,r)};return E.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:u}}var f7={root:"m_9814e45f"};const eee={zIndex:xo("modal")},p7=(t,{gradient:e,color:n,backgroundOpacity:r,blur:i,radius:s,zIndex:o})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&oh(n||"#000",r??.6)||void 0,"--overlay-filter":i?`blur(${fe(i)})`:void 0,"--overlay-radius":s===void 0?void 0:Zn(s),"--overlay-z-index":o==null?void 0:o.toString()}}),wf=Zi(t=>{const e=je("Overlay",eee,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,fixed:u,center:h,children:f,radius:p,zIndex:m,gradient:v,blur:y,color:x,backgroundOpacity:w,mod:A,attributes:S,...C}=e;return a.jsx(be,{...ft({name:"Overlay",props:e,classes:f7,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:S,vars:l,varsResolver:p7})("root"),mod:[{center:h,fixed:u},A],...C,children:f})});wf.classes=f7;wf.varsResolver=p7;wf.displayName="@mantine/core/Overlay";function BC(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function tee({target:t,reuseTargetNode:e,...n}){if(t)return typeof t=="string"?document.querySelector(t)||BC(n):t;if(e){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const i=BC(n);return i.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(i),i}return BC(n)}const nee={reuseTargetNode:!0},m7=Ie(t=>{const{children:e,target:n,reuseTargetNode:r,ref:i,...s}=je("Portal",nee,t),[o,l]=E.useState(!1),u=E.useRef(null);return Jh(()=>(l(!0),u.current=tee({target:n,reuseTargetNode:r,...s}),nA(i,u.current),!n&&!r&&u.current&&document.body.appendChild(u.current),()=>{!n&&!r&&u.current&&document.body.removeChild(u.current)}),[n]),!o||!u.current?null:Kc.createPortal(a.jsx(a.Fragment,{children:e}),u.current)});m7.displayName="@mantine/core/Portal";const Lh=Ie(({withinPortal:t=!0,children:e,...n})=>Gm()==="test"||!t?a.jsx(a.Fragment,{children:e}):a.jsx(m7,{...n,children:e}));Lh.displayName="@mantine/core/OptionalPortal";const hg=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),v1={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...hg("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...hg("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...hg("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...hg("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...hg("top"),common:{transformOrigin:"top right"}}},S8={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function j8({transition:t,state:e,duration:n,timingFunction:r}){const i={WebkitBackfaceVisibility:"hidden",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in v1?{transitionProperty:v1[t].transitionProperty,...i,...v1[t].common,...v1[t][S8[e]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[S8[e]]}}function ree({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:s,onEntered:o,onExited:l,enterDelay:u,exitDelay:h}){const f=Ni(),p=ab(),m=f.respectReducedMotion?p:!1,[v,y]=E.useState(m?0:t),[x,w]=E.useState(r?"entered":"exited"),A=E.useRef(-1),S=E.useRef(-1),C=E.useRef(-1);function j(){window.clearTimeout(A.current),window.clearTimeout(S.current),cancelAnimationFrame(C.current)}const _=M=>{j();const R=M?i:s,N=M?o:l,B=m?0:M?t:e;y(B),B===0?(typeof R=="function"&&R(),typeof N=="function"&&N(),w(M?"entered":"exited")):C.current=requestAnimationFrame(()=>{Og.flushSync(()=>{w(M?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof R=="function"&&R(),w(M?"entering":"exiting"),A.current=window.setTimeout(()=>{typeof N=="function"&&N(),w(M?"entered":"exited")},B)})})},O=M=>{if(j(),typeof(M?u:h)!="number"){_(M);return}S.current=window.setTimeout(()=>{_(M)},M?u:h)};return ll(()=>{O(r)},[r]),E.useEffect(()=>()=>{j()},[]),{transitionDuration:v,transitionStatus:x,transitionTimingFunction:n||"ease"}}function tc({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:i,children:s,timingFunction:o="ease",onExit:l,onEntered:u,onEnter:h,onExited:f,enterDelay:p,exitDelay:m}){const v=Gm(),{transitionDuration:y,transitionStatus:x,transitionTimingFunction:w}=ree({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:l,onEntered:u,onEnter:h,onExited:f,enterDelay:p,exitDelay:m});if(v==="test")return i?a.jsx(a.Fragment,{children:s({})}):t?s({display:"none"}):null;if(y===0)return t?a.jsx(E.Activity,{mode:i?"visible":"hidden",children:s({})}):i?a.jsx(a.Fragment,{children:s({})}):null;const A=x==="exited";return t?a.jsx(E.Activity,{mode:A?"hidden":"visible",children:s(A?{}:j8({transition:e,duration:y,state:x,timingFunction:w}))}):A?null:a.jsx(a.Fragment,{children:s(j8({transition:e,duration:y,state:x,timingFunction:w}))})}tc.displayName="@mantine/core/Transition";const iee={duration:100,transition:"fade"};function C8(t,e){return{...iee,...e,...t}}const[see,g7]=Ki("Popover component was not found in the tree");function Ew({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const i=qn(_X(e),r),s=Rf(t);return s?E.cloneElement(s,{[n]:i}):t}function v7(t){return a.jsx(BO,{tabIndex:-1,"data-autofocus":!0,...t})}Ew.displayName="@mantine/core/FocusTrap";v7.displayName="@mantine/core/FocusTrapInitialFocus";Ew.InitialFocus=v7;var b7={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const LO=Ie(t=>{var w,A,S,C;const e=je("PopoverDropdown",null,t),{className:n,style:r,vars:i,children:s,onKeyDownCapture:o,variant:l,classNames:u,styles:h,ref:f,...p}=e,m=g7(),v=cP({opened:m.opened,shouldReturnFocus:m.returnFocus}),y=m.withRoles?{"aria-labelledby":m.getTargetId(),id:m.getDropdownId(),role:"dialog",tabIndex:-1}:{},x=qn(f,m.floating);return m.disabled?null:a.jsx(Lh,{...m.portalProps,withinPortal:m.withinPortal,children:a.jsx(tc,{mounted:m.opened,...m.transitionProps,transition:((w=m.transitionProps)==null?void 0:w.transition)||"fade",duration:((A=m.transitionProps)==null?void 0:A.duration)??150,keepMounted:m.keepMounted,exitDuration:typeof((S=m.transitionProps)==null?void 0:S.exitDuration)=="number"?m.transitionProps.exitDuration:(C=m.transitionProps)==null?void 0:C.duration,children:j=>{var _;return a.jsx(Ew,{active:m.trapFocus&&m.opened,innerRef:x,children:a.jsxs(be,{...y,...p,variant:l,onKeyDownCapture:mX(()=>{var O,M;(O=m.onClose)==null||O.call(m),(M=m.onDismiss)==null||M.call(m)},{active:m.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":m.placement,"data-fixed":m.floatingStrategy==="fixed"||void 0,...m.getStyles("dropdown",{className:n,props:e,classNames:u,styles:h,style:[{...j,zIndex:m.zIndex,top:m.y??0,left:m.x??0,width:m.width==="target"?void 0:fe(m.width),...m.referenceHidden?{display:"none"}:null},(_=m.resolvedStyles)==null?void 0:_.dropdown,h==null?void 0:h.dropdown,r]}),children:[s,a.jsx(lA,{ref:m.arrowRef,arrowX:m.arrowX,arrowY:m.arrowY,visible:m.withArrow,position:m.placement,arrowSize:m.arrowSize,arrowRadius:m.arrowRadius,arrowOffset:m.arrowOffset,arrowPosition:m.arrowPosition,...m.getStyles("arrow",{props:e,classNames:u,styles:h})})]})})}})})});LO.classes=b7;LO.displayName="@mantine/core/PopoverDropdown";const aee={refProp:"ref",popupType:"dialog"},y7=Ie(t=>{const{children:e,refProp:n,popupType:r,ref:i,...s}=je("PopoverTarget",aee,t),o=Rf(e);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=s,u=g7(),h=qn(u.reference,vw(o),i),f=u.withRoles?{"aria-haspopup":r,"aria-expanded":u.opened,"aria-controls":u.opened?u.getDropdownId():void 0,id:u.getTargetId()}:{},p=o.props;return E.cloneElement(o,{...l,...f,...u.targetProps,className:Pr(u.targetProps.className,l.className,p.className),[n]:h,...u.controlled?null:{onClick:m=>{var v;u.onToggle(),(v=p.onClick)==null||v.call(p,m)}}})});y7.displayName="@mantine/core/PopoverTarget";function oee(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function lee(t,e,n){const r=oee(t.middlewares),i=[e7(t.offset),EJ()];return t.dropdownVisible&&n!=="test"&&t.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip=="boolean"?oA():oA(r.flip)),r.shift&&i.push(EO(typeof r.shift=="boolean"?{limiter:p8(),padding:5}:{limiter:p8(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline=="boolean"?Yg():Yg(r.inline)),i.push(t7({element:t.arrowRef,padding:t.arrowOffset})),(r.size||t.width==="target")&&i.push(OJ({...typeof r.size=="boolean"?{}:r.size,apply({rects:s,availableWidth:o,availableHeight:l,...u}){var f;const h=((f=e().refs.floating.current)==null?void 0:f.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:s,availableWidth:o,availableHeight:l,...u}):Object.assign(h,{maxWidth:`${o}px`,maxHeight:`${l}px`})),t.width==="target"&&Object.assign(h,{width:`${s.reference.width}px`})}})),i}function cee(t){const e=Gm(),[n,r]=Xi({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),i=E.useRef(n),s=()=>{n&&!t.disabled&&r(!1)},o=()=>{t.disabled||r(!n)},l=NO({strategy:t.strategy,placement:t.preventPositionChangeWhenVisible?t.positionRef.current:t.position,middleware:lee(t,()=>l,e),whileElementsMounted:t.keepMounted?void 0:K3});return E.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&n)return K3(l.refs.reference.current,l.refs.floating.current,l.update)},[n,l.update]),ll(()=>{var u;(u=t.onPositionChange)==null||u.call(t,l.placement),t.positionRef.current=l.placement},[l.placement,t.preventPositionChangeWhenVisible]),ll(()=>{var u,h;n!==i.current&&(n?(h=t.onOpen)==null||h.call(t):(u=t.onClose)==null||u.call(t)),i.current=n},[n,t.onClose,t.onOpen]),Jh(()=>{let u=-1;return n&&(u=window.setTimeout(()=>t.setDropdownVisible(!0),4)),()=>{window.clearTimeout(u)}},[n,t.position]),{floating:l,controlled:typeof t.opened=="boolean",opened:n,onClose:s,onToggle:o}}const uee={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:xo("popover"),__staticSelector:"Popover",width:"max-content"},x7=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:Zn(e),"--popover-shadow":fO(n)}});function jn(t){var An,ht,fn,zt,Nt,tn,cr;const e=je("Popover",uee,t),{children:n,position:r,offset:i,onPositionChange:s,opened:o,transitionProps:l,onExitTransitionEnd:u,onEnterTransitionEnd:h,width:f,middlewares:p,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:x,arrowPosition:w,unstyled:A,classNames:S,styles:C,closeOnClickOutside:j,withinPortal:_,portalProps:O,closeOnEscape:M,clickOutsideEvents:R,trapFocus:N,onClose:B,onDismiss:D,onOpen:L,onChange:U,zIndex:H,radius:z,shadow:I,id:F,defaultOpened:$,__staticSelector:G,withRoles:Y,disabled:W,returnFocus:V,variant:X,keepMounted:ee,vars:le,floatingStrategy:ve,withOverlay:me,overlayProps:Qe,hideDetached:We,attributes:qe,preventPositionChangeWhenVisible:ae,...de}=e,Ae=ft({name:G,props:e,classes:b7,classNames:S,styles:C,unstyled:A,attributes:qe,rootSelector:"dropdown",vars:le,varsResolver:x7}),{resolvedStyles:Te}=Ao({classNames:S,styles:C,props:e}),[Ge,rt]=E.useState(o??$??!1),Ue=E.useRef(r),Be=E.useRef(null),[Ee,Ke]=E.useState(null),[Dt,Je]=E.useState(null),{dir:it}=Df(),Xe=Gm(),Oe=Ri(F),$e=cee({middlewares:p,width:f,position:h7(it,r),offset:typeof i=="number"?i+(m?v/2:0):i,arrowRef:Be,arrowOffset:y,onPositionChange:s,opened:o,defaultOpened:$,onChange:U,onOpen:L,onClose:B,onDismiss:D,strategy:ve,dropdownVisible:Ge,setDropdownVisible:rt,positionRef:Ue,disabled:W,preventPositionChangeWhenVisible:ae,keepMounted:ee});yX(()=>{j&&($e.onClose(),D==null||D())},R,[Ee,Dt]);const lt=E.useCallback(ln=>{Ke(ln),$e.floating.refs.setReference(ln)},[$e.floating.refs.setReference]),Rn=E.useCallback(ln=>{Je(ln),$e.floating.refs.setFloating(ln)},[$e.floating.refs.setFloating]),vr=E.useCallback(()=>{var ln;(ln=l==null?void 0:l.onExited)==null||ln.call(l),u==null||u(),rt(!1),ae||(Ue.current=r)},[l==null?void 0:l.onExited,u,ae,r]),rn=E.useCallback(()=>{var ln;(ln=l==null?void 0:l.onEntered)==null||ln.call(l),h==null||h()},[l==null?void 0:l.onEntered,h]);return a.jsxs(see,{value:{returnFocus:V,disabled:W,controlled:$e.controlled,reference:lt,floating:Rn,x:$e.floating.x,y:$e.floating.y,arrowX:(fn=(ht=(An=$e.floating)==null?void 0:An.middlewareData)==null?void 0:ht.arrow)==null?void 0:fn.x,arrowY:(tn=(Nt=(zt=$e.floating)==null?void 0:zt.middlewareData)==null?void 0:Nt.arrow)==null?void 0:tn.y,opened:$e.opened,arrowRef:Be,transitionProps:{...l,onExited:vr,onEntered:rn},width:f,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:x,arrowPosition:w,placement:$e.floating.placement,trapFocus:N,withinPortal:_,portalProps:O,zIndex:H,radius:z,shadow:I,closeOnEscape:M,onDismiss:D,onClose:$e.onClose,onToggle:$e.onToggle,getTargetId:()=>Oe,getDropdownId:()=>`${Oe}-dropdown`,withRoles:Y,targetProps:de,__staticSelector:G,classNames:S,styles:C,unstyled:A,variant:X,keepMounted:ee,getStyles:Ae,resolvedStyles:Te,floatingStrategy:ve,referenceHidden:We&&Xe!=="test"?(cr=$e.floating.middlewareData.hide)==null?void 0:cr.referenceHidden:!1},children:[n,me&&a.jsx(tc,{transition:"fade",mounted:$e.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:ln=>a.jsx(Lh,{withinPortal:_,children:a.jsx(wf,{...Qe,...Ae("overlay",{className:Qe==null?void 0:Qe.className,style:[ln,Qe==null?void 0:Qe.style]})})})})]})}jn.Target=y7;jn.Dropdown=LO;jn.varsResolver=x7;jn.displayName="@mantine/core/Popover";jn.extend=t=>t;jn.withProps=t=>{const e=n=>a.jsx(jn,{...t,...n});return e.extend=jn.extend,e.displayName=`WithProps(${jn.displayName})`,e};var nl={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const A7=({className:t,...e})=>a.jsxs(be,{component:"span",className:Pr(nl.barsLoader,t),...e,children:[a.jsx("span",{className:nl.bar}),a.jsx("span",{className:nl.bar}),a.jsx("span",{className:nl.bar})]});A7.displayName="@mantine/core/Bars";const w7=({className:t,...e})=>a.jsxs(be,{component:"span",className:Pr(nl.dotsLoader,t),...e,children:[a.jsx("span",{className:nl.dot}),a.jsx("span",{className:nl.dot}),a.jsx("span",{className:nl.dot})]});w7.displayName="@mantine/core/Dots";const S7=({className:t,...e})=>a.jsx(be,{component:"span",className:Pr(nl.ovalLoader,t),...e});S7.displayName="@mantine/core/Oval";const j7={bars:A7,oval:S7,dots:w7},hee={loaders:j7,type:"oval"},C7=(t,{size:e,color:n})=>({root:{"--loader-size":Ut(e,"loader-size"),"--loader-color":n?gr(n,t):void 0}}),yo=Ie(t=>{const e=je("Loader",hee,t),{size:n,color:r,type:i,vars:s,className:o,style:l,classNames:u,styles:h,unstyled:f,loaders:p,variant:m,children:v,attributes:y,...x}=e,w=ft({name:"Loader",props:e,classes:nl,className:o,style:l,classNames:u,styles:h,unstyled:f,attributes:y,vars:s,varsResolver:C7});return v?a.jsx(be,{...w("root"),...x,children:v}):a.jsx(be,{...w("root"),component:p[i],variant:m,size:n,...x})});yo.defaultLoaders=j7;yo.classes=nl;yo.varsResolver=C7;yo.displayName="@mantine/core/Loader";var Jm={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const _8={orientation:"horizontal"},_7=(t,{borderWidth:e})=>({group:{"--ai-border-width":fe(e)}}),Mw=Ie(t=>{const e=je("ActionIconGroup",_8,t),{className:n,style:r,classNames:i,styles:s,unstyled:o,orientation:l,vars:u,borderWidth:h,variant:f,mod:p,attributes:m,...v}=je("ActionIconGroup",_8,t);return a.jsx(be,{...ft({name:"ActionIconGroup",props:e,classes:Jm,className:n,style:r,classNames:i,styles:s,unstyled:o,attributes:m,vars:u,varsResolver:_7,rootSelector:"group"})("group"),variant:f,mod:[{"data-orientation":l},p],role:"group",...v})});Mw.classes=Jm;Mw.varsResolver=_7;Mw.displayName="@mantine/core/ActionIconGroup";const T7=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":Ut(o,"section-height"),"--section-padding-x":Ut(o,"section-padding-x"),"--section-fz":Or(o),"--section-radius":e===void 0?void 0:Zn(e),"--section-bg":n||i?l.background:void 0,"--section-color":l.color,"--section-bd":n||i?l.border:void 0}}},Rw=Ie(t=>{const e=je("ActionIconGroupSection",null,t),{className:n,style:r,classNames:i,styles:s,unstyled:o,vars:l,variant:u,gradient:h,radius:f,autoContrast:p,attributes:m,...v}=e;return a.jsx(be,{...ft({name:"ActionIconGroupSection",props:e,classes:Jm,className:n,style:r,classNames:i,styles:s,unstyled:o,attributes:m,vars:l,varsResolver:T7,rootSelector:"groupSection"})("groupSection"),variant:u,...v})});Rw.classes=Jm;Rw.varsResolver=T7;Rw.displayName="@mantine/core/ActionIconGroupSection";const k7=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o})=>{const l=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--ai-size":Ut(e,"ai-size"),"--ai-radius":n===void 0?void 0:Zn(n),"--ai-bg":s||r?l.background:void 0,"--ai-hover":s||r?l.hover:void 0,"--ai-hover-color":s||r?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":s||r?l.border:void 0}}},Er=Zi(t=>{const e=je("ActionIcon",null,t),{className:n,unstyled:r,variant:i,classNames:s,styles:o,style:l,loading:u,loaderProps:h,size:f,color:p,radius:m,__staticSelector:v,gradient:y,vars:x,children:w,disabled:A,"data-disabled":S,autoContrast:C,mod:j,attributes:_,...O}=e,M=ft({name:["ActionIcon",v],props:e,className:n,style:l,classes:Jm,classNames:s,styles:o,unstyled:r,attributes:_,vars:x,varsResolver:k7});return a.jsxs(Br,{...M("root",{active:!A&&!u&&!S}),...O,unstyled:r,variant:i,size:f,disabled:A||u,mod:[{loading:u,disabled:A||S},j],children:[typeof u=="boolean"&&a.jsx(tc,{mounted:u,transition:"slide-down",duration:150,children:R=>a.jsx(be,{component:"span",...M("loader",{style:R}),"aria-hidden":!0,children:a.jsx(yo,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...h})})}),a.jsx(be,{component:"span",mod:{loading:u},...M("icon"),children:w})]})});Er.classes=Jm;Er.varsResolver=k7;Er.displayName="@mantine/core/ActionIcon";Er.Group=Mw;Er.GroupSection=Rw;function O7({size:t="var(--cb-icon-size, 70%)",style:e,...n}){return a.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},...n,children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}O7.displayName="@mantine/core/CloseIcon";var E7={root:"m_86a44da5","root--subtle":"m_220c80f2"};const dee={variant:"subtle"},M7=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":Ut(e,"cb-size"),"--cb-radius":n===void 0?void 0:Zn(n),"--cb-icon-size":fe(r)}}),ml=Zi(t=>{const e=je("CloseButton",dee,t),{iconSize:n,children:r,vars:i,radius:s,className:o,classNames:l,style:u,styles:h,unstyled:f,"data-disabled":p,disabled:m,variant:v,icon:y,mod:x,attributes:w,__staticSelector:A,...S}=e,C=ft({name:A||"CloseButton",props:e,className:o,style:u,classes:E7,classNames:l,styles:h,unstyled:f,attributes:w,vars:i,varsResolver:M7});return a.jsxs(Br,{...S,unstyled:f,variant:v,disabled:m,mod:[{disabled:m||p},x],...C("root",{variant:v,active:!m&&!p}),children:[y||a.jsx(O7,{}),r]})});ml.classes=E7;ml.varsResolver=M7;ml.displayName="@mantine/core/CloseButton";function fee(t){return E.Children.toArray(t).filter(Boolean)}var R7={root:"m_4081bf90"};const pee={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},D7=(t,{grow:e,preventGrowOverflow:n,gap:r,align:i,justify:s,wrap:o},{childWidth:l})=>({root:{"--group-child-width":e&&n?l:void 0,"--group-gap":Vi(r),"--group-align":i,"--group-justify":s,"--group-wrap":o}}),ut=Ie(t=>{const e=je("Group",pee,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,children:l,gap:u,align:h,justify:f,wrap:p,grow:m,preventGrowOverflow:v,vars:y,variant:x,__size:w,mod:A,attributes:S,...C}=e,j=fee(l),_=j.length,O=Vi(u??"md");return a.jsx(be,{...ft({name:"Group",props:e,stylesCtx:{childWidth:`calc(${100/_}% - (${O} - ${O} / ${_}))`},className:r,style:i,classes:R7,classNames:n,styles:s,unstyled:o,attributes:S,vars:y,varsResolver:D7})("root"),variant:x,mod:[{grow:m},A],size:w,...C,children:j})});ut.classes=R7;ut.varsResolver=D7;ut.displayName="@mantine/core/Group";const[mee,du]=Ki("ModalBase component was not found in tree");function gee({opened:t,transitionDuration:e}){const[n,r]=E.useState(t),i=E.useRef(-1),s=ab()?0:e;return E.useEffect(()=>(t?(r(!0),window.clearTimeout(i.current)):s===0?r(!1):i.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(i.current)),[t,s]),n}function vee({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:i,onClose:s,returnFocus:o}){const l=Ri(t),[u,h]=E.useState(!1),[f,p]=E.useState(!1),m=gee({opened:n,transitionDuration:typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200});return tA("keydown",v=>{var y;v.key==="Escape"&&i&&!v.isComposing&&n&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&s()},{capture:!0}),cP({opened:n,shouldReturnFocus:r&&o}),{_id:l,titleMounted:u,bodyMounted:f,shouldLockScroll:m,setTitleMounted:h,setBodyMounted:p}}var Fl=function(){return Fl=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Fl.apply(this,arguments)};function N7(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function bee(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var vx="right-scroll-bar-position",bx="width-before-scroll-bar",yee="with-scroll-bars-hidden",xee="--removed-body-scroll-bar-size";function LC(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Aee(t,e){var n=E.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var wee=typeof window<"u"?E.useLayoutEffect:E.useEffect,T8=new WeakMap;function See(t,e){var n=Aee(null,function(r){return t.forEach(function(i){return LC(i,r)})});return wee(function(){var r=T8.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(l){s.has(l)||LC(l,null)}),s.forEach(function(l){i.has(l)||LC(l,o)})}T8.set(n,t)},[t]),n}function jee(t){return t}function Cee(t,e){e===void 0&&(e=jee);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(s),o=n}var u=function(){var f=o;o=[],f.forEach(s)},h=function(){return Promise.resolve().then(u)};h(),n={push:function(f){o.push(f),h()},filter:function(f){return o=o.filter(f),n}}}};return i}function _ee(t){t===void 0&&(t={});var e=Cee(null);return e.options=Fl({async:!0,ssr:!1},t),e}var I7=function(t){var e=t.sideCar,n=N7(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Fl({},n))};I7.isSideCarExport=!0;function Tee(t,e){return t.useMedium(e),I7}var B7=_ee(),PC=function(){},Dw=E.forwardRef(function(t,e){var n=E.useRef(null),r=E.useState({onScrollCapture:PC,onWheelCapture:PC,onTouchMoveCapture:PC}),i=r[0],s=r[1],o=t.forwardProps,l=t.children,u=t.className,h=t.removeScrollBar,f=t.enabled,p=t.shards,m=t.sideCar,v=t.noRelative,y=t.noIsolation,x=t.inert,w=t.allowPinchZoom,A=t.as,S=A===void 0?"div":A,C=t.gapMode,j=N7(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,O=See([n,e]),M=Fl(Fl({},j),i);return E.createElement(E.Fragment,null,f&&E.createElement(_,{sideCar:B7,removeScrollBar:h,shards:p,noRelative:v,noIsolation:y,inert:x,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:C}),o?E.cloneElement(E.Children.only(l),Fl(Fl({},M),{ref:O})):E.createElement(S,Fl({},M,{className:u,ref:O}),l))});Dw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Dw.classNames={fullWidth:bx,zeroRight:vx};var kee=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Oee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=kee();return e&&t.setAttribute("nonce",e),t}function Eee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Mee(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Ree=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Oee())&&(Eee(e,n),Mee(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Dee=function(){var t=Ree();return function(e,n){E.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},L7=function(){var t=Dee(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Nee={left:0,top:0,right:0,gap:0},FC=function(t){return parseInt(t||"",10)||0},Iee=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[FC(n),FC(r),FC(i)]},Bee=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Nee;var e=Iee(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Lee=L7(),$p="data-scroll-locked",Pee=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,l=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(yee,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(l,"px ").concat(r,`;
  }
  body[`).concat($p,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(vx,` {
    right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(bx,` {
    margin-right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(vx," .").concat(vx,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(bx," .").concat(bx,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat($p,`] {
    `).concat(xee,": ").concat(l,`px;
  }
`)},k8=function(){var t=parseInt(document.body.getAttribute($p)||"0",10);return isFinite(t)?t:0},Fee=function(){E.useEffect(function(){return document.body.setAttribute($p,(k8()+1).toString()),function(){var t=k8()-1;t<=0?document.body.removeAttribute($p):document.body.setAttribute($p,t.toString())}},[])},zee=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;Fee();var s=E.useMemo(function(){return Bee(i)},[i]);return E.createElement(Lee,{styles:Pee(s,!e,i,n?"":"!important")})},J3=!1;if(typeof window<"u")try{var b1=Object.defineProperty({},"passive",{get:function(){return J3=!0,!0}});window.addEventListener("test",b1,b1),window.removeEventListener("test",b1,b1)}catch{J3=!1}var bp=J3?{passive:!1}:!1,Hee=function(t){return t.tagName==="TEXTAREA"},P7=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hee(t)&&n[e]==="visible")},qee=function(t){return P7(t,"overflowY")},$ee=function(t){return P7(t,"overflowX")},O8=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=F7(t,r);if(i){var s=z7(t,r),o=s[1],l=s[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qee=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Uee=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},F7=function(t,e){return t==="v"?qee(e):$ee(e)},z7=function(t,e){return t==="v"?Qee(e):Uee(e)},Wee=function(t,e){return t==="h"&&e==="rtl"?-1:1},Vee=function(t,e,n,r,i){var s=Wee(t,window.getComputedStyle(e).direction),o=s*r,l=n.target,u=e.contains(l),h=!1,f=o>0,p=0,m=0;do{if(!l)break;var v=z7(t,l),y=v[0],x=v[1],w=v[2],A=x-w-s*y;(y||A)&&F7(t,l)&&(p+=A,m+=y);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!u&&l!==document.body||u&&(e.contains(l)||e===l));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(h=!0),h},y1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},E8=function(t){return[t.deltaX,t.deltaY]},M8=function(t){return t&&"current"in t?t.current:t},Yee=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Gee=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},Xee=0,yp=[];function Kee(t){var e=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(Xee++)[0],s=E.useState(L7)[0],o=E.useRef(t);E.useEffect(function(){o.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var x=bee([t.lockRef.current],(t.shards||[]).map(M8),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=E.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var A=y1(x),S=n.current,C="deltaX"in x?x.deltaX:S[0]-A[0],j="deltaY"in x?x.deltaY:S[1]-A[1],_,O=x.target,M=Math.abs(C)>Math.abs(j)?"h":"v";if("touches"in x&&M==="h"&&O.type==="range")return!1;var R=window.getSelection(),N=R&&R.anchorNode,B=N?N===O||N.contains(O):!1;if(B)return!1;var D=O8(M,O);if(!D)return!0;if(D?_=M:(_=M==="v"?"h":"v",D=O8(M,O)),!D)return!1;if(!r.current&&"changedTouches"in x&&(C||j)&&(r.current=_),!_)return!0;var L=r.current||_;return Vee(L,w,x,L==="h"?C:j)},[]),u=E.useCallback(function(x){var w=x;if(!(!yp.length||yp[yp.length-1]!==s)){var A="deltaY"in w?E8(w):y1(w),S=e.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&Yee(_.delta,A)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var C=(o.current.shards||[]).map(M8).filter(Boolean).filter(function(_){return _.contains(w.target)}),j=C.length>0?l(w,C[0]):!o.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),h=E.useCallback(function(x,w,A,S){var C={name:x,delta:w,target:A,should:S,shadowParent:Zee(A)};e.current.push(C),setTimeout(function(){e.current=e.current.filter(function(j){return j!==C})},1)},[]),f=E.useCallback(function(x){n.current=y1(x),r.current=void 0},[]),p=E.useCallback(function(x){h(x.type,E8(x),x.target,l(x,t.lockRef.current))},[]),m=E.useCallback(function(x){h(x.type,y1(x),x.target,l(x,t.lockRef.current))},[]);E.useEffect(function(){return yp.push(s),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,bp),document.addEventListener("touchmove",u,bp),document.addEventListener("touchstart",f,bp),function(){yp=yp.filter(function(x){return x!==s}),document.removeEventListener("wheel",u,bp),document.removeEventListener("touchmove",u,bp),document.removeEventListener("touchstart",f,bp)}},[]);var v=t.removeScrollBar,y=t.inert;return E.createElement(E.Fragment,null,y?E.createElement(s,{styles:Gee(i)}):null,v?E.createElement(zee,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Zee(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Jee=Tee(B7,Kee);var Sf=E.forwardRef(function(t,e){return E.createElement(Dw,Fl({},t,{ref:e,sideCar:Jee}))});Sf.classNames=Dw.classNames;function H7({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:s,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:u,returnFocus:h,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:v,children:y,zIndex:x,shadow:w,padding:A,__vars:S,unstyled:C,removeScrollProps:j,..._}){const{_id:O,titleMounted:M,bodyMounted:R,shouldLockScroll:N,setTitleMounted:B,setBodyMounted:D}=vee({id:r,transitionProps:i,opened:e,trapFocus:l,closeOnEscape:u,onClose:n,returnFocus:h}),{key:L,...U}=j||{};return a.jsx(Lh,{...m,withinPortal:p,children:a.jsx(mee,{value:{opened:e,onClose:n,closeOnClickOutside:f,onExitTransitionEnd:s,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:t},getTitleId:()=>`${O}-title`,getBodyId:()=>`${O}-body`,titleMounted:M,bodyMounted:R,setTitleMounted:B,setBodyMounted:D,trapFocus:l,closeOnEscape:u,zIndex:x,unstyled:C},children:a.jsx(Sf,{enabled:N&&v,...U,children:a.jsx(be,{..._,id:O,__vars:{...S,"--mb-z-index":(x||xo("modal")).toString(),"--mb-shadow":fO(w),"--mb-padding":Vi(A)},children:y})},L)})})}H7.displayName="@mantine/core/ModalBase";function ete(){const t=du();return E.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var Tm={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function q7({className:t,...e}){const n=ete(),r=du();return a.jsx(be,{id:n,className:Pr({[Tm.body]:!r.unstyled},t),...e})}q7.displayName="@mantine/core/ModalBaseBody";function $7({className:t,onClick:e,...n}){const r=du();return a.jsx(ml,{...n,onClick:i=>{r.onClose(),e==null||e(i)},className:Pr({[Tm.close]:!r.unstyled},t),unstyled:r.unstyled})}$7.displayName="@mantine/core/ModalBaseCloseButton";function Q7({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:i,ref:s,...o}){const l=du();return a.jsx(tc,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var u,h,f;(u=l.onExitTransitionEnd)==null||u.call(l),(f=(h=l.transitionProps)==null?void 0:h.onExited)==null||f.call(h)},onEntered:()=>{var u,h,f;(u=l.onEnterTransitionEnd)==null||u.call(l),(f=(h=l.transitionProps)==null?void 0:h.onEntered)==null||f.call(h)},...t,children:u=>a.jsx("div",{...n,className:Pr({[Tm.inner]:!l.unstyled},n.className),children:a.jsx(Ew,{active:l.opened&&l.trapFocus,innerRef:s,children:a.jsx(ub,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[i,u],className:Pr({[Tm.content]:!l.unstyled},e),unstyled:l.unstyled,children:o.children})})})})}Q7.displayName="@mantine/core/ModalBaseContent";function U7({className:t,...e}){const n=du();return a.jsx(be,{component:"header",className:Pr({[Tm.header]:!n.unstyled},t),...e})}U7.displayName="@mantine/core/ModalBaseHeader";const tte={duration:200,timingFunction:"ease",transition:"fade"};function nte(t){const e=du();return{...tte,...e.transitionProps,...t}}function W7({onClick:t,transitionProps:e,style:n,visible:r,...i}){const s=du(),o=nte(e);return a.jsx(tc,{mounted:r!==void 0?r:s.opened,...o,transition:"fade",children:l=>a.jsx(wf,{fixed:!0,style:[n,l],zIndex:s.zIndex,unstyled:s.unstyled,onClick:u=>{t==null||t(u),s.closeOnClickOutside&&s.onClose()},...i})})}W7.displayName="@mantine/core/ModalBaseOverlay";function rte(){const t=du();return E.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}function V7({className:t,...e}){const n=rte(),r=du();return a.jsx(be,{component:"h2",className:Pr({[Tm.title]:!r.unstyled},t),id:n,...e})}V7.displayName="@mantine/core/ModalBaseTitle";function ite({children:t}){return a.jsx(a.Fragment,{children:t})}const Y7=E.createContext({size:"sm"}),G7=Ie(t=>{const e=je("InputClearButton",null,t),{size:n,variant:r,vars:i,classNames:s,styles:o,...l}=e,u=E.use(Y7),{resolvedClassNames:h,resolvedStyles:f}=Ao({classNames:s,styles:o,props:e});return a.jsx(ml,{variant:r||"transparent",size:n||(u==null?void 0:u.size)||"sm",classNames:h,styles:f,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});G7.displayName="@mantine/core/InputClearButton";const ste={xs:7,sm:8,md:10,lg:12,xl:15};function ate({__clearable:t,__clearSection:e,rightSection:n,__defaultRightSection:r,size:i="sm",__clearSectionMode:s="both"}){const o=t&&e;return s==="rightSection"?n===null?null:n||r:s==="clear"?n===null?null:o||r:o&&(n||r)?a.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:ste[i]},children:[o,n||r]}):n===null?null:n||o||r}const Nf=E.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var jo={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const X7=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${Or(e)} - ${fe(2)})`}}),hb=Ie(t=>{const e=je("InputDescription",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,__staticSelector:u,__inheritStyles:h=!0,attributes:f,...p}=je("InputDescription",null,e),m=E.use(Nf),v=ft({name:["InputWrapper",u],props:e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:f,rootSelector:"description",vars:l,varsResolver:X7});return a.jsx(be,{component:"p",...(h&&(m==null?void 0:m.getStyles)||v)("description",m!=null&&m.getStyles?{className:r,style:i}:void 0),...p})});hb.classes=jo;hb.varsResolver=X7;hb.displayName="@mantine/core/InputDescription";const K7=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${Or(e)} - ${fe(2)})`}}),db=Ie(t=>{const e=je("InputError",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,attributes:u,__staticSelector:h,__inheritStyles:f=!0,...p}=e,m=ft({name:["InputWrapper",h],props:e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:u,rootSelector:"error",vars:l,varsResolver:K7}),v=E.use(Nf);return a.jsx(be,{component:"p",...(f&&(v==null?void 0:v.getStyles)||m)("error",v!=null&&v.getStyles?{className:r,style:i}:void 0),...p})});db.classes=jo;db.varsResolver=K7;db.displayName="@mantine/core/InputError";const ote={labelElement:"label"},Z7=(t,{size:e})=>({label:{"--input-label-size":Or(e),"--input-asterisk-color":void 0}}),fb=Ie(t=>{const e=je("InputLabel",ote,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,labelElement:u,required:h,htmlFor:f,onMouseDown:p,children:m,__staticSelector:v,mod:y,attributes:x,...w}=e,A=ft({name:["InputWrapper",v],props:e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,rootSelector:"label",vars:l,varsResolver:Z7}),S=E.use(Nf),C=(S==null?void 0:S.getStyles)||A;return a.jsxs(be,{...C("label",S!=null&&S.getStyles?{className:r,style:i}:void 0),component:u,htmlFor:u==="label"?f:void 0,mod:[{required:h},y],onMouseDown:j=>{p==null||p(j),!j.defaultPrevented&&j.detail>1&&j.preventDefault()},...w,children:[m,h&&a.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});fb.classes=jo;fb.varsResolver=Z7;fb.displayName="@mantine/core/InputLabel";const PO=Ie(t=>{const e=je("InputPlaceholder",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,__staticSelector:u,error:h,mod:f,attributes:p,...m}=e;return a.jsx(be,{...ft({name:["InputPlaceholder",u],props:e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:p,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!h},f],component:"span",...m})});PO.classes=jo;PO.displayName="@mantine/core/InputPlaceholder";function lte(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),i=t.slice(0,r),s=t.slice(r+1),o=e&&i.includes("description")||n&&i.includes("error");return{offsetBottom:e&&s.includes("description")||n&&s.includes("error"),offsetTop:o}}const cte={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},J7=(t,{size:e})=>({label:{"--input-label-size":Or(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${Or(e)} - ${fe(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${Or(e)} - ${fe(2)})`}}),Nw=Ie(t=>{const e=je("InputWrapper",cte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,size:u,variant:h,__staticSelector:f,inputContainer:p,inputWrapperOrder:m,label:v,error:y,description:x,labelProps:w,descriptionProps:A,errorProps:S,labelElement:C,children:j,withAsterisk:_,id:O,required:M,__stylesApiProps:R,mod:N,attributes:B,...D}=e,L=ft({name:["InputWrapper",f],props:R||e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:B,vars:l,varsResolver:J7}),U={size:u,variant:h,__staticSelector:f},H=Ri(O),z=typeof _=="boolean"?_:M,I=(S==null?void 0:S.id)||`${H}-error`,F=(A==null?void 0:A.id)||`${H}-description`,$=H,G=!!y&&typeof y!="boolean",Y=!!x,W=`${G?I:""} ${Y?F:""}`,V=W.trim().length>0?W.trim():void 0,X=(w==null?void 0:w.id)||`${H}-label`,ee=v&&a.jsx(fb,{labelElement:C,id:X,htmlFor:$,required:z,...U,...w,children:v},"label"),le=Y&&a.jsx(hb,{...A,...U,size:(A==null?void 0:A.size)||U.size,id:(A==null?void 0:A.id)||F,children:x},"description"),ve=a.jsx(E.Fragment,{children:p(j)},"input"),me=G&&E.createElement(db,{...S,...U,size:(S==null?void 0:S.size)||U.size,key:"error",id:(S==null?void 0:S.id)||I},y),Qe=m.map(We=>{switch(We){case"label":return ee;case"input":return ve;case"description":return le;case"error":return me;default:return null}});return a.jsx(Nf,{value:{getStyles:L,describedBy:V,inputId:$,labelId:X,...lte(m,{hasDescription:Y,hasError:G})},children:a.jsx(be,{variant:h,size:u,mod:[{error:!!y},N],id:C==="label"?void 0:O,...L("root"),...D,children:Qe})})});Nw.classes=jo;Nw.varsResolver=J7;Nw.displayName="@mantine/core/InputWrapper";const ute={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},eF=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Ut(e.size,"input-height"),"--input-fz":Or(e.size),"--input-radius":e.radius===void 0?void 0:Zn(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?fe(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?fe(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?Ut(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),kr=Zi(t=>{const e=je("Input",ute,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,required:l,__staticSelector:u,__stylesApiProps:h,size:f,wrapperProps:p,error:m,disabled:v,leftSection:y,leftSectionProps:x,leftSectionWidth:w,rightSection:A,rightSectionProps:S,rightSectionWidth:C,rightSectionPointerEvents:j,leftSectionPointerEvents:_,variant:O,vars:M,pointer:R,multiline:N,radius:B,id:D,withAria:L,withErrorStyles:U,mod:H,inputSize:z,attributes:I,__clearSection:F,__clearable:$,__clearSectionMode:G,__defaultRightSection:Y,loading:W,loadingPosition:V,rootRef:X,...ee}=e,{styleProps:le,rest:ve}=lb(ee),me=E.use(Nf),Qe={offsetBottom:me==null?void 0:me.offsetBottom,offsetTop:me==null?void 0:me.offsetTop},We=ft({name:["Input",u],props:h||e,classes:jo,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:I,stylesCtx:Qe,rootSelector:"wrapper",vars:M,varsResolver:eF}),qe=L?{required:l,disabled:v,"aria-invalid":m?!0:void 0,"aria-describedby":me==null?void 0:me.describedBy,id:(me==null?void 0:me.inputId)||D}:{},ae=W?a.jsx(yo,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,de=W&&V==="left"?ae:y,Ae=ate({__clearable:$,__clearSection:F,rightSection:W&&V==="right"?ae:A,__defaultRightSection:Y,size:f,__clearSectionMode:G});return a.jsx(Y7,{value:{size:f||"sm"},children:a.jsxs(be,{ref:X,...We("wrapper"),...le,...p,mod:[{error:!!m&&U,pointer:R,disabled:v,multiline:N,"data-with-right-section":!!Ae,"data-with-left-section":!!de},H],variant:O,size:f,children:[de&&a.jsx("div",{...x,"data-position":"left",...We("section",{className:x==null?void 0:x.className,style:x==null?void 0:x.style}),children:de}),a.jsx(be,{component:"input",...ve,...qe,required:l,mod:{disabled:v,error:!!m&&U},variant:O,__size:z,...We("input")}),Ae&&a.jsx("div",{...S,"data-position":"right",...We("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:Ae})]})})});kr.classes=jo;kr.varsResolver=eF;kr.Wrapper=Nw;kr.Label=fb;kr.Error=db;kr.Description=hb;kr.Placeholder=PO;kr.ClearButton=G7;kr.displayName="@mantine/core/Input";function tF(t,e,n){const r=je(t,e,n),{label:i,description:s,error:o,required:l,classNames:u,styles:h,className:f,unstyled:p,__staticSelector:m,__stylesApiProps:v,errorProps:y,labelProps:x,descriptionProps:w,wrapperProps:A,id:S,size:C,style:j,inputContainer:_,inputWrapperOrder:O,withAsterisk:M,variant:R,vars:N,mod:B,attributes:D,...L}=r,{styleProps:U,rest:H}=lb(L),z={label:i,description:s,error:o,required:l,classNames:u,className:f,__staticSelector:m,__stylesApiProps:v||r,errorProps:y,labelProps:x,descriptionProps:w,unstyled:p,styles:h,size:C,style:j,inputContainer:_,inputWrapperOrder:O,withAsterisk:M,variant:R,id:S,mod:B,attributes:D,...A};return{...H,classNames:u,styles:h,unstyled:p,wrapperProps:{...z,...U},inputProps:{required:l,classNames:u,styles:h,unstyled:p,size:C,__staticSelector:m,__stylesApiProps:v||r,error:o,variant:R,id:S,attributes:D}}}const hte={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ds=Zi(t=>{const{inputProps:e,wrapperProps:n,...r}=tF("InputBase",hte,t);return a.jsx(kr.Wrapper,{...n,children:a.jsx(kr,{...e,...r})})});Ds.classes={...kr.classes,...kr.Wrapper.classes};Ds.displayName="@mantine/core/InputBase";function dte(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function fte({target:t,parent:e,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:s}){const o=E.useRef(-1),l=E.useRef(t),[u,h]=E.useState(!1),[f,p]=E.useState(typeof r=="boolean"?r:!1),m=()=>{if(!t||!e||!n.current)return;const w=t.getBoundingClientRect(),A=e.getBoundingClientRect(),S=window.getComputedStyle(t),C=window.getComputedStyle(e),j=Sh(S.borderTopWidth)+Sh(C.borderTopWidth),_=Sh(S.borderLeftWidth)+Sh(C.borderLeftWidth),O={top:w.top-A.top-j,left:w.left-A.left-_,width:w.width,height:w.height};n.current.style.transform=`translateY(${O.top}px) translateX(${O.left}px)`,n.current.style.width=`${O.width}px`,n.current.style.height=`${O.height}px`},v=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration="0ms"),m(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},y=E.useRef(null),x=E.useRef(null);return E.useEffect(()=>{if(u&&l.current!==t&&i&&i(),l.current=t,m(),t)return y.current=new ResizeObserver(v),y.current.observe(t),e&&(x.current=new ResizeObserver(v),x.current.observe(e)),()=>{var w,A;(w=y.current)==null||w.disconnect(),(A=x.current)==null||A.disconnect()}},[e,t]),E.useEffect(()=>{if(e){const w=A=>{dte(A.target,e)&&(v(),p(!1))};return e.addEventListener("transitionend",w),()=>{e.removeEventListener("transitionend",w)}}},[e]),E.useEffect(()=>{if(n.current&&s){const w=A=>{A.propertyName==="transform"&&s()};return n.current.addEventListener("transitionend",w),()=>{var A;(A=n.current)==null||A.removeEventListener("transitionend",w)}}},[s]),zX(()=>{fP()!=="test"&&h(!0)},20,{autoInvoke:!0}),qX(w=>{w.forEach(A=>{A.type==="attributes"&&A.attributeName==="dir"&&v()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:u,hidden:f}}var nF={root:"m_96b553a6"};const rF=(t,{transitionDuration:e},{shouldReduceMotion:n})=>({root:{"--transition-duration":t.respectReducedMotion&&n?"0ms":typeof e=="number"?`${e}ms`:e||"150ms"}}),Iw=Ie(t=>{const e=je("FloatingIndicator",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,target:u,parent:h,transitionDuration:f,mod:p,displayAfterTransitionEnd:m,onTransitionStart:v,onTransitionEnd:y,attributes:x,ref:w,...A}=e,S=ft({name:"FloatingIndicator",classes:nF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l,varsResolver:rF,stylesCtx:{shouldReduceMotion:ab()}}),C=E.useRef(null),{initialized:j,hidden:_}=fte({target:u,parent:h,ref:C,displayAfterTransitionEnd:m,onTransitionStart:v,onTransitionEnd:y}),O=qn(w,C);return!u||!h?null:a.jsx(be,{ref:O,mod:[{initialized:j,hidden:_},p],...S("root"),...A})});Iw.displayName="@mantine/core/FloatingIndicator";Iw.classes=nF;Iw.varsResolver=rF;const[pte,FO]=Ki("Accordion component was not found in the tree");function km({style:t,size:e=16,...n}){return a.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:fe(e),height:fe(e),display:"block"},...n,children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}km.displayName="@mantine/core/AccordionChevron";const[mte,iF]=Ki("Accordion.Item component was not found in the tree");var pb={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const zO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,chevron:o,icon:l,onClick:u,onKeyDown:h,children:f,disabled:p,mod:m,...v}=je("AccordionControl",null,t),{value:y}=iF(),x=FO(),w=x.isItemActive(y),A=typeof x.order=="number",S=`h${x.order}`,C=a.jsxs(Br,{...x.getStyles("control",{className:n,classNames:e,style:r,styles:i,variant:x.variant}),unstyled:x.unstyled,mod:["accordion-control",{active:w,"chevron-position":x.chevronPosition,disabled:p},m],onClick:j=>{u==null||u(j),x.onChange(y)},type:"button",disabled:p,"aria-expanded":w,"aria-controls":x.getRegionId(y),id:x.getControlId(y),onKeyDown:mw({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:x.loop,orientation:"vertical",onKeyDown:h}),...v,children:[a.jsx(be,{component:"span",mod:{rotate:!x.disableChevronRotation&&w,position:x.chevronPosition},...x.getStyles("chevron",{classNames:e,styles:i}),children:o||x.chevron}),a.jsx("span",{...x.getStyles("label",{classNames:e,styles:i}),children:f}),l&&a.jsx(be,{component:"span",mod:{"chevron-position":x.chevronPosition},...x.getStyles("icon",{classNames:e,styles:i}),children:l})]});return A?a.jsx(S,{...x.getStyles("itemTitle",{classNames:e,styles:i}),children:C}):C});zO.displayName="@mantine/core/AccordionControl";zO.classes=pb;const HO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,value:o,mod:l,...u}=je("AccordionItem",null,t),h=FO();return a.jsx(mte,{value:{value:o},children:a.jsx(be,{mod:[{active:h.isItemActive(o)},l],...h.getStyles("item",{className:n,classNames:e,styles:i,style:r,variant:h.variant}),...u})})});HO.displayName="@mantine/core/AccordionItem";HO.classes=pb;const qO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,children:o,keepMounted:l,...u}=je("AccordionPanel",null,t),{value:h}=iF(),f=FO();return a.jsx(ww,{...f.getStyles("panel",{className:n,classNames:e,style:r,styles:i}),expanded:f.isItemActive(h),transitionDuration:f.transitionDuration??200,role:"region",id:f.getRegionId(h),"aria-labelledby":f.getControlId(h),keepMounted:l??f.keepMounted,...u,children:a.jsx("div",{...f.getStyles("content",{classNames:e,styles:i}),children:o})})});qO.displayName="@mantine/core/AccordionPanel";qO.classes=pb;const gte={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},sF=(t,{transitionDuration:e,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:fe(n),"--accordion-radius":r===void 0?void 0:Zn(r)}}),Qr=Xm(t=>{const e=je("Accordion",gte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,multiple:h,value:f,defaultValue:p,onChange:m,id:v,loop:y,transitionDuration:x,disableChevronRotation:w,chevronPosition:A,chevronSize:S,order:C,chevron:j,variant:_,radius:O,chevronIconSize:M,attributes:R,keepMounted:N,...B}=e,D=Ri(v),[L,U]=Xi({value:f,defaultValue:p,finalValue:h?[]:null,onChange:m}),H=F=>Array.isArray(L)?L.includes(F):F===L,z=F=>{U(Array.isArray(L)?L.includes(F)?L.filter($=>$!==F):[...L,F]:F===L?null:F)},I=ft({name:"Accordion",classes:pb,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:R,vars:l,varsResolver:sF});return a.jsx(pte,{value:{isItemActive:H,onChange:z,getControlId:Zx(`${D}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:Zx(`${D}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:j===null?null:j||a.jsx(km,{size:M}),transitionDuration:x,disableChevronRotation:w,chevronPosition:A,order:C,loop:y,getStyles:I,variant:_,unstyled:o,keepMounted:N},children:a.jsx(be,{...I("root"),id:D,...B,variant:_,"data-accordion":!0,children:u})})});Qr.classes=pb;Qr.varsResolver=sF;Qr.displayName="@mantine/core/Accordion";Qr.Item=HO;Qr.Panel=qO;Qr.Control=zO;Qr.Chevron=km;var aF={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const oF=(t,{radius:e,color:n,variant:r,autoContrast:i})=>{const s=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:r||"light",autoContrast:i});return{root:{"--alert-radius":e===void 0?void 0:Zn(e),"--alert-bg":n||r?s.background:void 0,"--alert-color":s.color,"--alert-bd":n||r?s.border:void 0}}},Mt=Ie(t=>{const e=je("Alert",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,radius:u,color:h,title:f,children:p,id:m,icon:v,withCloseButton:y,onClose:x,closeButtonLabel:w,variant:A,autoContrast:S,role:C,attributes:j,..._}=e,O=ft({name:"Alert",classes:aF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:j,vars:l,varsResolver:oF}),M=Ri(m),R=f&&`${M}-title`||void 0,N=`${M}-body`;return a.jsx(be,{id:M,...O("root",{variant:A}),variant:A,..._,role:C||"alert","aria-describedby":p?N:void 0,"aria-labelledby":f?R:void 0,children:a.jsxs("div",{...O("wrapper"),children:[v&&a.jsx("div",{...O("icon"),children:v}),a.jsxs("div",{...O("body"),children:[f&&a.jsx("div",{...O("title"),"data-with-close-button":y||void 0,children:a.jsx("span",{id:R,...O("label"),children:f})}),p&&a.jsx("div",{id:N,...O("message"),"data-variant":A,children:p})]}),y&&a.jsx(ml,{...O("closeButton"),onClick:x,variant:"transparent",size:16,iconSize:16,"aria-label":w,unstyled:o})]})})});Mt.classes=aF;Mt.varsResolver=oF;Mt.displayName="@mantine/core/Alert";var lF={root:"m_b6d8b162"};function vte(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const bte={inherit:!1},cF=(t,{variant:e,lineClamp:n,gradient:r,size:i})=>({root:{"--text-fz":Or(i),"--text-lh":sP(i),"--text-gradient":e==="gradient"?q3(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0}}),dt=Zi(t=>{const e=je("Text",bte,t),{lineClamp:n,truncate:r,inline:i,inherit:s,gradient:o,span:l,__staticSelector:u,vars:h,className:f,style:p,classNames:m,styles:v,unstyled:y,variant:x,mod:w,size:A,attributes:S,...C}=e;return a.jsx(be,{...ft({name:["Text",u],props:e,classes:lF,className:f,style:p,classNames:m,styles:v,unstyled:y,attributes:S,vars:h,varsResolver:cF})("root",{focusable:!0}),component:l?"span":"p",variant:x,mod:[{"data-truncate":vte(r),"data-line-clamp":typeof n=="number","data-inline":i,"data-inherit":s},w],size:A,...C})});dt.classes=lF;dt.varsResolver=cF;dt.displayName="@mantine/core/Text";var uF={root:"m_849cf0da"};const yte={underline:"hover"},Ur=Zi(t=>{const{underline:e,className:n,unstyled:r,mod:i,...s}=je("Anchor",yte,t);return a.jsx(dt,{component:"a",className:Pr({[uF.root]:!r},n),...s,mod:[{underline:e},i],__staticSelector:"Anchor",unstyled:r})});Ur.classes=uF;Ur.displayName="@mantine/core/Anchor";const[xte,e0]=Ki("AppShell was not found in tree");var td={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const $O=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,unstyled:s,vars:o,withBorder:l,zIndex:u,mod:h,...f}=je("AppShellAside",null,t),p=e0();return p.disabled?null:a.jsx(be,{component:"aside",mod:[{"with-border":l??p.withBorder},h],...p.getStyles("aside",{className:Pr({[Sf.classNames.zeroRight]:p.offsetScrollbars},n),classNames:e,styles:i,style:r}),...f,__vars:{"--app-shell-aside-z-index":`calc(${u??p.zIndex} + 1)`}})});$O.classes=td;$O.displayName="@mantine/core/AppShellAside";const QO=Ie(t=>{var m;const{classNames:e,className:n,style:r,styles:i,unstyled:s,vars:o,withBorder:l,zIndex:u,mod:h,...f}=je("AppShellFooter",null,t),p=e0();return p.disabled?null:a.jsx(be,{component:"footer",mod:[{"with-border":l??p.withBorder},h],...p.getStyles("footer",{className:Pr({[Sf.classNames.zeroRight]:p.offsetScrollbars},n),classNames:e,styles:i,style:r}),...f,__vars:{"--app-shell-footer-z-index":(m=u??p.zIndex)==null?void 0:m.toString()}})});QO.classes=td;QO.displayName="@mantine/core/AppShellFooter";const UO=Ie(t=>{var m;const{classNames:e,className:n,style:r,styles:i,unstyled:s,vars:o,withBorder:l,zIndex:u,mod:h,...f}=je("AppShellHeader",null,t),p=e0();return p.disabled?null:a.jsx(be,{component:"header",mod:[{"with-border":l??p.withBorder},h],...p.getStyles("header",{className:Pr({[Sf.classNames.zeroRight]:p.offsetScrollbars},n),classNames:e,styles:i,style:r}),...f,__vars:{"--app-shell-header-z-index":(m=u??p.zIndex)==null?void 0:m.toString()}})});UO.classes=td;UO.displayName="@mantine/core/AppShellHeader";const WO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("AppShellMain",null,t);return a.jsx(be,{component:"main",...e0().getStyles("main",{className:n,style:r,classNames:e,styles:i}),...o})});WO.classes=td;WO.displayName="@mantine/core/AppShellMain";const VO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,unstyled:s,vars:o,withBorder:l,zIndex:u,mod:h,...f}=je("AppShellNavbar",null,t),p=e0();return p.disabled?null:a.jsx(be,{component:"nav",mod:[{"with-border":l??p.withBorder},h],...p.getStyles("navbar",{className:n,classNames:e,styles:i,style:r}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${u??p.zIndex} + 1)`}})});VO.classes=td;VO.displayName="@mantine/core/AppShellNavbar";const YO=Zi(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,grow:o,mod:l,...u}=je("AppShellSection",null,t),h=e0();return a.jsx(be,{mod:[{grow:o},l],...h.getStyles("section",{className:n,style:r,classNames:e,styles:i}),...u})});YO.classes=td;YO.displayName="@mantine/core/AppShellSection";function mb(t){return typeof t=="object"?t.base:t}function gb(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function vb(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function Ate({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:i,mode:s}){var h,f,p;const o=r==null?void 0:r.width,l="translateX(var(--app-shell-aside-width))",u="translateX(calc(var(--app-shell-aside-width) * -1))";if(r!=null&&r.breakpoint&&!((h=r==null?void 0:r.collapsed)!=null&&h.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},s==="fixed"?(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px"):(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px")),gb(o)){const m=fe(mb(o));t["--app-shell-aside-width"]=m,t["--app-shell-aside-offset"]=m}if(vb(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=fe(o.base),t["--app-shell-aside-offset"]=fe(o.base)),ni(o).forEach(m=>{m!=="base"&&(e[m]=e[m]||{},e[m]["--app-shell-aside-width"]=fe(o[m]),e[m]["--app-shell-aside-offset"]=fe(o[m]))})),r!=null&&r.breakpoint&&s==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-aside-position"]="sticky",e[r.breakpoint]["--app-shell-aside-grid-row"]="2",e[r.breakpoint]["--app-shell-aside-grid-column"]="3",e[r.breakpoint]["--app-shell-main-column-end"]="3"),(f=r==null?void 0:r.collapsed)!=null&&f.desktop){const m=r.breakpoint;e[m]=e[m]||{},e[m]["--app-shell-aside-transform"]=l,e[m]["--app-shell-aside-transform-rtl"]=u,s==="fixed"?e[m]["--app-shell-aside-offset"]="0px !important":(e[m]["--app-shell-aside-width"]="0px",e[m]["--app-shell-aside-display"]="none",e[m]["--app-shell-main-column-end"]="-1"),e[m]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((p=r==null?void 0:r.collapsed)!=null&&p.mobile){const m=pO(r.breakpoint,i.breakpoints)-.1;n[m]=n[m]||{},s==="fixed"?(n[m]["--app-shell-aside-width"]="100%",n[m]["--app-shell-aside-offset"]="0px"):n[m]["--app-shell-aside-width"]="0px",n[m]["--app-shell-aside-transform"]=l,n[m]["--app-shell-aside-transform-rtl"]=u,n[m]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function wte({baseStyles:t,minMediaStyles:e,footer:n,mode:r}){const i=n==null?void 0:n.height,s="translateY(var(--app-shell-footer-height))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-footer-position"]="sticky",t["--app-shell-footer-grid-column"]="1 / -1",t["--app-shell-footer-grid-row"]="3"),gb(i)){const l=fe(mb(i));t["--app-shell-footer-height"]=l,o&&(t["--app-shell-footer-offset"]=l)}vb(i)&&(typeof i.base<"u"&&(t["--app-shell-footer-height"]=fe(i.base),o&&(t["--app-shell-footer-offset"]=fe(i.base))),ni(i).forEach(l=>{l!=="base"&&(e[l]=e[l]||{},e[l]["--app-shell-footer-height"]=fe(i[l]),o&&(e[l]["--app-shell-footer-offset"]=fe(i[l])))})),n!=null&&n.collapsed&&(t["--app-shell-footer-transform"]=s,r==="fixed"&&(t["--app-shell-footer-offset"]="0px !important"))}function Ste({baseStyles:t,minMediaStyles:e,header:n,mode:r}){const i=n==null?void 0:n.height,s="translateY(calc(var(--app-shell-header-height) * -1))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-header-position"]="sticky",t["--app-shell-header-grid-column"]="1 / -1",t["--app-shell-header-grid-row"]="1"),gb(i)){const l=fe(mb(i));t["--app-shell-header-height"]=l,o&&(t["--app-shell-header-offset"]=l)}vb(i)&&(typeof i.base<"u"&&(t["--app-shell-header-height"]=fe(i.base),o&&(t["--app-shell-header-offset"]=fe(i.base))),ni(i).forEach(l=>{l!=="base"&&(e[l]=e[l]||{},e[l]["--app-shell-header-height"]=fe(i[l]),o&&(e[l]["--app-shell-header-offset"]=fe(i[l])))})),n!=null&&n.collapsed&&(t["--app-shell-header-transform"]=s,r==="fixed"&&(t["--app-shell-header-offset"]="0px !important"))}function jte({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:i,mode:s}){var h,f,p;const o=r==null?void 0:r.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",u="translateX(var(--app-shell-navbar-width))";if(r!=null&&r.breakpoint&&!((h=r==null?void 0:r.collapsed)!=null&&h.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-navbar-offset"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-navbar-width"]="100%",s==="static"&&(n[r==null?void 0:r.breakpoint]["--app-shell-navbar-grid-width"]="0px")),gb(o)){const m=fe(mb(o));t["--app-shell-navbar-width"]=m,t["--app-shell-navbar-offset"]=m,s==="static"&&(t["--app-shell-navbar-grid-width"]=m)}if(vb(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=fe(o.base),t["--app-shell-navbar-offset"]=fe(o.base),s==="static"&&(t["--app-shell-navbar-grid-width"]=fe(o.base))),ni(o).forEach(m=>{m!=="base"&&(e[m]=e[m]||{},e[m]["--app-shell-navbar-width"]=fe(o[m]),e[m]["--app-shell-navbar-offset"]=fe(o[m]),s==="static"&&(e[m]["--app-shell-navbar-grid-width"]=fe(o[m])))})),r!=null&&r.breakpoint&&s==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-navbar-position"]="sticky",e[r.breakpoint]["--app-shell-navbar-grid-row"]="2",e[r.breakpoint]["--app-shell-navbar-grid-column"]="1",e[r.breakpoint]["--app-shell-main-column-start"]="2"),(f=r==null?void 0:r.collapsed)!=null&&f.desktop){const m=r.breakpoint;e[m]=e[m]||{},e[m]["--app-shell-navbar-transform"]=l,e[m]["--app-shell-navbar-transform-rtl"]=u,s==="fixed"?e[m]["--app-shell-navbar-offset"]="0px !important":(e[m]["--app-shell-navbar-width"]="0px",e[m]["--app-shell-navbar-display"]="none",e[m]["--app-shell-main-column-start"]="1")}if((p=r==null?void 0:r.collapsed)!=null&&p.mobile){const m=pO(r.breakpoint,i.breakpoints)-.1;n[m]=n[m]||{},n[m]["--app-shell-navbar-width"]="100%",n[m]["--app-shell-navbar-offset"]="0px",s==="static"&&(n[m]["--app-shell-navbar-grid-width"]="0px"),n[m]["--app-shell-navbar-transform"]=l,n[m]["--app-shell-navbar-transform-rtl"]=u}}function zC(t){return Number(t)===0?"0px":Vi(t)}function Cte({padding:t,baseStyles:e,minMediaStyles:n}){gb(t)&&(e["--app-shell-padding"]=zC(mb(t))),vb(t)&&(t.base&&(e["--app-shell-padding"]=zC(t.base)),ni(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=zC(t[r]))}))}function _te({navbar:t,header:e,footer:n,aside:r,padding:i,theme:s,mode:o}){const l={},u={},h={};o==="static"&&(h["--app-shell-main-grid-column"]="1 / -1",h["--app-shell-main-grid-row"]="2"),jte({baseStyles:h,minMediaStyles:l,maxMediaStyles:u,navbar:t,theme:s,mode:o}),Ate({baseStyles:h,minMediaStyles:l,maxMediaStyles:u,aside:r,theme:s,mode:o}),Ste({baseStyles:h,minMediaStyles:l,header:e,mode:o}),wte({baseStyles:h,minMediaStyles:l,footer:n,mode:o}),Cte({baseStyles:h,minMediaStyles:l,padding:i});const f=z3(ni(l),s.breakpoints).map(m=>({query:`(min-width: ${Rs(m.px)})`,styles:l[m.value]})),p=z3(ni(u),s.breakpoints).map(m=>({query:`(max-width: ${Rs(m.px)})`,styles:u[m.value]}));return{baseStyles:h,media:[...f,...p]}}function Tte({navbar:t,header:e,aside:n,footer:r,padding:i,mode:s,selector:o}){const l=Ni(),u=nc(),{media:h,baseStyles:f}=_te({navbar:t,header:e,footer:r,aside:n,padding:i,theme:l,mode:s});return a.jsx(Aw,{media:h,styles:f,selector:o||u.cssVariablesSelector})}function kte({transitionDuration:t,disabled:e}){const[n,r]=E.useState(!0),i=E.useRef(-1),s=E.useRef(-1);return tA("resize",()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>E.startTransition(()=>{r(!1)}),200)}),Jh(()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>E.startTransition(()=>{r(!1)}),t||0)},[e,t]),n}const Ote={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:xo("app"),mode:"fixed"},hF=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),Fa=Ie(t=>{const e=je("AppShell",Ote,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,navbar:u,withBorder:h,padding:f,transitionDuration:p,transitionTimingFunction:m,header:v,zIndex:y,layout:x,disabled:w,aside:A,footer:S,offsetScrollbars:C=!0,mode:j,mod:_,attributes:O,id:M,...R}=e,N=ft({name:"AppShell",classes:td,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:O,vars:l,varsResolver:hF}),B=kte({disabled:w,transitionDuration:p}),D=Ri(M);return a.jsxs(xte,{value:{getStyles:N,withBorder:h,zIndex:y,disabled:w,offsetScrollbars:C,mode:j},children:[a.jsx(Tte,{navbar:u,header:v,aside:A,footer:S,padding:f,mode:j,selector:j==="static"?`#${D}`:void 0}),a.jsx(be,{...N("root"),id:D,mod:[{resizing:B,layout:x,disabled:w,mode:j},_],...R})]})});Fa.classes=td;Fa.varsResolver=hF;Fa.displayName="@mantine/core/AppShell";Fa.Navbar=VO;Fa.Header=UO;Fa.Main=WO;Fa.Aside=$O;Fa.Footer=QO;Fa.Section=YO;function dF(t){return typeof t=="string"?{value:t,label:t}:typeof t=="object"&&"value"in t&&!("label"in t)?{value:t.value,label:`${t.value}`,disabled:t.disabled}:typeof t=="object"&&"group"in t?{group:t.group,items:t.items.map(e=>dF(e))}:typeof t=="number"||typeof t=="bigint"||typeof t=="boolean"?{value:t,label:`${t}`}:t}function fF(t){return t?t.map(e=>dF(e)):[]}function GO(t){return t.reduce((e,n)=>"group"in n?{...e,...GO(n.items)}:(e[`${n.value}`]=n,e),{})}var Ws={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const Ete={error:null},pF=(t,{size:e,color:n})=>({chevron:{"--combobox-chevron-size":Ut(e,"combobox-chevron-size"),"--combobox-chevron-color":n?gr(n,t):void 0}}),bb=Ie(t=>{const e=je("ComboboxChevron",Ete,t),{size:n,error:r,style:i,className:s,classNames:o,styles:l,unstyled:u,vars:h,attributes:f,mod:p,...m}=e,v=ft({name:"ComboboxChevron",classes:Ws,props:e,style:i,className:s,classNames:o,styles:l,unstyled:u,vars:h,varsResolver:pF,attributes:f,rootSelector:"chevron"});return a.jsx(be,{component:"svg",...m,...v("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:r},p],children:a.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});bb.classes=Ws;bb.varsResolver=pF;bb.displayName="@mantine/core/ComboboxChevron";const[Mte,Co]=Ki("Combobox component was not found in tree");function XO({onMouseDown:t,onClick:e,onClear:n,...r}){return a.jsx(kr.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:i=>{i.preventDefault(),t==null||t(i)},onClick:i=>{n(),e==null||e(i)}})}XO.displayName="@mantine/core/ComboboxClearButton";const KO=Ie(t=>{const{classNames:e,styles:n,className:r,style:i,hidden:s,...o}=je("ComboboxDropdown",null,t),l=Co();return a.jsx(jn.Dropdown,{...o,role:"presentation","data-hidden":s||void 0,...l.getStyles("dropdown",{className:r,style:i,classNames:e,styles:n})})});KO.classes=Ws;KO.displayName="@mantine/core/ComboboxDropdown";const Rte={refProp:"ref"},mF=Ie(t=>{const{children:e,refProp:n,ref:r}=je("ComboboxDropdownTarget",Rte,t);if(Co(),!dO(e))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return a.jsx(jn.Target,{ref:r,refProp:n,children:e})});mF.displayName="@mantine/core/ComboboxDropdownTarget";const ZO=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ComboboxEmpty",null,t);return a.jsx(be,{...Co().getStyles("empty",{className:n,classNames:e,styles:i,style:r}),...o})});ZO.classes=Ws;ZO.displayName="@mantine/core/ComboboxEmpty";function JO({onKeyDown:t,onClick:e,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:s,autoComplete:o}){const l=Co(),[u,h]=E.useState(null),f=v=>{if(t==null||t(v),!l.readOnly&&n){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?h(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),h(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?h(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),h(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&y!==-1?(v.preventDefault(),l.store.clickSelectedOption()):s==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&s==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...r?{...i?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":i?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&u||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:f,onClick:v=>{s==="button"&&v.currentTarget.focus(),e==null||e(v)}}}const Dte={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},gF=Ie(t=>{const{children:e,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:s,targetType:o,autoComplete:l,ref:u,...h}=je("ComboboxEventsTarget",Dte,t),f=Rf(e);if(!f)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=Co();return E.cloneElement(f,{...JO({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:s,onKeyDown:f.props.onKeyDown,onClick:f.props.onClick,autoComplete:l}),...h,[n]:qn(u,p.store.targetRef,vw(f))})});gF.displayName="@mantine/core/ComboboxEventsTarget";const eE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ComboboxFooter",null,t);return a.jsx(be,{...Co().getStyles("footer",{className:n,classNames:e,style:r,styles:i}),...o,onMouseDown:l=>{l.preventDefault()}})});eE.classes=Ws;eE.displayName="@mantine/core/ComboboxFooter";const tE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,children:o,label:l,id:u,...h}=je("ComboboxGroup",null,t),f=Co(),p=Ri(u);return a.jsxs(be,{role:"group","aria-labelledby":l?p:void 0,...f.getStyles("group",{className:n,classNames:e,style:r,styles:i}),...h,children:[l&&a.jsx("div",{id:p,...f.getStyles("groupLabel",{classNames:e,styles:i}),children:l}),o]})});tE.classes=Ws;tE.displayName="@mantine/core/ComboboxGroup";const nE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ComboboxHeader",null,t);return a.jsx(be,{...Co().getStyles("header",{className:n,classNames:e,style:r,styles:i}),...o,onMouseDown:l=>{l.preventDefault()}})});nE.classes=Ws;nE.displayName="@mantine/core/ComboboxHeader";function vF({value:t,valuesDivider:e=",",...n}){return a.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t?`${t}`:"",...n})}vF.displayName="@mantine/core/ComboboxHiddenInput";const rE=Ie(t=>{const e=je("ComboboxOption",null,t),{classNames:n,className:r,style:i,styles:s,vars:o,onClick:l,id:u,active:h,onMouseDown:f,onMouseOver:p,disabled:m,selected:v,mod:y,...x}=e,w=Co(),A=E.useId(),S=u||A;return a.jsx(be,{...w.getStyles("option",{className:r,classNames:n,styles:s,style:i}),...x,id:S,mod:["combobox-option",{"combobox-active":h,"combobox-disabled":m,"combobox-selected":v},y],role:"option",onClick:C=>{var j;m?C.preventDefault():((j=w.onOptionSubmit)==null||j.call(w,e.value,e),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),f==null||f(C)},onMouseOver:C=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),p==null||p(C)}})});rE.classes=Ws;rE.displayName="@mantine/core/ComboboxOption";const iE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,id:s,onMouseDown:o,labelledBy:l,...u}=je("ComboboxOptions",null,t),h=Co(),f=Ri(s);return E.useEffect(()=>{h.store.setListId(f)},[f]),a.jsx(be,{...h.getStyles("options",{className:n,style:r,classNames:e,styles:i}),...u,id:f,role:"listbox","aria-labelledby":l,onMouseDown:p=>{p.preventDefault(),o==null||o(p)}})});iE.classes=Ws;iE.displayName="@mantine/core/ComboboxOptions";const Nte={withAriaAttributes:!0,withKeyboardNavigation:!0},sE=Ie(t=>{const{classNames:e,styles:n,unstyled:r,vars:i,withAriaAttributes:s,onKeyDown:o,onClick:l,withKeyboardNavigation:u,size:h,ref:f,...p}=je("ComboboxSearch",Nte,t),m=Co(),v=m.getStyles("search"),y=JO({targetType:"input",withAriaAttributes:s,withKeyboardNavigation:u,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return a.jsx(kr,{ref:qn(f,m.store.searchRef),classNames:[{input:v.className},e],styles:[{input:v.style},n],size:h||m.size,...y,...p,__staticSelector:"Combobox"})});sE.classes=Ws;sE.displayName="@mantine/core/ComboboxSearch";const Ite={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},bF=Ie(t=>{const{children:e,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:s,targetType:o,autoComplete:l,ref:u,...h}=je("ComboboxTarget",Ite,t),f=Rf(e);if(!f)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=Co(),m=E.cloneElement(f,{...JO({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:s,onKeyDown:f.props.onKeyDown,onClick:f.props.onClick,autoComplete:l}),...h});return a.jsx(jn.Target,{refProp:n,ref:qn(u,p.store.targetRef),children:m})});bF.displayName="@mantine/core/ComboboxTarget";function Bte(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function Lte(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function Pte(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function Bw({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:s=!0,scrollBehavior:o="instant"}={}){const[l,u]=Xi({value:e,defaultValue:t,finalValue:!1,onChange:n}),h=E.useRef(null),f=E.useRef(-1),p=E.useRef(null),m=E.useRef(null),v=E.useRef(-1),y=E.useRef(-1),x=E.useRef(-1),w=E.useCallback((I="unknown")=>{l||(u(!0),i==null||i(I))},[u,i,l]),A=E.useCallback((I="unknown")=>{l&&(u(!1),r==null||r(I))},[u,r,l]),S=E.useCallback((I="unknown")=>{l?A(I):w(I)},[A,w,l]),C=E.useCallback(()=>{const I=Lc(m.current),F=fx(`#${h.current} [data-combobox-selected]`,I);F==null||F.removeAttribute("data-combobox-selected"),F==null||F.removeAttribute("aria-selected")},[]),j=E.useCallback(I=>{const F=Lc(m.current),$=fx(`#${h.current}`,F),G=$?$c("[data-combobox-option]",$):null;if(!G)return null;const Y=I>=G.length?0:I<0?G.length-1:I;return f.current=Y,G!=null&&G[Y]&&!G[Y].hasAttribute("data-combobox-disabled")?(C(),G[Y].setAttribute("data-combobox-selected","true"),G[Y].setAttribute("aria-selected","true"),G[Y].scrollIntoView({block:"nearest",behavior:o}),G[Y].id):null},[o,C]),_=E.useCallback(()=>{const I=Lc(m.current),F=fx(`#${h.current} [data-combobox-active]`,I);return j(F?$c(`#${h.current} [data-combobox-option]`,I).findIndex($=>$===F):0)},[j]),O=E.useCallback(()=>{const I=Lc(m.current),F=$c(`#${h.current} [data-combobox-option]`,I);return j(Lte(f.current,F,s))},[j,s]),M=E.useCallback(()=>{const I=Lc(m.current),F=$c(`#${h.current} [data-combobox-option]`,I);return j(Bte(f.current,F,s))},[j,s]),R=E.useCallback(()=>{const I=Lc(m.current);return j(Pte($c(`#${h.current} [data-combobox-option]`,I)))},[j]),N=E.useCallback((I="selected",F)=>{var $;if(typeof I=="number"){f.current=I;const G=Lc(m.current),Y=$c(`#${h.current} [data-combobox-option]`,G);F!=null&&F.scrollIntoView&&(($=Y[I])==null||$.scrollIntoView({block:"nearest",behavior:o}));return}x.current=window.setTimeout(()=>{var V;const G=Lc(m.current),Y=$c(`#${h.current} [data-combobox-option]`,G),W=Y.findIndex(X=>X.hasAttribute(`data-combobox-${I}`));f.current=W,F!=null&&F.scrollIntoView&&((V=Y[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),B=E.useCallback(()=>{f.current=-1,C()},[C]),D=E.useCallback(()=>{var F,$;const I=Lc(m.current);($=(F=$c(`#${h.current} [data-combobox-option]`,I))==null?void 0:F[f.current])==null||$.click()},[]),L=E.useCallback(I=>{h.current=I},[]),U=E.useCallback(()=>{v.current=window.setTimeout(()=>{var I;return(I=p.current)==null?void 0:I.focus()},0)},[]),H=E.useCallback(()=>{y.current=window.setTimeout(()=>{var I;return(I=m.current)==null?void 0:I.focus()},0)},[]),z=E.useCallback(()=>f.current,[]);return E.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(x.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:A,toggleDropdown:S,selectedOptionIndex:f.current,getSelectedOptionIndex:z,selectOption:j,selectFirstOption:R,selectActiveOption:_,selectNextOption:O,selectPreviousOption:M,resetSelectedOption:B,updateSelectedOptionIndex:N,listId:h.current,setListId:L,clickSelectedOption:D,searchRef:p,focusSearchInput:U,targetRef:m,focusTarget:H}}const Fte={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},yF=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":Or(e),"--combobox-option-padding":Ut(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:fe(n),"--combobox-option-fz":Or(e),"--combobox-option-padding":Ut(e,"combobox-option-padding")}}),sn=t=>{const e=je("Combobox",Fte,t),{classNames:n,styles:r,unstyled:i,children:s,store:o,vars:l,onOptionSubmit:u,onClose:h,size:f,dropdownPadding:p,resetSelectionOnOptionHover:m,__staticSelector:v,readOnly:y,attributes:x,...w}=e,A=Bw(),S=o||A,C=ft({name:v||"Combobox",classes:Ws,props:e,classNames:n,styles:r,unstyled:i,attributes:x,vars:l,varsResolver:yF}),j=()=>{h==null||h(),S.closeDropdown()};return a.jsx(Mte,{value:{getStyles:C,store:S,onOptionSubmit:u,size:f,resetSelectionOnOptionHover:m,readOnly:y},children:a.jsx(jn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...w,onChange:_=>!_&&j(),withRoles:!1,unstyled:i,children:s})})},zte=t=>t;sn.extend=zte;sn.classes=Ws;sn.varsResolver=yF;sn.displayName="@mantine/core/Combobox";sn.Target=bF;sn.Dropdown=KO;sn.Options=iE;sn.Option=rE;sn.Search=sE;sn.Empty=ZO;sn.Chevron=bb;sn.Footer=eE;sn.Header=nE;sn.EventsTarget=gF;sn.DropdownTarget=mF;sn.Group=tE;sn.ClearButton=XO;sn.HiddenInput=vF;function xF({children:t,role:e}){const n=E.use(Nf);return n?a.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):a.jsx(a.Fragment,{children:t})}const aE=E.createContext(null),Hte={hiddenInputValuesSeparator:","},oE=Xm(t=>{const{value:e,defaultValue:n,onChange:r,size:i,wrapperProps:s,children:o,readOnly:l,name:u,hiddenInputValuesSeparator:h,hiddenInputProps:f,maxSelectedValues:p,disabled:m,...v}=je("CheckboxGroup",Hte,t),[y,x]=Xi({value:e,defaultValue:n,finalValue:[],onChange:r}),w=C=>{const j=typeof C=="string"?C:C.currentTarget.value;if(l)return;const _=y.includes(j);!_&&p&&y.length>=p||x(_?y.filter(O=>O!==j):[...y,j])},A=C=>{if(m)return!0;if(!p)return!1;const j=y.includes(C),_=y.length>=p;return!j&&_},S=y.join(h);return a.jsx(aE,{value:{value:y,onChange:w,size:i,isDisabled:A},children:a.jsxs(kr.Wrapper,{size:i,...s,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[a.jsx(xF,{role:"group",children:o}),a.jsx("input",{type:"hidden",name:u,value:S,...f})]})})});oE.classes=kr.Wrapper.classes;oE.displayName="@mantine/core/CheckboxGroup";var AF={card:"m_26775b0a"};const wF=E.createContext(null),qte={withBorder:!0},SF=(t,{radius:e})=>({card:{"--card-radius":Zn(e)}}),Lw=Ie(t=>{const e=je("CheckboxCard",qte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,checked:u,mod:h,withBorder:f,value:p,onClick:m,defaultChecked:v,onChange:y,attributes:x,...w}=e,A=ft({name:"CheckboxCard",classes:AF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l,varsResolver:SF,rootSelector:"card"}),S=E.use(aE),[C,j]=Xi({value:typeof u=="boolean"?u:S?S.value.includes(p||""):void 0,defaultValue:v,finalValue:!1,onChange:y});return a.jsx(wF,{value:{checked:C},children:a.jsx(Br,{mod:[{"with-border":f,checked:C},h],...A("card"),...w,role:"checkbox","aria-checked":C,onClick:_=>{m==null||m(_),S==null||S.onChange(p||""),j(!C)}})})});Lw.displayName="@mantine/core/CheckboxCard";Lw.classes=AF;Lw.varsResolver=SF;function Pw({size:t,style:e,...n}){return a.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t!==void 0?{width:fe(t),height:fe(t),...e}:e,"aria-hidden":!0,...n,children:a.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function jF({indeterminate:t,...e}){return t?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:a.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):a.jsx(Pw,{...e})}var CF={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const $te={icon:jF,variant:"filled",radius:"sm"},_F=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const l=hu({color:n||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Ut(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Zn(e),"--checkbox-color":s==="outline"?u:gr(n,t),"--checkbox-icon-color":i?gr(i,t):Ym(o,t)?ed({color:n,theme:t,autoContrast:o}):void 0}}},Fw=Ie(t=>{const e=je("CheckboxIndicator",$te,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,icon:u,indeterminate:h,radius:f,color:p,iconColor:m,autoContrast:v,checked:y,mod:x,variant:w,disabled:A,attributes:S,...C}=e,j=ft({name:"CheckboxIndicator",classes:CF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:S,vars:l,varsResolver:_F,rootSelector:"indicator"}),_=E.use(wF),O=typeof y=="boolean"||typeof h=="boolean"?y||h:(_==null?void 0:_.checked)||!1;return a.jsx(be,{...j("indicator",{variant:w}),variant:w,mod:[{checked:O,disabled:A},x],...C,children:a.jsx(u,{indeterminate:h,...j("icon")})})});Fw.displayName="@mantine/core/CheckboxIndicator";Fw.classes=CF;Fw.varsResolver=_F;var TF={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const kF=TF;function lE({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:i,unstyled:s,children:o,label:l,description:u,id:h,disabled:f,error:p,size:m,labelPosition:v="left",bodyElement:y="div",labelElement:x="label",variant:w,style:A,vars:S,mod:C,attributes:j,..._}){const O=ft({name:t,props:e,className:n,style:A,classes:TF,classNames:r,styles:i,unstyled:s,attributes:j});return a.jsx(be,{...O("root"),__vars:{"--label-fz":Or(m),"--label-lh":Ut(m,"label-lh")},mod:[{"label-position":v},C],variant:w,size:m,..._,children:a.jsxs(be,{component:y,htmlFor:y==="label"?h:void 0,...O("body"),children:[o,a.jsxs("div",{...O("labelWrapper"),"data-disabled":f||void 0,children:[l&&a.jsx(be,{component:x,htmlFor:x==="label"?h:void 0,...O("label"),"data-disabled":f||void 0,children:l}),u&&a.jsx(kr.Description,{size:m,__inheritStyles:!1,...O("description"),children:u}),p&&typeof p!="boolean"&&a.jsx(kr.Error,{size:m,__inheritStyles:!1,...O("error"),children:p})]})]})})}lE.displayName="@mantine/core/InlineInput";var OF={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Qte={labelPosition:"right",icon:jF,withErrorStyles:!0,variant:"filled",radius:"sm"},EF=(t,{radius:e,color:n,size:r,iconColor:i,variant:s,autoContrast:o})=>{const l=hu({color:n||t.primaryColor,theme:t}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Ut(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Zn(e),"--checkbox-color":s==="outline"?u:gr(n,t),"--checkbox-icon-color":i?gr(i,t):Ym(o,t)?ed({color:n,theme:t,autoContrast:o}):void 0}}},Hs=Ie(t=>{var me;const e=je("Checkbox",Qte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,color:u,label:h,id:f,size:p,radius:m,wrapperProps:v,checked:y,labelPosition:x,description:w,error:A,disabled:S,variant:C,indeterminate:j,icon:_,rootRef:O,iconColor:M,onChange:R,autoContrast:N,mod:B,attributes:D,readOnly:L,onClick:U,withErrorStyles:H,ref:z,...I}=e,F=E.useRef(null),$=E.use(aE),G=p||($==null?void 0:$.size),Y=ft({name:"Checkbox",props:e,classes:OF,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:D,vars:l,varsResolver:EF}),{styleProps:W,rest:V}=lb(I),X=Ri(f),ee={checked:($==null?void 0:$.value.includes(V.value))??y,onChange:Qe=>{$==null||$.onChange(Qe),R==null||R(Qe)}},le=((me=$==null?void 0:$.isDisabled)==null?void 0:me.call($,V.value))??!1,ve=S||le;return E.useEffect(()=>{F.current&&(F.current.indeterminate=j||!1,j?F.current.setAttribute("data-indeterminate","true"):F.current.removeAttribute("data-indeterminate"))},[j]),a.jsx(lE,{...Y("root"),__staticSelector:"Checkbox",__stylesApiProps:e,id:X,size:G,labelPosition:x,label:h,description:w,error:A,disabled:ve,classNames:n,styles:s,unstyled:o,"data-checked":ee.checked||y||void 0,variant:C,ref:O,mod:B,attributes:D,inert:V.inert,...W,...v,children:a.jsxs(be,{...Y("inner"),mod:{"data-label-position":x},children:[a.jsx(be,{component:"input",id:X,ref:qn(F,z),mod:{error:!!A},...Y("input",{focusable:!0,variant:C}),...V,...ee,disabled:ve,inert:V.inert,type:"checkbox",onClick:Qe=>{L&&Qe.preventDefault(),U==null||U(Qe)}}),a.jsx(_,{indeterminate:j,...Y("icon")})]})})});Hs.classes={...OF,...kF};Hs.varsResolver=EF;Hs.displayName="@mantine/core/Checkbox";Hs.Group=oE;Hs.Indicator=Fw;Hs.Card=Lw;function hv(t){return"group"in t}function MF({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),i=[];for(let s=0;s<t.length;s+=1){const o=t[s];if(i.length===n)return i;hv(o)&&i.push({group:o.group,items:MF({options:o.items,search:e,limit:n-i.length})}),hv(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Ute(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function RF(t,e=new Set){if(Array.isArray(t))for(const n of t)if(hv(n))RF(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function Wte(t,e){return Array.isArray(t)?t.includes(e):t===e}function DF({data:t,withCheckIcon:e,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:s,renderOption:o}){if(!hv(t)){const u=Wte(r,t.value),h=e&&(u?a.jsx(Pw,{className:Ws.optionsDropdownCheckIcon}):n?a.jsx("div",{className:Ws.optionsDropdownCheckPlaceholder}):null),f=a.jsxs(a.Fragment,{children:[i==="left"&&h,a.jsx("span",{children:t.label}),i==="right"&&h]});return a.jsx(sn.Option,{value:t.value,disabled:t.disabled,className:Pr({[Ws.optionsDropdownOption]:!s}),"data-reverse":i==="right"||void 0,"data-checked":u||void 0,"aria-selected":u,active:u,children:typeof o=="function"?o({option:t,checked:u}):f})}const l=t.items.map(u=>a.jsx(DF,{data:u,value:r,unstyled:s,withCheckIcon:e,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${u.value}`));return a.jsx(sn.Group,{label:t.group,children:l})}function NF({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:i,limit:s,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:u=!0,withCheckIcon:h=!1,withAlignedLabels:f=!1,value:p,checkIconPosition:m,nothingFoundMessage:v,unstyled:y,labelId:x,renderOption:w,scrollAreaProps:A,"aria-label":S}){RF(t);const C=typeof i=="string"?(r||MF)({options:t,search:u?i:"",limit:s??1/0}):t,j=Ute(C),_=C.map(O=>a.jsx(DF,{data:O,withCheckIcon:h,withAlignedLabels:f,value:p,checkIconPosition:m,unstyled:y,renderOption:w},hv(O)?O.group:`${O.value}`));return a.jsx(sn.Dropdown,{hidden:e||n&&j,"data-composed":!0,children:a.jsxs(sn.Options,{labelledBy:x,"aria-label":S,children:[l?a.jsx(ma.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...A,children:_}):_,j&&v&&a.jsx(sn.Empty,{children:v})]})})}const cE=Ie(t=>{const e=je("Autocomplete",{size:"sm"},t),{classNames:n,styles:r,unstyled:i,vars:s,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:h,onFocus:f,onBlur:p,onClick:m,onChange:v,data:y,value:x,defaultValue:w,selectFirstOptionOnChange:A,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:j,readOnly:_,disabled:O,filter:M,limit:R,withScrollArea:N,maxDropdownHeight:B,size:D,id:L,renderOption:U,autoComplete:H,scrollAreaProps:z,onClear:I,clearButtonProps:F,error:$,clearable:G,clearSectionMode:Y,rightSection:W,autoSelectOnBlur:V,openOnFocus:X=!0,attributes:ee,...le}=e,ve=Ri(L),me=fF(y),Qe=GO(me),[We,qe]=Xi({value:x,defaultValue:w,finalValue:"",onChange:v}),ae=Bw({opened:o,defaultOpened:l,onDropdownOpen:()=>{h==null||h(),S&&ae.selectFirstOption()},onDropdownClose:()=>{u==null||u(),setTimeout(ae.resetSelectedOption,0)}}),de=rt=>{qe(rt),ae.resetSelectedOption()},{resolvedClassNames:Ae,resolvedStyles:Te}=Ao({props:e,styles:r,classNames:n});E.useEffect(()=>{A&&ae.selectFirstOption()},[A,We]);const Ge=a.jsx(sn.ClearButton,{...F,onClear:()=>{de(""),I==null||I()}});return a.jsxs(sn,{store:ae,__staticSelector:"Autocomplete",classNames:Ae,styles:Te,unstyled:i,readOnly:_,size:D,attributes:ee,keepMounted:V,onOptionSubmit:rt=>{C==null||C(rt),de(Qe[rt].label),ae.closeDropdown()},...j,children:[a.jsx(sn.Target,{autoComplete:H,withExpandedAttribute:!0,children:a.jsx(Ds,{...le,size:D,__staticSelector:"Autocomplete",__clearSection:Ge,__clearable:G&&!!We&&!O&&!_,__clearSectionMode:Y,rightSection:W,disabled:O,readOnly:_,value:We,error:$,onChange:rt=>{de(rt.currentTarget.value),ae.openDropdown(),A&&ae.selectFirstOption()},onFocus:rt=>{X&&ae.openDropdown(),f==null||f(rt)},onBlur:rt=>{V&&ae.clickSelectedOption(),ae.closeDropdown(),p==null||p(rt)},onClick:rt=>{ae.openDropdown(),m==null||m(rt)},classNames:Ae,styles:Te,unstyled:i,attributes:ee,id:ve})}),a.jsx(NF,{data:me,hidden:_||O,filter:M,search:We,limit:R,hiddenWhenEmpty:!0,withScrollArea:N,maxDropdownHeight:B,unstyled:i,labelId:le.label?`${ve}-label`:void 0,"aria-label":le.label?void 0:le["aria-label"],renderOption:U,scrollAreaProps:z})]})});cE.classes={...Ds.classes,...sn.classes};cE.displayName="@mantine/core/Autocomplete";var IF={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const BF=(t,{radius:e,color:n,gradient:r,variant:i,size:s,autoContrast:o,circle:l})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--badge-height":Ut(s,"badge-height"),"--badge-padding-x":Ut(s,"badge-padding-x"),"--badge-fz":Ut(s,"badge-fz"),"--badge-radius":l||e===void 0?void 0:Zn(e),"--badge-bg":n||i?u.background:void 0,"--badge-color":n||i?u.color:void 0,"--badge-bd":n||i?u.border:void 0,"--badge-dot-color":i==="dot"?gr(n,t):void 0}}},Nr=Zi(t=>{const e=je("Badge",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,radius:u,color:h,gradient:f,leftSection:p,rightSection:m,children:v,variant:y,fullWidth:x,autoContrast:w,circle:A,mod:S,attributes:C,...j}=e,_=ft({name:"Badge",props:e,classes:IF,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:C,vars:l,varsResolver:BF});return a.jsxs(be,{variant:y,mod:[{block:x,circle:A,"with-right-section":!!m,"with-left-section":!!p},S],..._("root",{variant:y}),...j,children:[p&&a.jsx("span",{..._("section"),"data-position":"left",children:p}),a.jsx("span",{..._("label"),children:v}),m&&a.jsx("span",{..._("section"),"data-position":"right",children:m})]})});Nr.classes=IF;Nr.varsResolver=BF;Nr.displayName="@mantine/core/Badge";var LF={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const PF=(t,{color:e,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:s})=>({root:{"--burger-color":e?gr(e,t):void 0,"--burger-size":Ut(n,"burger-size"),"--burger-line-size":r?fe(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":s}}),zw=Ie(t=>{const e=je("Burger",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,opened:u,children:h,transitionDuration:f,transitionTimingFunction:p,lineSize:m,attributes:v,...y}=e,x=ft({name:"Burger",classes:LF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,vars:l,varsResolver:PF});return a.jsxs(Br,{...x("root"),...y,children:[a.jsx(be,{mod:["reduce-motion",{opened:u}],...x("burger")}),h]})});zw.classes=LF;zw.varsResolver=PF;zw.displayName="@mantine/core/Burger";var t0={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const R8={orientation:"horizontal"},FF=(t,{borderWidth:e})=>({group:{"--button-border-width":fe(e)}}),Hw=Ie(t=>{const e=je("ButtonGroup",R8,t),{className:n,style:r,classNames:i,styles:s,unstyled:o,orientation:l,vars:u,borderWidth:h,mod:f,attributes:p,...m}=je("ButtonGroup",R8,t);return a.jsx(be,{...ft({name:"ButtonGroup",props:e,classes:t0,className:n,style:r,classNames:i,styles:s,unstyled:o,attributes:p,vars:u,varsResolver:FF,rootSelector:"group"})("group"),mod:[{"data-orientation":l},f],role:"group",...m})});Hw.classes=t0;Hw.varsResolver=FF;Hw.displayName="@mantine/core/ButtonGroup";const zF=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":Ut(o,"section-height"),"--section-padding-x":Ut(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?Or(o.replace("compact-","")):Or(o),"--section-radius":e===void 0?void 0:Zn(e),"--section-bg":n||i?l.background:void 0,"--section-color":l.color,"--section-bd":n||i?l.border:void 0}}},qw=Ie(t=>{const e=je("ButtonGroupSection",null,t),{className:n,style:r,classNames:i,styles:s,unstyled:o,vars:l,gradient:u,radius:h,autoContrast:f,attributes:p,...m}=e;return a.jsx(be,{...ft({name:"ButtonGroupSection",props:e,classes:t0,className:n,style:r,classNames:i,styles:s,unstyled:o,attributes:p,vars:l,varsResolver:zF,rootSelector:"groupSection"})("groupSection"),...m})});qw.classes=t0;qw.varsResolver=zF;qw.displayName="@mantine/core/ButtonGroupSection";const Vte={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${fe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},HF=(t,{radius:e,color:n,gradient:r,variant:i,size:s,justify:o,autoContrast:l})=>{const u=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Ut(s,"button-height"),"--button-padding-x":Ut(s,"button-padding-x"),"--button-fz":s!=null&&s.includes("compact")?Or(s.replace("compact-","")):Or(s),"--button-radius":e===void 0?void 0:Zn(e),"--button-bg":n||i?u.background:void 0,"--button-hover":n||i?u.hover:void 0,"--button-color":u.color,"--button-bd":n||i?u.border:void 0,"--button-hover-color":n||i?u.hoverColor:void 0}}},Oi=Zi(t=>{const e=je("Button",null,t),{style:n,vars:r,className:i,color:s,disabled:o,children:l,leftSection:u,rightSection:h,fullWidth:f,variant:p,radius:m,loading:v,loaderProps:y,gradient:x,classNames:w,styles:A,unstyled:S,"data-disabled":C,autoContrast:j,mod:_,attributes:O,...M}=e,R=ft({name:"Button",props:e,classes:t0,className:i,style:n,classNames:w,styles:A,unstyled:S,attributes:O,vars:r,varsResolver:HF}),N=!!u,B=!!h;return a.jsxs(Br,{...R("root",{active:!o&&!v&&!C}),unstyled:S,variant:p,disabled:o||v,mod:[{disabled:o||C,loading:v,block:f,"with-left-section":N,"with-right-section":B},_],...M,children:[typeof v=="boolean"&&a.jsx(tc,{mounted:v,transition:Vte,duration:150,children:D=>a.jsx(be,{component:"span",...R("loader",{style:D}),"aria-hidden":!0,children:a.jsx(yo,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),a.jsxs("span",{...R("inner"),children:[u&&a.jsx(be,{component:"span",...R("section"),mod:{position:"left"},children:u}),a.jsx(be,{component:"span",mod:{loading:v},...R("label"),children:l}),h&&a.jsx(be,{component:"span",...R("section"),mod:{position:"right"},children:h})]})]})});Oi.classes=t0;Oi.varsResolver=HF;Oi.displayName="@mantine/core/Button";Oi.Group=Hw;Oi.GroupSection=qw;const[Yte,Gte]=Ki("Card component was not found in tree");var uE={root:"m_e615b15f",section:"m_599a2148"};const $w=Zi(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,withBorder:o,inheritPadding:l,mod:u,...h}=je("CardSection",null,t),f=Gte();return a.jsx(be,{mod:[{"with-border":o,"inherit-padding":l},u],...f.getStyles("section",{className:n,style:r,styles:i,classNames:e}),...h})});$w.classes=uE;$w.displayName="@mantine/core/CardSection";const qF=(t,{padding:e})=>({root:{"--card-padding":Vi(e)}}),Xte={orientation:"vertical"},$r=Zi(t=>{const e=je("Card",Xte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,padding:h,attributes:f,orientation:p,...m}=e,v=ft({name:"Card",props:e,classes:uE,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:f,vars:l,varsResolver:qF}),y=E.Children.toArray(u),x=y.map((w,A)=>{var S;return typeof w=="object"&&w&&"type"in w&&(w.type===$w||((S=w.type)==null?void 0:S.displayName)==="@mantine/core/CardSection")?E.cloneElement(w,{"data-orientation":p,"data-first-section":A===0||void 0,"data-last-section":A===y.length-1||void 0}):w});return a.jsx(Yte,{value:{getStyles:v},children:a.jsx(ub,{unstyled:o,"data-orientation":p,...v("root"),...m,children:x})})});$r.classes=uE;$r.varsResolver=qF;$r.displayName="@mantine/core/Card";$r.Section=$w;var $F={root:"m_4451eb3a"};const dv=Zi(t=>{const e=je("Center",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,inline:u,mod:h,attributes:f,...p}=e,m=ft({name:"Center",props:e,classes:$F,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:f,vars:l});return a.jsx(be,{mod:[{inline:u},h],...m("root"),...p})});dv.classes=$F;dv.displayName="@mantine/core/Center";var QF={root:"m_b183c0a2"};const UF=(t,{color:e})=>({root:{"--code-bg":e?gr(e,t):void 0}}),Qw=Ie(t=>{const e=je("Code",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,color:u,block:h,mod:f,attributes:p,...m}=e,v=ft({name:"Code",props:e,classes:QF,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:p,vars:l,varsResolver:UF});return a.jsx(be,{component:h?"pre":"code",mod:[{block:h},f],...v("root"),...m,dir:"ltr"})});Qw.classes=QF;Qw.varsResolver=UF;Qw.displayName="@mantine/core/Code";const Kte={timeout:1e3};function hE(t){const{children:e,timeout:n,value:r,...i}=je("CopyButton",Kte,t),s=aP({timeout:n}),o=()=>s.copy(r);return a.jsx(a.Fragment,{children:e({copy:o,copied:s.copied,...i})})}hE.displayName="@mantine/core/CopyButton";var WF={root:"m_3eebeb36",label:"m_9e365f20"};const Zte={orientation:"horizontal"},VF=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?gr(e,t):void 0,"--divider-border-style":n,"--divider-size":Ut(r,"divider-size")}}),n0=Ie(t=>{const e=je("Divider",Zte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,color:u,orientation:h,label:f,labelPosition:p,mod:m,attributes:v,...y}=e,x=ft({name:"Divider",classes:WF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,vars:l,varsResolver:VF});return a.jsx(be,{mod:[{orientation:h,withLabel:!!f},m],role:"separator",...x("root"),...y,children:f&&a.jsx(be,{component:"span",mod:{position:p},...x("label"),children:f})})});n0.classes=WF;n0.varsResolver=VF;n0.displayName="@mantine/core/Divider";var YF={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const Jte={variant:"default"},GF=(t,{radius:e})=>({root:{"--fieldset-radius":e===void 0?void 0:Zn(e)}}),Vd=Ie(t=>{const e=je("Fieldset",Jte,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,legend:u,variant:h,children:f,attributes:p,...m}=e,v=ft({name:"Fieldset",classes:YF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:p,vars:l,varsResolver:GF});return a.jsxs(be,{component:"fieldset",variant:h,...v("root",{variant:h}),...m,children:[u&&a.jsx("legend",{...v("legend",{variant:h}),children:u}),f]})});Vd.classes=YF;Vd.varsResolver=GF;Vd.displayName="@mantine/core/Fieldset";function ene(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=typeof e=="number"?e:e.x,i=typeof e=="number"?e:e.y,s=fe(r),o=fe(i),[l,u]=t.split("-");return l==="top"&&(n["--indicator-top"]=o,n["--indicator-translate-y"]="-50%"),l==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),l==="bottom"&&(n["--indicator-bottom"]=o,n["--indicator-translate-y"]="50%"),u==="start"&&(n["--indicator-left"]=s,n["--indicator-translate-x"]="-50%"),u==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),u==="end"&&(n["--indicator-right"]=s,n["--indicator-translate-x"]="50%"),n}var XF={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const tne={position:"top-end",offset:0,showZero:!0},KF=(t,{color:e,position:n,offset:r,size:i,radius:s,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":e?gr(e,t):void 0,"--indicator-text-color":Ym(l,t)?ed({color:e,theme:t,autoContrast:l}):void 0,"--indicator-size":fe(i),"--indicator-radius":s===void 0?void 0:Zn(s),"--indicator-z-index":o==null?void 0:o.toString(),...ene(n,r)}}),Uw=Ie(t=>{const e=je("Indicator",tne,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,position:h,offset:f,inline:p,label:m,radius:v,color:y,withBorder:x,disabled:w,processing:A,zIndex:S,autoContrast:C,maxValue:j,showZero:_,mod:O,attributes:M,...R}=e,N=ft({name:"Indicator",classes:XF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:M,vars:l,varsResolver:KF}),B=!_&&(m===0||m==="0"),D=j!==void 0&&typeof m=="number"&&m>j?`${j}+`:m;return a.jsxs(be,{...N("root"),mod:[{inline:p},O],...R,children:[!w&&!B&&a.jsx(be,{mod:{"with-label":!!m,"with-border":x,processing:A},...N("indicator"),children:D}),u]})});Uw.classes=XF;Uw.varsResolver=KF;Uw.displayName="@mantine/core/Indicator";const nne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],D8={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function N8(t){Object.keys(D8).forEach(e=>{t.style.setProperty(e,D8[e],"important")})}function rne(t){const e=window.getComputedStyle(t);if(e===null)return null;const n={};for(const r of nne)n[r]=e[r];return n.boxSizing===""?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}let Hi=null;function ine(t,e,n=1,r=1/0){Hi||(Hi=document.createElement("textarea"),Hi.setAttribute("tabindex","-1"),Hi.setAttribute("aria-hidden","true"),Hi.setAttribute("aria-label","autosize measurement"),N8(Hi)),Hi.parentNode===null&&document.body.appendChild(Hi);const{paddingSize:i,borderSize:s,sizingStyle:o}=t,{boxSizing:l}=o;Object.keys(o).forEach(m=>{Hi.style[m]=o[m]}),N8(Hi),Hi.value=e;let u=l==="border-box"?Hi.scrollHeight+s:Hi.scrollHeight-i;Hi.value=e,u=l==="border-box"?Hi.scrollHeight+s:Hi.scrollHeight-i,Hi.value="x";const h=Hi.scrollHeight-i;let f=h*n;l==="border-box"&&(f=f+i+s),u=Math.max(f,u);let p=h*r;return l==="border-box"&&(p=p+i+s),u=Math.min(p,u),[u,h]}function sne({maxRows:t,minRows:e,onChange:n,ref:r,...i}){const s=i.value!==void 0,o=E.useRef(null),l=qn(o,r),u=E.useRef(0),h=()=>{const p=o.current;if(!p)return;const m=rne(p);if(!m)return;const[v]=ine(m,p.value||p.placeholder||"x",e,t);u.current!==v&&(u.current=v,p.style.setProperty("height",`${v}px`,"important"))},f=p=>{s||h(),n==null||n(p)};return E.useLayoutEffect(h),E.useEffect(()=>{const p=()=>h();return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),E.useEffect(()=>{const p=()=>h();return document.fonts.addEventListener("loadingdone",p),()=>document.fonts.removeEventListener("loadingdone",p)},[]),E.useEffect(()=>{const p=m=>{var v;if(((v=o.current)==null?void 0:v.form)===m.target&&!s){const y=o.current.value;requestAnimationFrame(()=>{o.current&&y!==o.current.value&&h()})}};return document.body.addEventListener("reset",p),()=>document.body.removeEventListener("reset",p)},[s]),a.jsx("textarea",{...i,onChange:f,ref:l})}const ane={size:"sm"},dE=Ie(t=>{const{autosize:e,maxRows:n,minRows:r,__staticSelector:i,resize:s,...o}=je("Textarea",ane,t),l=e&&fP()!=="test",u=l?{maxRows:n,minRows:r}:{};return a.jsx(Ds,{component:l?sne:"textarea",...o,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":e&&n===void 0||void 0,__vars:{"--input-resize":s},...u})});dE.classes=Ds.classes;dE.displayName="@mantine/core/Textarea";const[one,lne]=Ki("List component was not found in tree");var fE={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const pE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,icon:o,children:l,mod:u,...h}=je("ListItem",null,t),f=lne(),p=o||f.icon,m={classNames:e,styles:i};return a.jsx(be,{...f.getStyles("item",{...m,className:n,style:r}),component:"li",mod:[{"with-icon":!!p,centered:f.center},u],...h,children:a.jsxs("div",{...f.getStyles("itemWrapper",m),children:[p&&a.jsx("span",{...f.getStyles("itemIcon",m),children:p}),a.jsx("span",{...f.getStyles("itemLabel",m),children:l})]})})});pE.classes=fE;pE.displayName="@mantine/core/ListItem";const cne={type:"unordered"},ZF=(t,{size:e,spacing:n})=>({root:{"--list-fz":Or(e),"--list-lh":sP(e),"--list-spacing":Vi(n)}}),Xn=Ie(t=>{const e=je("List",cne,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,type:h,withPadding:f,icon:p,spacing:m,center:v,listStyleType:y,mod:x,attributes:w,...A}=e,S=ft({name:"List",classes:fE,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:w,vars:l,varsResolver:ZF});return a.jsx(one,{value:{center:v,icon:p,getStyles:S},children:a.jsx(be,{...S("root",{style:{listStyleType:y}}),component:h==="unordered"?"ul":"ol",mod:[{"with-padding":f,type:p?"none":y},x],...A,children:u})})});Xn.classes=fE;Xn.varsResolver=ZF;Xn.displayName="@mantine/core/List";Xn.Item=pE;var JF={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const I8={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:xo("overlay")},ez=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),Ww=Ie(t=>{const e=je("LoadingOverlay",I8,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,transitionProps:u,loaderProps:h,overlayProps:f,visible:p,zIndex:m,attributes:v,onEnter:y,onEntered:x,onExit:w,onExited:A,...S}=e,C=Ni(),j=ft({name:"LoadingOverlay",classes:JF,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,vars:l,varsResolver:ez}),_={...I8.overlayProps,...f};return a.jsx(tc,{transition:"fade",...u,mounted:!!p,onEnter:y,onEntered:x,onExit:w,onExited:A,children:O=>a.jsxs(be,{...j("root",{style:O}),...S,children:[a.jsx(yo,{unstyled:o,...h,...j("loader",{className:h==null?void 0:h.className,style:h==null?void 0:h.style})}),a.jsx(wf,{..._,...j("overlay",{className:_==null?void 0:_.className,style:_==null?void 0:_.style}),darkHidden:!0,unstyled:o,color:(f==null?void 0:f.color)||C.white}),a.jsx(wf,{..._,...j("overlay",{className:_==null?void 0:_.className,style:_==null?void 0:_.style}),lightHidden:!0,unstyled:o,color:(f==null?void 0:f.color)||C.colors.dark[5]})]})})});Ww.classes=JF;Ww.varsResolver=ez;Ww.displayName="@mantine/core/LoadingOverlay";const[une,nd]=Ki("Menu component was not found in the tree");var rd={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const mE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("MenuDivider",null,t);return a.jsx(be,{...nd().getStyles("divider",{className:n,style:r,styles:i,classNames:e}),...o})});mE.classes=rd;mE.displayName="@mantine/core/MenuDivider";const gE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:h,ref:f,...p}=je("MenuDropdown",null,t),m=E.useRef(null),v=nd(),y=Yi(u,A=>{var S,C;(A.key==="ArrowUp"||A.key==="ArrowDown")&&(A.preventDefault(),(C=(S=m.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),x=Yi(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),w=Yi(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return a.jsxs(jn.Dropdown,{...p,onMouseEnter:x,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:qn(f,m),...v.getStyles("dropdown",{className:n,style:r,styles:i,classNames:e,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[v.withInitialFocusPlaceholder&&a.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),h]})});gE.classes=rd;gE.displayName="@mantine/core/MenuDropdown";const fv=E.createContext(null),vE=Zi(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,color:o,closeMenuOnClick:l,leftSection:u,rightSection:h,children:f,disabled:p,"data-disabled":m,ref:v,...y}=je("MenuItem",null,t),x=nd(),w=E.use(fv),A=Ni(),{dir:S}=Df(),C=E.useRef(null),j=y,_=Yi(j.onClick,()=>{m||(typeof l=="boolean"?l&&x.closeDropdownImmediately():x.closeOnItemClick&&x.closeDropdownImmediately())}),O=o?A.variantColorResolver({color:o,theme:A,variant:"light"}):void 0,M=o?hu({color:o,theme:A}):null,R=Yi(j.onKeyDown,N=>{N.key==="ArrowLeft"&&w&&(w.close(),w.focusParentItem())});return a.jsxs(Br,{onMouseDown:N=>N.preventDefault(),...y,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,...x.getStyles("item",{className:n,style:r,styles:i,classNames:e}),ref:qn(C,v),role:"menuitem",disabled:p,"data-menu-item":!0,"data-disabled":p||m||void 0,"data-mantine-stop-propagation":!0,onClick:_,onKeyDown:mw({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:S,orientation:"vertical",onKeyDown:R}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[u&&a.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:e}),"data-position":"left",children:u}),f&&a.jsx("div",{...x.getStyles("itemLabel",{styles:i,classNames:e}),children:f}),h&&a.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:e}),"data-position":"right",children:h})]})});vE.classes=rd;vE.displayName="@mantine/core/MenuItem";const bE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("MenuLabel",null,t);return a.jsx(be,{...nd().getStyles("label",{className:n,style:r,styles:i,classNames:e}),...o})});bE.classes=rd;bE.displayName="@mantine/core/MenuLabel";const yE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:h,ref:f,...p}=je("MenuSubDropdown",null,t),m=E.useRef(null),v=nd(),y=E.use(fv),x=Yi(o,y==null?void 0:y.open),w=Yi(l,y==null?void 0:y.close);return a.jsx(jn.Dropdown,{...p,onMouseEnter:x,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:qn(f,m),...v.getStyles("dropdown",{className:n,style:r,styles:i,classNames:e,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:h})});yE.classes=rd;yE.displayName="@mantine/core/MenuSubDropdown";const xE=Zi(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,color:o,leftSection:l,rightSection:u,children:h,disabled:f,"data-disabled":p,closeMenuOnClick:m,ref:v,...y}=je("MenuSubItem",null,t),x=nd(),w=E.use(fv),A=Ni(),{dir:S}=Df(),C=E.useRef(null),j=y,_=o?A.variantColorResolver({color:o,theme:A,variant:"light"}):void 0,O=o?hu({color:o,theme:A}):null,M=Yi(j.onKeyDown,D=>{D.key==="ArrowRight"&&(w==null||w.open(),w==null||w.focusFirstItem()),D.key==="ArrowLeft"&&(w!=null&&w.parentContext)&&(w.parentContext.close(),w.parentContext.focusParentItem())}),R=Yi(j.onClick,()=>{!p&&m&&x.closeDropdownImmediately()}),N=Yi(j.onMouseEnter,w==null?void 0:w.open),B=Yi(j.onMouseLeave,w==null?void 0:w.close);return a.jsxs(Br,{onMouseDown:D=>D.preventDefault(),...y,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,...x.getStyles("item",{className:n,style:r,styles:i,classNames:e}),ref:qn(C,v),role:"menuitem",disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:N,onMouseLeave:B,onClick:R,onKeyDown:mw({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:S,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":O!=null&&O.isThemeColor&&(O==null?void 0:O.shade)===void 0?`var(--mantine-color-${O.color}-6)`:_==null?void 0:_.color,"--menu-item-hover":_==null?void 0:_.hover},children:[l&&a.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:e}),"data-position":"left",children:l}),h&&a.jsx("div",{...x.getStyles("itemLabel",{styles:i,classNames:e}),children:h}),a.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:e}),"data-position":"right",children:u||a.jsx(km,{...x.getStyles("chevron"),size:14})})]})});xE.classes=rd;xE.displayName="@mantine/core/MenuSubItem";function tz({children:t,refProp:e}){if(!dO(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return nd(),a.jsx(jn.Target,{refProp:e,popupType:"menu",children:t})}tz.displayName="@mantine/core/MenuSubTarget";const hne={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function r0(t){const{children:e,closeDelay:n,openDelay:r,...i}=je("MenuSub",hne,t),s=Ri(),[o,{open:l,close:u}]=ob(!1),h=E.use(fv),{openDropdown:f,closeDropdown:p}=d7({open:l,close:u,closeDelay:n,openDelay:r}),m=()=>window.setTimeout(()=>{var y,x;(x=(y=document.getElementById(`${s}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||x.focus()},16),v=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${s}-target`))==null||y.focus()},16);return a.jsx(fv,{value:{opened:o,close:p,open:f,focusFirstItem:m,focusParentItem:v,parentContext:h},children:a.jsx(jn,{opened:o,withinPortal:!1,withArrow:!1,id:s,...i,children:e})})}r0.extend=t=>t;r0.displayName="@mantine/core/MenuSub";r0.Target=tz;r0.Dropdown=yE;r0.Item=xE;const dne={refProp:"ref"};function nz(t){const{children:e,refProp:n,...r}=je("MenuTarget",dne,t),i=Rf(e);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=nd(),o=i.props,l=Yi(o.onClick,()=>{s.trigger==="click"?s.toggleDropdown():s.trigger==="click-hover"&&(s.setOpenedViaClick(!0),s.opened||s.openDropdown())}),u=Yi(o.onMouseEnter,()=>(s.trigger==="hover"||s.trigger==="click-hover")&&s.openDropdown()),h=Yi(o.onMouseLeave,()=>{(s.trigger==="hover"||s.trigger==="click-hover"&&!s.openedViaClick)&&s.closeDropdown()});return a.jsx(jn.Target,{refProp:n,popupType:"menu",...r,children:E.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:h,"data-expanded":s.opened?!0:void 0})})}nz.displayName="@mantine/core/MenuTarget";const fne={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},mr=Ie(t=>{const e=je("Menu",fne,t),{children:n,onOpen:r,onClose:i,opened:s,defaultOpened:o,trapFocus:l,onChange:u,closeOnItemClick:h,loop:f,closeOnEscape:p,trigger:m,openDelay:v,closeDelay:y,classNames:x,styles:w,unstyled:A,variant:S,vars:C,menuItemTabIndex:j,keepMounted:_,withInitialFocusPlaceholder:O,attributes:M,...R}=e,N=ft({name:"Menu",classes:rd,props:e,classNames:x,styles:w,unstyled:A,attributes:M}),[B,D]=Xi({value:s,defaultValue:o,finalValue:!1,onChange:u}),[L,U]=E.useState(!1),H=()=>{D(!1),U(!1),B&&(i==null||i())},z=()=>{D(!0),!B&&(r==null||r())},I=()=>{B?H():z()},{openDropdown:F,closeDropdown:$}=d7({open:z,close:H,closeDelay:y,openDelay:v}),G=V=>gX("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:Y,resolvedStyles:W}=Ao({classNames:x,styles:w,props:e});return a.jsx(une,{value:{getStyles:N,opened:B,toggleDropdown:I,getItemIndex:G,openedViaClick:L,setOpenedViaClick:U,closeOnItemClick:h,closeDropdown:m==="click"?H:$,openDropdown:m==="click"?z:F,closeDropdownImmediately:H,loop:f,trigger:m,unstyled:A,menuItemTabIndex:j,withInitialFocusPlaceholder:O},children:a.jsx(jn,{returnFocus:!0,...R,opened:B,onChange:I,defaultOpened:o,trapFocus:_?!1:l,closeOnEscape:p,__staticSelector:"Menu",classNames:Y,styles:W,unstyled:A,variant:S,keepMounted:_,children:n})})});mr.displayName="@mantine/core/Menu";mr.classes=rd;mr.Item=vE;mr.Label=bE;mr.Dropdown=gE;mr.Target=nz;mr.Divider=mE;mr.Sub=r0;const[pne,i0]=Ki("Modal component was not found in tree");var fu={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Vw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ModalBody",null,t);return a.jsx(q7,{...i0().getStyles("body",{classNames:e,style:r,styles:i,className:n}),...o})});Vw.classes=fu;Vw.displayName="@mantine/core/ModalBody";const Yw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ModalCloseButton",null,t);return a.jsx($7,{...i0().getStyles("close",{classNames:e,style:r,styles:i,className:n}),...o})});Yw.classes=fu;Yw.displayName="@mantine/core/ModalCloseButton";const Gw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,children:o,__hidden:l,...u}=je("ModalContent",null,t),h=i0(),f=h.scrollAreaComponent||ite;return a.jsx(Q7,{...h.getStyles("content",{className:n,style:r,styles:i,classNames:e}),innerProps:h.getStyles("inner",{className:n,style:r,styles:i,classNames:e}),"data-full-screen":h.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...u,children:a.jsx(f,{style:{maxHeight:h.fullScreen?"100dvh":`calc(100dvh - (${fe(h.yOffset)} * 2))`},children:o})})});Gw.classes=fu;Gw.displayName="@mantine/core/ModalContent";const Xw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ModalHeader",null,t);return a.jsx(U7,{...i0().getStyles("header",{classNames:e,style:r,styles:i,className:n}),...o})});Xw.classes=fu;Xw.displayName="@mantine/core/ModalHeader";const Kw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ModalOverlay",null,t);return a.jsx(W7,{...i0().getStyles("overlay",{classNames:e,style:r,styles:i,className:n}),...o})});Kw.classes=fu;Kw.displayName="@mantine/core/ModalOverlay";const mne={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xo("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},rz=(t,{radius:e,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":e===void 0?void 0:Zn(e),"--modal-size":Ut(n,"modal-size"),"--modal-y-offset":fe(r),"--modal-x-offset":fe(i)}}),yb=Ie(t=>{const e=je("ModalRoot",mne,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,yOffset:u,scrollAreaComponent:h,radius:f,fullScreen:p,centered:m,xOffset:v,__staticSelector:y,attributes:x,...w}=e,A=ft({name:y,classes:fu,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l,varsResolver:rz});return a.jsx(pne,{value:{yOffset:u,scrollAreaComponent:h,getStyles:A,fullScreen:p},children:a.jsx(H7,{...A("root"),"data-full-screen":p||void 0,"data-centered":m||void 0,"data-offset-scrollbars":h===ma.Autosize||void 0,unstyled:o,...w})})});yb.classes=fu;yb.varsResolver=rz;yb.displayName="@mantine/core/ModalRoot";const iz=E.createContext(null);function sz({children:t}){const[e,n]=E.useState([]),[r,i]=E.useState(xo("modal"));return a.jsx(iz,{value:{stack:e,addModal:(s,o)=>{n(l=>[...new Set([...l,s])]),i(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:s=>n(o=>o.filter(l=>l!==s)),getZIndex:s=>`calc(${r} + ${e.indexOf(s)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}sz.displayName="@mantine/core/ModalStack";const Zw=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ModalTitle",null,t);return a.jsx(V7,{...i0().getStyles("title",{classNames:e,style:r,styles:i,className:n}),...o})});Zw.classes=fu;Zw.displayName="@mantine/core/ModalTitle";const gne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xo("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ua=Ie(t=>{const{title:e,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:s,children:o,radius:l,opened:u,stackId:h,zIndex:f,...p}=je("Modal",gne,t),m=E.use(iz),v=!!e||i,y=m&&h?{closeOnEscape:m.currentId===h,trapFocus:m.currentId===h,zIndex:m.getZIndex(h)}:{},x=n===!1?!1:h&&m?m.currentId===h:u;return E.useEffect(()=>{m&&h&&(u?m.addModal(h,f||xo("modal")):m.removeModal(h))},[u,h,f]),a.jsxs(yb,{radius:l,opened:u,zIndex:m&&h?m.getZIndex(h):f,...p,...y,children:[n&&a.jsx(Kw,{visible:x,transitionProps:m&&h?{duration:0}:void 0,...r}),a.jsxs(Gw,{radius:l,__hidden:m&&h&&u?h!==m.currentId:!1,children:[v&&a.jsxs(Xw,{children:[e&&a.jsx(Zw,{children:e}),i&&a.jsx(Yw,{...s})]}),a.jsx(Vw,{children:o})]})]})});Ua.classes=fu;Ua.displayName="@mantine/core/Modal";Ua.Root=yb;Ua.Overlay=Kw;Ua.Content=Gw;Ua.Body=Vw;Ua.Header=Xw;Ua.Title=Zw;Ua.CloseButton=Yw;Ua.Stack=sz;const Jw=E.createContext(null);var e2={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const az=E.createContext(null),oz=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?Ut(e):Ut(n,"pg-gap")}}),t2=Ie(t=>{var y;const e=je("PillGroup",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,size:u,disabled:h,attributes:f,...p}=e,m=((y=E.use(Jw))==null?void 0:y.size)||u||void 0,v=ft({name:"PillGroup",classes:e2,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:f,vars:l,varsResolver:oz,stylesCtx:{size:m},rootSelector:"group"});return a.jsx(az,{value:{size:m,disabled:h},children:a.jsx(be,{size:m,...v("group"),...p})})});t2.classes=e2;t2.varsResolver=oz;t2.displayName="@mantine/core/PillGroup";const vne={variant:"default"},lz=(t,{radius:e},{size:n})=>({root:{"--pill-fz":Ut(n,"pill-fz"),"--pill-height":Ut(n,"pill-height"),"--pill-radius":e===void 0?void 0:Zn(e)}}),Ql=Ie(t=>{const e=je("Pill",vne,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,variant:u,children:h,withRemoveButton:f,onRemove:p,removeButtonProps:m,radius:v,size:y,disabled:x,mod:w,attributes:A,...S}=e,C=E.use(az),j=E.use(Jw),_=y||(C==null?void 0:C.size)||void 0,O=(j==null?void 0:j.variant)==="filled"?"contrast":u||"default",M=ft({name:"Pill",classes:e2,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:A,vars:l,varsResolver:lz,stylesCtx:{size:_}});return a.jsxs(be,{component:"span",variant:O,size:_,...M("root",{variant:O}),mod:[{"with-remove":f&&!x,disabled:x||(C==null?void 0:C.disabled)},w],...S,children:[a.jsx("span",{...M("label"),children:h}),f&&a.jsx(ml,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...m,...M("remove",{className:m==null?void 0:m.className,style:m==null?void 0:m.style}),onMouseDown:R=>{var N;R.preventDefault(),R.stopPropagation(),(N=m==null?void 0:m.onMouseDown)==null||N.call(m,R)},onClick:R=>{var N;R.stopPropagation(),p==null||p(),(N=m==null?void 0:m.onClick)==null||N.call(m,R)}})]})});Ql.classes=e2;Ql.varsResolver=lz;Ql.displayName="@mantine/core/Pill";Ql.Group=t2;var cz={field:"m_45c4369d"};const bne={type:"visible"},AE=Ie(t=>{const e=je("PillsInputField",bne,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,type:u,disabled:h,id:f,pointer:p,mod:m,attributes:v,ref:y,...x}=e,w=E.use(Jw),A=E.use(Nf),S=ft({name:"PillsInputField",classes:cz,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,rootSelector:"field"}),C=h||(w==null?void 0:w.disabled);return a.jsx(be,{component:"input",ref:qn(y,w==null?void 0:w.fieldRef),"data-type":u,disabled:C,mod:[{disabled:C,pointer:p},m],...S("field"),...x,id:(A==null?void 0:A.inputId)||f,"aria-invalid":w==null?void 0:w.hasError,"aria-describedby":A==null?void 0:A.describedBy,type:"text",onMouseDown:j=>!p&&j.stopPropagation()})});AE.classes=cz;AE.displayName="@mantine/core/PillsInputField";const yne={size:"sm"},Qp=Ie(t=>{const{children:e,onMouseDown:n,onClick:r,size:i,disabled:s,__staticSelector:o,error:l,variant:u,...h}=je("PillsInput",yne,t),f=E.useRef(null);return a.jsx(Jw,{value:{fieldRef:f,size:i,disabled:s,hasError:!!l,variant:u},children:a.jsx(Ds,{size:i,error:l,variant:u,component:"div","data-no-overflow":!0,onMouseDown:p=>{var m;p.preventDefault(),n==null||n(p),(m=f.current)==null||m.focus()},onClick:p=>{var m,v;p.preventDefault(),(m=p.currentTarget.closest("fieldset"))!=null&&m.disabled||((v=f.current)==null||v.focus(),r==null||r(p))},...h,multiline:!0,disabled:s,__staticSelector:o||"PillsInput",withAria:!1,children:e})})});Qp.displayName="@mantine/core/PillsInput";Qp.classes=Ds.classes;Qp.Field=AE;var uz={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const xne={withCloseButton:!0},hz=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:Zn(e),"--notification-color":n?gr(n,t):void 0}}),n2=Ie(t=>{const e=je("Notification",xne,t),{className:n,color:r,radius:i,loading:s,withCloseButton:o,withBorder:l,title:u,icon:h,children:f,onClose:p,closeButtonProps:m,classNames:v,style:y,styles:x,unstyled:w,vars:A,mod:S,loaderProps:C,role:j,attributes:_,...O}=e,M=ft({name:"Notification",classes:uz,props:e,className:n,style:y,classNames:v,styles:x,unstyled:w,attributes:_,vars:A,varsResolver:hz});return a.jsxs(be,{...M("root"),mod:[{"data-with-icon":!!h||s,"data-with-border":l},S],role:j||"alert",...O,children:[h&&!s&&a.jsx("div",{...M("icon"),children:h}),s&&a.jsx(yo,{size:28,color:r,...M("loader"),...C}),a.jsxs("div",{...M("body"),children:[u&&a.jsx("div",{...M("title"),children:u}),a.jsx(be,{...M("description"),mod:{"data-with-title":!!u},children:f})]}),o&&a.jsx(ml,{iconSize:16,color:"gray",...m,unstyled:w,onClick:R=>{var N;(N=m==null?void 0:m.onClick)==null||N.call(m,R),p==null||p()},...M("closeButton")})]})});n2.classes=uz;n2.varsResolver=hz;n2.displayName="@mantine/core/Notification";function dz(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var Om;(function(t){t.event="event",t.props="prop"})(Om||(Om={}));function dh(){}function Ane(t){var e,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e&&r.length===e.length&&r.every(function(s,o){return s===e[o]})||(e=r,n=t.apply(void 0,r)),n}}function pv(t){return!!(t||"").match(/\d/)}function jh(t){return t==null}function wne(t){return typeof t=="number"&&isNaN(t)}function fz(t){return jh(t)||wne(t)||typeof t=="number"&&!isFinite(t)}function pz(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Sne(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function jne(t,e,n){var r=Sne(n),i=t.search(/[1-9]/);return i=i===-1?t.length:i,t.substring(0,i)+t.substring(i,t.length).replace(r,"$1"+e)}function B8(t){var e=E.useRef(t);e.current=t;var n=E.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e.current.apply(e,r)});return n.current}function wE(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var i=t.split("."),s=i[0],o=i[1]||"";return{beforeDecimal:s,afterDecimal:o,hasNegation:n,addNegation:r}}function Cne(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")}function mz(t,e,n){for(var r="",i=n?"0":"",s=0;s<=e-1;s++)r+=t[s]||i;return r}function L8(t,e){return Array(e+1).join(t)}function gz(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),i=r[0],s=r[1];if(s=Number(s),!s)return n+i;i=i.replace(".","");var o=1+s,l=i.length;return o<0?i="0."+L8("0",Math.abs(o))+i:o>=l?i=i+L8("0",o-l):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function P8(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,i=wE(t),s=i.beforeDecimal,o=i.afterDecimal,l=i.hasNegation,u=parseFloat("0."+(o||"0")),h=o.length<=e?"0."+o:u.toFixed(e),f=h.split("."),p=s;s&&Number(f[0])&&(p=s.split("").reverse().reduce(function(x,w,A){return x.length>A?(Number(x[0])+Number(w)).toString()+x.substring(1,x.length):w+x},f[0]));var m=mz(f[1]||"",e,n),v=l?"-":"",y=r?".":"";return""+v+p+y+m}function qd(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var vz=Ane(function(t,e){for(var n=0,r=0,i=t.length,s=e.length;t[n]===e[n]&&n<i;)n++;for(;t[i-1-r]===e[s-1-r]&&s-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:s-r}}}),_ne=function(t,e){var n=Math.min(t.selectionStart,e);return{from:{start:n,end:t.selectionEnd},to:{start:n,end:e}}};function Tne(t,e,n){return Math.min(Math.max(t,e),n)}function HC(t){return Math.max(t.selectionStart,t.selectionEnd)}function kne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function One(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function Ene(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,i=t.formattedValueIndex;return e[r]===n[i]}function Mne(t,e,n,r,i,s,o){o===void 0&&(o=Ene);var l=i.findIndex(function(j){return j}),u=t.slice(0,l);!e&&!n.startsWith(u)&&(e=u,n=u+n,r=r+u.length);for(var h=n.length,f=t.length,p={},m=new Array(h),v=0;v<h;v++){m[v]=-1;for(var y=0,x=f;y<x;y++){var w=o({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:v,formattedValueIndex:y});if(w&&p[y]!==!0){m[v]=y,p[y]=!0;break}}}for(var A=r;A<h&&(m[A]===-1||!s(n[A]));)A++;var S=A===h||m[A]===-1?f:m[A];for(A=r-1;A>0&&m[A]===-1;)A--;var C=A===-1||m[A]===-1?0:m[A]+1;return C>S?S:r-C<S-r?C:S}function F8(t,e,n,r){var i=t.length;if(e=Tne(e,0,i),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=i&&!n[e];)e++;e>i&&(e=n.lastIndexOf(!0))}return e===-1&&(e=i),e}function Rne(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(pv(t[n])||pv(t[n-1]));return e}function bz(t,e,n,r,i,s){s===void 0&&(s=dh);var o=B8(function(y,x){var w,A;return fz(y)?(A="",w=""):typeof y=="number"||x?(A=typeof y=="number"?gz(y):y,w=r(A)):(A=i(y,void 0),w=r(A)),{formattedValue:w,numAsString:A}}),l=E.useState(function(){return o(jh(t)?e:t,n)}),u=l[0],h=l[1],f=B8(function(y,x){y.formattedValue!==u.formattedValue&&h({formattedValue:y.formattedValue,numAsString:y.value}),s(y,x)}),p=t,m=n;jh(t)&&(p=u.numAsString,m=!0);var v=o(p,m);return E.useMemo(function(){h(v)},[v.formattedValue]),E.useEffect(function(){if(!jh(e)&&jh(t)&&u.formattedValue!==""){var y=parseFloat(u.numAsString);f({formattedValue:u.formattedValue,value:u.numAsString,floatValue:isNaN(y)?void 0:y},{event:void 0,source:Om.props})}},[]),[u,f]}function Dne(t){return t.replace(/[^0-9]/g,"")}function Nne(t){return t}function Ine(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,i=t.renderText,s=t.getInputRef,o=t.format;o===void 0&&(o=Nne);var l=t.removeFormatting;l===void 0&&(l=Dne);var u=t.defaultValue,h=t.valueIsNumericString,f=t.onValueChange,p=t.isAllowed,m=t.onChange;m===void 0&&(m=dh);var v=t.onKeyDown;v===void 0&&(v=dh);var y=t.onMouseUp;y===void 0&&(y=dh);var x=t.onFocus;x===void 0&&(x=dh);var w=t.onBlur;w===void 0&&(w=dh);var A=t.value,S=t.getCaretBoundary;S===void 0&&(S=Rne);var C=t.isValidInputCharacter;C===void 0&&(C=pv);var j=t.isCharacterSame,_=dz(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),O=bz(A,u,!!h,o,l,f),M=O[0],R=M.formattedValue,N=M.numAsString,B=O[1],D=E.useRef(),L=E.useRef({formattedValue:R,numAsString:N}),U=function(Ue,Be){L.current={formattedValue:Ue.formattedValue,numAsString:Ue.value},B(Ue,Be)},H=E.useState(!1),z=H[0],I=H[1],F=E.useRef(null),$=E.useRef({setCaretTimeout:null,focusTimeout:null});E.useEffect(function(){return I(!0),function(){clearTimeout($.current.setCaretTimeout),clearTimeout($.current.focusTimeout)}},[]);var G=o,Y=function(Ue,Be){var Ee=parseFloat(Be);return{formattedValue:Ue,value:Be,floatValue:isNaN(Ee)?void 0:Ee}},W=function(Ue,Be,Ee){Ue.selectionStart===0&&Ue.selectionEnd===Ue.value.length||(qd(Ue,Be),$.current.setCaretTimeout=setTimeout(function(){Ue.value===Ee&&Ue.selectionStart!==Be&&qd(Ue,Be)},0))},V=function(Ue,Be,Ee){return F8(Ue,Be,S(Ue),Ee)},X=function(Ue,Be,Ee){var Ke=S(Be),Dt=Mne(Be,R,Ue,Ee,Ke,C,j);return Dt=F8(Be,Dt,Ke),Dt},ee=function(Ue){var Be=Ue.formattedValue;Be===void 0&&(Be="");var Ee=Ue.input,Ke=Ue.source,Dt=Ue.event,Je=Ue.numAsString,it;if(Ee){var Xe=Ue.inputValue||Ee.value,Oe=HC(Ee);Ee.value=Be,it=X(Xe,Be,Oe),it!==void 0&&W(Ee,it,Be)}Be!==R&&U(Y(Be,Je),{event:Dt,source:Ke})};E.useEffect(function(){var Ue=L.current,Be=Ue.formattedValue,Ee=Ue.numAsString;(R!==Be||N!==Ee)&&U(Y(R,N),{event:void 0,source:Om.props})},[R,N]);var le=F.current?HC(F.current):void 0,ve=typeof window<"u"?E.useLayoutEffect:E.useEffect;ve(function(){var Ue=F.current;if(R!==L.current.formattedValue&&Ue){var Be=X(L.current.formattedValue,R,le);Ue.value=R,W(Ue,Be,R)}},[R]);var me=function(Ue,Be,Ee){var Ke=Be.target,Dt=D.current?_ne(D.current,Ke.selectionEnd):vz(R,Ue),Je=Object.assign(Object.assign({},Dt),{lastValue:R}),it=l(Ue,Je),Xe=G(it);if(it=l(Xe,void 0),p&&!p(Y(Xe,it))){var Oe=Be.target,$e=HC(Oe),lt=X(Ue,R,$e);return Oe.value=R,W(Oe,lt,R),!1}return ee({formattedValue:Xe,numAsString:it,inputValue:Ue,event:Be,source:Ee,input:Be.target}),!0},Qe=function(Ue,Be){Be===void 0&&(Be=0);var Ee=Ue.selectionStart,Ke=Ue.selectionEnd;D.current={selectionStart:Ee,selectionEnd:Ke+Be}},We=function(Ue){var Be=Ue.target,Ee=Be.value,Ke=me(Ee,Ue,Om.event);Ke&&m(Ue),D.current=void 0},qe=function(Ue){var Be=Ue.target,Ee=Ue.key,Ke=Be.selectionStart,Dt=Be.selectionEnd,Je=Be.value;Je===void 0&&(Je="");var it;Ee==="ArrowLeft"||Ee==="Backspace"?it=Math.max(Ke-1,0):Ee==="ArrowRight"?it=Math.min(Ke+1,Je.length):Ee==="Delete"&&(it=Ke);var Xe=0;Ee==="Delete"&&Ke===Dt&&(Xe=1);var Oe=Ee==="ArrowLeft"||Ee==="ArrowRight";if(it===void 0||Ke!==Dt&&!Oe){v(Ue),Qe(Be,Xe);return}var $e=it;if(Oe){var lt=Ee==="ArrowLeft"?"left":"right";$e=V(Je,it,lt),$e!==it&&Ue.preventDefault()}else Ee==="Delete"&&!C(Je[it])?$e=V(Je,it,"right"):Ee==="Backspace"&&!C(Je[it])&&($e=V(Je,it,"left"));$e!==it&&W(Be,$e,Je),v(Ue),Qe(Be,Xe)},ae=function(Ue){var Be=Ue.target,Ee=function(){var Ke=Be.selectionStart,Dt=Be.selectionEnd,Je=Be.value;if(Je===void 0&&(Je=""),Ke===Dt){var it=V(Je,Ke);it!==Ke&&W(Be,it,Je)}};Ee(),requestAnimationFrame(function(){Ee()}),y(Ue),Qe(Be)},de=function(Ue){Ue.persist&&Ue.persist();var Be=Ue.target,Ee=Ue.currentTarget;F.current=Be,$.current.focusTimeout=setTimeout(function(){var Ke=Be.selectionStart,Dt=Be.selectionEnd,Je=Be.value;Je===void 0&&(Je="");var it=V(Je,Ke);it!==Ke&&!(Ke===0&&Dt===Je.length)&&W(Be,it,Je),x(Object.assign(Object.assign({},Ue),{currentTarget:Ee}))},0)},Ae=function(Ue){F.current=null,clearTimeout($.current.focusTimeout),clearTimeout($.current.setCaretTimeout),w(Ue)},Te=z&&kne()?"numeric":void 0,Ge=Object.assign({inputMode:Te},_,{type:e,value:R,onChange:We,onKeyDown:qe,onMouseUp:ae,onFocus:de,onBlur:Ae});if(n==="text")return i?Ln.createElement(Ln.Fragment,null,i(R,_)||null):Ln.createElement("span",Object.assign({},_,{ref:s}),R);if(r){var rt=r;return Ln.createElement(rt,Object.assign({},Ge,{ref:s}))}return Ln.createElement("input",Object.assign({},Ge,{ref:s}))}function z8(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix;i===void 0&&(i="");var s=e.suffix;s===void 0&&(s="");var o=e.allowNegative,l=e.thousandsGroupStyle;if(l===void 0&&(l="thousand"),t===""||t==="-")return t;var u=r2(e),h=u.thousandSeparator,f=u.decimalSeparator,p=n!==0&&t.indexOf(".")!==-1||n&&r,m=wE(t,o),v=m.beforeDecimal,y=m.afterDecimal,x=m.addNegation;return n!==void 0&&(y=mz(y,n,!!r)),h&&(v=jne(v,h,l)),i&&(v=i+v),s&&(y=y+s),x&&(v="-"+v),t=v+(p&&f||"")+y,t}function r2(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function Bne(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),s=r.test(t);return t=t.replace(/-/g,""),i&&!s&&e&&(t="-"+t),t}function Lne(t,e){return new RegExp("(^-)|[0-9]|"+pz(t),"g")}function Pne(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function Fne(t,e,n){var r;e===void 0&&(e=One(t));var i=n.allowNegative,s=n.prefix;s===void 0&&(s="");var o=n.suffix;o===void 0&&(o="");var l=n.decimalScale,u=e.from,h=e.to,f=h.start,p=h.end,m=r2(n),v=m.allowedDecimalSeparators,y=m.decimalSeparator,x=t[p]===y;if(pv(t)&&(t===s||t===o)&&e.lastValue==="")return t;if(p-f===1&&v.indexOf(t[f])!==-1){var w=l===0?"":y;t=t.substring(0,f)+w+t.substring(f+1,t.length)}var A=function(F,$,G){var Y=!1,W=!1;s.startsWith("-")?Y=!1:F.startsWith("--")?(Y=!1,W=!0):o.startsWith("-")&&F.length===o.length?Y=!1:F[0]==="-"&&(Y=!0);var V=Y?1:0;return W&&(V=2),V&&(F=F.substring(V),$-=V,G-=V),{value:F,start:$,end:G,hasNegation:Y}},S=A(t,f,p),C=S.hasNegation;r=S,t=r.value,f=r.start,p=r.end;var j=A(e.lastValue,u.start,u.end),_=j.start,O=j.end,M=j.value,R=t.substring(f,p);t.length&&M.length&&(_>M.length-o.length||O<s.length)&&!(R&&o.startsWith(R))&&(t=M);var N=0;t.startsWith(s)?N+=s.length:f<s.length&&(N=f),t=t.substring(N),p-=N;var B=t.length,D=t.length-o.length;t.endsWith(o)?B=D:(p>D||p>t.length-o.length)&&(B=p),t=t.substring(0,B),t=Bne(C?"-"+t:t,i),t=(t.match(Lne(y))||[]).join("");var L=t.indexOf(y);t=t.replace(new RegExp(pz(y),"g"),function(F,$){return $===L?".":""});var U=wE(t,i),H=U.beforeDecimal,z=U.afterDecimal,I=U.addNegation;return h.end-h.start<u.end-u.start&&H===""&&x&&!parseFloat(z)&&(t=I?"-":""),t}function zne(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var i=Array.from({length:t.length+1}).map(function(){return!0}),s=t[0]==="-";i.fill(!1,0,Math.min(n.length+(s?1:0),t.length));var o=t.length;return i.fill(!1,o-r.length+1,o+1),i}function Hne(t){var e=r2(t),n=e.thousandSeparator,r=e.decimalSeparator,i=t.prefix;i===void 0&&(i="");var s=t.allowNegative;if(s===void 0&&(s=!0),n===r)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+r+` (default value for decimalSeparator is .)
     `);return i.startsWith("-")&&s&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+i+`
      allowNegative: `+s+`
    `),s=!1),Object.assign(Object.assign({},t),{allowNegative:s})}function qne(t){t=Hne(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=dh);var s=t.onBlur;s===void 0&&(s=dh);var o=t.thousandSeparator,l=t.decimalScale,u=t.fixedDecimalScale,h=t.prefix;h===void 0&&(h="");var f=t.defaultValue,p=t.value,m=t.valueIsNumericString,v=t.onValueChange,y=dz(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=r2(t),w=x.decimalSeparator,A=x.allowedDecimalSeparators,S=function(I){return z8(I,t)},C=function(I,F){return Fne(I,F,t)},j=jh(p)?f:p,_=m??Pne(j,h,e);jh(p)?jh(f)||(_=_||typeof f=="number"):_=_||typeof p=="number";var O=function(I){return fz(I)?I:(typeof I=="number"&&(I=gz(I)),_&&typeof l=="number"?P8(I,l,!!u):I)},M=bz(O(p),O(f),!!_,S,C,v),R=M[0],N=R.numAsString,B=R.formattedValue,D=M[1],L=function(I){var F=I.target,$=I.key,G=F.selectionStart,Y=F.selectionEnd,W=F.value;if(W===void 0&&(W=""),($==="Backspace"||$==="Delete")&&Y<h.length&&W!=="-"){I.preventDefault();return}if(G!==Y){i(I);return}$==="Backspace"&&W[0]==="-"&&G===h.length+1&&n&&qd(F,1),l&&u&&($==="Backspace"&&W[G-1]===w?(qd(F,G-1),I.preventDefault()):$==="Delete"&&W[G]===w&&I.preventDefault()),A!=null&&A.includes($)&&W[G]===w&&qd(F,G+1);var V=o===!0?",":o;$==="Backspace"&&W[G-1]===V&&qd(F,G-1),$==="Delete"&&W[G]===V&&qd(F,G+1),i(I)},U=function(I){var F=N;if(F.match(/\d/g)||(F=""),r||(F=Cne(F)),u&&l&&(F=P8(F,l,u)),F!==N){var $=z8(F,t);D({formattedValue:$,value:F,floatValue:parseFloat(F)},{event:I,source:Om.event})}s(I)},H=function(I){return I===w?!0:pv(I)},z=function(I){var F=I.currentValue,$=I.lastValue,G=I.formattedValue,Y=I.currentValueIndex,W=I.formattedValueIndex,V=F[Y],X=G[W],ee=vz($,F),le=ee.to,ve=function(me){return C(me).indexOf(".")+h.length};return p===0&&u&&l&&F[le.start]===w&&ve(F)<Y&&ve(G)>W?!1:Y>=le.start&&Y<le.end&&A&&A.includes(V)&&X===w?!0:V===X};return Object.assign(Object.assign({},y),{value:B,valueIsNumericString:!1,isValidInputCharacter:H,isCharacterSame:z,onValueChange:D,format:S,removeFormatting:C,getCaretBoundary:function(I){return zne(I,t)},onKeyDown:L,onBlur:U})}function $ne(t){var e=qne(t);return Ln.createElement(Ine,Object.assign({},e))}function H8({direction:t,style:e,...n}){return a.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:t==="up"?"rotate(180deg)":void 0,...e},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var eT={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const Qne=/^(0\.0*|-0(\.0*)?)$/,q8=/^-?0\d+(\.\d+)?\.?$/,Une=/\.\d*0$/,yz=/^-?\d+\.$/;function tT(t){return typeof t=="string"&&t!==""&&!Number.isNaN(Number(t))}function qC(t){return typeof t=="bigint"}function $C(t){return typeof t=="number"?t<Number.MAX_SAFE_INTEGER:t===""||tT(t)&&Number(t)<Number.MAX_SAFE_INTEGER}function xz(t,e){return t===""||t==="-"||!e&&t.startsWith("-")?!1:/^-?\d+$/.test(t)}function QC(t,e){return typeof t=="bigint"?!0:t===""||xz(t,e)}function Eg(t){if(!/^-?\d+$/.test(t))return null;try{return BigInt(t)}catch{return null}}function x1(t){if(typeof t=="bigint")return t;if(typeof t=="number"&&Number.isFinite(t)&&Number.isInteger(t))return BigInt(t)}function yx(t,e,n){return e!==void 0&&t<e?e:n!==void 0&&t>n?n:t}function Wne(t){return t.toString().replace(".","").length}function Vne(t,e){return(typeof t=="number"?t<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(t)))&&!Number.isNaN(t)&&Wne(e)<14&&e!==""}function Yne(t,e,n){return t===void 0?!0:(e===void 0||t>=e)&&(n===void 0||t<=n)}const UC={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},Az=(t,{size:e})=>({controls:{"--ni-chevron-size":Ut(e,"ni-chevron-size")}});function Gne(t,e,n){const r=t.toString(),i=yz.test(r),s=r.replace(/^0+(?=\d)/,""),o=parseFloat(s);if(Number.isNaN(o))return s;if(o>Number.MAX_SAFE_INTEGER)return e!==void 0?e:s;const l=Eh(o,n,e);return i?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function Xne(t,e){if(t===""||t==="-")return t;const n=Eg(t);return n===null?t:e.clampBehavior==="blur"?yx(n,e.min,e.max):n}const mv=Xm(t=>{const e=je("NumberInput",UC,t),{className:n,classNames:r,styles:i,unstyled:s,vars:o,onChange:l,onValueChange:u,value:h,defaultValue:f,max:p,min:m,step:v,hideControls:y,rightSection:x,isAllowed:w,clampBehavior:A,onBlur:S,allowDecimal:C,decimalScale:j,onKeyDown:_,onKeyDownCapture:O,handlersRef:M,startValue:R,disabled:N,rightSectionPointerEvents:B,allowNegative:D,readOnly:L,size:U,rightSectionWidth:H,stepHoldInterval:z,stepHoldDelay:I,allowLeadingZeros:F,withKeyboardEvents:$,trimLeadingZeroesOnBlur:G,allowedDecimalSeparators:Y,selectAllOnFocus:W,onMinReached:V,onMaxReached:X,onFocus:ee,attributes:le,ref:ve,...me}=e,Qe=D??!0,We=F??!0,qe=ft({name:"NumberInput",classes:eT,props:e,classNames:r,styles:i,unstyled:s,attributes:le,vars:o,varsResolver:Az}),{resolvedClassNames:ae,resolvedStyles:de}=Ao({classNames:r,styles:i,props:e}),Ae=E.useRef(qC(h)||qC(f)?"bigint":"number");qC(h)?Ae.current="bigint":typeof h=="number"&&(Ae.current="number");const Te=Ae.current==="bigint",[Ge,rt]=Xi({value:h,defaultValue:f,finalValue:"",onChange:l}),Ue=I!==void 0&&z!==void 0,Be=E.useRef(null),Ee=E.useRef(null),Ke=E.useRef(0),Dt=typeof m=="number"?m:void 0,Je=typeof p=="number"?p:void 0,it=typeof v=="number"?v:UC.step,Xe=typeof R=="number"?R:UC.startValue,Oe=x1(m),$e=x1(p),lt=x1(v)??BigInt(1),Rn=x1(R)??BigInt(0),vr=ye=>!xz(ye,Qe)||We&&q8.test(ye)?ye:Eg(ye)??ye,rn=ye=>{const He=Number(ye);return Number.isSafeInteger(He)?He:void 0},An=(ye,He)=>{He.source==="event"&&rt(Te?vr(ye.value):Vne(ye.floatValue,ye.value)&&!Qne.test(ye.value)&&!(We&&q8.test(ye.value))&&!Une.test(ye.value)&&!yz.test(ye.value)?ye.floatValue:ye.value),u==null||u(ye,He)},ht=ye=>{const He=String(ye).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return He?Math.max(0,(He[1]?He[1].length:0)-(He[2]?+He[2]:0)):0},fn=ye=>{Be.current&&typeof ye<"u"&&Be.current.setSelectionRange(ye,ye)},zt=E.useRef(eA);zt.current=()=>{if(Te){if(!QC(Ge,Qe))return;let tt;const jt=Ge;if(typeof jt=="bigint"){const nn=jt+lt;$e!==void 0&&nn>$e&&(X==null||X()),tt=$e!==void 0&&nn>$e?$e:nn}else if(typeof jt=="string"&&jt!==""){const nn=Eg(jt);if(nn===null)return;const Vr=nn+lt;$e!==void 0&&Vr>$e&&(X==null||X()),tt=$e!==void 0&&Vr>$e?$e:Vr}else tt=yx(Rn,Oe,$e);const Ct=tt.toString();rt(tt),u==null||u({floatValue:rn(tt),formattedValue:Ct,value:Ct},{source:"increment"}),setTimeout(()=>{var nn;return fn((nn=Be.current)==null?void 0:nn.value.length)},0);return}if(!$C(Ge))return;let ye;const He=ht(Ge),Ht=ht(it),qt=Math.max(He,Ht),et=10**qt;if(!tT(Ge)&&(typeof Ge!="number"||Number.isNaN(Ge)))ye=Eh(Xe,Dt,Je);else if(Je!==void 0){const tt=(Math.round(Number(Ge)*et)+Math.round(it*et))/et;tt>Je&&(X==null||X()),ye=tt<=Je?tt:Je}else ye=(Math.round(Number(Ge)*et)+Math.round(it*et))/et;const Re=ye.toFixed(qt);rt(parseFloat(Re)),u==null||u({floatValue:parseFloat(Re),formattedValue:Re,value:Re},{source:"increment"}),setTimeout(()=>{var tt;return fn((tt=Be.current)==null?void 0:tt.value.length)},0)};const Nt=E.useRef(eA);Nt.current=()=>{if(Te){if(!QC(Ge,Qe))return;let jt;const Ct=Oe!==void 0?Oe:Qe?void 0:BigInt(0),nn=Ge;if(typeof nn=="bigint"){const Yr=nn-lt;Ct!==void 0&&Yr<Ct&&(V==null||V()),jt=Ct!==void 0&&Yr<Ct?Ct:Yr}else if(typeof nn=="string"&&nn!==""){const Yr=Eg(nn);if(Yr===null)return;const Si=Yr-lt;Ct!==void 0&&Si<Ct&&(V==null||V()),jt=Ct!==void 0&&Si<Ct?Ct:Si}else jt=yx(Rn,Ct,$e);const Vr=jt.toString();rt(jt),u==null||u({floatValue:rn(jt),formattedValue:Vr,value:Vr},{source:"decrement"}),setTimeout(()=>{var Yr;return fn((Yr=Be.current)==null?void 0:Yr.value.length)},0);return}if(!$C(Ge))return;let ye;const He=Dt!==void 0?Dt:Qe?Number.MIN_SAFE_INTEGER:0,Ht=ht(Ge),qt=ht(it),et=Math.max(Ht,qt),Re=10**et;if(!tT(Ge)&&typeof Ge!="number"||Number.isNaN(Ge))ye=Eh(Xe,He,Je);else{const jt=(Math.round(Number(Ge)*Re)-Math.round(it*Re))/Re;He!==void 0&&jt<He&&(V==null||V()),ye=He!==void 0&&jt<He?He:jt}const tt=ye.toFixed(et);rt(parseFloat(tt)),u==null||u({floatValue:parseFloat(tt),formattedValue:tt,value:tt},{source:"decrement"}),setTimeout(()=>{var jt;return fn((jt=Be.current)==null?void 0:jt.value.length)},0)};const tn=ye=>{var et,Re,tt;const He=ye.clipboardData.getData("text"),Ht=me.decimalSeparator||".",qt=(Y||[".",","]).filter(jt=>jt!==Ht);if(qt.some(jt=>He.includes(jt))){ye.preventDefault();let jt=He;qt.forEach(nn=>{jt=jt.split(nn).join(Ht)});const Ct=Be.current;if(Ct){const nn=Ct.selectionStart??0,Vr=Ct.selectionEnd??0,Yr=Ct.value,Si=Yr.substring(0,nn)+jt+Yr.substring(Vr);(Re=(et=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:et.set)==null||Re.call(Ct,Si),Ct.dispatchEvent(new Event("change",{bubbles:!0}));const br=nn+jt.length;setTimeout(()=>fn(br),0)}}(tt=me.onPaste)==null||tt.call(me,ye)},cr=ye=>{var He,Ht;_==null||_(ye),!(L||!$)&&(ye.key==="ArrowUp"&&(ye.preventDefault(),(He=zt.current)==null||He.call(zt)),ye.key==="ArrowDown"&&(ye.preventDefault(),(Ht=Nt.current)==null||Ht.call(Nt)))},ln=ye=>{if(O==null||O(ye),ye.key==="Backspace"){const He=Be.current;He&&He.selectionStart===0&&He.selectionStart===He.selectionEnd&&(ye.preventDefault(),window.setTimeout(()=>fn(0),0))}},Jn=ye=>{W&&setTimeout(()=>ye.currentTarget.select(),0),ee==null||ee(ye)},Fr=ye=>{let He=Ge;Te?(A==="blur"&&typeof He=="bigint"&&(He=yx(He,Oe,$e)),G&&typeof He=="string"&&(He=Xne(He,{min:Oe,max:$e,clampBehavior:A}))):(A==="blur"&&typeof He=="number"&&(He=Eh(He,Dt,Je)),G&&typeof He=="string"&&ht(He)<15&&(He=Gne(He,Je,Dt))),Ge!==He&&rt(He),S==null||S(ye)};nA(M,{increment:zt.current,decrement:Nt.current});const It=ye=>{var He,Ht;ye?(He=zt.current)==null||He.call(zt):(Ht=Nt.current)==null||Ht.call(Nt),Ke.current+=1},Cn=ye=>{if(It(ye),Ue){const He=typeof z=="number"?z:z(Ke.current);Ee.current=window.setTimeout(()=>Cn(ye),He)}},vt=(ye,He)=>{var Ht;ye.preventDefault(),(Ht=Be.current)==null||Ht.focus(),It(He),Ue&&(Ee.current=window.setTimeout(()=>Cn(He),I))},ne=()=>{Ee.current&&window.clearTimeout(Ee.current),Ee.current=null,Ke.current=0},_e=a.jsxs("div",{...qe("controls"),children:[a.jsx(Br,{...qe("control"),tabIndex:-1,"aria-hidden":!0,disabled:N||typeof Ge=="number"&&Je!==void 0&&Ge>=Je||typeof Ge=="bigint"&&$e!==void 0&&Ge>=$e,mod:{direction:"up"},onMouseDown:ye=>ye.preventDefault(),onPointerDown:ye=>{vt(ye,!0)},onPointerUp:ne,onPointerLeave:ne,children:a.jsx(H8,{direction:"up"})}),a.jsx(Br,{...qe("control"),tabIndex:-1,"aria-hidden":!0,disabled:N||typeof Ge=="number"&&Dt!==void 0&&Ge<=Dt||typeof Ge=="bigint"&&Oe!==void 0&&Ge<=Oe,mod:{direction:"down"},onMouseDown:ye=>ye.preventDefault(),onPointerDown:ye=>{vt(ye,!1)},onPointerUp:ne,onPointerLeave:ne,children:a.jsx(H8,{direction:"down"})})]});return a.jsx(Ds,{component:$ne,allowNegative:D,className:Pr(eT.root,n),size:U,...me,inputMode:Te?"numeric":"decimal",readOnly:L,disabled:N,value:typeof Ge=="bigint"?Ge.toString():Ge,getInputRef:qn(ve,Be),onValueChange:An,rightSection:y||L||!(Te?QC(Ge,Qe):$C(Ge))?x:x||_e,classNames:ae,styles:de,unstyled:s,__staticSelector:"NumberInput",decimalScale:Te?0:C?j:0,onPaste:tn,onFocus:Jn,onKeyDown:cr,onKeyDownCapture:ln,rightSectionPointerEvents:B??(N?"none":void 0),rightSectionWidth:H??`var(--ni-right-section-width-${U||"sm"})`,allowLeadingZeros:F,allowedDecimalSeparators:Y,onBlur:Fr,attributes:le,isAllowed:ye=>{if(!(!w||w(ye)))return!1;if(A!=="strict")return!0;if(!Te)return Yne(ye.floatValue,Dt,Je);if(ye.value===""||ye.value==="-")return!0;const He=Eg(ye.value);return He===null?!0:(Oe===void 0||He>=Oe)&&($e===void 0||He<=$e)}})});mv.classes={...Ds.classes,...eT};mv.varsResolver=Az;mv.displayName="@mantine/core/NumberInput";const[Kne,i2]=Ki("Pagination.Root component was not found in tree");var xb={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const Zne={withPadding:!0},Ab=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,active:o,disabled:l,withPadding:u,mod:h,...f}=je("PaginationControl",Zne,t),p=i2(),m=l||p.disabled;return a.jsx(Br,{disabled:m,mod:[{active:o,disabled:m,"with-padding":u},h],...p.getStyles("control",{className:n,style:r,classNames:e,styles:i,active:!m}),...f})});Ab.classes=xb;Ab.displayName="@mantine/core/PaginationControl";function wb({style:t,children:e,path:n,...r}){return a.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...t},...r,children:a.jsx("path",{d:n,fill:"currentColor"})})}const Jne=t=>a.jsx(wb,{...t,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),ere=t=>a.jsx(wb,{...t,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),tre=t=>a.jsx(wb,{...t,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),nre=t=>a.jsx(wb,{...t,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),rre=t=>a.jsx(wb,{...t,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),ire={icon:rre},s2=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,icon:o,...l}=je("PaginationDots",ire,t);return a.jsx(be,{...i2().getStyles("dots",{className:n,style:r,styles:i,classNames:e}),...l,children:a.jsx(o,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});s2.classes=xb;s2.displayName="@mantine/core/PaginationDots";function a2({icon:t,name:e,action:n,type:r}){const i={icon:t},s=o=>{const{icon:l,...u}=je(e,i,o),h=i2(),f=r==="next"?h.active===h.total:h.active===1;return a.jsx(Ab,{disabled:h.disabled||f,onClick:h[n],withPadding:!1,...u,children:a.jsx(l,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})};return s.displayName=`@mantine/core/${e}`,SP(s)}const wz=a2({icon:Jne,name:"PaginationNext",action:"onNext",type:"next"}),Sz=a2({icon:ere,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),jz=a2({icon:tre,name:"PaginationFirst",action:"onFirst",type:"previous"}),Cz=a2({icon:nre,name:"PaginationLast",action:"onLast",type:"next"});function SE({dotsIcon:t}){const e=i2();return a.jsx(a.Fragment,{children:e.range.map((n,r)=>{var i,s,o;return n==="dots"?a.jsx(s2,{icon:t},r):a.jsx(Ab,{active:n===e.active,"aria-current":n===e.active?"page":void 0,onClick:()=>e.onChange(n),disabled:e.disabled,...(i=e.getItemProps)==null?void 0:i.call(e,n),children:((o=(s=e.getItemProps)==null?void 0:s.call(e,n))==null?void 0:o.children)??n},r)})})}SE.displayName="@mantine/core/PaginationItems";const sre={siblings:1,boundaries:1},_z=(t,{size:e,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:Zn(n),"--pagination-control-size":Ut(e,"pagination-control-size"),"--pagination-control-fz":Or(e),"--pagination-active-bg":r?gr(r,t):void 0,"--pagination-active-color":Ym(i,t)?ed({color:r,theme:t,autoContrast:i}):void 0}}),Sb=Ie(t=>{const e=je("PaginationRoot",sre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,total:u,value:h,defaultValue:f,onChange:p,disabled:m,siblings:v,boundaries:y,color:x,radius:w,onNextPage:A,onPreviousPage:S,onFirstPage:C,onLastPage:j,getItemProps:_,autoContrast:O,startValue:M,attributes:R,...N}=e,B=ft({name:"Pagination",classes:xb,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:R,vars:l,varsResolver:_z}),{range:D,setPage:L,next:U,previous:H,active:z,first:I,last:F}=DX({page:h,initialPage:f,onChange:p,total:u,siblings:v,boundaries:y,startValue:M});return a.jsx(Kne,{value:{total:u,range:D,active:z,disabled:m,getItemProps:_,onChange:L,onNext:Yi(A,U),onPrevious:Yi(S,H),onFirst:Yi(C,I),onLast:Yi(j,F),getStyles:B},children:a.jsx(be,{...B("root"),...N})})});Sb.classes=xb;Sb.varsResolver=_z;Sb.displayName="@mantine/core/PaginationRoot";const are={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},_o=Ie(t=>{const{withEdges:e,withControls:n,getControlProps:r,nextIcon:i,previousIcon:s,lastIcon:o,firstIcon:l,dotsIcon:u,total:h,gap:f,hideWithOnePage:p,withPages:m,...v}=je("Pagination",are,t);return h<=0||p&&h===1?null:a.jsx(Sb,{total:h,...v,children:a.jsxs(ut,{gap:f,children:[e&&a.jsx(jz,{icon:l,...r==null?void 0:r("first")}),n&&a.jsx(Sz,{icon:s,...r==null?void 0:r("previous")}),m&&a.jsx(SE,{dotsIcon:u}),n&&a.jsx(wz,{icon:i,...r==null?void 0:r("next")}),e&&a.jsx(Cz,{icon:o,...r==null?void 0:r("last")})]})})});_o.classes=xb;_o.displayName="@mantine/core/Pagination";_o.Root=Sb;_o.Control=Ab;_o.Dots=s2;_o.First=jz;_o.Last=Cz;_o.Next=wz;_o.Previous=Sz;_o.Items=SE;const[ore,Tz]=Ki("Progress.Root component was not found in tree");var jb={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd","stripes-animation-vertical":"m_e0fb7a86",label:"m_91e40b74"};const jE=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,...o}=je("ProgressLabel",null,t);return a.jsx(be,{...Tz().getStyles("label",{className:n,style:r,classNames:e,styles:i}),...o})});jE.classes=jb;jE.displayName="@mantine/core/ProgressLabel";const kz=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":Ut(e,"progress-size"),"--progress-radius":n===void 0?void 0:Zn(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),Cb=Ie(t=>{const e=je("ProgressRoot",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,autoContrast:u,transitionDuration:h,orientation:f,attributes:p,mod:m,...v}=e,y=ft({name:"Progress",classes:jb,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:p,vars:l,varsResolver:kz});return a.jsx(ore,{value:{getStyles:y,autoContrast:u},children:a.jsx(be,{mod:[{orientation:f},m],...y("root"),...v})})});Cb.classes=jb;Cb.varsResolver=kz;Cb.displayName="@mantine/core/ProgressRoot";const lre={withAria:!0},o2=Ie(t=>{const{classNames:e,className:n,style:r,styles:i,vars:s,value:o,withAria:l,color:u,striped:h,animated:f,mod:p,...m}=je("ProgressSection",lre,t),v=Tz(),y=Ni(),x=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,"aria-valuetext":`${o}%`}:{};return a.jsx(be,{...v.getStyles("section",{className:n,classNames:e,styles:i,style:r}),...m,...x,mod:[{striped:h||f,animated:f},p],__vars:{"--progress-section-size":`${o}%`,"--progress-section-color":gr(u,y),"--progress-label-color":Ym(v.autoContrast,y)?ed({color:u,theme:y,autoContrast:v.autoContrast}):void 0}})});o2.classes=jb;o2.displayName="@mantine/core/ProgressSection";const s0=Ie(t=>{const e=je("Progress",null,t),{value:n,classNames:r,styles:i,vars:s,color:o,striped:l,animated:u,"aria-label":h,...f}=e,{resolvedClassNames:p,resolvedStyles:m}=Ao({classNames:r,styles:i,props:e});return a.jsx(Cb,{classNames:p,styles:m,vars:s,...f,children:a.jsx(o2,{value:n,color:o,striped:l,animated:u,"aria-label":h})})});s0.classes=jb;s0.displayName="@mantine/core/Progress";s0.Section=o2;s0.Root=Cb;s0.Label=jE;function cre({offset:t,position:e,defaultOpened:n}){const[r,i]=E.useState(n),s=E.useRef(null),{x:o,y:l,elements:u,refs:h,update:f,placement:p}=NO({placement:e,middleware:[EO({crossAxis:!0,padding:5,rootBoundary:"document"})]}),m=p.includes("right")?t:e.includes("left")?t*-1:0,v=p.includes("bottom")?t:e.includes("top")?t*-1:0,y=E.useCallback(({clientX:x,clientY:w})=>{h.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x,y:w,left:x+m,top:w+v,right:x,bottom:w}}})},[u.reference]);return E.useEffect(()=>{if(h.floating.current){const x=s.current;x.addEventListener("mousemove",y);const w=Jc(h.floating.current);return w.forEach(A=>{A.addEventListener("scroll",f)}),()=>{x.removeEventListener("mousemove",y),w.forEach(A=>{A.removeEventListener("scroll",f)})}}},[u.reference,h.floating.current,f,y,r]),{handleMouseMove:y,x:o,y:l,opened:r,setOpened:i,boundaryRef:s,floating:h.setFloating}}var l2={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const ure={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:xo("popover")},Oz=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:Zn(e),"--tooltip-bg":n?gr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),c2=Ie(t=>{const e=je("TooltipFloating",ure,t),{children:n,refProp:r,withinPortal:i,style:s,className:o,classNames:l,styles:u,unstyled:h,radius:f,color:p,label:m,offset:v,position:y,multiline:x,zIndex:w,disabled:A,defaultOpened:S,variant:C,vars:j,portalProps:_,attributes:O,ref:M,...R}=e,N=Ni(),B=ft({name:"TooltipFloating",props:e,classes:l2,className:o,style:s,classNames:l,styles:u,unstyled:h,attributes:O,rootSelector:"tooltip",vars:j,varsResolver:Oz}),{handleMouseMove:D,x:L,y:U,opened:H,boundaryRef:z,floating:I,setOpened:F}=cre({offset:v,position:y,defaultOpened:S}),$=Rf(n);if(!$)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const G=qn(z,vw($),M),Y=$.props,W=X=>{var ee;(ee=Y.onMouseEnter)==null||ee.call(Y,X),D(X),F(!0)},V=X=>{var ee;(ee=Y.onMouseLeave)==null||ee.call(Y,X),F(!1)};return a.jsxs(a.Fragment,{children:[a.jsx(Lh,{..._,withinPortal:i,children:a.jsx(be,{...R,...B("tooltip",{style:{...AO(s,N),zIndex:w,display:!A&&H?"block":"none",top:(U&&Math.round(U))??"",left:(L&&Math.round(L))??""}}),variant:C,ref:I,mod:{multiline:x},children:m})}),E.cloneElement($,{...Y,[r]:G,onMouseEnter:W,onMouseLeave:V})]})});c2.classes=l2;c2.varsResolver=Oz;c2.displayName="@mantine/core/TooltipFloating";const Ez=E.createContext({withinGroup:!1}),hre={openDelay:0,closeDelay:0};function CE(t){const{openDelay:e,closeDelay:n,children:r}=je("TooltipGroup",hre,t);return a.jsx(Ez,{value:{withinGroup:!0},children:a.jsx(HJ,{delay:{open:e,close:n},children:r})})}CE.displayName="@mantine/core/TooltipGroup";CE.extend=t=>t;function dre(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function fre(t){const e=dre(t.middlewares),n=[e7(t.offset)];return e.shift&&n.push(EO(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&n.push(typeof e.flip=="boolean"?oA():oA(e.flip)),n.push(t7({element:t.arrowRef,padding:t.arrowOffset})),e.inline?n.push(typeof e.inline=="boolean"?Yg():Yg(e.inline)):t.inline&&n.push(Yg()),n}function pre(t){var j,_,O;const[e,n]=E.useState(t.defaultOpened),r=typeof t.opened=="boolean"?t.opened:e,i=E.use(Ez).withinGroup,s=Ri(),o=E.useCallback(M=>{n(M),M&&w(s)},[s]),{x:l,y:u,context:h,refs:f,placement:p,middlewareData:{arrow:{x:m,y:v}={}}}=NO({strategy:t.strategy,placement:t.position,open:r,onOpenChange:o,middleware:fre(t),whileElementsMounted:K3}),{delay:y,currentId:x,setCurrentId:w}=qJ(h,{id:s}),{getReferenceProps:A,getFloatingProps:S}=YJ([FJ(h,{enabled:(j=t.events)==null?void 0:j.hover,delay:i?y:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((_=t.events)!=null&&_.touch)}),VJ(h,{enabled:(O=t.events)==null?void 0:O.focus,visibleOnly:!0}),XJ(h,{role:"tooltip"}),UJ(h,{enabled:typeof t.opened>"u"})]);ll(()=>{var M;(M=t.onPositionChange)==null||M.call(t,p)},[p]);const C=r&&x&&x!==s;return{x:l,y:u,arrowX:m,arrowY:v,reference:f.setReference,floating:f.setFloating,getFloatingProps:S,getReferenceProps:A,isGroupPhase:C,opened:r,placement:p}}const mre={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:xo("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},Mz=(t,{radius:e,color:n,variant:r,autoContrast:i})=>{const s=t.variantColorResolver({theme:t,color:n||t.primaryColor,autoContrast:i,variant:r||"filled"});return{tooltip:{"--tooltip-radius":e===void 0?void 0:Zn(e),"--tooltip-bg":n?s.background:void 0,"--tooltip-color":n?s.color:void 0}}},qr=Ie(t=>{const e=je("Tooltip",mre,t),{children:n,position:r,refProp:i,label:s,openDelay:o,closeDelay:l,onPositionChange:u,opened:h,defaultOpened:f,withinPortal:p,radius:m,color:v,classNames:y,styles:x,unstyled:w,style:A,className:S,withArrow:C,arrowSize:j,arrowOffset:_,arrowRadius:O,arrowPosition:M,offset:R,transitionProps:N,multiline:B,events:D,zIndex:L,disabled:U,onClick:H,onMouseEnter:z,onMouseLeave:I,inline:F,variant:$,keepMounted:G,vars:Y,portalProps:W,mod:V,floatingStrategy:X,middlewares:ee,autoContrast:le,attributes:ve,target:me,ref:Qe,...We}=e,{dir:qe}=Df(),ae=E.useRef(null),de=pre({position:h7(qe,r),closeDelay:l,openDelay:o,onPositionChange:u,opened:h,defaultOpened:f,events:D,arrowRef:ae,arrowOffset:_,offset:typeof R=="number"?R+(C?j/2:0):R,inline:F,strategy:X,middlewares:ee});E.useEffect(()=>{const Ee=me instanceof HTMLElement?me:typeof me=="string"?document.querySelector(me):(me==null?void 0:me.current)||null;Ee&&de.reference(Ee)},[me,de]);const Ae=ft({name:"Tooltip",props:e,classes:l2,className:S,style:A,classNames:y,styles:x,unstyled:w,attributes:ve,rootSelector:"tooltip",vars:Y,varsResolver:Mz}),Te=Rf(n);if(!me&&!Te)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ge=Ae("tooltip");if(me){const Ee=C8(N,{duration:100,transition:"fade"});return a.jsx(a.Fragment,{children:a.jsx(Lh,{...W,withinPortal:p,children:a.jsx(tc,{...Ee,keepMounted:G,mounted:!U&&!!de.opened,duration:de.isGroupPhase?10:Ee.duration,children:Ke=>a.jsxs(be,{...We,"data-fixed":X==="fixed"||void 0,variant:$,mod:[{multiline:B},V],...Ge,...de.getFloatingProps({ref:de.floating,className:Ge.className,style:{...Ge.style,...Ke,zIndex:L,top:de.y??0,left:de.x??0}}),children:[s,a.jsx(lA,{ref:ae,arrowX:de.arrowX,arrowY:de.arrowY,visible:C,position:de.placement,arrowSize:j,arrowOffset:_,arrowRadius:O,arrowPosition:M,...Ae("arrow")})]})})})})}const rt=Te.props,Ue=qn(de.reference,vw(Te),Qe),Be=C8(N,{duration:100,transition:"fade"});return a.jsxs(a.Fragment,{children:[a.jsx(Lh,{...W,withinPortal:p,children:a.jsx(tc,{...Be,keepMounted:G,mounted:!U&&!!de.opened,duration:de.isGroupPhase?10:Be.duration,children:Ee=>a.jsxs(be,{...We,"data-fixed":X==="fixed"||void 0,variant:$,mod:[{multiline:B},V],...de.getFloatingProps({ref:de.floating,className:Ae("tooltip").className,style:{...Ae("tooltip").style,...Ee,zIndex:L,top:de.y??0,left:de.x??0}}),children:[s,a.jsx(lA,{ref:ae,arrowX:de.arrowX,arrowY:de.arrowY,visible:C,position:de.placement,arrowSize:j,arrowOffset:_,arrowRadius:O,arrowPosition:M,...Ae("arrow")})]})})}),E.cloneElement(Te,de.getReferenceProps({onClick:H,onMouseEnter:z,onMouseLeave:I,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,...rt,className:Pr(S,rt.className),[i]:Ue}))]})});qr.classes=l2;qr.varsResolver=Mz;qr.displayName="@mantine/core/Tooltip";qr.Floating=c2;qr.Group=CE;function gre({size:t,thickness:e,sum:n,value:r,root:i,offset:s}){const o=(t*.9-e*2)/2,l=Math.PI*o*2/100,u=i||r===void 0?`${(100-n)*l}, ${n*l}`:`${r*l}, ${(100-r)*l}`;return{strokeWidth:Number.isNaN(e)?12:e,cx:t/2||0,cy:t/2||0,r:o||0,transform:i?`scale(1, -1) translate(0, -${t})`:void 0,strokeDasharray:u,strokeDashoffset:i?0:s||0}}function Rz({size:t,value:e,offset:n,sum:r,thickness:i,root:s,color:o,lineRoundCaps:l,tooltip:u,getStyles:h,display:f,...p}){const m=Ni();return a.jsx(qr.Floating,{disabled:!u,label:u,children:a.jsx(be,{component:"circle",...p,...h("curve"),__vars:{"--curve-color":o?gr(o,m):void 0},fill:"none",strokeLinecap:l?"round":"butt",...gre({sum:r,size:t,thickness:i,value:e,offset:n,root:s})})})}Rz.displayName="@mantine/core/Curve";function vre({size:t,thickness:e,sections:n,renderRoundedLineCaps:r,rootColor:i,sectionGap:s=0}){const o=n.reduce((m,v)=>m+v.value,0),l=Math.PI*((t*.9-e*2)/2)*2;let u=l;const h=[],f=[],p=s/360*100;for(let m=0;m<n.length;m+=1){const v=Math.max(0,n[m].value-p);h.push({sum:o,offset:u,data:{...n[m],value:v},root:!1}),u-=n[m].value/100*l}if(h.push({sum:o,offset:u,data:{color:i},root:!0}),f.push({...h[h.length-1],lineRoundCaps:!1}),h.length>2){f.push({...h[0],lineRoundCaps:r}),f.push({...h[h.length-2],lineRoundCaps:r});for(let m=1;m<=h.length-3;m+=1)f.push({...h[m],lineRoundCaps:!1})}else f.push({...h[0],lineRoundCaps:r});return f}var Dz={root:"m_b32e4812",svg:"m_d43b5134",curve:"m_b1ca1fbf",label:"m_b23f9dc4"};function bre(t,e){return Math.min(t||12,(e||120)/4)}const yre={size:120,thickness:12,startAngle:270},Nz=(t,{size:e,thickness:n,transitionDuration:r,startAngle:i})=>({root:{"--rp-size":fe(e),"--rp-label-offset":fe(n*2),"--rp-transition-duration":r?`${r}ms`:void 0},svg:{"--rp-start-angle":`${i}deg`}}),_b=Ie(t=>{const e=je("RingProgress",yre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,label:u,sections:h,size:f,thickness:p,roundCaps:m,rootColor:v,transitionDuration:y,sectionGap:x,startAngle:w,attributes:A,...S}=e,C=ft({name:"RingProgress",classes:Dz,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:A,vars:l,varsResolver:Nz}),j=bre(p,f),_=vre({size:f,thickness:j,sections:h,renderRoundedLineCaps:m,rootColor:v,sectionGap:x}).map(({data:O,sum:M,root:R,lineRoundCaps:N,offset:B},D)=>E.createElement(Rz,{...O,key:D,size:f,thickness:j,sum:M,offset:B,color:O==null?void 0:O.color,root:R,lineRoundCaps:N,getStyles:C}));return a.jsxs(be,{...C("root"),size:f,...S,children:[a.jsx("svg",{...C("svg"),viewBox:`0 0 ${f} ${f}`,children:_}),u&&a.jsx("div",{...C("label"),children:u})]})});_b.classes=Dz;_b.varsResolver=Nz;_b.displayName="@mantine/core/RingProgress";var Iz={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const xre={withItemsBorders:!0},Bz=(t,{radius:e,color:n,transitionDuration:r,size:i,transitionTimingFunction:s})=>({root:{"--sc-radius":e===void 0?void 0:Zn(e),"--sc-color":n?gr(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":s,"--sc-padding":Ut(i,"sc-padding"),"--sc-font-size":Or(i)}}),a0=Xm(t=>{var We,qe;const e=je("SegmentedControl",xre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,data:u,value:h,defaultValue:f,onChange:p,size:m,name:v,disabled:y,readOnly:x,fullWidth:w,orientation:A,radius:S,color:C,transitionDuration:j,transitionTimingFunction:_,variant:O,autoContrast:M,withItemsBorders:R,mod:N,attributes:B,ref:D,...L}=e,U=ft({name:"SegmentedControl",props:e,classes:Iz,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:B,vars:l,varsResolver:Bz}),H=Ni(),z=u.map(ae=>GX(ae)?{label:`${ae}`,value:ae}:ae),I=$X(),[F,$]=E.useState(Cm()),[G,Y]=E.useState(null),[W,V]=E.useState({}),X=(ae,de)=>{W[de]=ae,V(W)},[ee,le]=Xi({value:h,defaultValue:f,finalValue:Array.isArray(u)?((We=z.find(ae=>!ae.disabled))==null?void 0:We.value)??((qe=u[0])==null?void 0:qe.value)??null:null,onChange:p}),ve=Ri(v),me=z.map(ae=>E.createElement(be,{...U("control"),mod:{active:ee===ae.value,orientation:A},key:`${ae.value}`},E.createElement("input",{...U("input"),disabled:y||ae.disabled,type:"radio",name:ve,value:`${ae.value}`,id:`${ve}-${ae.value}`,checked:ee===ae.value,onChange:()=>!x&&le(ae.value),"data-focus-ring":H.focusRing,key:`${ae.value}-input`}),E.createElement(be,{component:"label",...U("label"),mod:{active:ee===ae.value&&!(y||ae.disabled),disabled:y||ae.disabled,"read-only":x},htmlFor:`${ve}-${ae.value}`,ref:de=>X(de,`${ae.value}`),__vars:{"--sc-label-color":C!==void 0?ed({color:C,theme:H,autoContrast:M}):void 0},key:`${ae.value}-label`},a.jsx("span",{...U("innerLabel"),children:ae.label})))),Qe=qn(D,ae=>Y(ae));return FX(()=>{$(Cm())},[u.length]),u.length===0?null:a.jsxs(be,{...U("root"),variant:O,size:m,ref:Qe,mod:[{"full-width":w,orientation:A,initialized:I,"with-items-borders":R},N],...L,role:"radiogroup","data-disabled":y,children:[typeof ee<"u"&&a.jsx(Iw,{target:W[`${ee}`],parent:G,component:"span",transitionDuration:"var(--sc-transition-duration)",...U("indicator")},F),me]})});a0.classes=Iz;a0.varsResolver=Bz;a0.displayName="@mantine/core/SegmentedControl";const Are={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},o0=Xm(t=>{const e=je("Select",Are,t),{classNames:n,styles:r,unstyled:i,vars:s,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:h,onFocus:f,onBlur:p,onClick:m,onChange:v,data:y,value:x,defaultValue:w,selectFirstOptionOnChange:A,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:j,readOnly:_,disabled:O,filter:M,limit:R,withScrollArea:N,maxDropdownHeight:B,size:D,searchable:L,rightSection:U,checkIconPosition:H,withCheckIcon:z,withAlignedLabels:I,nothingFoundMessage:F,name:$,form:G,searchValue:Y,defaultSearchValue:W,onSearchChange:V,allowDeselect:X,error:ee,rightSectionPointerEvents:le,id:ve,clearable:me,clearSectionMode:Qe,clearButtonProps:We,hiddenInputProps:qe,renderOption:ae,onClear:de,autoComplete:Ae,scrollAreaProps:Te,__defaultRightSection:Ge,__clearSection:rt,__clearable:Ue,chevronColor:Be,autoSelectOnBlur:Ee,openOnFocus:Ke,attributes:Dt,...Je}=e,it=E.useMemo(()=>fF(y),[y]),Xe=E.useRef({}),Oe=E.useMemo(()=>GO(it),[it]),$e=Ri(ve),[lt,Rn,vr]=Xi({value:x,defaultValue:w,finalValue:null,onChange:v}),rn=lt!=null?`${lt}`in Oe?Oe[`${lt}`]:Xe.current[`${lt}`]:void 0,An=HX(rn),[ht,fn,zt]=Xi({value:Y,defaultValue:W,finalValue:rn?rn.label:"",onChange:V}),Nt=Bw({opened:o,defaultOpened:l,onDropdownOpen:()=>{h==null||h(),S?Nt.selectFirstOption():Nt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{u==null||u(),setTimeout(Nt.resetSelectedOption,0)}}),tn=It=>{fn(It),Nt.resetSelectedOption()},{resolvedClassNames:cr,resolvedStyles:ln}=Ao({props:e,styles:r,classNames:n});E.useEffect(()=>{A&&Nt.selectFirstOption()},[A,ht]),E.useEffect(()=>{x===null&&tn(""),x!=null&&rn&&((An==null?void 0:An.value)!==rn.value||(An==null?void 0:An.label)!==rn.label)&&tn(rn.label)},[x,rn]),E.useEffect(()=>{var It,Cn;!vr&&!zt&&tn(lt!=null?`${lt}`in Oe?(It=Oe[`${lt}`])==null?void 0:It.label:((Cn=Xe.current[`${lt}`])==null?void 0:Cn.label)||"":"")},[Oe,lt]),E.useEffect(()=>{lt&&`${lt}`in Oe&&(Xe.current[`${lt}`]=Oe[`${lt}`])},[Oe,lt]);const Jn=a.jsx(sn.ClearButton,{...We,onClear:()=>{Rn(null,null),tn(""),de==null||de()}}),Fr=me&&!!lt&&!O&&!_;return a.jsxs(a.Fragment,{children:[a.jsxs(sn,{store:Nt,__staticSelector:"Select",classNames:cr,styles:ln,unstyled:i,readOnly:_,size:D,attributes:Dt,keepMounted:Ee,onOptionSubmit:It=>{C==null||C(It);const Cn=X&&`${Oe[It].value}`==`${lt}`?null:Oe[It],vt=Cn?Cn.value:null;vt!==lt&&Rn(vt,Cn),!vr&&tn(vt!=null&&(Cn==null?void 0:Cn.label)||""),Nt.closeDropdown()},...j,children:[a.jsx(sn.Target,{targetType:L?"input":"button",autoComplete:Ae,withExpandedAttribute:!0,children:a.jsx(Ds,{id:$e,__defaultRightSection:a.jsx(sn.Chevron,{size:D,error:ee,unstyled:i,color:Be}),__clearSection:Jn,__clearable:Fr,__clearSectionMode:Qe,rightSection:U,rightSectionPointerEvents:le||"none",...Je,size:D,__staticSelector:"Select",disabled:O,readOnly:_||!L,value:ht,onChange:It=>{tn(It.currentTarget.value),Nt.openDropdown(),A&&Nt.selectFirstOption()},onFocus:It=>{Ke&&L&&Nt.openDropdown(),f==null||f(It)},onBlur:It=>{Ee&&Nt.clickSelectedOption(),L&&Nt.closeDropdown();const Cn=lt!=null&&(`${lt}`in Oe?Oe[`${lt}`]:Xe.current[`${lt}`]);tn(Cn&&Cn.label||""),p==null||p(It)},onClick:It=>{L?Nt.openDropdown():Nt.toggleDropdown(),m==null||m(It)},classNames:cr,styles:ln,unstyled:i,pointer:!L,error:ee,attributes:Dt})}),a.jsx(NF,{data:it,hidden:_||O,filter:M,search:ht,limit:R,hiddenWhenEmpty:!F,withScrollArea:N,maxDropdownHeight:B,filterOptions:!!L&&(rn==null?void 0:rn.label)!==ht,value:lt,checkIconPosition:H,withCheckIcon:z,withAlignedLabels:I,nothingFoundMessage:F,unstyled:i,labelId:Je.label?`${$e}-label`:void 0,"aria-label":Je.label?void 0:Je["aria-label"],renderOption:ae,scrollAreaProps:Te})]}),a.jsx(sn.HiddenInput,{value:lt,name:$,form:G,disabled:O,...qe})]})});o0.classes={...Ds.classes,...sn.classes};o0.displayName="@mantine/core/Select";function Lz(t){if(t!==void 0)return typeof t=="number"?fe(t):t}function wre({spacing:t,verticalSpacing:e,cols:n,minColWidth:r,autoRows:i,selector:s}){var p;const o=Ni(),l=e===void 0?t:e,u=r!==void 0,h=rb({"--sg-spacing-x":Vi(Hp(t)),"--sg-spacing-y":Vi(Hp(l)),"--sg-auto-rows":i,...u?{"--sg-min-col-width":Lz(r)}:{"--sg-cols":(p=Hp(n))==null?void 0:p.toString()}}),f=ni(o.breakpoints).reduce((m,v)=>(m[v]||(m[v]={}),typeof t=="object"&&t[v]!==void 0&&(m[v]["--sg-spacing-x"]=Vi(t[v])),typeof l=="object"&&l[v]!==void 0&&(m[v]["--sg-spacing-y"]=Vi(l[v])),!u&&typeof n=="object"&&n[v]!==void 0&&(m[v]["--sg-cols"]=n[v]),m),{});return a.jsx(Aw,{styles:h,media:z3(ni(f),o.breakpoints).filter(m=>ni(f[m.value]).length>0).map(m=>({query:`(min-width: ${o.breakpoints[m.value]})`,styles:f[m.value]})),selector:s})}function WC(t){return typeof t=="object"&&t!==null?ni(t):[]}function Sre(t){return t.sort((e,n)=>ov(e)-ov(n))}function jre({spacing:t,verticalSpacing:e,cols:n,minColWidth:r}){return Sre(Array.from(new Set([...WC(t),...WC(e),...r!==void 0?[]:WC(n)])))}function Cre({spacing:t,verticalSpacing:e,cols:n,minColWidth:r,autoRows:i,selector:s}){var p;const o=e===void 0?t:e,l=r!==void 0,u=rb({"--sg-spacing-x":Vi(Hp(t)),"--sg-spacing-y":Vi(Hp(o)),"--sg-auto-rows":i,...l?{"--sg-min-col-width":Lz(r)}:{"--sg-cols":(p=Hp(n))==null?void 0:p.toString()}}),h=jre({spacing:t,verticalSpacing:e,cols:n,minColWidth:r}),f=h.reduce((m,v)=>(m[v]||(m[v]={}),typeof t=="object"&&t[v]!==void 0&&(m[v]["--sg-spacing-x"]=Vi(t[v])),typeof o=="object"&&o[v]!==void 0&&(m[v]["--sg-spacing-y"]=Vi(o[v])),!l&&typeof n=="object"&&n[v]!==void 0&&(m[v]["--sg-cols"]=n[v]),m),{});return a.jsx(Aw,{styles:u,container:h.map(m=>({query:`simple-grid (min-width: ${m})`,styles:f[m]})),selector:s})}var Pz={container:"m_925c2d2c",root:"m_2415a157"};const _re={cols:1,spacing:"md",type:"media"},u2=Ie(t=>{const e=je("SimpleGrid",_re,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,cols:u,verticalSpacing:h,spacing:f,type:p,minColWidth:m,autoFlow:v,autoRows:y,attributes:x,...w}=e,A=ft({name:"SimpleGrid",classes:Pz,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l}),S=wP(),C=m!==void 0?v||"auto-fill":void 0;return p==="container"?a.jsxs(a.Fragment,{children:[a.jsx(Cre,{...e,selector:`.${S}`}),a.jsx("div",{...A("container"),children:a.jsx(be,{...A("root",{className:S}),...w,"data-auto-cols":C})})]}):a.jsxs(a.Fragment,{children:[a.jsx(wre,{...e,selector:`.${S}`}),a.jsx(be,{...A("root",{className:S}),...w,"data-auto-cols":C})]})});u2.classes=Pz;u2.displayName="@mantine/core/SimpleGrid";var Fz={root:"m_18320242","skeleton-fade":"m_299c329c"};const Tre={visible:!0,animate:!0},zz=(t,{width:e,height:n,radius:r,circle:i})=>({root:{"--skeleton-height":fe(n),"--skeleton-width":fe(i?n:e),"--skeleton-radius":i?"1000px":r===void 0?void 0:Zn(r)}}),Qa=Ie(t=>{const e=je("Skeleton",Tre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,width:u,height:h,circle:f,visible:p,radius:m,animate:v,mod:y,attributes:x,...w}=e;return a.jsx(be,{...ft({name:"Skeleton",classes:Fz,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l,varsResolver:zz})("root"),mod:[{visible:p,animate:v},y],...w})});Qa.classes=Fz;Qa.varsResolver=zz;Qa.displayName="@mantine/core/Skeleton";const Hz=Ie(t=>{const{w:e,h:n,miw:r,mih:i,...s}=je("Space",null,t);return a.jsx(be,{...s,w:e,miw:r??e,h:n,mih:i??n})});Hz.displayName="@mantine/core/Space";var qz={root:"m_6d731127"};const kre={gap:"md",align:"stretch",justify:"flex-start"},$z=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":Vi(e),"--stack-align":n,"--stack-justify":r}}),xn=Ie(t=>{const e=je("Stack",kre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,align:u,justify:h,gap:f,variant:p,attributes:m,...v}=e;return a.jsx(be,{...ft({name:"Stack",props:e,classes:qz,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:m,vars:l,varsResolver:$z})("root"),variant:p,...v})});xn.classes=qz;xn.varsResolver=$z;xn.displayName="@mantine/core/Stack";const Qz=E.createContext(null),Ore={hiddenInputValuesSeparator:","},_E=Xm(t=>{const{value:e,defaultValue:n,onChange:r,size:i,wrapperProps:s,children:o,readOnly:l,name:u,hiddenInputValuesSeparator:h,hiddenInputProps:f,maxSelectedValues:p,disabled:m,...v}=je("SwitchGroup",Ore,t),[y,x]=Xi({value:e,defaultValue:n,finalValue:[],onChange:r}),w=C=>{const j=C.currentTarget.value;if(l)return;const _=y.includes(j);!_&&p&&y.length>=p||x(_?y.filter(O=>O!==j):[...y,j])},A=C=>{if(m)return!0;if(!p)return!1;const j=y.includes(C),_=y.length>=p;return!j&&_},S=y.join(h);return a.jsx(Qz,{value:{value:y,onChange:w,size:i,isDisabled:A},children:a.jsxs(kr.Wrapper,{size:i,...s,...v,labelElement:"div",__staticSelector:"SwitchGroup",children:[a.jsx(xF,{role:"group",children:o}),a.jsx("input",{type:"hidden",name:u,value:S,...f})]})})});_E.classes=kr.Wrapper.classes;_E.displayName="@mantine/core/SwitchGroup";var Uz={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const Ere={labelPosition:"right",withThumbIndicator:!0},Wz=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:Zn(e),"--switch-height":Ut(r,"switch-height"),"--switch-width":Ut(r,"switch-width"),"--switch-thumb-size":Ut(r,"switch-thumb-size"),"--switch-label-font-size":Ut(r,"switch-label-font-size"),"--switch-track-label-padding":Ut(r,"switch-track-label-padding"),"--switch-color":n?gr(n,t):void 0}}),Tb=Ie(t=>{var ee;const e=je("Switch",Ere,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,color:u,label:h,offLabel:f,onLabel:p,id:m,size:v,radius:y,wrapperProps:x,thumbIcon:w,checked:A,defaultChecked:S,onChange:C,labelPosition:j,description:_,error:O,disabled:M,variant:R,rootRef:N,mod:B,withThumbIndicator:D,attributes:L,...U}=e,H=E.use(Qz),z=v||(H==null?void 0:H.size),I=ft({name:"Switch",props:e,classes:Uz,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:L,vars:l,varsResolver:Wz}),{styleProps:F,rest:$}=lb(U),G=Ri(m),Y={checked:(H==null?void 0:H.value.includes($.value))??A,onChange:le=>{H==null||H.onChange(le),C==null||C(le)}},W=M||((ee=H==null?void 0:H.isDisabled)==null?void 0:ee.call(H,$.value)),[V,X]=Xi({value:Y.checked??A,defaultValue:S,finalValue:!1});return a.jsxs(lE,{...I("root"),__staticSelector:"Switch",__stylesApiProps:e,id:G,size:z,labelPosition:j,label:h,description:_,error:O,disabled:W,bodyElement:"label",labelElement:"span",classNames:n,styles:s,unstyled:o,"data-checked":Y.checked,variant:R,ref:N,mod:B,attributes:L,inert:$.inert,...F,...x,children:[a.jsx("input",{...$,...Y,disabled:W,checked:V,"data-checked":Y.checked,onChange:le=>{var ve;(ve=Y.onChange)==null||ve.call(Y,le),X(le.currentTarget.checked)},id:G,type:"checkbox",role:"switch",inert:$.inert,...I("input")}),a.jsxs(be,{"aria-hidden":"true",component:"span",mod:{error:O,"label-position":j,"without-labels":!p&&!f},...I("track"),children:[a.jsx(be,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":D&&!w},...I("thumb"),children:w}),a.jsx("span",{...I("trackLabel"),children:V?p:f})]})]})});Tb.classes={...Uz,...kF};Tb.varsResolver=Wz;Tb.displayName="@mantine/core/Switch";Tb.Group=_E;const[Mre,Rre]=Ki("Table component was not found in the tree");var kb={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Dre(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function If(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=Ie(i=>{const s=je(n,{},i),{classNames:o,className:l,style:u,styles:h,...f}=s,p=Rre();return a.jsx(be,{component:t,...Dre(p,e),...p.getStyles(t,{className:l,classNames:o,style:u,styles:h,props:s}),...f})});return r.displayName=`@mantine/core/${n}`,r.classes=kb,r}const nT=If("th",{columnBorder:!0}),Vz=If("td",{columnBorder:!0}),xx=If("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),Yz=If("thead",{stickyHeader:!0}),Gz=If("tbody"),Xz=If("tfoot"),Kz=If("caption",{captionSide:!0}),Nre={type:"scrollarea"},Zz=(t,{minWidth:e,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":fe(e),"--table-max-height":fe(n),"--table-overflow":r==="native"?"auto":void 0}}),h2=Ie(t=>{const e=je("TableScrollContainer",Nre,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,children:u,minWidth:h,maxHeight:f,type:p,scrollAreaProps:m,attributes:v,...y}=e,x=ft({name:"TableScrollContainer",classes:kb,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:v,vars:l,varsResolver:Zz,rootSelector:"scrollContainer"});return a.jsx(be,{component:p==="scrollarea"?ma:"div",...p==="scrollarea"?f?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},...x("scrollContainer"),...y,children:a.jsx("div",{...x("scrollContainerInner"),children:u})})});h2.classes=kb;h2.varsResolver=Zz;h2.displayName="@mantine/core/TableScrollContainer";function TE({data:t}){return a.jsxs(a.Fragment,{children:[t.caption&&a.jsx(Kz,{children:t.caption}),t.head&&a.jsx(Yz,{children:a.jsx(xx,{children:t.head.map((e,n)=>a.jsx(nT,{children:e},n))})}),t.body&&a.jsx(Gz,{children:t.body.map((e,n)=>a.jsx(xx,{children:e.map((r,i)=>a.jsx(Vz,{children:r},i))},n))}),t.foot&&a.jsx(Xz,{children:a.jsx(xx,{children:t.foot.map((e,n)=>a.jsx(nT,{children:e},n))})})]})}TE.displayName="@mantine/core/TableDataRenderer";const Ire={withRowBorders:!0,verticalSpacing:7},Jz=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:s,stripedColor:o,highlightOnHoverColor:l,striped:u,highlightOnHover:h,stickyHeaderOffset:f,stickyHeader:p})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":Vi(r),"--table-vertical-spacing":Vi(i),"--table-border-color":s?gr(s,t):void 0,"--table-striped-color":u&&o?gr(o,t):void 0,"--table-highlight-on-hover-color":h&&l?gr(l,t):void 0,"--table-sticky-header-offset":p?fe(f):void 0}}),se=Ie(t=>{const e=je("Table",Ire,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,horizontalSpacing:u,verticalSpacing:h,captionSide:f,stripedColor:p,highlightOnHoverColor:m,striped:v,highlightOnHover:y,withColumnBorders:x,withRowBorders:w,withTableBorder:A,borderColor:S,layout:C,data:j,children:_,stickyHeader:O,stickyHeaderOffset:M,mod:R,tabularNums:N,attributes:B,...D}=e,L=ft({name:"Table",props:e,className:r,style:i,classes:kb,classNames:n,styles:s,unstyled:o,attributes:B,rootSelector:"table",vars:l,varsResolver:Jz});return a.jsx(Mre,{value:{getStyles:L,stickyHeader:O,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:x,withRowBorders:w,captionSide:f||"bottom"},children:a.jsx(be,{component:"table",mod:[{"data-with-table-border":A,"data-tabular-nums":N},R],...L("table"),...D,children:_||!!j&&a.jsx(TE,{data:j})})})});se.classes=kb;se.varsResolver=Jz;se.displayName="@mantine/core/Table";se.Td=Vz;se.Th=nT;se.Tr=xx;se.Thead=Yz;se.Tbody=Gz;se.Tfoot=Xz;se.Caption=Kz;se.ScrollContainer=h2;se.DataRenderer=TE;const[Bre,kE]=Ki("Tabs component was not found in the tree");var Ob={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const OE=Ie(t=>{const e=je("TabsList",null,t),{children:n,className:r,grow:i,justify:s,classNames:o,styles:l,style:u,mod:h,...f}=e,p=kE();return a.jsx(be,{...p.getStyles("list",{className:r,style:u,classNames:o,styles:l,props:e,variant:p.variant}),role:"tablist",variant:p.variant,mod:[{grow:i,orientation:p.orientation,placement:p.orientation==="vertical"&&p.placement,inverted:p.inverted},h],"aria-orientation":p.orientation,__vars:{"--tabs-justify":s},...f,children:n})});OE.classes=Ob;OE.displayName="@mantine/core/TabsList";const EE=Ie(t=>{const e=je("TabsPanel",null,t),{children:n,className:r,value:i,classNames:s,styles:o,style:l,mod:u,keepMounted:h,...f}=e,p=Gm(),m=kE(),v=m.value===i,y=m.keepMounted||h,x=m.keepMountedMode!=="display-none",w=y&&x&&p!=="test"?a.jsx(E.Activity,{mode:v?"visible":"hidden",children:n}):y||v?n:null;return a.jsx(be,{...m.getStyles("panel",{className:r,classNames:s,styles:o,style:[l,v?void 0:{display:"none"}],props:e}),mod:[{orientation:m.orientation},u],role:"tabpanel",id:m.getPanelId(i),"aria-labelledby":m.getTabId(i),...f,children:w})});EE.classes=Ob;EE.displayName="@mantine/core/TabsPanel";const ME=Ie(t=>{const e=je("TabsTab",null,t),{className:n,children:r,rightSection:i,leftSection:s,value:o,onClick:l,onKeyDown:u,disabled:h,color:f,style:p,classNames:m,styles:v,vars:y,mod:x,tabIndex:w,...A}=e,S=Ni(),{dir:C}=Df(),j=kE(),_=o===j.value,O=R=>{j.onChange(j.allowTabDeactivation&&o===j.value?null:o),l==null||l(R)},M={classNames:m,styles:v,props:e};return a.jsxs(Br,{...j.getStyles("tab",{className:n,style:p,variant:j.variant,...M}),disabled:h,unstyled:j.unstyled,variant:j.variant,mod:[{active:_,disabled:h,orientation:j.orientation,inverted:j.inverted,placement:j.orientation==="vertical"&&j.placement},x],role:"tab",id:j.getTabId(o),"aria-selected":_,tabIndex:w!==void 0?w:_||j.value===null?0:-1,"aria-controls":j.getPanelId(o),onClick:O,__vars:{"--tabs-color":f?gr(f,S):void 0},onKeyDown:mw({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:j.activateTabWithKeyboard,loop:j.loop,orientation:j.orientation||"horizontal",dir:C,onKeyDown:u}),...A,children:[s&&a.jsx("span",{...j.getStyles("tabSection",M),"data-position":"left",children:s}),r&&a.jsx("span",{...j.getStyles("tabLabel",M),children:r}),i&&a.jsx("span",{...j.getStyles("tabSection",M),"data-position":"right",children:i})]})});ME.classes=Ob;ME.displayName="@mantine/core/TabsTab";const $8="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Lre={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},eH=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":Zn(e),"--tabs-color":gr(n,t),"--tabs-text-color":Ym(r,t)?ed({color:n,theme:t,autoContrast:r}):void 0}}),oa=Ie(t=>{const e=je("Tabs",Lre,t),{defaultValue:n,value:r,onChange:i,orientation:s,children:o,loop:l,id:u,activateTabWithKeyboard:h,allowTabDeactivation:f,variant:p,color:m,radius:v,inverted:y,placement:x,keepMounted:w,keepMountedMode:A,classNames:S,styles:C,unstyled:j,className:_,style:O,vars:M,autoContrast:R,mod:N,attributes:B,...D}=e,L=Ri(u),[U,H]=Xi({value:r,defaultValue:n,finalValue:null,onChange:i}),z=ft({name:"Tabs",props:e,classes:Ob,className:_,style:O,classNames:S,styles:C,unstyled:j,attributes:B,vars:M,varsResolver:eH});return a.jsx(Bre,{value:{placement:x,value:U,orientation:s,id:L,loop:l,activateTabWithKeyboard:h,getTabId:Zx(`${L}-tab`,$8),getPanelId:Zx(`${L}-panel`,$8),onChange:H,allowTabDeactivation:f,variant:p,color:m,radius:v,inverted:y,keepMounted:w,keepMountedMode:A,unstyled:j,getStyles:z},children:a.jsx(be,{id:L,variant:p,mod:[{orientation:s,inverted:s==="horizontal"&&y,placement:s==="vertical"&&x},N],...z("root"),...D,children:o})})});oa.classes=Ob;oa.varsResolver=eH;oa.displayName="@mantine/core/Tabs";oa.Tab=ME;oa.Panel=EE;oa.List=OE;const ic=Ie(t=>a.jsx(Ds,{component:"input",...je("TextInput",null,t),__staticSelector:"TextInput"}));ic.classes=Ds.classes;ic.displayName="@mantine/core/TextInput";/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Pre={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _t=(t,e,n,r)=>{const i=E.forwardRef(({color:s="currentColor",size:o=24,stroke:l=2,title:u,className:h,children:f,...p},m)=>E.createElement("svg",{ref:m,...Pre[t],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,h].join(" "),...t==="filled"?{fill:s}:{strokeWidth:l,stroke:s},...p},[u&&E.createElement("title",{key:"svg-title"},u),...r.map(([v,y])=>E.createElement(v,y)),...Array.isArray(f)?f:[f]]));return i.displayName=`${n}`,i};/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fre=[["path",{d:"M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 6l8 0",key:"svg-1"}],["path",{d:"M16 6l4 0",key:"svg-2"}],["path",{d:"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M4 12l2 0",key:"svg-4"}],["path",{d:"M10 12l10 0",key:"svg-5"}],["path",{d:"M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-6"}],["path",{d:"M4 18l11 0",key:"svg-7"}],["path",{d:"M19 18l1 0",key:"svg-8"}]],zre=_t("outline","adjustments-horizontal","AdjustmentsHorizontal",Fre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hre=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],qre=_t("outline","alert-circle","AlertCircle",Hre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $re=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Ei=_t("outline","alert-triangle","AlertTriangle",$re);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qre=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]],Ure=_t("outline","align-justified","AlignJustified",Qre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wre=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]],Q8=_t("outline","arrow-down","ArrowDown",Wre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vre=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],Yre=_t("outline","arrow-left","ArrowLeft",Vre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gre=[["path",{d:"M9.346 5.353c.21 -.129 .428 -.246 .654 -.353a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3m-1 3h-13a4 4 0 0 0 2 -3v-3a6.996 6.996 0 0 1 1.273 -3.707",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],Xre=_t("outline","bell-off","BellOff",Gre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kre=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],RE=_t("outline","bell","Bell",Kre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zre=[["path",{d:"M6 20a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-0"}],["path",{d:"M16 4a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-1"}],["path",{d:"M16 20a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-2"}],["path",{d:"M11 12a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-3"}],["path",{d:"M21 12a2 2 0 1 0 -4 0a2 2 0 0 0 4 0",key:"svg-4"}],["path",{d:"M5.058 18.306l2.88 -4.606",key:"svg-5"}],["path",{d:"M10.061 10.303l2.877 -4.604",key:"svg-6"}],["path",{d:"M10.065 13.705l2.876 4.6",key:"svg-7"}],["path",{d:"M15.063 5.7l2.881 4.61",key:"svg-8"}]],Jre=_t("outline","binary-tree","BinaryTree",Zre);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const eie=[["path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-0"}],["path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-1"}],["path",{d:"M3 6l0 13",key:"svg-2"}],["path",{d:"M12 6l0 13",key:"svg-3"}],["path",{d:"M21 6l0 13",key:"svg-4"}]],tie=_t("outline","book","Book",eie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nie=[["path",{d:"M4 19l16 0",key:"svg-0"}],["path",{d:"M4 15l4 -6l4 2l4 -5l4 4",key:"svg-1"}]],rie=_t("outline","chart-line","ChartLine",nie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const iie=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],cA=_t("outline","check","Check",iie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const sie=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],gv=_t("outline","chevron-down","ChevronDown",sie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const aie=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],oie=_t("outline","chevron-left","ChevronLeft",aie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lie=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],tH=_t("outline","chevron-right","ChevronRight",lie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cie=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],DE=_t("outline","chevron-up","ChevronUp",cie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const uie=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],hie=_t("outline","circle-minus","CircleMinus",uie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const die=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],fie=_t("outline","circle-plus","CirclePlus",die);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pie=[["path",{d:"M20.942 13.018a9 9 0 1 0 -7.909 7.922",key:"svg-0"}],["path",{d:"M12 7v5l2 2",key:"svg-1"}],["path",{d:"M17 17v5",key:"svg-2"}],["path",{d:"M21 17v5",key:"svg-3"}]],mie=_t("outline","clock-pause","ClockPause",pie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gie=[["path",{d:"M12 7v5l2 2",key:"svg-0"}],["path",{d:"M17 22l5 -3l-5 -3l0 6",key:"svg-1"}],["path",{d:"M13.017 20.943a9 9 0 1 1 7.831 -7.292",key:"svg-2"}]],vie=_t("outline","clock-play","ClockPlay",gie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bie=[["path",{d:"M5 9.897c0 -1.714 1.46 -3.104 3.26 -3.104c.275 -1.22 1.255 -2.215 2.572 -2.611c1.317 -.397 2.77 -.134 3.811 .69c1.042 .822 1.514 2.08 1.239 3.3h.693a2.42 2.42 0 0 1 2.425 2.414a2.42 2.42 0 0 1 -2.425 2.414h-8.315c-1.8 0 -3.26 -1.39 -3.26 -3.103",key:"svg-0"}],["path",{d:"M12 13v3",key:"svg-1"}],["path",{d:"M10 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M14 18h7",key:"svg-3"}],["path",{d:"M3 18h7",key:"svg-4"}]],yie=_t("outline","cloud-data-connection","CloudDataConnection",bie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xie=[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 9v6",key:"svg-1"}],["path",{d:"M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2",key:"svg-2"}],["path",{d:"M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2",key:"svg-3"}]],nH=_t("outline","code-plus","CodePlus",xie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Aie=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],NE=_t("outline","copy","Copy",Aie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wie=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Sie=_t("outline","database","Database",wie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jie=[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1l0 -10",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}],["path",{d:"M9 12v-4",key:"svg-4"}],["path",{d:"M12 12v-1",key:"svg-5"}],["path",{d:"M15 12v-2",key:"svg-6"}],["path",{d:"M12 12v-1",key:"svg-7"}]],Cie=_t("outline","device-desktop-analytics","DeviceDesktopAnalytics",jie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _ie=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Tie=_t("outline","dots-vertical","DotsVertical",_ie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const kie=[["path",{d:"M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9",key:"svg-0"}],["path",{d:"M5 21v-7",key:"svg-1"}]],Oie=_t("outline","flag","Flag",kie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eie=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M7 14l3 -3l2 2l3 -3l2 2",key:"svg-1"}]],Mie=_t("outline","graph","Graph",Eie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rie=[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1l0 -10",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}],["path",{d:"M7 10h2l2 3l2 -6l1 3h3",key:"svg-4"}]],rH=_t("outline","heart-rate-monitor","HeartRateMonitor",Rie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Die=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],rT=_t("outline","hourglass","Hourglass",Die);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nie=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],Kn=_t("outline","info-circle","InfoCircle",Nie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Iie=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M10 16l2 -2l2 2",key:"svg-2"}]],iH=_t("outline","layout-navbar-collapse","LayoutNavbarCollapse",Iie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bie=[["path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M10 14l2 2l2 -2",key:"svg-2"}]],sH=_t("outline","layout-navbar-expand","LayoutNavbarExpand",Bie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lie=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M15 18h-2l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5",key:"svg-2"}],["path",{d:"M19 16v3",key:"svg-3"}],["path",{d:"M19 22v.01",key:"svg-4"}]],Pie=_t("outline","message-exclamation","MessageExclamation",Lie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fie=[["path",{d:"M5 12l14 0",key:"svg-0"}]],zie=_t("outline","minus","Minus",Fie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hie=[["path",{d:"M6.528 6.536a6 6 0 0 0 7.942 7.933m2.247 -1.76a6 6 0 0 0 -8.427 -8.425",key:"svg-0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6c0 .337 -.006 .66 -.017 .968m-.55 3.473c-.333 .884 -.81 1.403 -1.433 1.559",key:"svg-1"}],["path",{d:"M12 3c-.936 .234 -1.544 1.29 -1.822 3.167m-.16 3.838c.116 3.029 .776 4.695 1.982 4.995",key:"svg-2"}],["path",{d:"M6 9h3m4 0h5",key:"svg-3"}],["path",{d:"M3 20h7",key:"svg-4"}],["path",{d:"M14 20h7",key:"svg-5"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M12 15v3",key:"svg-7"}],["path",{d:"M3 3l18 18",key:"svg-8"}]],qie=_t("outline","network-off","NetworkOff",Hie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $ie=[["path",{d:"M20 16l-4 4",key:"svg-0"}],["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5",key:"svg-1"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5",key:"svg-2"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-3"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-4"}],["path",{d:"M10 11l-2 2",key:"svg-5"}],["path",{d:"M13 14l-2 2",key:"svg-6"}],["path",{d:"M16 16l4 4",key:"svg-7"}]],Qie=_t("outline","plug-connected-x","PlugConnectedX",$ie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uie=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],aH=_t("outline","plus","Plus",Uie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wie=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],iT=_t("outline","refresh","Refresh",Wie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vie=[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]],oH=_t("outline","repeat","Repeat",Vie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yie=[["path",{d:"M3 4a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M15 16a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M21 11v-3a2 2 0 0 0 -2 -2h-6l3 3m0 -6l-3 3",key:"svg-2"}],["path",{d:"M3 13v3a2 2 0 0 0 2 2h6l-3 -3m0 6l3 -3",key:"svg-3"}]],lH=_t("outline","replace","Replace",Yie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gie=[["path",{d:"M11.007 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 17l5 1l.75 -1.5",key:"svg-1"}],["path",{d:"M15 21v-4l-4 -3l1 -6",key:"svg-2"}],["path",{d:"M7 12v-3l5 -1l3 3l3 1",key:"svg-3"}]],Xie=_t("outline","run","Run",Gie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kie=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],id=_t("outline","search","Search",Kie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zie=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],Jie=_t("outline","selector","Selector",Zie);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ese=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-2",key:"svg-0"}],["path",{d:"M12 20h-6a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h10.5",key:"svg-1"}],["path",{d:"M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M18 14.5v1.5",key:"svg-3"}],["path",{d:"M18 20v1.5",key:"svg-4"}],["path",{d:"M21.032 16.25l-1.299 .75",key:"svg-5"}],["path",{d:"M16.27 19l-1.3 .75",key:"svg-6"}],["path",{d:"M14.97 16.25l1.3 .75",key:"svg-7"}],["path",{d:"M19.733 19l1.3 .75",key:"svg-8"}],["path",{d:"M7 8v.01",key:"svg-9"}],["path",{d:"M7 16v.01",key:"svg-10"}]],tse=_t("outline","server-cog","ServerCog",ese);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nse=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3",key:"svg-0"}],["path",{d:"M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],rse=_t("outline","server","Server",nse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ise=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],sse=_t("outline","settings","Settings",ise);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ase=[["path",{d:"M3 11h18",key:"svg-0"}],["path",{d:"M5 11v-4a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v4",key:"svg-1"}],["path",{d:"M4 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}],["path",{d:"M10 17h4",key:"svg-4"}]],ose=_t("outline","spy","Spy",ase);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lse=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]],cH=_t("outline","table","Table",lse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cse=[["path",{d:"M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2",key:"svg-0"}],["path",{d:"M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592",key:"svg-1"}],["path",{d:"M7 10h-.01",key:"svg-2"}]],use=_t("outline","tags","Tags",cse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hse=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],dse=_t("outline","terminal","Terminal",hse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fse=[["path",{d:"M4 16l6 -7l5 5l5 -6",key:"svg-0"}],["path",{d:"M14 14a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 9a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M3 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 8a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],pse=_t("outline","timeline","Timeline",fse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const mse=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],sT=_t("outline","trash","Trash",mse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gse=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 8h16",key:"svg-1"}],["path",{d:"M20 12h-16",key:"svg-2"}],["path",{d:"M4 16h16",key:"svg-3"}],["path",{d:"M9 4v4",key:"svg-4"}],["path",{d:"M14 8v4",key:"svg-5"}],["path",{d:"M8 12v4",key:"svg-6"}],["path",{d:"M16 12v4",key:"svg-7"}],["path",{d:"M11 16v4",key:"svg-8"}]],vse=_t("outline","wall","Wall",gse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],yse=_t("outline","x","X",bse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xse=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}],["path",{d:"M8 8l-2 2l2 2",key:"svg-2"}],["path",{d:"M12 8l2 2l-2 2",key:"svg-3"}]],Ase=_t("outline","zoom-code","ZoomCode",xse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wse=[["path",{d:"M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z",key:"svg-0"}],["path",{d:"M12 2c1.358 0 2.506 .903 2.875 2.141l.046 .171l.008 .043a8.013 8.013 0 0 1 4.024 6.069l.028 .287l.019 .289v2.931l.021 .136a3 3 0 0 0 1.143 1.847l.167 .117l.162 .099c.86 .487 .56 1.766 -.377 1.864l-.116 .006h-16c-1.028 0 -1.387 -1.364 -.493 -1.87a3 3 0 0 0 1.472 -2.063l.021 -.143l.001 -2.97a8 8 0 0 1 3.821 -6.454l.248 -.146l.01 -.043a3.003 3.003 0 0 1 2.562 -2.29l.182 -.017l.176 -.004z",key:"svg-1"}]],Sse=_t("filled","bell-filled","BellFilled",wse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jse=[["path",{d:"M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-9 1.732a8 8 0 0 0 4.001 14.928l-.001 -16a8 8 0 0 0 -4 1.072",key:"svg-0"}]],Cse=_t("filled","brightness-filled","BrightnessFilled",jse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _se=[["path",{d:"M20 18a1 1 0 0 1 .117 1.993l-.117 .007h-16a1 1 0 0 1 -.117 -1.993l.117 -.007h16z",key:"svg-0"}],["path",{d:"M15.22 5.375a1 1 0 0 1 1.393 -.165l.094 .083l4 4a1 1 0 0 1 .284 .576l.009 .131v5a1 1 0 0 1 -.883 .993l-.117 .007h-16.022l-.11 -.009l-.11 -.02l-.107 -.034l-.105 -.046l-.1 -.059l-.094 -.07l-.06 -.055l-.072 -.082l-.064 -.089l-.054 -.096l-.016 -.035l-.04 -.103l-.027 -.106l-.015 -.108l-.004 -.11l.009 -.11l.019 -.105c.01 -.04 .022 -.077 .035 -.112l.046 -.105l.059 -.1l4 -6a1 1 0 0 1 1.165 -.39l.114 .05l3.277 1.638l3.495 -4.369z",key:"svg-1"}]],Tse=_t("filled","chart-area-filled","ChartAreaFilled",_se);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const kse=[["path",{d:"M12 1.992a10 10 0 1 0 9.236 13.838c.341 -.82 -.476 -1.644 -1.298 -1.31a6.5 6.5 0 0 1 -6.864 -10.787l.077 -.08c.551 -.63 .113 -1.653 -.758 -1.653h-.266l-.068 -.006l-.06 -.002z",key:"svg-0"}]],Ose=_t("filled","moon-filled","MoonFilled",kse);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ese=[["path",{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",key:"svg-0"}]],VC=_t("filled","point-filled","PointFilled",Ese);/**
 * @license @tabler/icons-react v3.43.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mse=[["path",{d:"M12 19a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z",key:"svg-0"}],["path",{d:"M18.313 16.91l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.218 -1.567l.102 .07z",key:"svg-1"}],["path",{d:"M7.007 16.993a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z",key:"svg-2"}],["path",{d:"M4 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",key:"svg-3"}],["path",{d:"M21 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",key:"svg-4"}],["path",{d:"M6.213 4.81l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.217 -1.567l.102 .07z",key:"svg-5"}],["path",{d:"M19.107 4.893a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z",key:"svg-6"}],["path",{d:"M12 2a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z",key:"svg-7"}],["path",{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",key:"svg-8"}]],Rse=_t("filled","sun-filled","SunFilled",Mse);/**
 * react-router v7.15.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var U8="popstate";function W8(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function Dse(t={}){function e(r,i){var h;let s=(h=i.state)==null?void 0:h.masked,{pathname:o,search:l,hash:u}=s||r.location;return aT("",{pathname:o,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:vv(i)}return Ise(e,n,null,t)}function Lr(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function hl(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Nse(){return Math.random().toString(36).substring(2,10)}function V8(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function aT(t,e,n=null,r,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?l0(e):e,state:n,key:e&&e.key||r||Nse(),mask:i}}function vv({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function l0(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Ise(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l="POP",u=null,h=f();h==null&&(h=0,o.replaceState({...o.state,idx:h},""));function f(){return(o.state||{idx:null}).idx}function p(){l="POP";let w=f(),A=w==null?null:w-h;h=w,u&&u({action:l,location:x.location,delta:A})}function m(w,A){l="PUSH";let S=W8(w)?w:aT(x.location,w,A);h=f()+1;let C=V8(S,h),j=x.createHref(S.mask||S);try{o.pushState(C,"",j)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(j)}s&&u&&u({action:l,location:x.location,delta:1})}function v(w,A){l="REPLACE";let S=W8(w)?w:aT(x.location,w,A);h=f();let C=V8(S,h),j=x.createHref(S.mask||S);o.replaceState(C,"",j),s&&u&&u({action:l,location:x.location,delta:0})}function y(w){return Bse(w)}let x={get action(){return l},get location(){return t(i,o)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(U8,p),u=w,()=>{i.removeEventListener(U8,p),u=null}},createHref(w){return e(i,w)},createURL:y,encodeLocation(w){let A=y(w);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:m,replace:v,go(w){return o.go(w)}};return x}function Bse(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Lr(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:vv(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function uH(t,e,n="/"){return Lse(t,e,n,!1)}function Lse(t,e,n,r,i){let s=typeof e=="string"?l0(e):e,o=su(s.pathname||"/",n);if(o==null)return null;let l=Pse(t),u=null,h=Xse(o);for(let f=0;u==null&&f<l.length;++f)u=Yse(l[f],h,r);return u}function Pse(t){let e=hH(t);return Fse(e),e}function hH(t,e=[],n=[],r="",i=!1){let s=(o,l,u=i,h)=>{let f={relativePath:h===void 0?o.path||"":h,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;Lr(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 p=al([r,f.relativePath]),m=n.concat(f);o.children&&o.children.length>0&&(Lr(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),hH(o.children,e,m,p,u)),!(o.path==null&&!o.index)&&e.push({path:p,score:Wse(p,o.index),routesMeta:m})};return t.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))s(o,l);else for(let h of dH(o.path))s(o,l,!0,h)}),e}function dH(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=dH(r.join("/")),l=[];return l.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&l.push(...o),l.map(u=>t.startsWith("/")&&u===""?"/":u)}function Fse(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Vse(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var zse=/^:[\w-]+$/,Hse=3,qse=2,$se=1,Qse=10,Use=-2,Y8=t=>t==="*";function Wse(t,e){let n=t.split("/"),r=n.length;return n.some(Y8)&&(r+=Use),e&&(r+=qse),n.filter(i=>!Y8(i)).reduce((i,s)=>i+(zse.test(s)?Hse:s===""?$se:Qse),r)}function Vse(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function Yse(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let l=0;l<r.length;++l){let u=r[l],h=l===r.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=uA({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},f),m=u.route;if(!p&&h&&n&&!r[r.length-1].route.index&&(p=uA({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:al([s,p.pathname]),pathnameBase:eae(al([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=al([s,p.pathnameBase]))}return o}function uA(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=Gse(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((h,{paramName:f,isOptional:p},m)=>{if(f==="*"){let y=l[m]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const v=l[m];return p&&!v?h[f]=void 0:h[f]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:t}}function Gse(t,e=!1,n=!0){hl(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,u,h,f)=>{if(r.push({paramName:l,isOptional:u!=null}),u){let p=f.charAt(h+o.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function Xse(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return hl(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function su(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var Kse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Zse(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?l0(t):t,s;return n?(n=fH(n),n.startsWith("/")?s=G8(n.substring(1),"/"):s=G8(n,e)):s=e,{pathname:s,search:tae(r),hash:nae(i)}}function G8(t,e){let n=hA(e).split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function YC(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` 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 Jse(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function IE(t){let e=Jse(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function d2(t,e,n,r=!1){let i;typeof t=="string"?i=l0(t):(i={...t},Lr(!i.pathname||!i.pathname.includes("?"),YC("?","pathname","search",i)),Lr(!i.pathname||!i.pathname.includes("#"),YC("#","pathname","hash",i)),Lr(!i.search||!i.search.includes("#"),YC("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let p=e.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?e[p]:"/"}let u=Zse(i,l),h=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(h||f)&&(u.pathname+="/"),u}var fH=t=>t.replace(/\/\/+/g,"/"),al=t=>fH(t.join("/")),hA=t=>t.replace(/\/+$/,""),eae=t=>hA(t).replace(/^\/*/,"/"),tae=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nae=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,rae=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function iae(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function sae(t){let e=t.map(n=>n.route.path).filter(Boolean);return al(e)||"/"}var pH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mH(t,e){let n=t;if(typeof n!="string"||!Kse.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pH)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),l=su(o.pathname,e);o.origin===s.origin&&l!=null?n=l+o.search+o.hash:i=!0}catch{hl(!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:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gH=["POST","PUT","PATCH","DELETE"];new Set(gH);var aae=["GET",...gH];new Set(aae);var Bf=E.createContext(null);Bf.displayName="DataRouter";var f2=E.createContext(null);f2.displayName="DataRouterState";var vH=E.createContext(!1);function oae(){return E.useContext(vH)}var bH=E.createContext({isTransitioning:!1});bH.displayName="ViewTransition";var lae=E.createContext(new Map);lae.displayName="Fetchers";var cae=E.createContext(null);cae.displayName="Await";var ba=E.createContext(null);ba.displayName="Navigation";var Eb=E.createContext(null);Eb.displayName="Location";var sc=E.createContext({outlet:null,matches:[],isDataRoute:!1});sc.displayName="Route";var BE=E.createContext(null);BE.displayName="RouteError";var yH="REACT_ROUTER_ERROR",uae="REDIRECT",hae="ROUTE_ERROR_RESPONSE";function dae(t){if(t.startsWith(`${yH}:${uae}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function fae(t){if(t.startsWith(`${yH}:${hae}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new rae(e.status,e.statusText,e.data)}catch{}}function pae(t,{relative:e}={}){Lr(c0(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(ba),{hash:i,pathname:s,search:o}=Mb(t,{relative:e}),l=s;return n!=="/"&&(l=s==="/"?n:al([n,s])),r.createHref({pathname:l,search:o,hash:i})}function c0(){return E.useContext(Eb)!=null}function To(){return Lr(c0(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Eb).location}var xH="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function AH(t){E.useContext(ba).static||E.useLayoutEffect(t)}function LE(){let{isDataRoute:t}=E.useContext(sc);return t?Tae():mae()}function mae(){Lr(c0(),"useNavigate() may be used only in the context of a <Router> component.");let t=E.useContext(Bf),{basename:e,navigator:n}=E.useContext(ba),{matches:r}=E.useContext(sc),{pathname:i}=To(),s=JSON.stringify(IE(r)),o=E.useRef(!1);return AH(()=>{o.current=!0}),E.useCallback((u,h={})=>{if(hl(o.current,xH),!o.current)return;if(typeof u=="number"){n.go(u);return}let f=d2(u,JSON.parse(s),i,h.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:al([e,f.pathname])),(h.replace?n.replace:n.push)(f,h.state,h)},[e,n,s,i,t])}E.createContext(null);function Mb(t,{relative:e}={}){let{matches:n}=E.useContext(sc),{pathname:r}=To(),i=JSON.stringify(IE(n));return E.useMemo(()=>d2(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function gae(t,e){return wH(t,e)}function wH(t,e,n){var w;Lr(c0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=E.useContext(ba),{matches:i}=E.useContext(sc),s=i[i.length-1],o=s?s.params:{},l=s?s.pathname:"/",u=s?s.pathnameBase:"/",h=s&&s.route;{let A=h&&h.path||"";jH(l,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${A}">) 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.

Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let f=To(),p;if(e){let A=typeof e=="string"?l0(e):e;Lr(u==="/"||((w=A.pathname)==null?void 0:w.startsWith(u)),`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 "${u}" but pathname "${A.pathname}" was given in the \`location\` prop.`),p=A}else p=f;let m=p.pathname||"/",v=m;if(u!=="/"){let A=u.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(A.length).join("/")}let y=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):uH(t,{pathname:v});hl(h||y!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),hl(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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 x=Aae(y&&y.map(A=>Object.assign({},A,{params:Object.assign({},o,A.params),pathname:al([u,r.encodeLocation?r.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?u:al([u,r.encodeLocation?r.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),i,n);return e&&x?E.createElement(Eb.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},x):x}function vae(){let t=_ae(),e=iae(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:s},"ErrorBoundary")," or"," ",E.createElement("code",{style:s},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:i},n):null,o)}var bae=E.createElement(vae,null),SH=class extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=fae(t.digest);n&&(t=n)}let e=t!==void 0?E.createElement(sc.Provider,{value:this.props.routeContext},E.createElement(BE.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?E.createElement(yae,{error:t},e):e}};SH.contextType=vH;var GC=new WeakMap;function yae({children:t,error:e}){let{basename:n}=E.useContext(ba);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=dae(e.digest);if(r){let i=GC.get(e);if(i)throw i;let s=mH(r.location,n);if(pH&&!GC.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw GC.set(e,o),o}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function xae({routeContext:t,match:e,children:n}){let r=E.useContext(Bf);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(sc.Provider,{value:t},n)}function Aae(t,e=[],n){let r=n==null?void 0:n.state;if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let i=t,s=r==null?void 0:r.errors;if(s!=null){let f=i.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);Lr(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let o=!1,l=-1;if(n&&r){o=r.renderFallback;for(let f=0;f<i.length;f++){let p=i[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(l=f),p.route.id){let{loaderData:m,errors:v}=r,y=p.route.loader&&!m.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||y){n.isStatic&&(o=!0),l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}}let u=n==null?void 0:n.onError,h=r&&u?(f,p)=>{var m,v;u(f,{location:r.location,params:((v=(m=r.matches)==null?void 0:m[0])==null?void 0:v.params)??{},pattern:sae(r.matches),errorInfo:p})}:void 0;return i.reduceRight((f,p,m)=>{let v,y=!1,x=null,w=null;r&&(v=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||bae,o&&(l<0&&m===0?(jH("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,w=null):l===m&&(y=!0,w=p.route.hydrateFallbackElement||null)));let A=e.concat(i.slice(0,m+1)),S=()=>{let C;return v?C=x:y?C=w:p.route.Component?C=E.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=f,E.createElement(xae,{match:p,routeContext:{outlet:f,matches:A,isDataRoute:r!=null},children:C})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?E.createElement(SH,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:S(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):S()},null)}function PE(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function wae(t){let e=E.useContext(Bf);return Lr(e,PE(t)),e}function Sae(t){let e=E.useContext(f2);return Lr(e,PE(t)),e}function jae(t){let e=E.useContext(sc);return Lr(e,PE(t)),e}function FE(t){let e=jae(t),n=e.matches[e.matches.length-1];return Lr(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Cae(){return FE("useRouteId")}function _ae(){var r;let t=E.useContext(BE),e=Sae("useRouteError"),n=FE("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function Tae(){let{router:t}=wae("useNavigate"),e=FE("useNavigate"),n=E.useRef(!1);return AH(()=>{n.current=!0}),E.useCallback(async(i,s={})=>{hl(n.current,xH),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var X8={};function jH(t,e,n){!e&&!X8[t]&&(X8[t]=!0,hl(!1,n))}E.memo(kae);function kae({routes:t,manifest:e,future:n,state:r,isStatic:i,onError:s}){return wH(t,void 0,{manifest:e,state:r,isStatic:i,onError:s})}function Oae({to:t,replace:e,state:n,relative:r}){Lr(c0(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=E.useContext(ba);hl(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=E.useContext(sc),{pathname:o}=To(),l=LE(),u=d2(t,IE(s),o,r==="path"),h=JSON.stringify(u);return E.useEffect(()=>{l(JSON.parse(h),{replace:e,state:n,relative:r})},[l,h,r,e,n]),null}function eh(t){Lr(!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 Eae({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,useTransitions:o}){Lr(!c0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:i,static:s,useTransitions:o,future:{}}),[l,i,s,o]);typeof n=="string"&&(n=l0(n));let{pathname:h="/",search:f="",hash:p="",state:m=null,key:v="default",mask:y}=n,x=E.useMemo(()=>{let w=su(h,l);return w==null?null:{location:{pathname:w,search:f,hash:p,state:m,key:v,mask:y},navigationType:r}},[l,h,f,p,m,v,r,y]);return hl(x!=null,`<Router basename="${l}"> is not able to match the URL "${h}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:E.createElement(ba.Provider,{value:u},E.createElement(Eb.Provider,{children:e,value:x}))}function K8({children:t,location:e}){return gae(oT(t),e)}function oT(t,e=[]){let n=[];return E.Children.forEach(t,(r,i)=>{if(!E.isValidElement(r))return;let s=[...e,i];if(r.type===E.Fragment){n.push.apply(n,oT(r.props.children,s));return}Lr(r.type===eh,`[${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>`),Lr(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.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&&(o.children=oT(r.props.children,s)),n.push(o)}),n}var Ax="get",wx="application/x-www-form-urlencoded";function p2(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Mae(t){return p2(t)&&t.tagName.toLowerCase()==="button"}function Rae(t){return p2(t)&&t.tagName.toLowerCase()==="form"}function Dae(t){return p2(t)&&t.tagName.toLowerCase()==="input"}function Nae(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Iae(t,e){return t.button===0&&(!e||e==="_self")&&!Nae(t)}var A1=null;function Bae(){if(A1===null)try{new FormData(document.createElement("form"),0),A1=!1}catch{A1=!0}return A1}var Lae=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function XC(t){return t!=null&&!Lae.has(t)?(hl(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wx}"`),null):t}function Pae(t,e){let n,r,i,s,o;if(Rae(t)){let l=t.getAttribute("action");r=l?su(l,e):null,n=t.getAttribute("method")||Ax,i=XC(t.getAttribute("enctype"))||wx,s=new FormData(t)}else if(Mae(t)||Dae(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=t.getAttribute("formaction")||l.getAttribute("action");if(r=u?su(u,e):null,n=t.getAttribute("formmethod")||l.getAttribute("method")||Ax,i=XC(t.getAttribute("formenctype"))||XC(l.getAttribute("enctype"))||wx,s=new FormData(l,t),!Bae()){let{name:h,type:f,value:p}=t;if(f==="image"){let m=h?`${h}.`:"";s.append(`${m}x`,"0"),s.append(`${m}y`,"0")}else h&&s.append(h,p)}}else{if(p2(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ax,r=null,i=wx,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zE(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function CH(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&su(i.pathname,e)==="/"?i.pathname=`${hA(e)}/_root.${r}`:i.pathname=`${hA(i.pathname)}.${r}`,i}async function Fae(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zae(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Hae(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await Fae(s,n);return o.links?o.links():[]}return[]}));return Uae(r.flat(1).filter(zae).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Z8(t,e,n,r,i,s){let o=(u,h)=>n[h]?u.route.id!==n[h].route.id:!0,l=(u,h)=>{var f;return n[h].pathname!==u.pathname||((f=n[h].route.path)==null?void 0:f.endsWith("*"))&&n[h].params["*"]!==u.params["*"]};return s==="assets"?e.filter((u,h)=>o(u,h)||l(u,h)):s==="data"?e.filter((u,h)=>{var p;let f=r.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(o(u,h)||l(u,h))return!0;if(u.route.shouldRevalidate){let m=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(t,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function qae(t,e,{includeHydrateFallback:n}={}){return $ae(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function $ae(t){return[...new Set(t)]}function Qae(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function Uae(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(Qae(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function HE(){let t=E.useContext(Bf);return zE(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Wae(){let t=E.useContext(f2);return zE(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var qE=E.createContext(void 0);qE.displayName="FrameworkContext";function $E(){let t=E.useContext(qE);return zE(t,"You must render this element inside a <HydratedRouter> element"),t}function Vae(t,e){let n=E.useContext(qE),[r,i]=E.useState(!1),[s,o]=E.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:h,onMouseLeave:f,onTouchStart:p}=e,m=E.useRef(null);E.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let x=A=>{A.forEach(S=>{o(S.isIntersecting)})},w=new IntersectionObserver(x,{threshold:.5});return m.current&&w.observe(m.current),()=>{w.disconnect()}}},[t]),E.useEffect(()=>{if(r){let x=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(x)}}},[r]);let v=()=>{i(!0)},y=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,m,{}]:[s,m,{onFocus:dg(l,v),onBlur:dg(u,y),onMouseEnter:dg(h,v),onMouseLeave:dg(f,y),onTouchStart:dg(p,v)}]:[!1,m,{}]}function dg(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function Yae({page:t,...e}){let n=oae(),{router:r}=HE(),i=E.useMemo(()=>uH(r.routes,t,r.basename),[r.routes,t,r.basename]);return i?n?E.createElement(Xae,{page:t,matches:i,...e}):E.createElement(Kae,{page:t,matches:i,...e}):null}function Gae(t){let{manifest:e,routeModules:n}=$E(),[r,i]=E.useState([]);return E.useEffect(()=>{let s=!1;return Hae(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function Xae({page:t,matches:e,...n}){let r=To(),{future:i}=$E(),{basename:s}=HE(),o=E.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let l=CH(t,s,i.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,h=[];for(let f of e)typeof f.route.shouldRevalidate=="function"?u=!0:h.push(f.route.id);return u&&h.length>0&&l.searchParams.set("_routes",h.join(",")),[l.pathname+l.search]},[s,i.unstable_trailingSlashAwareDataRequests,t,r,e]);return E.createElement(E.Fragment,null,o.map(l=>E.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function Kae({page:t,matches:e,...n}){let r=To(),{future:i,manifest:s,routeModules:o}=$E(),{basename:l}=HE(),{loaderData:u,matches:h}=Wae(),f=E.useMemo(()=>Z8(t,e,h,s,r,"data"),[t,e,h,s,r]),p=E.useMemo(()=>Z8(t,e,h,s,r,"assets"),[t,e,h,s,r]),m=E.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let x=new Set,w=!1;if(e.forEach(S=>{var j;let C=s.routes[S.route.id];!C||!C.hasLoader||(!f.some(_=>_.route.id===S.route.id)&&S.route.id in u&&((j=o[S.route.id])!=null&&j.shouldRevalidate)||C.hasClientLoader?w=!0:x.add(S.route.id))}),x.size===0)return[];let A=CH(t,l,i.unstable_trailingSlashAwareDataRequests,"data");return w&&x.size>0&&A.searchParams.set("_routes",e.filter(S=>x.has(S.route.id)).map(S=>S.route.id).join(",")),[A.pathname+A.search]},[l,i.unstable_trailingSlashAwareDataRequests,u,r,s,f,e,t,o]),v=E.useMemo(()=>qae(p,s),[p,s]),y=Gae(p);return E.createElement(E.Fragment,null,m.map(x=>E.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),v.map(x=>E.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),y.map(({key:x,link:w})=>E.createElement("link",{key:x,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function Zae(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var Jae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Jae&&(window.__reactRouterVersion="7.15.0")}catch{}function eoe({basename:t,children:e,useTransitions:n,window:r}){let i=E.useRef();i.current==null&&(i.current=Dse({window:r,v5Compat:!0}));let s=i.current,[o,l]=E.useState({action:s.action,location:s.location}),u=E.useCallback(h=>{n===!1?l(h):E.startTransition(()=>l(h))},[n]);return E.useLayoutEffect(()=>s.listen(u),[s,u]),E.createElement(Eae,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,useTransitions:n})}var _H=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,QE=E.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,mask:l,state:u,target:h,to:f,preventScrollReset:p,viewTransition:m,defaultShouldRevalidate:v,...y},x){let{basename:w,navigator:A,useTransitions:S}=E.useContext(ba),C=typeof f=="string"&&_H.test(f),j=mH(f,w);f=j.to;let _=pae(f,{relative:i}),O=To(),M=null;if(l){let z=d2(l,[],O.mask?O.mask.pathname:"/",!0);w!=="/"&&(z.pathname=z.pathname==="/"?w:al([w,z.pathname])),M=A.createHref(z)}let[R,N,B]=Vae(r,y),D=roe(f,{replace:o,mask:l,state:u,target:h,preventScrollReset:p,relative:i,viewTransition:m,defaultShouldRevalidate:v,useTransitions:S});function L(z){e&&e(z),z.defaultPrevented||D(z)}let U=!(j.isExternal||s),H=E.createElement("a",{...y,...B,href:(U?M:void 0)||j.absoluteURL||_,onClick:U?L:e,ref:Zae(x,N),target:h,"data-discover":!C&&n==="render"?"true":void 0});return R&&!C?E.createElement(E.Fragment,null,H,E.createElement(Yae,{page:_})):H});QE.displayName="Link";var Mg=E.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:l,children:u,...h},f){let p=Mb(o,{relative:h.relative}),m=To(),v=E.useContext(f2),{navigator:y,basename:x}=E.useContext(ba),w=v!=null&&loe(p)&&l===!0,A=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,S=m.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(S=S.toLowerCase(),C=C?C.toLowerCase():null,A=A.toLowerCase()),C&&x&&(C=su(C,x)||C);const j=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let _=S===A||!i&&S.startsWith(A)&&S.charAt(j)==="/",O=C!=null&&(C===A||!i&&C.startsWith(A)&&C.charAt(A.length)==="/"),M={isActive:_,isPending:O,isTransitioning:w},R=_?e:void 0,N;typeof r=="function"?N=r(M):N=[r,_?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let B=typeof s=="function"?s(M):s;return E.createElement(QE,{...h,"aria-current":R,className:N,ref:f,style:B,to:o,viewTransition:l},typeof u=="function"?u(M):u)});Mg.displayName="NavLink";var toe=E.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Ax,action:l,onSubmit:u,relative:h,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...v},y)=>{let{useTransitions:x}=E.useContext(ba),w=aoe(),A=ooe(l,{relative:h}),S=o.toLowerCase()==="get"?"get":"post",C=typeof l=="string"&&_H.test(l),j=_=>{if(u&&u(_),_.defaultPrevented)return;_.preventDefault();let O=_.nativeEvent.submitter,M=(O==null?void 0:O.getAttribute("formmethod"))||o,R=()=>w(O||_.currentTarget,{fetcherKey:e,method:M,navigate:n,replace:i,state:s,relative:h,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});x&&n!==!1?E.startTransition(()=>R()):R()};return E.createElement("form",{ref:y,method:S,action:A,onSubmit:r?u:j,...v,"data-discover":!C&&t==="render"?"true":void 0})});toe.displayName="Form";function noe(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function TH(t){let e=E.useContext(Bf);return Lr(e,noe(t)),e}function roe(t,{target:e,replace:n,mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:l,defaultShouldRevalidate:u,useTransitions:h}={}){let f=LE(),p=To(),m=Mb(t,{relative:o});return E.useCallback(v=>{if(Iae(v,e)){v.preventDefault();let y=n!==void 0?n:vv(p)===vv(m),x=()=>f(t,{replace:y,mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:l,defaultShouldRevalidate:u});h?E.startTransition(()=>x()):x()}},[p,f,m,n,r,i,e,t,s,o,l,u,h])}var ioe=0,soe=()=>`__${String(++ioe)}__`;function aoe(){let{router:t}=TH("useSubmit"),{basename:e}=E.useContext(ba),n=Cae(),r=t.fetch,i=t.navigate;return E.useCallback(async(s,o={})=>{let{action:l,method:u,encType:h,formData:f,body:p}=Pae(s,e);if(o.navigate===!1){let m=o.fetcherKey||soe();await r(m,n,o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:p,formMethod:o.method||u,formEncType:o.encType||h,flushSync:o.flushSync})}else await i(o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:p,formMethod:o.method||u,formEncType:o.encType||h,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function ooe(t,{relative:e}={}){let{basename:n}=E.useContext(ba),r=E.useContext(sc);Lr(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Mb(t||".",{relative:e})},o=To();if(t==null){s.search=o.search;let l=new URLSearchParams(s.search),u=l.getAll("index");if(u.some(f=>f==="")){l.delete("index"),u.filter(p=>p).forEach(p=>l.append("index",p));let f=l.toString();s.search=f?`?${f}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:al([n,s.pathname])),vv(s)}function loe(t,{relative:e}={}){let n=E.useContext(bH);Lr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=TH("useViewTransitionState"),i=Mb(t,{relative:e});if(!n.isTransitioning)return!1;let s=su(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=su(n.nextLocation.pathname,r)||n.nextLocation.pathname;return uA(i.pathname,o)!=null||uA(i.pathname,s)!=null}var Rb=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ef,ph,am,q9,coe=(q9=class extends Rb{constructor(){super();at(this,ef);at(this,ph);at(this,am);Me(this,am,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,ph)||this.setEventListener(q(this,am))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,ph))==null||e.call(this),Me(this,ph,void 0))}setEventListener(e){var n;Me(this,am,e),(n=q(this,ph))==null||n.call(this),Me(this,ph,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){q(this,ef)!==e&&(Me(this,ef,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof q(this,ef)=="boolean"?q(this,ef):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ef=new WeakMap,ph=new WeakMap,am=new WeakMap,q9),UE=new coe,uoe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},mh,uO,$9,hoe=($9=class{constructor(){at(this,mh,uoe);at(this,uO,!1)}setTimeoutProvider(t){Me(this,mh,t)}setTimeout(t,e){return q(this,mh).setTimeout(t,e)}clearTimeout(t){q(this,mh).clearTimeout(t)}setInterval(t,e){return q(this,mh).setInterval(t,e)}clearInterval(t){q(this,mh).clearInterval(t)}},mh=new WeakMap,uO=new WeakMap,$9),Yd=new hoe;function doe(t){setTimeout(t,0)}var foe=typeof window>"u"||"Deno"in globalThis;function la(){}function poe(t,e){return typeof t=="function"?t(e):t}function lT(t){return typeof t=="number"&&t>=0&&t!==1/0}function kH(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mh(t,e){return typeof t=="function"?t(e):t}function Pa(t,e){return typeof t=="function"?t(e):t}function J8(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=t;if(o){if(r){if(e.queryHash!==WE(o,e.options))return!1}else if(!yv(e.queryKey,o))return!1}if(n!=="all"){const u=e.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function e5(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(bv(e.options.mutationKey)!==bv(s))return!1}else if(!yv(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function WE(t,e){return((e==null?void 0:e.queryKeyHashFn)||bv)(t)}function bv(t){return JSON.stringify(t,(e,n)=>uT(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function yv(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>yv(t[n],e[n])):!1}var moe=Object.prototype.hasOwnProperty;function OH(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=t5(t)&&t5(e);if(!r&&!(uT(t)&&uT(e)))return e;const s=(r?t:Object.keys(t)).length,o=r?e:Object.keys(e),l=o.length,u=r?new Array(l):{};let h=0;for(let f=0;f<l;f++){const p=r?f:o[f],m=t[p],v=e[p];if(m===v){u[p]=m,(r?f<s:moe.call(t,p))&&h++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){u[p]=v;continue}const y=OH(m,v,n+1);u[p]=y,y===m&&h++}return s===l&&h===s?t:u}function cT(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function t5(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function uT(t){if(!n5(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!n5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function n5(t){return Object.prototype.toString.call(t)==="[object Object]"}function goe(t){return new Promise(e=>{Yd.setTimeout(e,t)})}function hT(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?OH(t,e):e}function voe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function boe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var VE=Symbol();function EH(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===VE?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function MH(t,e){return typeof t=="function"?t(...e):!!t}function yoe(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var xv=(()=>{let t=()=>foe;return{isServer(){return t()},setIsServer(e){t=e}}})();function dT(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var xoe=doe;function Aoe(){let t=[],e=0,n=l=>{l()},r=l=>{l()},i=xoe;const s=l=>{e?t.push(l):i(()=>{n(l)})},o=()=>{const l=t;t=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var hs=Aoe(),om,gh,lm,Q9,woe=(Q9=class extends Rb{constructor(){super();at(this,om,!0);at(this,gh);at(this,lm);Me(this,lm,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,gh)||this.setEventListener(q(this,lm))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,gh))==null||e.call(this),Me(this,gh,void 0))}setEventListener(e){var n;Me(this,lm,e),(n=q(this,gh))==null||n.call(this),Me(this,gh,e(this.setOnline.bind(this)))}setOnline(e){q(this,om)!==e&&(Me(this,om,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return q(this,om)}},om=new WeakMap,gh=new WeakMap,lm=new WeakMap,Q9),dA=new woe;function Soe(t){return Math.min(1e3*2**t,3e4)}function RH(t){return(t??"online")==="online"?dA.isOnline():!0}var fT=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function DH(t){let e=!1,n=0,r;const i=dT(),s=()=>i.status!=="pending",o=x=>{var w;if(!s()){const A=new fT(x);m(A),(w=t.onCancel)==null||w.call(t,A)}},l=()=>{e=!0},u=()=>{e=!1},h=()=>UE.isFocused()&&(t.networkMode==="always"||dA.isOnline())&&t.canRun(),f=()=>RH(t.networkMode)&&t.canRun(),p=x=>{s()||(r==null||r(),i.resolve(x))},m=x=>{s()||(r==null||r(),i.reject(x))},v=()=>new Promise(x=>{var w;r=A=>{(s()||h())&&x(A)},(w=t.onPause)==null||w.call(t)}).then(()=>{var x;r=void 0,s()||(x=t.onContinue)==null||x.call(t)}),y=()=>{if(s())return;let x;const w=n===0?t.initialPromise:void 0;try{x=w??t.fn()}catch(A){x=Promise.reject(A)}Promise.resolve(x).then(p).catch(A=>{var O;if(s())return;const S=t.retry??(xv.isServer()?0:3),C=t.retryDelay??Soe,j=typeof C=="function"?C(n,A):C,_=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,A);if(e||!_){m(A);return}n++,(O=t.onFail)==null||O.call(t,n,A),goe(j).then(()=>h()?void 0:v()).then(()=>{e?m(A):y()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:f,start:()=>(f()?y():v().then(y),i)}}var tf,U9,NH=(U9=class{constructor(){at(this,tf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lT(this.gcTime)&&Me(this,tf,Yd.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(xv.isServer()?1/0:5*60*1e3))}clearGcTimeout(){q(this,tf)!==void 0&&(Yd.clearTimeout(q(this,tf)),Me(this,tf,void 0))}},tf=new WeakMap,U9);function joe(t){return{onFetch:(e,n)=>{var f,p,m,v,y;const r=e.options,i=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((v=e.state.data)==null?void 0:v.pages)||[],o=((y=e.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const h=async()=>{let x=!1;const w=C=>{yoe(C,()=>e.signal,()=>x=!0)},A=EH(e.options,e.fetchOptions),S=async(C,j,_)=>{if(x)return Promise.reject(e.signal.reason);if(j==null&&C.pages.length)return Promise.resolve(C);const M=(()=>{const D={client:e.client,queryKey:e.queryKey,pageParam:j,direction:_?"backward":"forward",meta:e.options.meta};return w(D),D})(),R=await A(M),{maxPages:N}=e.options,B=_?boe:voe;return{pages:B(C.pages,R,N),pageParams:B(C.pageParams,j,N)}};if(i&&s.length){const C=i==="backward",j=C?Coe:r5,_={pages:s,pageParams:o},O=j(r,_);l=await S(_,O,C)}else{const C=t??s.length;do{const j=u===0?o[0]??r.initialPageParam:r5(r,l);if(u>0&&j==null)break;l=await S(l,j),u++}while(u<C)}return l};e.options.persister?e.fetchFn=()=>{var x,w;return(w=(x=e.options).persister)==null?void 0:w.call(x,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=h}}}function r5(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Coe(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var cm,nf,um,lo,rf,$i,Gv,sf,La,IH,Qc,W9,_oe=(W9=class extends NH{constructor(e){super();at(this,La);at(this,cm);at(this,nf);at(this,um);at(this,lo);at(this,rf);at(this,$i);at(this,Gv);at(this,sf);Me(this,sf,!1),Me(this,Gv,e.defaultOptions),this.setOptions(e.options),this.observers=[],Me(this,rf,e.client),Me(this,lo,q(this,rf).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Me(this,nf,s5(this.options)),this.state=e.state??q(this,nf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return q(this,cm)}get promise(){var e;return(e=q(this,$i))==null?void 0:e.promise}setOptions(e){if(this.options={...q(this,Gv),...e},e!=null&&e._type&&Me(this,cm,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=s5(this.options);n.data!==void 0&&(this.setState(i5(n.data,n.dataUpdatedAt)),Me(this,nf,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,lo).remove(this)}setData(e,n){const r=hT(this.state.data,e,this.options);return Fe(this,La,Qc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){Fe(this,La,Qc).call(this,{type:"setState",state:e})}cancel(e){var r,i;const n=(r=q(this,$i))==null?void 0:r.promise;return(i=q(this,$i))==null||i.cancel(e),n?n.then(la).catch(la):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,nf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Pa(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===VE||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mh(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!kH(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=q(this,$i))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=q(this,$i))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),q(this,lo).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(q(this,$i)&&(q(this,sf)||Fe(this,La,IH).call(this)?q(this,$i).cancel({revert:!0}):q(this,$i).cancelRetry()),this.scheduleGc()),q(this,lo).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,La,Qc).call(this,{type:"invalidate"})}async fetch(e,n){var h,f,p,m,v,y,x,w,A,S,C;if(this.state.fetchStatus!=="idle"&&((h=q(this,$i))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,$i))return q(this,$i).continueRetry(),q(this,$i).promise}if(e&&this.setOptions(e),!this.options.queryFn){const j=this.observers.find(_=>_.options.queryFn);j&&this.setOptions(j.options)}const r=new AbortController,i=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(Me(this,sf,!0),r.signal)})},s=()=>{const j=EH(this.options,n),O=(()=>{const M={client:q(this,rf),queryKey:this.queryKey,meta:this.meta};return i(M),M})();return Me(this,sf,!1),this.options.persister?this.options.persister(j,O,this):j(O)},l=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,rf),state:this.state,fetchFn:s};return i(j),j})(),u=q(this,cm)==="infinite"?joe(this.options.pages):this.options.behavior;u==null||u.onFetch(l,this),Me(this,um,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Fe(this,La,Qc).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),Me(this,$i,DH({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:j=>{j instanceof fT&&j.revert&&this.setState({...q(this,um),fetchStatus:"idle"}),r.abort()},onFail:(j,_)=>{Fe(this,La,Qc).call(this,{type:"failed",failureCount:j,error:_})},onPause:()=>{Fe(this,La,Qc).call(this,{type:"pause"})},onContinue:()=>{Fe(this,La,Qc).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const j=await q(this,$i).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(v=(m=q(this,lo).config).onSuccess)==null||v.call(m,j,this),(x=(y=q(this,lo).config).onSettled)==null||x.call(y,j,this.state.error,this),j}catch(j){if(j instanceof fT){if(j.silent)return q(this,$i).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Fe(this,La,Qc).call(this,{type:"error",error:j}),(A=(w=q(this,lo).config).onError)==null||A.call(w,j,this),(C=(S=q(this,lo).config).onSettled)==null||C.call(S,this.state.data,j,this),j}finally{this.scheduleGc()}}},cm=new WeakMap,nf=new WeakMap,um=new WeakMap,lo=new WeakMap,rf=new WeakMap,$i=new WeakMap,Gv=new WeakMap,sf=new WeakMap,La=new WeakSet,IH=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Qc=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...BH(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...i5(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Me(this,um,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),hs.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,lo).notify({query:this,type:"updated",action:e})})},W9);function BH(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:RH(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function i5(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function s5(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var aa,yn,Xv,Ps,af,hm,Vc,vh,Kv,dm,fm,of,lf,bh,pm,$n,Rg,pT,mT,gT,vT,bT,yT,xT,PH,V9,LH=(V9=class extends Rb{constructor(e,n){super();at(this,$n);at(this,aa);at(this,yn);at(this,Xv);at(this,Ps);at(this,af);at(this,hm);at(this,Vc);at(this,vh);at(this,Kv);at(this,dm);at(this,fm);at(this,of);at(this,lf);at(this,bh);at(this,pm,new Set);this.options=n,Me(this,aa,e),Me(this,vh,null),Me(this,Vc,dT()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,yn).addObserver(this),a5(q(this,yn),this.options)?Fe(this,$n,Rg).call(this):this.updateResult(),Fe(this,$n,vT).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return AT(q(this,yn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return AT(q(this,yn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,$n,bT).call(this),Fe(this,$n,yT).call(this),q(this,yn).removeObserver(this)}setOptions(e){const n=this.options,r=q(this,yn);if(this.options=q(this,aa).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pa(this.options.enabled,q(this,yn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,$n,xT).call(this),q(this,yn).setOptions(this.options),n._defaulted&&!cT(this.options,n)&&q(this,aa).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,yn),observer:this});const i=this.hasListeners();i&&o5(q(this,yn),r,this.options,n)&&Fe(this,$n,Rg).call(this),this.updateResult(),i&&(q(this,yn)!==r||Pa(this.options.enabled,q(this,yn))!==Pa(n.enabled,q(this,yn))||Mh(this.options.staleTime,q(this,yn))!==Mh(n.staleTime,q(this,yn)))&&Fe(this,$n,pT).call(this);const s=Fe(this,$n,mT).call(this);i&&(q(this,yn)!==r||Pa(this.options.enabled,q(this,yn))!==Pa(n.enabled,q(this,yn))||s!==q(this,bh))&&Fe(this,$n,gT).call(this,s)}getOptimisticResult(e){const n=q(this,aa).getQueryCache().build(q(this,aa),e),r=this.createResult(n,e);return koe(this,r)&&(Me(this,Ps,r),Me(this,hm,this.options),Me(this,af,q(this,yn).state)),r}getCurrentResult(){return q(this,Ps)}trackResult(e,n){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,Vc).status==="pending"&&q(this,Vc).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){q(this,pm).add(e)}getCurrentQuery(){return q(this,yn)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=q(this,aa).defaultQueryOptions(e),r=q(this,aa).getQueryCache().build(q(this,aa),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Fe(this,$n,Rg).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,Ps)))}createResult(e,n){var N;const r=q(this,yn),i=this.options,s=q(this,Ps),o=q(this,af),l=q(this,hm),h=e!==r?e.state:q(this,Xv),{state:f}=e;let p={...f},m=!1,v;if(n._optimisticResults){const B=this.hasListeners(),D=!B&&a5(e,n),L=B&&o5(e,r,n,i);(D||L)&&(p={...p,...BH(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:w}=p;v=p.data;let A=!1;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let B;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(B=s.data,A=!0):B=typeof n.placeholderData=="function"?n.placeholderData((N=q(this,fm))==null?void 0:N.state.data,q(this,fm)):n.placeholderData,B!==void 0&&(w="success",v=hT(s==null?void 0:s.data,B,n),m=!0)}if(n.select&&v!==void 0&&!A)if(s&&v===(o==null?void 0:o.data)&&n.select===q(this,Kv))v=q(this,dm);else try{Me(this,Kv,n.select),v=n.select(v),v=hT(s==null?void 0:s.data,v,n),Me(this,dm,v),Me(this,vh,null)}catch(B){Me(this,vh,B)}q(this,vh)&&(y=q(this,vh),v=q(this,dm),x=Date.now(),w="error");const S=p.fetchStatus==="fetching",C=w==="pending",j=w==="error",_=C&&S,O=v!==void 0,R={status:w,fetchStatus:p.fetchStatus,isPending:C,isSuccess:w==="success",isError:j,isInitialLoading:_,isLoading:_,data:v,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:S,isRefetching:S&&!C,isLoadingError:j&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:j&&O,isStale:YE(e,n),refetch:this.refetch,promise:q(this,Vc),isEnabled:Pa(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const B=R.data!==void 0,D=R.status==="error"&&!B,L=z=>{D?z.reject(R.error):B&&z.resolve(R.data)},U=()=>{const z=Me(this,Vc,R.promise=dT());L(z)},H=q(this,Vc);switch(H.status){case"pending":e.queryHash===r.queryHash&&L(H);break;case"fulfilled":(D||R.data!==H.value)&&U();break;case"rejected":(!D||R.error!==H.reason)&&U();break}}return R}updateResult(){const e=q(this,Ps),n=this.createResult(q(this,yn),this.options);if(Me(this,af,q(this,yn).state),Me(this,hm,this.options),q(this,af).data!==void 0&&Me(this,fm,q(this,yn)),cT(n,e))return;Me(this,Ps,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!q(this,pm).size)return!0;const o=new Set(s??q(this,pm));return this.options.throwOnError&&o.add("error"),Object.keys(q(this,Ps)).some(l=>{const u=l;return q(this,Ps)[u]!==e[u]&&o.has(u)})};Fe(this,$n,PH).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,$n,vT).call(this)}},aa=new WeakMap,yn=new WeakMap,Xv=new WeakMap,Ps=new WeakMap,af=new WeakMap,hm=new WeakMap,Vc=new WeakMap,vh=new WeakMap,Kv=new WeakMap,dm=new WeakMap,fm=new WeakMap,of=new WeakMap,lf=new WeakMap,bh=new WeakMap,pm=new WeakMap,$n=new WeakSet,Rg=function(e){Fe(this,$n,xT).call(this);let n=q(this,yn).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(la)),n},pT=function(){Fe(this,$n,bT).call(this);const e=Mh(this.options.staleTime,q(this,yn));if(xv.isServer()||q(this,Ps).isStale||!lT(e))return;const r=kH(q(this,Ps).dataUpdatedAt,e)+1;Me(this,of,Yd.setTimeout(()=>{q(this,Ps).isStale||this.updateResult()},r))},mT=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,yn)):this.options.refetchInterval)??!1},gT=function(e){Fe(this,$n,yT).call(this),Me(this,bh,e),!(xv.isServer()||Pa(this.options.enabled,q(this,yn))===!1||!lT(q(this,bh))||q(this,bh)===0)&&Me(this,lf,Yd.setInterval(()=>{(this.options.refetchIntervalInBackground||UE.isFocused())&&Fe(this,$n,Rg).call(this)},q(this,bh)))},vT=function(){Fe(this,$n,pT).call(this),Fe(this,$n,gT).call(this,Fe(this,$n,mT).call(this))},bT=function(){q(this,of)!==void 0&&(Yd.clearTimeout(q(this,of)),Me(this,of,void 0))},yT=function(){q(this,lf)!==void 0&&(Yd.clearInterval(q(this,lf)),Me(this,lf,void 0))},xT=function(){const e=q(this,aa).getQueryCache().build(q(this,aa),this.options);if(e===q(this,yn))return;const n=q(this,yn);Me(this,yn,e),Me(this,Xv,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},PH=function(e){hs.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(q(this,Ps))}),q(this,aa).getQueryCache().notify({query:q(this,yn),type:"observerResultsUpdated"})})},V9);function Toe(t,e){return Pa(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Pa(e.retryOnMount,t)===!1)}function a5(t,e){return Toe(t,e)||t.state.data!==void 0&&AT(t,e,e.refetchOnMount)}function AT(t,e,n){if(Pa(e.enabled,t)!==!1&&Mh(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&YE(t,e)}return!1}function o5(t,e,n,r){return(t!==e||Pa(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&YE(t,n)}function YE(t,e){return Pa(e.enabled,t)!==!1&&t.isStaleByTime(Mh(e.staleTime,t))}function koe(t,e){return!cT(t.getCurrentResult(),e)}var Zv,Il,Ts,cf,Bl,th,Y9,Ooe=(Y9=class extends NH{constructor(e){super();at(this,Bl);at(this,Zv);at(this,Il);at(this,Ts);at(this,cf);Me(this,Zv,e.client),this.mutationId=e.mutationId,Me(this,Ts,e.mutationCache),Me(this,Il,[]),this.state=e.state||Eoe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){q(this,Il).includes(e)||(q(this,Il).push(e),this.clearGcTimeout(),q(this,Ts).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Me(this,Il,q(this,Il).filter(n=>n!==e)),this.scheduleGc(),q(this,Ts).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){q(this,Il).length||(this.state.status==="pending"?this.scheduleGc():q(this,Ts).remove(this))}continue(){var e;return((e=q(this,cf))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,u,h,f,p,m,v,y,x,w,A,S,C,j,_,O,M;const n=()=>{Fe(this,Bl,th).call(this,{type:"continue"})},r={client:q(this,Zv),meta:this.options.meta,mutationKey:this.options.mutationKey};Me(this,cf,DH({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,N)=>{Fe(this,Bl,th).call(this,{type:"failed",failureCount:R,error:N})},onPause:()=>{Fe(this,Bl,th).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,Ts).canRun(this)}));const i=this.state.status==="pending",s=!q(this,cf).canStart();try{if(i)n();else{Fe(this,Bl,th).call(this,{type:"pending",variables:e,isPaused:s}),q(this,Ts).config.onMutate&&await q(this,Ts).config.onMutate(e,this,r);const N=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e,r));N!==this.state.context&&Fe(this,Bl,th).call(this,{type:"pending",context:N,variables:e,isPaused:s})}const R=await q(this,cf).start();return await((h=(u=q(this,Ts).config).onSuccess)==null?void 0:h.call(u,R,e,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,R,e,this.state.context,r)),await((v=(m=q(this,Ts).config).onSettled)==null?void 0:v.call(m,R,null,this.state.variables,this.state.context,this,r)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,R,null,e,this.state.context,r)),Fe(this,Bl,th).call(this,{type:"success",data:R}),R}catch(R){try{await((A=(w=q(this,Ts).config).onError)==null?void 0:A.call(w,R,e,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((C=(S=this.options).onError)==null?void 0:C.call(S,R,e,this.state.context,r))}catch(N){Promise.reject(N)}try{await((_=(j=q(this,Ts).config).onSettled)==null?void 0:_.call(j,void 0,R,this.state.variables,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((M=(O=this.options).onSettled)==null?void 0:M.call(O,void 0,R,e,this.state.context,r))}catch(N){Promise.reject(N)}throw Fe(this,Bl,th).call(this,{type:"error",error:R}),R}finally{q(this,Ts).runNext(this)}}},Zv=new WeakMap,Il=new WeakMap,Ts=new WeakMap,cf=new WeakMap,Bl=new WeakSet,th=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),hs.batch(()=>{q(this,Il).forEach(r=>{r.onMutationUpdate(e)}),q(this,Ts).notify({mutation:this,type:"updated",action:e})})},Y9);function Eoe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yc,Ho,Jv,G9,Moe=(G9=class extends Rb{constructor(e={}){super();at(this,Yc);at(this,Ho);at(this,Jv);this.config=e,Me(this,Yc,new Set),Me(this,Ho,new Map),Me(this,Jv,0)}build(e,n,r){const i=new Ooe({client:e,mutationCache:this,mutationId:++Od(this,Jv)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){q(this,Yc).add(e);const n=w1(e);if(typeof n=="string"){const r=q(this,Ho).get(n);r?r.push(e):q(this,Ho).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(q(this,Yc).delete(e)){const n=w1(e);if(typeof n=="string"){const r=q(this,Ho).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&q(this,Ho).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=w1(e);if(typeof n=="string"){const r=q(this,Ho).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=w1(e);if(typeof n=="string"){const i=(r=q(this,Ho).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){hs.batch(()=>{q(this,Yc).forEach(e=>{this.notify({type:"removed",mutation:e})}),q(this,Yc).clear(),q(this,Ho).clear()})}getAll(){return Array.from(q(this,Yc))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>e5(n,r))}findAll(e={}){return this.getAll().filter(n=>e5(e,n))}notify(e){hs.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return hs.batch(()=>Promise.all(e.map(n=>n.continue().catch(la))))}},Yc=new WeakMap,Ho=new WeakMap,Jv=new WeakMap,G9);function w1(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Ll,X9,Roe=(X9=class extends Rb{constructor(e={}){super();at(this,Ll);this.config=e,Me(this,Ll,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??WE(i,n);let o=this.get(s);return o||(o=new _oe({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){q(this,Ll).has(e.queryHash)||(q(this,Ll).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=q(this,Ll).get(e.queryHash);n&&(e.destroy(),n===e&&q(this,Ll).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){hs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return q(this,Ll).get(e)}getAll(){return[...q(this,Ll).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>J8(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>J8(e,r)):n}notify(e){hs.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){hs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){hs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ll=new WeakMap,X9),ei,yh,xh,mm,gm,Ah,vm,bm,K9,Doe=(K9=class{constructor(t={}){at(this,ei);at(this,yh);at(this,xh);at(this,mm);at(this,gm);at(this,Ah);at(this,vm);at(this,bm);Me(this,ei,t.queryCache||new Roe),Me(this,yh,t.mutationCache||new Moe),Me(this,xh,t.defaultOptions||{}),Me(this,mm,new Map),Me(this,gm,new Map),Me(this,Ah,0)}mount(){Od(this,Ah)._++,q(this,Ah)===1&&(Me(this,vm,UE.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,ei).onFocus())})),Me(this,bm,dA.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,ei).onOnline())})))}unmount(){var t,e;Od(this,Ah)._--,q(this,Ah)===0&&((t=q(this,vm))==null||t.call(this),Me(this,vm,void 0),(e=q(this,bm))==null||e.call(this),Me(this,bm,void 0))}isFetching(t){return q(this,ei).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return q(this,yh).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=q(this,ei).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=q(this,ei).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mh(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return q(this,ei).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=q(this,ei).get(r.queryHash),s=i==null?void 0:i.state.data,o=poe(e,s);if(o!==void 0)return q(this,ei).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return hs.batch(()=>q(this,ei).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=q(this,ei).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=q(this,ei);hs.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=q(this,ei);return hs.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=hs.batch(()=>q(this,ei).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(la).catch(la)}invalidateQueries(t,e={}){return hs.batch(()=>(q(this,ei).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=hs.batch(()=>q(this,ei).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(la)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(la)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=q(this,ei).build(this,e);return n.isStaleByTime(Mh(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(la).catch(la)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(la).catch(la)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return dA.isOnline()?q(this,yh).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,ei)}getMutationCache(){return q(this,yh)}getDefaultOptions(){return q(this,xh)}setDefaultOptions(t){Me(this,xh,t)}setQueryDefaults(t,e){q(this,mm).set(bv(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...q(this,mm).values()],n={};return e.forEach(r=>{yv(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){q(this,gm).set(bv(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...q(this,gm).values()],n={};return e.forEach(r=>{yv(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...q(this,xh).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=WE(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===VE&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...q(this,xh).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){q(this,ei).clear(),q(this,yh).clear()}},ei=new WeakMap,yh=new WeakMap,xh=new WeakMap,mm=new WeakMap,gm=new WeakMap,Ah=new WeakMap,vm=new WeakMap,bm=new WeakMap,K9),FH=E.createContext(void 0),Noe=t=>{const e=E.useContext(FH);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ioe=({client:t,children:e})=>(E.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),a.jsx(FH.Provider,{value:t,children:e})),zH=E.createContext(!1),Boe=()=>E.useContext(zH);zH.Provider;function Loe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Poe=E.createContext(Loe()),Foe=()=>E.useContext(Poe),zoe=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?MH(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Hoe=t=>{E.useEffect(()=>{t.clearReset()},[t])},qoe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||MH(n,[t.error,r])),$oe=(t,e)=>e.state.data===void 0,Qoe=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Uoe=(t,e)=>t.isLoading&&t.isFetching&&!e,Woe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,l5=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function HH(t,e,n){var m,v,y,x;const r=Boe(),i=Foe(),s=Noe(),o=s.defaultQueryOptions(t);(v=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||v.call(m,o);const l=s.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",Qoe(o),zoe(o,i,l),Hoe(i);const u=!s.getQueryCache().get(o.queryHash),[h]=E.useState(()=>new e(s,o)),f=h.getOptimisticResult(o),p=!r&&t.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(w=>{const A=p?h.subscribe(hs.batchCalls(w)):la;return h.updateResult(),A},[h,p]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),E.useEffect(()=>{h.setOptions(o)},[o,h]),Woe(o,f))throw l5(o,h,i);if(qoe({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;if((x=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||x.call(y,o,f),o.experimental_prefetchInRender&&!xv.isServer()&&Uoe(f,r)){const w=u?l5(o,h,i):l==null?void 0:l.promise;w==null||w.catch(la).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?f:h.trackResult(f)}function Voe(t,e){return HH(t,LH)}function qH(t,e){return HH({...t,enabled:!0,suspense:!0,throwOnError:$oe,placeholderData:void 0},LH)}var KC={exports:{}},ZC={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var c5;function Yoe(){if(c5)return ZC;c5=1;var t=nb();function e(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return ZC.useSyncExternalStoreWithSelector=function(u,h,f,p,m){var v=i(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=o(function(){function w(_){if(!A){if(A=!0,S=_,_=p(_),m!==void 0&&y.hasValue){var O=y.value;if(m(O,_))return C=O}return C=_}if(O=C,n(S,_))return O;var M=p(_);return m!==void 0&&m(O,M)?(S=_,O):(S=_,C=M)}var A=!1,S,C,j=f===void 0?null:f;return[function(){return w(h())},j===null?void 0:function(){return w(j())}]},[h,f,p,m]);var x=r(u,v[0],v[1]);return s(function(){y.hasValue=!0,y.value=x},[x]),l(x),x},ZC}var u5;function Goe(){return u5||(u5=1,KC.exports=Yoe()),KC.exports}var Xoe=Goe();function Koe(t){t()}function Zoe(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Koe(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!r||t===null||(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var h5={notify(){},get:()=>[]};function Joe(t,e){let n,r=h5,i=0,s=!1;function o(x){f();const w=r.subscribe(x);let A=!1;return()=>{A||(A=!0,w(),p())}}function l(){r.notify()}function u(){y.onStateChange&&y.onStateChange()}function h(){return s}function f(){i++,n||(n=t.subscribe(u),r=Zoe())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=h5)}function m(){s||(s=!0,f())}function v(){s&&(s=!1,p())}const y={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:u,isSubscribed:h,trySubscribe:m,tryUnsubscribe:v,getListeners:()=>r};return y}var ele=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tle=ele(),nle=()=>typeof navigator<"u"&&navigator.product==="ReactNative",rle=nle(),ile=()=>tle||rle?E.useLayoutEffect:E.useEffect,sle=ile(),JC=Symbol.for("react-redux-context"),e_=typeof globalThis<"u"?globalThis:{};function ale(){if(!E.createContext)return{};const t=e_[JC]??(e_[JC]=new Map);let e=t.get(E.createContext);return e||(e=E.createContext(null),t.set(E.createContext,e)),e}var Ph=ale();function ole(t){const{children:e,context:n,serverState:r,store:i}=t,s=E.useMemo(()=>{const u=Joe(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),o=E.useMemo(()=>i.getState(),[i]);sle(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,o]);const l=n||Ph;return E.createElement(l.Provider,{value:s},e)}var lle=ole;function GE(t=Ph){return function(){return E.useContext(t)}}var $H=GE();function QH(t=Ph){const e=t===Ph?$H:GE(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var cle=QH();function ule(t=Ph){const e=t===Ph?cle:QH(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var hle=ule(),dle=(t,e)=>t===e;function fle(t=Ph){const e=t===Ph?$H:GE(t),n=(r,i={})=>{const{equalityFn:s=dle}=typeof i=="function"?{equalityFn:i}:i,o=e(),{store:l,subscription:u,getServerState:h}=o;E.useRef(!0);const f=E.useCallback({[r.name](m){return r(m)}}[r.name],[r]),p=Xoe.useSyncExternalStoreWithSelector(u.addNestedSub,l.getState,h||l.getState,f,s);return E.useDebugValue(p),p};return Object.assign(n,{withTypes:()=>n}),n}var ple=fle();const pu=hle.withTypes(),ac=ple.withTypes();function os(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var mle=typeof Symbol=="function"&&Symbol.observable||"@@observable",d5=mle,t_=()=>Math.random().toString(36).substring(7).split("").join("."),gle={INIT:`@@redux/INIT${t_()}`,REPLACE:`@@redux/REPLACE${t_()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${t_()}`},fA=gle;function XE(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function UH(t,e,n){if(typeof t!="function")throw new Error(os(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(os(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(os(1));return n(UH)(t,e)}let r=t,i=e,s=new Map,o=s,l=0,u=!1;function h(){o===s&&(o=new Map,s.forEach((w,A)=>{o.set(A,w)}))}function f(){if(u)throw new Error(os(3));return i}function p(w){if(typeof w!="function")throw new Error(os(4));if(u)throw new Error(os(5));let A=!0;h();const S=l++;return o.set(S,w),function(){if(A){if(u)throw new Error(os(6));A=!1,h(),o.delete(S),s=null}}}function m(w){if(!XE(w))throw new Error(os(7));if(typeof w.type>"u")throw new Error(os(8));if(typeof w.type!="string")throw new Error(os(17));if(u)throw new Error(os(9));try{u=!0,i=r(i,w)}finally{u=!1}return(s=o).forEach(S=>{S()}),w}function v(w){if(typeof w!="function")throw new Error(os(10));r=w,m({type:fA.REPLACE})}function y(){const w=p;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(os(11));function S(){const j=A;j.next&&j.next(f())}return S(),{unsubscribe:w(S)}},[d5](){return this}}}return m({type:fA.INIT}),{dispatch:m,subscribe:p,getState:f,replaceReducer:v,[d5]:y}}function vle(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:fA.INIT})>"u")throw new Error(os(12));if(typeof n(void 0,{type:fA.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(os(13))})}function ble(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let i;try{vle(n)}catch(s){i=s}return function(o={},l){if(i)throw i;let u=!1;const h={};for(let f=0;f<r.length;f++){const p=r[f],m=n[p],v=o[p],y=m(v,l);if(typeof y>"u")throw l&&l.type,new Error(os(14));h[p]=y,u=u||y!==v}return u=u||r.length!==Object.keys(o).length,u?h:o}}function pA(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function yle(...t){return e=>(n,r)=>{const i=e(n,r);let s=()=>{throw new Error(os(15))};const o={getState:i.getState,dispatch:(u,...h)=>s(u,...h)},l=t.map(u=>u(o));return s=pA(...l)(i.dispatch),{...i,dispatch:s}}}function WH(t){return XE(t)&&"type"in t&&typeof t.type=="string"}var VH=Symbol.for("immer-nothing"),f5=Symbol.for("immer-draftable"),Ys=Symbol.for("immer-state");function Ko(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var za=Object,Em=za.getPrototypeOf,mA="constructor",m2="prototype",wT="configurable",gA="enumerable",Sx="writable",Av="value",au=t=>!!t&&!!t[Ys];function dl(t){var e;return t?YH(t)||v2(t)||!!t[f5]||!!((e=t[mA])!=null&&e[f5])||b2(t)||y2(t):!1}var xle=za[m2][mA].toString(),p5=new WeakMap;function YH(t){if(!t||!KE(t))return!1;const e=Em(t);if(e===null||e===za[m2])return!0;const n=za.hasOwnProperty.call(e,mA)&&e[mA];if(n===Object)return!0;if(!_p(n))return!1;let r=p5.get(n);return r===void 0&&(r=Function.toString.call(n),p5.set(n,r)),r===xle}function g2(t,e,n=!0){Db(t)===0?(n?Reflect.ownKeys(t):za.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((r,i)=>e(i,r,t))}function Db(t){const e=t[Ys];return e?e.type_:v2(t)?1:b2(t)?2:y2(t)?3:0}var m5=(t,e,n=Db(t))=>n===2?t.has(e):za[m2].hasOwnProperty.call(t,e),ST=(t,e,n=Db(t))=>n===2?t.get(e):t[e],vA=(t,e,n,r=Db(t))=>{r===2?t.set(e,n):r===3?t.add(n):t[e]=n};function Ale(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var v2=Array.isArray,b2=t=>t instanceof Map,y2=t=>t instanceof Set,KE=t=>typeof t=="object",_p=t=>typeof t=="function",n_=t=>typeof t=="boolean";function wle(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var Uc=t=>t.copy_||t.base_,ZE=t=>t.modified_?t.copy_:t.base_;function jT(t,e){if(b2(t))return new Map(t);if(y2(t))return new Set(t);if(v2(t))return Array[m2].slice.call(t);const n=YH(t);if(e===!0||e==="class_only"&&!n){const r=za.getOwnPropertyDescriptors(t);delete r[Ys];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const o=i[s],l=r[o];l[Sx]===!1&&(l[Sx]=!0,l[wT]=!0),(l.get||l.set)&&(r[o]={[wT]:!0,[Sx]:!0,[gA]:l[gA],[Av]:t[o]})}return za.create(Em(t),r)}else{const r=Em(t);if(r!==null&&n)return{...t};const i=za.create(r);return za.assign(i,t)}}function JE(t,e=!1){return x2(t)||au(t)||!dl(t)||(Db(t)>1&&za.defineProperties(t,{set:S1,add:S1,clear:S1,delete:S1}),za.freeze(t),e&&g2(t,(n,r)=>{JE(r,!0)},!1)),t}function Sle(){Ko(2)}var S1={[Av]:Sle};function x2(t){return t===null||!KE(t)?!0:za.isFrozen(t)}var bA="MapSet",CT="Patches",g5="ArrayMethods",GH={};function jf(t){const e=GH[t];return e||Ko(0,t),e}var v5=t=>!!GH[t],wv,XH=()=>wv,jle=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:v5(bA)?jf(bA):void 0,arrayMethodsPlugin_:v5(g5)?jf(g5):void 0});function b5(t,e){e&&(t.patchPlugin_=jf(CT),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function _T(t){TT(t),t.drafts_.forEach(Cle),t.drafts_=null}function TT(t){t===wv&&(wv=t.parent_)}var y5=t=>wv=jle(wv,t);function Cle(t){const e=t[Ys];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function x5(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[Ys].modified_&&(_T(e),Ko(4)),dl(t)&&(t=A5(e,t));const{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(n[Ys].base_,t,e)}else t=A5(e,n);return _le(e,t,!0),_T(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==VH?t:void 0}function A5(t,e){if(x2(e))return e;const n=e[Ys];if(!n)return yA(e,t.handledSet_,t);if(!A2(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(t);JH(n,t)}return n.copy_}function _le(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&JE(e,n)}function KH(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var A2=(t,e)=>t.scope_===e,Tle=[];function ZH(t,e,n,r){const i=Uc(t),s=t.type_;if(r!==void 0&&ST(i,r,s)===e){vA(i,r,n,s);return}if(!t.draftLocations_){const l=t.draftLocations_=new Map;g2(i,(u,h)=>{if(au(h)){const f=l.get(h)||[];f.push(u),l.set(h,f)}})}const o=t.draftLocations_.get(e)??Tle;for(const l of o)vA(i,l,n,s)}function kle(t,e,n){t.callbacks_.push(function(i){var l;const s=e;if(!s||!A2(s,i))return;(l=i.mapSetPlugin_)==null||l.fixSetContents(s);const o=ZE(s);ZH(t,s.draft_??s,o,n),JH(s,i)})}function JH(t,e){var r;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((r=t.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:i}=e;if(i){const s=i.getPath(t);s&&i.generatePatches_(t,s,e)}KH(t)}}function Ole(t,e,n){const{scope_:r}=t;if(au(n)){const i=n[Ys];A2(i,r)&&i.callbacks_.push(function(){jx(t);const o=ZE(i);ZH(t,n,o,e)})}else dl(n)&&t.callbacks_.push(function(){const s=Uc(t);t.type_===3?s.has(n)&&yA(n,r.handledSet_,r):ST(s,e,t.type_)===n&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&yA(ST(t.copy_,e,t.type_),r.handledSet_,r)})}function yA(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||au(t)||e.has(t)||!dl(t)||x2(t)||(e.add(t),g2(t,(r,i)=>{if(au(i)){const s=i[Ys];if(A2(s,n)){const o=ZE(s);vA(t,r,o,t.type_),KH(s)}}else dl(i)&&yA(i,e,n)})),t}function Ele(t,e){const n=v2(t),r={type_:n?1:0,scope_:e?e.scope_:XH(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,s=xA;n&&(i=[r],s=Sv);const{revoke:o,proxy:l}=Proxy.revocable(i,s);return r.draft_=l,r.revoke_=o,[l,r]}var xA={get(t,e){if(e===Ys)return t;let n=t.scope_.arrayMethodsPlugin_;const r=t.type_===1&&typeof e=="string";if(r&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const i=Uc(t);if(!m5(i,e,t.type_))return Mle(t,i,e);const s=i[e];if(t.finalized_||!dl(s)||r&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&wle(e))return s;if(s===r_(t.base_,e)){jx(t);const o=t.type_===1?+e:e,l=OT(t.scope_,s,t,o);return t.copy_[o]=l}return s},has(t,e){return e in Uc(t)},ownKeys(t){return Reflect.ownKeys(Uc(t))},set(t,e,n){const r=eq(Uc(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=r_(Uc(t),e),s=i==null?void 0:i[Ys];if(s&&s.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(Ale(n,i)&&(n!==void 0||m5(t.base_,e,t.type_)))return!0;jx(t),kT(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),Ole(t,e,n)),!0},deleteProperty(t,e){return jx(t),r_(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),kT(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Uc(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{[Sx]:!0,[wT]:t.type_!==1||e!=="length",[gA]:r[gA],[Av]:n[e]}},defineProperty(){Ko(11)},getPrototypeOf(t){return Em(t.base_)},setPrototypeOf(){Ko(12)}},Sv={};for(let t in xA){let e=xA[t];Sv[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}Sv.deleteProperty=function(t,e){return Sv.set.call(this,t,e,void 0)};Sv.set=function(t,e,n){return xA.set.call(this,t[0],e,n,t[0])};function r_(t,e){const n=t[Ys];return(n?Uc(n):t)[e]}function Mle(t,e,n){var i;const r=eq(e,n);return r?Av in r?r[Av]:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function eq(t,e){if(!(e in t))return;let n=Em(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Em(n)}}function kT(t){t.modified_||(t.modified_=!0,t.parent_&&kT(t.parent_))}function jx(t){t.copy_||(t.assigned_=new Map,t.copy_=jT(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Rle=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,r)=>{if(_p(e)&&!_p(n)){const s=n;n=e;const o=this;return function(u=s,...h){return o.produce(u,f=>n.call(this,f,...h))}}_p(n)||Ko(6),r!==void 0&&!_p(r)&&Ko(7);let i;if(dl(e)){const s=y5(this),o=OT(s,e,void 0);let l=!0;try{i=n(o),l=!1}finally{l?_T(s):TT(s)}return b5(s,r),x5(i,s)}else if(!e||!KE(e)){if(i=n(e),i===void 0&&(i=e),i===VH&&(i=void 0),this.autoFreeze_&&JE(i,!0),r){const s=[],o=[];jf(CT).generateReplacementPatches_(e,i,{patches_:s,inversePatches_:o}),r(s,o)}return i}else Ko(1,e)},this.produceWithPatches=(e,n)=>{if(_p(e))return(o,...l)=>this.produceWithPatches(o,u=>e(u,...l));let r,i;return[this.produce(e,n,(o,l)=>{r=o,i=l}),r,i]},n_(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),n_(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),n_(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){dl(t)||Ko(8),au(t)&&(t=Dle(t));const e=y5(this),n=OT(e,t,void 0);return n[Ys].isManual_=!0,TT(e),n}finishDraft(t,e){const n=t&&t[Ys];(!n||!n.isManual_)&&Ko(9);const{scope_:r}=n;return b5(r,e),x5(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=jf(CT).applyPatches_;return au(t)?r(t,e):this.produce(t,i=>r(i,e))}};function OT(t,e,n,r){const[i,s]=b2(e)?jf(bA).proxyMap_(e,n):y2(e)?jf(bA).proxySet_(e,n):Ele(e,n);return((n==null?void 0:n.scope_)??XH()).drafts_.push(i),s.callbacks_=(n==null?void 0:n.callbacks_)??[],s.key_=r,n&&r!==void 0?kle(n,s,r):s.callbacks_.push(function(u){var f;(f=u.mapSetPlugin_)==null||f.fixSetContents(s);const{patchPlugin_:h}=u;s.modified_&&h&&h.generatePatches_(s,[],u)}),i}function Dle(t){return au(t)||Ko(10,t),tq(t)}function tq(t){if(!dl(t)||x2(t))return t;const e=t[Ys];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=jT(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=jT(t,!0);return g2(n,(i,s)=>{vA(n,i,tq(s))},r),e&&(e.finalized_=!1),n}var Nle=new Rle,nq=Nle.produce;function rq(t){return({dispatch:n,getState:r})=>i=>s=>typeof s=="function"?s(n,r,t):i(s)}var Ile=rq(),Ble=rq,Lle=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pA:pA.apply(null,arguments)};function Mm(t,e){function n(...r){if(e){let i=e(...r);if(!i)throw new Error(qa(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>WH(r)&&r.type===t,n}var iq=class Dg extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Dg.prototype)}static get[Symbol.species](){return Dg}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Dg(...e[0].concat(this)):new Dg(...e.concat(this))}};function w5(t){return dl(t)?nq(t,()=>{}):t}function j1(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function Ple(t){return typeof t=="boolean"}var Fle=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=e??{};let o=new iq;return n&&(Ple(n)?o.push(Ile):o.push(Ble(n.extraArgument))),o},zle="RTK_autoBatch",S5=t=>e=>{setTimeout(e,t)},Hle=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let i=!0,s=!1,o=!1;const l=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:S5(10):t.type==="callback"?t.queueNotification:S5(t.timeout),h=()=>{o=!1,s&&(s=!1,l.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const p=()=>i&&f(),m=r.subscribe(p);return l.add(f),()=>{m(),l.delete(f)}},dispatch(f){var p;try{return i=!((p=f==null?void 0:f.meta)!=null&&p[zle]),s=!i,s&&(o||(o=!0,u(h))),r.dispatch(f)}finally{i=!0}}})},qle=t=>function(n){const{autoBatch:r=!0}=n??{};let i=new iq(t);return r&&i.push(Hle(typeof r=="object"?r:void 0)),i};function $le(t){const e=Fle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=t||{};let l;if(typeof n=="function")l=n;else if(XE(n))l=ble(n);else throw new Error(qa(1));let u;typeof r=="function"?u=r(e):u=e();let h=pA;i&&(h=Lle({trace:!1,...typeof i=="object"&&i}));const f=yle(...u),p=qle(f);let m=typeof o=="function"?o(p):p();const v=h(...m);return UH(l,s,v)}function sq(t){const e={},n=[];let r;const i={addCase(s,o){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(qa(28));if(l in e)throw new Error(qa(29));return e[l]=o,i},addAsyncThunk(s,o){return o.pending&&(e[s.pending.type]=o.pending),o.rejected&&(e[s.rejected.type]=o.rejected),o.fulfilled&&(e[s.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return n.push({matcher:s,reducer:o}),i},addDefaultCase(s){return r=s,i}};return t(i),[e,n,r]}function Qle(t){return typeof t=="function"}function Ule(t,e){let[n,r,i]=sq(e),s;if(Qle(t))s=()=>w5(t());else{const l=w5(t);s=()=>l}function o(l=s(),u){let h=[n[u.type],...r.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return h.filter(f=>!!f).length===0&&(h=[i]),h.reduce((f,p)=>{if(p)if(au(f)){const v=p(f,u);return v===void 0?f:v}else{if(dl(f))return nq(f,m=>p(m,u));{const m=p(f,u);if(m===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return f},l)}return o.getInitialState=s,o}var Wle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Vle=(t=21)=>{let e="",n=t;for(;n--;)e+=Wle[Math.random()*64|0];return e},Yle=Symbol.for("rtk-slice-createasyncthunk");function Gle(t,e){return`${t}/${e}`}function Xle({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[Yle];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(qa(11));const l=(typeof i.reducers=="function"?i.reducers(Zle()):i.reducers)||{},u=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(j,_){const O=typeof j=="string"?j:j.type;if(!O)throw new Error(qa(12));if(O in h.sliceCaseReducersByType)throw new Error(qa(13));return h.sliceCaseReducersByType[O]=_,f},addMatcher(j,_){return h.sliceMatchers.push({matcher:j,reducer:_}),f},exposeAction(j,_){return h.actionCreators[j]=_,f},exposeCaseReducer(j,_){return h.sliceCaseReducersByName[j]=_,f}};u.forEach(j=>{const _=l[j],O={reducerName:j,type:Gle(s,j),createNotation:typeof i.reducers=="function"};ece(_)?nce(O,_,f,e):Jle(O,_,f)});function p(){const[j={},_=[],O=void 0]=typeof i.extraReducers=="function"?sq(i.extraReducers):[i.extraReducers],M={...j,...h.sliceCaseReducersByType};return Ule(i.initialState,R=>{for(let N in M)R.addCase(N,M[N]);for(let N of h.sliceMatchers)R.addMatcher(N.matcher,N.reducer);for(let N of _)R.addMatcher(N.matcher,N.reducer);O&&R.addDefaultCase(O)})}const m=j=>j,v=new Map,y=new WeakMap;let x;function w(j,_){return x||(x=p()),x(j,_)}function A(){return x||(x=p()),x.getInitialState()}function S(j,_=!1){function O(R){let N=R[j];return typeof N>"u"&&_&&(N=j1(y,O,A)),N}function M(R=m){const N=j1(v,_,()=>new WeakMap);return j1(N,R,()=>{const B={};for(const[D,L]of Object.entries(i.selectors??{}))B[D]=Kle(L,R,()=>j1(y,R,A),_);return B})}return{reducerPath:j,getSelectors:M,get selectors(){return M(O)},selectSlice:O}}const C={name:s,reducer:w,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:A,...S(o),injectInto(j,{reducerPath:_,...O}={}){const M=_??o;return j.inject({reducerPath:M,reducer:w},O),{...C,...S(M,!0)}}};return C}}function Kle(t,e,n,r){function i(s,...o){let l=e(s);return typeof l>"u"&&r&&(l=n()),t(l,...o)}return i.unwrapped=t,i}var w2=Xle();function Zle(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function Jle({type:t,reducerName:e,createNotation:n},r,i){let s,o;if("reducer"in r){if(n&&!tce(r))throw new Error(qa(17));s=r.reducer,o=r.prepare}else s=r;i.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,o?Mm(t,o):Mm(t))}function ece(t){return t._reducerDefinitionType==="asyncThunk"}function tce(t){return t._reducerDefinitionType==="reducerWithPrepare"}function nce({type:t,reducerName:e},n,r,i){if(!i)throw new Error(qa(18));const{payloadCreator:s,fulfilled:o,pending:l,rejected:u,settled:h,options:f}=n,p=i(t,s,f);r.exposeAction(e,p),o&&r.addCase(p.fulfilled,o),l&&r.addCase(p.pending,l),u&&r.addCase(p.rejected,u),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(e,{fulfilled:o||C1,pending:l||C1,rejected:u||C1,settled:h||C1})}function C1(){}var rce="task",aq="listener",oq="completed",e6="cancelled",ice=`task-${e6}`,sce=`task-${oq}`,ET=`${aq}-${e6}`,ace=`${aq}-${oq}`,S2=class{constructor(t){Dr(this,"name","TaskAbortError");Dr(this,"message");this.code=t,this.message=`${rce} ${e6} (reason: ${t})`}},t6=(t,e)=>{if(typeof t!="function")throw new TypeError(qa(32))},AA=()=>{},lq=(t,e=AA)=>(t.catch(e),t),cq=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),pf=t=>{if(t.aborted)throw new S2(t.reason)};function uq(t,e){let n=AA;return new Promise((r,i)=>{const s=()=>i(new S2(t.reason));if(t.aborted){s();return}n=cq(t,s),e.finally(()=>n()).then(r,i)}).finally(()=>{n=AA})}var oce=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(n){return{status:n instanceof S2?"cancelled":"rejected",error:n}}finally{e==null||e()}},wA=t=>e=>lq(uq(t,e).then(n=>(pf(t),n))),hq=t=>{const e=wA(t);return n=>e(new Promise(r=>setTimeout(r,n)))},{assign:Up}=Object,j5={},j2="listenerMiddleware",lce=(t,e)=>{const n=r=>cq(t,()=>r.abort(t.reason));return(r,i)=>{t6(r);const s=new AbortController;n(s);const o=oce(async()=>{pf(t),pf(s.signal);const l=await r({pause:wA(s.signal),delay:hq(s.signal),signal:s.signal});return pf(s.signal),l},()=>s.abort(sce));return i!=null&&i.autoJoin&&e.push(o.catch(AA)),{result:wA(t)(o),cancel(){s.abort(ice)}}}},cce=(t,e)=>{const n=async(r,i)=>{pf(e);let s=()=>{};const l=[new Promise((u,h)=>{let f=t({predicate:r,effect:(p,m)=>{m.unsubscribe(),u([p,m.getState(),m.getOriginalState()])}});s=()=>{f(),h()}})];i!=null&&l.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await uq(e,Promise.race(l));return pf(e),u}finally{s()}};return(r,i)=>lq(n(r,i))},dq=t=>{let{type:e,actionCreator:n,matcher:r,predicate:i,effect:s}=t;if(e)i=Mm(e).match;else if(n)e=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(qa(21));return t6(s),{predicate:i,type:e,effect:s}},fq=Up(t=>{const{type:e,predicate:n,effect:r}=dq(t);return{id:Vle(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(qa(22))}}},{withTypes:()=>fq}),C5=(t,e)=>{const{type:n,effect:r,predicate:i}=dq(e);return Array.from(t.values()).find(s=>(typeof n=="string"?s.type===n:s.predicate===i)&&s.effect===r)},MT=t=>{t.pending.forEach(e=>{e.abort(ET)})},uce=(t,e)=>()=>{for(const n of e.keys())MT(n);t.clear()},_5=(t,e,n)=>{try{t(e,n)}catch(r){setTimeout(()=>{throw r},0)}},pq=Up(Mm(`${j2}/add`),{withTypes:()=>pq}),hce=Mm(`${j2}/removeAll`),mq=Up(Mm(`${j2}/remove`),{withTypes:()=>mq}),dce=(...t)=>{console.error(`${j2}/error`,...t)},fce=(t={})=>{const e=new Map,n=new Map,r=v=>{const y=n.get(v)??0;n.set(v,y+1)},i=v=>{const y=n.get(v)??1;y===1?n.delete(v):n.set(v,y-1)},{extra:s,onError:o=dce}=t;t6(o);const l=v=>(v.unsubscribe=()=>e.delete(v.id),e.set(v.id,v),y=>{v.unsubscribe(),y!=null&&y.cancelActive&&MT(v)}),u=v=>{const y=C5(e,v)??fq(v);return l(y)};Up(u,{withTypes:()=>u});const h=v=>{const y=C5(e,v);return y&&(y.unsubscribe(),v.cancelActive&&MT(y)),!!y};Up(h,{withTypes:()=>h});const f=async(v,y,x,w)=>{const A=new AbortController,S=cce(u,A.signal),C=[];try{v.pending.add(A),r(v),await Promise.resolve(v.effect(y,Up({},x,{getOriginalState:w,condition:(j,_)=>S(j,_).then(Boolean),take:S,delay:hq(A.signal),pause:wA(A.signal),extra:s,signal:A.signal,fork:lce(A.signal,C),unsubscribe:v.unsubscribe,subscribe:()=>{e.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((j,_,O)=>{j!==A&&(j.abort(ET),O.delete(j))})},cancel:()=>{A.abort(ET),v.pending.delete(A)},throwIfCancelled:()=>{pf(A.signal)}})))}catch(j){j instanceof S2||_5(o,j,{raisedBy:"effect"})}finally{await Promise.all(C),A.abort(ace),i(v),v.pending.delete(A)}},p=uce(e,n);return{middleware:v=>y=>x=>{if(!WH(x))return y(x);if(pq.match(x))return u(x.payload);if(hce.match(x)){p();return}if(mq.match(x))return h(x.payload);let w=v.getState();const A=()=>{if(w===j5)throw new Error(qa(23));return w};let S;try{if(S=y(x),e.size>0){const C=v.getState(),j=Array.from(e.values());for(const _ of j){let O=!1;try{O=_.predicate(x,C,w)}catch(M){O=!1,_5(o,M,{raisedBy:"predicate"})}O&&f(_,x,v,A)}}}finally{w=j5}return S},startListening:u,stopListening:h,clearListeners:p}};function qa(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Cx={exports:{}},pce=Cx.exports,T5;function mce(){return T5||(T5=1,function(t,e){(function(n,r){t.exports=r()})(pce,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",h="day",f="week",p="month",m="quarter",v="year",y="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var z=["th","st","nd","rd"],I=H%100;return"["+H+(z[(I-20)%10]||z[I]||z[0])+"]"}},C=function(H,z,I){var F=String(H);return!F||F.length>=z?H:""+Array(z+1-F.length).join(I)+H},j={s:C,z:function(H){var z=-H.utcOffset(),I=Math.abs(z),F=Math.floor(I/60),$=I%60;return(z<=0?"+":"-")+C(F,2,"0")+":"+C($,2,"0")},m:function H(z,I){if(z.date()<I.date())return-H(I,z);var F=12*(I.year()-z.year())+(I.month()-z.month()),$=z.clone().add(F,p),G=I-$<0,Y=z.clone().add(F+(G?-1:1),p);return+(-(F+(I-$)/(G?$-Y:Y-$))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:p,y:v,w:f,d:h,D:y,h:u,m:l,s:o,ms:s,Q:m}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},_="en",O={};O[_]=S;var M="$isDayjsObject",R=function(H){return H instanceof L||!(!H||!H[M])},N=function H(z,I,F){var $;if(!z)return _;if(typeof z=="string"){var G=z.toLowerCase();O[G]&&($=G),I&&(O[G]=I,$=G);var Y=z.split("-");if(!$&&Y.length>1)return H(Y[0])}else{var W=z.name;O[W]=z,$=W}return!F&&$&&(_=$),$||!F&&_},B=function(H,z){if(R(H))return H.clone();var I=typeof z=="object"?z:{};return I.date=H,I.args=arguments,new L(I)},D=j;D.l=N,D.i=R,D.w=function(H,z){return B(H,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var L=function(){function H(I){this.$L=N(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[M]=!0}var z=H.prototype;return z.parse=function(I){this.$d=function(F){var $=F.date,G=F.utc;if($===null)return new Date(NaN);if(D.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Y=$.match(w);if(Y){var W=Y[2]-1||0,V=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,V)):new Date(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,V)}}return new Date($)}(I),this.init()},z.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},z.$utils=function(){return D},z.isValid=function(){return this.$d.toString()!==x},z.isSame=function(I,F){var $=B(I);return this.startOf(F)<=$&&$<=this.endOf(F)},z.isAfter=function(I,F){return B(I)<this.startOf(F)},z.isBefore=function(I,F){return this.endOf(F)<B(I)},z.$g=function(I,F,$){return D.u(I)?this[F]:this.set($,I)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(I,F){var $=this,G=!!D.u(F)||F,Y=D.p(I),W=function(We,qe){var ae=D.w($.$u?Date.UTC($.$y,qe,We):new Date($.$y,qe,We),$);return G?ae:ae.endOf(h)},V=function(We,qe){return D.w($.toDate()[We].apply($.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(qe)),$)},X=this.$W,ee=this.$M,le=this.$D,ve="set"+(this.$u?"UTC":"");switch(Y){case v:return G?W(1,0):W(31,11);case p:return G?W(1,ee):W(0,ee+1);case f:var me=this.$locale().weekStart||0,Qe=(X<me?X+7:X)-me;return W(G?le-Qe:le+(6-Qe),ee);case h:case y:return V(ve+"Hours",0);case u:return V(ve+"Minutes",1);case l:return V(ve+"Seconds",2);case o:return V(ve+"Milliseconds",3);default:return this.clone()}},z.endOf=function(I){return this.startOf(I,!1)},z.$set=function(I,F){var $,G=D.p(I),Y="set"+(this.$u?"UTC":""),W=($={},$[h]=Y+"Date",$[y]=Y+"Date",$[p]=Y+"Month",$[v]=Y+"FullYear",$[u]=Y+"Hours",$[l]=Y+"Minutes",$[o]=Y+"Seconds",$[s]=Y+"Milliseconds",$)[G],V=G===h?this.$D+(F-this.$W):F;if(G===p||G===v){var X=this.clone().set(y,1);X.$d[W](V),X.init(),this.$d=X.set(y,Math.min(this.$D,X.daysInMonth())).$d}else W&&this.$d[W](V);return this.init(),this},z.set=function(I,F){return this.clone().$set(I,F)},z.get=function(I){return this[D.p(I)]()},z.add=function(I,F){var $,G=this;I=Number(I);var Y=D.p(F),W=function(ee){var le=B(G);return D.w(le.date(le.date()+Math.round(ee*I)),G)};if(Y===p)return this.set(p,this.$M+I);if(Y===v)return this.set(v,this.$y+I);if(Y===h)return W(1);if(Y===f)return W(7);var V=($={},$[l]=r,$[u]=i,$[o]=n,$)[Y]||1,X=this.$d.getTime()+I*V;return D.w(X,this)},z.subtract=function(I,F){return this.add(-1*I,F)},z.format=function(I){var F=this,$=this.$locale();if(!this.isValid())return $.invalidDate||x;var G=I||"YYYY-MM-DDTHH:mm:ssZ",Y=D.z(this),W=this.$H,V=this.$m,X=this.$M,ee=$.weekdays,le=$.months,ve=$.meridiem,me=function(qe,ae,de,Ae){return qe&&(qe[ae]||qe(F,G))||de[ae].slice(0,Ae)},Qe=function(qe){return D.s(W%12||12,qe,"0")},We=ve||function(qe,ae,de){var Ae=qe<12?"AM":"PM";return de?Ae.toLowerCase():Ae};return G.replace(A,function(qe,ae){return ae||function(de){switch(de){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return X+1;case"MM":return D.s(X+1,2,"0");case"MMM":return me($.monthsShort,X,le,3);case"MMMM":return me(le,X);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return me($.weekdaysMin,F.$W,ee,2);case"ddd":return me($.weekdaysShort,F.$W,ee,3);case"dddd":return ee[F.$W];case"H":return String(W);case"HH":return D.s(W,2,"0");case"h":return Qe(1);case"hh":return Qe(2);case"a":return We(W,V,!0);case"A":return We(W,V,!1);case"m":return String(V);case"mm":return D.s(V,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return Y}return null}(qe)||Y.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(I,F,$){var G,Y=this,W=D.p(F),V=B(I),X=(V.utcOffset()-this.utcOffset())*r,ee=this-V,le=function(){return D.m(Y,V)};switch(W){case v:G=le()/12;break;case p:G=le();break;case m:G=le()/3;break;case f:G=(ee-X)/6048e5;break;case h:G=(ee-X)/864e5;break;case u:G=ee/i;break;case l:G=ee/r;break;case o:G=ee/n;break;default:G=ee}return $?G:D.a(G)},z.daysInMonth=function(){return this.endOf(p).$D},z.$locale=function(){return O[this.$L]},z.locale=function(I,F){if(!I)return this.$L;var $=this.clone(),G=N(I,F,!0);return G&&($.$L=G),$},z.clone=function(){return D.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},H}(),U=L.prototype;return B.prototype=U,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",h],["$M",p],["$y",v],["$D",y]].forEach(function(H){U[H[1]]=function(z){return this.$g(z,H[0],H[1])}}),B.extend=function(H,z){return H.$i||(H(z,L,B),H.$i=!0),B},B.locale=N,B.isDayjs=R,B.unix=function(H){return B(1e3*H)},B.en=O[_],B.Ls=O,B.p={},B})}(Cx)),Cx.exports}var gce=mce();const Pe=pl(gce);var _x={exports:{}},vce=_x.exports,k5;function bce(){return k5||(k5=1,function(t,e){(function(n,r){t.exports=r()})(vce,function(){var n,r,i=1e3,s=6e4,o=36e5,l=864e5,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,f=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:h,months:f,days:l,hours:o,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},v=function(O){return O instanceof j},y=function(O,M,R){return new j(O,R,M.$l)},x=function(O){return r.p(O)+"s"},w=function(O){return O<0},A=function(O){return w(O)?Math.ceil(O):Math.floor(O)},S=function(O){return Math.abs(O)},C=function(O,M){return O?w(O)?{negative:!0,format:""+S(O)+M}:{negative:!1,format:""+O+M}:{negative:!1,format:""}},j=function(){function O(R,N,B){var D=this;if(this.$d={},this.$l=B,R===void 0&&(this.$ms=0,this.parseFromMilliseconds()),N)return y(R*m[x(N)],this);if(typeof R=="number")return this.$ms=R,this.parseFromMilliseconds(),this;if(typeof R=="object")return Object.keys(R).forEach(function(H){D.$d[x(H)]=R[H]}),this.calMilliseconds(),this;if(typeof R=="string"){var L=R.match(p);if(L){var U=L.slice(2).map(function(H){return H!=null?Number(H):0});return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var M=O.prototype;return M.calMilliseconds=function(){var R=this;this.$ms=Object.keys(this.$d).reduce(function(N,B){return N+(R.$d[B]||0)*m[B]},0)},M.parseFromMilliseconds=function(){var R=this.$ms;this.$d.years=A(R/h),R%=h,this.$d.months=A(R/f),R%=f,this.$d.days=A(R/l),R%=l,this.$d.hours=A(R/o),R%=o,this.$d.minutes=A(R/s),R%=s,this.$d.seconds=A(R/i),R%=i,this.$d.milliseconds=R},M.toISOString=function(){var R=C(this.$d.years,"Y"),N=C(this.$d.months,"M"),B=+this.$d.days||0;this.$d.weeks&&(B+=7*this.$d.weeks);var D=C(B,"D"),L=C(this.$d.hours,"H"),U=C(this.$d.minutes,"M"),H=this.$d.seconds||0;this.$d.milliseconds&&(H+=this.$d.milliseconds/1e3,H=Math.round(1e3*H)/1e3);var z=C(H,"S"),I=R.negative||N.negative||D.negative||L.negative||U.negative||z.negative,F=L.format||U.format||z.format?"T":"",$=(I?"-":"")+"P"+R.format+N.format+D.format+F+L.format+U.format+z.format;return $==="P"||$==="-P"?"P0D":$},M.toJSON=function(){return this.toISOString()},M.format=function(R){var N=R||"YYYY-MM-DDTHH:mm:ss",B={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return N.replace(u,function(D,L){return L||String(B[D])})},M.as=function(R){return this.$ms/m[x(R)]},M.get=function(R){var N=this.$ms,B=x(R);return B==="milliseconds"?N%=1e3:N=B==="weeks"?A(N/m[B]):this.$d[B],N||0},M.add=function(R,N,B){var D;return D=N?R*m[x(N)]:v(R)?R.$ms:y(R,this).$ms,y(this.$ms+D*(B?-1:1),this)},M.subtract=function(R,N){return this.add(R,N,!0)},M.locale=function(R){var N=this.clone();return N.$l=R,N},M.clone=function(){return y(this.$ms,this)},M.humanize=function(R){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!R)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},O}(),_=function(O,M,R){return O.add(M.years()*R,"y").add(M.months()*R,"M").add(M.days()*R,"d").add(M.hours()*R,"h").add(M.minutes()*R,"m").add(M.seconds()*R,"s").add(M.milliseconds()*R,"ms")};return function(O,M,R){n=R,r=R().$utils(),R.duration=function(D,L){var U=R.locale();return y(D,{$l:U},L)},R.isDuration=v;var N=M.prototype.add,B=M.prototype.subtract;M.prototype.add=function(D,L){return v(D)?_(this,D,1):N.bind(this)(D,L)},M.prototype.subtract=function(D,L){return v(D)?_(this,D,-1):B.bind(this)(D,L)}}})}(_x)),_x.exports}var yce=bce();const xce=pl(yce);var Tx={exports:{}},Ace=Tx.exports,O5;function wce(){return O5||(O5=1,function(t,e){(function(n,r){t.exports=r()})(Ace,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,o,l){var u=o.prototype;l.utc=function(x){var w={date:x,utc:!0,args:arguments};return new o(w)},u.utc=function(x){var w=l(this.toDate(),{locale:this.$L,utc:!0});return x?w.add(this.utcOffset(),n):w},u.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var h=u.parse;u.parse=function(x){x.utc&&(this.$u=!0),this.$utils().u(x.$offset)||(this.$offset=x.$offset),h.call(this,x)};var f=u.init;u.init=function(){if(this.$u){var x=this.$d;this.$y=x.getUTCFullYear(),this.$M=x.getUTCMonth(),this.$D=x.getUTCDate(),this.$W=x.getUTCDay(),this.$H=x.getUTCHours(),this.$m=x.getUTCMinutes(),this.$s=x.getUTCSeconds(),this.$ms=x.getUTCMilliseconds()}else f.call(this)};var p=u.utcOffset;u.utcOffset=function(x,w){var A=this.$utils().u;if(A(x))return this.$u?0:A(this.$offset)?p.call(this):this.$offset;if(typeof x=="string"&&(x=function(_){_===void 0&&(_="");var O=_.match(r);if(!O)return null;var M=(""+O[0]).match(i)||["-",0,0],R=M[0],N=60*+M[1]+ +M[2];return N===0?0:R==="+"?N:-N}(x),x===null))return this;var S=Math.abs(x)<=16?60*x:x;if(S===0)return this.utc(w);var C=this.clone();if(w)return C.$offset=S,C.$u=!1,C;var j=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(S+j,n)).$offset=S,C.$x.$localOffset=j,C};var m=u.format;u.format=function(x){var w=x||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,w)},u.valueOf=function(){var x=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*x},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var v=u.toDate;u.toDate=function(x){return x==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var y=u.diff;u.diff=function(x,w,A){if(x&&this.$u===x.$u)return y.call(this,x,w,A);var S=this.local(),C=l(x).local();return y.call(S,C,w,A)}}})}(Tx)),Tx.exports}var Sce=wce();const gq=pl(Sce);Pe.extend(xce);Pe.extend(gq);const n6=t=>{if(t==="")return null;if(t==="0")return 0;const e=new RegExp("^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$"),n=t.match(e);if(!n)return null;let r=0;const i=(s,o)=>{if(n[s]===void 0)return;const l=parseInt(n[s]);r+=l*o};return i(2,1e3*60*60*24*365),i(4,1e3*60*60*24*7),i(6,1e3*60*60*24),i(8,1e3*60*60),i(10,1e3*60),i(12,1e3),i(14,1),r},vq=(t,e,n)=>{if(t===0)return"0s";const r=t<0?"-":"";let i=Math.abs(t);const s=[];for(const{unit:o,mult:l,exact:u}of[{unit:"y",mult:1e3*60*60*24*365,exact:!0},{unit:"w",mult:1e3*60*60*24*7,exact:!0},{unit:"d",mult:1e3*60*60*24,exact:!1},{unit:"h",mult:1e3*60*60,exact:!1},{unit:"m",mult:1e3*60,exact:!1},{unit:"s",mult:1e3,exact:!1},{unit:"ms",mult:1,exact:!1}]){if(u&&i%l!==0)continue;const h=Math.floor(i/l);if(h>0)if(i-=h*l,n&&o==="s"&&i>0){s.push(`${parseFloat((h+i/1e3).toFixed(3))}s`);break}else s.push(`${h}${o}`);s.length==0&&o=="ms"&&s.push(`${Math.round(i)}ms`)}return r+s.join(e||"")},Hn=t=>vq(t);function jce(t){return Pe.utc(t).valueOf()}const SA=()=>Pe().valueOf(),Wp=t=>vq(t," ",!0),jA=(t,e,n=" ago")=>{const r=jce(t);return r<0?"never":Wp(e-r)+n},mf=(t,e)=>e?Pe.unix(t).tz(Pe.tz.guess()).format():Pe.unix(t).utc().format();function E5(t){return Pe.utc(t).valueOf()}const Cce=t=>{const e=new URLSearchParams(t),n=[];for(let r=0;e.has(`g${r}.expr`);r++){const i=C2(),s=(o,l)=>{const u=`g${r}.${o}`;e.has(u)&&l(e.get(u))};s("expr",o=>{i.expr=o}),s("show_tree",o=>{i.showTree=o==="1"}),s("tab",o=>{switch(o){case"0":case"graph":i.visualizer.activeTab="graph";break;case"1":case"table":i.visualizer.activeTab="table";break;case"explain":i.visualizer.activeTab="explain";break;default:console.log("Unknown tab",o)}}),s("display_mode",o=>{i.visualizer.displayMode=o}),s("stacked",o=>{i.visualizer.displayMode=o==="1"?Rm.Stacked:Rm.Lines}),s("y_axis_min",o=>{i.visualizer.yAxisMin=o===""?null:parseFloat(o)}),s("show_exemplars",o=>{i.visualizer.showExemplars=o==="1"}),s("range_input",o=>{i.visualizer.range=n6(o)||i.visualizer.range}),s("end_input",o=>{i.visualizer.endTime=E5(o)}),s("step_input",o=>{parseInt(o)>0&&(i.visualizer.resolution={type:"custom",step:parseInt(o)*1e3})}),s("res_type",o=>{switch(o){case"auto":s("res_density",l=>{["low","medium","high"].includes(l)&&(i.visualizer.resolution={type:"auto",density:l})});break;case"fixed":s("res_step",l=>{i.visualizer.resolution={type:"fixed",step:parseFloat(l)*1e3}});break;case"custom":s("res_step",l=>{i.visualizer.resolution={type:"custom",step:parseFloat(l)*1e3}});break;default:console.log("Unknown resolution type",o)}}),s("moment_input",o=>{i.visualizer.endTime=E5(o)}),n.push(i)}return n};function M5(t){return Pe.utc(t).format("YYYY-MM-DD HH:mm:ss")}const _ce=t=>{const e=new URLSearchParams,n=(r,i,s)=>e.append(`g${r}.${i}`,s);return t.forEach((r,i)=>{switch(n(i,"expr",r.expr),n(i,"show_tree",r.showTree?"1":"0"),n(i,"tab",r.visualizer.activeTab),r.visualizer.endTime!==null&&(n(i,"end_input",M5(r.visualizer.endTime)),n(i,"moment_input",M5(r.visualizer.endTime))),n(i,"range_input",Hn(r.visualizer.range)),r.visualizer.resolution.type){case"auto":n(i,"res_type","auto"),n(i,"res_density",r.visualizer.resolution.density);break;case"fixed":n(i,"res_type","fixed"),n(i,"res_step",(r.visualizer.resolution.step/1e3).toString());break;case"custom":n(i,"res_type","custom"),n(i,"res_step",(r.visualizer.resolution.step/1e3).toString());break}n(i,"display_mode",r.visualizer.displayMode),r.visualizer.yAxisMin!==null&&n(i,"y_axis_min",r.visualizer.yAxisMin.toString()),n(i,"show_exemplars",r.visualizer.showExemplars?"1":"0")}),e},Ea=(t,e)=>{const n=localStorage.getItem(t);return n===null?e:JSON.parse(n)},bq="queryPage.queryHistory";var Rm=(t=>(t.Lines="lines",t.Stacked="stacked",t.Heatmap="heatmap",t))(Rm||{});const kx=(t,e)=>{switch(t.type){case"auto":{const n=t.density==="high"?750:t.density==="medium"?250:100;return Math.max(Math.floor(e/n/1e3)*1e3,1e3)}case"fixed":return t.step;case"custom":return t.step}},C2=()=>({id:Cm(),expr:"",showTree:!1,showMetricsExplorer:!1,visualizer:{activeTab:"table",endTime:null,range:3600*1e3,resolution:{type:"auto",density:"medium"},displayMode:"lines",showExemplars:!1,yAxisMin:null}}),Tce={panels:[C2()],queryHistory:Ea(bq,[])},xp=t=>{const e="?"+_ce(t).toString();window.history.pushState({},"",e)},yq=w2({name:"queryPage",initialState:Tce,reducers:{setPanels:(t,{payload:e})=>{t.panels=e},addPanel:t=>{t.panels.push(C2()),xp(t.panels)},duplicatePanel:(t,{payload:e})=>{const n={...t.panels[e.idx],id:Cm(),expr:e.expr};t.panels.splice(e.idx+1,0,n),xp(t.panels)},removePanel:(t,{payload:e})=>{t.panels.splice(e,1),xp(t.panels)},setExpr:(t,{payload:e})=>{t.panels[e.idx].expr=e.expr,xp(t.panels)},addQueryToHistory:(t,{payload:e})=>{t.queryHistory=[e,...t.queryHistory.filter(n=>n!==e)].slice(0,50)},setShowTree:(t,{payload:e})=>{t.panels[e.idx].showTree=e.showTree,xp(t.panels)},setVisualizer:(t,{payload:e})=>{t.panels[e.idx].visualizer=e.visualizer,xp(t.panels)}}}),{setPanels:R5,addPanel:kce,removePanel:Oce,duplicatePanel:Ece,setExpr:Mce,addQueryToHistory:xq,setShowTree:i_,setVisualizer:nh}=yq.actions,Rce=yq.reducer;function Dce({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:i}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=i[e-1][i[e-1].length-1]-1?i[e-1].length-1:i[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===i[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===i[e].length-2&&r>=i[e][i[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:i[e-1].length-1,cellIndex:i[e-1][i[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:i[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===i[e].length-1&&r===i[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===i[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function Aq({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:i,size:s}){var u,h,f;const o=Dce({direction:e,size:s,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;const l=(f=(h=(u=t.current)==null?void 0:u[o.levelIndex])==null?void 0:h[o.rowIndex])==null?void 0:f[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?Aq({controlsRef:t,direction:e,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:s}):l.focus())}function Nce(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Ice(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(r=>r.length))}function r6({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:i}){const s=Nce(i.key);s&&(i.preventDefault(),Aq({controlsRef:t,direction:s,levelIndex:e,rowIndex:n,cellIndex:r,size:Ice(t)}))}function D5(t,e){let n=t?Pe(t):Pe();if(e==="")return n.format("YYYY-MM-DD HH:mm:ss");const[r,i,s=0]=e.split(":").map(Number);return n=n.set("hour",r),n=n.set("minute",i),n=n.set("second",s),n=n.set("millisecond",0),n.format("YYYY-MM-DD HH:mm:ss")}function Ms(t){return t==null||t===""?t:Pe(t).format("YYYY-MM-DD")}function Ip(t){return t==null||t===""?t:Pe(t).format("YYYY-MM-DD HH:mm:ss")}function Bce({minDate:t,maxDate:e}){const n=Pe();return!t&&!e?Ms(n):t&&Pe(n).isBefore(t)?Ms(t):e&&Pe(n).isAfter(e)?Ms(e):Ms(n)}function s_(t,e,n){return!t&&!e?Ip(n):t&&Pe(n).isBefore(t)?Ip(t):e&&Pe(n).isAfter(e)?Ip(e):Ip(n)}const Lce={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Pce=E.createContext(Lce);function sd(){const t=E.use(Pce),e=E.useCallback(s=>s||t.locale,[t.locale]),n=E.useCallback(s=>typeof s=="number"?s:t.firstDayOfWeek,[t.firstDayOfWeek]),r=E.useCallback(s=>Array.isArray(s)?s:t.weekendDays,[t.weekendDays]),i=E.useCallback(s=>typeof s=="string"?s:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function Fce({value:t,type:e,withTime:n}){const r=n?Ip:Ms;if(e==="range"&&Array.isArray(t)){const i=r(t[0]),s=r(t[1]);return i?s?`${i} – ${s}`:`${i} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?r(t):""}function wq({value:t,type:e,name:n,form:r,withTime:i=!1}){return a.jsx("input",{type:"hidden",value:Fce({value:t,type:e,withTime:i}),name:n,form:r})}wq.displayName="@mantine/dates/HiddenDatesInput";function fs(t){return t<10?`0${t}`:`${t}`}function CA(t){const[e=null,n=null,r=null]=t.split(":").map(Number);return{hours:e,minutes:n,seconds:r}}function zce(t,e){return`${t.getHours()}:${t.getMinutes()}${e?`:${t.getSeconds()}`:""}`}function Hce({value:t,format:e,amPmLabels:n,withSeconds:r}){const i=CA(typeof t=="string"?t:zce(t,r));if(i.hours===null||i.minutes===null)return null;if(e==="24h")return`${fs(i.hours)}:${fs(i.minutes)}${r?`:${fs(i.seconds||0)}`:""}`;const s=i.hours>=12;return`${i.hours%12===0?12:i.hours%12}:${fs(i.minutes)}${r?`:${fs(i.seconds||0)}`:""} ${s?n.pm:n.am}`}function Sq({value:t,format:e="24h",amPmLabels:n={am:"AM",pm:"PM"},withSeconds:r=!1}){return a.jsx(a.Fragment,{children:Hce({value:t,format:e,amPmLabels:n,withSeconds:r})})}Sq.displayName="@mantine/dates/TimeValue";const qce=t=>Number(t.toFixed(0)[0]);function Ox({value:t,min:e,max:n,onChange:r,focusable:i,step:s,onNextInput:o,onPreviousInput:l,onFocus:u,readOnly:h,allowTemporaryZero:f=!1,placeholder:p="--",disableAutoAdvance:m=!1,...v}){const y=qce(n),x=n+1-s,w=S=>{if(h)return;const C=S.replace(/\D/g,"");if(C!==""){const j=parseInt(C,10),_=f&&j===0&&e>0?0:Eh(j,e,n);r(_),!m&&(_>y||S.startsWith("00"))&&(o==null||o())}},A=S=>{h||((S.key==="0"||S.key==="Num0")&&t===0&&(S.preventDefault(),o==null||o()),S.key==="Home"&&(S.preventDefault(),r(e)),S.key==="End"&&(S.preventDefault(),r(n)),(S.key==="Backspace"||S.key==="Delete")&&(S.preventDefault(),t!==null?r(null):l==null||l()),S.key==="ArrowRight"&&(S.preventDefault(),o==null||o()),S.key==="ArrowLeft"&&(S.preventDefault(),l==null||l()),S.key==="ArrowUp"&&(S.preventDefault(),r(t===null?e:Eh(t+s,e,x))),S.key==="ArrowDown"&&(S.preventDefault(),r(t===null?x:Eh(t-s,e,x))))};return a.jsx("input",{type:"text",role:"spinbutton","aria-valuemin":e,"aria-valuemax":n,"aria-valuenow":t===null?0:t,"data-empty":t===null||void 0,inputMode:"numeric",placeholder:p,value:t===null?"":fs(t),onChange:S=>w(S.currentTarget.value),onKeyDown:A,onFocus:S=>{S.currentTarget.select(),u==null||u(S)},onClick:S=>{S.stopPropagation(),S.currentTarget.select()},onMouseDown:S=>S.stopPropagation(),...v})}Ox.displayName="@mantine/dates/SpinInput";const[$ce,Lf]=Ki("TimeInput component was not found in the component tree");function jq({labels:t,value:e,onChange:n,className:r,style:i,onPreviousInput:s,readOnly:o,onMouseDown:l,onTouchStart:u,inputType:h,...f}){const p=Lf(),m=v=>{o||(v.key==="Home"&&(v.preventDefault(),n(t.am)),v.key==="End"&&(v.preventDefault(),n(t.pm)),(v.key==="Backspace"||v.key==="Delete")&&(v.preventDefault(),e===null?s==null||s():n(null)),v.key==="ArrowLeft"&&(v.preventDefault(),s==null||s()),(v.key==="ArrowUp"||v.key==="ArrowDown")&&(v.preventDefault(),n(e===t.am?t.pm:t.am)),v.code==="KeyA"&&(v.preventDefault(),n(t.am)),v.code==="KeyP"&&(v.preventDefault(),n(t.pm)))};if(h==="input"){const v=e||"--",y=v.length+1;return a.jsx("input",{...p.getStyles("field",{className:r,style:i}),value:v,size:y,onChange:x=>!o&&n(x.target.value||null),onClick:x=>x.stopPropagation(),onKeyDown:m,onMouseDown:x=>{x.stopPropagation(),l==null||l(x)},"data-am-pm":!0,...f})}return a.jsxs("select",{...p.getStyles("field",{className:r,style:i}),value:e||"",onChange:v=>!o&&n(v.target.value||null),onClick:v=>v.stopPropagation(),onKeyDown:m,onMouseDown:v=>{v.stopPropagation(),l==null||l(v)},"data-am-pm":!0,...f,children:[a.jsx("option",{value:"",children:"--"}),a.jsx("option",{value:t.am,children:t.am}),a.jsx("option",{value:t.pm,children:t.pm})]})}jq.displayName="@mantine/dates/AmPmInput";function i6({value:t,active:e,onSelect:n}){const r=Lf();return a.jsx(Br,{mod:{active:e},onClick:()=>n(t),onMouseDown:i=>i.preventDefault(),"data-value":t,tabIndex:-1,...r.getStyles("control"),children:typeof t=="number"?fs(t):t})}i6.displayName="@mantine/dates/TimeControl";function Cq({labels:t,value:e,onSelect:n}){const r=Lf(),i=[t.am,t.pm].map(s=>a.jsx(i6,{value:s,active:e===s,onSelect:n},s));return a.jsx("div",{...r.getStyles("controlsList"),children:i})}Cq.displayName="@mantine/dates/AmPmControlsList";function Qce(t,e){if(!t||!e)return!1;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function Uce(t,e,n){const r=[];for(let i=t;i<=e;i+=n)r.push(i);return r}function Ex({min:t,max:e,step:n,value:r,onSelect:i,reversed:s}){const o=Lf(),l=E.useRef(null),u=Uce(t,e,n),h=(s?u.reverse():u).map(f=>a.jsx(i6,{value:f,active:r===f,onSelect:i},f));return E.useEffect(()=>{r!==null&&requestAnimationFrame(()=>{var m;const p=(m=l.current)==null?void 0:m.querySelector(`[data-value="${r}"]`);Qce(p,l.current)||p==null||p.scrollIntoView({block:"nearest"})})},[r]),a.jsx(ma,{h:o.maxDropdownContentHeight,type:"never",viewportRef:l,...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("controlsList"),children:h})})}Ex.displayName="@mantine/dates/TimeControlsList";function _q({time:t,compare:e,withSeconds:n}){const r=CA(t),i=CA(e);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function s6({value:t,active:e,onChange:n,format:r,amPmLabels:i,withSeconds:s}){const o=Lf();return a.jsx(Br,{mod:{active:e},onClick:()=>n(t),...o.getStyles("presetControl"),children:a.jsx(Sq,{withSeconds:s,value:t,format:r,amPmLabels:i})})}s6.displayName="@mantine/dates/TimePresetControl";function Tq({value:t,data:e,onChange:n,format:r,amPmLabels:i,withSeconds:s}){const o=Lf(),l=e.values.map(u=>a.jsx(s6,{value:u,format:r,amPmLabels:i,withSeconds:s,active:_q({time:u,compare:t,withSeconds:s}),onChange:n},u));return a.jsxs("div",{...o.getStyles("presetsGroup"),children:[a.jsx("div",{...o.getStyles("presetsGroupLabel"),children:e.label}),a.jsx(u2,{cols:s?2:3,spacing:4,children:l})]})}Tq.displayName="@mantine/dates/TimePresetGroup";function kq({presets:t,format:e,amPmLabels:n,withSeconds:r,value:i,onChange:s}){const o=Lf();if(t.length===0)return null;if(typeof t[0]=="string"){const u=t.map(h=>a.jsx(s6,{value:h,format:e,amPmLabels:n,withSeconds:r,active:_q({time:h,compare:i,withSeconds:r}),onChange:s},h));return a.jsx(ma.Autosize,{mah:o.maxDropdownContentHeight,type:"never",...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("presetsRoot"),children:a.jsx(u2,{cols:r?2:3,spacing:4,children:u})})})}const l=t.map((u,h)=>a.jsx(Tq,{data:u,value:i,format:e,amPmLabels:n,withSeconds:r,onChange:s},h));return a.jsx(ma.Autosize,{mah:o.maxDropdownContentHeight,type:"never",...o.getStyles("scrollarea"),...o.scrollAreaProps,children:a.jsx("div",{...o.getStyles("presetsRoot"),children:l})})}kq.displayName="@mantine/dates/TimePresets";function a_(t){const[e=0,n=0,r=0]=t.split(":").map(Number);return e*3600+n*60+r}function Wce(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60),r=t%60;return{timeString:`${fs(e)}:${fs(n)}:${fs(r)}`,hours:e,minutes:n,seconds:r}}function Oq(t,e,n){const r=a_(t),i=e?a_(e):-1/0,s=n?a_(n):1/0;return Wce(Math.max(i,Math.min(r,s)))}function Vce({hours:t,minutes:e,seconds:n,amPmLabels:r}){if(t===null)return{hours:null,minutes:null,seconds:null,amPm:null};const i=t>=12?r.pm:r.am;return{hours:t%12===0?12:t%12,minutes:typeof e=="number"?e:null,seconds:typeof n=="number"?n:null,amPm:i}}function Ng({time:t,format:e,amPmLabels:n}){if(t==="")return{hours:null,minutes:null,seconds:null,amPm:null};const{hours:r,minutes:i,seconds:s}=CA(t),o={hours:r,minutes:i,seconds:s};return e==="12h"?Vce({...o,amPmLabels:n}):{...o,amPm:null}}function Yce({hours:t,minutes:e,seconds:n,amPm:r,amPmLabels:i,withSeconds:s}){let o=t;return r===i.pm&&t!==12?o+=12:r===i.am&&t===12&&(o=0),`${fs(o)}:${fs(e)}${s?`:${fs(n||0)}`:""}`}function Tp({hours:t,minutes:e,seconds:n,format:r,withSeconds:i,amPm:s,amPmLabels:o}){return t===null||e===null?{valid:!1,value:""}:i&&n===null?{valid:!1,value:""}:r==="24h"?{valid:!0,value:`${fs(t)}:${fs(e)}${i?`:${fs(n)}`:""}`}:s===null?{valid:!1,value:""}:{valid:!0,value:Yce({hours:t,minutes:e,seconds:n,amPm:s,amPmLabels:o,withSeconds:i})}}function Gce({value:t,defaultValue:e,onChange:n,format:r,amPmLabels:i,withSeconds:s=!1,min:o,max:l,clearable:u,readOnly:h,disabled:f,pasteSplit:p,type:m}){const v=Ng({time:t||e||"",amPmLabels:i,format:r}),y=Tp({hours:v.hours,minutes:v.minutes,seconds:v.seconds,format:r,withSeconds:s,amPm:v.amPm,amPmLabels:i}),x=E.useRef(!0),w=E.useRef(!y.valid),[A,S]=E.useState(v.hours),[C,j]=E.useState(v.minutes),[_,O]=E.useState(v.seconds),[M,R]=E.useState(v.amPm),N=u&&!h&&!f&&(A!==null||C!==null||_!==null||M!==null),B=E.useRef(null),D=E.useRef(null),L=E.useRef(null),U=E.useRef(null),H=ee=>{var le,ve,me,Qe;ee==="hours"&&((le=B.current)==null||le.focus()),ee==="minutes"&&((ve=D.current)==null||ve.focus()),ee==="seconds"&&((me=L.current)==null||me.focus()),ee==="amPm"&&((Qe=U.current)==null||Qe.focus())},z=(ee,le)=>{const ve=Tp({hours:A,minutes:C,seconds:_,[ee]:le,format:r,withSeconds:s,amPmLabels:i});ve.valid?(x.current=!1,w.current=!1,ee==="hours"&&S(le),ee==="minutes"&&j(le),ee==="seconds"&&O(le),ee==="amPm"&&R(le),n==null||n(ve.value)):(x.current=!1,w.current||(n==null||n(""),w.current=!0))},I=ee=>{x.current=!1;const le=Ng({time:ee,amPmLabels:i,format:r});S(le.hours),j(le.minutes),O(le.seconds),R(le.amPm),w.current=!Tp({...le,format:r,withSeconds:s,amPmLabels:i}).valid,n==null||n(ee)},F=ee=>{let le=ee;r==="12h"&&typeof ee=="number"&&ee>12&&(le=(ee-1)%12+1),S(le),z("hours",le),H("hours")},$=ee=>{j(ee),z("minutes",ee),H("minutes")},G=ee=>{O(ee),z("seconds",ee),H("seconds")},Y=ee=>{R(ee),z("amPm",ee),H("amPm")},W=()=>{x.current=!1,S(null),j(null),O(null),R(null),n==null||n(""),w.current=!0,H("hours")},V=ee=>{ee.preventDefault();const le=ee.clipboardData.getData("text"),ve=(p||Ng)({time:le,format:r,amPmLabels:i}),me=Tp({...ve,format:r,withSeconds:s,amPmLabels:i});if(me.valid){x.current=!1;const Qe=m==="duration"?"9999:59:59":"23:59:59",We=Oq(me.value,o||"00:00:00",l||Qe);n==null||n(We.timeString),S(ve.hours),j(ve.minutes),O(ve.seconds),R(ve.amPm)}},X=Tp({hours:A,minutes:C,seconds:_,format:r,withSeconds:s,amPm:M,amPmLabels:i});return ll(()=>{if(t===""){x.current=!1,S(null),j(null),O(null),R(null),x.current=!0;return}if(x.current&&typeof t=="string"){const ee=Ng({time:t||"",amPmLabels:i,format:r});S(ee.hours),j(ee.minutes),O(ee.seconds),R(ee.amPm)}x.current=!0},[t]),{refs:{hours:B,minutes:D,seconds:L,amPm:U},values:{hours:A,minutes:C,seconds:_,amPm:M},setHours:F,setMinutes:$,setSeconds:G,setAmPm:Y,focus:H,clear:W,onPaste:V,setTimeString:I,isClearable:N,hiddenInputValue:X.value}}var Eq={fieldsRoot:"m_7a8f1e6d",fieldsGroup:"m_d6bb0a54",controlsList:"m_b97ecb26",controlsListGroup:"m_31fe42f9",dropdown:"m_9c4817c3",control:"m_154c536b",presetControl:"m_7be09d0c",presetsGroup:"m_7d00001d",presetsGroupLabel:"m_d8d918d7",field:"m_6b43ba88"};const Xce={type:"time",hoursStep:1,minutesStep:1,secondsStep:1,format:"24h",amPmLabels:{am:"AM",pm:"PM"},pasteSplit:Ng,maxDropdownContentHeight:200,hoursPlaceholder:"--",minutesPlaceholder:"--",secondsPlaceholder:"--",minHoursDigits:2},Mq=(t,{size:e})=>({dropdown:{"--control-font-size":Or(e)}}),_2=Ie(t=>{const e=je("TimePicker",Xce,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,onClick:u,type:h,format:f,value:p,defaultValue:m,onChange:v,hoursStep:y,minutesStep:x,secondsStep:w,withSeconds:A,hoursInputLabel:S,minutesInputLabel:C,secondsInputLabel:j,amPmInputLabel:_,amPmLabels:O,clearable:M,clearSectionMode:R,onMouseDown:N,onFocusCapture:B,onBlurCapture:D,min:L,max:U,popoverProps:H,withDropdown:z,rightSection:I,onFocus:F,onBlur:$,clearButtonProps:G,hoursInputProps:Y,minutesInputProps:W,secondsInputProps:V,amPmSelectProps:X,readOnly:ee,disabled:le,size:ve,name:me,form:Qe,hiddenInputProps:We,labelProps:qe,pasteSplit:ae,hoursRef:de,minutesRef:Ae,secondsRef:Te,amPmRef:Ge,presets:rt,maxDropdownContentHeight:Ue,scrollAreaProps:Be,attributes:Ee,reverseTimeControlsList:Ke,hoursPlaceholder:Dt,minutesPlaceholder:Je,secondsPlaceholder:it,minHoursDigits:Xe,...Oe}=e,$e=h==="duration",lt=$e?"24h":f,Rn=$e&&Dt==="--"?"-".repeat(Xe):Dt,{resolvedClassNames:vr,resolvedStyles:rn}=Ao({classNames:n,styles:s,props:e}),An=ft({name:"TimePicker",classes:Eq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:Ee,vars:l,varsResolver:Mq}),ht=Gce({value:p,defaultValue:m,onChange:v,format:lt,amPmLabels:O,withSeconds:A,min:L,max:U,clearable:M,disabled:le,readOnly:ee,pasteSplit:ae,type:h}),fn=qn(ht.refs.hours,de),zt=qn(ht.refs.minutes,Ae),Nt=qn(ht.refs.seconds,Te),tn=qn(ht.refs.amPm,Ge),cr=Ri(),ln=E.useRef(!1),[Jn,Fr]=E.useState(!1),It=vt=>{ln.current||(ln.current=!0,F==null||F(vt))},Cn=vt=>{if(!vt.currentTarget.contains(vt.relatedTarget)){const ne=ht.values,_e=Tp({...ne,format:lt,amPmLabels:O,withSeconds:!!A});if(_e.valid&&(L||U)){const ye=Oq(_e.value,L,U);ye.timeString!==_e.value&&ht.setTimeString(ye.timeString)}ln.current=!1,$==null||$(vt)}};return a.jsx($ce,{value:{getStyles:An,scrollAreaProps:Be,maxDropdownContentHeight:Ue},children:a.jsxs(jn,{opened:Jn,transitionProps:{duration:0},position:"bottom-start",withRoles:!1,disabled:le||ee||!z||$e,...H,children:[a.jsx(jn.Target,{children:a.jsxs(Ds,{component:"div",size:ve,disabled:le,onClick:vt=>{u==null||u(vt),ht.focus("hours")},onMouseDown:vt=>{vt.preventDefault(),N==null||N(vt)},onFocusCapture:vt=>{Fr(!0),B==null||B(vt)},onBlurCapture:vt=>{Fr(!1),D==null||D(vt)},rightSection:I,__clearSection:a.jsx(ml,{...G,size:ve,onClick:vt=>{var ne;ht.clear(),(ne=G==null?void 0:G.onClick)==null||ne.call(G,vt)},onMouseDown:vt=>{var ne;vt.preventDefault(),(ne=G==null?void 0:G.onMouseDown)==null||ne.call(G,vt)}}),__clearable:ht.isClearable,__clearSectionMode:R,labelProps:{htmlFor:cr,...qe},style:i,className:r,classNames:vr,styles:rn,attributes:Ee,__staticSelector:"TimePicker",...Oe,children:[a.jsx("div",{...An("fieldsRoot"),dir:"ltr",children:a.jsxs("div",{...An("fieldsGroup"),onBlur:Cn,children:[a.jsx(Ox,{id:cr,...Y,...An("field",{className:Y==null?void 0:Y.className,style:$e?{width:`calc(${Math.max(Xe,fs(ht.values.hours??0).length)}ch + 0.3em)`,...Y==null?void 0:Y.style}:Y==null?void 0:Y.style}),value:ht.values.hours,onChange:ht.setHours,onNextInput:()=>ht.focus("minutes"),min:lt==="12h"?1:0,max:$e?9999:lt==="12h"?12:23,allowTemporaryZero:lt==="12h",disableAutoAdvance:$e,focusable:!0,step:y,ref:fn,"aria-label":S,readOnly:ee,disabled:le,onPaste:ht.onPaste,onFocus:vt=>{var ne;It(vt),(ne=Y==null?void 0:Y.onFocus)==null||ne.call(Y,vt)},onBlur:vt=>{var _e;const ne=vt.currentTarget.value;lt==="12h"&&(ne?parseInt(ne,10):null)===0&&ht.setHours(12),(_e=Y==null?void 0:Y.onBlur)==null||_e.call(Y,vt)},placeholder:Rn}),a.jsx("span",{children:":"}),a.jsx(Ox,{...W,...An("field",{className:W==null?void 0:W.className,style:W==null?void 0:W.style}),value:ht.values.minutes,onChange:ht.setMinutes,min:0,max:59,focusable:!0,step:x,ref:zt,onPreviousInput:()=>ht.focus("hours"),onNextInput:()=>A?ht.focus("seconds"):ht.focus("amPm"),"aria-label":C,tabIndex:-1,readOnly:ee,disabled:le,onPaste:ht.onPaste,onFocus:vt=>{var ne;It(vt),(ne=W==null?void 0:W.onFocus)==null||ne.call(W,vt)},placeholder:Je}),A&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:":"}),a.jsx(Ox,{...V,...An("field",{className:V==null?void 0:V.className,style:V==null?void 0:V.style}),value:ht.values.seconds,onChange:ht.setSeconds,min:0,max:59,focusable:!0,step:w,ref:Nt,onPreviousInput:()=>ht.focus("minutes"),onNextInput:()=>ht.focus("amPm"),"aria-label":j,tabIndex:-1,readOnly:ee,disabled:le,onPaste:ht.onPaste,onFocus:vt=>{var ne;It(vt),(ne=V==null?void 0:V.onFocus)==null||ne.call(V,vt)},placeholder:it})]}),lt==="12h"&&!$e&&a.jsx(jq,{...X,inputType:z?"input":"select",labels:O,value:ht.values.amPm,onChange:ht.setAmPm,ref:tn,"aria-label":_,onPreviousInput:()=>A?ht.focus("seconds"):ht.focus("minutes"),readOnly:ee,disabled:le,tabIndex:-1,onPaste:ht.onPaste,onFocus:vt=>{var ne;It(vt),(ne=X==null?void 0:X.onFocus)==null||ne.call(X,vt)}})]})}),a.jsx("input",{type:"hidden",name:me,form:Qe,value:ht.hiddenInputValue,...We})]})}),a.jsx(jn.Dropdown,{...An("dropdown"),onMouseDown:vt=>vt.preventDefault(),children:rt?a.jsx(kq,{value:ht.hiddenInputValue,onChange:ht.setTimeString,format:lt,presets:rt,amPmLabels:O,withSeconds:A||!1}):a.jsxs("div",{...An("controlsListGroup"),children:[a.jsx(Ex,{min:lt==="12h"?1:0,max:lt==="12h"?12:23,step:y,value:ht.values.hours,onSelect:ht.setHours,reversed:Ke}),a.jsx(Ex,{min:0,max:59,step:x,value:ht.values.minutes,onSelect:ht.setMinutes,reversed:Ke}),A&&a.jsx(Ex,{min:0,max:59,step:w,value:ht.values.seconds,onSelect:ht.setSeconds,reversed:Ke}),lt==="12h"&&a.jsx(Cq,{labels:O,value:ht.values.amPm,onSelect:ht.setAmPm})]})})]})})});_2.displayName="@mantine/dates/TimePicker";_2.classes=Eq;_2.varsResolver=Mq;var Rq={day:"m_396ce5cb"};const Dq=(t,{size:e})=>({day:{"--day-size":Ut(e,"day-size")}}),T2=Ie(t=>{const e=je("Day",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,date:u,disabled:h,__staticSelector:f,weekend:p,outside:m,selected:v,renderDay:y,inRange:x,firstInRange:w,lastInRange:A,hidden:S,static:C,highlightToday:j,fullWidth:_,attributes:O,...M}=e;return a.jsx(Br,{...ft({name:f||"Day",classes:Rq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:O,vars:l,varsResolver:Dq,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:C?"div":"button",disabled:h,"data-today":Pe(u).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":j||void 0,"data-disabled":h||void 0,"data-weekend":!h&&!m&&p||void 0,"data-outside":!h&&m||void 0,"data-selected":!h&&v||void 0,"data-in-range":x&&!h||void 0,"data-first-in-range":w&&!h||void 0,"data-last-in-range":A&&!h||void 0,"data-static":C||void 0,"data-full-width":_||void 0,unstyled:o,...M,children:(y==null?void 0:y(u))||Pe(u).date()})});T2.classes=Rq;T2.varsResolver=Dq;T2.displayName="@mantine/dates/Day";function Kce({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=Pe().day(n),i=[];for(let s=0;s<7;s+=1)typeof e=="string"?i.push(Pe(r).add(s,"days").locale(t).format(e)):i.push(e(Pe(r).add(s,"days").format("YYYY-MM-DD")));return i}var Nq={weekday:"m_18a3eca"};const Iq=(t,{size:e})=>({weekdaysRow:{"--wr-fz":Or(e),"--wr-spacing":Vi(e)}}),k2=Ie(t=>{const e=je("WeekdaysRow",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,locale:u,firstDayOfWeek:h,weekdayFormat:f,cellComponent:p="th",__staticSelector:m,withWeekNumbers:v,attributes:y,...x}=e,w=ft({name:m||"WeekdaysRow",classes:Nq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:y,vars:l,varsResolver:Iq,rootSelector:"weekdaysRow"}),A=sd(),S=Kce({locale:A.getLocale(u),format:f,firstDayOfWeek:A.getFirstDayOfWeek(h)}).map((C,j)=>a.jsx(p,{...w("weekday"),children:C},j));return a.jsxs(be,{component:"tr",...w("weekdaysRow"),...x,children:[v&&a.jsx(p,{...w("weekday"),children:"#"}),S]})});k2.classes=Nq;k2.varsResolver=Iq;k2.displayName="@mantine/dates/WeekdaysRow";function Zce(t,e=1){let n=Pe(t);if(!n.isValid())return n;const r=e===0?6:e-1;for(;n.day()!==r;)n=n.add(1,"day");return n.format("YYYY-MM-DD")}function Jce(t,e=1){let n=Pe(t);for(;n.day()!==e;)n=n.subtract(1,"day");return n.format("YYYY-MM-DD")}function eue({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const r=Pe(Pe(t).subtract(Pe(t).date()-1,"day").format("YYYY-M-D")),i=r.format("YYYY-MM-DD"),s=Zce(r.add(+r.daysInMonth()-1,"day").format("YYYY-MM-DD"),e),o=[];let l=Pe(Jce(i,e));for(;Pe(l).isBefore(s,"day");){const u=[];for(let h=0;h<7;h+=1)u.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(u)}if(n&&o.length<6){const u=o[o.length-1],h=u[u.length-1];let f=Pe(h).add(1,"day");for(;o.length<6;){const p=[];for(let m=0;m<7;m+=1)p.push(f.format("YYYY-MM-DD")),f=f.add(1,"day");o.push(p)}}return o}function a6(t,e){return Pe(t).format("YYYY-MM")===Pe(e).format("YYYY-MM")}function Bq(t,e){return e?Pe(t).isAfter(Pe(e).subtract(1,"day"),"day"):!0}function Lq(t,e){return e?Pe(t).isBefore(Pe(e).add(1,"day"),"day"):!0}function tue({dates:t,minDate:e,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:s,month:o}){const l=t.flat().filter(f=>{var p;return Lq(f,n)&&Bq(f,e)&&!(i!=null&&i(f))&&!((p=r==null?void 0:r(f))!=null&&p.disabled)&&(!s||a6(f,o))}),u=l.find(f=>{var p;return(p=r==null?void 0:r(f))==null?void 0:p.selected});if(u)return u;const h=l.find(f=>Pe().isSame(f,"date"));return h||l[0]}var Mx={exports:{}},nue=Mx.exports,N5;function rue(){return N5||(N5=1,function(t,e){(function(n,r){t.exports=r()})(nue,function(){var n="day";return function(r,i,s){var o=function(h){return h.add(4-h.isoWeekday(),n)},l=i.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),n);var f,p,m,v,y=o(this),x=(f=this.isoWeekYear(),p=this.$u,m=(p?s.utc:s)().year(f).startOf("year"),v=4-m.isoWeekday(),m.isoWeekday()>4&&(v+=7),m.add(v,n));return y.diff(x,"week")+1},l.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var u=l.startOf;l.startOf=function(h,f){var p=this.$utils(),m=!!p.u(f)||f;return p.p(h)==="isoweek"?m?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(h,f)}}})}(Mx)),Mx.exports}var iue=rue();const sue=pl(iue);Pe.extend(sue);function aue(t){return Pe(t.find(e=>Pe(e).day()===1)).isoWeek()}var Pq={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const oue={withCellSpacing:!0},Fq=(t,{size:e})=>({weekNumber:{"--wn-fz":Or(e),"--wn-size":Ut(e,"wn-size")}}),Nb=Ie(t=>{const e=je("Month",oue,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,__staticSelector:u,locale:h,firstDayOfWeek:f,weekdayFormat:p,month:m,weekendDays:v,getDayProps:y,excludeDate:x,minDate:w,maxDate:A,renderDay:S,hideOutsideDates:C,hideWeekdays:j,getDayAriaLabel:_,static:O,__getDayRef:M,__onDayKeyDown:R,__onDayClick:N,__onDayMouseEnter:B,__preventFocus:D,__stopPropagation:L,withCellSpacing:U,size:H,highlightToday:z,withWeekNumbers:I,fullWidth:F,attributes:$,...G}=e,Y=ft({name:u||"Month",classes:Pq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:$,vars:l,varsResolver:Fq,rootSelector:"month"}),W=sd(),V=eue({month:m,firstDayOfWeek:W.getFirstDayOfWeek(f),consistentWeeks:W.consistentWeeks}),X=tue({dates:V,minDate:Ms(w),maxDate:Ms(A),getDayProps:y,excludeDate:x,hideOutsideDates:C,month:m}),{resolvedClassNames:ee,resolvedStyles:le}=Ao({classNames:n,styles:s,props:e}),ve=V.map((me,Qe)=>{const We=me.map((qe,ae)=>{const de=!a6(qe,m),Ae=(_==null?void 0:_(qe))||Pe(qe).locale(h||W.locale).format("D MMMM YYYY"),Te=y==null?void 0:y(qe),Ge=Pe(qe).isSame(X,"date");return a.jsx("td",{...Y("monthCell"),"data-with-spacing":U||void 0,children:a.jsx(T2,{__staticSelector:u||"Month",classNames:ee,styles:le,attributes:$,unstyled:o,"data-mantine-stop-propagation":L||void 0,highlightToday:z,renderDay:S,date:qe,size:H,weekend:W.getWeekendDays(v).includes(Pe(qe).get("day")),outside:de,hidden:C?de:!1,"aria-label":Ae,static:O,fullWidth:F,disabled:(x==null?void 0:x(qe))||!Lq(qe,Ms(A))||!Bq(qe,Ms(w)),ref:rt=>{rt&&(M==null||M(Qe,ae,rt))},...Te,onKeyDown:rt=>{var Ue;(Ue=Te==null?void 0:Te.onKeyDown)==null||Ue.call(Te,rt),R==null||R(rt,{rowIndex:Qe,cellIndex:ae,date:qe})},onMouseEnter:rt=>{var Ue;(Ue=Te==null?void 0:Te.onMouseEnter)==null||Ue.call(Te,rt),B==null||B(rt,qe)},onClick:rt=>{var Ue;(Ue=Te==null?void 0:Te.onClick)==null||Ue.call(Te,rt),N==null||N(rt,qe)},onMouseDown:rt=>{var Ue;(Ue=Te==null?void 0:Te.onMouseDown)==null||Ue.call(Te,rt),D&&rt.preventDefault()},tabIndex:D||!Ge?-1:0})},qe.toString())});return a.jsxs("tr",{...Y("monthRow"),children:[I&&a.jsx("td",{...Y("weekNumber"),children:aue(me)}),We]},Qe)});return a.jsxs(be,{component:"table",...Y("month"),size:H,"data-full-width":F||void 0,...G,children:[!j&&a.jsx("thead",{...Y("monthThead"),children:a.jsx(k2,{__staticSelector:u||"Month",locale:h,firstDayOfWeek:f,weekdayFormat:p,withWeekNumbers:I,size:H,classNames:ee,styles:le,unstyled:o,attributes:$})}),a.jsx("tbody",{...Y("monthTbody"),children:ve})]})});Nb.classes=Pq;Nb.varsResolver=Fq;Nb.displayName="@mantine/dates/Month";var zq={pickerControl:"m_dc6a3c71"};const Hq=(t,{size:e})=>({pickerControl:{"--dpc-fz":Or(e),"--dpc-size":Ut(e,"dpc-size")}}),Ib=Ie(t=>{const e=je("PickerControl",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,firstInRange:u,lastInRange:h,inRange:f,__staticSelector:p,selected:m,disabled:v,fullWidth:y,attributes:x,...w}=e;return a.jsx(Br,{...ft({name:p||"PickerControl",classes:zq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:x,vars:l,varsResolver:Hq,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":y||void 0,"data-selected":m&&!v||void 0,"data-disabled":v||void 0,"data-in-range":f&&!v&&!m||void 0,"data-first-in-range":u&&!v||void 0,"data-last-in-range":h&&!v||void 0,disabled:v,...w})});Ib.classes=zq;Ib.varsResolver=Hq;Ib.displayName="@mantine/dates/PickerControl";function qq({year:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Pe(t).isBefore(e,"year")||n&&Pe(t).isAfter(n,"year"))}function lue({years:t,minDate:e,maxDate:n,getYearControlProps:r}){const i=t.flat().filter(l=>{var u;return!qq({year:l,minDate:e,maxDate:n})&&!((u=r==null?void 0:r(l))!=null&&u.disabled)}),s=i.find(l=>{var u;return(u=r==null?void 0:r(l))==null?void 0:u.selected});if(s)return s;const o=i.find(l=>Pe().isSame(l,"year"));return o||i[0]}function $q(t){const e=Pe(t).year(),n=e-e%10;let r=0;const i=[[],[],[],[]];for(let s=0;s<4;s+=1){const o=s===3?1:3;for(let l=0;l<o;l+=1)i[s].push(Pe(new Date(n+r,0)).format("YYYY-MM-DD")),r+=1}return i}var Qq={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const cue={yearsListFormat:"YYYY",withCellSpacing:!0},O2=Ie(t=>{const e=je("YearsList",cue,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,decade:u,yearsListFormat:h,locale:f,minDate:p,maxDate:m,getYearControlProps:v,__staticSelector:y,__getControlRef:x,__onControlKeyDown:w,__onControlClick:A,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:j,withCellSpacing:_,fullWidth:O,size:M,attributes:R,...N}=e,B=ft({name:y||"YearsList",classes:Qq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:R,vars:l,rootSelector:"yearsList"}),D=sd(),L=$q(u),U=lue({years:L,minDate:p,maxDate:m,getYearControlProps:v}),H=L.map((z,I)=>{const F=z.map(($,G)=>{const Y=v==null?void 0:v($),W=Pe($).isSame(U,"year");return a.jsx("td",{...B("yearsListCell"),"data-with-spacing":_||void 0,children:a.jsx(Ib,{...B("yearsListControl"),size:M,unstyled:o,fullWidth:O,"data-mantine-stop-propagation":j||void 0,disabled:qq({year:$,minDate:p,maxDate:m}),ref:V=>{V&&(x==null||x(I,G,V))},...Y,onKeyDown:V=>{var X;(X=Y==null?void 0:Y.onKeyDown)==null||X.call(Y,V),w==null||w(V,{rowIndex:I,cellIndex:G,date:$})},onClick:V=>{var X;(X=Y==null?void 0:Y.onClick)==null||X.call(Y,V),A==null||A(V,$)},onMouseEnter:V=>{var X;(X=Y==null?void 0:Y.onMouseEnter)==null||X.call(Y,V),S==null||S(V,$)},onMouseDown:V=>{var X;(X=Y==null?void 0:Y.onMouseDown)==null||X.call(Y,V),C&&V.preventDefault()},tabIndex:C||!W?-1:0,children:(Y==null?void 0:Y.children)??Pe($).locale(D.getLocale(f)).format(h)})},G)});return a.jsx("tr",{...B("yearsListRow"),children:F},I)});return a.jsx(be,{component:"table",size:M,...B("yearsList"),"data-full-width":O||void 0,...N,children:a.jsx("tbody",{children:H})})});O2.classes=Qq;O2.displayName="@mantine/dates/YearsList";function Uq({month:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Pe(t).isBefore(e,"month")||n&&Pe(t).isAfter(n,"month"))}function uue({months:t,minDate:e,maxDate:n,getMonthControlProps:r}){const i=t.flat().filter(l=>{var u;return!Uq({month:l,minDate:e,maxDate:n})&&!((u=r==null?void 0:r(l))!=null&&u.disabled)}),s=i.find(l=>{var u;return(u=r==null?void 0:r(l))==null?void 0:u.selected});if(s)return s;const o=i.find(l=>Pe().isSame(l,"month"));return o||i[0]}function hue(t){const e=Pe(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let i=0;i<4;i+=1)for(let s=0;s<3;s+=1)n[i].push(Pe(e).add(r,"months").format("YYYY-MM-DD")),r+=1;return n}var Wq={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const due={monthsListFormat:"MMM",withCellSpacing:!0},E2=Ie(t=>{const e=je("MonthsList",due,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,__staticSelector:u,year:h,monthsListFormat:f,locale:p,minDate:m,maxDate:v,getMonthControlProps:y,__getControlRef:x,__onControlKeyDown:w,__onControlClick:A,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:j,withCellSpacing:_,fullWidth:O,size:M,attributes:R,...N}=e,B=ft({name:u||"MonthsList",classes:Wq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:R,vars:l,rootSelector:"monthsList"}),D=sd(),L=hue(h),U=uue({months:L,minDate:Ms(m),maxDate:Ms(v),getMonthControlProps:y}),H=L.map((z,I)=>{const F=z.map(($,G)=>{const Y=y==null?void 0:y($),W=Pe($).isSame(U,"month");return a.jsx("td",{...B("monthsListCell"),"data-with-spacing":_||void 0,children:a.jsx(Ib,{...B("monthsListControl"),size:M,unstyled:o,fullWidth:O,__staticSelector:u||"MonthsList","data-mantine-stop-propagation":j||void 0,disabled:Uq({month:$,minDate:Ms(m),maxDate:Ms(v)}),ref:V=>{V&&(x==null||x(I,G,V))},...Y,onKeyDown:V=>{var X;(X=Y==null?void 0:Y.onKeyDown)==null||X.call(Y,V),w==null||w(V,{rowIndex:I,cellIndex:G,date:$})},onClick:V=>{var X;(X=Y==null?void 0:Y.onClick)==null||X.call(Y,V),A==null||A(V,$)},onMouseEnter:V=>{var X;(X=Y==null?void 0:Y.onMouseEnter)==null||X.call(Y,V),S==null||S(V,$)},onMouseDown:V=>{var X;(X=Y==null?void 0:Y.onMouseDown)==null||X.call(Y,V),C&&V.preventDefault()},tabIndex:C||!W?-1:0,children:(Y==null?void 0:Y.children)??Pe($).locale(D.getLocale(p)).format(f)})},G)});return a.jsx("tr",{...B("monthsListRow"),children:F},I)});return a.jsx(be,{component:"table",size:M,...B("monthsList"),"data-full-width":O||void 0,...N,children:a.jsx("tbody",{children:H})})});E2.classes=Wq;E2.displayName="@mantine/dates/MonthsList";var Vq={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const fue={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},Yq=(t,{size:e})=>({calendarHeader:{"--dch-control-size":Ut(e,"dch-control-size"),"--dch-fz":Or(e)}}),mu=Ie(t=>{const e=je("CalendarHeader",fue,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,nextIcon:u,previousIcon:h,nextLabel:f,previousLabel:p,onNext:m,onPrevious:v,onLevelClick:y,label:x,nextDisabled:w,previousDisabled:A,hasNextLevel:S,levelControlAriaLabel:C,withNext:j,withPrevious:_,headerControlsOrder:O,fullWidth:M,__staticSelector:R,__preventFocus:N,__stopPropagation:B,attributes:D,...L}=e,U=ft({name:R||"CalendarHeader",classes:Vq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:D,vars:l,varsResolver:Yq,rootSelector:"calendarHeader"}),H=N?G=>G.preventDefault():void 0,z=_&&E.createElement(Br,{...U("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":p,onClick:v,unstyled:o,onMouseDown:H,disabled:A,"data-disabled":A||void 0,tabIndex:N||A?-1:0,"data-mantine-stop-propagation":B||void 0},h||a.jsx(km,{...U("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),I=E.createElement(Br,{component:S?"button":"div",...U("calendarHeaderLevel"),key:"level",onClick:S?y:void 0,unstyled:o,onMouseDown:S?H:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":C,tabIndex:N||!S?-1:0,"data-mantine-stop-propagation":B||void 0},x),F=j&&E.createElement(Br,{...U("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":f,onClick:m,unstyled:o,onMouseDown:H,disabled:w,"data-disabled":w||void 0,tabIndex:N||w?-1:0,"data-mantine-stop-propagation":B||void 0},u||a.jsx(km,{...U("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),$=O.map(G=>G==="previous"?z:G==="level"?I:G==="next"?F:null);return a.jsx(be,{...U("calendarHeader"),"data-full-width":M||void 0,...L,children:$})});mu.classes=Vq;mu.varsResolver=Yq;mu.displayName="@mantine/dates/CalendarHeader";function pue(t){const e=$q(t);return[e[0][0],e[3][0]]}const mue={decadeLabelFormat:"YYYY"},M2=Ie(t=>{const{decade:e,locale:n,minDate:r,maxDate:i,yearsListFormat:s,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:h,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:m,nextIcon:v,previousIcon:y,nextLabel:x,previousLabel:w,onNext:A,onPrevious:S,nextDisabled:C,previousDisabled:j,levelControlAriaLabel:_,withNext:O,withPrevious:M,headerControlsOrder:R,decadeLabelFormat:N,classNames:B,styles:D,unstyled:L,__staticSelector:U,__stopPropagation:H,size:z,fullWidth:I,attributes:F,...$}=je("DecadeLevel",mue,t),G=sd(),[Y,W]=pue(e),V={__staticSelector:U||"DecadeLevel",classNames:B,styles:D,unstyled:L,size:z,attributes:F},X=typeof C=="boolean"?C:i?!Pe(W).endOf("year").isBefore(i):!1,ee=typeof j=="boolean"?j:r?!Pe(Y).startOf("year").isAfter(r):!1,le=(ve,me)=>Pe(ve).locale(n||G.locale).format(me);return a.jsxs(be,{"data-decade-level":!0,size:z,...$,children:[a.jsx(mu,{label:typeof N=="function"?N(Y,W):`${le(Y,N)} – ${le(W,N)}`,__preventFocus:m,__stopPropagation:H,nextIcon:v,previousIcon:y,nextLabel:x,previousLabel:w,onNext:A,onPrevious:S,nextDisabled:X,previousDisabled:ee,hasNextLevel:!1,levelControlAriaLabel:_,withNext:O,withPrevious:M,headerControlsOrder:R,fullWidth:I,...V}),a.jsx(O2,{decade:e,locale:n,minDate:r,maxDate:i,yearsListFormat:s,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:h,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:H,withCellSpacing:p,fullWidth:I,...V})]})});M2.classes={...O2.classes,...mu.classes};M2.displayName="@mantine/dates/DecadeLevel";const gue={yearLabelFormat:"YYYY"},R2=Ie(t=>{const{year:e,locale:n,minDate:r,maxDate:i,monthsListFormat:s,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:h,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:m,nextIcon:v,previousIcon:y,nextLabel:x,previousLabel:w,onNext:A,onPrevious:S,onLevelClick:C,nextDisabled:j,previousDisabled:_,hasNextLevel:O,levelControlAriaLabel:M,withNext:R,withPrevious:N,headerControlsOrder:B,yearLabelFormat:D,__staticSelector:L,__stopPropagation:U,size:H,classNames:z,styles:I,unstyled:F,fullWidth:$,attributes:G,...Y}=je("YearLevel",gue,t),W=sd(),V={__staticSelector:L||"YearLevel",classNames:z,styles:I,unstyled:F,size:H,attributes:G},X=typeof j=="boolean"?j:i?!Pe(e).endOf("year").isBefore(i):!1,ee=typeof _=="boolean"?_:r?!Pe(e).startOf("year").isAfter(r):!1;return a.jsxs(be,{"data-year-level":!0,size:H,...Y,children:[a.jsx(mu,{label:typeof D=="function"?D(e):Pe(e).locale(n||W.locale).format(D),__preventFocus:m,__stopPropagation:U,nextIcon:v,previousIcon:y,nextLabel:x,previousLabel:w,onNext:A,onPrevious:S,onLevelClick:C,nextDisabled:X,previousDisabled:ee,hasNextLevel:O,levelControlAriaLabel:M,withNext:R,withPrevious:N,headerControlsOrder:B,fullWidth:$,...V}),a.jsx(E2,{year:e,locale:n,minDate:r,maxDate:i,monthsListFormat:s,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:h,__onControlMouseEnter:f,__preventFocus:m,__stopPropagation:U,withCellSpacing:p,fullWidth:$,...V})]})});R2.classes={...mu.classes,...E2.classes};R2.displayName="@mantine/dates/YearLevel";const vue={monthLabelFormat:"MMMM YYYY"},D2=Ie(t=>{const{month:e,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:s,getDayProps:o,excludeDate:l,minDate:u,maxDate:h,renderDay:f,hideOutsideDates:p,hideWeekdays:m,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:x,__onDayClick:w,__onDayMouseEnter:A,withCellSpacing:S,highlightToday:C,withWeekNumbers:j,__preventFocus:_,__stopPropagation:O,nextIcon:M,previousIcon:R,nextLabel:N,previousLabel:B,onNext:D,onPrevious:L,onLevelClick:U,nextDisabled:H,previousDisabled:z,hasNextLevel:I,levelControlAriaLabel:F,withNext:$,withPrevious:G,headerControlsOrder:Y,monthLabelFormat:W,classNames:V,styles:X,unstyled:ee,__staticSelector:le,size:ve,static:me,fullWidth:Qe,attributes:We,...qe}=je("MonthLevel",vue,t),ae=sd(),de={__staticSelector:le||"MonthLevel",classNames:V,styles:X,unstyled:ee,size:ve,attributes:We},Ae=typeof H=="boolean"?H:h?!Pe(e).endOf("month").isBefore(h):!1,Te=typeof z=="boolean"?z:u?!Pe(e).startOf("month").isAfter(u):!1;return a.jsxs(be,{"data-month-level":!0,size:ve,...qe,children:[a.jsx(mu,{label:typeof W=="function"?W(e):Pe(e).locale(n||ae.locale).format(W),__preventFocus:_,__stopPropagation:O,nextIcon:M,previousIcon:R,nextLabel:N,previousLabel:B,onNext:D,onPrevious:L,onLevelClick:U,nextDisabled:Ae,previousDisabled:Te,hasNextLevel:I,levelControlAriaLabel:F,withNext:$,withPrevious:G,headerControlsOrder:Y,fullWidth:Qe,...de}),a.jsx(Nb,{month:e,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:s,getDayProps:o,excludeDate:l,minDate:u,maxDate:h,renderDay:f,hideOutsideDates:p,hideWeekdays:m,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:x,__onDayClick:w,__onDayMouseEnter:A,__preventFocus:_,__stopPropagation:O,static:me,withCellSpacing:S,highlightToday:C,withWeekNumbers:j,fullWidth:Qe,...de})]})});D2.classes={...Nb.classes,...mu.classes};D2.displayName="@mantine/dates/MonthLevel";var Gq={levelsGroup:"m_30b26e33"};const ad=Ie(t=>{const e=je("LevelsGroup",null,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,__staticSelector:u,fullWidth:h,attributes:f,...p}=e;return a.jsx(be,{...ft({name:u||"LevelsGroup",classes:Gq,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:f,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":h||void 0,...p})});ad.classes=Gq;ad.displayName="@mantine/dates/LevelsGroup";const bue={numberOfColumns:1},N2=Ie(t=>{const{decade:e,locale:n,minDate:r,maxDate:i,yearsListFormat:s,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:h,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:v,previousLabel:y,onNext:x,onPrevious:w,nextDisabled:A,previousDisabled:S,headerControlsOrder:C,classNames:j,styles:_,unstyled:O,__staticSelector:M,__stopPropagation:R,numberOfColumns:N,levelControlAriaLabel:B,decadeLabelFormat:D,size:L,fullWidth:U,vars:H,attributes:z,...I}=je("DecadeLevelGroup",bue,t),F=E.useRef([]),$=Array(N).fill(0).map((G,Y)=>{const W=Pe(e).add(Y*10,"years").format("YYYY-MM-DD");return a.jsx(M2,{size:L,yearsListFormat:s,decade:W,withNext:Y===N-1,withPrevious:Y===0,decadeLabelFormat:D,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(V,X)=>r6({levelIndex:Y,rowIndex:X.rowIndex,cellIndex:X.cellIndex,event:V,controlsRef:F}),__getControlRef:(V,X,ee)=>{Array.isArray(F.current[Y])||(F.current[Y]=[]),Array.isArray(F.current[Y][V])||(F.current[Y][V]=[]),F.current[Y][V][X]=ee},levelControlAriaLabel:typeof B=="function"?B(W):B,locale:n,minDate:r,maxDate:i,__preventFocus:f,__stopPropagation:R,nextIcon:p,previousIcon:m,nextLabel:v,previousLabel:y,onNext:x,onPrevious:w,nextDisabled:A,previousDisabled:S,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:j,styles:_,unstyled:O,withCellSpacing:h,headerControlsOrder:C,fullWidth:U,attributes:z},Y)});return a.jsx(ad,{classNames:j,styles:_,__staticSelector:M||"DecadeLevelGroup",size:L,unstyled:O,fullWidth:U,attributes:z,...I,children:$})});N2.classes={...ad.classes,...M2.classes};N2.displayName="@mantine/dates/DecadeLevelGroup";const yue={numberOfColumns:1},I2=Ie(t=>{const{year:e,locale:n,minDate:r,maxDate:i,monthsListFormat:s,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:h,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:v,previousLabel:y,onNext:x,onPrevious:w,onLevelClick:A,nextDisabled:S,previousDisabled:C,hasNextLevel:j,headerControlsOrder:_,classNames:O,styles:M,unstyled:R,__staticSelector:N,__stopPropagation:B,numberOfColumns:D,levelControlAriaLabel:L,yearLabelFormat:U,size:H,fullWidth:z,vars:I,attributes:F,...$}=je("YearLevelGroup",yue,t),G=E.useRef([]),Y=Array(D).fill(0).map((W,V)=>{const X=Pe(e).add(V,"years").format("YYYY-MM-DD");return a.jsx(R2,{size:H,monthsListFormat:s,year:X,withNext:V===D-1,withPrevious:V===0,yearLabelFormat:U,__stopPropagation:B,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(ee,le)=>r6({levelIndex:V,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ee,controlsRef:G}),__getControlRef:(ee,le,ve)=>{Array.isArray(G.current[V])||(G.current[V]=[]),Array.isArray(G.current[V][ee])||(G.current[V][ee]=[]),G.current[V][ee][le]=ve},levelControlAriaLabel:typeof L=="function"?L(X):L,locale:n,minDate:r,maxDate:i,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:v,previousLabel:y,onNext:x,onPrevious:w,onLevelClick:A,nextDisabled:S,previousDisabled:C,hasNextLevel:j,getMonthControlProps:o,classNames:O,styles:M,unstyled:R,__staticSelector:N||"YearLevelGroup",withCellSpacing:h,headerControlsOrder:_,fullWidth:z,attributes:F},V)});return a.jsx(ad,{classNames:O,styles:M,__staticSelector:N||"YearLevelGroup",size:H,unstyled:R,fullWidth:z,attributes:F,...$,children:Y})});I2.classes={...R2.classes,...ad.classes};I2.displayName="@mantine/dates/YearLevelGroup";const xue={numberOfColumns:1},B2=Ie(t=>{const{month:e,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:s,getDayProps:o,excludeDate:l,minDate:u,maxDate:h,renderDay:f,hideOutsideDates:p,hideWeekdays:m,getDayAriaLabel:v,__onDayClick:y,__onDayMouseEnter:x,withCellSpacing:w,highlightToday:A,withWeekNumbers:S,__preventFocus:C,nextIcon:j,previousIcon:_,nextLabel:O,previousLabel:M,onNext:R,onPrevious:N,onLevelClick:B,nextDisabled:D,previousDisabled:L,hasNextLevel:U,headerControlsOrder:H,classNames:z,styles:I,unstyled:F,numberOfColumns:$,levelControlAriaLabel:G,monthLabelFormat:Y,__staticSelector:W,__stopPropagation:V,size:X,static:ee,fullWidth:le,vars:ve,attributes:me,...Qe}=je("MonthLevelGroup",xue,t),We=E.useRef([]),qe=Array($).fill(0).map((ae,de)=>{const Ae=Pe(e).add(de,"months").format("YYYY-MM-DD");return a.jsx(D2,{month:Ae,withNext:de===$-1,withPrevious:de===0,monthLabelFormat:Y,__stopPropagation:V,__onDayClick:y,__onDayMouseEnter:x,__onDayKeyDown:(Te,Ge)=>r6({levelIndex:de,rowIndex:Ge.rowIndex,cellIndex:Ge.cellIndex,event:Te,controlsRef:We}),__getDayRef:(Te,Ge,rt)=>{Array.isArray(We.current[de])||(We.current[de]=[]),Array.isArray(We.current[de][Te])||(We.current[de][Te]=[]),We.current[de][Te][Ge]=rt},levelControlAriaLabel:typeof G=="function"?G(Ae):G,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:s,getDayProps:o,excludeDate:l,minDate:u,maxDate:h,renderDay:f,hideOutsideDates:p,hideWeekdays:m,getDayAriaLabel:v,__preventFocus:C,nextIcon:j,previousIcon:_,nextLabel:O,previousLabel:M,onNext:R,onPrevious:N,onLevelClick:B,nextDisabled:D,previousDisabled:L,hasNextLevel:U,classNames:z,styles:I,unstyled:F,__staticSelector:W||"MonthLevelGroup",size:X,static:ee,withCellSpacing:w,highlightToday:A,withWeekNumbers:S,headerControlsOrder:H,fullWidth:le,attributes:me},de)});return a.jsx(ad,{classNames:z,styles:I,__staticSelector:W||"MonthLevelGroup",size:X,fullWidth:le,attributes:me,...Qe,children:qe})});B2.classes={...ad.classes,...D2.classes};B2.displayName="@mantine/dates/MonthLevelGroup";var Xq={input:"m_6fa5e2aa"};const L2=Ie(t=>{const{inputProps:e,wrapperProps:n,placeholder:r,classNames:i,styles:s,unstyled:o,popoverProps:l,modalProps:u,dropdownType:h,children:f,formattedValue:p,dropdownHandlers:m,dropdownOpened:v,onClick:y,clearable:x,clearSectionMode:w,onClear:A,clearButtonProps:S,rightSection:C,shouldClear:j,readOnly:_,disabled:O,value:M,name:R,form:N,type:B,onDropdownClose:D,withTime:L,...U}=tF("PickerInputBase",{size:"sm"},t),H=a.jsx(kr.ClearButton,{onClick:A,unstyled:o,...S}),z=()=>{B==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&A(),m.close()};return a.jsxs(a.Fragment,{children:[h==="modal"&&!_&&a.jsx(Ua,{opened:v,onClose:z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...u,children:f}),a.jsx(kr.Wrapper,{...n,children:a.jsxs(jn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...l,disabled:(l==null?void 0:l.disabled)||h==="modal"||_,onChange:I=>{var F;I||((F=l==null?void 0:l.onClose)==null||F.call(l),z())},children:[a.jsx(jn.Target,{children:a.jsx(kr,{"data-dates-input":!0,"data-read-only":_||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:I=>{y==null||y(I),m.toggle()},__clearSection:H,__clearable:x&&j&&!_&&!O,__clearSectionMode:w,rightSection:C,...e,classNames:{...i,input:Pr(Xq.input,i==null?void 0:i.input)},...U,children:p||a.jsx(kr.Placeholder,{error:e.error,unstyled:o,classNames:i,styles:s,__staticSelector:e.__staticSelector,children:r})})}),a.jsx(jn.Dropdown,{"data-dates-dropdown":!0,children:f})]})}),a.jsx(wq,{value:M,name:R,form:N,type:B,withTime:L})]})});L2.classes=Xq;L2.displayName="@mantine/dates/PickerInputBase";const I5=t=>t==="range"?[null,null]:t==="multiple"?[]:null,B5=(t,e)=>{const n=e?Ip:Ms;return Array.isArray(t)?t.map(n):n(t)};function o6({type:t,value:e,defaultValue:n,onChange:r,withTime:i=!1}){const s=E.useRef(t),[o,l,u]=Xi({value:B5(e,i),defaultValue:B5(n,i),finalValue:I5(t),onChange:r});let h=o;return s.current!==t&&(s.current=t,e===void 0&&(h=n!==void 0?n:I5(t),l(h))),[h,l,u]}function o_(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function Aue(t){return t===0?"month":t===1?"year":"decade"}function fg(t,e,n){return Aue(Eh(o_(t,0),o_(e,0),o_(n,2)))}const wue={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},P2=Ie(t=>{const e=je("Calendar",wue,t),{vars:n,maxLevel:r,minLevel:i,defaultLevel:s,level:o,onLevelChange:l,date:u,defaultDate:h,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:y,previousLabel:x,onYearSelect:w,onMonthSelect:A,onYearMouseEnter:S,onMonthMouseEnter:C,headerControlsOrder:j,__updateDateOnYearSelect:_,__updateDateOnMonthSelect:O,__setDateRef:M,__setLevelRef:R,firstDayOfWeek:N,weekdayFormat:B,weekendDays:D,getDayProps:L,excludeDate:U,renderDay:H,hideOutsideDates:z,hideWeekdays:I,getDayAriaLabel:F,monthLabelFormat:$,nextIcon:G,previousIcon:Y,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:X,highlightToday:ee,withWeekNumbers:le,monthsListFormat:ve,getMonthControlProps:me,yearLabelFormat:Qe,yearsListFormat:We,getYearControlProps:qe,decadeLabelFormat:ae,classNames:de,styles:Ae,unstyled:Te,minDate:Ge,maxDate:rt,locale:Ue,__staticSelector:Be,size:Ee,__preventFocus:Ke,__stopPropagation:Dt,onNextDecade:Je,onPreviousDecade:it,onNextYear:Xe,onPreviousYear:Oe,onNextMonth:$e,onPreviousMonth:lt,static:Rn,enableKeyboardNavigation:vr,fullWidth:rn,attributes:An,ref:ht,...fn}=e,{resolvedClassNames:zt,resolvedStyles:Nt}=Ao({classNames:de,styles:Ae,props:e}),[tn,cr]=Xi({value:o?fg(o,i,r):void 0,defaultValue:s?fg(s,i,r):void 0,finalValue:fg(void 0,i,r),onChange:l}),[ln,Jn]=o6({type:"default",value:Ms(u),defaultValue:Ms(h),onChange:f});E.useImperativeHandle(M,()=>Re=>{Jn(Re)}),E.useImperativeHandle(R,()=>Re=>{cr(Re)});const Fr={__staticSelector:Be||"Calendar",styles:Nt,classNames:zt,unstyled:Te,size:Ee,attributes:An},It=m||p||1,Cn=E.useRef(null);if(Cn.current===null){const Re=new Date;Cn.current=Ge&&Pe(Re).isAfter(Ge)?Ge:Pe(Re).format("YYYY-MM-DD")}const vt=ln||Cn.current,ne=()=>{const Re=Pe(vt).add(It,"month").format("YYYY-MM-DD");$e==null||$e(Re),Jn(Re)},_e=()=>{const Re=Pe(vt).subtract(It,"month").format("YYYY-MM-DD");lt==null||lt(Re),Jn(Re)},ye=()=>{const Re=Pe(vt).add(It,"year").format("YYYY-MM-DD");Xe==null||Xe(Re),Jn(Re)},He=()=>{const Re=Pe(vt).subtract(It,"year").format("YYYY-MM-DD");Oe==null||Oe(Re),Jn(Re)},Ht=()=>{const Re=Pe(vt).add(10*It,"year").format("YYYY-MM-DD");Je==null||Je(Re),Jn(Re)},qt=()=>{const Re=Pe(vt).subtract(10*It,"year").format("YYYY-MM-DD");it==null||it(Re),Jn(Re)},et=E.useRef(null);return E.useEffect(()=>{if(!vr||Rn)return;const Re=tt=>{var nn;if(!((nn=et.current)!=null&&nn.contains(document.activeElement)))return;const jt=tt.ctrlKey||tt.metaKey,Ct=tt.shiftKey;switch(tt.key){case"ArrowUp":jt&&Ct?(tt.preventDefault(),qt()):jt&&(tt.preventDefault(),He());break;case"ArrowDown":jt&&Ct?(tt.preventDefault(),Ht()):jt&&(tt.preventDefault(),ye());break;case"y":case"Y":tn==="month"&&(tt.preventDefault(),cr("year"));break}};return document.addEventListener("keydown",Re),()=>{document.removeEventListener("keydown",Re)}},[vr,Rn,tn,ye,He,Ht,qt]),a.jsxs(be,{ref:qn(et,ht),size:Ee,"data-calendar":!0,"data-full-width":rn||void 0,...fn,children:[tn==="month"&&a.jsx(B2,{month:vt,minDate:Ge,maxDate:rt,firstDayOfWeek:N,weekdayFormat:B,weekendDays:D,getDayProps:L,excludeDate:U,renderDay:H,hideOutsideDates:z,hideWeekdays:I,getDayAriaLabel:F,onNext:ne,onPrevious:_e,hasNextLevel:r!=="month",onLevelClick:()=>cr("year"),numberOfColumns:p,locale:Ue,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousMonth)??x,previousIcon:Y,monthLabelFormat:$,__onDayClick:W,__onDayMouseEnter:V,__preventFocus:Ke,__stopPropagation:Dt,static:Rn,withCellSpacing:X,highlightToday:ee,withWeekNumbers:le,headerControlsOrder:j,fullWidth:rn,...Fr}),tn==="year"&&a.jsx(I2,{year:vt,numberOfColumns:p,minDate:Ge,maxDate:rt,monthsListFormat:ve,getMonthControlProps:me,locale:Ue,onNext:ye,onPrevious:He,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>cr("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousYear)??x,previousIcon:Y,yearLabelFormat:Qe,__onControlMouseEnter:C,__onControlClick:(Re,tt)=>{O&&Jn(tt),cr(fg("month",i,r)),A==null||A(tt)},__preventFocus:Ke,__stopPropagation:Dt,withCellSpacing:X,headerControlsOrder:j,fullWidth:rn,...Fr}),tn==="decade"&&a.jsx(N2,{decade:vt,minDate:Ge,maxDate:rt,yearsListFormat:We,getYearControlProps:qe,locale:Ue,onNext:Ht,onPrevious:qt,numberOfColumns:p,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousDecade)??x,previousIcon:Y,decadeLabelFormat:ae,__onControlMouseEnter:S,__onControlClick:(Re,tt)=>{_&&Jn(tt),cr(fg("year",i,r)),w==null||w(tt)},__preventFocus:Ke,__stopPropagation:Dt,withCellSpacing:X,headerControlsOrder:j,fullWidth:rn,...Fr})]})});P2.classes={...N2.classes,...I2.classes,...B2.classes};P2.displayName="@mantine/dates/Calendar";function Kq(t){const{maxLevel:e,minLevel:n,defaultLevel:r,level:i,onLevelChange:s,nextIcon:o,previousIcon:l,date:u,defaultDate:h,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:y,previousLabel:x,onYearSelect:w,onMonthSelect:A,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:j,onPreviousMonth:_,onNextYear:O,onPreviousYear:M,onNextDecade:R,onPreviousDecade:N,withCellSpacing:B,highlightToday:D,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:U,__setDateRef:H,__setLevelRef:z,withWeekNumbers:I,headerControlsOrder:F,firstDayOfWeek:$,weekdayFormat:G,weekendDays:Y,getDayProps:W,excludeDate:V,renderDay:X,hideOutsideDates:ee,hideWeekdays:le,getDayAriaLabel:ve,monthLabelFormat:me,monthsListFormat:Qe,getMonthControlProps:We,yearLabelFormat:qe,yearsListFormat:ae,getYearControlProps:de,decadeLabelFormat:Ae,allowSingleDateInRange:Te,allowDeselect:Ge,minDate:rt,maxDate:Ue,locale:Be,...Ee}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:r,level:i,onLevelChange:s,nextIcon:o,previousIcon:l,date:u,defaultDate:h,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:y,previousLabel:x,onYearSelect:w,onMonthSelect:A,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:j,onPreviousMonth:_,onNextYear:O,onPreviousYear:M,onNextDecade:R,onPreviousDecade:N,withCellSpacing:B,highlightToday:D,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:U,__setDateRef:H,withWeekNumbers:I,headerControlsOrder:F,firstDayOfWeek:$,weekdayFormat:G,weekendDays:Y,getDayProps:W,excludeDate:V,renderDay:X,hideOutsideDates:ee,hideWeekdays:le,getDayAriaLabel:ve,monthLabelFormat:me,monthsListFormat:Qe,getMonthControlProps:We,yearLabelFormat:qe,yearsListFormat:ae,getYearControlProps:de,decadeLabelFormat:Ae,allowSingleDateInRange:Te,allowDeselect:Ge,minDate:rt,maxDate:Ue,locale:Be},others:Ee}}function L5(t,e){const n=[...e].sort((r,i)=>Pe(r).isAfter(Pe(i))?1:-1);return Pe(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&Pe(n[1]).endOf("day").add(1,"ms").isAfter(t)}function Sue({type:t,level:e,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:s,allowDeselect:o,onMouseLeave:l}){const[u,h]=o6({type:t,value:n,defaultValue:r,onChange:i}),[f,p]=E.useState(t==="range"&&u[0]&&!u[1]?u[0]:null),[m,v]=E.useState(null),y=_=>{if(t==="range"){if(f&&!u[1]){if(Pe(_).isSame(f,e)&&!s){p(null),v(null),h([null,null]);return}const O=[_,f];O.sort((M,R)=>Pe(M).isAfter(Pe(R))?1:-1),h(O),v(null),p(null);return}if(u[0]&&!u[1]&&Pe(_).isSame(u[0],e)&&!s){p(null),v(null),h([null,null]);return}h([_,null]),v(null),p(_);return}if(t==="multiple"){u.some(O=>Pe(O).isSame(_,e))?h(u.filter(O=>!Pe(O).isSame(_,e))):h([...u,_]);return}u&&o&&Pe(_).isSame(u,e)?h(null):h(_)},x=_=>f&&m?L5(_,[m,f]):u[0]&&u[1]?L5(_,u):!1,w=t==="range"?_=>{l==null||l(_),v(null)}:l,A=_=>u[0]&&Pe(_).isSame(u[0],e)?!(m&&Pe(m).isBefore(u[0])):!1,S=_=>u[1]?Pe(_).isSame(u[1],e):!u[0]||!m?!1:Pe(m).isBefore(u[0])&&Pe(_).isSame(u[0],e),C=_=>{if(t==="range")return{selected:u.some(M=>M&&Pe(M).isSame(_,e)),inRange:x(_),firstInRange:A(_),lastInRange:S(_),"data-autofocus":!!u[0]&&Pe(u[0]).isSame(_,e)||void 0};if(t==="multiple")return{selected:u.some(M=>M&&Pe(M).isSame(_,e)),"data-autofocus":!!u[0]&&Pe(u[0]).isSame(_,e)||void 0};const O=Pe(u).isSame(_,e);return{selected:O,"data-autofocus":O||void 0}},j=t==="range"&&f?v:()=>{};return E.useEffect(()=>{if(t==="range")if(u[0]&&!u[1])p(u[0]);else{const _=u[0]==null&&u[1]==null,O=u[0]!=null&&u[1]!=null;(_||O)&&(p(null),v(null))}},[u]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:j,getControlProps:C,_value:u,setValue:h}}var jue={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const Zq=(t,{size:e})=>({datePickerRoot:{"--preset-font-size":Or(e)}}),Cue={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Bb=Ie(t=>{const e=je("DatePicker",Cue,t),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:s,onChange:o,onMouseLeave:l,classNames:u,styles:h,__staticSelector:f,__onDayClick:p,__onDayMouseEnter:m,__onPresetSelect:v,__stopPropagation:y,presets:x,className:w,style:A,unstyled:S,size:C,vars:j,attributes:_,...O}=e,{calendarProps:M,others:R}=Kq(O),N=E.useRef(null),B=E.useRef(null),D=ft({name:f||"DatePicker",classes:jue,props:e,className:w,style:A,classNames:u,styles:h,unstyled:S,attributes:_,rootSelector:x?"datePickerRoot":void 0,varsResolver:Zq,vars:j}),{onDateChange:L,onRootMouseLeave:U,onHoveredDateChange:H,getControlProps:z,_value:I,setValue:F}=Sue({type:R.type,level:"day",allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:s,onChange:o,onMouseLeave:l}),{resolvedClassNames:$,resolvedStyles:G}=Ao({classNames:u,styles:h,props:e}),Y=a.jsx(P2,{classNames:$,styles:G,__staticSelector:f||"DatePicker",onMouseLeave:U,size:C,...M,...x?{}:R,__stopPropagation:y,__setDateRef:N,__setLevelRef:B,minLevel:M.minLevel||"month",__onDayMouseEnter:(X,ee)=>{H(ee),m==null||m(X,ee)},__onDayClick:(X,ee)=>{L(ee),p==null||p(X,ee)},getDayProps:X=>{var ee;return{...z(X),...(ee=M.getDayProps)==null?void 0:ee.call(M,X)}},getMonthControlProps:X=>{var ee;return{selected:typeof I=="string"?a6(X,I):!1,...(ee=M.getMonthControlProps)==null?void 0:ee.call(M,X)}},getYearControlProps:X=>{var ee;return{selected:typeof I=="string"?Pe(X).isSame(I,"year"):!1,...(ee=M.getYearControlProps)==null?void 0:ee.call(M,X)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:_,...x?{}:{className:w,style:A}});if(!x)return Y;const W=X=>{var le,ve;const ee=Array.isArray(X)?X[0]:X;ee!==void 0&&((le=N.current)==null||le.call(N,ee),(ve=B.current)==null||ve.call(B,"month"),v?v(ee):F(X))},V=x.map((X,ee)=>a.jsx(Br,{...D("presetButton"),onClick:()=>W(X.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:X.label},ee));return a.jsxs(be,{...D("datePickerRoot"),size:C,...R,children:[a.jsx("div",{...D("presetsList"),children:V}),Y]})});Bb.classes=P2.classes;Bb.varsResolver=Zq;Bb.displayName="@mantine/dates/DatePicker";function _ue({minDate:t,value:e}){const n=t?Pe(t).format("HH:mm:ss"):null;return e&&t&&e===t?n??void 0:void 0}function Tue({maxDate:t,value:e}){const n=t?Pe(t).format("HH:mm:ss"):null;return e&&t&&e===t?n??void 0:void 0}var Jq={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const kue={dropdownType:"popover",size:"sm"},jv=Ie(t=>{const e=je("DateTimePicker",kue,t),{value:n,defaultValue:r,onChange:i,valueFormat:s,locale:o,classNames:l,styles:u,unstyled:h,timePickerProps:f,submitButtonProps:p,withSeconds:m,level:v,defaultLevel:y,size:x,variant:w,dropdownType:A,vars:S,minDate:C,maxDate:j,defaultDate:_,defaultTimeValue:O,presets:M,attributes:R,onDropdownClose:N,...B}=e,D=ft({name:"DateTimePicker",classes:Jq,props:e,classNames:l,styles:u,unstyled:h,attributes:R,vars:S}),{resolvedClassNames:L,resolvedStyles:U}=Ao({classNames:l,styles:u,props:e}),H=m||(f==null?void 0:f.withSeconds),z=s||(H?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),I=E.useRef(null),F=qn(I,f==null?void 0:f.hoursRef),{calendarProps:{allowSingleDateInRange:$,...G},others:Y}=Kq(B),W=sd(),[V,X]=o6({type:"default",value:n,defaultValue:r,onChange:i,withTime:!0}),ee=_||V,le=Be=>Be?Pe(Be).format(H?"HH:mm:ss":"HH:mm"):"",[ve,me]=E.useState(O||le(V)),[Qe,We]=E.useState(v||y||"month"),[qe,ae]=ob(!1),de=V?Pe(V).locale(W.getLocale(o)).format(z):"",Ae=Be=>{var Ee;(Ee=f==null?void 0:f.onChange)==null||Ee.call(f,Be),me(Be),Be&&X(D5(V,Be))},Te=Be=>{var Ee;Be&&X(D5(s_(C,j,Be),ve||O||"")),(Ee=I.current)==null||Ee.focus()},Ge=Be=>{Be.key==="Enter"&&(Be.preventDefault(),ae.close())};ll(()=>{qe||me(le(V))},[V,qe]),ll(()=>{qe&&We("month")},[qe]);const rt=A==="popover",Ue=()=>{const Be=s_(C,j,V);V&&V!==Be&&X(s_(C,j,V)),N==null||N()};return a.jsxs(L2,{formattedValue:de,dropdownOpened:B.disabled?!1:qe,dropdownHandlers:ae,classNames:L,styles:U,unstyled:h,onClear:()=>X(null),shouldClear:!!V,value:V,size:x,variant:w,dropdownType:A,...Y,type:"default",__staticSelector:"DateTimePicker",onDropdownClose:Ue,withTime:!0,attributes:R,children:[a.jsx(Bb,{...G,maxDate:j,minDate:C,size:x,variant:w,type:"default",value:V,defaultDate:ee||Bce({maxDate:j,minDate:C}),onChange:Te,locale:o,classNames:L,styles:U,unstyled:h,__staticSelector:"DateTimePicker",__stopPropagation:rt,level:v,defaultLevel:y,onLevelChange:Be=>{var Ee;We(Be),(Ee=G.onLevelChange)==null||Ee.call(G,Be)},presets:M,__onPresetSelect:Be=>{X(Be),Be&&me(le(Be))},attributes:R}),Qe==="month"&&a.jsxs("div",{...D("timeWrapper"),children:[a.jsx(_2,{value:ve,withSeconds:m,unstyled:h,min:_ue({minDate:C,value:V}),max:Tue({maxDate:j,value:V}),...f,...D("timeInput",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),onChange:Ae,onKeyDown:Ge,size:x,"data-mantine-stop-propagation":rt||void 0,hoursRef:F,attributes:R}),a.jsx(Er,{variant:"default",size:`input-${x||"sm"}`,...D("submitButton",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),unstyled:h,"data-mantine-stop-propagation":rt||void 0,children:a.jsx(Pw,{size:"30%"}),...p,onClick:Be=>{var Ee;(Ee=p==null?void 0:p.onClick)==null||Ee.call(p,Be),ae.close(),Ue()}})]})]})});jv.classes={...Jq,...L2.classes,...Bb.classes};jv.displayName="@mantine/dates/DateTimePicker";const Oue="settings.useLocalTime",Eue="settings.enableQueryHistory",Mue="settings.enableAutocomplete",Rue="settings.enableSyntaxHighlighting",Due="settings.enableLinter",Nue="settings.showAnnotations",Iue="settings.showQueryWarnings",Bue="settings.showQueryInfoNotices",Lue="settings.ruleGroupsPerPage",Pue="settings.alertGroupsPerPage",Fue=t=>{t.endsWith("/")&&(t=t.slice(0,-1));const n=["/query","/alerts","/targets","/rules","/service-discovery","/status","/tsdb-status","/flags","/config","/alertmanager-discovery","/agent"].find(r=>t.endsWith(r));return t.slice(0,t.length-(n||"").length)},zue={consolesLink:GLOBAL_CONSOLES_LINK==="CONSOLES_LINK_PLACEHOLDER"||GLOBAL_CONSOLES_LINK===""||GLOBAL_CONSOLES_LINK===null?null:GLOBAL_CONSOLES_LINK,agentMode:GLOBAL_AGENT_MODE==="true",ready:GLOBAL_READY==="true",lookbackDelta:GLOBAL_LOOKBACKDELTA==="LOOKBACKDELTA_PLACEHOLDER"||GLOBAL_LOOKBACKDELTA===null?"":GLOBAL_LOOKBACKDELTA,pathPrefix:Fue(window.location.pathname),useLocalTime:Ea(Oue,!1),enableQueryHistory:Ea(Eue,!1),enableAutocomplete:Ea(Mue,!0),enableSyntaxHighlighting:Ea(Rue,!0),enableLinter:Ea(Due,!0),showAnnotations:Ea(Nue,!1),showQueryWarnings:Ea(Iue,!0),showQueryInfoNotices:Ea(Bue,!0),ruleGroupsPerPage:Ea(Lue,10),alertGroupsPerPage:Ea(Pue,10)},e$=w2({name:"settings",initialState:zue,reducers:{updateSettings:(t,{payload:e})=>{Object.assign(t,e)}}}),{updateSettings:oo}=e$.actions,hi=()=>ac(t=>t.settings),Hue=e$.reducer,P5={width:"0.9rem",height:"0.9rem"},t$=({time:t,range:e,description:n,onChangeTime:r})=>{const i=()=>t!==null?t:Date.now().valueOf(),{useLocalTime:s}=hi(),o=s?Pe(t).format():Pe(t).subtract(Pe().utcOffset(),"minutes").format();return a.jsx(ut,{gap:5,children:a.jsx(jv,{title:"End time",w:230,valueFormat:"YYYY-MM-DD HH:mm:ss",withSeconds:!0,value:t!==null?o:void 0,onChange:l=>r(l?s?new Date(l).getTime():Pe.utc(l).valueOf():null),"aria-label":n,placeholder:n,onClick:()=>{t===null&&r(i())},leftSection:a.jsx(Er,{size:"lg",color:"gray",variant:"transparent",title:"Decrease time","aria-label":"Decrease time",onClick:()=>r(i()-e/2),children:a.jsx(oie,{style:P5})}),styles:{section:{width:"unset"}},rightSection:a.jsxs(a.Fragment,{children:[t&&a.jsx(ml,{variant:"transparent",color:"gray",onMouseDown:l=>l.preventDefault(),tabIndex:-1,onClick:()=>{r(null)},size:"xs"}),a.jsx(Er,{size:"lg",color:"gray",variant:"transparent",title:"Increase time","aria-label":"Increase time",onClick:()=>r(i()+e/2),children:a.jsx(tH,{style:P5})})]})})})},F5={width:"0.9rem",height:"0.9rem"},z5=[1,10,60,5*60,15*60,30*60,60*60,2*60*60,6*60*60,12*60*60,24*60*60,48*60*60,7*24*60*60,14*24*60*60,28*24*60*60,56*24*60*60,112*24*60*60,182*24*60*60,365*24*60*60,730*24*60*60].map(t=>t*1e3),que=({range:t,onChangeRange:e})=>{const[n,r]=E.useState(Hn(t));E.useEffect(()=>{r(Hn(t))},[t]);const i=l=>{const u=n6(l);u===null?r(Hn(t)):e(u)},s=()=>{for(const l of z5)if(t<l){r(Hn(l)),e(l);return}},o=()=>{for(const l of z5.slice().reverse())if(t>l){r(Hn(l)),e(l);return}};return a.jsx(ut,{gap:5,children:a.jsx(ic,{title:"Range",value:n,onChange:l=>r(l.currentTarget.value),onBlur:()=>i(n),onKeyDown:l=>l.key==="Enter"&&i(n),"aria-label":"Range",style:{width:`calc(44px + ${n.length+3}ch)`},leftSection:a.jsx(Er,{size:"lg",variant:"transparent",color:"gray","aria-label":"Decrease range",onClick:o,children:a.jsx(zie,{style:F5})}),rightSection:a.jsx(Er,{size:"lg",variant:"transparent",color:"gray","aria-label":"Increase range",onClick:s,children:a.jsx(aH,{style:F5})}),leftSectionPointerEvents:"all",rightSectionPointerEvents:"all"})})},n$=1024;let $ue=0,l_=class{constructor(e,n){this.from=e,this.to=n}};class on{constructor(e={}){this.id=$ue++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ga.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}on.closedBy=new on({deserialize:t=>t.split(" ")});on.openedBy=new on({deserialize:t=>t.split(" ")});on.group=new on({deserialize:t=>t.split(" ")});on.isolate=new on({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});on.contextHash=new on({perNode:!0});on.lookAhead=new on({perNode:!0});on.mounted=new on({perNode:!0});class Gg{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[on.mounted.id]}}const Que=Object.create(null);class ga{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):Que,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new ga(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(on.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(on.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}ga.none=new ga("",Object.create(null),0,8);class l6{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],u=o[0];u.combine&&u.id in i&&(l=u.combine(i[u.id],l)),i[u.id]=l}}n.push(i?new ga(r.name,i,r.id,r.flags):r)}return new l6(n)}}const _1=new WeakMap,H5=new WeakMap;var ti;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(ti||(ti={}));class ui{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Gg.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new DT(this.topNode,e)}cursorAt(e,n=0,r=0){let i=_1.get(this)||this.topNode,s=new DT(i);return s.moveTo(e,n),_1.set(this,s._tree),s}get topNode(){return new zh(this,0,0,null)}resolve(e,n=0){let r=Cv(_1.get(this)||this.topNode,e,n,!1);return _1.set(this,r),r}resolveInner(e,n=0){let r=Cv(H5.get(this)||this.topNode,e,n,!0);return H5.set(this,r),r}resolveStack(e,n=0){return Vue(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&ti.IncludeAnonymous)>0;for(let u=this.cursor(o|ti.IncludeAnonymous);;){let h=!1;if(u.from<=s&&u.to>=i&&(!l&&u.type.isAnonymous||n(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&r&&(l||!u.type.isAnonymous)&&r(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:h6(ga.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new ui(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new ui(ga.none,n,r,i)))}static build(e){return Yue(e)}}ui.empty=new ui(ga.none,[],[],0);class c6{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new c6(this.buffer,this.index)}}class Fh{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return ga.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,l=-1;for(let u=e;u!=n&&!(r$(s,i,o[u+1],o[u+2])&&(l=u,r>0));u=o[u+3]);return l}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let l=e,u=0;l<n;){s[u++]=i[l++],s[u++]=i[l++]-r;let h=s[u++]=i[l++]-r;s[u++]=i[l++]-e,o=Math.max(o,h)}return new Fh(s,o,this.set)}}function r$(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Cv(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof zh&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:ti.IgnoreOverlays;if(r)for(let o=t,l=o.parent;l;o=l,l=o.parent)o instanceof zh&&o.index<0&&((i=l.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=l);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class i${cursor(e=0){return new DT(this,e)}getChild(e,n=null,r=null){let i=q5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return q5(this,e,n,r)}resolve(e,n=0){return Cv(this,e,n,!1)}resolveInner(e,n=0){return Cv(this,e,n,!0)}matchContext(e){return RT(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}let zh=class Rx extends i${constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:l,positions:u}=o._tree,h=n>0?l.length:-1;e!=h;e+=n){let f=l[e],p=u[e]+o.from,m;if(!(!(s&ti.EnterBracketed&&f instanceof ui&&(m=Gg.get(f))&&!m.overlay&&m.bracketed&&r>=p&&r<=p+f.length)&&!r$(i,r,p,p+f.length))){if(f instanceof Fh){if(s&ti.ExcludeBuffers)continue;let v=f.findChild(0,f.buffer.length,n,r-p,i);if(v>-1)return new Ch(new Uue(o,f,e,p),null,v)}else if(s&ti.IncludeAnonymous||!f.type.isAnonymous||u6(f)){let v;if(!(s&ti.IgnoreMounts)&&(v=Gg.get(f))&&!v.overlay)return new Rx(v.tree,p,e,o);let y=new Rx(f,p,e,o);return s&ti.IncludeAnonymous||!y.type.isAnonymous?y:y.nextChild(n<0?f.children.length-1:0,n,r,i,s)}}}if(s&ti.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&ti.IgnoreOverlays)&&(i=Gg.get(this._tree))&&i.overlay){let s=e-this.from,o=r&ti.EnterBracketed&&i.bracketed;for(let{from:l,to:u}of i.overlay)if((n>0||o?l<=s:l<s)&&(n<0||o?u>=s:u>s))return new Rx(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function q5(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function RT(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Uue{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Ch extends i${get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new Ch(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&ti.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Ch(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ch(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Ch(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new ui(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function s$(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof zh&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Wue(i,n)}class Wue{constructor(e,n){this.heads=e,this.node=n}get next(){return s$(this.heads)}}function Vue(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof zh?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=Gg.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new zh(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(Cv(l,e,n,!1))}}return i?s$(i):r}class DT{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~ti.EnterBracketed,e instanceof zh)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof zh?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&ti.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ti.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ti.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&ti.IncludeAnonymous||l instanceof Fh||!l.type.isAnonymous||u6(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new Ch(this.buffer,n,this.stack[i]);return this.bufferNode=new Ch(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return RT(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return RT(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function u6(t){return t.children.some(e=>e instanceof Fh||!e.type.isAnonymous||u6(e))}function Yue(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=n$,reused:s=[],minRepeatType:o=r.types.length}=t,l=Array.isArray(n)?new c6(n,n.length):n,u=r.types,h=0,f=0;function p(_,O,M,R,N,B){let{id:D,start:L,end:U,size:H}=l,z=f,I=h;if(H<0)if(l.next(),H==-1){let W=s[D];M.push(W),R.push(L-_);return}else if(H==-3){h=D;return}else if(H==-4){f=D;return}else throw new RangeError(`Unrecognized record size: ${H}`);let F=u[D],$,G,Y=L-_;if(U-L<=i&&(G=w(l.pos-O,N))){let W=new Uint16Array(G.size-G.skip),V=l.pos-G.size,X=W.length;for(;l.pos>V;)X=A(G.start,W,X);$=new Fh(W,U-G.start,r),Y=G.start-_}else{let W=l.pos-H;l.next();let V=[],X=[],ee=D>=o?D:-1,le=0,ve=U;for(;l.pos>W;)ee>=0&&l.id==ee&&l.size>=0?(l.end<=ve-i&&(y(V,X,L,le,l.end,ve,ee,z,I),le=V.length,ve=l.end),l.next()):B>2500?m(L,W,V,X):p(L,W,V,X,ee,B+1);if(ee>=0&&le>0&&le<V.length&&y(V,X,L,le,L,ve,ee,z,I),V.reverse(),X.reverse(),ee>-1&&le>0){let me=v(F,I);$=h6(F,V,X,0,V.length,0,U-L,me,me)}else $=x(F,V,X,U-L,z-U,I)}M.push($),R.push(Y)}function m(_,O,M,R){let N=[],B=0,D=-1;for(;l.pos>O;){let{id:L,start:U,end:H,size:z}=l;if(z>4)l.next();else{if(D>-1&&U<D)break;D<0&&(D=H-i),N.push(L,U,H),B++,l.next()}}if(B){let L=new Uint16Array(B*4),U=N[N.length-2];for(let H=N.length-3,z=0;H>=0;H-=3)L[z++]=N[H],L[z++]=N[H+1]-U,L[z++]=N[H+2]-U,L[z++]=z;M.push(new Fh(L,N[2]-U,r)),R.push(U-_)}}function v(_,O){return(M,R,N)=>{let B=0,D=M.length-1,L,U;if(D>=0&&(L=M[D])instanceof ui){if(!D&&L.type==_&&L.length==N)return L;(U=L.prop(on.lookAhead))&&(B=R[D]+L.length+U)}return x(_,M,R,N,B,O)}}function y(_,O,M,R,N,B,D,L,U){let H=[],z=[];for(;_.length>R;)H.push(_.pop()),z.push(O.pop()+M-N);_.push(x(r.types[D],H,z,B-N,L-B,U)),O.push(N-M)}function x(_,O,M,R,N,B,D){if(B){let L=[on.contextHash,B];D=D?[L].concat(D):[L]}if(N>25){let L=[on.lookAhead,N];D=D?[L].concat(D):[L]}return new ui(_,O,M,R,D)}function w(_,O){let M=l.fork(),R=0,N=0,B=0,D=M.end-i,L={size:0,start:0,skip:0};e:for(let U=M.pos-_;M.pos>U;){let H=M.size;if(M.id==O&&H>=0){L.size=R,L.start=N,L.skip=B,B+=4,R+=4,M.next();continue}let z=M.pos-H;if(H<0||z<U||M.start<D)break;let I=M.id>=o?4:0,F=M.start;for(M.next();M.pos>z;){if(M.size<0)if(M.size==-3||M.size==-4)I+=4;else break e;else M.id>=o&&(I+=4);M.next()}N=F,R+=H,B+=I}return(O<0||R==_)&&(L.size=R,L.start=N,L.skip=B),L.size>4?L:void 0}function A(_,O,M){let{id:R,start:N,end:B,size:D}=l;if(l.next(),D>=0&&R<o){let L=M;if(D>4){let U=l.pos-(D-4);for(;l.pos>U;)M=A(_,O,M)}O[--M]=L,O[--M]=B-_,O[--M]=N-_,O[--M]=R}else D==-3?h=R:D==-4&&(f=R);return M}let S=[],C=[];for(;l.pos>0;)p(t.start||0,t.bufferStart||0,S,C,-1,0);let j=(e=t.length)!==null&&e!==void 0?e:S.length?C[0]+S[0].length:0;return new ui(u[t.topID],S.reverse(),C.reverse(),j)}const $5=new WeakMap;function Dx(t,e){if(!t.isAnonymous||e instanceof Fh||e.type!=t)return 1;let n=$5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof ui)){n=1;break}n+=Dx(t,r)}$5.set(e,n)}return n}function h6(t,e,n,r,i,s,o,l,u){let h=0;for(let y=r;y<i;y++)h+=Dx(t,e[y]);let f=Math.ceil(h*1.5/8),p=[],m=[];function v(y,x,w,A,S){for(let C=w;C<A;){let j=C,_=x[C],O=Dx(t,y[C]);for(C++;C<A;C++){let M=Dx(t,y[C]);if(O+M>=f)break;O+=M}if(C==j+1){if(O>f){let M=y[j];v(M.children,M.positions,0,M.children.length,x[j]+S);continue}p.push(y[j])}else{let M=x[C-1]+y[C-1].length-_;p.push(h6(t,y,x,j,C,_,M,null,u))}m.push(_+S-s)}}return v(e,n,r,i,0),(l||u)(p,m,o)}class gf{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new gf(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,u=0,h=0;;l++){let f=l<n.length?n[l]:null,p=f?f.fromA:1e9;if(p-u>=r)for(;o&&o.from<p;){let m=o;if(u>=m.from||p<=m.to||h){let v=Math.max(m.from,u)-h,y=Math.min(m.to,p)-h;m=v>=y?null:new gf(v,y,m.tree,m.offset+h,l>0,!!f)}if(m&&i.push(m),o.to>p)break;o=s<e.length?e[s++]:null}if(!f)break;u=f.toA,h=f.toA-f.toB}return i}}let a$=class{startParse(e,n,r){return typeof e=="string"&&(e=new Gue(e)),r=r?r.length?r.map(i=>new l_(i.from,i.to)):[new l_(0,0)]:[new l_(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}};class Gue{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new on({perNode:!0});var Q5={};class _A{constructor(e,n,r,i,s,o,l,u,h,f=0,p){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=u,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new _A(e,[],n,r,r,0,[],0,i?new U5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){i<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(r-1)*3-(e&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from;i<s.minRepeatTerm&&h==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let f=this.reducePos-h;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=u?this.stack[u-1]:0,m=this.bufferBase+this.buffer.length-p;if(i<s.minRepeatTerm||e&131072){let v=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,v,m+4,!0)}if(e&262144)this.state=this.stack[u];else{let v=this.stack[u-3];this.state=s.getGoto(v,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this.buffer.length;if(o>0&&this.buffer[o-4]==0&&this.buffer[o-1]>-1){if(n==r)return;if(this.buffer[o-2]>=n){this.buffer[o-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let u=o;u>0&&this.buffer[u-2]>r;u-=4)if(this.buffer[u-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(n&&e.buffer[n-4]==0&&(n-=4);n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new _A(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Xue(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((l,u)=>u&1&&l==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let u=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],u,!1)>=0)return l<<19|65536|u}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new U5(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class U5{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Xue{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class TA{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new TA(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new TA(this.stack,this.pos,this.index)}}function T1(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let u=o-32;if(u>=46&&(u-=46,l=!0),s+=u,l)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Nx{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const W5=new Nx;class Kue{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=W5,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=W5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Vp{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Zue(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Vp.prototype.contextual=Vp.prototype.fallback=Vp.prototype.extend=!1;Vp.prototype.fallback=Vp.prototype.extend=!1;function Zue(t,e,n,r,i,s){let o=0,l=1<<r,{dialect:u}=n.p.parser;e:for(;(l&t[o])!=0;){let h=t[o+1];for(let v=o+3;v<h;v+=2)if((t[v+1]&l)>0){let y=t[v];if(u.allows(y)&&(e.token.value==-1||e.token.value==y||Jue(y,e.token.value,i,s))){e.acceptToken(y);break}}let f=e.next,p=0,m=t[o+2];if(e.next<0&&m>p&&t[h+m*3-3]==65535){o=t[h+m*3-1];continue e}for(;p<m;){let v=p+m>>1,y=h+v+(v<<1),x=t[y],w=t[y+1]||65536;if(f<x)m=v;else if(f>=w)p=v+1;else{o=t[y+2],e.advance();continue e}}break}}function V5(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Jue(t,e,n,r){let i=V5(n,r,e);return i<0||V5(n,r,t)<i}const Ta=typeof process<"u"&&Q5&&/\bparse\b/.test(Q5.LOG);let c_=null;function Y5(t,e,n){let r=t.cursor(ti.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class ehe{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Y5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Y5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof ui){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let u=s.prop(on.lookAhead);if(!u||l+u<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class the{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Nx)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,u=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let f=s[h],p=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||p.start!=e.pos||p.mask!=o||p.context!=l)&&(this.updateCachedToken(p,f,e),p.mask=o,p.context=l),p.lookAhead>p.end+25&&(u=Math.max(p.lookAhead,u)),p.value!=0)){let m=n;if(p.extended>-1&&(n=this.addActions(e,p.extended,p.end,n)),n=this.addActions(e,p.value,p.end,n),!f.extend&&(r=p,n>m))break}}for(;this.actions.length>n;)this.actions.pop();return u&&e.setLookAhead(u),!r&&e.pos==this.stream.end&&(r=new Nx,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Nx,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let u=0;u<2;u++)for(let h=o.stateSlot(s,u?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=Wc(l,h+2);else{i==0&&l[h+1]==2&&(i=this.putAction(Wc(l,h+2),n,r,i));break}l[h]==n&&(i=this.putAction(Wc(l,h+1),n,r,i))}return i}}class nhe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Kue(n,i),this.tokens=new the(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[_A.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new ehe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let u=this.tokens.getMainToken(l);s.push(u.value,u.end)}}break}}if(!r.length){let o=i&&ihe(i);if(o)return Ta&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ta&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return Ta&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,u)=>u.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let u=o+1;u<r.length;u++){let h=r[u];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)r.splice(u--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=Ta?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(on.contextHash)||0)==f))return e.useNode(p,m),Ta&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof ui)||p.children.length==0||p.positions[0]>0)break;let v=p.children[0];if(v instanceof ui&&p.positions[0]==0)p=v;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ta&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let h=0;h<u.length;){let f=u[h++],p=u[h++],m=u[h++],v=h==u.length||!r,y=v?e:e.split(),x=this.tokens.mainToken;if(y.apply(f,p,x?x.start:y.pos,m),Ta&&console.log(o+this.stackID(y)+` (via ${(f&65536)==0?"shift":`reduce of ${s.getName(f&65535)}`} for ${s.getName(p)} @ ${i}${y==e?"":", split"})`),v)return!0;y.pos>i?n.push(y):r.push(y)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return G5(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],u=n[o<<1],h=n[(o<<1)+1],f=Ta?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Ta&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let p=l.split(),m=f;for(let v=0;v<10&&p.forceReduce()&&(Ta&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));v++)Ta&&(m=this.stackID(p)+" -> ");for(let v of l.recoverByInsert(u))Ta&&console.log(f+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>l.pos?(h==l.pos&&(h++,u=0),l.recoverByDelete(u,h),Ta&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(u)})`),G5(l,r)):(!i||i.score<p.score)&&(i=p)}return i}stackToTree(e){return e.close(),ui.build({buffer:TA.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(c_||(c_=new WeakMap)).get(e);return n||c_.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function G5(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class rhe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class kA extends a${constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function s(l,u,h){i[l].push([u,u.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let u=l[0];typeof u=="string"&&(u=on[u]);for(let h=1;h<l.length;){let f=l[h++];if(f>=0)s(f,u,l[h++]);else{let p=l[h+-f];for(let m=-f;m>0;m--)s(l[h++],u,p);h++}}}this.nodeSet=new l6(n.map((l,u)=>ga.define({name:u>=this.minRepeatTerm?void 0:l,id:u,props:i[u],top:r.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=n$;let o=T1(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(X5),this.states=T1(e.states,Uint32Array),this.data=T1(e.stateData),this.goto=T1(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Vp(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new nhe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],l=o&1,u=i[s++];if(l&&r)return u;for(let h=s+(o>>1);s<h;s++)if(i[s]==e)return u;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Wc(r,s+2)];else{if(r[s+1]==2)return Wc(r,s+2);break}if(o==n||o==0)return Wc(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Wc(this.data,s+2);else break;i=n(Wc(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Wc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(kA.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=X5(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new rhe(e,r,i)}static deserialize(e){return new kA(e)}}function Wc(t,e){return t[e]|t[e+1]<<16}function ihe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function X5(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let she=0;class ho{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=she++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof ho&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new ho(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new OA(e);return r=>r.modified.indexOf(n)>-1?r:OA.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let ahe=0;class OA{constructor(e){this.name=e,this.instances=[],this.id=ahe++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&ohe(n,l.modified));if(r)return r;let i=[],s=new ho(e.name,i,e,n);for(let l of n)l.instances.push(s);let o=lhe(n);for(let l of e.set)if(!l.modified.length)for(let u of o)i.push(OA.get(l,u));return s}}function ohe(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function lhe(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function o$(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,l=i;for(let p=0;;){if(l=="..."&&p>0&&p+3==i.length){o=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!m)throw new RangeError("Invalid path: "+i);if(s.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==i.length)break;let v=i[p++];if(p==i.length&&v=="!"){o=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);l=i.slice(p)}let u=s.length-1,h=s[u];if(!h)throw new RangeError("Invalid path: "+i);let f=new _v(r,o,u>0?s.slice(0,u):null);e[h]=f.sort(e[h])}}return l$.add(e)}const l$=new on({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new _v(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class _v{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}_v.empty=new _v([],2,null);function c$(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let u of l.set){let h=n[u.id];if(h){o=o?o+" "+h:h;break}}return o},scope:r}}function che(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function uhe(t,e,n,r=0,i=t.length){let s=new hhe(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class hhe{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:l,to:u}=e;if(l>=r||u<=n)return;o.isTop&&(s=this.highlighters.filter(v=>!v.scope||v.scope(o)));let h=i,f=dhe(e)||_v.empty,p=che(s,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(n,l),h),f.opaque)return;let m=e.tree&&e.tree.prop(on.mounted);if(m&&m.overlay){let v=e.node.enter(m.overlay[0].from+l,1),y=this.highlighters.filter(w=>!w.scope||w.scope(m.tree.type)),x=e.firstChild();for(let w=0,A=l;;w++){let S=w<m.overlay.length?m.overlay[w]:null,C=S?S.from+l:u,j=Math.max(n,A),_=Math.min(r,C);if(j<_&&x)for(;e.from<_&&(this.highlightRange(e,j,_,i,s),this.startSpan(Math.min(_,e.to),h),!(e.to>=C||!e.nextSibling())););if(!S||C>r)break;A=S.to+l,A>n&&(this.highlightRange(v.cursor(),Math.max(n,S.from+l),Math.min(r,A),"",y),this.startSpan(Math.min(r,A),h))}x&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function dhe(t){let e=t.type.prop(l$);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ct=ho.define,k1=ct(),lh=ct(),K5=ct(lh),Z5=ct(lh),ch=ct(),O1=ct(ch),u_=ct(ch),Dl=ct(),Rd=ct(Dl),kl=ct(),Ol=ct(),NT=ct(),pg=ct(NT),E1=ct(),pe={comment:k1,lineComment:ct(k1),blockComment:ct(k1),docComment:ct(k1),name:lh,variableName:ct(lh),typeName:K5,tagName:ct(K5),propertyName:Z5,attributeName:ct(Z5),className:ct(lh),labelName:ct(lh),namespace:ct(lh),macroName:ct(lh),literal:ch,string:O1,docString:ct(O1),character:ct(O1),attributeValue:ct(O1),number:u_,integer:ct(u_),float:ct(u_),bool:ct(ch),regexp:ct(ch),escape:ct(ch),color:ct(ch),url:ct(ch),keyword:kl,self:ct(kl),null:ct(kl),atom:ct(kl),unit:ct(kl),modifier:ct(kl),operatorKeyword:ct(kl),controlKeyword:ct(kl),definitionKeyword:ct(kl),moduleKeyword:ct(kl),operator:Ol,derefOperator:ct(Ol),arithmeticOperator:ct(Ol),logicOperator:ct(Ol),bitwiseOperator:ct(Ol),compareOperator:ct(Ol),updateOperator:ct(Ol),definitionOperator:ct(Ol),typeOperator:ct(Ol),controlOperator:ct(Ol),punctuation:NT,separator:ct(NT),bracket:pg,angleBracket:ct(pg),squareBracket:ct(pg),paren:ct(pg),brace:ct(pg),content:Dl,heading:Rd,heading1:ct(Rd),heading2:ct(Rd),heading3:ct(Rd),heading4:ct(Rd),heading5:ct(Rd),heading6:ct(Rd),contentSeparator:ct(Dl),list:ct(Dl),quote:ct(Dl),emphasis:ct(Dl),strong:ct(Dl),link:ct(Dl),monospace:ct(Dl),strikethrough:ct(Dl),inserted:ct(),deleted:ct(),changed:ct(),invalid:ct(),meta:E1,documentMeta:ct(E1),annotation:ct(E1),processingInstruction:ct(E1),definition:ho.defineModifier("definition"),constant:ho.defineModifier("constant"),function:ho.defineModifier("function"),standard:ho.defineModifier("standard"),local:ho.defineModifier("local"),special:ho.defineModifier("special")};for(let t in pe){let e=pe[t];e instanceof ho&&(e.name=t)}c$([{tag:pe.link,class:"tok-link"},{tag:pe.heading,class:"tok-heading"},{tag:pe.emphasis,class:"tok-emphasis"},{tag:pe.strong,class:"tok-strong"},{tag:pe.keyword,class:"tok-keyword"},{tag:pe.atom,class:"tok-atom"},{tag:pe.bool,class:"tok-bool"},{tag:pe.url,class:"tok-url"},{tag:pe.labelName,class:"tok-labelName"},{tag:pe.inserted,class:"tok-inserted"},{tag:pe.deleted,class:"tok-deleted"},{tag:pe.literal,class:"tok-literal"},{tag:pe.string,class:"tok-string"},{tag:pe.number,class:"tok-number"},{tag:[pe.regexp,pe.escape,pe.special(pe.string)],class:"tok-string2"},{tag:pe.variableName,class:"tok-variableName"},{tag:pe.local(pe.variableName),class:"tok-variableName tok-local"},{tag:pe.definition(pe.variableName),class:"tok-variableName tok-definition"},{tag:pe.special(pe.variableName),class:"tok-variableName2"},{tag:pe.definition(pe.propertyName),class:"tok-propertyName tok-definition"},{tag:pe.typeName,class:"tok-typeName"},{tag:pe.namespace,class:"tok-namespace"},{tag:pe.className,class:"tok-className"},{tag:pe.macroName,class:"tok-macroName"},{tag:pe.propertyName,class:"tok-propertyName"},{tag:pe.operator,class:"tok-operator"},{tag:pe.comment,class:"tok-comment"},{tag:pe.meta,class:"tok-meta"},{tag:pe.invalid,class:"tok-invalid"},{tag:pe.punctuation,class:"tok-punctuation"}]);const fhe=181,phe=182,mhe=1,ghe=2,vhe=3,bhe=4,yhe=5,xhe=6,Ahe=7,whe=8,She=9,jhe=10,Che=11,_he=12,The=13,khe=14,Ohe=15,Ehe=16,Mhe=17,Rhe=18,Dhe=19,Nhe=20,Ihe=21,Bhe=22,Lhe=23,Phe=24,Fhe=25,zhe=26,J5=27,eN=28,tN=29,nN=30,Hhe=31,qhe=32,$he=33,Qhe=34,Uhe=35,Whe={inf:fhe,nan:phe,bool:mhe,ignoring:ghe,on:vhe,group_left:bhe,group_right:yhe,offset:xhe},rN=(t,e)=>Whe[t.toLowerCase()]||-1,Vhe={avg:whe,atan2:Ahe,bottomk:She,count:jhe,count_values:Che,group:_he,max:The,min:khe,quantile:Ohe,limitk:Ehe,limit_ratio:Mhe,stddev:Rhe,stdvar:Dhe,sum:Nhe,topk:Ihe,by:Bhe,without:Lhe,and:Phe,or:Fhe,unless:zhe,smoothed:Hhe,anchored:qhe,fill:$he,fill_left:Qhe,fill_right:Uhe},iN=(t,e)=>{if(t==="start"&&e.canShift(J5))return J5;if(t==="end"&&e.canShift(eN))return eN;if(t.toLowerCase()==="start"&&e.canShift(tN))return tN;if(t.toLowerCase()==="end"&&e.canShift(nN))return nN;const n=Vhe[t.toLowerCase()];return n!==void 0&&e.canShift(n)?n:-1},Yhe=o$({LineComment:pe.comment,LabelName:pe.labelName,StringLiteral:pe.string,NumberDurationLiteral:pe.number,NumberDurationLiteralInDurationContext:pe.number,Identifier:pe.variableName,"Abs Absent AbsentOverTime Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv EndFn Exp Floor HistogramAvg HistogramCount HistogramFraction HistogramQuantile HistogramSum DoubleExponentialSmoothing Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Range Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Sqrt StartFn Step StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":pe.function(pe.variableName),"Avg Bottomk Count Count_values Group LimitK LimitRatio Max Min Quantile Stddev Stdvar Sum Topk":pe.operatorKeyword,"AtModifierPreprocessors By Without Bool On Ignoring GroupLeft GroupRight Offset Smoothed Anchored":pe.modifier,"And Unless Or":pe.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":pe.operator,UnaryOp:pe.arithmeticOperator,"( )":pe.paren,"[ ]":pe.squareBracket,"{ }":pe.brace,"⚠":pe.invalid}),Ghe={__proto__:null,absent_over_time:387,absent:389,abs:391,acos:393,acosh:395,asin:397,asinh:399,atan:401,atanh:403,avg_over_time:405,ceil:407,changes:409,clamp:411,clamp_max:413,clamp_min:415,cos:417,cosh:419,count_over_time:421,days_in_month:423,day_of_month:425,day_of_week:427,day_of_year:429,deg:431,delta:433,deriv:435,exp:437,first_over_time:439,floor:441,histogram_count:443,histogram_fraction:445,histogram_quantile:447,histogram_quantiles:449,histogram_stddev:451,histogram_stdvar:453,histogram_sum:455,histogram_avg:457,double_exponential_smoothing:459,hour:461,idelta:463,increase:465,info:467,irate:469,label_replace:471,label_join:473,last_over_time:475,ln:477,log10:479,log2:481,mad_over_time:483,max_over_time:485,min_over_time:487,ts_of_first_over_time:489,ts_of_max_over_time:491,ts_of_min_over_time:493,ts_of_last_over_time:495,minute:497,month:499,pi:501,predict_linear:503,present_over_time:505,quantile_over_time:507,rad:509,rate:511,resets:513,round:515,scalar:517,sgn:519,sin:521,sinh:523,sort:525,sort_desc:527,sort_by_label:529,sort_by_label_desc:531,range:533,step:535,sqrt:537,stddev_over_time:539,stdvar_over_time:541,sum_over_time:543,tan:545,tanh:547,timestamp:549,time:551,vector:553,year:555},Xhe=kA.deserialize({version:14,states:"=WOYQPOOO(dQPOOOOQO'#DT'#DTO(iQPO'#DSOOQO'#Db'#DbO(tQPO'#FvQ0XQQOOOOQO'#Ds'#DsO(oQPO'#DrOYQPO'#FsOYQPO'#FuO1rQSO'#FxO1}QQO'#FwOOQO'#Fw'#FwOOQO'#G]'#G]OOQO'#Dt'#DtOOQO'#Dv'#DvOOQO'#Dw'#DwOOQO'#Dx'#DxOOQO'#Dy'#DyOOQO'#Dz'#DzOOQO'#D{'#D{OOQO'#D|'#D|OOQO'#D}'#D}OOQO'#EO'#EOOOQO'#EP'#EPOOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETOOQO'#EU'#EUOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EY'#EYOOQO'#EZ'#EZOOQO'#E['#E[OOQO'#E]'#E]OOQO'#E^'#E^OOQO'#E_'#E_OOQO'#E`'#E`OOQO'#Ea'#EaOOQO'#Eb'#EbOOQO'#Ec'#EcOOQO'#Ed'#EdOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsOOQO'#Et'#EtOOQO'#Eu'#EuOOQO'#Ev'#EvOOQO'#Ew'#EwOOQO'#Ex'#ExOOQO'#Ey'#EyOOQO'#Ez'#EzOOQO'#E{'#E{OOQO'#E|'#E|OOQO'#E}'#E}OOQO'#FO'#FOOOQO'#FP'#FPOOQO'#FQ'#FQOOQO'#FR'#FROOQO'#FS'#FSOOQO'#FT'#FTOOQO'#FU'#FUOOQO'#FV'#FVOOQO'#FW'#FWOOQO'#FX'#FXOOQO'#FY'#FYOOQO'#FZ'#FZOOQO'#F['#F[OOQO'#F]'#F]OOQO'#F^'#F^OOQO'#F_'#F_OOQO'#F`'#F`OOQO'#Fa'#FaOOQO'#Fb'#FbOOQO'#Fc'#FcOOQO'#Fd'#FdOOQO'#Fe'#FeOOQO'#Ff'#FfOOQO'#Fg'#FgOOQO'#Fh'#FhOOQO'#Fi'#FiOOQO'#Fj'#FjOOQO'#Fk'#FkOOQO'#Fl'#FlOOQO'#Fm'#FmQOQPOOO3tQPO'#DUO3yQPO'#DZO(oQPO,59nO4QQQO,59nOOQO,59|,59|O5zQPO,59vO5zQPO,59vO5zQPO,59vO5zQPO,59vO5zQPO,59vO=hQPO,5<YO=hQPO,5<[OOQO,5<],5<]OOQO,5<^,5<^O>[QPO,5<kOOQO,5:^,5:^O>fQQO,5<_O>mQQO,5<aOOQO'#DX'#DXO@aQPO'#FyO@oQPO,5<dOOQO,5<d,5<dO@{QPO,5<dOOQO,5<c,5<cOATQSO'#DVOOQO,59p,59pOOQO,59u,59uOA`QQO,59uOOQO1G/Y1G/YOOQO'#D^'#D^O3tQPO'#D_OAjQPO'#DaOAoQPO'#DcOAtQPO'#DdOOQO'#D`'#D`OITQPO'#D`OI[QPO'#D`OOQO'#Ga'#GaOIcQPO'#GaO!!vQPO'#GaOYQPO1G/bOYQPO1G/bOYQPO1G/bOYQPO1G/bOYQPO1G/bOOQO'#Fo'#FoO!#QQPO'#FoO!#]QSO1G1tOOQO1G1v1G1vO!#eQPO'#DbOOQO'#GR'#GROOQO1G2V1G2VO!#pQPO1G2VOOQO1G1y1G1yOOQO'#Fz'#FzO!#uQPO,5<eO!#zQPO,5<jO!$PQSO1G2OO!$[QPO1G2OOOQO1G2O1G2OOOQO,59q,59qO!$dQPO,59qOYQPO'#GUO!$lQPO1G/aOOQO1G/a1G/aO!$tQPO,59yO=yQPO,59{O=yQPO,59}O=yQPO,5:OOOQO,59z,59zOOQO,5<{,5<{O!,_QPO,5<{O!5YQQO7+$|O!5jQQO7+$|O!7UQQO7+$|O!7rQQO7+$|O!9gQQO7+$|OOQO,5<Z,5<ZOOQO7+'`7+'`O!:WQPO7+'fO!:_QPO7+'qOOQO1G2P1G2POOQO1G2U1G2UO!:dQPO,5<qOOQO,5<q,5<qOOQO7+'j7+'jO!:xQSO7+'jOOQO-E:T-E:TO!;TQSO1G/]O!;`QPO1G/]OOQO1G/]1G/]O!;hQQO,5<pOOQO-E:S-E:SOOQO7+${7+${O!;rQPO1G/eO!CVQPO1G/gO!C[QPO1G/iO!CaQPO1G/jOOQO1G2g1G2gOOQO<<KQ<<KQO!CfQPO<<KQOOQO<<K]<<K]OOQO<<KU<<KUP!CkQSO'#GVOOQO,5<o,5<oOOQO7+$w7+$wO!CsQSO7+$wOOQO-E:R-E:ROOQO7+%P7+%POOQO7+%R7+%ROOQO7+%T7+%TOOQO7+%U7+%UOOQOAN@lAN@lOOQO<<Hc<<HcP!DOQSO'#GT",stateData:"!DW~O%OOStOS~OWQOXQOYQOZQO[QO]QO^QO_QO`QOaQObQOcQOdQOeQOkVOlVO|^O!i[O${SO$|SO%QXO%UTO%VTO%WSO%X_O%Y`O%ZaO%[bO%]cO%^dO%_eO%`fO%agO%bhO%ciO%djO%ekO%flO%gmO%hnO%ioO%jpO%kqO%lrO%msO%ntO%ouO%pvO%qwO%rxO%syO%tzO%u{O%v|O%w}O%x!OO%y!PO%z!QO%{!RO%|!SO%}!TO&O!UO&P!VO&Q!WO&R!XO&S!YO&T!ZO&U![O&V!]O&W!^O&X!_O&Y!`O&Z!aO&[!bO&]!cO&^!dO&_!eO&`!fO&a!gO&b!hO&c!iO&d!jO&e!kO&f!lO&g!mO&h!nO&i!oO&j!pO&k!qO&l!rO&m!sO&n!tO&o!uO&p!vO&q!wO&r!xO&s!yO&t!zO&u!{O&v!|O&w!}O&x#OO&y#PO&z#QO&{#RO&|#SO&}#TO'O#UO'P#VO'TZO~O!i#WO~Of#XOg#XO%Q#YO~O${#]O$|#]O%W#]OW$jXX$jXY$jXZ$jX[$jX]$jX^$jX_$jX`$jXa$jXb$jXc$jXd$jXe$jXk$jXl$jX|$jX!i$jX${$jX$|$jX%Q$jX%U$jX%V$jX%W$jX%X$jX%Y$jX%Z$jX%[$jX%]$jX%^$jX%_$jX%`$jX%a$jX%b$jX%c$jX%d$jX%e$jX%f$jX%g$jX%h$jX%i$jX%j$jX%k$jX%l$jX%m$jX%n$jX%o$jX%p$jX%q$jX%r$jX%s$jX%t$jX%u$jX%v$jX%w$jX%x$jX%y$jX%z$jX%{$jX%|$jX%}$jX&O$jX&P$jX&Q$jX&R$jX&S$jX&T$jX&U$jX&V$jX&W$jX&X$jX&Y$jX&Z$jX&[$jX&]$jX&^$jX&_$jX&`$jX&a$jX&b$jX&c$jX&d$jX&e$jX&f$jX&g$jX&h$jX&i$jX&j$jX&k$jX&l$jX&m$jX&n$jX&o$jX&p$jX&q$jX&r$jX&s$jX&t$jX&u$jX&v$jX&w$jX&x$jX&y$jX&z$jX&{$jX&|$jX&}$jX'O$jX'P$jX'T$jX~OU#dOV#^Oh#aOi#bOj#aOo#fOp#eO!P#^O!X#^O!Y#^O!Z#^O![#_O!]#_O!^#`O!_#`O!`#`O!a#`O!b#`O!c#`O!d#`O!e#`O$t#gO'Q#cO~Oz#lO|#kO'U#nO~O'TZOU$kXV$kXh$kXi$kXj$kXo$kXp$kX!P$kX!X$kX!Y$kX!Z$kX![$kX!]$kX!^$kX!_$kX!`$kX!a$kX!b$kX!c$kX!d$kX!e$kX$t$kX$z$kX'Q$kX%S$kX%R$kX~O%Q#qO~O%S#sO~PYOf#XOg#XOUvaVvahvaivajvaovapva!Pva!Xva!Yva!Zva![va!]va!^va!_va!`va!ava!bva!cva!dva!eva$tva$zva'Qva%Sva%Rva~OP#vOQ#wOR#wOq#xOr#yOs#zOW%TPX%TPY%TPZ%TP[%TP]%TP^%TP_%TP`%TPa%TPb%TPc%TPd%TPe%TPk%TPl%TP|%TP!i%TP${%TP$|%TP%Q%TP%U%TP%V%TP%W%TP%X%TP%Y%TP%Z%TP%[%TP%]%TP%^%TP%_%TP%`%TP%a%TP%b%TP%c%TP%d%TP%e%TP%f%TP%g%TP%h%TP%i%TP%j%TP%k%TP%l%TP%m%TP%n%TP%o%TP%p%TP%q%TP%r%TP%s%TP%t%TP%u%TP%v%TP%w%TP%x%TP%y%TP%z%TP%{%TP%|%TP%}%TP&O%TP&P%TP&Q%TP&R%TP&S%TP&T%TP&U%TP&V%TP&W%TP&X%TP&Y%TP&Z%TP&[%TP&]%TP&^%TP&_%TP&`%TP&a%TP&b%TP&c%TP&d%TP&e%TP&f%TP&g%TP&h%TP&i%TP&j%TP&k%TP&l%TP&m%TP&n%TP&o%TP&p%TP&q%TP&r%TP&s%TP&t%TP&u%TP&v%TP&w%TP&x%TP&y%TP&z%TP&{%TP&|%TP&}%TP'O%TP'P%TP'T%TP~O${$WO$|$WO%U$XO%V$XO%W$WO~O${SO$|SO%U$[O%V$[O%WSO~Om$]On$]O~P=yO%S$`O~P0XO!P#^OU$iaV$iah$iai$iaj$iao$iap$ia!X$ia!Y$ia!Z$ia![$ia!]$ia!^$ia!_$ia!`$ia!a$ia!b$ia!c$ia!d$ia!e$ia$t$ia$z$ia'Q$ia%S$ia%R$ia~O!e$aO$o$aO$p$aO$q$aO~O!e$aO$o$aO$p$aO$q$aO%R$dO'U$fO~Oz$hO|#kO%S$gO~O%R$iO%S$kO~P0XO%Q$mO~O%Q$nO~O%Q$oO~OW!SXX!SXY!SXZ!SX[!SX]!SX^!SX_!SX`!SXa!SXb!SXc!SXd!SXe!SXk!SXl!SX|!SX!i!SX${!SX$|!SX%Q!SX%U!SX%V!SX%W!SX%X!SX%Y!SX%Z!SX%[!SX%]!SX%^!SX%_!SX%`!SX%a!SX%b!SX%c!SX%d!SX%e!SX%f!SX%g!SX%h!SX%i!SX%j!SX%k!SX%l!SX%m!SX%n!SX%o!SX%p!SX%q!SX%r!SX%s!SX%t!SX%u!SX%v!SX%w!SX%x!SX%y!SX%z!SX%{!SX%|!SX%}!SX&O!SX&P!SX&Q!SX&R!SX&S!SX&T!SX&U!SX&V!SX&W!SX&X!SX&Y!SX&Z!SX&[!SX&]!SX&^!SX&_!SX&`!SX&a!SX&b!SX&c!SX&d!SX&e!SX&f!SX&g!SX&h!SX&i!SX&j!SX&k!SX&l!SX&m!SX&n!SX&o!SX&p!SX&q!SX&r!SX&s!SX&t!SX&u!SX&v!SX&w!SX&x!SX&y!SX&z!SX&{!SX&|!SX&}!SX'O!SX'P!SX'T!SX~Os#zO~PAyOr#yO~PAyOq#xOr#yOs#zOW%TXX%TXY%TXZ%TX[%TX]%TX^%TX_%TX`%TXa%TXb%TXc%TXd%TXe%TXk%TXl%TX|%TX!i%TX${%TX$|%TX%Q%TX%U%TX%V%TX%W%TX%X%TX%Y%TX%Z%TX%[%TX%]%TX%^%TX%_%TX%`%TX%a%TX%b%TX%c%TX%d%TX%e%TX%f%TX%g%TX%h%TX%i%TX%j%TX%k%TX%l%TX%m%TX%n%TX%o%TX%p%TX%q%TX%r%TX%s%TX%t%TX%u%TX%v%TX%w%TX%x%TX%y%TX%z%TX%{%TX%|%TX%}%TX&O%TX&P%TX&Q%TX&R%TX&S%TX&T%TX&U%TX&V%TX&W%TX&X%TX&Y%TX&Z%TX&[%TX&]%TX&^%TX&_%TX&`%TX&a%TX&b%TX&c%TX&d%TX&e%TX&f%TX&g%TX&h%TX&i%TX&j%TX&k%TX&l%TX&m%TX&n%TX&o%TX&p%TX&q%TX&r%TX&s%TX&t%TX&u%TX&v%TX&w%TX&x%TX&y%TX&z%TX&{%TX&|%TX&}%TX'O%TX'P%TX'T%TX~OQ#wOR#wO~PIcO${$xO$|$xO%W$xO~O'R$yO'S$zO~O${#]O$|#]O%W#]O~O%Q${O~O|$|O~O|$}O~Oz#lO|#kO'U%QO~O%R%RO'U%QO~O%R%TO%S%VO~O%R$iO%S%YO~OS%ZOT%ZOW!RaX!RaY!RaZ!Ra[!Ra]!Ra^!Ra_!Ra`!Raa!Rab!Rac!Rad!Rae!Rak!Ral!Raq!Rar!Ras!Ra|!Ra!i!Ra${!Ra$|!Ra%Q!Ra%U!Ra%V!Ra%W!Ra%X!Ra%Y!Ra%Z!Ra%[!Ra%]!Ra%^!Ra%_!Ra%`!Ra%a!Ra%b!Ra%c!Ra%d!Ra%e!Ra%f!Ra%g!Ra%h!Ra%i!Ra%j!Ra%k!Ra%l!Ra%m!Ra%n!Ra%o!Ra%p!Ra%q!Ra%r!Ra%s!Ra%t!Ra%u!Ra%v!Ra%w!Ra%x!Ra%y!Ra%z!Ra%{!Ra%|!Ra%}!Ra&O!Ra&P!Ra&Q!Ra&R!Ra&S!Ra&T!Ra&U!Ra&V!Ra&W!Ra&X!Ra&Y!Ra&Z!Ra&[!Ra&]!Ra&^!Ra&_!Ra&`!Ra&a!Ra&b!Ra&c!Ra&d!Ra&e!Ra&f!Ra&g!Ra&h!Ra&i!Ra&j!Ra&k!Ra&l!Ra&m!Ra&n!Ra&o!Ra&p!Ra&q!Ra&r!Ra&s!Ra&t!Ra&u!Ra&v!Ra&w!Ra&x!Ra&y!Ra&z!Ra&{!Ra&|!Ra&}!Ra'O!Ra'P!Ra'T!Ra~Oq#xOr#yOs#zOW%TaX%TaY%TaZ%Ta[%Ta]%Ta^%Ta_%Ta`%Taa%Tab%Tac%Tad%Tae%Tak%Tal%Ta|%Ta!i%Ta${%Ta$|%Ta%Q%Ta%U%Ta%V%Ta%W%Ta%X%Ta%Y%Ta%Z%Ta%[%Ta%]%Ta%^%Ta%_%Ta%`%Ta%a%Ta%b%Ta%c%Ta%d%Ta%e%Ta%f%Ta%g%Ta%h%Ta%i%Ta%j%Ta%k%Ta%l%Ta%m%Ta%n%Ta%o%Ta%p%Ta%q%Ta%r%Ta%s%Ta%t%Ta%u%Ta%v%Ta%w%Ta%x%Ta%y%Ta%z%Ta%{%Ta%|%Ta%}%Ta&O%Ta&P%Ta&Q%Ta&R%Ta&S%Ta&T%Ta&U%Ta&V%Ta&W%Ta&X%Ta&Y%Ta&Z%Ta&[%Ta&]%Ta&^%Ta&_%Ta&`%Ta&a%Ta&b%Ta&c%Ta&d%Ta&e%Ta&f%Ta&g%Ta&h%Ta&i%Ta&j%Ta&k%Ta&l%Ta&m%Ta&n%Ta&o%Ta&p%Ta&q%Ta&r%Ta&s%Ta&t%Ta&u%Ta&v%Ta&w%Ta&x%Ta&y%Ta&z%Ta&{%Ta&|%Ta&}%Ta'O%Ta'P%Ta'T%Ta~O!P#^OU!Oqh!Oqi!Oqj!Oqo!Oqp!Oq![!Oq!]!Oq!^!Oq!_!Oq!`!Oq!a!Oq!b!Oq!c!Oq!d!Oq!e!Oq$t!Oq$z!Oq'Q!Oq%S!Oq%R!Oq~OV!Oq!X!Oq!Y!Oq!Z!Oq~P!3rOV#^O!X#^O!Y#^O!Z#^O~P!3rOV#^O!P#^O!X#^O!Y#^O!Z#^O![#_O!]#_OU!Oqh!Oqi!Oqj!Oqo!Oqp!Oq$t!Oq$z!Oq'Q!Oq%S!Oq%R!Oq~O!^!Oq!_!Oq!`!Oq!a!Oq!b!Oq!c!Oq!d!Oq!e!Oq~P!5zO!^#`O!_#`O!`#`O!a#`O!b#`O!c#`O!d#`O!e#`O~P!5zOV#^Oh#aOj#aO!P#^O!X#^O!Y#^O!Z#^O![#_O!]#_O!^#`O!_#`O!`#`O!a#`O!b#`O!c#`O!d#`O!e#`O~OU!Oqi!Oqo!Oqp!Oq$t!Oq$z!Oq'Q!Oq%S!Oq%R!Oq~P!8`O'R%`O~P=hO%S%bO~O!e$aO$o$aO$p$aO$q$aO%R$ya'U$ya~Oz#lO|#kO'U%cO~Oz%eO|#kO%S%fO~O%R%gO%S%fO~O%R$xa%S$xa~P0XO%Q#qOW!RiX!RiY!RiZ!Ri[!Ri]!Ri^!Ri_!Ri`!Ria!Rib!Ric!Rid!Rie!Rik!Ril!Riq!Rir!Ris!Ri|!Ri!i!Ri${!Ri$|!Ri%U!Ri%V!Ri%W!Ri%X!Ri%Y!Ri%Z!Ri%[!Ri%]!Ri%^!Ri%_!Ri%`!Ri%a!Ri%b!Ri%c!Ri%d!Ri%e!Ri%f!Ri%g!Ri%h!Ri%i!Ri%j!Ri%k!Ri%l!Ri%m!Ri%n!Ri%o!Ri%p!Ri%q!Ri%r!Ri%s!Ri%t!Ri%u!Ri%v!Ri%w!Ri%x!Ri%y!Ri%z!Ri%{!Ri%|!Ri%}!Ri&O!Ri&P!Ri&Q!Ri&R!Ri&S!Ri&T!Ri&U!Ri&V!Ri&W!Ri&X!Ri&Y!Ri&Z!Ri&[!Ri&]!Ri&^!Ri&_!Ri&`!Ri&a!Ri&b!Ri&c!Ri&d!Ri&e!Ri&f!Ri&g!Ri&h!Ri&i!Ri&j!Ri&k!Ri&l!Ri&m!Ri&n!Ri&o!Ri&p!Ri&q!Ri&r!Ri&s!Ri&t!Ri&u!Ri&v!Ri&w!Ri&x!Ri&y!Ri&z!Ri&{!Ri&|!Ri&}!Ri'O!Ri'P!Ri'T!Ri~O%S%jO~O%S%kO~O%S%lO~O'R%mO~Oz#lO|#kO~Oz%eO|#kO%S%nO~Oz%eO|#kO~O",goto:"+l%UPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP%V%c%o%uP&OP&`%VP&i&p&z'Y'd'|(ZPPPPPPPPPPPPP%V(h(tP(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t%V)Q%V%V%V%V%V%V)Z%V)g)v*OPPP)v%VP*VP*Y*`*fPPPPP*mPPP+]e^OXY#Y$R$S$T$U$V$ieROXY#Y$R$S$T$U$V$iQ#ZRR#u#[Q#r#XQ$l#wR%i%ZQ#mZQ$h#qU%O$d%R%dV%e%T%g%oQ#[RQ#hWR#u#ZZ$Q#^#_#`#a#bY$P#^#_#`#a#bR$r$QY$O#^#_#`#a#bS$q$P$QR%_$ra#{#^#_#`#a#b$P$Q$rd^OXY#Y$R$S$T$U$V$iQ$^#gQ%[$mQ%]$nR%^$o`#|#^#_#`#a#b$P$Q$rR$p#}`#}#^#_#`#a#b$P$Q$rR$p#|eWOXY#Y$R$S$T$U$V$ieVOXY#Y$R$S$T$U$V$iQ$Y#cQ$Z#dR%a$zeYOXY#Y$R$S$T$U$V$id]OXY#Y$R$S$T$U$V$iR#p[Q#oZV%P$d%R%dQ$b#lT$c#m%OR$_#gQ%U$hR%h%UQ$j#tR%X$jS$e#m#oR%S$eQUOQ#iXQ#jYQ#t#YQ$s$RQ$t$SQ$u$TQ$v$UQ$w$VR%W$iQ$R#^Q$S#_Q$T#`Q$U#aR$V#b",nodeNames:"⚠ Bool Ignoring On GroupLeft GroupRight Offset Atan2 Avg Bottomk Count CountValues Group Max Min Quantile LimitK LimitRatio Stddev Stdvar Sum Topk By Without And Or Unless StartFn EndFn AtStart AtEnd Smoothed Anchored Fill FillLeft FillRight LineComment PromQL AggregateExpr AggregateOp AggregateModifier GroupingLabels LabelName QuotedLabelName StringLiteral FunctionCallBody BinaryExpr Pow BoolModifier MatchingModifierClause FillModifier FillClause NumberDurationLiteral FillLeftClause FillRightClause Mul Div Mod Add Sub Eql Gte Gtr TrimUpper TrimLower Lte Lss Neq FunctionCall FunctionIdentifier AbsentOverTime Identifier Absent Abs Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp FirstOverTime Floor HistogramCount HistogramFraction HistogramQuantile HistogramQuantiles HistogramStdDev HistogramStdVar HistogramSum HistogramAvg DoubleExponentialSmoothing Hour Idelta Increase Info Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MadOverTime MaxOverTime MinOverTime TsOfFirstOverTime TsOfMaxOverTime TsOfMinOverTime TsOfLastOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Range Step Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Timestamp Time Vector Year MatrixSelector NumberDurationLiteralInDurationContext OffsetExpr AnchoredExpr SmoothedExpr ParenExpr SubqueryExpr UnaryExpr UnaryOp VectorSelector LabelMatchers UnquotedLabelMatcher MatchOp EqlSingle EqlRegex NeqRegex QuotedLabelMatcher StepInvariantExpr At AtModifierPreprocessors MetricName",maxTerm:282,nodeProps:[["group",-14,38,44,46,52,68,156,158,159,160,161,162,163,165,173,"Expr"]],propSources:[Yhe],skippedNodes:[0,36],repeatNodeCount:3,tokenData:"4{~RwX^#lpq#lqr$ars$tst&luv'Twx'Yxy({yz)Qz{)V{|)[|})c}!O)h!O!P)o!P!Q*u!Q!R*z!R![+u![!]1O!^!_1z!_!`2a!`!a2v!b!c3]!c!}3b!}#O3x#P#Q3}#Q#R4S#R#S3b#S#T4X#T#o3b#o#p4q#q#r4v#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~#qY%O~X^#lpq#l#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~$dQ!_!`$j#r#s$o~$oO!e~~$tO$q~~$yW|~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f<%lO$t~%hO|~~%kRO;'S$t;'S;=`%t;=`O$t~%yX|~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f;=`<%l$t<%lO$t~&iP;=`<%l$t~&qSt~OY&lZ;'S&l;'S;=`&}<%lO&l~'QP;=`<%l&l~'YO!Z~~'_W|~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u<%lO'Y~'zRO;'S'Y;'S;=`(T;=`O'Y~(YX|~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u;=`<%l'Y<%lO'Y~(xP;=`<%l'Y~)QO%Q~~)VO%S~~)[O!X~R)cO%VP![Q~)hO%R~R)oO%UP!]Q~)rP!Q![)u~)zS%W~!Q![)u!g!h*W#R#S)o#X#Y*W~*ZR{|*d}!O*d!Q![*j~*gP!Q![*j~*oQ%W~!Q![*j#R#S*d~*zO!Y~~+P[%W~!O!P)o!Q![+u!g!h*W#R#S,m#W#X-X#X#Y*W#[#]-p#a#b.U#g#h.x#k#l/Z#l#m0d#m#n/u~+zZ%W~!O!P)o!Q![+u!g!h*W#R#S,m#W#X-X#X#Y*W#[#]-p#a#b.U#g#h.x#k#l/Z#m#n/u~,pP!Q![,s~,xT%W~!O!P)o!Q![,s!g!h*W#R#S,m#X#Y*W~-^P%W~!Q![-a~-dS!Q![-a#[#]-p#a#b.U#g#h.x~-uP%W~!Q![-x~-{R!Q![-x#a#b.U#g#h.x~.ZQ%W~!Q![.a#g#h.s~.dR!Q![.a#a#b.m#g#h.x~.pP#g#h.s~.xO%W~~.}P%W~!Q![/Q~/TQ!Q![/Q#a#b.m~/`P%W~!Q![/c~/fT!Q![/c#W#X-X#[#]-p#a#b.U#g#h.x~/zP%W~!Q![/}~0QU!Q![/}#W#X-X#[#]-p#a#b.U#g#h.x#k#l/Z~0gR!Q![0p!c!i0p#T#Z0p~0uR%W~!Q![0p!c!i0p#T#Z0pV1VT'SS!iR!Q![1f![!]1f!c!}1f#R#S1f#T#o1fR1kT!iR!Q![1f![!]1f!c!}1f#R#S1f#T#o1f~2PQ!d~!P!Q2V!_!`2[~2[O!a~~2aO!c~~2fQ$oP!_!`2l#r#s2qQ2qO!^Q~2vO$p~~2{Q!`~!P!Q3R!_!`3W~3WO!b~~3]O!_~~3bO$t~V3iT!iRzS!Q![3b![!]1f!c!}3b#R#S3b#T#o3b~3}O'Q~~4SO'R~~4XO!P~~4[TO#S4X#S#T%c#T;'S4X;'S;=`4k<%lO4X~4nP;=`<%l4X~4vO'T~~4{O'U~",tokenizers:[0,1,2],topRules:{PromQL:[0,37],MetricName:[1,176]},specialized:[{term:71,get:(t,e)=>rN(t)<<1,external:rN},{term:71,get:(t,e)=>iN(t,e)<<1|1,external:iN,extend:!0},{term:71,get:t=>Ghe[t]||-1}],tokenPrec:0}),Khe=3,Zhe=4,Jhe=5,u$=9,h$=11,ede=15,d$=16,f$=17,p$=21,d6=24,f6=25,p6=26,tde=27,nde=28,rde=37,F2=38,ide=39,Yp=41,Tv=42,kv=43,Dm=44,Rh=45,Gp=46,sde=47,m$=48,ade=49,ode=50,lde=51,z2=52,cde=53,ude=54,hde=55,dde=56,fde=57,pde=58,mde=59,IT=60,BT=61,LT=62,g$=63,v$=64,PT=65,FT=66,Ov=67,zT=68,gde=70,EA=71,vde=72,bde=73,yde=74,xde=75,Ade=76,wde=77,Sde=78,jde=79,Cde=80,_de=81,b$=82,Tde=83,kde=84,Ode=85,Ede=86,Mde=87,Rde=88,Dde=89,Nde=90,Ide=91,Bde=92,Lde=93,HT=94,Pde=95,Fde=96,zde=97,Hde=98,qde=99,$de=100,Qde=101,Ude=102,Wde=103,Vde=104,Yde=105,Gde=106,Xde=107,Kde=108,Zde=109,qT=110,Jde=111,efe=112,tfe=113,nfe=114,rfe=115,ife=116,sfe=117,afe=118,ofe=119,lfe=120,cfe=121,ufe=122,hfe=123,dfe=124,ffe=125,pfe=126,mfe=127,gfe=128,vfe=129,bfe=130,yfe=131,xfe=132,$T=133,y$=134,Afe=135,wfe=136,Sfe=137,jfe=138,Cfe=139,_fe=140,Tfe=141,kfe=142,Ofe=143,Efe=144,Mfe=145,Rfe=146,Dfe=147,Nfe=148,Ife=149,Bfe=150,Lfe=151,Pfe=152,Ffe=153,zfe=154,Hfe=155,Nm=156,MA=157,Ev=158,x$=159,A$=160,w$=161,Cf=162,S$=163,Lb=165,Xp=166,_h=167,RA=168,Pb=169,j$=170,C$=171,vf=172,m6=173;var re;(function(t){t.none="none",t.vector="vector",t.scalar="scalar",t.matrix="matrix",t.string="string"})(re||(re={}));const qfe={[bde]:{name:"abs",argTypes:[re.vector],variadic:0,returnType:re.vector},[vde]:{name:"absent",argTypes:[re.vector],variadic:0,returnType:re.vector},[gde]:{name:"absent_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[yde]:{name:"acos",argTypes:[re.vector],variadic:0,returnType:re.vector},[xde]:{name:"acosh",argTypes:[re.vector],variadic:0,returnType:re.vector},[Ade]:{name:"asin",argTypes:[re.vector],variadic:0,returnType:re.vector},[wde]:{name:"asinh",argTypes:[re.vector],variadic:0,returnType:re.vector},[Sde]:{name:"atan",argTypes:[re.vector],variadic:0,returnType:re.vector},[jde]:{name:"atanh",argTypes:[re.vector],variadic:0,returnType:re.vector},[Cde]:{name:"avg_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[_de]:{name:"ceil",argTypes:[re.vector],variadic:0,returnType:re.vector},[b$]:{name:"changes",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Tde]:{name:"clamp",argTypes:[re.vector,re.scalar,re.scalar],variadic:0,returnType:re.vector},[kde]:{name:"clamp_max",argTypes:[re.vector,re.scalar],variadic:0,returnType:re.vector},[Ode]:{name:"clamp_min",argTypes:[re.vector,re.scalar],variadic:0,returnType:re.vector},[Ede]:{name:"cos",argTypes:[re.vector],variadic:0,returnType:re.vector},[Mde]:{name:"Cosh",argTypes:[re.vector],variadic:0,returnType:re.vector},[Rde]:{name:"count_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Dde]:{name:"days_in_month",argTypes:[re.vector],variadic:1,returnType:re.vector},[Nde]:{name:"day_of_month",argTypes:[re.vector],variadic:1,returnType:re.vector},[Ide]:{name:"day_of_week",argTypes:[re.vector],variadic:1,returnType:re.vector},[Bde]:{name:"day_of_year",argTypes:[re.vector],variadic:1,returnType:re.vector},[Lde]:{name:"deg",argTypes:[re.vector],variadic:0,returnType:re.vector},[HT]:{name:"delta",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Pde]:{name:"deriv",argTypes:[re.matrix],variadic:0,returnType:re.vector},[nde]:{name:"end",argTypes:[],variadic:0,returnType:re.scalar},[Fde]:{name:"exp",argTypes:[re.vector],variadic:0,returnType:re.vector},[zde]:{name:"first_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Hde]:{name:"floor",argTypes:[re.vector],variadic:0,returnType:re.vector},[Gde]:{name:"histogram_avg",argTypes:[re.vector],variadic:0,returnType:re.vector},[qde]:{name:"histogram_count",argTypes:[re.vector],variadic:0,returnType:re.vector},[$de]:{name:"histogram_fraction",argTypes:[re.scalar,re.scalar,re.vector],variadic:0,returnType:re.vector},[Qde]:{name:"histogram_quantile",argTypes:[re.scalar,re.vector],variadic:0,returnType:re.vector},[Ude]:{name:"histogram_quantiles",argTypes:[re.vector,re.string,re.scalar,re.scalar],variadic:10,returnType:re.vector},[Wde]:{name:"histogram_stddev",argTypes:[re.vector],variadic:0,returnType:re.vector},[Vde]:{name:"histogram_stdvar",argTypes:[re.vector],variadic:0,returnType:re.vector},[Yde]:{name:"histogram_sum",argTypes:[re.vector],variadic:0,returnType:re.vector},[Xde]:{name:"double_exponential_smoothing",argTypes:[re.matrix,re.scalar,re.scalar],variadic:0,returnType:re.vector},[Kde]:{name:"hour",argTypes:[re.vector],variadic:1,returnType:re.vector},[Zde]:{name:"idelta",argTypes:[re.matrix],variadic:0,returnType:re.vector},[qT]:{name:"increase",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Jde]:{name:"info",argTypes:[re.vector,re.vector],variadic:1,returnType:re.vector},[efe]:{name:"irate",argTypes:[re.matrix],variadic:0,returnType:re.vector},[tfe]:{name:"label_replace",argTypes:[re.vector,re.string,re.string,re.string,re.string],variadic:0,returnType:re.vector},[nfe]:{name:"label_join",argTypes:[re.vector,re.string,re.string,re.string],variadic:-1,returnType:re.vector},[rfe]:{name:"last_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[ife]:{name:"ln",argTypes:[re.vector],variadic:0,returnType:re.vector},[sfe]:{name:"log10",argTypes:[re.vector],variadic:0,returnType:re.vector},[afe]:{name:"log2",argTypes:[re.vector],variadic:0,returnType:re.vector},[ofe]:{name:"mad_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[lfe]:{name:"max_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[cfe]:{name:"min_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[ufe]:{name:"ts_of_first_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[hfe]:{name:"ts_of_max_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[dfe]:{name:"ts_of_min_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[ffe]:{name:"ts_of_last_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[pfe]:{name:"minute",argTypes:[re.vector],variadic:1,returnType:re.vector},[mfe]:{name:"month",argTypes:[re.vector],variadic:1,returnType:re.vector},[gfe]:{name:"pi",argTypes:[],variadic:0,returnType:re.vector},[vfe]:{name:"predict_linear",argTypes:[re.matrix,re.scalar],variadic:0,returnType:re.vector},[bfe]:{name:"present_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[yfe]:{name:"quantile_over_time",argTypes:[re.scalar,re.matrix],variadic:0,returnType:re.vector},[xfe]:{name:"rad",argTypes:[re.vector],variadic:0,returnType:re.vector},[Efe]:{name:"range",argTypes:[],variadic:0,returnType:re.scalar},[$T]:{name:"rate",argTypes:[re.matrix],variadic:0,returnType:re.vector},[y$]:{name:"resets",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Afe]:{name:"round",argTypes:[re.vector,re.scalar],variadic:1,returnType:re.vector},[wfe]:{name:"scalar",argTypes:[re.vector],variadic:0,returnType:re.scalar},[Sfe]:{name:"sgn",argTypes:[re.vector],variadic:0,returnType:re.vector},[jfe]:{name:"sin",argTypes:[re.vector],variadic:0,returnType:re.vector},[Cfe]:{name:"Sinh",argTypes:[re.vector],variadic:0,returnType:re.vector},[_fe]:{name:"sort",argTypes:[re.vector],variadic:0,returnType:re.vector},[Tfe]:{name:"sort_desc",argTypes:[re.vector],variadic:0,returnType:re.vector},[kfe]:{name:"sort_by_label",argTypes:[re.vector,re.string],variadic:-1,returnType:re.vector},[Ofe]:{name:"sort_by_label_desc",argTypes:[re.vector,re.string],variadic:-1,returnType:re.vector},[Rfe]:{name:"sqrt",argTypes:[re.vector],variadic:0,returnType:re.vector},[tde]:{name:"start",argTypes:[],variadic:0,returnType:re.scalar},[Mfe]:{name:"step",argTypes:[],variadic:0,returnType:re.scalar},[Dfe]:{name:"stddev_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Nfe]:{name:"stdvar_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Ife]:{name:"sum_over_time",argTypes:[re.matrix],variadic:0,returnType:re.vector},[Bfe]:{name:"tan",argTypes:[re.vector],variadic:0,returnType:re.vector},[Lfe]:{name:"tanh",argTypes:[re.vector],variadic:0,returnType:re.vector},[Ffe]:{name:"time",argTypes:[],variadic:0,returnType:re.scalar},[Pfe]:{name:"timestamp",argTypes:[re.vector],variadic:0,returnType:re.vector},[zfe]:{name:"vector",argTypes:[re.scalar],variadic:0,returnType:re.vector},[Hfe]:{name:"year",argTypes:[re.vector],variadic:1,returnType:re.vector}};function _$(t){return qfe[t]}class T${constructor(e,n,r){this.type=e,this.name=n,this.value=r}matchesEmpty(){switch(this.type){case Pb:return this.value==="";case Ov:return this.value!=="";default:return!1}}}var zl;(function(t){t.CardOneToOne="one-to-one",t.CardManyToOne="many-to-one",t.CardOneToMany="one-to-many",t.CardManyToMany="many-to-many"})(zl||(zl={}));function $fe(t,e){const n=new T$(0,"",""),r=t.cursor();switch(r.type.id){case vf:if(!r.next())return n;do switch(r.type.id){case kv:n.name=e.sliceDoc(r.from,r.to).slice(1,-1);break;case RA:{const i=r.node.firstChild;i&&(n.type=i.type.id);break}case Dm:n.value=e.sliceDoc(r.from,r.to).slice(1,-1);break}while(r.nextSibling());break;case _h:if(!r.next())return n;do switch(r.type.id){case Tv:n.name=e.sliceDoc(r.from,r.to);break;case RA:{const i=r.node.firstChild;i&&(n.type=i.type.id);break}case Dm:n.value=e.sliceDoc(r.from,r.to).slice(1,-1);break}while(r.nextSibling());break;case kv:n.name="__name__",n.value=e.sliceDoc(r.from,r.to).slice(1,-1),n.type=Pb;break}return n}function k$(t,e){const n=[];return t.forEach(r=>{n.push($fe(r,e))}),n}function h_(t,e,n){if(!e||e.length===0)return t;let r="";for(const i of e){if(i.name===n||i.value==="")continue;let s="";switch(i.type){case Pb:s="=";break;case Ov:s="!=";break;case C$:s="!~";break;case j$:s="=~";break;default:s="="}const o=`${i.name}${s}"${i.value}"`;r===""?r=o:r=`${r},${o}`}return`${t}{${r}}`}function g6(t,e){for(;;){if(!t||t.type.id===e)return t;t=t.parent}return null}function Th(t,...e){const n=t.cursor();if(!n.next())return!1;let r=!1;do r=e.some(i=>n.type.id===i||n.type.name===i);while(!r&&n.nextSibling());return r}function DA(t,...e){const n=t.cursor();if(!n.next())return!1;let r=0;do n.type.is(e[r])&&r++;while(r<e.length&&n.nextSibling());return r>=e.length}function Nl(t){var e;if(!t)return re.none;switch(t.type.id){case F2:return re.vector;case Lb:return re.vector;case Ev:return Nl(t.firstChild);case Dm:return re.string;case z2:return re.scalar;case Nm:return re.matrix;case Cf:return re.matrix;case A$:return Nl(t.firstChild);case x$:return Nl(t.firstChild);case w$:return Nl(t.getChild("Expr"));case S$:return Nl(t.getChild("Expr"));case Gp:{const n=Nl(t.firstChild),r=Nl(t.lastChild);return n===re.scalar&&r===re.scalar?re.scalar:re.vector}case zT:{const n=(e=t.firstChild)===null||e===void 0?void 0:e.firstChild;return n?_$(n.type.id).returnType:re.none}case m6:return Nl(t.getChild("Expr"));default:return re.none}}let QT=[],O$=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?O$:QT).push(n=n+t[e])})();function Qfe(t){if(t<768)return!1;for(let e=0,n=QT.length;;){let r=e+n>>1;if(t<QT[r])n=r;else if(t>=O$[r])e=r+1;else return!0;if(e==n)return!1}}function sN(t){return t>=127462&&t<=127487}const aN=8205;function Ufe(t,e,n=!0,r=!0){return(n?E$:Wfe)(t,e,r)}function E$(t,e,n){if(e==t.length)return e;e&&M$(t.charCodeAt(e))&&R$(t.charCodeAt(e-1))&&e--;let r=d_(t,e);for(e+=oN(r);e<t.length;){let i=d_(t,e);if(r==aN||i==aN||n&&Qfe(i))e+=oN(i),r=i;else if(sN(i)){let s=0,o=e-2;for(;o>=0&&sN(d_(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Wfe(t,e,n){for(;e>0;){let r=E$(t,e-2,n);if(r<e)return r;e--}return 0}function d_(t,e){let n=t.charCodeAt(e);if(!R$(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return M$(r)?(n-55296<<10)+(r-56320)+65536:n}function M$(t){return t>=56320&&t<57344}function R$(t){return t>=55296&&t<56320}function oN(t){return t<65536?1:2}class Sn{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Im(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Hl.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Im(this,e,n);let r=[];return this.decompose(e,n,r,0),Hl.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Xg(this),s=new Xg(e);for(let o=n,l=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new Xg(this,e)}iterRange(e,n=this.length){return new D$(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new N$(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Sn.empty:e.length<=32?new ci(e):Hl.from(ci.split(e,[]))}}class ci extends Sn{constructor(e,n=Vfe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((n?r:l)>=e)return new Yfe(i,l,r,o);i=l+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new ci(lN(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=Ix(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new ci(l,o.length+s.length));else{let u=l.length>>1;r.push(new ci(l.slice(0,u)),new ci(l.slice(u)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof ci))return super.replace(e,n,r);[e,n]=Im(this,e,n);let i=Ix(this.text,Ix(r.text,lN(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new ci(i,s):Hl.from(ci.split(i,[]),s)}sliceString(e,n=this.length,r=`
`){[e,n]=Im(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let l=this.text[o],u=s+l.length;s>e&&o&&(i+=r),e<u&&n>s&&(i+=l.slice(Math.max(0,e-s),n-s)),s=u+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new ci(r,i)),r=[],i=-1);return i>-1&&n.push(new ci(r,i)),n}}class Hl extends Sn{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,u=r+o.lines-1;if((n?u:l)>=e)return o.lineInner(e,n,r,i);i=l+1,r=u+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let l=this.children[s],u=o+l.length;if(e<=u&&n>=o){let h=i&((o<=e?1:0)|(u>=n?2:0));o>=e&&u<=n&&!h?r.push(l):l.decompose(e-o,n-o,r,h)}o=u+1}}replace(e,n,r){if([e,n]=Im(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&n<=l){let u=o.replace(e-s,n-s,r),h=this.lines-o.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let f=this.children.slice();return f[i]=u,new Hl(f,this.length-(n-e)+r.length)}return super.replace(s,l,u)}s=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=Im(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let l=this.children[s],u=o+l.length;o>e&&s&&(i+=r),e<u&&n>o&&(i+=l.sliceString(e-o,n-o,r)),o=u+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Hl))return 0;let r=0,[i,s,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==l)return r;let u=this.children[i],h=e.children[s];if(u!=h)return r+u.scanIdentical(h,n);r+=u.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let y of e)y.flatten(v);return new ci(v,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],u=0,h=-1,f=[];function p(v){let y;if(v.lines>s&&v instanceof Hl)for(let x of v.children)p(x);else v.lines>o&&(u>o||!u)?(m(),l.push(v)):v instanceof ci&&u&&(y=f[f.length-1])instanceof ci&&v.lines+y.lines<=32?(u+=v.lines,h+=v.length+1,f[f.length-1]=new ci(y.text.concat(v.text),y.length+1+v.length)):(u+v.lines>i&&m(),u+=v.lines,h+=v.length+1,f.push(v))}function m(){u!=0&&(l.push(f.length==1?f[0]:Hl.from(f,h)),h=-1,u=f.length=0)}for(let v of e)p(v);return m(),l.length==1?l[0]:new Hl(l,n)}}Sn.empty=new ci([""],0);function Vfe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ix(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let l=t[s],u=i+l.length;u>=n&&(u>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=u+1}return e}function lN(t,e,n){return Ix(t,[""],e,n)}class Xg{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof ci?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof ci?i.text.length:i.children.length;if(o==(n>0?l:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof ci){let u=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,u.length>Math.max(0,e))return this.value=e==0?u:n>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=i.children[o+(n<0?-1:0)];e>u.length?(e-=u.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(u),this.offsets.push(n>0?1:(u instanceof ci?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class D${constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Xg(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class N${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Sn.prototype[Symbol.iterator]=function(){return this.iter()},Xg.prototype[Symbol.iterator]=D$.prototype[Symbol.iterator]=N$.prototype[Symbol.iterator]=function(){return this});class Yfe{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Im(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Gi(t,e,n=!0,r=!0){return Ufe(t,e,n,r)}function Gfe(t){return t>=56320&&t<57344}function Xfe(t){return t>=55296&&t<56320}function ca(t,e){let n=t.charCodeAt(e);if(!Xfe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Gfe(r)?(n-55296<<10)+(r-56320)+65536:n}function v6(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function ql(t){return t<65536?1:2}const UT=/\r\n?|\n/;var ps=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ps||(ps={}));class Zl{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){WT(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Zl(e)}composeDesc(e){return this.empty?e:e.empty?this:I$(this,e)}mapDesc(e,n=!1){return e.empty?this:VT(this,e,n)}mapPos(e,n=-1,r=ps.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],u=this.sections[o++],h=i+l;if(u<0){if(h>e)return s+(e-i);s+=l}else{if(r!=ps.Simple&&h>=e&&(r==ps.TrackDel&&i<e&&h>e||r==ps.TrackBefore&&i<e||r==ps.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!l)return e==i||n<0?s:s+u;s+=u}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=n&&l>=e)return i<e&&l>n?"cover":!0;i=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Zl(e)}static create(e){return new Zl(e)}}class ki extends Zl{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return WT(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return VT(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=o;let u=i>>1;for(;r.length<u;)r.push(Sn.empty);r.push(o?e.slice(s,s+o):Sn.empty)}s+=o}return new ki(n,r)}compose(e){return this.empty?e:e.empty?this:I$(this,e,!0)}map(e,n=!1){return e.empty?this:VT(this,e,n,!0)}iterChanges(e,n=!1){WT(this,e,n)}get desc(){return Zl.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new Mv(this);e:for(let o=0,l=0;;){let u=o==e.length?1e9:e[o++];for(;l<u||l==u&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,u-l);Os(i,f,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;Os(n,f,p),p>0&&kh(r,n,s.text),s.forward(f),l+=f}let h=e[o++];for(;l<h;){if(s.done)break e;let f=Math.min(s.len,h-l);Os(n,f,-1),Os(i,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new ki(n,r),filtered:Zl.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,l=null;function u(f=!1){if(!f&&!i.length)return;o<n&&Os(i,n-o,-1);let p=new ki(i,s);l=l?l.compose(p.map(l)):p,i=[],s=[],o=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof ki){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);u(),l=l?l.compose(f.map(l)):f}else{let{from:p,to:m=p,insert:v}=f;if(p>m||p<0||m>n)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${n})`);let y=v?typeof v=="string"?Sn.of(v.split(r||UT)):v:Sn.empty,x=y.length;if(p==m&&x==0)return;p<o&&u(),p>o&&Os(i,p-o,-1),Os(i,m-p,x),kh(s,i,y),o=m}}return h(e),u(!l),l}static empty(e){return new ki(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(Sn.empty);r[i]=Sn.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new ki(n,r)}static createSet(e,n){return new ki(e,n)}}function Os(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function kh(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Sn.empty);t.push(n)}}function WT(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let l=t.sections[o++],u=t.sections[o++];if(u<0)i+=l,s+=l;else{let h=i,f=s,p=Sn.empty;for(;h+=l,f+=u,u&&r&&(p=p.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],u=t.sections[o++];e(i,h,s,f,p),i=h,s=f}}}function VT(t,e,n,r=!1){let i=[],s=r?[]:null,o=new Mv(t),l=new Mv(e);for(let u=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Os(i,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||u==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!n))){let h=l.len;for(Os(i,l.ins,-1);h;){let f=Math.min(o.len,h);o.ins>=0&&u<o.i&&o.len<=f&&(Os(i,0,o.ins),s&&kh(s,i,o.text),u=o.i),o.forward(f),h-=f}l.next()}else if(o.ins>=0){let h=0,f=o.len;for(;f;)if(l.ins==-1){let p=Math.min(f,l.len);h+=p,f-=p,l.forward(p)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Os(i,h,u<o.i?o.ins:0),s&&u<o.i&&kh(s,i,o.text),u=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?ki.createSet(i,s):Zl.create(i);throw new Error("Mismatched change set lengths")}}}function I$(t,e,n=!1){let r=[],i=n?[]:null,s=new Mv(t),o=new Mv(e);for(let l=!1;;){if(s.done&&o.done)return i?ki.createSet(r,i):Zl.create(r);if(s.ins==0)Os(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)Os(r,0,o.ins,l),i&&kh(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,o.len),h=r.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;Os(r,u,f,l),i&&f&&kh(i,r,o.text)}else o.ins==-1?(Os(r,s.off?0:s.len,u,l),i&&kh(i,r,s.textBit(u))):(Os(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&kh(i,r,o.text));l=(s.ins>u||o.ins>=0&&o.len>u)&&(l||r.length>h),s.forward2(u),o.forward(u)}}}}class Mv{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Sn.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Sn.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Gd{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Gd(r,i,this.flags)}extend(e,n=e,r=0){if(e<=this.anchor&&n>=this.anchor)return De.range(e,n,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return De.range(this.anchor,i,void 0,void 0,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return De.range(e.anchor,e.head)}static create(e,n,r){return new Gd(e,n,r)}}class De{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:De.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new De([this.main],0)}addRange(e,n=!0){return De.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,De.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new De(e.ranges.map(n=>Gd.fromJSON(n)),e.main)}static single(e,n=e){return new De([De.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return De.normalized(e.slice(),n);r=s.to}return new De(e,n)}static cursor(e,n=0,r,i){return Gd.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i,s){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=n&&(s=n<e?1:-1),n<e?Gd.create(n,e,48|o):Gd.create(e,n,(s?s<0?8:16:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,u=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?De.range(u,l):De.range(l,u))}}return new De(e,n)}}function B$(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let b6=0;class mt{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=b6++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new mt(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:y6),!!e.static,e.enables)}of(e){return new Bx([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bx(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bx(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function y6(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Bx{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=b6++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,u=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?u=!0:p=="selection"?h=!0:(((n=e[p.id])!==null&&n!==void 0?n:1)&1)==0&&f.push(e[p.id]);return{create(p){return p.values[o]=r(p),1},update(p,m){if(u&&m.docChanged||h&&(m.docChanged||m.selection)||YT(p,f)){let v=r(p);if(l?!cN(v,p.values[o],i):!i(v,p.values[o]))return p.values[o]=v,1}return 0},reconfigure:(p,m)=>{let v,y=m.config.address[s];if(y!=null){let x=IA(m,y);if(this.dependencies.every(w=>w instanceof mt?m.facet(w)===p.facet(w):w instanceof gs?m.field(w,!1)==p.field(w,!1):!0)||(l?cN(v=r(p),x,i):i(v=r(p),x)))return p.values[o]=x,0}else v=r(p);return p.values[o]=v,1}}}}function cN(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function YT(t,e){let n=!1;for(let r of e)Kg(t,r)&1&&(n=!0);return n}function Kfe(t,e,n){let r=n.map(u=>t[u.id]),i=n.map(u=>u.type),s=r.filter(u=>!(u&1)),o=t[e.id]>>1;function l(u){let h=[];for(let f=0;f<r.length;f++){let p=IA(u,r[f]);if(i[f]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(u){for(let h of r)Kg(u,h);return u.values[o]=l(u),1},update(u,h){if(!YT(u,s))return 0;let f=l(u);return e.compare(f,u.values[o])?0:(u.values[o]=f,1)},reconfigure(u,h){let f=YT(u,r),p=h.config.facets[e.id],m=h.facet(e);if(p&&!f&&y6(n,p))return u.values[o]=m,0;let v=l(u);return e.compare(v,m)?(u.values[o]=m,0):(u.values[o]=v,1)}}}const M1=mt.define({static:!0});class gs{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new gs(b6++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(M1).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(M1),o=i.facet(M1),l;return(l=s.find(u=>u.field==this))&&l!=o.find(u=>u.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,M1.of({field:this,create:e})]}get extension(){return this}}const $d={lowest:4,low:3,default:2,high:1,highest:0};function mg(t){return e=>new L$(e,t)}const gu={highest:mg($d.highest),high:mg($d.high),default:mg($d.default),low:mg($d.low),lowest:mg($d.lowest)};class L${constructor(e,n){this.inner=e,this.prec=n}}class H2{of(e){return new GT(this,e)}reconfigure(e){return H2.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class GT{constructor(e,n){this.compartment=e,this.inner=n}}class NA{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let m of Zfe(e,n,o))m instanceof gs?i.push(m):(s[m.facet.id]||(s[m.facet.id]=[])).push(m);let l=Object.create(null),u=[],h=[];for(let m of i)l[m.id]=h.length<<1,h.push(v=>m.slot(v));let f=r==null?void 0:r.config.facets;for(let m in s){let v=s[m],y=v[0].facet,x=f&&f[m]||[];if(v.every(w=>w.type==0))if(l[y.id]=u.length<<1|1,y6(x,v))u.push(r.facet(y));else{let w=y.combine(v.map(A=>A.value));u.push(r&&y.compare(w,r.facet(y))?r.facet(y):w)}else{for(let w of v)w.type==0?(l[w.id]=u.length<<1|1,u.push(w.value)):(l[w.id]=h.length<<1,h.push(A=>w.dynamicSlot(A)));l[y.id]=h.length<<1,h.push(w=>Kfe(w,y,v))}}let p=h.map(m=>m(l));return new NA(e,o,p,l,u,s)}}function Zfe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let u=i.get(o);if(u!=null){if(u<=l)return;let h=r[u].indexOf(o);h>-1&&r[u].splice(h,1),o instanceof GT&&n.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof GT){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;n.set(o.compartment,h),s(h,l)}else if(o instanceof L$)s(o.inner,o.prec);else if(o instanceof gs)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Bx)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,$d.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(t,$d.default),r.reduce((o,l)=>o.concat(l))}function Kg(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function IA(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const P$=mt.define(),XT=mt.define({combine:t=>t.some(e=>e),static:!0}),F$=mt.define({combine:t=>t.length?t[0]:void 0,static:!0}),z$=mt.define(),H$=mt.define(),q$=mt.define(),$$=mt.define({combine:t=>t.length?t[0]:!1});class oc{constructor(e,n){this.type=e,this.value=n}static define(){return new Jfe}}class Jfe{of(e){return new oc(this,e)}}class epe{constructor(e){this.map=e}of(e){return new Wt(this,e)}}class Wt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Wt(this.type,n)}is(e){return this.type==e}static define(e={}){return new epe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Wt.reconfigure=Wt.define();Wt.appendConfig=Wt.define();class Ai{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&B$(r,n.newLength),s.some(l=>l.type==Ai.time)||(this.annotations=s.concat(Ai.time.of(Date.now())))}static create(e,n,r,i,s,o){return new Ai(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Ai.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Ai.time=oc.define();Ai.userEvent=oc.define();Ai.addToHistory=oc.define();Ai.remote=oc.define();function tpe(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Q$(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=ki.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Wt.mapEffects(t.effects,i).concat(Wt.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function KT(t,e,n){let r=e.selection,i=Kp(e.annotations);return e.userEvent&&(i=i.concat(Ai.userEvent.of(e.userEvent))),{changes:e.changes instanceof ki?e.changes:ki.of(e.changes||[],n,t.facet(F$)),selection:r&&(r instanceof De?r:De.single(r.anchor,r.head)),effects:Kp(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function U$(t,e,n){let r=KT(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=Q$(r,KT(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=Ai.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return rpe(n?npe(i):i)}function npe(t){let e=t.startState,n=!0;for(let i of e.facet(z$)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:tpe(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=ki.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Ai.create(e,i,t.selection&&t.selection.map(s),Wt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(H$);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof Ai?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Ai?t=s[0]:t=U$(e,Kp(s),!1)}return t}function rpe(t){let e=t.startState,n=e.facet(q$),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=Q$(r,KT(e,s,t.changes.newLength),!0))}return r==t?t:Ai.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const ipe=[];function Kp(t){return t==null?ipe:Array.isArray(t)?t:[t]}var Ir=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Ir||(Ir={}));const spe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ZT;try{ZT=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ape(t){if(ZT)return ZT.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||spe.test(n)))return!0}return!1}function ope(t){return e=>{if(!/\S/.test(e))return Ir.Space;if(ape(e))return Ir.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Ir.Word;return Ir.Other}}class vn{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Kg(this,l<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Kg(this,r),IA(this,r)}update(...e){return U$(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let l of e.effects)l.is(H2.reconfigure)?(n&&(i=new Map,n.compartments.forEach((u,h)=>i.set(h,u)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(Wt.reconfigure)?(n=null,r=l.value):l.is(Wt.appendConfig)&&(n=null,r=Kp(r).concat(l.value));let s;n?s=e.startState.values.slice():(n=NA.resolve(r,i,this),s=new vn(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let o=e.startState.facet(XT)?e.newSelection:e.newSelection.asSingle();new vn(n,e.newDoc,o,s,(l,u)=>u.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:De.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Kp(r.effects);for(let l=1;l<n.ranges.length;l++){let u=e(n.ranges[l]),h=this.changes(u.changes),f=h.map(i);for(let m=0;m<l;m++)s[m]=s[m].map(f);let p=i.mapDesc(h,!0);s.push(u.range.map(p)),i=i.compose(f),o=Wt.mapEffects(o,f).concat(Wt.mapEffects(Kp(u.effects),p))}return{changes:i,selection:De.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof ki?e:ki.of(e,this.doc.length,this.facet(vn.lineSeparator))}toText(e){return Sn.of(e.split(this.facet(vn.lineSeparator)||UT))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Kg(this,n),IA(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof gs&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(u=>o.spec.fromJSON(l,u)))}}return vn.create({doc:e.doc,selection:De.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=NA.resolve(e.extensions||[],new Map),r=e.doc instanceof Sn?e.doc:Sn.of((e.doc||"").split(n.staticFacet(vn.lineSeparator)||UT)),i=e.selection?e.selection instanceof De?e.selection:De.single(e.selection.anchor,e.selection.head):De.single(0);return B$(i,r.length),n.staticFacet(XT)||(i=i.asSingle()),new vn(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(vn.tabSize)}get lineBreak(){return this.facet(vn.lineSeparator)||`
`}get readOnly(){return this.facet($$)}phrase(e,...n){for(let r of this.facet(vn.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(P$))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return ope(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let u=Gi(n,o,!1);if(s(n.slice(u,o))!=Ir.Word)break;o=u}for(;l<i;){let u=Gi(n,l);if(s(n.slice(l,u))!=Ir.Word)break;l=u}return o==l?null:De.range(o+r,l+r)}}vn.allowMultipleSelections=XT;vn.tabSize=mt.define({combine:t=>t.length?t[0]:4});vn.lineSeparator=F$;vn.readOnly=$$;vn.phrases=mt.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});vn.languageData=P$;vn.changeFilter=z$;vn.transactionFilter=H$;vn.transactionExtender=q$;H2.reconfigure=Wt.define();function lc(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Hh{eq(e){return this==e}range(e,n=e){return Rv.create(e,n,this)}}Hh.prototype.startSide=Hh.prototype.endSide=0;Hh.prototype.point=!1;Hh.prototype.mapMode=ps.TrackDel;function x6(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}class Rv{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Rv(e,n,r)}}function JT(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class A6{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let u=o+l>>1,h=s[u]-e||(r?this.value[u].endSide:this.value[u].startSide)-n;if(u==o)return h>=0?o:l;h>=0?l=u:o=u+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,l=-1;for(let u=0;u<this.value.length;u++){let h=this.value[u],f=this.from[u]+e,p=this.to[u]+e,m,v;if(f==p){let y=n.mapPos(f,h.startSide,h.mapMode);if(y==null||(m=v=y,h.startSide!=h.endSide&&(v=n.mapPos(f,h.endSide),v<m)))continue}else if(m=n.mapPos(f,h.startSide),v=n.mapPos(p,h.endSide),m>v||m==v&&h.startSide>0&&h.endSide<=0)continue;(v-m||h.endSide-h.startSide)<0||(o<0&&(o=m),h.point&&(l=Math.max(l,v-m)),r.push(h),i.push(m-o),s.push(v-o))}return{mapped:r.length?new A6(i,s,r,l):null,pos:o}}}class dn{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new dn(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(JT)),this.isEmpty)return n.length?dn.of(n):this;let l=new W$(this,null,-1).goto(0),u=0,h=[],f=new ou;for(;l.value||u<n.length;)if(u<n.length&&(l.from-n[u].from||l.startSide-n[u].value.startSide)>=0){let p=n[u++];f.addInner(p.from,p.to,p.value)||h.push(p)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(u==n.length||this.chunkEnd(l.chunkIndex)<n[u].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||h.push(Rv.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?dn.empty:this.nextLayer.update({add:h,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],u=this.chunk[o],h=e.touchesRange(l,l+u.length);if(h===!1)i=Math.max(i,u.maxPoint),n.push(u),r.push(e.mapPos(l));else if(h===!0){let{mapped:f,pos:p}=u.map(l,e);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(p))}}let s=this.nextLayer.map(e);return n.length==0?s:new dn(r,n,s||dn.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Dv.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Dv.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),l=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),u=uN(o,l,r),h=new gg(o,u,s),f=new gg(l,u,s);r.iterGaps((p,m,v)=>hN(h,p,f,m,v,i)),r.empty&&r.length==0&&hN(h,0,f,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(f=>!f.isEmpty&&n.indexOf(f)<0),o=n.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=uN(s,o),u=new gg(s,l,0).goto(r),h=new gg(o,l,0).goto(r);for(;;){if(u.to!=h.to||!ek(u.active,h.active)||u.point&&(!h.point||!x6(u.point,h.point)))return!1;if(u.to>i)return!0;u.next(),h.next()}}static spans(e,n,r,i,s=-1){let o=new gg(e,null,s).goto(n),l=n,u=o.openStart;for(;;){let h=Math.min(o.to,r);if(o.point){let f=o.activeForPoint(o.to),p=o.pointFrom<n?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,u);i.point(l,h,o.point,f,p,o.pointRank),u=Math.min(o.openEnd(h),f.length)}else h>l&&(i.span(l,h,o.active,u),u=o.openEnd(h));if(o.to>r)return u+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,n=!1){let r=new ou;for(let i of e instanceof Rv?[e]:n?lpe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return dn.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=dn.empty;i=i.nextLayer)n=new dn(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}dn.empty=new dn([],[],null,-1);function lpe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(JT(e,r)>0)return t.slice().sort(JT);e=r}return t}dn.empty.nextLayer=dn.empty;class ou{finishChunk(e){this.chunks.push(new A6(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new ou)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(dn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=dn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function uN(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(n?n.mapPos(l):l)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class W${constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Dv{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new W$(o,n,r,s));return i.length==1?i[0]:new Dv(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)f_(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)f_(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),f_(this.heap,0)}}}function f_(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class gg{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Dv.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){R1(this.active,e),R1(this.activeTo,e),R1(this.activeRank,e),this.minActive=dN(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;D1(this.active,n,r),D1(this.activeTo,n,i),D1(this.activeRank,n,s),e&&D1(e,n,this.cursor.from),this.minActive=dN(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&R1(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function hN(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,l=r,u=r-e,h=!!s.boundChange;for(let f=!1;;){let p=t.to+u-n.to,m=p||t.endSide-n.endSide,v=m<0?t.to+u:n.to,y=Math.min(v,o);if(t.point||n.point?(t.point&&n.point&&x6(t.point,n.point)&&ek(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(l,y,t.point,n.point),f=!1):(f&&s.boundChange(l),y>l&&!ek(t.active,n.active)&&s.compareRange(l,y,t.active,n.active),h&&y<o&&(p||t.openEnd(v)!=n.openEnd(v))&&(f=!0)),v>o)break;l=v,m<=0&&t.next(),m>=0&&n.next()}}function ek(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!x6(t[n],e[n]))return!1;return!0}function R1(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function D1(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function dN(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function u0(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Gi(t,i));return r}function tk(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Gi(t,i)}return r===!0?-1:t.length}const nk="ͼ",fN=typeof Symbol>"u"?"__"+nk:Symbol.for(nk),rk=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),pN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qh{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,u,h){let f=[],p=/^@(\w+)\b/.exec(o[0]),m=p&&p[1]=="keyframes";if(p&&l==null)return u.push(o[0]+";");for(let v in l){let y=l[v];if(/&/.test(v))s(v.split(/,\s*/).map(x=>o.map(w=>x.replace(/&/,w))).reduce((x,w)=>x.concat(w)),y,u);else if(y&&typeof y=="object"){if(!p)throw new RangeError("The value of a property ("+v+") should be a primitive value.");s(i(v),y,f,m)}else y!=null&&f.push(v.replace(/_.*/,"").replace(/[A-Z]/g,x=>"-"+x.toLowerCase())+": "+y+";")}(f.length||m)&&u.push((r&&!p&&!h?o.map(r):o).join(", ")+" {"+f.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=pN[fN]||1;return pN[fN]=e+1,nk+e.toString(36)}static mount(e,n,r){let i=e[rk],s=r&&r.nonce;i?s&&i.setNonce(s):i=new cpe(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let mN=new Map;class cpe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=mN.get(r);if(s)return e[rk]=s;this.sheet=new i.CSSStyleSheet,mN.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[rk]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],u=this.modules.indexOf(l);if(u<s&&u>-1&&(this.modules.splice(u,1),s--,u=-1),u==-1){if(this.modules.splice(s++,0,l),r)for(let h=0;h<l.rules.length;h++)r.insertRule(l.rules[h],i++)}else{for(;s<u;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let u=0;u<this.modules.length;u++)o+=this.modules[u].getRules()+`
`;this.styleTag.textContent=o;let l=n.head||n;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var $h={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Nv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},upe=typeof navigator<"u"&&/Mac/.test(navigator.platform),hpe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ds=0;ds<10;ds++)$h[48+ds]=$h[96+ds]=String(ds);for(var ds=1;ds<=24;ds++)$h[ds+111]="F"+ds;for(var ds=65;ds<=90;ds++)$h[ds]=String.fromCharCode(ds+32),Nv[ds]=String.fromCharCode(ds);for(var p_ in $h)Nv.hasOwnProperty(p_)||(Nv[p_]=$h[p_]);function dpe(t){var e=upe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||hpe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Nv:$h)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function fr(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)V$(t,arguments[e]);return t}function V$(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)V$(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let qs=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},ik=typeof document<"u"?document:{documentElement:{style:{}}};const sk=/Edge\/(\d+)/.exec(qs.userAgent),Y$=/MSIE \d/.test(qs.userAgent),ak=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qs.userAgent),q2=!!(Y$||ak||sk),gN=!q2&&/gecko\/(\d+)/i.test(qs.userAgent),m_=!q2&&/Chrome\/(\d+)/.exec(qs.userAgent),vN="webkitFontSmoothing"in ik.documentElement.style,ok=!q2&&/Apple Computer/.test(qs.vendor),bN=ok&&(/Mobile\/\w+/.test(qs.userAgent)||qs.maxTouchPoints>2);var bt={mac:bN||/Mac/.test(qs.platform),windows:/Win/.test(qs.platform),linux:/Linux|X11/.test(qs.platform),ie:q2,ie_version:Y$?ik.documentMode||6:ak?+ak[1]:sk?+sk[1]:0,gecko:gN,gecko_version:gN?+(/Firefox\/(\d+)/.exec(qs.userAgent)||[0,0])[1]:0,chrome:!!m_,chrome_version:m_?+m_[1]:0,ios:bN,android:/Android\b/.test(qs.userAgent),webkit:vN,webkit_version:vN?+(/\bAppleWebKit\/(\d+)/.exec(qs.userAgent)||[0,0])[1]:0,safari:ok,safari_version:ok?+(/\bVersion\/(\d+(\.\d+)?)/.exec(qs.userAgent)||[0,0])[1]:0,tabSize:ik.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function w6(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const BA=Object.create(null);function S6(t,e,n){if(t==e)return!0;t||(t=BA),e||(e=BA);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function fpe(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function yN(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function ppe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class gl{eq(e){return!1}updateDOM(e,n,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ms=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(ms||(ms={}));class Et extends Hh{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Fb(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new _f(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=G$(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new _f(e,r,i,n,e.widget||null,!0)}static line(e){return new zb(e)}static set(e,n=!1){return dn.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Et.none=dn.empty;class Fb extends Et{constructor(e){let{start:n,end:r}=G$(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?w6(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||BA}eq(e){return this==e||e instanceof Fb&&this.tagName==e.tagName&&S6(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Fb.prototype.point=!1;class zb extends Et{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof zb&&this.spec.class==e.spec.class&&S6(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}zb.prototype.mapMode=ps.TrackBefore;zb.prototype.point=!0;class _f extends Et{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?ps.TrackBefore:ps.TrackAfter:ps.TrackDel}get type(){return this.startSide!=this.endSide?ms.WidgetRange:this.startSide<=0?ms.WidgetBefore:ms.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof _f&&mpe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}_f.prototype.point=!0;function G$(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function mpe(t,e){return t==e||!!(t&&e&&t.compare(e))}function Zp(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Iv extends Hh{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof Iv&&this.tagName==e.tagName&&S6(this.attributes,e.attributes)}static create(e){return new Iv(e.tagName,e.attributes||BA)}static set(e,n=!1){return dn.of(e,n)}}Iv.prototype.startSide=Iv.prototype.endSide=-1;function Bv(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function lk(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Zg(t,e){if(!e.anchorNode)return!1;try{return lk(t,e.anchorNode)}catch{return!1}}function Jg(t){return t.nodeType==3?Pv(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function ev(t,e,n,r){return n?xN(t,e,n,r,-1)||xN(t,e,n,r,1):!1}function Qh(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function LA(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function xN(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:lu(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Qh(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?lu(t):0}else return!1}}function lu(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Lv(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function gpe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function X$(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function vpe(t,e,n,r,i,s,o,l){let u=t.ownerDocument,h=u.defaultView||window;for(let f=t,p=!1;f&&!p;)if(f.nodeType==1){let m,v=f==u.body,y=1,x=1;if(v)m=gpe(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let S=f.getBoundingClientRect();({scaleX:y,scaleY:x}=X$(f,S)),m={left:S.left,right:S.left+f.clientWidth*y,top:S.top,bottom:S.top+f.clientHeight*x}}let w=0,A=0;if(i=="nearest")e.top<m.top+o?(A=e.top-(m.top+o),n>0&&e.bottom>m.bottom+A&&(A=e.bottom-m.bottom+o)):e.bottom>m.bottom-o&&(A=e.bottom-m.bottom+o,n<0&&e.top-A<m.top&&(A=e.top-(m.top+o)));else{let S=e.bottom-e.top,C=m.bottom-m.top;A=(i=="center"&&S<=C?e.top+S/2-C/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-C+o)-m.top}if(r=="nearest"?e.left<m.left+s?(w=e.left-(m.left+s),n>0&&e.right>m.right+w&&(w=e.right-m.right+s)):e.right>m.right-s&&(w=e.right-m.right+s,n<0&&e.left<m.left+w&&(w=e.left-(m.left+s))):w=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==l?e.left-s:e.right-(m.right-m.left)+s)-m.left,w||A)if(v)h.scrollBy(w,A);else{let S=0,C=0;if(A){let j=f.scrollTop;f.scrollTop+=A/x,C=(f.scrollTop-j)*x}if(w){let j=f.scrollLeft;f.scrollLeft+=w/y,S=(f.scrollLeft-j)*y}e={left:e.left-S,top:e.top-C,right:e.right-S,bottom:e.bottom-C},S&&Math.abs(S-w)<1&&(r="nearest"),C&&Math.abs(C-A)<1&&(i="nearest")}if(v)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function K$(t,e=!0){let n=t.ownerDocument,r=null,i=null;for(let s=t.parentNode;s&&!(s==n.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class bpe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?lu(n):0),r,Math.min(e.focusOffset,r?lu(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Bd=null;bt.safari&&bt.safari_version>=26&&(Bd=!1);function Z$(t){if(t.setActive)return t.setActive();if(Bd)return t.focus(Bd);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Bd==null?{get preventScroll(){return Bd={preventScroll:!0},!0}}:void 0),!Bd){Bd=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let AN;function Pv(t,e,n=e){let r=AN||(AN=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Jp(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function ype(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function xpe(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,lu(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=lu(n))}else{if(n==t)return!0;r=Qh(n),n=n.parentNode}}function J$(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function eQ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=lu(n)}else if(n.parentNode&&!LA(n))r=Qh(n),n=n.parentNode;else return null}}function tQ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!LA(n))r=Qh(n)+1,n=n.parentNode;else return null}}class rl{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new rl(e.parentNode,Qh(e),n)}static after(e,n){return new rl(e.parentNode,Qh(e)+1,n)}}var lr=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(lr||(lr={}));const Tf=lr.LTR,j6=lr.RTL;function nQ(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const Ape=nQ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),wpe=nQ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ck=Object.create(null),El=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);ck[e]=n,ck[n]=-e}function rQ(t){return t<=247?Ape[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?wpe[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Spe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ul{get dir(){return this.level%2?j6:Tf}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=n&&l.to>=n){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<n:l.to>n:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function iQ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!iQ(r.inner,i.inner))return!1}return!0}const sr=[];function jpe(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:n,u=s?256:i;for(let h=o,f=u,p=u;h<l;h++){let m=rQ(t.charCodeAt(h));m==512?m=f:m==8&&p==4&&(m=16),sr[h]=m==4?2:m,m&7&&(p=m),f=m}for(let h=o,f=u,p=u;h<l;h++){let m=sr[h];if(m==128)h<l-1&&f==sr[h+1]&&f&24?m=sr[h]=f:sr[h]=256;else if(m==64){let v=h+1;for(;v<l&&sr[v]==64;)v++;let y=h&&f==8||v<n&&sr[v]==8?p==1?1:8:256;for(let x=h;x<v;x++)sr[x]=y;h=v-1}else m==8&&p==1&&(sr[h]=1);f=m,m&7&&(p=m)}}}function Cpe(t,e,n,r,i){let s=i==1?2:1;for(let o=0,l=0,u=0;o<=r.length;o++){let h=o?r[o-1].to:e,f=o<r.length?r[o].from:n;for(let p=h,m,v,y;p<f;p++)if(v=ck[m=t.charCodeAt(p)])if(v<0){for(let x=l-3;x>=0;x-=3)if(El[x+1]==-v){let w=El[x+2],A=w&2?i:w&4?w&1?s:i:0;A&&(sr[p]=sr[El[x]]=A),l=x;break}}else{if(El.length==189)break;El[l++]=p,El[l++]=m,El[l++]=u}else if((y=sr[p])==2||y==1){let x=y==i;u=x?0:1;for(let w=l-3;w>=0;w-=3){let A=El[w+2];if(A&2)break;if(x)El[w+2]|=2;else{if(A&4)break;El[w+2]|=4}}}}}function _pe(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,l=i<n.length?n[i].from:e;for(let u=o;u<l;){let h=sr[u];if(h==256){let f=u+1;for(;;)if(f==l){if(i==n.length)break;f=n[i++].to,l=i<n.length?n[i].from:e}else if(sr[f]==256)f++;else break;let p=s==1,m=(f<e?sr[f]:r)==1,v=p==m?p?1:2:r;for(let y=f,x=i,w=x?n[x-1].to:t;y>u;)y==w&&(y=n[--x].from,w=x?n[x-1].to:t),sr[--y]=v;u=f}else s=h,u++}}}function uk(t,e,n,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let u=e,h=0;u<n;){let f=!0,p=!1;if(h==s.length||u<s[h].from){let x=sr[u];x!=l&&(f=!1,p=x==16)}let m=!f&&l==1?[]:null,v=f?r:r+1,y=u;e:for(;;)if(h<s.length&&y==s[h].from){if(p)break e;let x=s[h];if(!f)for(let w=x.to,A=h+1;;){if(w==n)break e;if(A<s.length&&s[A].from==w)w=s[A++].to;else{if(sr[w]==l)break e;break}}if(h++,m)m.push(x);else{x.from>u&&o.push(new Ul(u,x.from,v));let w=x.direction==Tf!=!(v%2);hk(t,w?r+1:r,i,x.inner,x.from,x.to,o),u=x.to}y=x.to}else{if(y==n||(f?sr[y]!=l:sr[y]==l))break;y++}m?uk(t,u,y,r+1,i,m,o):u<y&&o.push(new Ul(u,y,v)),u=y}else for(let u=n,h=s.length;u>e;){let f=!0,p=!1;if(!h||u>s[h-1].to){let x=sr[u-1];x!=l&&(f=!1,p=x==16)}let m=!f&&l==1?[]:null,v=f?r:r+1,y=u;e:for(;;)if(h&&y==s[h-1].to){if(p)break e;let x=s[--h];if(!f)for(let w=x.from,A=h;;){if(w==e)break e;if(A&&s[A-1].to==w)w=s[--A].from;else{if(sr[w-1]==l)break e;break}}if(m)m.push(x);else{x.to<u&&o.push(new Ul(x.to,u,v));let w=x.direction==Tf!=!(v%2);hk(t,w?r+1:r,i,x.inner,x.from,x.to,o),u=x.from}y=x.from}else{if(y==e||(f?sr[y-1]!=l:sr[y-1]==l))break;y--}m?uk(t,y,u,r+1,i,m,o):y<u&&o.push(new Ul(y,u,v)),u=y}}function hk(t,e,n,r,i,s,o){let l=e%2?2:1;jpe(t,i,s,r,l),Cpe(t,i,s,r,l),_pe(i,s,r,l),uk(t,i,s,e,n,r,o)}function Tpe(t,e,n){if(!t)return[new Ul(0,0,e==j6?1:0)];if(e==Tf&&!n.length&&!Spe.test(t))return sQ(t.length);if(n.length)for(;t.length>sr.length;)sr[sr.length]=256;let r=[],i=e==Tf?0:1;return hk(t,i,i,n,0,t.length,r),r}function sQ(t){return[new Ul(0,t,0)]}let aQ="";function kpe(t,e,n,r,i){var s;let o=r.head-t.from,l=Ul.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),u=e[l],h=u.side(i,n);if(o==h){let m=l+=i?1:-1;if(m<0||m>=e.length)return null;u=e[l=m],o=u.side(!i,n),h=u.side(i,n)}let f=Gi(t.text,o,u.forward(i,n));(f<u.from||f>u.to)&&(f=h),aQ=t.text.slice(Math.min(o,f),Math.max(o,f));let p=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<u.level?De.cursor(p.side(!i,n)+t.from,p.forward(i,n)?1:-1,p.level):De.cursor(f+t.from,u.forward(i,n)?-1:1,u.level)}function Ope(t,e,n){for(let r=e;r<n;r++){let i=rQ(t.charCodeAt(r));if(i==1)return Tf;if(i==2||i==4)return j6}return Tf}const oQ=mt.define(),lQ=mt.define(),cQ=mt.define(),uQ=mt.define(),dk=mt.define(),hQ=mt.define(),dQ=mt.define(),C6=mt.define(),_6=mt.define(),fQ=mt.define({combine:t=>t.some(e=>e)}),pQ=mt.define({combine:t=>t.some(e=>e)}),mQ=mt.define();class em{constructor(e,n,r,i,s,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new em(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new em(De.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const N1=Wt.define({map:(t,e)=>t.map(e)}),gQ=Wt.define();function Qs(t,e,n){let r=t.facet(uQ);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Xc=mt.define({combine:t=>t.length?t[0]:!0});let Epe=0;const Bp=mt.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class Wr{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Bp.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Bp.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new Wr(Epe++,e,r,i,l=>{let u=[];return o&&u.push($2.of(h=>{let f=h.plugin(l);return f?o(f):Et.none})),s&&u.push(s(l)),u})}static fromClass(e,n){return Wr.define((r,i)=>new e(r,i),n)}}class g_{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Qs(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Qs(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Qs(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const vQ=mt.define(),T6=mt.define(),$2=mt.define(),bQ=mt.define(),k6=mt.define(),Hb=mt.define(),yQ=mt.define();function wN(t,e){let n=t.state.facet(yQ);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return dn.spans(r,e.from,e.to,{point(){},span(s,o,l,u){let h=s-e.from,f=o-e.from,p=i;for(let m=l.length-1;m>=0;m--,u--){let v=l[m].spec.bidiIsolate,y;if(v==null&&(v=Ope(e.text,h,f)),u>0&&p.length&&(y=p[p.length-1]).to==h&&y.direction==v)y.to=f,p=y.inner;else{let x={from:h,to:f,direction:v,inner:[]};p.push(x),p=x.inner}}}}),i}const xQ=mt.define();function O6(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(xQ)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Ig=mt.define();class fo{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new fo(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,u=s<n.length?n[s]:1e9,h=Math.min(l,u);if(h==1e9)break;let f=h+o,p=h,m=f;for(;;)if(s<n.length&&n[s]<=p){let v=n[s+1];s+=2,p=Math.max(p,v);for(let y=i;y<e.length&&e[y].fromB<=p;y++)o=e[y].toA-e[y].toB;m=Math.max(m,v+o)}else if(i<e.length&&e[i].fromB<=p){let v=e[i++];p=Math.max(p,v.toB),m=Math.max(m,v.toA),o=v.toA-v.toB}else break;r.push(new fo(f,m,h,p))}return r}}class PA{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=ki.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,u)=>i.push(new fo(s,o,l,u))),this.changedRanges=i}static create(e,n,r){return new PA(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const Mpe=[];class ri{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Mpe}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&fpe(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Qh(this.dom),i=this.length?e>0:n>0;return new rl(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof U2)return e;return null}static get(e){return e.cmTile}}class Q2 extends ri{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==n)for(;i&&i!=l.dom;)i=SN(i);else n.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=SN(i);this.length=o}}function SN(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class U2 extends Q2{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=ri.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof eu)n.push(i),r=o,i=0;else{let l=s+o.length,u=e(o,s);if(u!==void 0)return u;s=l+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,s,o=-1;if(this.blockTiles((l,u)=>{let h=u+l.length;if(e>=u&&e<=h){if(l.isWidget()&&n>=-1&&n<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(u<e||e==h&&(n<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-u),(h>e||e==u&&(n>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-u)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class eu extends Q2{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new eu(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Bm extends Q2{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new Bm(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,s=-1,o=null,l=-1;function u(f,p){for(let m=0,v=0;m<f.children.length&&v<=p;m++){let y=f.children[m],x=v+y.length;x>=p&&(y.isComposite()?u(y,p-v):(!o||o.isHidden&&(n>0||r&&Dpe(o,y)))&&(x>p||y.flags&32)?(o=y,l=p-v):(v<p||y.flags&16&&!y.isHidden)&&(i=y,s=p-v)),v=x}}u(this,e);let h=(n<0?i:o)||i||o;return h?{tile:h,offset:h==i?s:l}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):Rpe(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new rl(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,l=!1;for(let u of o.children){if(l)return new rl(u.dom,0);u==r.tile&&(l=!0)}}return new rl(this.dom,0)}}function Rpe(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Jg(e);return n[n.length-1]||null}function Dpe(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class da extends Q2{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new da(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Xd extends ri{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?bt.chrome||bt.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let l=Pv(this.dom,i,s).getClientRects();if(!l.length)return null;let u=l[(o?o<0:n>=0)?0:l.length-1];return bt.safari&&!o&&u.width==0&&(u=Array.prototype.find.call(l,h=>h.width)||u),o?Lv(u,o<0):u||null}static of(e,n){let r=new Xd(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class kf extends ri{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return Lv(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=l?s.length-1:0;o=s[u],!(e>0?u==0:u==s.length-1||o.top<o.bottom);u+=l?-1:1);return Lv(o,!l)}}get overrideDOMText(){if(!this.length)return Sn.empty;let{root:e}=this;if(!e)return Sn.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new kf(s,r,e,i)}}class FA extends ri{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Sn.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class Npe{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let u=i.children[s],h=u.breakAfter;(n>0?u.length<=e:u.length<e)&&(!r||r.skip(u,0,u.length)!==!1||!u.isComposite)?(o=!!h,s++,e-=u.length):(l.push({tile:i,index:s}),i=u,s=0,r&&u.isComposite()&&r.enter(u))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let u=Math.min(e,i.length-s);r&&r.skip(i,s,s+u),e-=u,s+=u}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class Ipe{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class Bpe{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let u=o.children[o.children.length-1]=new Xd(l.dom,l.text+e);u.parent=o}else o.append(i||Xd.of(e,(s=this.cache.find(Xd))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?v_(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let l=n.marks.length-1;l>=0;l--){let u=n.marks[l],h=i.lastChild;if(h instanceof da&&h.mark.eq(u.mark))h.dom!=u.dom&&h.setDOM(v_(u.dom)),i=h;else{if(this.cache.reused.get(u)){let p=ri.get(u.dom);p&&p.setDOM(v_(u.dom))}let f=da.of(u.mark,u.dom);i.append(f),i=f}this.cache.reused.set(u,2)}let s=ri.get(e.text);s&&this.cache.reused.set(s,2);let o=new Xd(e.text,e.text.nodeValue);o.flags|=8,this.pos=e.range.toB,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=AQ);let i=Bm.start(e,n||((r=this.cache.find(Bm))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(n>0&&(l=i.lastChild)&&l instanceof da&&l.mark.eq(o))i=l,n--;else{let u=da.of(o,(r=this.cache.find(da,h=>h.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(u),i=u,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!jN(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(bt.ios&&jN(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(b_,0,32)||new kf(b_.toDOM(),0,b_,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new Ipe(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof eu&&i.wrapper.eq(r.wrapper))n=i;else{let s=eu.of(r.wrapper,(e=this.cache.find(eu,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(FA,void 0,1);return r&&(r.flags=n),r||new FA(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class Lpe{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const zA=[kf,Bm,Xd,da,FA,eu,U2];for(let t=0;t<zA.length;t++)zA[t].bucket=t;class Ppe{constructor(e){this.view=e,this.buckets=zA.map(()=>[]),this.index=zA.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let u=(l+o)%s.length,h=s[u];if((!n||n(h))&&!this.reused.has(h))return s.splice(u,1),u<o&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view,l.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==n&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new kf(l.dom,n,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class Fpe{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new Ppe(e),this.text=new Lpe(e.state.doc),this.builder=new Bpe(this.cache,new U2(e,e.contentDOM),dn.iter(r)),this.cache.reused.set(n,2),this.old=new Npe(n),this.reuseWalker={skip:(o,l,u)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,u=l?l.fromA:this.old.root.length;if(u>i){let h=u-i;this.preserve(h,!o,!l),i=u,s+=h}if(!l)break;n&&l.fromA<=n.range.fromA&&l.toA>=n.range.toA?(this.forward(l.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,l.toA),this.emit(n.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=qpe(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,u)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(u-l);else{let h=u>0||l<o.length?kf.of(o.widget,this.view,u-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&u==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,u),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof FA)this.cache.add(o);else if(o instanceof da)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof da&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof da&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=dn.spans(this.decorations,e,n,{point:(l,u,h,f,p,m)=>{if(h instanceof _f){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,p>f.length)i.continueWidget(u-l);else{let v=h.widget||(h.block?Lm.block:Lm.inline),y=zpe(h),x=this.cache.findWidget(v,u-l,y)||kf.of(v,this.view,u-l,y);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(x)):(i.ensureLine(r),i.addInlineWidget(x,f,p))}r=null}else r=Hpe(r,h);u>l&&this.text.skip(u-l)},span:(l,u,h,f)=>{for(let p=l;p<u;){let m=this.text.next(Math.min(512,u-p));m==null?(i.addLineStartIfNotCovered(r),i.addBreak(),p++):(i.ensureLine(r),i.addText(m,h,p==l?f:h.length),p+=m.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=ri.get(i);if(i==this.view.contentDOM)break;s instanceof da?n.push(s):s!=null&&s.isLine()?r=s:s instanceof eu||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Bm(i,AQ):r||n.push(da.of(new Fb({tagName:i.nodeName.toLowerCase(),attributes:ppe(i)}),i)))}return{line:r,marks:n}}}function jN(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function zpe(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const AQ={class:"cm-line"};function Hpe(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&w6(n,t),r&&(t.class+=" "+r)),t}function qpe(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof da&&e.push(r.mark)}return e}function v_(t){let e=ri.get(t);return e&&e.setDOM(t.cloneNode()),t}class Lm extends gl{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Lm.inline=new Lm("span");Lm.block=new Lm("div");const b_=new class extends gl{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class CN{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Et.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new U2(e,e.contentDOM),this.updateInner([new fo(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:p})=>p<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!Kpe(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?Qpe(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:p}=this.hasComposition;r=new fo(f,p,e.changes.mapPos(f,-1),e.changes.mapPos(p,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(bt.ie||bt.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let u=Vpe(o,this.decorations,e.changes);u.length&&(r=fo.extendWithRanges(r,u));let h=Gpe(l,this.blockWrappers,e.changes);return h.length&&(r=fo.extendWithRanges(r,h)),s&&!r.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,l=new Fpe(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&ri.get(n.text)&&l.cache.reused.set(ri.get(n.text),2),this.tile=l.run(e,n),fk(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=bt.chrome||bt.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof y_&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(gQ)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Xc)||r.tabIndex>-1)&&Zg(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||o))return;let l=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,h,f;if(u.empty?f=h=this.inlineDOMNearPos(u.anchor,u.assoc||1):(f=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),h=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),bt.gecko&&u.empty&&!this.hasComposition&&$pe(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=f=new rl(m,0),l=!0}let p=this.view.observer.selectionRange;(l||!p.focusNode||(!ev(h.node,h.offset,p.anchorNode,p.anchorOffset)||!ev(f.node,f.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,u))&&(this.view.observer.ignore(()=>{bt.android&&bt.chrome&&r.contains(p.focusNode)&&Xpe(p.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let m=Bv(this.view.root);if(m)if(u.empty){if(bt.gecko){let v=Upe(h.node,h.offset);if(v&&v!=3){let y=(v==1?eQ:tQ)(h.node,h.offset);y&&(h=new rl(y.node,y.offset))}}m.collapse(h.node,h.offset),u.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=u.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(f.node,f.offset)}catch{}}else{let v=document.createRange();u.anchor>u.head&&([h,f]=[f,h]),v.setEnd(f.node,f.offset),v.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(v)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new rl(p.anchorNode,p.anchorOffset),this.impreciseHead=f.precise?null:new rl(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&ev(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Bv(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let u=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!u||!h||u.bottom>h.top)return;let f=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(f.node,f.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[n];else{let o=lu(e)==0?0:n==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!ri.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let u=r.children[o];if(u.dom==s)return l;l+=u.length+u.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,s=!1,o,l=-1,u=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let p=f+h.length;if(f<=e&&(r=h,i=e-f,s=p<e),p>=e&&!o&&(o=h,l=e-f,u=f>e),f>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(s&&o?r=null:u&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(l,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof y_?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let u=i(l,o);if(u)return u}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=Gi(s.text,o);if(l==o)return null;let u=Pv(s.dom,o,l).getClientRects();for(let h=0;h<u.length;h++){let f=u[h];if(h==u.length-1||f.top<f.bottom&&f.left<f.right)return f}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,u=this.view.textDirection==lr.LTR,h=0,f=(p,m,v)=>{for(let y=0;y<p.children.length&&!(m>i);y++){let x=p.children[y],w=m+x.length,A=x.dom.getBoundingClientRect(),{height:S}=A;if(v&&!y&&(h+=A.top-v.top),x instanceof eu)w>r&&f(x,m,A);else if(m>=r&&(h>0&&n.push(-h),n.push(S+h),h=0,o)){let C=x.dom.lastChild,j=C?Jg(C):[];if(j.length){let _=j[j.length-1],O=u?_.right-A.left:A.right-_.left;O>l&&(l=O,this.minWidth=s,this.minWidthFrom=m,this.minWidthTo=w)}}v&&y==p.children.length-1&&(h+=v.bottom-A.bottom),m=w+x.breakAfter}};return f(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?lr.RTL:lr.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,u;for(let h of o.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=Jg(h.dom);if(f.length!=1)return;l+=f[0].width,u=f[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:u}}});if(e)return e;let n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=Jg(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Et.replace({widget:new y_(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return Et.set(e)}updateDeco(){let e=1,n=this.view.state.facet($2).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(k6).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(dn.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(bQ).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var n;if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(mQ))try{if(f(this.view,e.range,e))return!0}catch(p){Qs(this.view.state,p,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(n=r.assoc)!==null&&n!==void 0?n:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let o=O6(this.view),l={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:u,offsetHeight:h}=this.view.scrollDOM;if(vpe(this.view.scrollDOM,l,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,u),-u),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==lr.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let f=this.view.docView.lineAt(r.head,1);f&&f.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){fk(this.tile)}}function fk(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)fk(r,e)}}function $pe(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function wQ(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=eQ(n.focusNode,n.focusOffset),i=tQ(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=ri.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let u=ri.get(r.node);!u||u.isText()&&u.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function Qpe(t,e,n){let r=wQ(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||t.state.doc.sliceString(r.from,r.to)!=l)return null;let u=e.invertedDesc;return{range:new fo(u.mapPos(s),u.mapPos(o),s,o),text:i}}function Upe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let Wpe=class{constructor(){this.changes=[]}compareRange(e,n){Zp(e,n,this.changes)}comparePoint(e,n){Zp(e,n,this.changes)}boundChange(e){Zp(e,e,this.changes)}};function Vpe(t,e,n){let r=new Wpe;return dn.compare(t,e,n,r),r.changes}class Ype{constructor(){this.changes=[]}compareRange(e,n){Zp(e,n,this.changes)}comparePoint(){}boundChange(e){Zp(e,e,this.changes)}}function Gpe(t,e,n){let r=new Ype;return dn.compare(t,e,n,r),r.changes}function Xpe(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Kpe(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class y_ extends gl{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Zpe(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return De.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,l=s;n<0?o=Gi(i.text,s,!1):l=Gi(i.text,s);let u=r(i.text.slice(o,l));for(;o>0;){let h=Gi(i.text,o,!1);if(r(i.text.slice(h,o))!=u)break;o=h}for(;l<i.length;){let h=Gi(i.text,l);if(r(i.text.slice(l,h))!=u)break;l=h}return De.range(o+i.from,l+i.from)}function Jpe(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,u=Math.floor((i-n.top-(t.defaultLineHeight-l)*.5)/l);s+=u*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+tk(o,s,t.state.tabSize)}function pk(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==ms.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function eme(t,e,n,r){let i=pk(t,e.head,e.assoc||-1),s=!r||i.type!=ms.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),l=t.textDirectionAt(i.from),u=t.posAtCoords({x:n==(l==lr.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(u!=null)return De.cursor(u,n?-1:1)}return De.cursor(n?i.to:i.from,n?-1:1)}function _N(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let l=e,u=null;;){let h=kpe(i,s,o,l,n),f=aQ;if(!h){if(i.number==(n?t.state.doc.lines:1))return l;f=`
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),h=t.visualLineSide(i,!n)}if(u){if(!u(f))return l}else{if(!r)return h;u=r(f)}l=h}}function tme(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==Ir.Space&&(i=o),i==o}}function nme(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return De.cursor(i,e.assoc);let o=e.goalColumn,l,u=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(i,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),f=t.documentTop;if(h)o==null&&(o=h.left-u.left),l=s<0?h.top:h.bottom;else{let y=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(u.right-u.left,t.defaultCharacterWidth*(i-y.from))),l=(s<0?y.top:y.bottom)+f}let p=u.left+o,m=t.viewState.heightOracle.textHeight>>1,v=r??m;for(let y=0;;y+=m){let x=l+(v+y)*s,w=mk(t,{x:p,y:x},!1,s);if(n?x>u.bottom:x<u.top)return De.cursor(w.pos,w.assoc);let A=t.coordsAtPos(w.pos,w.assoc),S=A?(A.top+A.bottom)/2:0;if(!A||(n?S>l:S<l))return De.cursor(w.pos,w.assoc,void 0,o)}}function tv(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let u=r||n||(e-s<o-e?-1:1);e=u<0?s:o,r=u}});if(!r)return e}}function SQ(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=tv(t,i.from,0);o!=i.from&&(s=De.cursor(o,-1))}else{let o=tv(t,i.from,-1),l=tv(t,i.to,1);(o!=i.from||l!=i.to)&&(s=De.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?De.create(n,e.mainIndex):e}function x_(t,e,n){let r=tv(t.state.facet(Hb).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:De.cursor(r,r<n.from?1:-1)}class $l{constructor(e,n){this.pos=e,this.assoc=n}}function mk(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:l}=e,u=l-s,h;for(;;){if(u<0)return new $l(0,1);if(u>t.viewState.docHeight)return new $l(t.state.doc.length,-1);if(h=t.elementAtHeight(u),r==null)break;if(h.type==ms.Text){if(r<0?h.to<t.viewport.from:h.from>t.viewport.to)break;let m=t.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(m&&(r<0?m.top<=u+s:m.bottom>=u+s))break}let p=t.viewState.heightOracle.textHeight/2;u=r>0?h.bottom+p:h.top-p}if(t.viewport.from>=h.to||t.viewport.to<=h.from){if(n)return null;if(h.type==ms.Text){let p=Jpe(t,i,h,o,l);return new $l(p,p==h.from?1:-1)}}if(h.type!=ms.Text)return u<(h.top+h.bottom)/2?new $l(h.from,1):new $l(h.to,-1);let f=t.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=t.docView.lineAt(h.from,-2)),new rme(t,o,l,t.textDirectionAt(h.from)).scanTile(f,h.from)}class rme{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Ul.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Ul.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n,r=!1){let i=0,s=e.length-1,o=new Set,l=this.bidiIn(e[0],e[s]),u,h,f=-1,p=1e9,m;e:for(;i<s;){let y=s-i,x=i+s>>1;t:if(o.has(x)){let A=i+Math.floor(Math.random()*y);for(let S=0;S<y;S++){if(!o.has(A)){x=A;break t}A++,A==s&&(A=i)}break e}o.add(x);let w=n(x);if(w)for(let A=0;A<w.length;A++){let S=w[A],C=0;if(!(S.width==0&&w.length>1)){if(S.bottom<this.y)(!u||u.bottom<S.bottom)&&(u=S),C=1;else if(S.top>this.y)(!h||h.top>S.top)&&(h=S),C=-1;else{let j=S.left>this.x?this.x-S.left:S.right<this.x?this.x-S.right:0,_=Math.abs(j);_<p&&(f=x,p=_,m=S),j&&(C=j<0==(this.baseDir==lr.LTR)?-1:1)}C==-1&&(!l||this.baseDirAt(e[x],1))?s=x:C==1&&(!l||this.baseDirAt(e[x+1],-1))&&(i=x+1)}}}if(!m){let y=u&&(!h||this.y-u.bottom<h.top-this.y)?u:h;return this.y=(y.top+y.bottom)/2,this.scan(e,n,!0)}if(p&&!r){let{top:y,bottom:x}=m;if(u&&u.bottom>(y+y+x)/3)return this.y=u.bottom-1,this.scan(e,n,!0);if(h&&h.top<(y+x+x)/3)return this.y=h.top+1,this.scan(e,n,!0)}let v=(l?this.dirAt(e[f],1):this.baseDir)==lr.LTR;return{i:f,after:this.x>(m.left+m.right)/2==v}}scanText(e,n){let r=[];for(let s=0;s<e.length;s=Gi(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,l=r[s+1]-n;return Pv(e.dom,o,l).getClientRects()});return i.after?new $l(r[i.i+1],-1):new $l(r[i.i],1)}scanTile(e,n){if(!e.length)return new $l(n,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,n);if(l.isComposite())return this.scanTile(l,n)}let r=[n];for(let l=0,u=n;l<e.children.length;l++)r.push(u+=e.children[l].length);let i=this.scan(r,l=>{let u=e.children[l];return u.flags&48?null:(u.dom.nodeType==1?u.dom:Pv(u.dom,0,u.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new $l(r[i.i+1],-1):new $l(o,1)}}const kp="";class ime{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(vn.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=kp}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=ri.get(i),l=i.nextSibling;if(l==n){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let u=ri.get(l);(o&&u?o.breakAfter:(o?o.breakAfter:LA(i))||LA(l)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!ame(l,n)&&this.lineBreak(),i=l}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(n))&&(s=l.index,o=l[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=o-1);r=s+o}}readNode(e){let n=ri.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(sme(e,r.node,r.offset)?n:0))}}function sme(t,e,n){for(;;){if(!e||n<lu(e))return!1;if(e==t)return!0;n=Qh(e)+1,e=e.parentNode}}function ame(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=ri.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class TN{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class ome{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,l=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=jQ(e.docView.tile,n,r,0))){let u=s||o?[]:cme(e),h=new ime(u,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=ume(u,this.bounds.from)}else{let u=e.observer.selectionRange,h=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!lk(e.contentDOM,u.focusNode)?l.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),f=o&&o.node==u.anchorNode&&o.offset==u.anchorOffset||!lk(e.contentDOM,u.anchorNode)?l.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),p=e.viewport;if((bt.ios||bt.chrome)&&l.main.empty&&h!=f&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,f),v=Math.max(h,f),y=p.from-m,x=p.to-v;(y==0||y==1||m==0)&&(x==0||x==-1||v==e.state.doc.length)&&(h=0,f=e.state.doc.length)}if(e.inputState.composing>-1&&l.ranges.length>1)this.newSel=l.replaceRange(De.range(f,h));else if(e.lineWrapping&&f==h&&!(l.main.empty&&l.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),v=0;m&&(v=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=De.create([De.cursor(h,v)])}else this.newSel=De.single(f,h)}}}function jQ(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let u=0,h=r,f=r;u<t.children.length;u++){let p=t.children[u],m=h+p.length;if(h<e&&m>n)return jQ(p,e,n,h);if(m>=e&&i==-1&&(i=u,s=h),h>n&&p.dom.parentNode==t.dom){o=u,l=f;break}f=m,h=m+p.breakAfter}return{from:s,to:l<0?r+t.length:l,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function CQ(t,e){let n,{newSel:r}=e,{state:i}=t,s=i.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:u}=e.bounds,h=s.from,f=null;(o===8||bt.android&&e.text.length<u-l)&&(h=s.to,f="end");let p=i.doc.sliceString(l,u,kp),m,v;!s.empty&&s.from>=l&&s.to<=u&&(e.typeOver||p!=e.text)&&p.slice(0,s.from-l)==e.text.slice(0,s.from-l)&&p.slice(s.to-l)==e.text.slice(m=e.text.length-(p.length-(s.to-l)))?n={from:s.from,to:s.to,insert:Sn.of(e.text.slice(s.from-l,m).split(kp))}:(v=_Q(p,e.text,h-l,f))&&(bt.chrome&&o==13&&v.toB==v.from+2&&e.text.slice(v.from,v.toB)==kp+kp&&v.toB--,n={from:l+v.from,to:l+v.toA,insert:Sn.of(e.text.slice(v.from,v.toB).split(kp))})}else r&&(!t.hasFocus&&i.facet(Xc)||HA(r,s))&&(r=null);if(!n&&!r)return!1;if((bt.mac||bt.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=De.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Sn.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&t.docView.lineHasWidget(s.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:s.from,to:s.to,insert:i.toText(t.inputState.insertingText)}:bt.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==`
 `&&t.lineWrapping&&(r&&(r=De.single(r.main.anchor-1,r.main.head-1)),n={from:s.from,to:s.to,insert:Sn.of([" "])}),n)return E6(t,n,r,o);if(r&&!HA(r,s)){let l=!1,u="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(l=!0),u=t.inputState.lastSelectionOrigin,u=="select.pointer"&&(r=SQ(i.facet(Hb).map(h=>h(t)),r))),t.dispatch({selection:r,scrollIntoView:l,userEvent:u}),!0}else return!1}function E6(t,e,n,r=-1){if(bt.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(bt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Jp(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Jp(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Jp(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=lme(t,e,n));return t.state.facet(hQ).some(u=>u(t,e.from,e.to,s,l))||t.dispatch(l()),!0}function lme(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,h=u<0?s.from:s.to,f=tv(i.facet(Hb).map(p=>p(t)),h,u);e.from==f&&(o=f)}if(o>-1)r={changes:e,selection:De.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let u=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(u+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let u=i.changes(e),h=n&&n.main.to<=u.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=t.state.sliceDoc(e.from,e.to),p,m=n&&wQ(t,n.main.head);if(m){let y=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-y}}else p=t.state.doc.lineAt(s.head);let v=s.to-e.to;r=i.changeByRange(y=>{if(y.from==s.from&&y.to==s.to)return{changes:u,range:h||y.map(u)};let x=y.to-v,w=x-f.length;if(t.state.sliceDoc(w,x)!=f||x>=p.from&&w<=p.to)return{range:y};let A=i.changes({from:w,to:x,insert:e.insert}),S=y.to-s.to;return{changes:A,range:h?De.range(Math.max(0,h.anchor+S),Math.max(0,h.head+S)):y.map(A)}})}else r={changes:u,selection:h&&i.selection.replaceRange(h)}}let l="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function _Q(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let u=Math.max(0,s-Math.min(o,l));n-=o+u-s}if(o<s&&t.length<e.length){let u=n<=s&&n>=o?s-n:0;s-=u,l=s+(l-o),o=s}else if(l<s){let u=n<=s&&n>=l?s-n:0;s-=u,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function cme(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new TN(n,r)),(i!=n||s!=r)&&e.push(new TN(i,s))),e}function ume(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?De.single(n+e,r+e):null}function HA(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class hme{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,bt.safari&&e.contentDOM.addEventListener("input",()=>null),bt.gecko&&_me(e.contentDOM.ownerDocument)}handleEvent(e){!yme(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=dme(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&kQ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),bt.android&&bt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return bt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((n=TQ.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||fme.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Jp(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:bt.safari&&!bt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function kN(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Qs(n.state,i)}}}function dme(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let u=s[l];u&&n(l).handlers.push(kN(r.value,u))}if(o)for(let l in o){let u=o[l];u&&n(l).observers.push(kN(r.value,u))}}for(let r in fl)n(r).handlers.push(fl[r]);for(let r in va)n(r).observers.push(va[r]);return e}const TQ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],fme="dthko",kQ=[16,17,18,20,91,92,224,225],I1=6;function B1(t){return Math.max(0,t)*.7+8}function pme(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class mme{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=K$(e.contentDOM),this.atoms=e.state.facet(Hb).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(vn.allowMultipleSelections)&&gme(e,n),this.dragging=bme(e,n)&&MQ(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&pme(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let u=O6(this.view);e.clientX-u.left<=i+I1?n=-B1(i-e.clientX):e.clientX+u.right>=o-I1&&(n=B1(e.clientX-o)),e.clientY-u.top<=s+I1?r=-B1(s-e.clientY):e.clientY+u.bottom>=l-I1&&(r=B1(e.clientY-l)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=SQ(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function gme(t,e){let n=t.state.facet(oQ);return n.length?n[0](e):bt.mac?e.metaKey:e.ctrlKey}function vme(t,e){let n=t.state.facet(lQ);return n.length?n[0](e):bt.mac?!e.altKey:!e.ctrlKey}function bme(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Bv(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function yme(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ri.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const fl=Object.create(null),va=Object.create(null),OQ=bt.ie&&bt.ie_version<15||bt.ios&&bt.webkit_version<604;function xme(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),EQ(t,n.value)},50)}function W2(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function EQ(t,e){e=W2(t.state,C6,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(gk!=null&&n.selection.ranges.every(u=>u.empty)&&gk==s.toString()){let u=-1;r=n.changeByRange(h=>{let f=n.doc.lineAt(h.from);if(f.from==u)return{range:h};u=f.from;let p=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:f.from,insert:p},range:De.cursor(h.from+p.length)}})}else o?r=n.changeByRange(u=>{let h=s.line(i++);return{changes:{from:u.from,to:u.to,insert:h.text},range:De.cursor(u.from+h.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}va.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};va.wheel=va.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};fl.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);va.touchstart=(t,e)=>{let n=t.inputState,r=e.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};va.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};fl.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(cQ))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=wme(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new mme(t,e,n,r)),r&&t.observer.ignore(()=>{Z$(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function ON(t,e,n,r){if(r==1)return De.cursor(e,n);if(r==2)return Zpe(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<t.state.doc.length&&l==s.to&&l++,De.range(o,l)}}const Ame=bt.ie&&bt.ie_version<=11;let EN=null,MN=0,RN=0;function MQ(t){if(!Ame)return t.detail;let e=EN,n=RN;return EN=t,RN=Date.now(),MN=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(MN+1)%3:1}function wme(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=MQ(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,l){let u=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=ON(t,u.pos,u.assoc,r);if(n.pos!=u.pos&&!o){let p=ON(t,n.pos,n.assoc,r),m=Math.min(p.from,f.from),v=Math.max(p.to,f.to);f=m<f.from?De.range(m,v,f.assoc):De.range(v,m,f.assoc)}return o?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(h=Sme(i,u.pos))?h:l?i.addRange(f):De.create([f])}}}function Sme(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return De.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}fl.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=De.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",W2(t.state,_6,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};fl.dragend=t=>(t.inputState.draggedContent=null,!1);function DN(t,e,n,r){if(n=W2(t.state,C6,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&vme(t,e)?{from:s.from,to:s.to}:null,l={from:i,insert:n},u=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}fl.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&DN(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return DN(t,e,r,!0),!0}return!1};fl.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=OQ?null:e.clipboardData;return n?(EQ(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(xme(t),!1)};function jme(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function Cme(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:W2(t,_6,e.join(t.lineBreak)),ranges:n,linewise:r}}let gk=null;fl.copy=fl.cut=(t,e)=>{if(!Zg(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=Cme(t.state);if(!n&&!i)return!1;gk=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=OQ?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(jme(t,n),!1)};const RQ=oc.define();function DQ(t,e){let n=[];for(let r of t.facet(dQ)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:RQ.of(!0)}):null}function NQ(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=DQ(t.state,e);n?t.dispatch(n):t.update([])}},10)}va.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),NQ(t)};va.blur=t=>{t.observer.clearSelectionRange(),NQ(t)};va.compositionstart=va.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};va.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,bt.chrome&&bt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};va.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};fl.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],u=t.posAtDOM(l.startContainer,l.startOffset),h=t.posAtDOM(l.endContainer,l.endOffset);return E6(t,{from:u,to:h,insert:t.state.toText(s)},null),!0}}let i;if(bt.chrome&&bt.android&&(i=TQ.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return bt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),bt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>va.compositionend(t,e),20),!1};const NN=new Set;function _me(t){NN.has(t)||(NN.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const IN=["pre-wrap","normal","pre-line","break-spaces"];let Pm=!1;function BN(){Pm=!1}class Tme{constructor(e){this.lineWrapping=e,this.doc=Sn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return IN.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let l=IN.indexOf(e)>-1,u=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,u){this.heightSamples={};for(let h=0;h<o.length;h++){let f=o[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return u}}class kme{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Zo{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?ms.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof _f?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Zo(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var pr=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(pr||(pr={}));const Lx=.001;class Vs{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Lx&&(Pm=!0),this.height=e)}replace(e,n,r){return Vs.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:u,toA:h,fromB:f,toB:p}=i[l],m=s.lineAt(u,pr.ByPosNoHeight,r.setDoc(n),0,0),v=m.to>=h?m:s.lineAt(h,pr.ByPosNoHeight,r,0,0);for(p+=v.to-h,h=v.to;l>0&&m.from<=i[l-1].toA;)u=i[l-1].fromA,f=i[l-1].fromB,l--,u<m.from&&(m=s.lineAt(u,pr.ByPosNoHeight,r,0,0));f+=m.from-u,u=m.from;let y=M6.build(r.setDoc(o),e,f,p);s=qA(s,s.replace(u,h,y))}return s.updateHeight(r,0)}static empty(){return new Ba(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new Eme(Vs.of(e.slice(0,n)),o,Vs.of(e.slice(r)))}}function qA(t,e){return t==e?t:(t.constructor!=e.constructor&&(Pm=!0),e)}Vs.prototype.size=1;const Ome=Et.replace({});class IQ extends Vs{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new Zo(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Zo(i,0,r,this.spaceAbove,Ome):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,pr.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ba extends IQ{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new Zo(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Ba||i instanceof ls&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof ls?i=new Ba(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Vs.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ls extends Vs{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);o=u/s,this.length>s+1&&(l=(this.height-u)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:u}=this.heightMetrics(n,i);if(n.lineWrapping){let h=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=n.doc.lineAt(h),p=l+f.length*u,m=Math.max(r,e-p/2);return new Zo(f.from,f.length,m,p,0)}else{let h=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:f,length:p}=n.doc.line(s+h);return new Zo(f,p,r+l*h,l,0)}}lineAt(e,n,r,i,s){if(n==pr.ByHeight)return this.blockAt(e,r,i,s);if(n==pr.ByPosNoHeight){let{from:v,to:y}=r.doc.lineAt(e);return new Zo(v,y-v,0,0,0)}let{firstLine:o,perLine:l,perChar:u}=this.heightMetrics(r,s),h=r.doc.lineAt(e),f=l+h.length*u,p=h.number-o,m=i+l*p+u*(h.from-s-p);return new Zo(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:l,perLine:u,perChar:h}=this.heightMetrics(r,s);for(let f=e,p=i;f<=n;){let m=r.doc.lineAt(f);if(f==e){let y=m.number-l;p+=u*y+h*(e-s-y)}let v=u+h*m.length;o(new Zo(m.from,m.length,p,v,0)),p+=v,f=m.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof ls?r[r.length-1]=new ls(s.length+i):r.push(null,new ls(i-1))}if(e>0){let s=r[0];s instanceof ls?r[0]=new ls(e+s.length):r.unshift(new ls(e-1),null)}return Vs.of(r)}decomposeLeft(e,n){n.push(new ls(e-1),null)}decomposeRight(e,n){n.push(null,new ls(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],l=Math.max(n,i.from),u=-1;for(i.from>n&&o.push(new ls(i.from-n-1).updateHeight(e,n));l<=s&&i.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let p=i.heights[i.index++],m=0;p<0&&(m=-p,p=i.heights[i.index++]),u==-1?u=p:Math.abs(p-u)>=Lx&&(u=-2);let v=new Ba(f,p,m);v.outdated=!1,o.push(v),l+=f+1}l<=s&&o.push(null,new ls(s-l).updateHeight(e,l));let h=Vs.of(o);return(u<0||Math.abs(h.height-this.height)>=Lx||Math.abs(u-this.heightMetrics(e,n).perLine)>=Lx)&&(Pm=!0),qA(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Eme extends Vs{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,u=n==pr.ByHeight?e<o:e<l,h=u?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,l);if(this.break||(u?h.to<l:h.from>l))return h;let f=n==pr.ByPosNoHeight?pr.ByPosNoHeight:pr.ByPos;return u?h.join(this.right.lineAt(l,f,r,o,l)):this.left.lineAt(l,f,r,i,s).join(h)}forEachLine(e,n,r,i,s,o){let l=i+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,n,r,i,s,o),n>=u&&this.right.forEachLine(e,n,r,l,u,o);else{let h=this.lineAt(u,pr.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,o),h.to>=e&&h.from<=n&&o(h),n>h.to&&this.right.forEachLine(h.to+1,n,r,l,u,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&LN(s,o-1),n<this.length){let l=s.length;this.decomposeRight(n,s),LN(s,l)}return Vs.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Vs.of(this.break?[e,null,n]:[e,n]):(this.left=qA(this.left,e),this.right=qA(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,l=n+s.length+this.break,u=null;return i&&i.from<=n+s.length&&i.more?u=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=l+o.length&&i.more?u=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),u?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function LN(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof ls&&(r=t[e+1])instanceof ls&&t.splice(e-1,3,new ls(n.length+1+r.length))}const Mme=5;class M6{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ba?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ba(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new IQ(o,i,r)):(o||s||i>=Mme)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ba(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new ls(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ba)return e;let n=new Ba(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ba)&&!this.isCovered?this.nodes.push(new Ba(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ba&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new M6(r,e);return dn.spans(n,r,i,s,0),s.finish(r)}}function Rme(t,e,n){let r=new Dme;return dn.compare(t,e,n,r,0),r.changes}class Dme{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Zp(e,n,this.changes,5)}}function Nme(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),u=Math.min(i.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let m=f.getBoundingClientRect();s=Math.max(s,m.left),o=Math.min(o,m.right),l=Math.max(l,m.top),u=Math.min(h==t.parentNode?i.innerHeight:u,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,u)-(n.top+e)}}function Ime(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function Bme(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class A_{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return Et.replace({widget:new Lme(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class Lme extends gl{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class PN{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=FN,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=lr.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=n.facet(T6).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Tme(r),this.stateDeco=zN(n),this.heightMap=Vs.empty().applyChanges(this.stateDeco,Sn.empty,this.heightOracle.setDoc(n.doc),[new fo(0,0,0,n.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Et.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new L1(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?FN:new R6(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Bg(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=zN(this.state);let i=e.changedRanges,s=fo.extendWithRanges(i,Rme(r,this.stateDeco,e?e.changes:ki.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);BN(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Pm)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<u.from||n.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,n));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(pQ)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?lr.RTL:lr.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=n.getBoundingClientRect(),u=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,f=0;if(l.width&&l.height){let{scaleX:_,scaleY:O}=X$(n,l);(_>.005&&Math.abs(this.scaleX-_)>.005||O>.005&&Math.abs(this.scaleY-O)>.005)&&(this.scaleX=_,this.scaleY=O,h|=16,o=u=!0)}let p=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let v=K$(this.view.contentDOM,!1).y;v!=this.scrollParent&&(this.scrollParent=v,this.scrollAnchorHeight=-1,this.scrollOffset=0);let y=this.getScrollOffset();this.scrollOffset!=y&&(this.scrollAnchorHeight=-1,this.scrollOffset=y),this.scrolledToBottom=J$(this.scrollParent||e.win);let x=(this.printing?Bme:Nme)(n,this.paddingTop),w=x.top-this.pixelViewport.top,A=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let S=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(S!=this.inView&&(this.inView=S,S&&(u=!0)),!this.inView&&!this.scrollTarget&&!Ime(e.dom))return 0;let C=l.width;if((this.contentDOMWidth!=C||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),u){let _=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(_)&&(o=!0),o||i.lineWrapping&&Math.abs(C-this.contentDOMWidth)>i.charWidth){let{lineHeight:O,charWidth:M,textHeight:R}=e.docView.measureTextSize();o=O>0&&i.refresh(s,O,M,R,Math.max(5,C/M),_),o&&(e.docView.minWidth=0,h|=16)}w>0&&A>0?f=Math.max(w,A):w<0&&A<0&&(f=Math.min(w,A)),BN();for(let O of this.viewports){let M=O.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(O);this.heightMap=(o?Vs.empty().applyChanges(this.stateDeco,Sn.empty,this.heightOracle,[new fo(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new kme(O.from,M))}Pm&&(h|=2)}let j=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return j&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||j)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,u=new L1(i.lineAt(o-r*1e3,pr.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,pr.ByHeight,s,0,0).to);if(n){let{head:h}=n.range;if(h<u.from||h>u.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,pr.ByPos,s,0,0),m;n.y=="center"?m=(p.top+p.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&h<u.from?m=p.top:m=p.bottom-f,u=new L1(i.lineAt(m-1e3/2,pr.ByHeight,s,0,0).from,i.lineAt(m+f+1e3/2,pr.ByHeight,s,0,0).to)}}return u}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new L1(this.heightMap.lineAt(r,pr.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,pr.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,pr.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,pr.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new A_(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=lr.LTR&&!r)return[];let l=[],u=(f,p,m,v)=>{if(p-f<s)return;let y=this.state.selection.main,x=[y.from];y.empty||x.push(y.to);for(let A of x)if(A>f&&A<p){u(f,A-10,m,v),u(A+10,p,m,v);return}let w=Fme(e,A=>A.from>=m.from&&A.to<=m.to&&Math.abs(A.from-f)<s&&Math.abs(A.to-p)<s&&!x.some(S=>A.from<S&&A.to>S));if(!w){if(p<m.to&&n&&r&&n.visibleRanges.some(C=>C.from<=p&&C.to>=p)){let C=n.moveToLineBoundary(De.cursor(p),!1,!0).head;C>f&&(p=C)}let A=this.gapSize(m,f,p,v),S=r||A<2e6?A:2e6;w=new A_(f,p,A,S)}l.push(w)},h=f=>{if(f.length<o||f.type!=ms.Text)return;let p=Pme(f.from,f.to,this.stateDeco);if(p.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,v,y;if(r){let x=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,w,A;if(m!=null){let S=F1(p,m),C=((this.visibleBottom-this.visibleTop)/2+x)/f.height;w=S-C,A=S+C}else w=(this.visibleTop-f.top-x)/f.height,A=(this.visibleBottom-f.top+x)/f.height;v=P1(p,w),y=P1(p,A)}else{let x=p.total*this.heightOracle.charWidth,w=i*this.heightOracle.charWidth,A=0;if(x>2e6)for(let O of e)O.from>=f.from&&O.from<f.to&&O.size!=O.displaySize&&O.from*this.heightOracle.charWidth+A<this.pixelViewport.left&&(A=O.size-O.displaySize);let S=this.pixelViewport.left+A,C=this.pixelViewport.right+A,j,_;if(m!=null){let O=F1(p,m),M=((C-S)/2+w)/x;j=O-M,_=O+M}else j=(S-w)/x,_=(C+w)/x;v=P1(p,j),y=P1(p,_)}v>f.from&&u(f.from,v,f,p),y<f.to&&u(y,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return l}gapSize(e,n,r,i){let s=F1(i,r)-F1(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){A_.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Et.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];dn.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Bg(this.heightMap.lineAt(e,pr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Bg(this.heightMap.lineAt(this.scaler.fromDOM(e),pr.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Bg(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class L1{constructor(e,n){this.from=e,this.to=n}}function Pme(t,e,n){let r=[],i=t,s=0;return dn.spans(n,t,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function P1({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function F1(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function Fme(t,e){for(let n of t)if(e(n))return n}const FN={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function zN(t){let e=t.facet($2).filter(r=>typeof r!="function"),n=t.facet(k6).filter(r=>typeof r!="function");return n.length&&e.push(dn.join(n)),e}class R6{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:u})=>{let h=n.lineAt(l,pr.ByPos,e,0,0).top,f=n.lineAt(u,pr.ByPos,e,0,0).bottom;return i+=f-h,{from:l,to:u,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof R6?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Bg(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Zo(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Bg(i,e)):t._content)}const z1=mt.define({combine:t=>t.join(" ")}),vk=mt.define({combine:t=>t.indexOf(!0)>-1}),bk=qh.newName(),BQ=qh.newName(),LQ=qh.newName(),PQ={"&light":"."+BQ,"&dark":"."+LQ};function yk(t,e,n){return new qh(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const zme=yk("."+bk,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},PQ),Hme={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},w_=bt.ie&&bt.ie_version<=11;class qme{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new bpe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(bt.ie&&bt.ie_version<=11||bt.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&bt.android&&e.constructor.EDIT_CONTEXT!==!1&&!(bt.chrome&&bt.chrome_version<126)&&(this.editContext=new Qme(e),e.state.facet(Xc)&&(e.contentDOM.editContext=this.editContext.editContext)),w_&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Xc)?r.root.activeElement!=this.dom:!Zg(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(bt.ie&&bt.ie_version<=11||bt.android&&bt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&ev(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Bv(e.root);if(!n)return!1;let r=bt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&$me(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Zg(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&xpe(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Hme),w_&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),w_&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Jp(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Zg(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new ome(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=CQ(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!HA(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=HN(n,e.previousSibling||e.target.previousSibling,-1),i=HN(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Xc)!=e.state.facet(Xc)&&(e.view.contentDOM.editContext=e.state.facet(Xc)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function HN(t,e,n){for(;e;){let r=ri.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function qN(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return ev(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function $me(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return qN(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?qN(t,n):null}class Qme{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),u=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let h=u-l>r.text.length;l==this.from&&s<this.from?l=s:u==this.to&&s>this.to&&(u=s);let f=_Q(e.state.sliceDoc(l,u),r.text,(h?i.from:i.to)-l,h?"end":null);if(!f){let m=De.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));HA(m,i)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:f.from+l,to:f.toA+l,insert:Sn.of(r.text.slice(f.from,f.toB).split(`
`))};if((bt.mac||bt.android)&&p.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:l,to:u,insert:Sn.of([r.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);E6(e,p,De.single(this.toEditorPos(r.selectionStart,m),this.toEditorPos(r.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let u=e.coordsForChar(o);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let u=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(u<h){let f=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(Et.mark({attributes:{style:f}}).range(u,h))}}}e.dispatch({effects:gQ.of(Et.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Bv(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,u,h)=>{if(r)return;let f=h.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(h)){i=this.pendingContextChange=null,n+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),h.toString()),this.to+=f}n+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ot{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||ype(e.parent)||document,this.viewState=new PN(this,e.state||vn.create(e)),e.scrollTo&&e.scrollTo.is(N1)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Bp).map(i=>new g_(i));for(let i of this.plugins)i.update(this);this.observer=new qme(this),this.inputState=new hme(this),this.inputState.ensureHandlers(this.plugins),this.docView=new CN(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Ai?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let m of e){if(m.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=m.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,u=null;e.some(m=>m.annotation(RQ))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,u=DQ(s,o),u||(l=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(vn.phrases)!=this.state.facet(vn.phrases))return this.setState(s);i=PA.create(this,s,e),i.flags|=l;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:v}=m.state.selection,{x:y,y:x}=this.state.facet(ot.cursorScrollMargin);p=new em(v.empty?v:De.cursor(v.head,v.head>v.anchor?-1:1),"nearest","nearest",x,y)}for(let v of m.effects)v.is(N1)&&(p=v.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=$A.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Ig)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(z1)!=i.state.facet(z1)&&(this.viewState.mustMeasureContent=!0),(n||r||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(dk))try{m(i)}catch(v){Qs(this.state,v,"update listener")}(u||f)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),f&&!CQ(this,f)&&h.force&&Jp(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new PN(this,e),this.plugins=e.facet(Bp).map(r=>new g_(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new CN(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Bp),r=e.state.facet(Bp);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new g_(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Qs(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(J$(r||this.win))s=-1,o=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);s=v.from,o=v.top}this.updateState=1;let u=this.viewState.measure();if(!u&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];u&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(v=>{try{return v.read(this)}catch(y){return Qs(this.state,y),$N}}),p=PA.create(this,this.state,[]),m=!1;p.flags|=u,n?n.flags|=u:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let v=0;v<h.length;v++)if(f[v]!=$N)try{let y=h[v];y.write&&y.write(f[v],this)}catch(y){Qs(this.state,y)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let y=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o)/this.scaleY;if((y>1||y<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+y,r?r.scrollTop+=y:this.win.scrollBy(0,y),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(dk))l(n)}get themeClasses(){return bk+" "+(this.state.facet(vk)?LQ:BQ)+" "+this.state.facet(z1)}updateAttrs(){let e=QN(this,vQ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Xc)?"true":"false",class:"cm-content",style:`${bt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),QN(this,T6,n);let r=this.observer.ignore(()=>{let i=yN(this.contentDOM,this.contentAttrs,n),s=yN(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ot.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Ig);let e=this.state.facet(ot.cspNonce);qh.mount(this.root,this.styleModules.concat(zme).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return x_(this,e,_N(this,e,n,r))}moveByGroup(e,n){return x_(this,e,_N(this,e,n,r=>tme(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return De.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return eme(this,e,n,r)}moveVertically(e,n,r){return x_(this,e,nme(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=mk(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),mk(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Ul.find(s,e-i.from,-1,n)];return Lv(r,o.dir==lr.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(fQ)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Ume)return sQ(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||iQ(s.isolates,r=wN(this,e))))return s.order;r||(r=wN(this,e));let i=Tpe(e.text,n,r);return this.bidiCache.push(new $A(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||bt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Z$(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){var r,i,s,o;return N1.of(new em(typeof e=="number"?De.cursor(e):e,(r=n.y)!==null&&r!==void 0?r:"nearest",(i=n.x)!==null&&i!==void 0?i:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(o=n.xMargin)!==null&&o!==void 0?o:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return N1.of(new em(De.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Wr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Wr.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=qh.newName(),i=[z1.of(r),Ig.of(yk(`.${r}`,e))];return n&&n.dark&&i.push(vk.of(!0)),i}static baseTheme(e){return gu.lowest(Ig.of(yk("."+bk,e,PQ)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ri.get(r)||ri.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}ot.styleModule=Ig;ot.inputHandler=hQ;ot.clipboardInputFilter=C6;ot.clipboardOutputFilter=_6;ot.scrollHandler=mQ;ot.focusChangeEffect=dQ;ot.perLineTextDirection=fQ;ot.exceptionSink=uQ;ot.updateListener=dk;ot.editable=Xc;ot.mouseSelectionStyle=cQ;ot.dragMovesSelection=lQ;ot.clickAddsSelectionRange=oQ;ot.decorations=$2;ot.blockWrappers=bQ;ot.outerDecorations=k6;ot.atomicRanges=Hb;ot.bidiIsolatedRanges=yQ;ot.cursorScrollMargin=mt.define({combine:t=>{let e=5,n=5;for(let r of t)typeof r=="number"?e=n=r:{x:e,y:n}=r;return{x:e,y:n}}});ot.scrollMargins=xQ;ot.darkTheme=vk;ot.cspNonce=mt.define({combine:t=>t.length?t[0]:""});ot.contentAttributes=T6;ot.editorAttributes=vQ;ot.lineWrapping=ot.contentAttributes.of({class:"cm-lineWrapping"});ot.announce=Wt.define();const Ume=4096,$N={};class $A{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:lr.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new $A(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function QN(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&w6(o,n)}return n}const Wme=bt.mac?"mac":bt.windows?"win":bt.linux?"linux":"key";function Vme(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let u=0;u<n.length-1;++u){const h=n[u];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function H1(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const Yme=gu.default(ot.domEventHandlers({keydown(t,e){return zQ(FQ(e.state),t,e,"editor")}})),Dh=mt.define({enables:Yme}),UN=new WeakMap;function FQ(t){let e=t.facet(Dh),n=UN.get(e);return n||UN.set(e,n=Kme(e.reduce((r,i)=>r.concat(i),[]))),n}function Gme(t,e,n){return zQ(FQ(t.state),e,t,n)}let fh=null;const Xme=4e3;function Kme(t,e=Wme){let n=Object.create(null),r=Object.create(null),i=(o,l)=>{let u=r[o];if(u==null)r[o]=l;else if(u!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,u,h,f)=>{var p,m;let v=n[o]||(n[o]=Object.create(null)),y=l.split(/ (?!$)/).map(A=>Vme(A,e));for(let A=1;A<y.length;A++){let S=y.slice(0,A).join(" ");i(S,!0),v[S]||(v[S]={preventDefault:!0,stopPropagation:!1,run:[C=>{let j=fh={view:C,prefix:S,scope:o};return setTimeout(()=>{fh==j&&(fh=null)},Xme),!0}]})}let x=y.join(" ");i(x,!1);let w=v[x]||(v[x]={preventDefault:!1,stopPropagation:!1,run:((m=(p=v._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});u&&w.run.push(u),h&&(w.preventDefault=!0),f&&(w.stopPropagation=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let f=n[h]||(n[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let m in f)f[m].run.push(v=>p(v,xk))}let u=o[e]||o.key;if(u)for(let h of l)s(h,u,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(h,"Shift-"+u,o.shift,o.preventDefault,o.stopPropagation)}return n}let xk=null;function zQ(t,e,n,r){xk=e;let i=dpe(e),s=ca(i,0),o=ql(s)==i.length&&i!=" ",l="",u=!1,h=!1,f=!1;fh&&fh.view==n&&fh.scope==r&&(l=fh.prefix+" ",kQ.indexOf(e.keyCode)<0&&(h=!0,fh=null));let p=new Set,m=w=>{if(w){for(let A of w.run)if(!p.has(A)&&(p.add(A),A(n)))return w.stopPropagation&&(f=!0),!0;w.preventDefault&&(w.stopPropagation&&(f=!0),h=!0)}return!1},v=t[r],y,x;return v&&(m(v[l+H1(i,e,!o)])?u=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(bt.windows&&e.ctrlKey&&e.altKey)&&!(bt.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(y=$h[e.keyCode])&&y!=i?(m(v[l+H1(y,e,!0)])||e.shiftKey&&(x=Nv[e.keyCode])!=i&&x!=y&&m(v[l+H1(x,e,!1)]))&&(u=!0):o&&e.shiftKey&&m(v[l+H1(i,e,!0)])&&(u=!0),!u&&m(v._any)&&(u=!0)),h&&(u=!0),u&&f&&e.stopPropagation(),xk=null,u}class bf{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=HQ(e);return[new bf(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return Zme(e,n,r)}}function HQ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==lr.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function WN(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,l=t.posAtCoords({x:s.left+1,y:o}),u=t.posAtCoords({x:s.right-1,y:o});return l==null||u==null?r:{from:Math.max(r.from,Math.min(l,u)),to:Math.min(r.to,Math.max(l,u))}}function Zme(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==lr.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),u=HQ(t),h=o.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),p=l.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),m=l.right-(f?parseInt(f.paddingRight):0),v=pk(t,r,1),y=pk(t,i,-1),x=v.type==ms.Text?v:null,w=y.type==ms.Text?y:null;if(x&&(t.lineWrapping||v.widgetLineBreaks)&&(x=WN(t,r,1,x)),w&&(t.lineWrapping||y.widgetLineBreaks)&&(w=WN(t,i,-1,w)),x&&w&&x.from==w.from&&x.to==w.to)return S(C(n.from,n.to,x));{let _=x?C(n.from,null,x):j(v,!1),O=w?C(null,n.to,w):j(y,!0),M=[];return(x||v).to<(w||y).from-(x&&w?1:0)||v.widgetLineBreaks>1&&_.bottom+t.defaultLineHeight/2<O.top?M.push(A(p,_.bottom,m,O.top)):_.bottom<O.top&&t.elementAtHeight((_.bottom+O.top)/2).type==ms.Text&&(_.bottom=O.top=(_.bottom+O.top)/2),S(_).concat(M).concat(S(O))}function A(_,O,M,R){return new bf(e,_-u.left,O-u.top,Math.max(0,M-_),R-O)}function S({top:_,bottom:O,horizontal:M}){let R=[];for(let N=0;N<M.length;N+=2)R.push(A(M[N],_,M[N+1],O));return R}function C(_,O,M){let R=1e9,N=-1e9,B=[];function D(H,z,I,F,$){let G=t.coordsAtPos(H,H==M.to?-2:2),Y=t.coordsAtPos(I,I==M.from?2:-2);!G||!Y||(R=Math.min(G.top,Y.top,R),N=Math.max(G.bottom,Y.bottom,N),$==lr.LTR?B.push(s&&z?p:G.left,s&&F?m:Y.right):B.push(!s&&F?p:Y.left,!s&&z?m:G.right))}let L=_??M.from,U=O??M.to;for(let H of t.visibleRanges)if(H.to>L&&H.from<U)for(let z=Math.max(H.from,L),I=Math.min(H.to,U);;){let F=t.state.doc.lineAt(z);for(let $ of t.bidiSpans(F)){let G=$.from+F.from,Y=$.to+F.from;if(G>=I)break;Y>z&&D(Math.max(G,z),_==null&&G<=L,Math.min(Y,I),O==null&&Y>=U,$.dir)}if(z=F.to+1,z>=I)break}return B.length==0&&D(L,_==null,U,O==null,t.textDirection),{top:R,bottom:N,horizontal:B}}function j(_,O){let M=l.top+(O?_.top:_.bottom);return{top:M,bottom:M,horizontal:[]}}}function Jme(t,e){return t.constructor==e.constructor&&t.eq(e)}class e0e{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Px)!=e.state.facet(Px)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Px);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!Jme(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,bt.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Px=mt.define();function qQ(t){return[Wr.define(e=>new e0e(e,t)),Px.of(t)]}const Fm=mt.define({combine(t){return lc(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function t0e(t={}){return[Fm.of(t),n0e,r0e,i0e,pQ.of(!0)]}function $Q(t){return t.startState.facet(Fm)!=t.state.facet(Fm)}const n0e=qQ({above:!0,markers(t){let{state:e}=t,n=e.facet(Fm),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor&&!(s&&bt.ios&&n.iosSelectionHandles)){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:De.cursor(i.head,i.assoc);for(let u of bf.forRange(t,o,l))r.push(u)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=$Q(t);return n&&VN(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){VN(e.state,t)},class:"cm-cursorLayer"});function VN(t,e){e.style.animationDuration=t.facet(Fm).cursorBlinkRate+"ms"}const r0e=qQ({above:!1,markers(t){let e=[],{main:n,ranges:r}=t.state.selection;for(let i of r)if(!i.empty)for(let s of bf.forRange(t,"cm-selectionBackground",i))e.push(s);if(bt.ios&&!n.empty&&t.state.facet(Fm).iosSelectionHandles){for(let i of bf.forRange(t,"cm-selectionHandle cm-selectionHandle-start",De.cursor(n.from,1)))e.push(i);for(let i of bf.forRange(t,"cm-selectionHandle cm-selectionHandle-end",De.cursor(n.to,1)))e.push(i)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||$Q(t)},class:"cm-selectionLayer"}),i0e=gu.highest(ot.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),QQ=Wt.define({map(t,e){return t==null?null:e.mapPos(t)}}),Lg=gs.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(QQ)?r.value:n,t)}}),s0e=Wr.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Lg);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Lg)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Lg),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Lg)!=t&&this.view.dispatch({effects:QQ.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function a0e(){return[Lg,s0e]}function YN(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)i(o+l.index,l)}function o0e(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class l0e{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(l,u,h,f)=>i(f,h,h+l[0].length,l,u);else if(typeof r=="function")this.addMatch=(l,u,h,f)=>{let p=r(l,u,h);p&&f(h,h+l[0].length,p)};else if(r)this.addMatch=(l,u,h,f)=>f(h,h+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new ou,r=n.add.bind(n);for(let{from:i,to:s}of o0e(e,this.maxLength))YN(e.state.doc,this.regexp,i,s,(o,l)=>this.addMatch(l,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,u)=>{u>=e.view.viewport.from&&l<=e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(u,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),l=Math.min(s.to,i);if(l>=o){let u=e.state.doc.lineAt(o),h=u.to<l?e.state.doc.lineAt(l):u,f=Math.max(s.from,u.from),p=Math.min(s.to,h.to);if(this.boundary){for(;o>u.from;o--)if(this.boundary.test(u.text[o-1-u.from])){f=o;break}for(;l<h.to;l++)if(this.boundary.test(h.text[l-h.from])){p=l;break}}let m=[],v,y=(x,w,A)=>m.push(A.range(x,w));if(u==h)for(this.regexp.lastIndex=f-u.from;(v=this.regexp.exec(u.text))&&v.index<p-u.from;)this.addMatch(v,e,v.index+u.from,y);else YN(e.state.doc,this.regexp,f,p,(x,w)=>this.addMatch(w,e,x,y));n=n.update({filterFrom:f,filterTo:p,filter:(x,w)=>x<f||w>p,add:m})}}return n}}const Ak=/x/.unicode!=null?"gu":"g",c0e=new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`,Ak),u0e={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let S_=null;function h0e(){var t;if(S_==null&&typeof document<"u"&&document.body){let e=document.body.style;S_=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return S_||!1}const Fx=mt.define({combine(t){let e=lc(t,{render:null,specialChars:c0e,addSpecialChars:null});return(e.replaceTabs=!h0e())&&(e.specialChars=new RegExp("	|"+e.specialChars.source,Ak)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ak)),e}});function UQ(t={}){return[Fx.of(t),d0e()]}let GN=null;function d0e(){return GN||(GN=Wr.fromClass(class{constructor(t){this.view=t,this.decorations=Et.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Fx)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new l0e({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=ca(e[0],0);if(s==9){let o=i.lineAt(r),l=n.state.tabSize,u=u0(o.text,l,r-o.from);return Et.replace({widget:new g0e((l-u%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Et.replace({widget:new m0e(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Fx);t.startState.facet(Fx)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const f0e="•";function p0e(t){return t>=32?f0e:t==10?"␤":String.fromCharCode(9216+t)}class m0e extends gl{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=p0e(this.code),r=e.state.phrase("Control character")+" "+(u0e[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class g0e extends gl{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="	",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function v0e(){return y0e}const b0e=Et.line({class:"cm-activeLine"}),y0e=Wr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(b0e.range(i.from)),e=i.from)}return Et.set(n)}},{decorations:t=>t.decorations});class x0e extends gl{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Jg(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Lv(n[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function WQ(t){let e=Wr.fromClass(class{constructor(n){this.view=n,this.placeholder=t?Et.set([Et.widget({widget:new x0e(t),side:1}).range(0)]):Et.none}get decorations(){return this.view.state.doc.length?Et.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ot.contentAttributes.of({"aria-placeholder":t})]:e}const wk=2e3;function A0e(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>wk||n.off>wk||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let u=r;u<=i;u++){let h=t.doc.line(u);h.length<=l&&s.push(De.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let u=r;u<=i;u++){let h=t.doc.line(u),f=tk(h.text,o,t.tabSize,!0);if(f<0)s.push(De.cursor(h.to));else{let p=tk(h.text,l,t.tabSize);s.push(De.range(h.from+f,h.from+p))}}}return s}function w0e(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function XN(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>wk?-1:i==r.length?w0e(t,e.clientX):u0(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function S0e(t,e){let n=XN(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=XN(t,i);if(!l)return r;let u=A0e(t.state,n,l);return u.length?o?De.create(u.concat(r.ranges)):De.create(u):r}}:null}function j0e(t){let e=n=>n.altKey&&n.button==0;return ot.mouseSelectionStyle.of((n,r)=>e(r)?S0e(n,r):null)}const C0e={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},_0e={style:"cursor: crosshair"};function T0e(t={}){let[e,n]=C0e[t.key||"Alt"],r=Wr.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,ot.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?_0e:null})]}const q1="-10000px";class VQ{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(u=>u);if(i===this.input){for(let u of this.tooltipViews)u.update&&u.update(e);return!1}let o=[],l=n?[]:null;for(let u=0;u<s.length;u++){let h=s[u],f=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let m=this.tooltips[p];m&&m.create==h.create&&(f=p)}if(f<0)o[u]=this.createTooltipView(h,u?o[u-1]:null),l&&(l[u]=!!h.above);else{let p=o[u]=this.tooltipViews[f];l&&(l[u]=n[f]),p.update&&p.update(e)}}}for(let u of this.tooltipViews)o.indexOf(u)<0&&(this.removeTooltipView(u),(r=u.destroy)===null||r===void 0||r.call(u));return n&&(l.forEach((u,h)=>n[h]=u),n.length=l.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function k0e(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const j_=mt.define({combine:t=>{var e,n,r;return{position:bt.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||k0e}}}),KN=new WeakMap,D6=Wr.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(j_);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new VQ(t,N6,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(j_);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=q1,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(bt.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=O6(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(j_).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let u=this.manager.tooltips[l],h=this.manager.tooltipViews[l],{dom:f}=h,p=t.pos[l],m=t.size[l];if(!p||u.clip!==!1&&(p.bottom<=Math.max(n.top,r.top)||p.top>=Math.min(n.bottom,r.bottom)||p.right<Math.max(n.left,r.left)-.1||p.left>Math.min(n.right,r.right)+.1)){f.style.top=q1;continue}let v=u.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,y=v?7:0,x=m.right-m.left,w=(e=KN.get(h))!==null&&e!==void 0?e:m.bottom-m.top,A=h.offset||E0e,S=this.view.textDirection==lr.LTR,C=m.width>r.right-r.left?S?r.left:r.right-m.width:S?Math.max(r.left,Math.min(p.left-(v?14:0)+A.x,r.right-x)):Math.min(Math.max(r.left,p.left-x+(v?14:0)-A.x),r.right-x),j=this.above[l];!u.strictSide&&(j?p.top-w-y-A.y<r.top:p.bottom+w+y+A.y>r.bottom)&&j==r.bottom-p.bottom>p.top-r.top&&(j=this.above[l]=!j);let _=(j?p.top-r.top:r.bottom-p.bottom)-y;if(_<w&&h.resize!==!1){if(_<this.view.defaultLineHeight){f.style.top=q1;continue}KN.set(h,w),f.style.height=(w=_)/s+"px"}else f.style.height&&(f.style.height="");let O=j?p.top-w-y-A.y:p.bottom+y+A.y,M=C+x;if(h.overlap!==!0)for(let R of o)R.left<M&&R.right>C&&R.top<O+w&&R.bottom>O&&(O=j?R.top-w-2-y:R.bottom+y+2);if(this.position=="absolute"?(f.style.top=(O-t.parent.top)/s+"px",ZN(f,(C-t.parent.left)/i)):(f.style.top=O/s+"px",ZN(f,C/i)),v){let R=p.left+(S?A.x:-A.x)-(C+14-7);v.style.left=R/i+"px"}h.overlap!==!0&&o.push({left:C,top:O,right:M,bottom:O+w}),f.classList.toggle("cm-tooltip-above",j),f.classList.toggle("cm-tooltip-below",!j),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=q1}},{eventObservers:{scroll(){this.maybeMeasure()}}});function ZN(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const O0e=ot.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),E0e={x:0,y:0},N6=mt.define({enables:[D6,O0e]}),QA=mt.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class V2{static create(e){return new V2(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new VQ(e,QA,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const M0e=N6.compute([QA],t=>{let e=t.facet(QA);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:V2.create,above:e[0].above,arrow:e.some(n=>n.arrow)}}),YQ=mt.define();class R0e{constructor(e,n,r,i,s,o){this.view=e,this.source=n,this.field=r,this.locked=i,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.tile.nearest(n.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let o=e.coordsAtPos(i);if(!o||n.y<o.top||n.y>o.bottom||n.x<o.left-e.defaultCharacterWidth||n.x>o.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(h=>h.from<=i&&h.to>=i),u=l&&l.dir==lr.RTL?-1:1;s=n.x<o.left?-u:u}this.activateHover(e,i,s)}activateHover(e,n,r,i){let s=this.source(e,n,r),o=l=>{if(l&&!(Array.isArray(l)&&!l.length)){let u=Array.isArray(l)?l:[l];i&&this.locked.set(u,i),e.dispatch({effects:this.setHover.of(u)})}};if(s&&"then"in s){let l=this.pending={pos:n};s.then(u=>{this.pending==l&&(this.pending=null,o(u))},u=>Qs(e.state,u,"hover tooltip"))}else o(s)}get tooltip(){let e=this.view.plugin(D6),n=e?e.manager.tooltips.findIndex(r=>r.create==V2.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&!this.locked.has(i)&&s&&!D0e(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,l=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!N0e(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n);let{active:i}=this;i.length&&!this.locked.has(i)&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const $1=4;function D0e(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();i=Math.min(l.top,i),s=Math.max(l.bottom,s)}return e.clientX>=n-$1&&e.clientX<=r+$1&&e.clientY>=i-$1&&e.clientY<=s+$1}function N0e(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,l)<i)return!1;let u=t.posAtCoords({x:r,y:i},!1);return u>=e&&u<=n}function I0e(t,e={}){let n=Wt.define(),r=new WeakMap,i=gs.define({create(){return[]},update(o,l){let u=r.get(o);if(o.length&&(e.hideOnChange&&(l.docChanged||l.selection)?o=[]:u&&u(l)?o=[]:e.hideOn&&(o=o.filter(h=>!e.hideOn(l,h)))),l.docChanged&&o.length){let h=[];for(let f of o){let p=l.changes.mapPos(f.pos,-1,ps.TrackDel);if(p!=null){let m=Object.assign(Object.create(null),f);m.pos=p,m.end!=null&&(m.end=l.changes.mapPos(m.end)),h.push(m)}}o=h}for(let h of l.effects)h.is(n)&&(o=h.value,u=void 0),(h.is(L0e)&&!h.value||h.value==i)&&(o=[]);return o.length&&u&&r.set(o,u),o},provide:o=>QA.from(o)});const s=Wr.define(o=>new R0e(o,t,i,r,n,e.hoverTime||300));return{active:i,extension:[i,s,YQ.of(s),M0e]}}function B0e(t,e,n,r={}){var i;let s=t.state.facet(YQ).map(o=>t.plugin(o)).filter(o=>!!o);if(r.tooltip&&r.tooltip.active){let o=s.find(l=>l.field==r.tooltip.active);o&&(s=[o])}for(let o of s)o.activateHover(t,e,n,(i=r.until)!==null&&i!==void 0?i:()=>!1)}function GQ(t,e){let n=t.plugin(D6);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const L0e=Wt.define(),JN=mt.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Fv(t,e){let n=t.plugin(XQ),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const XQ=Wr.fromClass(class{constructor(t){this.input=t.state.facet(zv),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(JN);this.top=new Q1(t,!0,e.topContainer),this.bottom=new Q1(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(JN);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Q1(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Q1(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(zv);if(n!=this.input){let r=n.filter(u=>u),i=[],s=[],o=[],l=[];for(let u of r){let h=this.specs.indexOf(u),f;h<0?(f=u(t.view),l.push(f)):(f=this.panels[h],f.update&&f.update(t)),i.push(f),(f.top?s:o).push(f)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let u of l)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ot.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Q1{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=eI(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=eI(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function eI(t){let e=t.nextSibling;return t.remove(),e}const zv=mt.define({enables:XQ});class cu extends Hh{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}cu.prototype.elementClass="";cu.prototype.toDOM=void 0;cu.prototype.mapMode=ps.TrackBefore;cu.prototype.startSide=cu.prototype.endSide=-1;cu.prototype.point=!0;const zx=mt.define(),P0e=mt.define(),F0e={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>dn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},nv=mt.define();function z0e(t){return[KQ(),nv.of({...F0e,...t})]}const tI=mt.define({combine:t=>t.some(e=>e)});function KQ(t){return[H0e]}const H0e=Wr.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(nv).map(e=>new rI(t,e)),this.fixed=!t.state.facet(tI);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(tI)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=dn.iter(this.view.state.facet(zx),this.view.viewport.from),r=[],i=this.gutters.map(s=>new q0e(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==ms.Text&&o){Sk(n,r,l.from);for(let u of i)u.line(this.view,l,r);o=!1}else if(l.widget)for(let u of i)u.widget(this.view,l)}else if(s.type==ms.Text){Sk(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(nv),n=t.state.facet(nv),r=t.docChanged||t.heightChanged||t.viewportChanged||!dn.eq(t.startState.facet(zx),t.state.facet(zx),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new rI(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ot.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==lr.LTR?{left:r,right:i}:{right:r,left:i}})});function nI(t){return Array.isArray(t)?t:[t]}function Sk(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class q0e{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=dn.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let l=new ZQ(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Sk(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(P0e)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class rI{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();o=(u.top+u.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=nI(n.markers(e)),n.initialSpacer&&(this.spacer=new ZQ(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=nI(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!dn.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class ZQ{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),$0e(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,u=s<n.length?n[s++]:null,h=!1;if(u){let f=u.elementClass;f&&(r+=" "+f);for(let p=o;p<this.markers.length;p++)if(this.markers[p].compare(u)){l=p,h=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!u)break;u.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(u.toDOM(e),i)),h&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function $0e(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const Q0e=mt.define(),U0e=mt.define(),Lp=mt.define({combine(t){return lc(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(l,u,h)=>s(l,u,h)||o(l,u,h):o}return r}})}});class C_ extends cu{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function __(t,e){return t.state.facet(Lp).formatNumber(e,t.state)}const W0e=nv.compute([Lp],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Q0e)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new C_(__(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(U0e)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Lp)!=e.state.facet(Lp),initialSpacer(e){return new C_(__(e,iI(e.state.doc.lines)))},updateSpacer(e,n){let r=__(n.view,iI(n.view.state.doc.lines));return r==e.number?e:new C_(r)},domEventHandlers:t.facet(Lp).domEventHandlers,side:"before"}));function V0e(t={}){return[Lp.of(t),KQ(),W0e]}function iI(t){let e=9;for(;e<t;)e=e*10+9;return e}const Y0e=new class extends cu{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},G0e=zx.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Y0e.range(i)))}return dn.of(e)});function X0e(){return G0e}var T_;const Pp=new on;function K0e(t){return mt.define({combine:t?e=>e.concat(t):void 0})}const Z0e=new on;class il{constructor(e,n,r=[],i=""){this.data=e,this.name=i,vn.prototype.hasOwnProperty("tree")||Object.defineProperty(vn.prototype,"tree",{get(){return Di(this)}}),this.parser=n,this.extension=[Uh.of(this),vn.languageData.of((s,o,l)=>{let u=sI(s,o,l),h=u.type.prop(Pp);if(!h)return[];let f=s.facet(h),p=u.type.prop(Z0e);if(p){let m=u.resolve(o-u.from,l);for(let v of p)if(v.test(m,s)){let y=s.facet(v.facet);return v.type=="replace"?y:y.concat(f)}}return f})].concat(r)}isActiveAt(e,n,r=-1){return sI(e,n,r).type.prop(Pp)==this.data}findRegions(e){let n=e.facet(Uh);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Pp)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(on.mounted);if(l){if(l.tree.prop(Pp)==this.data){if(l.overlay)for(let u of l.overlay)r.push({from:u.from+o,to:u.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let u=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>u)return}}for(let u=0;u<s.children.length;u++){let h=s.children[u];h instanceof ui&&i(h,s.positions[u]+o)}};return i(Di(e),0),r}get allowsNesting(){return!0}}il.setState=Wt.define();function sI(t,e,n){let r=t.facet(Uh),i=Di(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,ti.ExcludeBuffers|ti.EnterBracketed))s.type.isTop&&(i=s);return i}class UA extends il{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=K0e(e.languageData);return new UA(n,e.parser.configure({props:[Pp.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new UA(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Di(t){let e=t.field(il.state,!1);return e?e.tree:ui.empty}class J0e{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let vg=null;class WA{constructor(e,n,r=[],i,s,o,l,u){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new WA(e,n,[],ui.empty,0,r,[],null)}startParse(){return this.parser.startParse(new J0e(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ui.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(gf.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(gf.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=vg;vg=this;try{return e()}finally{vg=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=aI(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((h,f,p,m)=>u.push({fromA:h,toA:f,fromB:p,toB:m})),r=gf.applyChanges(r,u),i=ui.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);f<p&&l.push({from:f,to:p})}}}return new WA(this.parser,n,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=aI(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends a${createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let u=vg;if(u){for(let h of i)u.tempSkipped.push(h);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=o,new ui(ga.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return vg}}function aI(t,e,n){return gf.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class zm{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new zm(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=WA.create(e.facet(Uh).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new zm(r)}}il.state=gs.define({create:zm.init,update(t,e){for(let n of e.effects)if(n.is(il.setState))return n.value;return e.startState.facet(Uh)!=e.state.facet(Uh)?zm.init(e.state):t.apply(e)}});let JQ=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(JQ=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const k_=typeof navigator<"u"&&(!((T_=navigator.scheduling)===null||T_===void 0)&&T_.isInputPending)?()=>navigator.scheduling.isInputPending():null,ege=Wr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(il.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(il.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=JQ(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(il.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!k_?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,u=s.context.work(()=>k_&&k_()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:il.setState.of(new zm(s.context))})),this.chunkBudget>0&&!(u&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Qs(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Uh=mt.define({combine(t){return t.length?t[0]:null},enables:t=>[il.state,ege,ot.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]}),tge=mt.define(),qb=mt.define({combine:t=>{if(!t.length)return"  ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function VA(t){let e=t.facet(qb);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Hv(t,e){let n="",r=t.tabSize,i=t.facet(qb)[0];if(i=="	"){for(;e>=r;)n+="	",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function I6(t,e){t instanceof vn&&(t=new Y2(t));for(let r of t.state.facet(tge)){let i=r(t,e);if(i!==void 0)return i}let n=Di(t.state);return n.length>=e?rge(t,n,e):null}class Y2{constructor(e,n={}){this.state=e,this.options=n,this.unit=VA(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return u0(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const nge=new on;function rge(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return eU(r,t,n)}function eU(t,e,n){for(let r=t;r;r=r.next){let i=sge(r.node);if(i)return i(B6.create(e,n,r))}return 0}function ige(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function sge(t){let e=t.type.prop(nge);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(on.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>cge(o,!0,1,void 0,s&&!ige(o)?i.from:void 0)}return t.parent==null?age:null}function age(){return 0}class B6 extends Y2{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new B6(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(oge(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return eU(this.context.next,this.base,this.pos)}}function oge(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function lge(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=n.to;;){let u=e.childAfter(l);if(!u||u==r)return null;if(!u.type.isSkipped){if(u.from>=o)return null;let h=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+h}}l=u.to}}function cge(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==t.pos+o,u=lge(t);return u?l?t.column(u.from):t.column(u.to):t.baseIndent+(l?0:t.unit*n)}const uge=200;function tU(){return vn.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+uge)return t;let s=n.sliceString(i.from,r);if(!e.some(h=>h.test(s)))return t;let{state:o}=t,l=-1,u=[];for(let{head:h}of o.selection.ranges){let f=o.doc.lineAt(h);if(f.from==l)continue;l=f.from;let p=I6(o,f.from);if(p==null)continue;let m=/^\s*/.exec(f.text)[0],v=Hv(o,p);m!=v&&u.push({from:f.from,to:f.from+m.length,insert:v})}return u.length?[t,{changes:u,sequential:!0}]:t})}const hge=mt.define(),dge=new on;function fge(t,e,n){let r=Di(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=n||l.from>n)continue;if(s&&l.from<e)break;let u=l.type.prop(dge);if(u&&(l.to<r.length-50||r.length==t.doc.length||!pge(l))){let h=u(l,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(s=h)}}return s}function pge(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function YA(t,e,n){for(let r of t.facet(hge)){let i=r(t,e,n);if(i)return i}return fge(t,e,n)}function nU(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const G2=Wt.define({map:nU}),$b=Wt.define({map:nU});function rU(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Of=gs.define({create(){return Et.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=oI(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(G2)&&!mge(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(aU),i=r?Et.replace({widget:new wge(r(e.state,n.value))}):lI;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is($b)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=oI(t,e.selection.main.head)),t},provide:t=>ot.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(lI.range(r,i))}return Et.set(e,!0)}});function oI(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function GA(t,e,n){var r;let i=null;return(r=t.field(Of,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function mge(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function iU(t,e){return t.field(Of,!1)?e:e.concat(Wt.appendConfig.of(oU()))}const gge=t=>{for(let e of rU(t)){let n=YA(t.state,e.from,e.to);if(n)return t.dispatch({effects:iU(t.state,[G2.of(n),sU(t,n)])}),!0}return!1},vge=t=>{if(!t.state.field(Of,!1))return!1;let e=[];for(let n of rU(t)){let r=GA(t.state,n.from,n.to);r&&e.push($b.of(r),sU(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function sU(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return ot.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const bge=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=YA(e,i.from,i.to);s&&n.push(G2.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:iU(t.state,n)}),!!n.length},yge=t=>{let e=t.state.field(Of,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push($b.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},xge=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:gge},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:vge},{key:"Ctrl-Alt-[",run:bge},{key:"Ctrl-Alt-]",run:yge}],Age={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},aU=mt.define({combine(t){return lc(t,Age)}});function oU(t){return[Of,Cge]}function lU(t,e){let{state:n}=t,r=n.facet(aU),i=o=>{let l=t.lineBlockAt(t.posAtDOM(o.target)),u=GA(t.state,l.from,l.to);u&&t.dispatch({effects:$b.of(u)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const lI=Et.replace({widget:new class extends gl{toDOM(t){return lU(t,null)}}});class wge extends gl{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return lU(e,this.value)}}const Sge={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class O_ extends cu{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function jge(t={}){let e={...Sge,...t},n=new O_(e,!0),r=new O_(e,!1),i=Wr.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Uh)!=o.state.facet(Uh)||o.startState.field(Of,!1)!=o.state.field(Of,!1)||Di(o.startState)!=Di(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new ou;for(let u of o.viewportLineBlocks){let h=GA(o.state,u.from,u.to)?r:YA(o.state,u.from,u.to)?n:null;h&&l.add(u.from,u.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[i,z0e({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||dn.empty},initialSpacer(){return new O_(e,!1)},domEventHandlers:{...s,click:(o,l,u)=>{if(s.click&&s.click(o,l,u))return!0;let h=GA(o.state,l.from,l.to);if(h)return o.dispatch({effects:$b.of(h)}),!0;let f=YA(o.state,l.from,l.to);return f?(o.dispatch({effects:G2.of(f)}),!0):!1}}}),oU()]}const Cge=ot.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Pf{constructor(e,n){this.specs=e;let r;function i(l){let u=qh.newName();return(r||(r=Object.create(null)))["."+u]=l,u}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof il?l=>l.prop(Pp)==o.data:o?l=>l==o:void 0,this.style=c$(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new qh(r):null,this.themeType=n.themeType}static define(e,n){return new Pf(e,n||{})}}const jk=mt.define(),cU=mt.define({combine(t){return t.length?[t[0]]:null}});function E_(t){let e=t.facet(jk);return e.length?e:t.facet(cU)}function X2(t,e){let n=[Tge],r;return t instanceof Pf&&(t.module&&n.push(ot.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(cU.of(t)):r?n.push(jk.computeN([ot.darkTheme],i=>i.facet(ot.darkTheme)==(r=="dark")?[t]:[])):n.push(jk.of(t)),n}class _ge{constructor(e){this.markCache=Object.create(null),this.tree=Di(e.state),this.decorations=this.buildDeco(e,E_(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Di(e.state),r=E_(e.state),i=r!=E_(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Et.none;let r=new ou;for(let{from:i,to:s}of e.visibleRanges)uhe(this.tree,n,(o,l,u)=>{r.add(o,l,this.markCache[u]||(this.markCache[u]=Et.mark({class:u})))},i,s);return r.finish()}}const Tge=gu.high(Wr.fromClass(_ge,{decorations:t=>t.decorations})),kge=Pf.define([{tag:pe.meta,color:"#404740"},{tag:pe.link,textDecoration:"underline"},{tag:pe.heading,textDecoration:"underline",fontWeight:"bold"},{tag:pe.emphasis,fontStyle:"italic"},{tag:pe.strong,fontWeight:"bold"},{tag:pe.strikethrough,textDecoration:"line-through"},{tag:pe.keyword,color:"#708"},{tag:[pe.atom,pe.bool,pe.url,pe.contentSeparator,pe.labelName],color:"#219"},{tag:[pe.literal,pe.inserted],color:"#164"},{tag:[pe.string,pe.deleted],color:"#a11"},{tag:[pe.regexp,pe.escape,pe.special(pe.string)],color:"#e40"},{tag:pe.definition(pe.variableName),color:"#00f"},{tag:pe.local(pe.variableName),color:"#30a"},{tag:[pe.typeName,pe.namespace],color:"#085"},{tag:pe.className,color:"#167"},{tag:[pe.special(pe.variableName),pe.macroName],color:"#256"},{tag:pe.definition(pe.propertyName),color:"#00c"},{tag:pe.comment,color:"#940"},{tag:pe.invalid,color:"#f00"}]),Oge=ot.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),uU=1e4,hU="()[]{}",dU=mt.define({combine(t){return lc(t,{afterCursor:!0,brackets:hU,maxScanDistance:uU,renderMatch:Rge})}}),Ege=Et.mark({class:"cm-matchingBracket"}),Mge=Et.mark({class:"cm-nonmatchingBracket"});function Rge(t){let e=[],n=t.matched?Ege:Mge;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function cI(t){let e=[],n=t.facet(dU);for(let r of t.selection.ranges){if(!r.empty)continue;let i=Wl(t,r.head,-1,n)||r.head>0&&Wl(t,r.head-1,1,n)||n.afterCursor&&(Wl(t,r.head,1,n)||r.head<t.doc.length&&Wl(t,r.head+1,-1,n));i&&(e=e.concat(n.renderMatch(i,t)))}return Et.set(e,!0)}const Dge=Wr.fromClass(class{constructor(t){this.paused=!1,this.decorations=cI(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=cI(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),Nge=[Dge,Oge];function fU(t={}){return[dU.of(t),Nge]}const Ige=new on;function Ck(t,e,n){let r=t.prop(e<0?on.openedBy:on.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function _k(t){let e=t.type.prop(Ige);return e?e(t.node):t}function Wl(t,e,n,r={}){let i=r.maxScanDistance||uU,s=r.brackets||hU,o=Di(t),l=o.resolveInner(e,n);for(let u=l;u;u=u.parent){let h=Ck(u.type,n,s);if(h&&u.from<u.to){let f=_k(u);if(f&&(n>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return Bge(t,e,n,u,f,h,s)}}return Lge(t,e,n,o,l.type,i,s)}function Bge(t,e,n,r,i,s,o){let l=r.parent,u={from:i.from,to:i.to},h=0,f=l==null?void 0:l.cursor();if(f&&(n<0?f.childBefore(r.from):f.childAfter(r.to)))do if(n<0?f.to<=r.from:f.from>=r.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let p=_k(f);return{start:u,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(Ck(f.type,n,o))h++;else if(Ck(f.type,-n,o)){if(h==0){let p=_k(f);return{start:u,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(n<0?f.prevSibling():f.nextSibling());return{start:u,matched:!1}}function Lge(t,e,n,r,i,s,o){if(n<0?!e:e==t.doc.length)return null;let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),u=o.indexOf(l);if(u<0||u%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},f=t.doc.iterRange(e,n>0?t.doc.length:0),p=0;for(let m=0;!f.next().done&&m<=s;){let v=f.value;n<0&&(m+=v.length);let y=e+m*n;for(let x=n>0?0:v.length-1,w=n>0?v.length:-1;x!=w;x+=n){let A=o.indexOf(v[x]);if(!(A<0||r.resolveInner(y+x,1).type!=i))if(A%2==0==n>0)p++;else{if(p==1)return{start:h,end:{from:y+x,to:y+x+1},matched:A>>1==u>>1};p--}}n>0&&(m+=v.length)}return f.done?{start:h,matched:!1}:null}const Pge=Object.create(null),uI=[ga.none],hI=[],dI=Object.create(null),Fge=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Fge[t]=zge(Pge,e);function M_(t,e){hI.indexOf(t)>-1||(hI.push(t),console.warn(e))}function zge(t,e){let n=[];for(let l of e.split(" ")){let u=[];for(let h of l.split(".")){let f=t[h]||pe[h];f?typeof f=="function"?u.length?u=u.map(f):M_(h,`Modifier ${h} used at start of tag`):u.length?M_(h,`Tag ${h} used as modifier`):u=Array.isArray(f)?f:[f]:M_(h,`Unknown highlighting tag ${h}`)}for(let h of u)n.push(h)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),s=dI[i];if(s)return s.id;let o=dI[i]=ga.define({id:uI.length,name:r,props:[o$({[r]:n})]});return uI.push(o),o.id}lr.RTL,lr.LTR;function Hge(t,e){if(!e||e.type.id!==Gp)return null;const n={card:zl.CardOneToOne,matchingLabels:[],on:!1,include:[],fill:{lhs:null,rhs:null}},r=e.getChild(ade);if(r){n.on=r.getChild(Khe)!==null;const o=r.getChild(Yp),l=o?o.getChildren(Tv):[];for(const p of l)n.matchingLabels.push(t.sliceDoc(p.from,p.to));const u=r.getChild(Zhe),h=r.getChild(Jhe),f=u||h;if(f){n.card=u?zl.CardManyToOne:zl.CardOneToMany;const p=f.nextSibling,m=(p==null?void 0:p.getChildren(Tv))||[];for(const v of m)n.include.push(t.sliceDoc(v.from,v.to))}}const i=e.getChild(ode);if(i){const o=i.getChild(lde),l=i.getChild(cde),u=i.getChild(ude),h=f=>{const p=f.getChild(z2);return p?parseFloat(t.sliceDoc(p.from,p.to)):null};if(o){const f=h(o);n.fill.lhs=f,n.fill.rhs=f}l&&(n.fill.lhs=h(l)),u&&(n.fill.rhs=h(u))}return Th(e,d6,f6,p6)&&n.card===zl.CardOneToOne&&(n.card=zl.CardManyToMany),n}let qge=class{constructor(e){this.tree=Di(e),this.state=e,this.diagnostics=[]}getDiagnostics(){return this.diagnostics.sort((e,n)=>e.from-n.from)}analyze(){this.checkAST(this.tree.topNode.firstChild),this.diagnoseAllErrorNodes()}diagnoseAllErrorNodes(){const e=this.tree.cursor();for(;e.next();)if(e.type.id===0&&e.to!==this.tree.topNode.to){const n=e.node.parent;this.diagnostics.push({severity:"error",message:"unexpected expression",from:n?n.from:e.from,to:n?n.to:e.to})}}checkAST(e){if(!e)return re.none;switch(e.type.id){case F2:this.checkAggregationExpr(e);break;case Gp:this.checkBinaryExpr(e);break;case zT:this.checkCallFunction(e);break;case w$:this.checkAST(e.getChild("Expr"));break;case S$:{const n=this.checkAST(e.getChild("Expr"));n!==re.scalar&&n!==re.vector&&this.addDiagnostic(e,`unary expression only allowed on expressions of type scalar or instant vector, got ${n}`);break}case A$:{this.checkAnchoredSmoothedExpr(e,[$T,qT,HT]);break}case x$:{this.checkAnchoredSmoothedExpr(e,[y$,b$,$T,qT,HT]);break}case Cf:{const n=this.checkAST(e.getChild("Expr"));n!==re.vector&&this.addDiagnostic(e,`subquery is only allowed on instant vector, got ${n} in ${e.name} instead`);break}case Nm:this.checkAST(e.getChild("Expr"));break;case Lb:this.checkVectorSelector(e);break;case m6:{const n=this.checkAST(e.getChild("Expr"));n!==re.vector&&n!==re.matrix&&this.addDiagnostic(e,"@ modifier must be preceded by an instant selector vector or range vector selector or a subquery");break}}return Nl(e)}checkAggregationExpr(e){var n;const r=(n=e.firstChild)===null||n===void 0?void 0:n.firstChild;if(!r){this.addDiagnostic(e,"aggregation operator expected in aggregation expression but got nothing");return}const i=e.getChild(Rh),s=i?i.getChildren("Expr"):[];if(!s.length){this.addDiagnostic(e,"unable to find the parameter for the expression");return}this.expectType(s[s.length-1],re.vector,"aggregation expression"),(r.type.id===p$||r.type.id===u$||r.type.id===d$||r.type.id===f$||r.type.id===ede)&&this.expectType(s[0],re.scalar,"aggregation parameter"),r.type.id===h$&&this.expectType(s[0],re.string,"aggregation parameter")}checkBinaryExpr(e){const n=e.firstChild,r=e.lastChild;if(!n||!r){this.addDiagnostic(e,"left or right expression is missing in binary expression");return}const i=this.checkAST(n),s=this.checkAST(r),o=e.getChild(m$),l=Th(e,IT,Ov,PT,FT,BT,LT),u=DA(e,v$),h=DA(e,g$),f=Th(e,d6,f6,p6);o?l||this.addDiagnostic(e,"bool modifier can only be used on comparison operators"):i===re.scalar&&s===re.scalar&&(l?this.addDiagnostic(e,"comparisons between scalars must use BOOL modifier"):u?this.addDiagnostic(e,'operator ">/" not allowed for Scalar operations'):h&&this.addDiagnostic(e,'operator "</" not allowed for Scalar operations'));const p=Hge(this.state,e);if(p!==null&&p.on)for(const m of p.matchingLabels)for(const v of p.include)m===v&&this.addDiagnostic(e,`label "${m}" must not occur in ON and GROUP clause at once`);i!==re.scalar&&i!==re.vector&&this.addDiagnostic(n,"binary expression must contain only scalar and instant vector types"),s!==re.scalar&&s!==re.vector&&this.addDiagnostic(r,"binary expression must contain only scalar and instant vector types"),(i!==re.vector||s!==re.vector)&&p!==null?p.matchingLabels.length>0&&this.addDiagnostic(e,"vector matching only allowed between instant vectors"):f&&(((p==null?void 0:p.card)===zl.CardOneToMany||(p==null?void 0:p.card)===zl.CardManyToOne)&&this.addDiagnostic(e,"no grouping allowed for set operations"),(p==null?void 0:p.card)!==zl.CardManyToMany&&this.addDiagnostic(e,"set operations must always be many-to-many")),(i===re.scalar||s===re.scalar)&&f&&this.addDiagnostic(e,"set operator not allowed in binary scalar expression")}checkCallFunction(e){var n;const r=(n=e.firstChild)===null||n===void 0?void 0:n.firstChild;if(!r){this.addDiagnostic(e,"function not defined");return}const i=e.getChild(Rh),s=i?i.getChildren("Expr"):[],o=_$(r.type.id),l=o.argTypes.length;if(o.variadic===0)s.length!==l&&this.addDiagnostic(e,`expected ${l} argument(s) in call to "${o.name}", got ${s.length}`);else{const h=l-1;if(h>s.length)this.addDiagnostic(e,`expected at least ${h} argument(s) in call to "${o.name}", got ${s.length}`);else{const f=h+o.variadic;o.variadic>0&&f<s.length&&this.addDiagnostic(e,`expected at most ${f} argument(s) in call to "${o.name}", got ${s.length}`)}}o.name==="info"&&s.length>1&&s[1].getChild(EA)&&this.addDiagnostic(e,`expected label selectors as the second argument to "info" function, got ${s[1].type}`);let u=0;for(let h=0;h<s.length;h++){if(u=h,u>=o.argTypes.length){if(o.variadic===0)break;u=o.argTypes.length-1}this.expectType(s[h],o.argTypes[u],`call to function "${o.name}"`)}}checkAnchoredSmoothedExpr(e,n){var r,i;const s=Nl(e);if(s!==re.vector&&s!==re.matrix){this.addDiagnostic(e,`smoothed/anchored expression only allowed on instant vector or range vector selector, got ${s} instead`);return}const o=(r=e.parent)===null||r===void 0?void 0:r.parent;if(!o||o.type.id!==zT)return;const l=(i=o.firstChild)===null||i===void 0?void 0:i.firstChild;if(!l){this.addDiagnostic(e,"function not defined");return}n.includes(l.type.id)||this.addDiagnostic(e,"smoothed/anchored expression can only be used in specific functions")}checkVectorSelector(e){const n=e.getChild(Xp),r=[kv,vf,_h];let i=[];for(const u of r)i=i.concat(k$(n?n.getChildren(u):[],this.state));let s="";const o=e.getChild(EA);if(o&&(s=this.state.sliceDoc(o.from,o.to)),s!==""){const u=i.find(h=>h.name==="__name__");u&&this.addDiagnostic(e,`metric name must not be set twice: ${s} or ${u.value}`),i.push(new T$(Pb,"__name__",s))}else{const u=i.filter(h=>h.name==="__name__");u.length>1&&this.addDiagnostic(e,`metric name must not be set twice: ${u[0].value} or ${u[1].value}`)}i.every(u=>u.matchesEmpty())&&this.addDiagnostic(e,"vector selector must contain at least one non-empty matcher")}expectType(e,n,r){const i=this.checkAST(e);i!==n&&this.addDiagnostic(e,`expected type ${n} in ${r}, got ${i}`)}addDiagnostic(e,n){this.diagnostics.push({severity:"error",message:n,from:e.from,to:e.to})}};class pU{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Di(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(mU(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function fI(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function $ge(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=fI(e)+fI(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function Qge(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:$ge(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}class pI{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function yf(t){return t.selection.main.from}function mU(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const L6=oc.define();function Uge(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(l=>{if(l!=i&&n!=r&&t.sliceDoc(l.from+s,l.from+o)!=t.sliceDoc(n,r))return{range:l};let u=t.toText(e);return{changes:{from:l.from+s,to:r==i.from?l.to:l.from+o,insert:u},range:De.cursor(l.from+s+u.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const mI=new WeakMap;function Wge(t){if(!Array.isArray(t))return t;let e=mI.get(t);return e||mI.set(t,e=Qge(t)),e}const XA=Wt.define(),qv=Wt.define();class Vge{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ca(e,n),i=ql(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(ca(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let S=ca(e,0),C=ql(S),j=C==e.length?0:-100;if(S!=n[0])if(S==r[0])j+=-200;else return null;return this.ret(j,[0,C])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let u=n.length,h=0;if(l<0){for(let S=0,C=Math.min(e.length,200);S<C&&h<u;){let j=ca(e,S);(j==n[h]||j==r[h])&&(i[h++]=S),S+=ql(j)}if(h<u)return null}let f=0,p=0,m=!1,v=0,y=-1,x=-1,w=/[a-z]/.test(e),A=!0;for(let S=0,C=Math.min(e.length,200),j=0;S<C&&p<u;){let _=ca(e,S);l<0&&(f<u&&_==n[f]&&(s[f++]=S),v<u&&(_==n[v]||_==r[v]?(v==0&&(y=S),x=S+1,v++):v=0));let O,M=_<255?_>=48&&_<=57||_>=97&&_<=122?2:_>=65&&_<=90?1:0:(O=v6(_))!=O.toLowerCase()?1:O!=O.toUpperCase()?2:0;(!S||M==1&&w||j==0&&M!=0)&&(n[p]==_||r[p]==_&&(m=!0)?o[p++]=S:o.length&&(A=!1)),j=M,S+=ql(_)}return p==u&&o[0]==0&&A?this.result(-100+(m?-200:0),o,e):v==u&&y==0?this.ret(-200-e.length+(x==e.length?0:-100),[0,x]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):v==u?this.ret(-900-e.length,[y,x]):p==u?this.result(-100+(m?-200:0)+-700+(A?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let l=o+(this.astral?ql(ca(r,o)):1);s&&i[s-1]==o?i[s-1]=l:(i[s++]=o,i[s++]=l)}return this.ret(e-r.length,i)}}class Yge{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Wi=mt.define({combine(t){return lc(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Gge,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>gI(e(r),n(r)),optionClass:(e,n)=>r=>gI(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function gI(t,e){return t?e?t+" "+e:t:e}function Gge(t,e,n,r,i,s){let o=t.textDirection==lr.RTL,l=o,u=!1,h="top",f,p,m=e.left-i.left,v=i.right-e.right,y=r.right-r.left,x=r.bottom-r.top;if(l&&m<Math.min(y,v)?l=!1:!l&&v<Math.min(y,m)&&(l=!0),y<=(l?m:v))f=Math.max(i.top,Math.min(n.top,i.bottom-x))-e.top,p=Math.min(400,l?m:v);else{u=!0,p=Math.min(400,(o?e.right:i.right-e.left)-30);let S=i.bottom-e.bottom;S>=x||S>e.top?f=n.bottom-e.top:(h="bottom",f=e.bottom-n.top)}let w=(e.bottom-e.top)/s.offsetHeight,A=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${f/w}px; max-width: ${p/A}px`,class:"cm-completionInfo-"+(u?o?"left-narrow":"right-narrow":l?"left":"right")}}const P6=Wt.define();function Xge(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let l=n.displayLabel||n.label,u=0;for(let h=0;h<s.length;){let f=s[h++],p=s[h++];f>u&&o.appendChild(document.createTextNode(l.slice(u,f)));let m=o.appendChild(document.createElement("span"));m.appendChild(document.createTextNode(l.slice(f,p))),m.className="cm-completionMatchedText",u=p}return u<l.length&&o.appendChild(document.createTextNode(l.slice(u))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function R_(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.ceil((t-e)/n);return{from:t-r*n,to:t-(r-1)*n}}class Kge{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:u=>this.placeInfo(u),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,l=e.state.facet(Wi);this.optionContent=Xge(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=R_(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",u=>{let{options:h}=e.state.field(n).open;for(let f=u.target,p;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(p=/-(\d+)$/.exec(f.id))&&+p[1]<h.length){this.applyCompletion(e,h[+p[1]]),u.preventDefault();return}if(u.target==this.list){let f=this.list.classList.contains("cm-completionListIncompleteTop")&&u.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&u.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;f!=null&&(e.dispatch({effects:P6.of(f)}),u.preventDefault())}}),this.dom.addEventListener("focusout",u=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Wi).closeOnBlur&&u.relatedTarget!=e.contentDOM&&e.dispatch({effects:qv.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:l}=r.open;(!i.open||i.open.options!=s)&&(this.range=R_(s.length,o,e.state.facet(Wi).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),l!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=R_(n.options.length,n.selected,this.view.state.facet(Wi).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,i)}).catch(l=>Qs(this.view.state,l,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&Jge(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Wi).positionInfo(this.view,n,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:l,match:u}=e[o],{section:h}=l;if(h){let m=typeof h=="string"?h:h.name;if(m!=s&&(o>r.from||r.from==0))if(s=m,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let v=i.appendChild(document.createElement("completion-section"));v.textContent=m}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+o,f.setAttribute("role","option");let p=this.optionClass(l);p&&(f.className=p);for(let m of this.optionContent){let v=m(l,this.view.state,this.view,u);v&&f.appendChild(v)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Zge(t,e){return n=>new Kge(n,t,e)}function Jge(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function vI(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function eve(t,e){let n=[],r=null,i=null,s=f=>{n.push(f);let{section:p}=f.completion;if(p){r||(r=[]);let m=typeof p=="string"?p:p.name;r.some(v=>v.name==m)||r.push(typeof p=="string"?{name:m}:p)}},o=e.facet(Wi);for(let f of t)if(f.hasResult()){let p=f.result.getMatch;if(f.result.filter===!1)for(let m of f.result.options)s(new pI(m,f.source,p?p(m):[],1e9-n.length));else{let m=e.sliceDoc(f.from,f.to),v,y=o.filterStrict?new Yge(m):new Vge(m);for(let x of f.result.options)if(v=y.match(x.label)){let w=x.displayLabel?p?p(x,v.matched):[]:v.matched,A=v.score+(x.boost||0);if(s(new pI(x,f.source,w,A)),typeof x.section=="object"&&x.section.rank==="dynamic"){let{name:S}=x.section;i||(i=Object.create(null)),i[S]=Math.max(A,i[S]||-1e9)}}}}if(r){let f=Object.create(null),p=0,m=(v,y)=>(v.rank==="dynamic"&&y.rank==="dynamic"?i[y.name]-i[v.name]:0)||(typeof v.rank=="number"?v.rank:1e9)-(typeof y.rank=="number"?y.rank:1e9)||(v.name<y.name?-1:1);for(let v of r.sort(m))p-=1e5,f[v.name]=p;for(let v of n){let{section:y}=v.completion;y&&(v.score+=f[typeof y=="string"?y:y.name])}}let l=[],u=null,h=o.compareCompletions;for(let f of n.sort((p,m)=>m.score-p.score||h(p.completion,m.completion))){let p=f.completion;!u||u.label!=p.label||u.detail!=p.detail||u.type!=null&&p.type!=null&&u.type!=p.type||u.apply!=p.apply||u.boost!=p.boost?l.push(f):vI(f.completion)>vI(u)&&(l[l.length-1]=f),u=f.completion}return l}class Fp{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Fp(this.options,bI(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(h=>h.isPending))return i.setDisabled();let l=eve(e,n);if(!l.length)return i&&e.some(h=>h.isPending)?i.setDisabled():null;let u=n.facet(Wi).selectOnOpen?0:-1;if(i&&i.selected!=u&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<l.length;f++)if(l[f].completion==h){u=f;break}}return new Fp(l,bI(r,u),{pos:e.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:ave,above:s.aboveCursor},i?i.timestamp:Date.now(),u,!1)}map(e){return new Fp(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Fp(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class KA{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new KA(ive,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Wi),s=(r.override||n.languageDataAt("autocomplete",yf(n)).map(Wge)).map(u=>(this.active.find(f=>f.source==u)||new po(u,this.active.some(f=>f.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((u,h)=>u==this.active[h])&&(s=this.active);let o=this.open,l=e.effects.some(u=>u.is(F6));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(u=>u.hasResult()&&e.changes.touchesRange(u.from,u.to))||!tve(s,this.active)||l?o=Fp.build(s,n,this.id,o,r,l):o&&o.disabled&&!s.some(u=>u.isPending)&&(o=null),!o&&s.every(u=>!u.isPending)&&s.some(u=>u.hasResult())&&(s=s.map(u=>u.hasResult()?new po(u.source,0):u));for(let u of e.effects)u.is(P6)&&(o=o&&o.setSelected(u.value,this.id));return s==this.active&&o==this.open?this:new KA(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?nve:rve}}function tve(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const nve={"aria-autocomplete":"list"},rve={};function bI(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const ive=[];function gU(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(L6);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class po{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=gU(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new po(i.source,0)),r&4&&i.state==0&&(i=new po(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(XA))i=new po(i.source,1,s.value);else if(s.is(qv))i=new po(i.source,0);else if(s.is(F6))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(yf(e.state))}}class tm extends po{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=yf(e.state);if(l>o||!i||n&2&&(yf(e.startState)==this.from||l<this.limit))return new po(this.source,n&4?1:0);let u=e.changes.mapPos(this.limit);return sve(i.validFor,e.state,s,o)?new tm(this.source,this.explicit,u,i,s,o):i.update&&(i=i.update(i,s,o,new pU(e.state,l,!1)))?new tm(this.source,this.explicit,u,i,i.from,(r=i.to)!==null&&r!==void 0?r:yf(e.state)):new po(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new tm(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new po(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function sve(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):mU(t,!0).test(i)}const F6=Wt.define({map(t,e){return t.map(n=>n.map(e))}}),ua=gs.define({create(){return KA.start()},update(t,e){return t.update(e)},provide:t=>[N6.from(t,e=>e.tooltip),ot.contentAttributes.from(t,e=>e.attrs)]});function z6(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(ua).active.find(i=>i.source==e.source);return r instanceof tm?(typeof n=="string"?t.dispatch({...Uge(t.state,n,r.from,r.to),annotations:L6.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const ave=Zge(ua,z6);function U1(t,e="option"){return n=>{let r=n.state.field(ua,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Wi).interactionDelay)return!1;let i=1,s;e=="page"&&(s=GQ(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:P6.of(l)}),!0}}const ove=t=>{let e=t.state.field(ua,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Wi).interactionDelay?!1:z6(t,e.open.options[e.open.selected])},D_=t=>t.state.field(ua,!1)?(t.dispatch({effects:XA.of(!0)}),!0):!1,lve=t=>{let e=t.state.field(ua,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:qv.of(null)}),!0)};class cve{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const uve=50,hve=1e3,dve=Wr.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(ua).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(ua),n=t.state.facet(Wi);if(!t.selectionSet&&!t.docChanged&&t.startState.field(ua)==e)return;let r=t.transactions.some(s=>{let o=gU(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>uve&&Date.now()-o.time>hve){for(let l of o.context.abortListeners)try{l()}catch(u){Qs(this.view.state,u)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(XA)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(ua);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Wi).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=yf(e),r=new pU(e,n,t.explicit,this.view),i=new cve(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:qv.of(null)}),Qs(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Wi).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Wi),r=this.view.state.field(ua);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let l=yf(s.updates.length?s.updates[0].startState:this.view.state),u=Math.min(l,s.done.from+(s.active.explicit?0:1)),h=new tm(s.active.source,s.active.explicit,u,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:l);for(let f of s.updates)h=h.update(f,n);if(h.hasResult()){e.push(h);continue}}let o=r.active.find(l=>l.source==s.active.source);if(o&&o.isPending)if(s.done==null){let l=new po(s.active.source,0);for(let u of s.updates)l=l.update(u,n);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:F6.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(ua,!1);if(e&&e.tooltip&&this.view.state.facet(Wi).closeOnBlur){let n=e.open&&GQ(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:qv.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:XA.of(!1)}),20),this.composing=0}}}),fve=typeof navigator=="object"&&/Win/.test(navigator.platform),pve=gu.highest(ot.domEventHandlers({keydown(t,e){let n=e.state.field(ua,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(fve&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&z6(e,r),!1}})),vU=ot.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class mve{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class H6{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,ps.TrackDel),r=e.mapPos(this.to,1,ps.TrackDel);return n==null||r==null?null:new H6(this.field,n,r)}}class q6{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(r.length){let h=o,f=/^\t*/.exec(u)[0].length;for(let p=0;p<f;p++)h+=e.facet(qb);i.push(n+h.length-f),u=h+u.slice(f)}r.push(u),n+=u.length+1}let l=this.fieldPositions.map(u=>new H6(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,u=s[2]||s[3]||"",h=-1,f=u.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<n.length;p++)(l!=null?n[p].seq==l:f&&n[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<n.length&&(l==null||n[p].seq!=null&&n[p].seq<l);)p++;n.splice(p,0,{seq:l,name:f}),h=p;for(let m of i)m.field>=h&&m.field++}for(let p of i)if(p.line==r.length&&p.from>s.index){let m=s[2]?3+(s[1]||"").length:2;p.from-=m,p.to-=m}i.push(new mve(h,r.length,s.index,s.index+f.length)),o=o.slice(0,s.index)+u+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,u,h)=>{for(let f of i)f.line==r.length&&f.from>h&&(f.from--,f.to--);return u}),r.push(o)}return new q6(r,i)}}let gve=Et.widget({widget:new class extends gl{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),vve=Et.mark({class:"cm-snippetField"});class h0{constructor(e,n){this.ranges=e,this.active=n,this.deco=Et.set(e.map(r=>(r.from==r.to?gve:vve).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new h0(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Qb=Wt.define({map(t,e){return t&&t.map(e)}}),bve=Wt.define(),$v=gs.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Qb))return n.value;if(n.is(bve)&&t)return new h0(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ot.decorations.from(t,e=>e?e.deco:Et.none)});function $6(t,e){return De.create(t.filter(n=>n.field==e).map(n=>De.range(n.from,n.to)))}function Ap(t){let e=q6.parse(t);return(n,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(n.state,i),{main:u}=n.state.selection,h={changes:{from:i,to:s==u.from?u.to:s,insert:Sn.of(o)},scrollIntoView:!0,annotations:r?[L6.of(r),Ai.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=$6(l,0)),l.some(f=>f.field>0)){let f=new h0(l,0),p=h.effects=[Qb.of(f)];n.state.field($v,!1)===void 0&&p.push(Wt.appendConfig.of([$v,Sve,jve,vU]))}n.dispatch(n.state.update(h))}}function bU(t){return({state:e,dispatch:n})=>{let r=e.field($v,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:$6(r.ranges,i),effects:Qb.of(s?null:new h0(r.ranges,i)),scrollIntoView:!0})),!0}}const yve=({state:t,dispatch:e})=>t.field($v,!1)?(e(t.update({effects:Qb.of(null)})),!0):!1,xve=bU(1),Ave=bU(-1),wve=[{key:"Tab",run:xve,shift:Ave},{key:"Escape",run:yve}],yI=mt.define({combine(t){return t.length?t[0]:wve}}),Sve=gu.highest(Dh.compute([yI],t=>t.facet(yI))),jve=ot.domEventHandlers({mousedown(t,e){let n=e.state.field($v,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:$6(n.ranges,i.field),effects:Qb.of(n.ranges.some(s=>s.field>i.field)?new h0(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Qv={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Kd=Wt.define({map(t,e){let n=e.mapPos(t,-1,ps.TrackAfter);return n??void 0}}),Q6=new class extends Hh{};Q6.startSide=1;Q6.endSide=-1;const yU=gs.define({create(){return dn.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Kd)&&(t=t.update({add:[Q6.range(n.value,n.value+1)]}));return t}});function xU(){return[_ve,yU]}const N_="()[]{}<>«»»«［］｛｝";function AU(t){for(let e=0;e<N_.length;e+=2)if(N_.charCodeAt(e)==t)return N_.charAt(e+1);return v6(t<128?t:t+1)}function wU(t,e){return t.languageDataAt("closeBrackets",e)[0]||Qv}const Cve=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),_ve=ot.inputHandler.of((t,e,n,r)=>{if((Cve?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&ql(ca(r,0))==1||e!=i.from||n!=i.to)return!1;let s=kve(t.state,r);return s?(t.dispatch(s),!0):!1}),Tve=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=wU(t,t.selection.main.head).brackets||Qv.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let l=Ove(t.doc,o.head);for(let u of r)if(u==l&&K2(t.doc,o.head)==AU(ca(u,0)))return{changes:{from:o.head-u.length,to:o.head+u.length},range:De.cursor(o.head-u.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},SU=[{key:"Backspace",run:Tve}];function kve(t,e){let n=wU(t,t.selection.main.head),r=n.brackets||Qv.brackets;for(let i of r){let s=AU(ca(i,0));if(e==i)return s==i?Rve(t,i,r.indexOf(i+i+i)>-1,n):Eve(t,i,s,n.before||Qv.before);if(e==s&&jU(t,t.selection.main.from))return Mve(t,i,s)}return null}function jU(t,e){let n=!1;return t.field(yU).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function K2(t,e){let n=t.sliceString(e,e+2);return n.slice(0,ql(ca(n,0)))}function Ove(t,e){let n=t.sliceString(e-2,e);return ql(ca(n,0))==n.length?n:n.slice(1)}function Eve(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Kd.of(o.to+e.length),range:De.range(o.anchor+e.length,o.head+e.length)};let l=K2(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:Kd.of(o.head+e.length),range:De.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Mve(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&K2(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:De.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Rve(t,e,n,r){let i=r.stringPrefixes||Qv.stringPrefixes,s=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Kd.of(l.to+e.length),range:De.range(l.anchor+e.length,l.head+e.length)};let u=l.head,h=K2(t.doc,u),f;if(h==e){if(xI(t,u))return{changes:{insert:e+e,from:u},effects:Kd.of(u+e.length),range:De.cursor(u+e.length)};if(jU(t,u)){let m=n&&t.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+m.length,insert:m},range:De.cursor(u+m.length)}}}else{if(n&&t.sliceDoc(u-2*e.length,u)==e+e&&(f=AI(t,u-2*e.length,i))>-1&&xI(t,f))return{changes:{insert:e+e+e+e,from:u},effects:Kd.of(u+e.length),range:De.cursor(u+e.length)};if(t.charCategorizer(u)(h)!=Ir.Word&&AI(t,u,i)>-1&&!Dve(t,u,e,i))return{changes:{insert:e+e,from:u},effects:Kd.of(u+e.length),range:De.cursor(u+e.length)}}return{range:s=l}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function xI(t,e){let n=Di(t).resolveInner(e+1);return n.parent&&n.from==e}function Dve(t,e,n,r){let i=Di(t).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),u=l.indexOf(n);if(!u||u>-1&&r.indexOf(l.slice(0,u))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+u;){if(t.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function AI(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Ir.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=Ir.Word)return s}return-1}function CU(t={}){return[pve,ua,Wi.of(t),dve,Nve,vU]}const U6=[{key:"Ctrl-Space",run:D_},{mac:"Alt-`",run:D_},{mac:"Alt-i",run:D_},{key:"Escape",run:lve},{key:"ArrowDown",run:U1(!0)},{key:"ArrowUp",run:U1(!1)},{key:"PageDown",run:U1(!0,"page")},{key:"PageUp",run:U1(!1,"page")},{key:"Enter",run:ove}],Nve=gu.highest(Dh.computeN([Wi],t=>t.facet(Wi).defaultKeymap?[U6]:[])),W6=[{label:"y"},{label:"w"},{label:"d"},{label:"h"},{label:"m"},{label:"s"},{label:"ms"}],Ive=[{label:"="},{label:"!="},{label:"=~"},{label:"!~"}],_U=[{label:"^"},{label:"*"},{label:"/"},{label:"%"},{label:"+"},{label:"-"},{label:"=="},{label:">="},{label:">"},{label:"<"},{label:"</"},{label:">/"},{label:"<="},{label:"!="},{label:"atan2"},{label:"and"},{label:"or"},{label:"unless"}],Bve=[{label:"on",info:"Match only on specified labels",type:"keyword"},{label:"ignoring",info:"Ignore specified labels for matching",type:"keyword"},{label:"group_left",info:"Allow many-to-one matching",type:"keyword"},{label:"group_right",info:"Allow one-to-many matching",type:"keyword"},{label:"bool",info:"Return boolean result (0 or 1) instead of filtering",type:"keyword"},{label:"fill",info:"Fill in missing series on both sides",type:"keyword"},{label:"fill_left",info:"Fill in missing series on the left side",type:"keyword"},{label:"fill_right",info:"Fill in missing series on the right side",type:"keyword"}],Lve=[{label:"start()",info:"resolve to the start of the query",type:"keyword"},{label:"end()",info:"resolve to the end of the query",type:"keyword"}],Pve=[{label:"abs",detail:"function",info:"Return absolute values of input series",type:"function"},{label:"absent",detail:"function",info:"Determine whether input vector is empty",type:"function"},{label:"absent_over_time",detail:"function",info:"Determine whether input range vector is empty",type:"function"},{label:"acos",detail:"function",info:"Calculate the arccosine, in radians, for input series",type:"function"},{label:"acosh",detail:"function",info:"Calculate the inverse hyperbolic cosine, in radians, for input series",type:"function"},{label:"asin",detail:"function",info:"Calculate the arcsine, in radians, for input series",type:"function"},{label:"asinh",detail:"function",info:"Calculate the inverse hyperbolic sine, in radians, for input series",type:"function"},{label:"atan",detail:"function",info:"Calculate the arctangent, in radians, for input series",type:"function"},{label:"atanh",detail:"function",info:"Calculate the inverse hyperbolic tangent, in radians, for input series",type:"function"},{label:"avg_over_time",detail:"function",info:"Average series values over time",type:"function"},{label:"ceil",detail:"function",info:"Round up values of input series to nearest integer",type:"function"},{label:"changes",detail:"function",info:"Return number of value changes in input series over time",type:"function"},{label:"clamp",detail:"function",info:"Limit the value of input series between a minimum and a maximum",type:"function"},{label:"clamp_max",detail:"function",info:"Limit the value of input series to a maximum",type:"function"},{label:"clamp_min",detail:"function",info:"Limit the value of input series to a minimum",type:"function"},{label:"cos",detail:"function",info:"Calculate the cosine, in radians, for input series",type:"function",boost:-1},{label:"cosh",detail:"function",info:"Calculate the hyperbolic cosine, in radians, for input series",type:"function",boost:-1},{label:"count_over_time",detail:"function",info:"Count the number of values for each input series",type:"function"},{label:"days_in_month",detail:"function",info:"Return the number of days in current month for provided timestamps",type:"function"},{label:"day_of_month",detail:"function",info:"Return the day of the month for provided timestamps",type:"function"},{label:"day_of_week",detail:"function",info:"Return the day of the week for provided timestamps",type:"function"},{label:"day_of_year",detail:"function",info:"Return the day of the year for provided timestamps",type:"function"},{label:"deg",detail:"function",info:"Convert radians to degrees for input series",type:"function",boost:-1},{label:"delta",detail:"function",info:"Calculate the difference between beginning and end of a range vector (for gauges)",type:"function"},{label:"deriv",detail:"function",info:"Calculate the per-second derivative over series in a range vector (for gauges)",type:"function"},{label:"exp",detail:"function",info:"Calculate exponential function for input vector values",type:"function"},{label:"floor",detail:"function",info:"Round down values of input series to nearest integer",type:"function"},{label:"histogram_avg",detail:"function",info:"Return the average of observations from a native histogram",type:"function"},{label:"histogram_count",detail:"function",info:"Return the count of observations from a native histogram",type:"function"},{label:"histogram_fraction",detail:"function",info:"Calculate fractions of observations within an interval from a native histogram",type:"function"},{label:"histogram_quantile",detail:"function",info:"Calculate quantiles from native histograms and from conventional histogram buckets",type:"function"},{label:"histogram_quantiles",detail:"function",info:"Calculate multiple quantiles from native histograms and from conventional histogram buckets",type:"function"},{label:"histogram_sum",detail:"function",info:"Return the sum of observations from a native histogram",type:"function"},{label:"histogram_stddev",detail:"function",info:"Estimate the standard deviation of observations from a native histogram",type:"function"},{label:"histogram_stdvar",detail:"function",info:"Estimate the standard variance of observations from a native histogram",type:"function"},{label:"double_exponential_smoothing",detail:"function",info:"Calculate smoothed value of input series",type:"function"},{label:"end",detail:"function",info:"Return the query end timestamp in seconds",type:"function"},{label:"hour",detail:"function",info:"Return the hour of the day for provided timestamps",type:"function"},{label:"idelta",detail:"function",info:"Calculate the difference between the last two samples of a range vector (for counters)",type:"function"},{label:"increase",detail:"function",info:"Calculate the increase in value over a range of time (for counters)",type:"function"},{label:"info",detail:"function",info:"Add data labels from corresponding info metrics",type:"function"},{label:"irate",detail:"function",info:"Calculate the per-second increase over the last two samples of a range vector (for counters)",type:"function"},{label:"label_replace",detail:"function",info:"Set or replace label values",type:"function"},{label:"label_join",detail:"function",info:"Join together label values into new label",type:"function"},{label:"first_over_time",detail:"function",info:"Return the value of the oldest sample in the specified interval",type:"function"},{label:"last_over_time",detail:"function",info:"Return the value of the most recent sample in the specified interval",type:"function"},{label:"ln",detail:"function",info:"Calculate natural logarithm of input series",type:"function"},{label:"log10",detail:"function",info:"Calulcate base-10 logarithm of input series",type:"function"},{label:"log2",detail:"function",info:"Calculate base-2 logarithm of input series",type:"function"},{label:"mad_over_time",detail:"function",info:"Return the median absolute deviation over time for input series",type:"function"},{label:"max_over_time",detail:"function",info:"Return the maximum value over time for input series",type:"function"},{label:"min_over_time",detail:"function",info:"Return the minimum value over time for input series",type:"function"},{label:"ts_of_max_over_time",detail:"function",info:"Return the timestamp of the maximum value over time for input series",type:"function"},{label:"ts_of_min_over_time",detail:"function",info:"Return the timestamp of the minimum value over time for input series",type:"function"},{label:"ts_of_first_over_time",detail:"function",info:"Return the timestamp of the first value over time for input series",type:"function"},{label:"ts_of_last_over_time",detail:"function",info:"Return the timestamp of the last value over time for input series",type:"function"},{label:"minute",detail:"function",info:"Return the minute of the hour for provided timestamps",type:"function"},{label:"month",detail:"function",info:"Return the month for provided timestamps",type:"function"},{label:"pi",detail:"function",info:"Return pi",type:"function"},{label:"predict_linear",detail:"function",info:"Predict the value of a gauge into the future",type:"function"},{label:"present_over_time",detail:"function",info:"the value 1 for any series in the specified interval",type:"function"},{label:"quantile_over_time",detail:"function",info:"Calculate value quantiles over time for input series",type:"function"},{label:"rad",detail:"function",info:"Convert degrees to radians for input series",type:"function",boost:-1},{label:"range",detail:"function",info:"Return the query range in seconds",type:"function"},{label:"rate",detail:"function",info:"Calculate per-second increase over a range vector (for counters)",type:"function"},{label:"resets",detail:"function",info:"Return number of value decreases (resets) in input series of time",type:"function"},{label:"round",detail:"function",info:"Round values of input series to nearest integer",type:"function"},{label:"scalar",detail:"function",info:"Convert single-element series vector into scalar value",type:"function"},{label:"sgn",detail:"function",info:"Returns the sign of the instant vector",type:"function"},{label:"sin",detail:"function",info:"Calculate the sine, in radians, for input series",type:"function"},{label:"sinh",detail:"function",info:"Calculate the hyperbolic sine, in radians, for input series",type:"function"},{label:"sort",detail:"function",info:"Sort input series ascendingly by value",type:"function"},{label:"sort_desc",detail:"function",info:"Sort input series descendingly by value",type:"function"},{label:"sort_by_label",detail:"function",info:"Sort input series ascendingly by label value",type:"function"},{label:"sort_by_label_desc",detail:"function",info:"Sort input series descendingly by value value",type:"function"},{label:"sqrt",detail:"function",info:"Return the square root for input series",type:"function"},{label:"start",detail:"function",info:"Return the query start timestamp in seconds",type:"function"},{label:"step",detail:"function",info:"Return the query step in seconds",type:"function"},{label:"stddev_over_time",detail:"function",info:"Calculate the standard deviation within input series over time",type:"function"},{label:"stdvar_over_time",detail:"function",info:"Calculate the standard variance within input series over time",type:"function"},{label:"sum_over_time",detail:"function",info:"Calculate the sum over the values of input series over time",type:"function"},{label:"tan",detail:"function",info:"Calculate the tangent, in radians, for input series",type:"function"},{label:"tanh",detail:"function",info:"Calculate the hyperbolic tangent, in radians, for input series",type:"function"},{label:"time",detail:"function",info:"Return the Unix timestamp at the current evaluation time",type:"function"},{label:"timestamp",detail:"function",info:"Return the Unix timestamp for the samples in the input vector",type:"function"},{label:"vector",detail:"function",info:"Convert a scalar value into a single-element series vector",type:"function"},{label:"year",detail:"function",info:"Return the year for provided timestamps",type:"function"}],TU=[{label:"avg",detail:"aggregation",info:"Calculate the average over dimensions",type:"keyword"},{label:"bottomk",detail:"aggregation",info:"Smallest k elements by sample value",type:"keyword"},{label:"count",detail:"aggregation",info:"Count number of elements in the vector",type:"keyword"},{label:"count_values",detail:"aggregation",info:"Count number of elements with the same value",type:"keyword"},{label:"group",detail:"aggregation",info:"Group series, while setting the sample value to 1",type:"keyword"},{label:"limitk",detail:"aggregation",info:"Sample k elements",type:"keyword"},{label:"limit_ratio",detail:"aggregation",info:"Sample given ratio of elements",type:"keyword"},{label:"max",detail:"aggregation",info:"Select maximum over dimensions",type:"keyword"},{label:"min",detail:"aggregation",info:"Select minimum over dimensions",type:"keyword"},{label:"quantile",detail:"aggregation",info:"Calculate φ-quantile (0 ≤ φ ≤ 1) over dimensions",type:"keyword"},{label:"stddev",detail:"aggregation",info:"Calculate population standard deviation over dimensions",type:"keyword"},{label:"stdvar",detail:"aggregation",info:"Calculate population standard variance over dimensions",type:"keyword"},{label:"sum",detail:"aggregation",info:"Calculate sum over dimensions",type:"keyword"},{label:"topk",detail:"aggregation",info:"Largest k elements by sample value",type:"keyword"}],Fve=[{label:"by",info:"Keep the listed labels, remove all others.",type:"keyword"},{label:"without",info:"Remove the listed labels, preserve all others.",type:"keyword"}],zve=[{label:"nan",info:"Floating-point NaN value",type:"constant"},{label:"inf",info:"Floating-point infinity",type:"constant"}],Hve=[{label:"sum(rate(__input_vector__[5m]))",type:"function",detail:"snippet",info:"Sum over rates of increase",apply:Ap("sum(rate(${__input_vector__}[5m]))")},{label:"histogram_quantile(__quantile__, sum by(le) (rate(__histogram_metric__[5m])))",type:"function",detail:"snippet",info:"Approximate a quantile value from an aggregated histogram",apply:Ap("histogram_quantile(${__quantile__}, sum by(le) (rate(${__histogram_metric__}[5m])))")},{label:'label_replace(__input_vector__, "__dst__", "__replacement__", "__src__", "__regex__")',type:"function",detail:"snippet",info:"Set or replace a label value in an input vector",apply:Ap('label_replace(${__input_vector__}, "${__dst__}", "${__replacement__}", "${__src__}", "${__regex__}")')},{label:"topk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Largest k elements by sample value",apply:Ap("topk(${__rank_number__}, ${__input_vector__})")},{label:"bottomk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Smallest k elements by sample value",apply:Ap("bottomk(${__rank_number__}, ${__input_vector__})")},{label:'count_values("__label_name__", __input_vector__)',type:"function",detail:"snippet",info:"Count the number of series per distinct sample value",apply:Ap('count_values("${__label_name__}", ${__metric__})')}],Pc={matchOp:Ive,binOp:_U,duration:W6,binOpModifier:Bve,atModifier:Lve,functionIdentifier:Pve,aggregateOp:TU,aggregateOpModifier:Fve,number:zve};var At;(function(t){t[t.MetricName=0]="MetricName",t[t.LabelName=1]="LabelName",t[t.LabelValue=2]="LabelValue",t[t.Function=3]="Function",t[t.Aggregation=4]="Aggregation",t[t.BinOpModifier=5]="BinOpModifier",t[t.BinOp=6]="BinOp",t[t.MatchOp=7]="MatchOp",t[t.AggregateOpModifier=8]="AggregateOpModifier",t[t.Duration=9]="Duration",t[t.Offset=10]="Offset",t[t.Bool=11]="Bool",t[t.AtModifiers=12]="AtModifiers",t[t.Number=13]="Number"})(At||(At={}));function qve(t,e){const n=g6(t,F2);if(!n)return"";let r="";return n.cursor().iterate(i=>{if(i.type.id===Lb&&(r=Pg(i.node,e),r))return!1}),r}function Pg(t,e){let n=g6(t,Lb);return!n||(n=n.getChild(EA),!n)?"":e.sliceDoc(n.from,n.to)}function $ve(t,e,n,r=!1,i=!0){const s=t;return r&&s.push(...Hve),{from:e,to:n,options:s,validFor:i?/^[a-zA-Z0-9_:]+$/:void 0}}function Qve(t){return t.replace(/([\\"])/g,"\\$1")}function Uve(t,e){var n,r;return t.type.id===0?e:t.type.id===Xp||t.type.id===Yp||t.type.id===Rh||t.type.id===Nm||t.type.id===Cf?t.to-1:t.type.id===Dm&&(((n=t.parent)===null||n===void 0?void 0:n.type.id)===_h||((r=t.parent)===null||r===void 0?void 0:r.type.id)===vf)?t.parent.to-1:t.to}const Wve=new RegExp(`^(\\d+(${W6.map(t=>t.label).join("|")}))+$`);function wI(t,e){if(e.from>=e.to)return!1;const n=t.sliceDoc(e.from,e.to);return Wve.test(n)}function Vve(t,e){let n=t.from+1;return t.firstChild!==null&&(n=e),n}function Yve(t,e,n){var r,i,s,o,l,u,h;const f=t.doc.slice(e.from,n).toString();let p=e.from;return e.type.id===Xp||e.type.id===Yp?p=Vve(e,n):e.type.id===Rh&&e.firstChild===null||e.type.id===Dm&&(((r=e.parent)===null||r===void 0?void 0:r.type.id)===_h||((i=e.parent)===null||i===void 0?void 0:i.type.id)===vf)?p++:(e.type.id===Ev||e.type.id===MA&&!W6.map(m=>m.label).includes(f[f.length-1])||e.type.id===z2&&((s=e.parent)===null||s===void 0?void 0:s.type.id)===0&&((o=e.parent.parent)===null||o===void 0?void 0:o.type.id)===Cf||e.type.id===Rh&&kU(e)&&e.firstChild!==null||e.type.id===0&&(((l=e.parent)===null||l===void 0?void 0:l.type.id)===Ev||((u=e.parent)===null||u===void 0?void 0:u.type.id)===Nm||((h=e.parent)===null||h===void 0?void 0:h.type.id)===Cf&&Th(e.parent,MA)))&&(p=n),p}function kU(t){var e;const n=t.parent;if(n!==null&&((e=n.firstChild)===null||e===void 0?void 0:e.type.id)===ide){const r=n.firstChild.firstChild;if(r!==null&&[p$,u$,d$,f$,h$].includes(r.type.id))return!0}return!1}function Gve(t,e,n){var r,i,s,o,l,u,h,f,p,m,v,y,x,w,A,S,C,j,_,O,M;const R=[];switch(e.type.id){case 0:{if(((r=e.parent)===null||r===void 0?void 0:r.type.id)===Ev){R.push({kind:At.Duration});break}if(((i=e.parent)===null||i===void 0?void 0:i.type.id)===_h||((s=e.parent)===null||s===void 0?void 0:s.type.id)===vf){R.push({kind:At.MatchOp});break}if(((o=e.parent)===null||o===void 0?void 0:o.type.id)===Nm){R.push({kind:At.Duration});break}if(((l=e.parent)===null||l===void 0?void 0:l.type.id)===Cf&&Th(e.parent,MA)){R.push({kind:At.Duration});break}const N=t.sliceDoc(e.from,e.to);_U.filter(B=>B.label.includes(N)).length>0&&R.push({kind:At.BinOp});break}case EA:{if(((u=e.parent)===null||u===void 0?void 0:u.type.id)===0){const D=e.parent.parent;if((D==null?void 0:D.type.id)===m6){R.push({kind:At.AtModifiers});break}if((D==null?void 0:D.type.id)===F2){R.push({kind:At.AggregateOpModifier},{kind:At.BinOp});break}if((D==null?void 0:D.type.id)===Lb){const L=Pg(e,t);TU.filter(U=>U.label===L).length>0&&R.push({kind:At.AggregateOpModifier}),R.push({kind:At.BinOp},{kind:At.Offset});break}if(D&&DA(D,"Expr")){R.push({kind:At.BinOp},{kind:At.Offset});break}}const N=(h=e.parent)===null||h===void 0?void 0:h.parent;if(!N){R.push({kind:At.MetricName,metricName:t.sliceDoc(e.from,e.to)});break}DA(N,"Expr","Expr")&&N.type.id!==Rh?N.type.id===Gp&&!Th(N,0)&&(R.push({kind:At.MetricName,metricName:t.sliceDoc(e.from,e.to)},{kind:At.Function},{kind:At.Aggregation},{kind:At.BinOpModifier},{kind:At.Number}),Th(N,IT,BT,LT,PT,FT,Ov)&&!Th(N,m$)&&R.push({kind:At.Bool})):(R.push({kind:At.MetricName,metricName:t.sliceDoc(e.from,e.to)},{kind:At.Function},{kind:At.Aggregation}),N.type.id!==Rh&&N.type.id!==Nm&&R.push({kind:At.Number}));break}case rde:e.firstChild!==null&&e.firstChild.type.id===0&&R.push({kind:At.MetricName,metricName:""},{kind:At.Function},{kind:At.Aggregation},{kind:At.Number});break;case Yp:R.push({kind:At.LabelName,metricName:qve(e,t)});break;case Xp:{if(n>=e.to)break;R.push({kind:At.LabelName,metricName:Pg(e,t)});break}case Tv:((f=e.parent)===null||f===void 0?void 0:f.type.id)===Yp?R.push({kind:At.LabelName}):((p=e.parent)===null||p===void 0?void 0:p.type.id)===_h&&R.push({kind:At.LabelName,metricName:Pg(e,t)});break;case Dm:if(((m=e.parent)===null||m===void 0?void 0:m.type.id)===_h||((v=e.parent)===null||v===void 0?void 0:v.type.id)===vf){let N="";((y=e.parent.firstChild)===null||y===void 0?void 0:y.type.id)===Tv?N=t.sliceDoc(e.parent.firstChild.from,e.parent.firstChild.to):((x=e.parent.firstChild)===null||x===void 0?void 0:x.type.id)===kv&&(N=t.sliceDoc(e.parent.firstChild.from,e.parent.firstChild.to).slice(1,-1));const B=Pg(e,t),D=g6(e,Xp),L=[kv,vf,_h];let U=[];for(const H of L)U=U.concat(k$(D?D.getChildren(H):[],t));R.push({kind:At.LabelValue,metricName:B,labelName:N,matchers:U})}else((A=(w=e.parent)===null||w===void 0?void 0:w.parent)===null||A===void 0?void 0:A.type.id)===Yp?R.push({kind:At.LabelName}):((C=(S=e.parent)===null||S===void 0?void 0:S.parent)===null||C===void 0?void 0:C.type.id)===Xp&&R.push({kind:At.MetricName,metricName:t.sliceDoc(e.from,e.to).slice(1,-1)});break;case z2:((j=e.parent)===null||j===void 0?void 0:j.type.id)===0&&((_=e.parent.parent)===null||_===void 0?void 0:_.type.id)===Cf?wI(t,e)||R.push({kind:At.Duration}):R.push({kind:At.Number});break;case MA:wI(t,e)||R.push({kind:At.Duration});break;case Ev:R.push({kind:At.Duration});break;case Rh:if(kU(e)){if(e.firstChild===null||e.firstChild.from<=n&&e.firstChild.to>=n){R.push({kind:At.Number});break}R.push({kind:At.MetricName,metricName:""},{kind:At.Function},{kind:At.Aggregation});break}R.push({kind:At.MetricName,metricName:""},{kind:At.Function},{kind:At.Aggregation});break;case Ov:((O=e.parent)===null||O===void 0?void 0:O.type.id)===RA?R.push({kind:At.MatchOp}):((M=e.parent)===null||M===void 0?void 0:M.type.id)===Gp&&R.push({kind:At.BinOp});break;case Pb:case j$:case C$:case RA:R.push({kind:At.MatchOp});break;case sde:case hde:case dde:case fde:case pde:case mde:case IT:case BT:case LT:case v$:case g$:case PT:case FT:case d6:case p6:case f6:case Gp:R.push({kind:At.BinOp});break}return R}class I_{constructor(e,n=1e4){this.prometheusClient=e,this.maxMetricsMetadata=n}getPrometheusClient(){return this.prometheusClient}destroy(){var e,n;(n=(e=this.prometheusClient)===null||e===void 0?void 0:e.destroy)===null||n===void 0||n.call(e)}promQL(e){const{state:n,pos:r}=e,i=Di(n).resolve(r,-1),s=Gve(n,i,r);let o=Promise.resolve([]),l=!1,u=!0;for(const h of s)switch(h.kind){case At.Aggregation:l=!0,o=o.then(f=>f.concat(Pc.aggregateOp));break;case At.Function:l=!0,o=o.then(f=>f.concat(Pc.functionIdentifier));break;case At.BinOpModifier:o=o.then(f=>f.concat(Pc.binOpModifier));break;case At.BinOp:o=o.then(f=>f.concat(Pc.binOp));break;case At.MatchOp:o=o.then(f=>f.concat(Pc.matchOp));break;case At.AggregateOpModifier:o=o.then(f=>f.concat(Pc.aggregateOpModifier));break;case At.Duration:u=!1,o=o.then(f=>f.concat(Pc.duration));break;case At.Offset:o=o.then(f=>f.concat([{label:"offset"}]));break;case At.Bool:o=o.then(f=>f.concat([{label:"bool"}]));break;case At.AtModifiers:o=o.then(f=>f.concat(Pc.atModifier));break;case At.Number:o=o.then(f=>f.concat(Pc.number));break;case At.MetricName:o=o.then(f=>this.autocompleteMetricName(f,h));break;case At.LabelName:o=o.then(f=>this.autocompleteLabelName(f,h));break;case At.LabelValue:o=o.then(f=>this.autocompleteLabelValue(f,h))}return o.then(h=>$ve(h,Yve(n,i,r),Uve(i,r),l,u))}autocompleteMetricName(e,n){if(!this.prometheusClient)return e;const r=new Map;return this.prometheusClient.metricNames(n.metricName).then(i=>{var s;for(const o of i)r.set(o,{label:o,type:"constant"});if(i.length<=this.maxMetricsMetadata)return(s=this.prometheusClient)===null||s===void 0?void 0:s.metricMetadata()}).then(i=>{var s;if(i)for(const[o,l]of r){const u=(s=i[o])!==null&&s!==void 0?s:i[o.replace(/(_count|_sum|_bucket|_total)$/,"")];if(u){if(u.length>1)for(const h of u)l.detail===""?l.detail=h.type:l.detail!==h.type&&(l.detail="unknown",l.info="multiple different definitions for this metric"),l.info===""?l.info=h.help:l.info!==h.help&&(l.info="multiple different definitions for this metric");else if(u.length===1){let{type:h,help:f}=u[0];(h==="histogram"||h==="summary")&&(o.endsWith("_count")&&(h="counter",f=`The total number of observations for: ${f}`),o.endsWith("_sum")&&(h="counter",f=`The total sum of observations for: ${f}`),o.endsWith("_bucket")&&(h="counter",f=`The total count of observations for a bucket in the histogram: ${f}`)),l.detail=h,l.info=f}}}return e.concat(Array.from(r.values()))})}autocompleteLabelName(e,n){return this.prometheusClient?this.prometheusClient.labelNames(n.metricName).then(r=>e.concat(r.map(i=>({label:i,type:"constant"})))):e}autocompleteLabelValue(e,n){return!this.prometheusClient||!n.labelName?e:this.prometheusClient.labelValues(n.labelName,n.metricName,n.matchers).then(r=>e.concat(r.map(i=>({label:i,apply:Qve(i),type:"text"}))))}}var Xve={hasSubscribers:!1},Kve=Xve,Zve=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,OU=new Set,SI=typeof process=="object"&&process?process:{},Jve=(t,e,n,r)=>{typeof SI.emitWarning=="function"?SI.emitWarning(t,e,n,r):console.error(`[${n}] ${e}: ${t}`)},ebe=t=>!OU.has(t),rh=t=>!!t&&t===Math.floor(t)&&t>0&&isFinite(t),EU=t=>rh(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Hx:null:null,Hx=class extends Array{constructor(t){super(t),this.fill(0)}},Gl,ym,tbe=(Gl=class{constructor(e,n){Dr(this,"heap");Dr(this,"length");if(!q(Gl,ym))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){let n=EU(e);if(!n)return[];Me(Gl,ym,!0);let r=new Gl(e,n);return Me(Gl,ym,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},ym=new WeakMap,at(Gl,ym,!1),Gl),Z9,J9,co,Ma,qo,uf,$o,xm,Am,Qo,Ci,Uo,yi,jr,Yt,Fs,Ra,ks,Qi,Wo,Ui,Vo,Yo,Da,Na,Go,wh,zs,wm,Ye,Tk,hf,Gc,eb,Ia,MU,df,Sm,tb,ih,sh,kk,Op,qx,RU,DU,$x,dr,Ok,NU,IU,Fg,Ek,zg,ah,Mk,jm,jI=(jm=class{constructor(e){at(this,Ye);at(this,co);at(this,Ma);at(this,qo);at(this,uf);at(this,$o);at(this,xm);at(this,Am);at(this,Qo);Dr(this,"ttl");Dr(this,"ttlResolution");Dr(this,"ttlAutopurge");Dr(this,"updateAgeOnGet");Dr(this,"updateAgeOnHas");Dr(this,"allowStale");Dr(this,"noDisposeOnSet");Dr(this,"noUpdateTTL");Dr(this,"maxEntrySize");Dr(this,"sizeCalculation");Dr(this,"noDeleteOnFetchRejection");Dr(this,"noDeleteOnStaleGet");Dr(this,"allowStaleOnFetchAbort");Dr(this,"allowStaleOnFetchRejection");Dr(this,"ignoreFetchAbort");at(this,Ci);at(this,Uo);at(this,yi);at(this,jr);at(this,Yt);at(this,Fs);at(this,Ra);at(this,ks);at(this,Qi);at(this,Wo);at(this,Ui);at(this,Vo);at(this,Yo);at(this,Da);at(this,Na);at(this,Go);at(this,wh);at(this,zs);at(this,wm);at(this,hf,()=>{});at(this,Gc,()=>{});at(this,eb,()=>{});at(this,Ia,()=>!1);at(this,df,e=>{});at(this,Sm,(e,n,r)=>{});at(this,tb,(e,n,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Dr(this,Z9,"LRUCache");let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:u,dispose:h,onInsert:f,disposeAfter:p,noDisposeOnSet:m,noUpdateTTL:v,maxSize:y=0,maxEntrySize:x=0,sizeCalculation:w,fetchMethod:A,memoMethod:S,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:j,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:O,ignoreFetchAbort:M,perf:R}=e;if(R!==void 0&&typeof(R==null?void 0:R.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(Me(this,Qo,R??Zve),n!==0&&!rh(n))throw new TypeError("max option must be a nonnegative integer");let N=n?EU(n):Array;if(!N)throw new Error("invalid max value: "+n);if(Me(this,co,n),Me(this,Ma,y),this.maxEntrySize=x||q(this,Ma),this.sizeCalculation=w,this.sizeCalculation){if(!q(this,Ma)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(Me(this,Am,S),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(Me(this,xm,A),Me(this,wh,!!A),Me(this,yi,new Map),Me(this,jr,Array.from({length:n}).fill(void 0)),Me(this,Yt,Array.from({length:n}).fill(void 0)),Me(this,Fs,new N(n)),Me(this,Ra,new N(n)),Me(this,ks,0),Me(this,Qi,0),Me(this,Wo,tbe.create(n)),Me(this,Ci,0),Me(this,Uo,0),typeof h=="function"&&Me(this,qo,h),typeof f=="function"&&Me(this,uf,f),typeof p=="function"?(Me(this,$o,p),Me(this,Ui,[])):(Me(this,$o,void 0),Me(this,Ui,void 0)),Me(this,Go,!!q(this,qo)),Me(this,wm,!!q(this,uf)),Me(this,zs,!!q(this,$o)),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!_,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!M,this.maxEntrySize!==0){if(q(this,Ma)!==0&&!rh(q(this,Ma)))throw new TypeError("maxSize must be a positive integer if specified");if(!rh(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Fe(this,Ye,MU).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!j,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=rh(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!rh(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Fe(this,Ye,Tk).call(this)}if(q(this,co)===0&&this.ttl===0&&q(this,Ma)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!q(this,co)&&!q(this,Ma)){let B="LRU_CACHE_UNBOUNDED";ebe(B)&&(OU.add(B),Jve("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",B,jm))}}get perf(){return q(this,Qo)}static unsafeExposeInternals(e){return{starts:q(e,Yo),ttls:q(e,Da),autopurgeTimers:q(e,Na),sizes:q(e,Vo),keyMap:q(e,yi),keyList:q(e,jr),valList:q(e,Yt),next:q(e,Fs),prev:q(e,Ra),get head(){return q(e,ks)},get tail(){return q(e,Qi)},free:q(e,Wo),isBackgroundFetch:n=>{var r;return Fe(r=e,Ye,dr).call(r,n)},backgroundFetch:(n,r,i,s)=>{var o;return Fe(o=e,Ye,$x).call(o,n,r,i,s)},moveToTail:n=>{var r;return Fe(r=e,Ye,zg).call(r,n)},indexes:n=>{var r;return Fe(r=e,Ye,ih).call(r,n)},rindexes:n=>{var r;return Fe(r=e,Ye,sh).call(r,n)},isStale:n=>{var r;return q(r=e,Ia).call(r,n)}}}get max(){return q(this,co)}get maxSize(){return q(this,Ma)}get calculatedSize(){return q(this,Uo)}get size(){return q(this,Ci)}get fetchMethod(){return q(this,xm)}get memoMethod(){return q(this,Am)}get dispose(){return q(this,qo)}get onInsert(){return q(this,uf)}get disposeAfter(){return q(this,$o)}getRemainingTTL(e){return q(this,yi).has(e)?1/0:0}*entries(){for(let e of Fe(this,Ye,ih).call(this))q(this,Yt)[e]!==void 0&&q(this,jr)[e]!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield[q(this,jr)[e],q(this,Yt)[e]])}*rentries(){for(let e of Fe(this,Ye,sh).call(this))q(this,Yt)[e]!==void 0&&q(this,jr)[e]!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield[q(this,jr)[e],q(this,Yt)[e]])}*keys(){for(let e of Fe(this,Ye,ih).call(this)){let n=q(this,jr)[e];n!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield n)}}*rkeys(){for(let e of Fe(this,Ye,sh).call(this)){let n=q(this,jr)[e];n!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield n)}}*values(){for(let e of Fe(this,Ye,ih).call(this))q(this,Yt)[e]!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield q(this,Yt)[e])}*rvalues(){for(let e of Fe(this,Ye,sh).call(this))q(this,Yt)[e]!==void 0&&!Fe(this,Ye,dr).call(this,q(this,Yt)[e])&&(yield q(this,Yt)[e])}[(J9=Symbol.iterator,Z9=Symbol.toStringTag,J9)](){return this.entries()}find(e,n={}){for(let r of Fe(this,Ye,ih).call(this)){let i=q(this,Yt)[r],s=Fe(this,Ye,dr).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,q(this,jr)[r],this))return Fe(this,Ye,Fg).call(this,q(this,jr)[r],n)}}forEach(e,n=this){for(let r of Fe(this,Ye,ih).call(this)){let i=q(this,Yt)[r],s=Fe(this,Ye,dr).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,q(this,jr)[r],this)}}rforEach(e,n=this){for(let r of Fe(this,Ye,sh).call(this)){let i=q(this,Yt)[r],s=Fe(this,Ye,dr).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(n,s,q(this,jr)[r],this)}}purgeStale(){let e=!1;for(let n of Fe(this,Ye,sh).call(this,{allowStale:!0}))q(this,Ia).call(this,n)&&(Fe(this,Ye,ah).call(this,q(this,jr)[n],"expire"),e=!0);return e}info(e){let n=q(this,yi).get(e);if(n===void 0)return;let r=q(this,Yt)[n],i=Fe(this,Ye,dr).call(this,r)?r.__staleWhileFetching:r;if(i===void 0)return;let s={value:i};if(q(this,Da)&&q(this,Yo)){let o=q(this,Da)[n],l=q(this,Yo)[n];if(o&&l){let u=o-(q(this,Qo).now()-l);s.ttl=u,s.start=Date.now()}}return q(this,Vo)&&(s.size=q(this,Vo)[n]),s}dump(){let e=[];for(let n of Fe(this,Ye,ih).call(this,{allowStale:!0})){let r=q(this,jr)[n],i=q(this,Yt)[n],s=Fe(this,Ye,dr).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||r===void 0)continue;let o={value:s};if(q(this,Da)&&q(this,Yo)){o.ttl=q(this,Da)[n];let l=q(this,Qo).now()-q(this,Yo)[n];o.start=Math.floor(Date.now()-l)}q(this,Vo)&&(o.size=q(this,Vo)[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let i=Date.now()-r.start;r.start=q(this,Qo).now()-i}Fe(this,Ye,Op).call(this,n,r.value,r)}}set(e,n,r={}){let{status:i=void 0}=r;return r.status=i,i&&(i.op="set",i.key=e,n!==void 0&&(i.value=n)),Fe(this,Ye,Op).call(this,e,n,r)}pop(){var e;try{for(;q(this,Ci);){let n=q(this,Yt)[q(this,ks)];if(Fe(this,Ye,qx).call(this,!0),Fe(this,Ye,dr).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(q(this,zs)&&q(this,Ui)){let n=q(this,Ui),r;for(;r=n==null?void 0:n.shift();)(e=q(this,$o))==null||e.call(this,...r)}}}has(e,n={}){let{status:r=void 0}=n;return n.status=r,r&&(r.op="has",r.key=e),Fe(this,Ye,RU).call(this,e,n)}peek(e,n={}){let{status:r=void 0}=n;return r&&(r.op="peek",r.key=e),n.status=r,Fe(this,Ye,DU).call(this,e,n)}fetch(e,n={}){let{status:r=void 0}=n;return n.status=r,r&&n.context&&(r.context=n.context),Fe(this,Ye,Ok).call(this,e,n)}forceFetch(e,n={}){let{status:r=void 0}=n;return n.status=r,r&&n.context&&(r.context=n.context),Fe(this,Ye,NU).call(this,e,n)}memo(e,n={}){let{status:r=void 0}=n;n.status=r,r&&(r.op="memo",r.key=e,n.context&&(r.context=n.context));let i=Fe(this,Ye,IU).call(this,e,n);return r&&(r.value=i),i}get(e,n={}){let{status:r=void 0}=n;n.status=r,r&&(r.op="get",r.key=e);let i=Fe(this,Ye,Fg).call(this,e,n);return r&&(i!==void 0&&(r.value=i),Kve.hasSubscribers),i}delete(e){return Fe(this,Ye,ah).call(this,e,"delete")}clear(){return Fe(this,Ye,Mk).call(this,"delete")}},co=new WeakMap,Ma=new WeakMap,qo=new WeakMap,uf=new WeakMap,$o=new WeakMap,xm=new WeakMap,Am=new WeakMap,Qo=new WeakMap,Ci=new WeakMap,Uo=new WeakMap,yi=new WeakMap,jr=new WeakMap,Yt=new WeakMap,Fs=new WeakMap,Ra=new WeakMap,ks=new WeakMap,Qi=new WeakMap,Wo=new WeakMap,Ui=new WeakMap,Vo=new WeakMap,Yo=new WeakMap,Da=new WeakMap,Na=new WeakMap,Go=new WeakMap,wh=new WeakMap,zs=new WeakMap,wm=new WeakMap,Ye=new WeakSet,Tk=function(){let e=new Hx(q(this,co)),n=new Hx(q(this,co));Me(this,Da,e),Me(this,Yo,n);let r=this.ttlAutopurge?Array.from({length:q(this,co)}):void 0;Me(this,Na,r),Me(this,eb,(l,u,h=q(this,Qo).now())=>{n[l]=u!==0?h:0,e[l]=u,i(l,u)}),Me(this,hf,l=>{n[l]=e[l]!==0?q(this,Qo).now():0,i(l,e[l])});let i=this.ttlAutopurge?(l,u)=>{if(r!=null&&r[l]&&(clearTimeout(r[l]),r[l]=void 0),u&&u!==0&&r){let h=setTimeout(()=>{q(this,Ia).call(this,l)&&Fe(this,Ye,ah).call(this,q(this,jr)[l],"expire")},u+1);h.unref&&h.unref(),r[l]=h}}:()=>{};Me(this,Gc,(l,u)=>{if(e[u]){let h=e[u],f=n[u];if(!h||!f)return;l.ttl=h,l.start=f,l.now=s||o();let p=l.now-f;l.remainingTTL=h-p}});let s=0,o=()=>{let l=q(this,Qo).now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l};this.getRemainingTTL=l=>{let u=q(this,yi).get(l);if(u===void 0)return 0;let h=e[u],f=n[u];if(!h||!f)return 1/0;let p=(s||o())-f;return h-p},Me(this,Ia,l=>{let u=n[l],h=e[l];return!!h&&!!u&&(s||o())-u>h})},hf=new WeakMap,Gc=new WeakMap,eb=new WeakMap,Ia=new WeakMap,MU=function(){let e=new Hx(q(this,co));Me(this,Uo,0),Me(this,Vo,e),Me(this,df,n=>{Me(this,Uo,q(this,Uo)-e[n]),e[n]=0}),Me(this,tb,(n,r,i,s)=>{if(Fe(this,Ye,dr).call(this,r))return 0;if(!rh(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(r,n),!rh(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Me(this,Sm,(n,r,i)=>{if(e[n]=r,q(this,Ma)){let s=q(this,Ma)-e[n];for(;q(this,Uo)>s;)Fe(this,Ye,qx).call(this,!0)}Me(this,Uo,q(this,Uo)+e[n]),i&&(i.entrySize=r,i.totalCalculatedSize=q(this,Uo))})},df=new WeakMap,Sm=new WeakMap,tb=new WeakMap,ih=function*({allowStale:e=this.allowStale}={}){if(q(this,Ci))for(let n=q(this,Qi);Fe(this,Ye,kk).call(this,n)&&((e||!q(this,Ia).call(this,n))&&(yield n),n!==q(this,ks));)n=q(this,Ra)[n]},sh=function*({allowStale:e=this.allowStale}={}){if(q(this,Ci))for(let n=q(this,ks);Fe(this,Ye,kk).call(this,n)&&((e||!q(this,Ia).call(this,n))&&(yield n),n!==q(this,Qi));)n=q(this,Fs)[n]},kk=function(e){return e!==void 0&&q(this,yi).get(q(this,jr)[e])===e},Op=function(e,n,r={}){var m,v,y,x,w,A,S;let{ttl:i=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=r;if(n===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=r;u&&!Fe(this,Ye,dr).call(this,n)&&(u.value=n);let f=q(this,tb).call(this,e,n,r.size||0,l,u);if(this.maxEntrySize&&f>this.maxEntrySize)return Fe(this,Ye,ah).call(this,e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let p=q(this,Ci)===0?void 0:q(this,yi).get(e);if(p===void 0)p=q(this,Ci)===0?q(this,Qi):q(this,Wo).length!==0?q(this,Wo).pop():q(this,Ci)===q(this,co)?Fe(this,Ye,qx).call(this,!1):q(this,Ci),q(this,jr)[p]=e,q(this,Yt)[p]=n,q(this,yi).set(e,p),q(this,Fs)[q(this,Qi)]=p,q(this,Ra)[p]=q(this,Qi),Me(this,Qi,p),Od(this,Ci)._++,q(this,Sm).call(this,p,f,u),u&&(u.set="add"),h=!1,q(this,wm)&&((m=q(this,uf))==null||m.call(this,n,e,"add"));else{Fe(this,Ye,zg).call(this,p);let C=q(this,Yt)[p];if(n!==C){if(q(this,wh)&&Fe(this,Ye,dr).call(this,C)){C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:j}=C;j!==void 0&&!o&&(q(this,Go)&&((v=q(this,qo))==null||v.call(this,j,e,"set")),q(this,zs)&&((y=q(this,Ui))==null||y.push([j,e,"set"])))}else o||(q(this,Go)&&((x=q(this,qo))==null||x.call(this,C,e,"set")),q(this,zs)&&((w=q(this,Ui))==null||w.push([C,e,"set"])));if(q(this,df).call(this,p),q(this,Sm).call(this,p,f,u),q(this,Yt)[p]=n,u){u.set="replace";let j=C&&Fe(this,Ye,dr).call(this,C)?C.__staleWhileFetching:C;j!==void 0&&(u.oldValue=j)}}else u&&(u.set="update");q(this,wm)&&((A=this.onInsert)==null||A.call(this,n,e,n===C?"update":"replace"))}if(i!==0&&!q(this,Da)&&Fe(this,Ye,Tk).call(this),q(this,Da)&&(h||q(this,eb).call(this,p,i,s),u&&q(this,Gc).call(this,u,p)),!o&&q(this,zs)&&q(this,Ui)){let C=q(this,Ui),j;for(;j=C==null?void 0:C.shift();)(S=q(this,$o))==null||S.call(this,...j)}return this},qx=function(e){var s,o,l;let n=q(this,ks),r=q(this,jr)[n],i=q(this,Yt)[n];return q(this,wh)&&Fe(this,Ye,dr).call(this,i)?i.__abortController.abort(new Error("evicted")):(q(this,Go)||q(this,zs))&&(q(this,Go)&&((s=q(this,qo))==null||s.call(this,i,r,"evict")),q(this,zs)&&((o=q(this,Ui))==null||o.push([i,r,"evict"]))),q(this,df).call(this,n),(l=q(this,Na))!=null&&l[n]&&(clearTimeout(q(this,Na)[n]),q(this,Na)[n]=void 0),e&&(q(this,jr)[n]=void 0,q(this,Yt)[n]=void 0,q(this,Wo).push(n)),q(this,Ci)===1?(Me(this,ks,Me(this,Qi,0)),q(this,Wo).length=0):Me(this,ks,q(this,Fs)[n]),q(this,yi).delete(r),Od(this,Ci)._--,n},RU=function(e,n={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=n,s=q(this,yi).get(e);if(s!==void 0){let o=q(this,Yt)[s];if(Fe(this,Ye,dr).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(q(this,Ia).call(this,s))i&&(i.has="stale",q(this,Gc).call(this,i,s));else return r&&q(this,hf).call(this,s),i&&(i.has="hit",q(this,Gc).call(this,i,s)),!0}else i&&(i.has="miss");return!1},DU=function(e,n){let{status:r,allowStale:i=this.allowStale}=n,s=q(this,yi).get(e);if(s===void 0||!i&&q(this,Ia).call(this,s)){r&&(r.peek=s===void 0?"miss":"stale");return}let o=q(this,Yt)[s],l=Fe(this,Ye,dr).call(this,o)?o.__staleWhileFetching:o;return r&&(l!==void 0?(r.peek="hit",r.value=l):r.peek="miss"),l},$x=function(e,n,r,i){let s=n===void 0?void 0:q(this,Yt)[n];if(Fe(this,Ye,dr).call(this,s))return s;let o=new AbortController,{signal:l}=r;l==null||l.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let u={signal:o.signal,options:r,context:i},h=(x,w=!1)=>{let{aborted:A}=o.signal,S=r.ignoreFetchAbort&&x!==void 0,C=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&x!==void 0);if(r.status&&(A&&!w?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,S&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),A&&!S&&!w)return p(o.signal.reason,C);let j=v,_=q(this,Yt)[n];return(_===v||_===void 0&&S&&w)&&(x===void 0?j.__staleWhileFetching!==void 0?q(this,Yt)[n]=j.__staleWhileFetching:Fe(this,Ye,ah).call(this,e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),Fe(this,Ye,Op).call(this,e,x,u.options))),x},f=x=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=x),p(x,!1)),p=(x,w)=>{let{aborted:A}=o.signal,S=A&&r.allowStaleOnFetchAbort,C=S||r.allowStaleOnFetchRejection,j=C||r.noDeleteOnFetchRejection,_=v;if(q(this,Yt)[n]===v&&(!j||!w&&_.__staleWhileFetching===void 0?Fe(this,Ye,ah).call(this,e,"fetch"):S||(q(this,Yt)[n]=_.__staleWhileFetching)),C)return r.status&&_.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),_.__staleWhileFetching;if(_.__returned===_)throw x},m=(x,w)=>{var S;let A=(S=q(this,xm))==null?void 0:S.call(this,e,s,u);A&&A instanceof Promise&&A.then(C=>x(C===void 0?void 0:C),w),o.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(x(void 0),r.allowStaleOnFetchAbort&&(x=C=>h(C,!0)))})};r.status&&(r.status.fetchDispatched=!0);let v=new Promise(m).then(h,f),y=Object.assign(v,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return n===void 0?(Fe(this,Ye,Op).call(this,e,y,{...u.options,status:void 0}),n=q(this,yi).get(e)):q(this,Yt)[n]=y,y},dr=function(e){if(!q(this,wh))return!1;let n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof AbortController},Ok=async function(e,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:x,forceRefresh:w=!1,status:A,signal:S}=n;if(A&&(A.op="fetch",A.key=e,w&&(A.forceRefresh=!0)),!q(this,wh))return A&&(A.fetch="get"),Fe(this,Ye,Fg).call(this,e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:A});let C={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:l,size:u,sizeCalculation:h,noUpdateTTL:f,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:y,ignoreFetchAbort:v,status:A,signal:S},j=q(this,yi).get(e);if(j===void 0){A&&(A.fetch="miss");let _=Fe(this,Ye,$x).call(this,e,j,C,x);return _.__returned=_}else{let _=q(this,Yt)[j];if(Fe(this,Ye,dr).call(this,_)){let N=r&&_.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",N&&(A.returnedStale=!0)),N?_.__staleWhileFetching:_.__returned=_}let O=q(this,Ia).call(this,j);if(!w&&!O)return A&&(A.fetch="hit"),Fe(this,Ye,zg).call(this,j),i&&q(this,hf).call(this,j),A&&q(this,Gc).call(this,A,j),_;let M=Fe(this,Ye,$x).call(this,e,j,C,x),R=M.__staleWhileFetching!==void 0&&r;return A&&(A.fetch=O?"stale":"refresh",R&&O&&(A.returnedStale=!0)),R?M.__staleWhileFetching:M.__returned=M}},NU=async function(e,n={}){let r=await Fe(this,Ye,Ok).call(this,e,n);if(r===void 0)throw new Error("fetch() returned undefined");return r},IU=function(e,n={}){let r=q(this,Am);if(!r)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...l}=n;s&&o&&(s.forceRefresh=!0);let u=Fe(this,Ye,Fg).call(this,e,l),h=o||u===void 0;if(s&&(s.memo=h?"miss":"hit",h||(s.value=u)),!h)return u;let f=r(e,u,{options:l,context:i});return s&&(s.value=f),Fe(this,Ye,Op).call(this,e,f,l),f},Fg=function(e,n={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=n,l=q(this,yi).get(e);if(l===void 0){o&&(o.get="miss");return}let u=q(this,Yt)[l],h=Fe(this,Ye,dr).call(this,u);return o&&q(this,Gc).call(this,o,l),q(this,Ia).call(this,l)?h?(o&&(o.get="stale-fetching"),r&&u.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),u.__staleWhileFetching):void 0):(s||Fe(this,Ye,ah).call(this,e,"expire"),o&&(o.get="stale"),r?(o&&(o.returnedStale=!0),u):void 0):(o&&(o.get=h?"fetching":"hit"),Fe(this,Ye,zg).call(this,l),i&&q(this,hf).call(this,l),h?u.__staleWhileFetching:u)},Ek=function(e,n){q(this,Ra)[n]=e,q(this,Fs)[e]=n},zg=function(e){e!==q(this,Qi)&&(e===q(this,ks)?Me(this,ks,q(this,Fs)[e]):Fe(this,Ye,Ek).call(this,q(this,Ra)[e],q(this,Fs)[e]),Fe(this,Ye,Ek).call(this,q(this,Qi),e),Me(this,Qi,e))},ah=function(e,n){var i,s,o,l,u,h;let r=!1;if(q(this,Ci)!==0){let f=q(this,yi).get(e);if(f!==void 0)if((i=q(this,Na))!=null&&i[f]&&(clearTimeout((s=q(this,Na))==null?void 0:s[f]),q(this,Na)[f]=void 0),r=!0,q(this,Ci)===1)Fe(this,Ye,Mk).call(this,n);else{q(this,df).call(this,f);let p=q(this,Yt)[f];if(Fe(this,Ye,dr).call(this,p)?p.__abortController.abort(new Error("deleted")):(q(this,Go)||q(this,zs))&&(q(this,Go)&&((o=q(this,qo))==null||o.call(this,p,e,n)),q(this,zs)&&((l=q(this,Ui))==null||l.push([p,e,n]))),q(this,yi).delete(e),q(this,jr)[f]=void 0,q(this,Yt)[f]=void 0,f===q(this,Qi))Me(this,Qi,q(this,Ra)[f]);else if(f===q(this,ks))Me(this,ks,q(this,Fs)[f]);else{let m=q(this,Ra)[f];q(this,Fs)[m]=q(this,Fs)[f];let v=q(this,Fs)[f];q(this,Ra)[v]=q(this,Ra)[f]}Od(this,Ci)._--,q(this,Wo).push(f)}}if(q(this,zs)&&((u=q(this,Ui))!=null&&u.length)){let f=q(this,Ui),p;for(;p=f==null?void 0:f.shift();)(h=q(this,$o))==null||h.call(this,...p)}return r},Mk=function(e){var n,r,i,s;for(let o of Fe(this,Ye,sh).call(this,{allowStale:!0})){let l=q(this,Yt)[o];if(Fe(this,Ye,dr).call(this,l))l.__abortController.abort(new Error("deleted"));else{let u=q(this,jr)[o];q(this,Go)&&((n=q(this,qo))==null||n.call(this,l,u,e)),q(this,zs)&&((r=q(this,Ui))==null||r.push([l,u,e]))}}if(q(this,yi).clear(),q(this,Yt).fill(void 0),q(this,jr).fill(void 0),q(this,Da)&&q(this,Yo)){q(this,Da).fill(0),q(this,Yo).fill(0);for(let o of q(this,Na)??[])o!==void 0&&clearTimeout(o);(i=q(this,Na))==null||i.fill(void 0)}if(q(this,Vo)&&q(this,Vo).fill(0),Me(this,ks,0),Me(this,Qi,0),q(this,Wo).length=0,Me(this,Uo,0),Me(this,Ci,0),q(this,zs)&&q(this,Ui)){let o=q(this,Ui),l;for(;l=o==null?void 0:o.shift();)(s=q(this,$o))==null||s.call(this,...l)}},jm);const nbe=400,rbe=422,ibe=503;class sbe{constructor(e){this.httpMethod="POST",this.apiPrefix="/api/v1",this.fetchFn=(n,r)=>fetch(n,r),this.requestHeaders=new Headers,this.abortControllers=new Set,this.url=e.url?e.url:"",this.errorHandler=e.httpErrorHandler,this.lookbackInterval=e.lookbackInterval,e.fetchFn&&(this.fetchFn=e.fetchFn),e.httpMethod&&(this.httpMethod=e.httpMethod),e.apiPrefix&&(this.apiPrefix=e.apiPrefix),e.requestHeaders&&(this.requestHeaders=e.requestHeaders)}labelNames(e){const n=new URLSearchParams;if(this.lookbackInterval){const i=new Date,s=new Date(i.getTime()-this.lookbackInterval);n.set("start",s.toISOString()),n.set("end",i.toISOString())}e&&e.length>0&&n.set("match[]",h_(e));const r=this.buildRequest(this.labelsEndpoint(),n);return this.fetchAPI(r.uri,{method:this.httpMethod,body:r.body}).catch(i=>(this.errorHandler&&this.errorHandler(i),[]))}labelValues(e,n,r){const i=new URLSearchParams;if(this.lookbackInterval){const s=new Date,o=new Date(s.getTime()-this.lookbackInterval);i.set("start",o.toISOString()),i.set("end",s.toISOString())}return n&&n.length>0&&i.set("match[]",h_(n,r,e)),this.fetchAPI(`${this.labelValuesEndpoint().replace(/:name/gi,e)}?${i}`).catch(s=>(this.errorHandler&&this.errorHandler(s),[]))}metricMetadata(){return this.fetchAPI(this.metricMetadataEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}series(e,n,r){const i=new URLSearchParams;if(this.lookbackInterval){const o=new Date,l=new Date(o.getTime()-this.lookbackInterval);i.set("start",l.toISOString()),i.set("end",o.toISOString())}i.set("match[]",h_(e,n,r));const s=this.buildRequest(this.seriesEndpoint(),i);return this.fetchAPI(s.uri,{method:this.httpMethod,body:s.body}).catch(o=>(this.errorHandler&&this.errorHandler(o),[]))}metricNames(){return this.labelValues("__name__")}flags(){return this.fetchAPI(this.flagsEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}destroy(){for(const e of this.abortControllers)e.abort();this.abortControllers.clear()}fetchAPI(e,n){const r=new AbortController;return this.abortControllers.add(r),n?(n.headers=this.requestHeaders,n.signal=r.signal):n={headers:this.requestHeaders,signal:r.signal},this.fetchFn(this.url+e,n).then(i=>{if(!i.ok&&![nbe,rbe,ibe].includes(i.status))throw new Error(i.statusText);return i}).then(i=>i.json()).then(i=>{if(i.status==="error")throw new Error(i.error!==void 0?i.error:'missing "error" field in response JSON');if(i.data===void 0)throw new Error('missing "data" field in response JSON');return i.data}).finally(()=>{this.abortControllers.delete(r)})}buildRequest(e,n){let r=e,i=n;return this.httpMethod==="GET"&&(r=`${r}?${n}`,i=null),{uri:r,body:i}}labelsEndpoint(){return`${this.apiPrefix}/labels`}labelValuesEndpoint(){return`${this.apiPrefix}/label/:name/values`}seriesEndpoint(){return`${this.apiPrefix}/series`}metricMetadataEndpoint(){return`${this.apiPrefix}/metadata`}flagsEndpoint(){return`${this.apiPrefix}/status/flags`}}class abe{constructor(e){const n={ttl:e&&e.maxAge?e.maxAge:3e5,ttlAutopurge:!0};this.completeAssociation=new jI(n),this.metricMetadata={},this.labelValues=new jI(n),this.labelNames=[],this.flags={},e!=null&&e.initialMetricList&&this.setLabelValues("__name__",e.initialMetricList)}getAssociations(e){let n=this.completeAssociation.get(e);return n||(n=new Map,this.completeAssociation.set(e,n)),n}setAssociations(e,n){n.forEach(r=>{const i=this.getAssociations(e);for(const[s,o]of Object.entries(r)){if(s==="__name__")continue;const l=i.get(s);l===void 0?i.set(s,new Set([o])):l.add(o)}})}setLabelValuesAssociation(e,n,r){const i=this.getAssociations(e),s=i.get(n);s===void 0?i.set(n,new Set(r)):r.forEach(o=>{s.add(o)})}setLabelNamesAssociation(e,n){const r=this.getAssociations(e);n.forEach(i=>{i!=="__name__"&&(r.has(i)||r.set(i,new Set))})}setFlags(e){this.flags=e}getFlags(){return this.flags}setMetricMetadata(e){this.metricMetadata=e}getMetricMetadata(){return this.metricMetadata}setLabelNames(e,n){n&&n.length>0&&this.setLabelNamesAssociation(n,e),this.labelNames=e}getLabelNames(e){if(!e||e.length===0)return this.labelNames;const n=this.completeAssociation.get(e);return n?Array.from(n.keys()):[]}setLabelValues(e,n,r){r&&r.length>0&&this.setLabelValuesAssociation(r,e,n),this.labelValues.set(e,n)}getLabelValues(e,n){if(!n||n.length===0){const i=this.labelValues.get(e);return i||[]}const r=this.completeAssociation.get(n);if(r){const i=r.get(e);return i?Array.from(i):[]}return[]}}class obe{constructor(e,n){this.client=e,this.cache=new abe(n)}labelNames(e){const n=this.cache.getLabelNames(e);return n&&n.length>0?Promise.resolve(n):this.client.labelNames(e).then(r=>(this.cache.setLabelNames(r,e),this.cache.getLabelNames(e)))}labelValues(e,n){const r=this.cache.getLabelValues(e,n);return r&&r.length>0?Promise.resolve(r):this.client.labelValues(e,n).then(i=>(this.cache.setLabelValues(e,i,n),i))}metricMetadata(){const e=this.cache.getMetricMetadata();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.metricMetadata().then(n=>(this.cache.setMetricMetadata(n),n))}series(e){return this.client.series(e).then(n=>(this.cache.setAssociations(e,n),n))}metricNames(){return this.labelValues("__name__")}flags(){const e=this.cache.getFlags();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.flags().then(n=>(this.cache.setFlags(n),n))}destroy(){var e,n;(n=(e=this.client).destroy)===null||n===void 0||n.call(e)}}function lbe(t){const e=t;return typeof e.labelNames=="function"&&typeof e.labelValues=="function"&&typeof e.metricMetadata=="function"&&typeof e.series=="function"&&typeof e.metricNames=="function"}function Rk(t){return t!=null&&t.completeStrategy?t.completeStrategy:t!=null&&t.remote?lbe(t.remote)?new I_(t.remote,t.maxMetricsMetadata):new I_(new obe(new sbe(t.remote),t.remote.cache),t.maxMetricsMetadata):new I_}class CI{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Qd{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(Vl).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((v,y)=>v.from-y.from||v.to-y.to),o=new ou,l=[],u=0,h=r.doc.iter(),f=0,p=r.doc.length;for(let v=0;;){let y=v==s.length?null:s[v];if(!y&&!l.length)break;let x,w;if(l.length)x=u,w=l.reduce((C,j)=>Math.min(C,j.to),y&&y.from>x?y.from:1e8);else{if(x=y.from,x>p)break;w=y.to,l.push(y),v++}for(;v<s.length;){let C=s[v];if(C.from==x&&(C.to>C.from||C.to==x))l.push(C),v++,w=Math.min(C.to,w);else{w=Math.min(C.from,w);break}}w=Math.min(w,p);let A=!1;if(l.some(C=>C.from==x&&(C.to==w||w==p))&&(A=x==w,!A&&w-x<10)){let C=x-(f+h.value.length);C>0&&(h.next(C),f=x);for(let j=x;;){if(j>=w){A=!0;break}if(!h.lineBreak&&f+h.value.length>j)break;j=f+h.value.length,f+=h.value.length,h.next()}}let S=Sbe(l);if(A)o.add(x,x,Et.widget({widget:new ybe(S),diagnostics:l.slice()}));else{let C=l.reduce((j,_)=>_.markClass?j+" "+_.markClass:j,"");o.add(x,w,Et.mark({class:"cm-lintRange cm-lintRange-"+S+C,diagnostics:l.slice(),inclusiveEnd:l.some(j=>j.to>w)}))}if(u=w,u==p)break;for(let C=0;C<l.length;C++)l[C].to<=u&&l.splice(C--,1)}let m=o.finish();return new Qd(m,n,Wh(m))}}function Wh(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new CI(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new CI(r.from,s,r.diagnostic)}}),r}function cbe(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(Vl).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(V6))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function BU(t,e){return t.field(Ha,!1)?e:e.concat(Wt.appendConfig.of(qU))}function ube(t,e){return{effects:BU(t,[V6.of(e)])}}const V6=Wt.define(),Y6=Wt.define(),LU=Wt.define(),Ha=gs.define({create(){return new Qd(Et.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=Wh(n,t.selected.diagnostic,s)||Wh(n,null,s)}!n.size&&i&&e.state.facet(Vl).autoPanel&&(i=null),t=new Qd(n,i,r)}for(let n of e.effects)if(n.is(V6)){let r=e.state.facet(Vl).autoPanel?n.value.length?Uv.open:null:t.panel;t=Qd.init(n.value,r,e.state)}else n.is(Y6)?t=new Qd(t.diagnostics,n.value?Uv.open:null,t.selected):n.is(LU)&&(t=new Qd(t.diagnostics,t.panel,n.value));return t},provide:t=>[zv.from(t,e=>e.panel),ot.decorations.from(t,e=>e.diagnostics)]}),hbe=Et.mark({class:"cm-lintRange cm-lintRange-active"});function dbe(t,e,n){let{diagnostics:r}=t.state.field(Ha),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(u,h,{spec:f})=>{if(e>=u&&e<=h&&(u==h||(e>u||n>0)&&(e<h||n<0)))return i=f.diagnostics,s=u,o=h,!1});let l=t.state.facet(Vl).tooltipFilter;return i&&l&&(i=l(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:fbe(t,i)}}}:null}function fbe(t,e){return fr("ul",{class:"cm-tooltip-lint"},e.map(n=>zU(t,n,!1)))}const pbe=t=>{let e=t.state.field(Ha,!1);(!e||!e.panel)&&t.dispatch({effects:BU(t.state,[Y6.of(!0)])});let n=Fv(t,Uv.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},_I=t=>{let e=t.state.field(Ha,!1);return!e||!e.panel?!1:(t.dispatch({effects:Y6.of(!1)}),!0)},mbe=t=>{let e=t.state.field(Ha,!1);if(!e)return!1;let n=t.state.selection.main,r=Wh(e.diagnostics,null,n.to+1);return!r&&(r=Wh(e.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),B0e(t,r.from,1,{tooltip:HU,until:i=>i.docChanged||i.newSelection.main.head<r.from||i.newSelection.main.head>r.to}),!0)},PU=[{key:"Mod-Shift-m",run:pbe,preventDefault:!0},{key:"F8",run:mbe}],gbe=Wr.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(Vl);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(Vl);n.length&&vbe(n.map(r=>Promise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(ube(this.view.state,r.reduce((i,s)=>i.concat(s))))},r=>{Qs(this.view.state,r)})}}update(t){let e=t.state.facet(Vl);(t.docChanged||e!=t.startState.facet(Vl)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function vbe(t,e,n){let r=[],i=-1;for(let s of t)s.then(o=>{r.push(o),clearTimeout(i),r.length==t.length?e(r):i=setTimeout(()=>e(r),200)},n)}const Vl=mt.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...lc(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:TI,tooltipFilter:TI,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function TI(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function bbe(t,e={}){return[Vl.of({source:t,config:e}),gbe,qU]}function FU(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function zU(t,e,n){var r;let i=n?FU(e.actions):[];return fr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},fr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let l=!1,u=v=>{if(v.preventDefault(),l)return;l=!0;let y=Wh(t.state.field(Ha).diagnostics,e);y&&s.apply(t,y.from,y.to)},{name:h}=s,f=i[o]?h.indexOf(i[o]):-1,p=f<0?h:[h.slice(0,f),fr("u",h.slice(f,f+1)),h.slice(f+1)],m=s.markClass?" "+s.markClass:"";return fr("button",{type:"button",class:"cm-diagnosticAction"+m,onclick:u,onmousedown:u,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[o]})"`}.`},p)}),e.source&&fr("div",{class:"cm-diagnosticSource"},e.source))}class ybe extends gl{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return fr("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class kI{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=zU(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Uv{constructor(e){this.view=e,this.items=[];let n=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)_I(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=FU(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==i.keyCode){let u=Wh(this.view.state.field(Ha).diagnostics,s);u&&s.actions[l].apply(e,u.from,u.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=fr("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=fr("div",{class:"cm-panel-lint"},this.list,fr("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>_I(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ha).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Ha),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(l,u,{spec:h})=>{for(let f of h.diagnostics){if(o.has(f))continue;o.add(f);let p=-1,m;for(let v=r;v<this.items.length;v++)if(this.items[v].diagnostic==f){p=v;break}p<0?(m=new kI(this.view,f),this.items.splice(r,0,m),i=!0):(m=this.items[p],p>r&&(this.items.splice(r,p-r),i=!0)),n&&m.diagnostic==n.diagnostic?m.dom.hasAttribute("aria-selected")||(m.dom.setAttribute("aria-selected","true"),s=m):m.dom.hasAttribute("aria-selected")&&m.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new kI(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:u})=>{let h=u.height/this.list.offsetHeight;l.top<u.top?this.list.scrollTop-=(u.top-l.top)/h:l.bottom>u.bottom&&(this.list.scrollTop+=(l.bottom-u.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ha),r=Wh(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:LU.of(r)})}static open(e){return new Uv(e)}}function xbe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function W1(t){return xbe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Abe=ot.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:W1("#f11")},".cm-lintRange-warning":{backgroundImage:W1("orange")},".cm-lintRange-info":{backgroundImage:W1("#999")},".cm-lintRange-hint":{backgroundImage:W1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function wbe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Sbe(t){let e="hint",n=1;for(let r of t){let i=wbe(r.severity);i>n&&(n=i,e=r.severity)}return e}const HU=I0e(dbe,{hideOn:cbe}),qU=[Ha,ot.decorations.compute([Ha],t=>{let{selected:e,panel:n}=t.field(Ha);return!e||!n||e.from==e.to?Et.none:Et.set([hbe.range(e.from,e.to)])}),HU,Abe];class jbe{promQL(){return e=>{const n=new qge(e.state);return n.analyze(),n.getDiagnostics()}}}function Cbe(){return new jbe}function _be(t,e){return bbe(t.call(e))}var Dk;(function(t){t.PromQL="PromQL",t.MetricName="MetricName"})(Dk||(Dk={}));function Tbe(t){return UA.define({parser:Xhe.configure({top:t}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}})}class $U{constructor(){this.complete=Rk(),this.lint=Cbe(),this.enableLinter=!0,this.enableCompletion=!0}setComplete(e){return this.complete=Rk(e),this}getComplete(){return this.complete}activateCompletion(e){return this.enableCompletion=e,this}setLinter(e){return this.lint=e,this}getLinter(){return this.lint}activateLinter(e){return this.enableLinter=e,this}destroy(){var e,n;(n=(e=this.complete).destroy)===null||n===void 0||n.call(e)}asExtension(e=Dk.PromQL){const n=Tbe(e);let r=[n];if(this.enableCompletion){const i=n.data.of({autocomplete:s=>this.complete.promQL(s)});r=r.concat(i)}return this.enableLinter&&(r=r.concat(_be(this.lint.promQL,this.lint))),r}}function ZA(){return ZA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ZA.apply(null,arguments)}function G6(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const kbe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=K6(t.state,n.from);return r.line?Obe(t):r.block?Mbe(t):!1};function X6(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Obe=X6(Nbe,0),Ebe=X6(QU,0),Mbe=X6((t,e)=>QU(t,e,Dbe(e)),0);function K6(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const bg=50;function Rbe(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-bg,r),o=t.sliceDoc(i,i+bg),l=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(u,u+n.length)==n)return{open:{pos:r-l,margin:l&&1},close:{pos:i+u,margin:u&&1}};let f,p;i-r<=2*bg?f=p=t.sliceDoc(r,i):(f=t.sliceDoc(r,r+bg),p=t.sliceDoc(i-bg,i));let m=/^\s*/.exec(f)[0].length,v=/\s*$/.exec(p)[0].length,y=p.length-v-n.length;return f.slice(m,m+e.length)==e&&p.slice(y,y+n.length)==n?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-v-n.length,margin:/\s/.test(p.charAt(y-1))?1:0}}:null}function Dbe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function QU(t,e,n=e.selection.ranges){let r=n.map(s=>K6(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>Rbe(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let u=r[o],{open:h,close:f}=l;s.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+u.close.length})}return{changes:s}}return null}function Nbe(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:s,to:o}of n){let l=r.length,u=1e9,h=K6(e,s).line;if(h){for(let f=s;f<=o;){let p=e.doc.lineAt(f);if(p.from>i&&(s==o||o>p.from)){i=p.from;let m=/^\s*/.exec(p.text)[0].length,v=m==p.length,y=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<u&&(u=m),r.push({line:p,comment:y,token:h,indent:m,empty:v,single:!1})}f=p.to+1}if(u<1e9)for(let f=l;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=u);r.length==l+1&&(r[l].single=!0)}}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:u,indent:h,empty:f,single:p}of r)(p||!f)&&s.push({from:l.from+h,insert:u+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:u}of r)if(l>=0){let h=o.from+l,f=h+u.length;o.text[f-o.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}const Nk=oc.define(),Ibe=oc.define(),Bbe=mt.define(),UU=mt.define({combine(t){return lc(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),WU=gs.define({create(){return Yl.empty},update(t,e){let n=e.state.facet(UU),r=e.annotation(Nk);if(r){let u=fa.fromTransaction(e,r.selection),h=r.side,f=h==0?t.undone:t.done;return u?f=JA(f,f.length,n.minDepth,u):f=XU(f,e.startState.selection),new Yl(h==0?r.rest:f,h==0?f:r.rest)}let i=e.annotation(Ibe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Ai.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=fa.fromTransaction(e),o=e.annotation(Ai.time),l=e.annotation(Ai.userEvent);return s?t=t.addChanges(s,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Yl(t.done.map(fa.fromJSON),t.undone.map(fa.fromJSON))}});function VU(t={}){return[WU,UU.of(t),ot.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?YU:e.inputType=="historyRedo"?Ik:null;return r?(e.preventDefault(),r(n)):!1}})]}function Z2(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(WU,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const YU=Z2(0,!1),Ik=Z2(1,!1),Lbe=Z2(0,!0),Pbe=Z2(1,!0);class fa{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new fa(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new fa(e.changes&&ki.fromJSON(e.changes),[],e.mapped&&Zl.fromJSON(e.mapped),e.startSelection&&De.fromJSON(e.startSelection),e.selectionsAfter.map(De.fromJSON))}static fromTransaction(e,n){let r=mo;for(let i of e.startState.facet(Bbe)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new fa(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,mo)}static selection(e){return new fa(void 0,mo,void 0,void 0,e)}}function JA(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function Fbe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,l)=>{for(let u=0;u<n.length;){let h=n[u++],f=n[u++];l>=h&&o<=f&&(r=!0)}}),r}function zbe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function GU(t,e){return t.length?e.length?t.concat(e):t:e}const mo=[],Hbe=200;function XU(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Hbe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),JA(t,t.length-1,1e9,n.setSelAfter(r)))}else return[fa.selection([e])]}function qbe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function B_(t,e){if(!t.length)return t;let n=t.length,r=mo;for(;n;){let i=$be(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[fa.selection(r)]:mo}function $be(t,e,n){let r=GU(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):mo,n);if(!t.changes)return fa.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new fa(i,Wt.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const Qbe=/^(input\.type|delete)($|\.)/;class Yl{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Yl(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||Qbe.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,Fbe(l.changes,e.changes))||r=="input.type.compose")?o=JA(o,o.length-1,i.minDepth,new fa(e.changes.compose(l.changes),GU(Wt.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,mo)):o=JA(o,o.length,i.minDepth,e),new Yl(o,mo,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:mo;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&zbe(s[s.length-1],e)?this:new Yl(XU(this.done,e),this.undone,n,r)}addMapping(e){return new Yl(B_(this.done,e),B_(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||n.selection;if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Nk.of({side:e,rest:qbe(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=i.length==1?mo:i.slice(0,i.length-1);return s.mapped&&(l=B_(l,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Nk.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Yl.empty=new Yl(mo,mo);const KU=[{key:"Mod-z",run:YU,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Ik,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Ik,preventDefault:!0},{key:"Mod-u",run:Lbe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Pbe,preventDefault:!0}];function d0(t,e){return De.create(t.ranges.map(e),t.mainIndex)}function cc(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function vl({state:t,dispatch:e},n){let r=d0(t.selection,n);return r.eq(t.selection,!0)?!1:(e(cc(t,r)),!0)}function J2(t,e){return De.cursor(e?t.to:t.from)}function ZU(t,e){return vl(t,n=>n.empty?t.moveByChar(n,e):J2(n,e))}function Ns(t){return t.textDirectionAt(t.state.selection.main.head)==lr.LTR}const JU=t=>ZU(t,!Ns(t)),eW=t=>ZU(t,Ns(t));function tW(t,e){return vl(t,n=>n.empty?t.moveByGroup(n,e):J2(n,e))}const Ube=t=>tW(t,!Ns(t)),Wbe=t=>tW(t,Ns(t));function Vbe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function eS(t,e,n){let r=Di(t).resolveInner(e.head),i=n?on.closedBy:on.openedBy;for(let u=e.head;;){let h=n?r.childAfter(u):r.childBefore(u);if(!h)break;Vbe(t,h,i)?r=h:u=n?h.to:h.from}let s=r.type.prop(i),o,l;return s&&(o=n?Wl(t,r.from,1):Wl(t,r.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?r.to:r.from,De.cursor(l,n?-1:1)}const Ybe=t=>vl(t,e=>eS(t.state,e,!Ns(t))),Gbe=t=>vl(t,e=>eS(t.state,e,Ns(t)));function nW(t,e){return vl(t,n=>{if(!n.empty)return J2(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const rW=t=>nW(t,!1),iW=t=>nW(t,!0);function sW(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(ot.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function aW(t,e){let n=sW(t),{state:r}=t,i=d0(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):J2(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),u=l.top+n.marginTop,h=l.bottom-n.marginBottom;o&&o.top>u&&o.bottom<h&&(s=ot.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-u}))}return t.dispatch(cc(r,i),{effects:s}),!0}const OI=t=>aW(t,!1),Bk=t=>aW(t,!0);function od(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=De.cursor(r.from+s))}return i}const Xbe=t=>vl(t,e=>od(t,e,!0)),Kbe=t=>vl(t,e=>od(t,e,!1)),Zbe=t=>vl(t,e=>od(t,e,!Ns(t))),Jbe=t=>vl(t,e=>od(t,e,Ns(t))),eye=t=>vl(t,e=>De.cursor(t.lineBlockAt(e.head).from,1)),tye=t=>vl(t,e=>De.cursor(t.lineBlockAt(e.head).to,-1));function nye(t,e,n){let r=!1,i=d0(t.selection,s=>{let o=Wl(t,s.head,-1)||Wl(t,s.head,1)||s.head>0&&Wl(t,s.head-1,1)||s.head<t.doc.length&&Wl(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return De.cursor(l)});return r?(e(cc(t,i)),!0):!1}const rye=({state:t,dispatch:e})=>nye(t,e);function ko(t,e){let n=d0(t.state.selection,r=>{let i=e(r);return De.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(cc(t.state,n)),!0)}function oW(t,e){return ko(t,n=>t.moveByChar(n,e))}const lW=t=>oW(t,!Ns(t)),cW=t=>oW(t,Ns(t));function uW(t,e){return ko(t,n=>t.moveByGroup(n,e))}const iye=t=>uW(t,!Ns(t)),sye=t=>uW(t,Ns(t)),aye=t=>ko(t,e=>eS(t.state,e,!Ns(t))),oye=t=>ko(t,e=>eS(t.state,e,Ns(t)));function hW(t,e){return ko(t,n=>t.moveVertically(n,e))}const dW=t=>hW(t,!1),fW=t=>hW(t,!0);function pW(t,e){return ko(t,n=>t.moveVertically(n,e,sW(t).height))}const EI=t=>pW(t,!1),MI=t=>pW(t,!0),lye=t=>ko(t,e=>od(t,e,!0)),cye=t=>ko(t,e=>od(t,e,!1)),uye=t=>ko(t,e=>od(t,e,!Ns(t))),hye=t=>ko(t,e=>od(t,e,Ns(t))),dye=t=>ko(t,e=>De.cursor(t.lineBlockAt(e.head).from)),fye=t=>ko(t,e=>De.cursor(t.lineBlockAt(e.head).to)),RI=({state:t,dispatch:e})=>(e(cc(t,{anchor:0})),!0),DI=({state:t,dispatch:e})=>(e(cc(t,{anchor:t.doc.length})),!0),NI=({state:t,dispatch:e})=>(e(cc(t,{anchor:t.selection.main.anchor,head:0})),!0),II=({state:t,dispatch:e})=>(e(cc(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),pye=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),mye=({state:t,dispatch:e})=>{let n=tS(t).map(({from:r,to:i})=>De.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:De.create(n),userEvent:"select"})),!0},gye=({state:t,dispatch:e})=>{let n=d0(t.selection,r=>{var i;let s=Di(t).resolveStack(r.from,1);for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&(!((i=l.parent)===null||i===void 0)&&i.parent))return De.range(l.to,l.from)}return r});return e(cc(t,n)),!0},vye=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=De.create([n.main]):n.main.empty||(r=De.create([De.cursor(n.main.head)])),r?(e(cc(t,r)),!0):!1};function Ub(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let u=e(s);u<o?(n="delete.backward",u=V1(t,u,!1)):u>o&&(n="delete.forward",u=V1(t,u,!0)),o=Math.min(o,u),l=Math.max(l,u)}else o=V1(t,o,!1),l=V1(t,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:De.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ot.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function V1(t,e,n){if(t instanceof ot)for(let r of t.state.facet(ot.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const mW=(t,e,n)=>Ub(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),l,u;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]=="	")return i-1;let h=u0(l,s.tabSize),f=h%VA(s)||VA(s);for(let p=0;p<f&&l[l.length-1-p]==" ";p++)i--;u=i}else u=Gi(o.text,i-o.from,e,e)+o.from,u==i&&o.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(u-o.from,i-o.from))&&(u=Gi(o.text,u-o.from,!1,!1)+o.from);return u}),Lk=t=>mW(t,!1,!0),gW=t=>mW(t,!0,!1),vW=(t,e)=>Ub(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let u=Gi(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,u)-s.from,Math.max(r,u)-s.from),f=o(h);if(l!=null&&f!=l)break;(h!=" "||r!=n.head)&&(l=f),r=u}return r}),bW=t=>vW(t,!1),bye=t=>vW(t,!0),yye=t=>Ub(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),xye=t=>Ub(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Aye=t=>Ub(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),wye=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Sn.of(["",""])},range:De.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Sye=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:Gi(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:Gi(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(o,i))},range:De.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function tS(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function yW(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of tS(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),l=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let u of s.ranges)i.push(De.range(Math.min(t.doc.length,u.anchor+l),Math.min(t.doc.length,u.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let u of s.ranges)i.push(De.range(u.anchor-l,u.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:De.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const jye=({state:t,dispatch:e})=>yW(t,e,!1),Cye=({state:t,dispatch:e})=>yW(t,e,!0);function xW(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of tS(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const _ye=({state:t,dispatch:e})=>xW(t,e,!1),Tye=({state:t,dispatch:e})=>xW(t,e,!0),kye=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(tS(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=d0(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),l=t.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+t.documentTop-l.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Oye(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Di(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(on.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const AW=wW(!1),Eye=wW(!0);function wW(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),u=!t&&s==o&&Oye(e,s);t&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Y2(e,{simulateBreak:s,simulateDoubleBreak:!!u}),f=I6(h,s);for(f==null&&(f=u0(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;u?{from:s,to:o}=u:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let p=["",Hv(e,f)];return u&&p.push(Hv(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:Sn.of(p)},range:De.cursor(s+1+p[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Z6(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=t.doc.lineAt(o);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),o=l.to+1}let s=t.changes(i);return{changes:i,range:De.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const Mye=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Y2(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=Z6(t,(s,o,l)=>{let u=I6(r,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let h=/^\s*/.exec(s.text)[0],f=Hv(t,u);(h!=f||l.from<s.from+h.length)&&(n[s.from]=u,o.push({from:s.from,to:s.from+h.length,insert:f}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},SW=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Z6(t,(n,r)=>{r.push({from:n.from,insert:t.facet(qb)})}),{userEvent:"input.indent"})),!0),jW=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Z6(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=u0(i,t.tabSize),o=0,l=Hv(t,Math.max(0,s-VA(t)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),Rye=t=>(t.setTabFocusMode(),!0),Dye=[{key:"Ctrl-b",run:JU,shift:lW,preventDefault:!0},{key:"Ctrl-f",run:eW,shift:cW},{key:"Ctrl-p",run:rW,shift:dW},{key:"Ctrl-n",run:iW,shift:fW},{key:"Ctrl-a",run:eye,shift:dye},{key:"Ctrl-e",run:tye,shift:fye},{key:"Ctrl-d",run:gW},{key:"Ctrl-h",run:Lk},{key:"Ctrl-k",run:yye},{key:"Ctrl-Alt-h",run:bW},{key:"Ctrl-o",run:wye},{key:"Ctrl-t",run:Sye},{key:"Ctrl-v",run:Bk}],Nye=[{key:"ArrowLeft",run:JU,shift:lW,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Ube,shift:iye,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Zbe,shift:uye,preventDefault:!0},{key:"ArrowRight",run:eW,shift:cW,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Wbe,shift:sye,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Jbe,shift:hye,preventDefault:!0},{key:"ArrowUp",run:rW,shift:dW,preventDefault:!0},{mac:"Cmd-ArrowUp",run:RI,shift:NI},{mac:"Ctrl-ArrowUp",run:OI,shift:EI},{key:"ArrowDown",run:iW,shift:fW,preventDefault:!0},{mac:"Cmd-ArrowDown",run:DI,shift:II},{mac:"Ctrl-ArrowDown",run:Bk,shift:MI},{key:"PageUp",run:OI,shift:EI},{key:"PageDown",run:Bk,shift:MI},{key:"Home",run:Kbe,shift:cye,preventDefault:!0},{key:"Mod-Home",run:RI,shift:NI},{key:"End",run:Xbe,shift:lye,preventDefault:!0},{key:"Mod-End",run:DI,shift:II},{key:"Enter",run:AW},{key:"Mod-a",run:pye},{key:"Backspace",run:Lk,shift:Lk},{key:"Delete",run:gW},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bW},{key:"Mod-Delete",mac:"Alt-Delete",run:bye},{mac:"Mod-Backspace",run:xye},{mac:"Mod-Delete",run:Aye}].concat(Dye.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),CW=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Ybe,shift:aye},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Gbe,shift:oye},{key:"Alt-ArrowUp",run:jye},{key:"Shift-Alt-ArrowUp",run:_ye},{key:"Alt-ArrowDown",run:Cye},{key:"Shift-Alt-ArrowDown",run:Tye},{key:"Escape",run:vye},{key:"Mod-Enter",run:Eye},{key:"Alt-l",mac:"Ctrl-l",run:mye},{key:"Mod-i",run:gye,preventDefault:!0},{key:"Mod-[",run:jW},{key:"Mod-]",run:SW},{key:"Mod-Alt-\\",run:Mye},{key:"Shift-Mod-k",run:kye},{key:"Shift-Mod-\\",run:rye},{key:"Mod-/",run:kbe},{key:"Alt-A",run:Ebe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Rye}].concat(Nye),Iye={key:"Tab",run:SW,shift:jW},BI=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Hm{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(BI(l)):BI,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ca(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=v6(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=ql(e);let i=this.normalize(n);for(let s=0,o=r;;s++){let l=i.charCodeAt(s),u=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(u)return this.value=u,this;break}o==r&&s<n.length&&n.charCodeAt(s)==l&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Hm.prototype[Symbol.iterator]=function(){return this});const _W={from:-1,to:-1,match:/.*/.exec("")},J6="gm"+(/x/.unicode==null?"":"u");class TW{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=_W,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new kW(e,n,r,i,s);this.re=new RegExp(n,J6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=ew(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=ew(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const L_=new WeakMap;class nm{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=L_.get(e);if(!i||i.from>=r||i.to<=n){let l=new nm(n,e.sliceString(n,r));return L_.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),L_.set(e,new nm(o,s)),new nm(n,s.slice(n-o,r-o))}}class kW{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=_W,this.matchPos=ew(e,i),this.re=new RegExp(n,J6+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=nm.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=ew(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=nm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(TW.prototype[Symbol.iterator]=kW.prototype[Symbol.iterator]=function(){return this});function Bye(t){try{return new RegExp(t,J6),!0}catch{return!1}}function ew(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function Pk(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=fr("input",{class:"cm-textfield",name:"line",value:e}),r=fr("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:tw.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},fr("label",t.state.phrase("Go to line"),": ",n)," ",fr("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,l=o.doc.lineAt(o.selection.main.head),[,u,h,f,p]=s,m=f?+f.slice(1):0,v=h?+h:l.number;if(h&&p){let w=v/100;u&&(w=w*(u=="-"?-1:1)+l.number/o.doc.lines),v=Math.round(o.doc.lines*w)}else h&&u&&(v=v*(u=="-"?-1:1)+l.number);let y=o.doc.line(Math.max(1,Math.min(o.doc.lines,v))),x=De.cursor(y.from+Math.max(0,Math.min(m,y.length)));t.dispatch({effects:[tw.of(!1),ot.scrollIntoView(x.from,{y:"center"})],selection:x}),t.focus()}return{dom:r}}const tw=Wt.define(),LI=gs.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(tw)&&(t=n.value);return t},provide:t=>zv.from(t,e=>e?Pk:null)}),Lye=t=>{let e=Fv(t,Pk);if(!e){let n=[tw.of(!0)];t.state.field(LI,!1)==null&&n.push(Wt.appendConfig.of([LI,Pye])),t.dispatch({effects:n}),e=Fv(t,Pk)}return e&&e.dom.querySelector("input").select(),!0},Pye=ot.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Fye={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zye=mt.define({combine(t){return lc(t,Fye,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function OW(t){return[Uye,Qye]}const Hye=Et.mark({class:"cm-selectionMatch"}),qye=Et.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function PI(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Ir.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Ir.Word)}function $ye(t,e,n,r){return t(e.sliceDoc(n,n+1))==Ir.Word&&t(e.sliceDoc(r-1,r))==Ir.Word}const Qye=Wr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(zye),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Et.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Et.none;let u=n.wordAt(i.head);if(!u)return Et.none;o=n.charCategorizer(i.head),s=n.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<e.minSelectionLength||u>200)return Et.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(PI(o,n,i.from,i.to)&&$ye(o,n,i.from,i.to)))return Et.none}else if(s=n.sliceDoc(i.from,i.to),!s)return Et.none}let l=[];for(let u of t.visibleRanges){let h=new Hm(n.doc,s,u.from,u.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!o||PI(o,n,f,p))&&(i.empty&&f<=i.from&&p>=i.to?l.push(qye.range(f,p)):(f>=i.to||p<=i.from)&&l.push(Hye.range(f,p)),l.length>e.maxMatches))return Et.none}}return Et.set(l)}},{decorations:t=>t.decorations}),Uye=ot.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Wye=({state:t,dispatch:e})=>{let{selection:n}=t,r=De.create(n.ranges.map(i=>t.wordAt(i.head)||De.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function Vye(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,l=new Hm(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Hm(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(u=>u.from==l.value.from))continue;if(s){let u=t.wordAt(l.value.from);if(!u||u.from!=l.value.from||u.to!=l.value.to)continue}return l.value}}const Yye=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return Wye({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=Vye(t,r);return i?(e(t.update({selection:t.selection.addRange(De.range(i.from,i.to),!1),effects:ot.scrollIntoView(i.to)})),!0):!1},f0=mt.define({combine(t){return lc(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new a1e(e),scrollToMatch:e=>ot.scrollIntoView(e)})}});class EW{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Bye(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
`:r=="r"?"\r":r=="t"?"	":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Zye(this):new Xye(this)}getCursor(e,n=0,r){let i=e.doc?e:vn.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Mp(this,i,n,r):Ep(this,i,n,r)}}class MW{constructor(e){this.spec=e}}function Ep(t,e,n,r){return new Hm(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?Gye(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Gye(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(nw(i,n-s))!=Ir.Word||e(rw(i,n-s))!=Ir.Word)&&(e(rw(i,r-s))!=Ir.Word||e(nw(i,r-s))!=Ir.Word))}class Xye extends MW{constructor(e){super(e)}nextMatch(e,n,r){let i=Ep(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=Ep(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=Ep(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Ep(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Ep(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function Mp(t,e,n,r){return new TW(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Kye(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function nw(t,e){return t.slice(Gi(t,e,!1),e)}function rw(t,e){return t.slice(e,Gi(t,e))}function Kye(t){return(e,n,r)=>!r[0].length||(t(nw(r.input,r.index))!=Ir.Word||t(rw(r.input,r.index))!=Ir.Word)&&(t(rw(r.input,r.index+r[0].length))!=Ir.Word||t(nw(r.input,r.index+r[0].length))!=Ir.Word)}class Zye extends MW{nextMatch(e,n,r){let i=Mp(this.spec,e,r,e.doc.length).next();return i.done&&(i=Mp(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Mp(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=Mp(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Mp(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Wv=Wt.define(),e4=Wt.define(),Nh=gs.define({create(t){return new P_(Fk(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Wv)?t=new P_(n.value.create(),t.panel):n.is(e4)&&(t=new P_(t.query,n.value?t4:null));return t},provide:t=>zv.from(t,e=>e.panel)});class P_{constructor(e,n){this.query=e,this.panel=n}}const Jye=Et.mark({class:"cm-searchMatch"}),e1e=Et.mark({class:"cm-searchMatch cm-searchMatch-selected"}),t1e=Wr.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Nh))}update(t){let e=t.state.field(Nh);(e!=t.startState.field(Nh)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Et.none;let{view:n}=this,r=new ou;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:l,to:u}=s[i];for(;i<o-1&&u>s[i+1].from-2*250;)u=s[++i].to;t.highlight(n.state,l,u,(h,f)=>{let p=n.state.selection.ranges.some(m=>m.from==h&&m.to==f);r.add(h,f,p?e1e:Jye)})}return r.finish()}},{decorations:t=>t.decorations});function Wb(t){return e=>{let n=e.state.field(Nh,!1);return n&&n.query.spec.valid?t(e,n):NW(e)}}const iw=Wb((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=De.single(r.from,r.to),s=t.state.facet(f0);return t.dispatch({selection:i,effects:[n4(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),DW(t),!0}),sw=Wb((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=De.single(i.from,i.to),o=t.state.facet(f0);return t.dispatch({selection:s,effects:[n4(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),DW(t),!0}),n1e=Wb((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:De.create(n.map(r=>De.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),r1e=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let l=new Hm(t.doc,t.sliceDoc(r,i));!l.next().done;){if(s.length>1e3)return!1;l.value.from==r&&(o=s.length),s.push(De.range(l.value.from,l.value.to))}return e(t.update({selection:De.create(s,o),userEvent:"select.search.matches"})),!0},FI=Wb((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=[],l,u,h=[];if(s.from==r&&s.to==i&&(u=n.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:u}),s=e.nextMatch(n,s.from,s.to),h.push(ot.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let f=o.length==0||o[0].from>=s.to?0:s.to-s.from-u.length;l=De.single(s.from-f,s.to-f),h.push(n4(t,s)),h.push(n.facet(f0).scrollToMatch(l.main,t))}return t.dispatch({changes:o,selection:l,effects:h,userEvent:"input.replace"}),!0}),i1e=Wb((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ot.announce.of(r),userEvent:"input.replace.all"}),!0});function t4(t){return t.state.facet(f0).createPanel(t)}function Fk(t,e){var n,r,i,s,o;let l=t.selection.main,u=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!u)return e;let h=t.facet(f0);return new EW({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function RW(t){let e=Fv(t,t4);return e&&e.dom.querySelector("[main-field]")}function DW(t){let e=RW(t);e&&e==t.root.activeElement&&e.select()}const NW=t=>{let e=t.state.field(Nh,!1);if(e&&e.panel){let n=RW(t);if(n&&n!=t.root.activeElement){let r=Fk(t.state,e.query.spec);r.valid&&t.dispatch({effects:Wv.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[e4.of(!0),e?Wv.of(Fk(t.state,e.query.spec)):Wt.appendConfig.of(l1e)]});return!0},IW=t=>{let e=t.state.field(Nh,!1);if(!e||!e.panel)return!1;let n=Fv(t,t4);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:e4.of(!1)}),!0},s1e=[{key:"Mod-f",run:NW,scope:"editor search-panel"},{key:"F3",run:iw,shift:sw,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:iw,shift:sw,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:IW,scope:"editor search-panel"},{key:"Mod-Shift-l",run:r1e},{key:"Mod-Alt-g",run:Lye},{key:"Mod-d",run:Yye,preventDefault:!0}];class a1e{constructor(e){this.view=e;let n=this.query=e.state.field(Nh).query.spec;this.commit=this.commit.bind(this),this.searchField=fr("input",{value:n.search,placeholder:ka(e,"Find"),"aria-label":ka(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=fr("input",{value:n.replace,placeholder:ka(e,"Replace"),"aria-label":ka(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=fr("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=fr("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=fr("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return fr("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=fr("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>iw(e),[ka(e,"next")]),r("prev",()=>sw(e),[ka(e,"previous")]),r("select",()=>n1e(e),[ka(e,"all")]),fr("label",null,[this.caseField,ka(e,"match case")]),fr("label",null,[this.reField,ka(e,"regexp")]),fr("label",null,[this.wordField,ka(e,"by word")]),...e.state.readOnly?[]:[fr("br"),this.replaceField,r("replace",()=>FI(e),[ka(e,"replace")]),r("replaceAll",()=>i1e(e),[ka(e,"replace all")])],fr("button",{name:"close",onclick:()=>IW(e),"aria-label":ka(e,"close"),type:"button"},["×"])])}commit(){let e=new EW({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Wv.of(e)}))}keydown(e){Gme(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?sw:iw)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),FI(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Wv)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(f0).top}}function ka(t,e){return t.state.phrase(e)}const Y1=30,G1=/[\s\.,:;?!]/;function n4(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-Y1),o=Math.min(i,n+Y1),l=t.state.sliceDoc(s,o);if(s!=r.from){for(let u=0;u<Y1;u++)if(!G1.test(l[u+1])&&G1.test(l[u])){l=l.slice(u);break}}if(o!=i){for(let u=l.length-1;u>l.length-Y1;u--)if(!G1.test(l[u-1])&&G1.test(l[u])){l=l.slice(0,u);break}}return ot.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const o1e=ot.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),l1e=[Nh,gu.low(t1e),o1e];var zI=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(SU)),e.defaultKeymap!==!1&&(r=r.concat(CW)),e.searchKeymap!==!1&&(r=r.concat(s1e)),e.historyKeymap!==!1&&(r=r.concat(KU)),e.foldKeymap!==!1&&(r=r.concat(xge)),e.completionKeymap!==!1&&(r=r.concat(U6)),e.lintKeymap!==!1&&(r=r.concat(PU));var i=[];return e.lineNumbers!==!1&&i.push(V0e()),e.highlightActiveLineGutter!==!1&&i.push(X0e()),e.highlightSpecialChars!==!1&&i.push(UQ()),e.history!==!1&&i.push(VU()),e.foldGutter!==!1&&i.push(jge()),e.drawSelection!==!1&&i.push(t0e()),e.dropCursor!==!1&&i.push(a0e()),e.allowMultipleSelections!==!1&&i.push(vn.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(tU()),e.syntaxHighlighting!==!1&&i.push(X2(kge,{fallback:!0})),e.bracketMatching!==!1&&i.push(fU()),e.closeBrackets!==!1&&i.push(xU()),e.autocompletion!==!1&&i.push(CU()),e.rectangularSelection!==!1&&i.push(j0e()),n!==!1&&i.push(T0e()),e.highlightActiveLine!==!1&&i.push(v0e()),e.highlightSelectionMatches!==!1&&i.push(OW()),e.tabSize&&typeof e.tabSize=="number"&&i.push(qb.of(" ".repeat(e.tabSize))),i.concat([Dh.of(r.flat())]).filter(Boolean)};const c1e="#e5c07b",HI="#e06c75",u1e="#56b6c2",h1e="#ffffff",Qx="#abb2bf",zk="#7d8799",d1e="#61afef",f1e="#98c379",qI="#d19a66",p1e="#c678dd",m1e="#21252b",$I="#2c313a",QI="#282c34",F_="#353a42",g1e="#3E4451",UI="#528bff",v1e=ot.theme({"&":{color:Qx,backgroundColor:QI},".cm-content":{caretColor:UI},".cm-cursor, .cm-dropCursor":{borderLeftColor:UI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:g1e},".cm-panels":{backgroundColor:m1e,color:Qx},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:QI,color:zk,border:"none"},".cm-activeLineGutter":{backgroundColor:$I},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:F_},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:F_,borderBottomColor:F_},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:$I,color:Qx}}},{dark:!0}),b1e=Pf.define([{tag:pe.keyword,color:p1e},{tag:[pe.name,pe.deleted,pe.character,pe.propertyName,pe.macroName],color:HI},{tag:[pe.function(pe.variableName),pe.labelName],color:d1e},{tag:[pe.color,pe.constant(pe.name),pe.standard(pe.name)],color:qI},{tag:[pe.definition(pe.name),pe.separator],color:Qx},{tag:[pe.typeName,pe.className,pe.number,pe.changed,pe.annotation,pe.modifier,pe.self,pe.namespace],color:c1e},{tag:[pe.operator,pe.operatorKeyword,pe.url,pe.escape,pe.regexp,pe.link,pe.special(pe.string)],color:u1e},{tag:[pe.meta,pe.comment],color:zk},{tag:pe.strong,fontWeight:"bold"},{tag:pe.emphasis,fontStyle:"italic"},{tag:pe.strikethrough,textDecoration:"line-through"},{tag:pe.link,color:zk,textDecoration:"underline"},{tag:pe.heading,fontWeight:"bold",color:HI},{tag:[pe.atom,pe.bool,pe.special(pe.variableName)],color:qI},{tag:[pe.processingInstruction,pe.string,pe.inserted],color:f1e},{tag:pe.invalid,color:h1e}]),y1e=[v1e,X2(b1e)];var x1e=ot.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),A1e=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:s="light",placeholder:o="",basicSetup:l=!0}=e,u=[];switch(n&&u.unshift(Dh.of([Iye])),l&&(typeof l=="boolean"?u.unshift(zI()):u.unshift(zI(l))),o&&u.unshift(WQ(o)),s){case"light":u.push(x1e);break;case"dark":u.push(y1e);break;case"none":break;default:u.push(s);break}return r===!1&&u.push(ot.editable.of(!1)),i&&u.push(vn.readOnly.of(!0)),[...u]},w1e=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class S1e{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class WI{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var z_=null,j1e=()=>typeof window>"u"?new WI:(z_||(z_=new WI),z_),VI=oc.define(),C1e=200,_1e=[];function T1e(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:s,onUpdate:o,extensions:l=_1e,autoFocus:u,theme:h="light",height:f=null,minHeight:p=null,maxHeight:m=null,width:v=null,minWidth:y=null,maxWidth:x=null,placeholder:w="",editable:A=!0,readOnly:S=!1,indentWithTab:C=!0,basicSetup:j=!0,root:_,initialState:O}=t,[M,R]=E.useState(),[N,B]=E.useState(),[D,L]=E.useState(),U=E.useState(()=>({current:null}))[0],H=E.useState(()=>({current:null}))[0],z=ot.theme({"&":{height:f,minHeight:p,maxHeight:m,width:v,minWidth:y,maxWidth:x},"& .cm-scroller":{height:"100% !important"}}),I=ot.updateListener.of(G=>{if(G.docChanged&&typeof r=="function"&&!G.transactions.some(V=>V.annotation(VI))){U.current?U.current.reset():(U.current=new S1e(()=>{if(H.current){var V=H.current;H.current=null,V()}U.current=null},C1e),j1e().add(U.current));var Y=G.state.doc,W=Y.toString();r(W,G)}i&&i(w1e(G))}),F=A1e({theme:h,editable:A,readOnly:S,placeholder:w,indentWithTab:C,basicSetup:j}),$=[I,z,...F];return o&&typeof o=="function"&&$.push(ot.updateListener.of(o)),$=$.concat(l),E.useLayoutEffect(()=>{if(M&&!D){var G={doc:e,selection:n,extensions:$},Y=O?vn.fromJSON(O.json,G,O.fields):vn.create(G);if(L(Y),!N){var W=new ot({state:Y,parent:M,root:_});B(W),s&&s(W,Y)}}return()=>{N&&(L(void 0),B(void 0))}},[M,D]),E.useEffect(()=>{t.container&&R(t.container)},[t.container]),E.useEffect(()=>()=>{N&&(N.destroy(),B(void 0)),U.current&&(U.current.cancel(),U.current=null)},[N]),E.useEffect(()=>{u&&N&&N.focus()},[u,N]),E.useEffect(()=>{N&&N.dispatch({effects:Wt.reconfigure.of($)})},[h,l,f,p,m,v,y,x,w,A,S,C,j,r,o]),E.useEffect(()=>{if(e!==void 0){var G=N?N.state.doc.toString():"";if(N&&e!==G){var Y=U.current&&!U.current.isDone,W=()=>{N&&e!==N.state.doc.toString()&&N.dispatch({changes:{from:0,to:N.state.doc.toString().length,insert:e||""},annotations:[VI.of(!0)]})};Y?H.current=W:W()}}},[e,N]),{state:D,setState:L,view:N,setView:B,container:M,setContainer:R}}var k1e=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],r4=E.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:s=[],onChange:o,onStatistics:l,onCreateEditor:u,onUpdate:h,autoFocus:f,theme:p="light",height:m,minHeight:v,maxHeight:y,width:x,minWidth:w,maxWidth:A,basicSetup:S,placeholder:C,indentWithTab:j,editable:_,readOnly:O,root:M,initialState:R}=t,N=G6(t,k1e),B=E.useRef(null),{state:D,view:L,container:U,setContainer:H}=T1e({root:M,value:r,autoFocus:f,theme:p,height:m,minHeight:v,maxHeight:y,width:x,minWidth:w,maxWidth:A,basicSetup:S,placeholder:C,indentWithTab:j,editable:_,readOnly:O,selection:i,onChange:o,onStatistics:l,onCreateEditor:u,onUpdate:h,extensions:s,initialState:R});E.useImperativeHandle(e,()=>({editor:B.current,state:D,view:L}),[B,U,D,L]);var z=E.useCallback(F=>{B.current=F,H(F)},[H]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var I=typeof p=="string"?"cm-theme-"+p:"cm-theme";return a.jsx("div",ZA({ref:z,className:""+I+(n?" "+n:"")},N))});r4.displayName="CodeMirror";const BW=ot.theme({".cm-content":{paddingTop:"3px",paddingBottom:"0px"},"&.cm-editor":{"&.cm-focused":{outline:"none",outline_fallback:"none"},backgroundColor:"transparent"},".cm-scroller":{overflow:"hidden",fontFamily:'"DejaVu Sans Mono", monospace'},".cm-placeholder":{fontFamily:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'},".cm-matchingBracket":{fontWeight:"bold",outline:"1px dashed transparent"},".cm-nonmatchingBracket":{borderColor:"red"},".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{maxHeight:"350px",fontFamily:'"DejaVu Sans Mono", monospace',maxWidth:"unset"},"& > ul > li":{padding:"2px 1em 2px 3px"},minWidth:"30%"},".cm-completionDetail":{float:"right",color:"#999"},".cm-tooltip.cm-completionInfo":{padding:"10px",fontFamily:"'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;",border:"none",minWidth:"250px",maxWidth:"min-content"},".cm-completionInfo.cm-completionInfo-right":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",left:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"-11px",marginLeft:"12px"},".cm-completionInfo.cm-completionInfo-left":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",right:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"-11px",marginRight:"12px"},".cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{content:"' '",height:"0",position:"absolute",width:"0",top:"-20px",borderWidth:"10px",borderStyle:"solid",borderColor:"transparent"},marginTop:"10px",marginLeft:"150px"},".cm-completionMatchedText":{textDecoration:"none",fontWeight:"bold"},".cm-selectionMatch":{backgroundColor:"#e6f3ff"},".cm-diagnostic":{"&.cm-diagnostic-error":{borderLeft:"3px solid #e65013"}},".cm-completionIcon":{boxSizing:"content-box",fontSize:"16px",lineHeight:"1",marginRight:"10px",verticalAlign:"top","&:after":{content:"'\\ea88'"},fontFamily:"codicon",paddingRight:"0",opacity:"1"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\\ea8c'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'\\eb5f'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\\eb62'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'\\ea95'"},color:"#ee9d28"}}),LW=ot.theme({".cm-tooltip":{backgroundColor:"#f8f8f8",borderColor:"rgba(52, 79, 113, 0.2)"},".cm-tooltip.cm-tooltip-autocomplete":{"& li:hover":{backgroundColor:"#ddd"},"& > ul > li[aria-selected]":{backgroundColor:"#d6ebff",color:"unset"}},".cm-tooltip.cm-completionInfo":{backgroundColor:"#d6ebff"},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right":{"&:before":{borderRightColor:"#d6ebff"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{borderBottomColor:"#d6ebff"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-left":{"&:before":{borderLeftColor:"#d6ebff"}},".cm-line":{"&::selection":{backgroundColor:"#add6ff"},"& > span::selection":{backgroundColor:"#add6ff"}},".cm-matchingBracket":{color:"#000",backgroundColor:"#dedede"},".cm-completionMatchedText":{color:"#0066bf"},".cm-completionIcon":{color:"#007acc"},".cm-completionIcon-constant":{color:"#007acc"},".cm-completionIcon-function, .cm-completionIcon-method":{color:"#652d90"},".cm-completionIcon-keyword":{color:"#616161"}},{dark:!1}),O1e=ot.theme({".cm-content":{caretColor:"#fff"},".cm-tooltip.cm-completionInfo":{backgroundColor:"#333338"},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right":{"&:before":{borderRightColor:"#333338"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-right-narrow":{"&:before":{borderBottomColor:"#333338"}},".cm-tooltip > .cm-completionInfo.cm-completionInfo-left":{"&:before":{borderLeftColor:"#333338"}},".cm-line":{"&::selection":{backgroundColor:"#767676"},"& > span::selection":{backgroundColor:"#767676"}},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:"#616161"},".cm-completionMatchedText":{color:"#7dd3fc"},".cm-completionIcon, .cm-completionIcon-constant":{color:"#7dd3fc"},".cm-completionIcon-function, .cm-completionIcon-method":{color:"#d8b4fe"},".cm-completionIcon-keyword":{color:"#cbd5e1 !important"}},{dark:!0}),PW=Pf.define([{tag:pe.number,color:"#09885a"},{tag:pe.string,color:"#a31515"},{tag:pe.keyword,color:"#008080"},{tag:pe.function(pe.variableName),color:"#008080"},{tag:pe.labelName,color:"#800000"},{tag:pe.operator},{tag:pe.modifier,color:"#008080"},{tag:pe.paren},{tag:pe.squareBracket},{tag:pe.brace},{tag:pe.invalid,color:"red"},{tag:pe.comment,color:"#888",fontStyle:"italic"}]),FW=Pf.define([{tag:pe.number,color:"#22c55e"},{tag:pe.string,color:"#fca5a5"},{tag:pe.keyword,color:"#14bfad"},{tag:pe.function(pe.variableName),color:"#14bfad"},{tag:pe.labelName,color:"#ff8585"},{tag:pe.operator},{tag:pe.modifier,color:"#14bfad"},{tag:pe.paren},{tag:pe.squareBracket},{tag:pe.brace},{tag:pe.invalid,color:"#ff3d3d"},{tag:pe.comment,color:"#9ca3af",fontStyle:"italic"}]),E1e="_input_k0obd_1",M1e={input:E1e},Hk="api/v1",zW=({pathPrefix:t,path:e,params:n,recordResponseTime:r})=>async({signal:i})=>{var o;const s=n?`?${new URLSearchParams(n).toString()}`:"";try{const l=Date.now(),u=await fetch(`${t}/${Hk}${e}${s}`,{cache:"no-store",credentials:"same-origin",signal:i});if(!u.ok&&!((o=u.headers.get("content-type"))!=null&&o.startsWith("application/json")))throw new Error(u.statusText);const h=await u.json();if(r&&r(Date.now()-l),h.status==="error")throw new Error(h.error!==void 0?h.error:'missing "error" field in response JSON');return h}catch(l){if(!(l instanceof Error))throw new Error("Unknown error");switch(l.name){case"TypeError":throw new Error("Network error or unable to reach the server");case"SyntaxError":throw new Error("Invalid JSON response");default:throw l}}},Vh=({key:t,path:e,params:n,enabled:r,recordResponseTime:i,refetchInterval:s})=>{const{pathPrefix:o}=hi();return Voe({queryKey:t!==void 0?t:[e,n],retry:!1,refetchOnWindowFocus:!1,refetchInterval:s,gcTime:0,enabled:r,queryFn:zW({pathPrefix:o,path:e,params:n,recordResponseTime:i})})},wi=({key:t,path:e,params:n})=>{const{pathPrefix:r}=hi();return qH({queryKey:t!==void 0?t:[e,n],retry:!1,refetchOnWindowFocus:!1,staleTime:1/0,gcTime:0,queryFn:zW({pathPrefix:r,path:e,params:n})})};function R1e(t){let e=t,n=!1;const r=new Set;return{getState(){return e},updateState(i){e=typeof i=="function"?i(e):i},setState(i){this.updateState(i),r.forEach(s=>s(e))},initialize(i){n||(e=i,n=!0)},subscribe(i){return r.add(i),()=>r.delete(i)}}}function D1e(t){return E.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function N1e(t,e,n){const r=[],i=[],s={};for(const o of t){const l=o.position||e;s[l]=s[l]||0,s[l]+=1,s[l]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}const I1e=()=>R1e({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Ff=I1e(),B1e=(t=Ff)=>D1e(t);function p0(t,e){const n=t.getState(),r=N1e(e([...n.notifications,...n.queue]),n.defaultPosition,n.limit);t.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function L1e(t,e=Ff){const n=t.id||Cm();return p0(e,r=>t.id&&r.some(i=>i.id===t.id)?r:[...r,{...t,id:n}]),n}function HW(t,e=Ff){return p0(e,n=>n.filter(r=>{var i;return r.id===t?((i=r.onClose)==null||i.call(r,r),!1):!0})),t}function P1e(t,e=Ff){return p0(e,n=>n.map(r=>r.id===t.id?{...r,...t}:r)),t.id}function F1e(t=Ff){p0(t,()=>[])}function z1e(t=Ff){p0(t,e=>e.slice(0,t.getState().limit))}const ol={show:L1e,hide:HW,update:P1e,clean:F1e,cleanQueue:z1e,updateState:p0},qW=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function H1e(t,e){return t.reduce((n,r)=>(n[r.position||e].push(r),n),qW.reduce((n,r)=>(n[r]=[],n),{}))}const YI={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},q1e={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function $1e({state:t,maxHeight:e,position:n,transitionDuration:r}){const[i,s]=n.split("-"),o=s==="center"?`${i}-center`:s,l={opacity:0,maxHeight:e,transform:YI[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},u={opacity:1,transform:q1e[o]},h={opacity:0,maxHeight:0,transform:YI[o]};return{...l,...{entering:u,entered:u,exiting:h,exited:h}[t]}}function Q1e(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}function $W({data:t,onHide:e,autoClose:n,paused:r,onHoverStart:i,onHoverEnd:s,...o}){const{autoClose:l,message:u,onOpen:h,...f}=t,p=Q1e(n,t.autoClose),m=E.useRef(-1),[v,y]=E.useState(!1),x=()=>window.clearTimeout(m.current),w=()=>{e(t.id),x()},A=()=>{x(),typeof p=="number"&&(m.current=window.setTimeout(w,p))},S=()=>{y(!0),i==null||i()},C=()=>{y(!1),s==null||s()};return E.useEffect(()=>{var j;(j=t.onOpen)==null||j.call(t,t)},[]),E.useEffect(()=>(A(),x),[p]),E.useEffect(()=>(r||v?x():A(),x),[r,v]),a.jsx(n2,{...o,...f,onClose:w,onMouseEnter:S,onMouseLeave:C,children:u})}$W.displayName="@mantine/notifications/NotificationContainer";var QW={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function qk(t,e){return qk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qk(t,e)}function UW(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qk(t,e)}const GI={disabled:!1},aw=Ln.createContext(null);var U1e=function(e){return e.scrollTop},Hg="unmounted",Ld="exited",Pd="entering",Rp="entered",$k="exiting",vu=function(t){UW(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,l=o&&!o.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?l?(u=Ld,s.appearStatus=Pd):u=Rp:r.unmountOnExit||r.mountOnEnter?u=Hg:u=Ld,s.state={status:u},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===Hg?{status:Ld}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Pd&&o!==Rp&&(s=Pd):(o===Pd||o===Rp)&&(s=$k)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,l;return s=o=l=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,l=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:l}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Pd){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Og.findDOMNode(this);o&&U1e(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ld&&this.setState({status:Hg})},n.performEnter=function(i){var s=this,o=this.props.enter,l=this.context?this.context.isMounting:i,u=this.props.nodeRef?[l]:[Og.findDOMNode(this),l],h=u[0],f=u[1],p=this.getTimeouts(),m=l?p.appear:p.enter;if(!i&&!o||GI.disabled){this.safeSetState({status:Rp},function(){s.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Pd},function(){s.props.onEntering(h,f),s.onTransitionEnd(m,function(){s.safeSetState({status:Rp},function(){s.props.onEntered(h,f)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),l=this.props.nodeRef?void 0:Og.findDOMNode(this);if(!s||GI.disabled){this.safeSetState({status:Ld},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:$k},function(){i.props.onExiting(l),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Ld},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(l){o&&(o=!1,s.nextCallback=null,i(l))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:Og.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!o||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Hg)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=G6(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ln.createElement(aw.Provider,{value:null},typeof o=="function"?o(i,l):Ln.cloneElement(Ln.Children.only(o),l))},e}(Ln.Component);vu.contextType=aw;vu.propTypes={};function wp(){}vu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:wp,onEntering:wp,onEntered:wp,onExit:wp,onExiting:wp,onExited:wp};vu.UNMOUNTED=Hg;vu.EXITED=Ld;vu.ENTERING=Pd;vu.ENTERED=Rp;vu.EXITING=$k;function W1e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i4(t,e){var n=function(s){return e&&E.isValidElement(s)?e(s):s},r=Object.create(null);return t&&E.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function V1e(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,l={};for(var u in e){if(r[u])for(o=0;o<r[u].length;o++){var h=r[u][o];l[r[u][o]]=n(h)}l[u]=n(u)}for(o=0;o<i.length;o++)l[i[o]]=n(i[o]);return l}function Zd(t,e,n){return n[e]!=null?n[e]:t.props[e]}function Y1e(t,e){return i4(t.children,function(n){return E.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Zd(n,"appear",t),enter:Zd(n,"enter",t),exit:Zd(n,"exit",t)})})}function G1e(t,e,n){var r=i4(t.children),i=V1e(e,r);return Object.keys(i).forEach(function(s){var o=i[s];if(E.isValidElement(o)){var l=s in e,u=s in r,h=e[s],f=E.isValidElement(h)&&!h.props.in;u&&(!l||f)?i[s]=E.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:Zd(o,"exit",t),enter:Zd(o,"enter",t)}):!u&&l&&!f?i[s]=E.cloneElement(o,{in:!1}):u&&l&&E.isValidElement(h)&&(i[s]=E.cloneElement(o,{onExited:n.bind(null,o),in:h.props.in,exit:Zd(o,"exit",t),enter:Zd(o,"enter",t)}))}}),i}var X1e=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},K1e={component:"div",childFactory:function(e){return e}},uh=function(t){UW(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=s.handleExited.bind(W1e(s));return s.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,s){var o=s.children,l=s.handleExited,u=s.firstRender;return{children:u?Y1e(i,l):G1e(i,o,l),firstRender:!1}},n.handleExited=function(i,s){var o=i4(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(l){var u=ZA({},l.children);return delete u[i.key],{children:u}}))},n.render=function(){var i=this.props,s=i.component,o=i.childFactory,l=G6(i,["component","childFactory"]),u=this.state.contextValue,h=X1e(this.state.children).map(o);return delete l.appear,delete l.enter,delete l.exit,s===null?Ln.createElement(aw.Provider,{value:u},h):Ln.createElement(aw.Provider,{value:u},Ln.createElement(s,l,h))},e}(Ln.Component);uh.propTypes={};uh.defaultProps=K1e;const Z1e=vu,J1e={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:xo("overlay"),store:Ff,withinPortal:!0,pauseResetOnHover:"all"},WW=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":fe(n)}}),uc=Ie(t=>{const e=je("Notifications",J1e,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,attributes:u,position:h,autoClose:f,transitionDuration:p,containerWidth:m,notificationMaxHeight:v,limit:y,zIndex:x,store:w,portalProps:A,withinPortal:S,pauseResetOnHover:C,...j}=e,_=Ni(),O=B1e(w),M=kX(),R=ab(),N=E.useRef({}),B=E.useRef(0),[D,L]=E.useState(0),U=E.useCallback(()=>L(G=>G+1),[]),H=E.useCallback(()=>L(G=>Math.max(0,G-1)),[]),z=_.respectReducedMotion&&R?1:p,I=ft({name:"Notifications",classes:QW,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:u,vars:l,varsResolver:WW});E.useEffect(()=>{w==null||w.updateState(G=>({...G,limit:y||5,defaultPosition:h}))},[y,h]),ll(()=>{O.notifications.length>B.current&&setTimeout(()=>M(),0),B.current=O.notifications.length},[O.notifications]);const F=H1e(O.notifications,h),$=qW.reduce((G,Y)=>(G[Y]=F[Y].map(({style:W,...V})=>a.jsx(Z1e,{timeout:z,onEnter:()=>N.current[V.id].offsetHeight,nodeRef:{current:N.current[V.id]},children:X=>a.jsx($W,{ref:ee=>{ee&&(N.current[V.id]=ee)},data:V,onHide:ee=>HW(ee,w),autoClose:f,paused:C==="all"?D>0:!1,onHoverStart:U,onHoverEnd:H,...I("notification",{style:{...$1e({state:X,position:Y,transitionDuration:z,maxHeight:v}),...W}})})},V.id)),G),{});return a.jsxs(Lh,{withinPortal:S,...A,children:[a.jsx(be,{...I("root"),"data-position":"top-center",...j,children:a.jsx(uh,{children:$["top-center"]})}),a.jsx(be,{...I("root"),"data-position":"top-left",...j,children:a.jsx(uh,{children:$["top-left"]})}),a.jsx(be,{...I("root",{className:Sf.classNames.fullWidth}),"data-position":"top-right",...j,children:a.jsx(uh,{children:$["top-right"]})}),a.jsx(be,{...I("root",{className:Sf.classNames.fullWidth}),"data-position":"bottom-right",...j,children:a.jsx(uh,{children:$["bottom-right"]})}),a.jsx(be,{...I("root"),"data-position":"bottom-left",...j,children:a.jsx(uh,{children:$["bottom-left"]})}),a.jsx(be,{...I("root"),"data-position":"bottom-center",...j,children:a.jsx(uh,{children:$["bottom-center"]})})]})});uc.classes=QW;uc.varsResolver=WW;uc.displayName="@mantine/notifications/Notifications";uc.show=ol.show;uc.hide=ol.hide;uc.update=ol.update;uc.clean=ol.clean;uc.cleanQueue=ol.cleanQueue;uc.updateState=ol.updateState;function exe(t){return t.replace(/[&<>"']/g,e=>{switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#039;"}})}function Qk(t){return t.to-t.from+1}function VW(t,e){const n=t[e];let r=null;return e===0&&n.from!==0&&(r={from:0,to:n.from-1}),e>0&&(r={from:t[e-1].to+1,to:n.from-1}),r}function txe(t,e){let n=0;for(let r=0;r<t.length;r++){const i=t[r],s=VW(t,r);s!==null&&(n=n-Qk(s)/e),n=n+Qk(i)**2}return n}class YW{constructor(e){this.conf={caseSensitive:(e==null?void 0:e.caseSensitive)===void 0?!1:e.caseSensitive,excludedChars:(e==null?void 0:e.excludedChars)===void 0?[]:e.excludedChars,includeMatches:(e==null?void 0:e.includeMatches)===void 0?!1:e.includeMatches,shouldSort:(e==null?void 0:e.shouldSort)===void 0?!1:e.shouldSort,shouldRender:(e==null?void 0:e.shouldRender)===void 0?!0:e.shouldRender,escapeHTML:(e==null?void 0:e.escapeHTML)===void 0?!1:e.escapeHTML,pre:(e==null?void 0:e.pre)===void 0?"":e.pre,post:(e==null?void 0:e.post)===void 0?"":e.post}}filter(e,n,r){const i=(r==null?void 0:r.shouldSort)!==void 0?r.shouldSort:this.conf.shouldSort;let s=[];for(let o=0;o<n.length;o++){const l=this.match(e,n[o],r);l!==null&&(l.index=o,s.push(l))}return i&&(s=s.sort((o,l)=>l.score-o.score)),s}match(e,n,r){let i=e,s=n;const o=(r==null?void 0:r.caseSensitive)!==void 0?r.caseSensitive:this.conf.caseSensitive,l=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,u=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender;if(o||(i=i.toLowerCase(),s=s.toLowerCase()),i===s){const m=[{from:0,to:e.length-1}],v={original:n,rendered:u?this.render(n,m,r):n,score:1/0};return l&&(v.intervals=m),v}let h=[],f=0;for(let m=0;m<s.length-i.length+1;m++)if(s[m]===i[0]){const v=this.generateMatchingInterval(i,s,m,r);if(v===null)break;v.score>f&&(f=v.score,h=v.intervals)}if(h.length===0)return null;const p={original:n,rendered:u?this.render(n,h,r):n,score:f};return l&&(p.intervals=h),p}render(e,n,r){if(n.length==0)return e;let i="";const s=r!=null&&r.pre?r.pre:this.conf.pre,o=r!=null&&r.post?r.post:this.conf.post;for(let u=0;u<n.length;u++){const h=n[u],f=VW(n,u);let p="";f!==null&&(p=this.extractSubString(e,f,r));const m=this.extractSubString(e,h,r);i=`${i}${p}${s}${m}${o}`}const l=n[n.length-1];return l.to<e.length-1&&(i=i+this.extractSubString(e,{from:l.to+1,to:e.length},r)),i}extractSubString(e,n,r){const i=(r==null?void 0:r.escapeHTML)!==void 0?r.escapeHTML:this.conf.escapeHTML;let s=e.substr(n.from,Qk(n));return i&&(s=exe(s)),s}generateMatchingInterval(e,n,r,i){let s=[];(i==null?void 0:i.excludedChars)!==void 0?s=i.excludedChars:this.conf.excludedChars!==void 0&&(s=this.conf.excludedChars);let o=0;const l=[];for(let u=r;u<n.length&&o<e.length;){if(s.includes(n[u])){u++;continue}if(s.includes(e[o])){o++;continue}if(n[u]===e[o]){const h={from:u,to:u};o++,u++;for(let f=u;f<n.length&&o<e.length&&n[f]===e[o];f++)h.to=f,o++,u=f;l.push(h)}u++}return l.length===0||o!==e.length?null:{score:txe(l,n.length),intervals:l}}}const GW=new YW;function nxe(t,e,n){return GW.match(t,e,n)}function XI(t,e,n){return GW.render(t,e,n)}var Io={},Bo={},Sp={},H_={},q_={},KI;function ZI(){return KI||(KI=1,function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.fromCodePoint=void 0,t.replaceCodePoint=r,t.decodeCodePoint=i;const n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:s=>{let o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function r(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=n.get(s))!==null&&o!==void 0?o:s}function i(s){return(0,t.fromCodePoint)(r(s))}}(q_)),q_}var yg={},X1={},JI;function XW(){if(JI)return X1;JI=1,Object.defineProperty(X1,"__esModule",{value:!0}),X1.decodeBase64=t;function t(e){const n=typeof atob=="function"?atob(e):typeof Buffer.from=="function"?Buffer.from(e,"base64").toString("binary"):new Buffer(e,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let s=0,o=0;s<r;s+=2){const l=n.charCodeAt(s),u=n.charCodeAt(s+1);i[o++]=l|u<<8}return i}return X1}var eB;function tB(){if(eB)return yg;eB=1,Object.defineProperty(yg,"__esModule",{value:!0}),yg.htmlDecodeTree=void 0;const t=XW();return yg.htmlDecodeTree=(0,t.decodeBase64)(" "),yg}var xg={},nB;function rB(){if(nB)return xg;nB=1,Object.defineProperty(xg,"__esModule",{value:!0}),xg.xmlDecodeTree=void 0;const t=XW();return xg.xmlDecodeTree=(0,t.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),xg}var Ag={},iB;function rxe(){if(iB)return Ag;iB=1,Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.BinTrieFlags=void 0;var t;return function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(t||(Ag.BinTrieFlags=t={})),Ag}var sB;function KW(){return sB||(sB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.xmlDecodeTree=t.htmlDecodeTree=t.replaceCodePoint=t.fromCodePoint=t.decodeCodePoint=t.EntityDecoder=t.DecodingMode=void 0,t.determineBranch=x,t.decodeHTML=S,t.decodeHTMLAttribute=C,t.decodeHTMLStrict=j,t.decodeXML=_;const e=ZI(),n=tB(),r=rB(),i=rxe();var s;(function(N){N[N.NUM=35]="NUM",N[N.SEMI=59]="SEMI",N[N.EQUALS=61]="EQUALS",N[N.ZERO=48]="ZERO",N[N.NINE=57]="NINE",N[N.LOWER_A=97]="LOWER_A",N[N.LOWER_F=102]="LOWER_F",N[N.LOWER_X=120]="LOWER_X",N[N.LOWER_Z=122]="LOWER_Z",N[N.UPPER_A=65]="UPPER_A",N[N.UPPER_F=70]="UPPER_F",N[N.UPPER_Z=90]="UPPER_Z"})(s||(s={}));const o=32;function l(N){return N>=s.ZERO&&N<=s.NINE}function u(N){return N>=s.UPPER_A&&N<=s.UPPER_F||N>=s.LOWER_A&&N<=s.LOWER_F}function h(N){return N>=s.UPPER_A&&N<=s.UPPER_Z||N>=s.LOWER_A&&N<=s.LOWER_Z||l(N)}function f(N){return N===s.EQUALS||h(N)}var p;(function(N){N[N.EntityStart=0]="EntityStart",N[N.NumericStart=1]="NumericStart",N[N.NumericDecimal=2]="NumericDecimal",N[N.NumericHex=3]="NumericHex",N[N.NamedEntity=4]="NamedEntity"})(p||(p={}));var m;(function(N){N[N.Legacy=0]="Legacy",N[N.Strict=1]="Strict",N[N.Attribute=2]="Attribute"})(m||(t.DecodingMode=m={}));class v{constructor(B,D,L){this.decodeTree=B,this.emitCodePoint=D,this.errors=L,this.state=p.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=m.Strict,this.runConsumed=0}startEntity(B){this.decodeMode=B,this.state=p.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(B,D){switch(this.state){case p.EntityStart:return B.charCodeAt(D)===s.NUM?(this.state=p.NumericStart,this.consumed+=1,this.stateNumericStart(B,D+1)):(this.state=p.NamedEntity,this.stateNamedEntity(B,D));case p.NumericStart:return this.stateNumericStart(B,D);case p.NumericDecimal:return this.stateNumericDecimal(B,D);case p.NumericHex:return this.stateNumericHex(B,D);case p.NamedEntity:return this.stateNamedEntity(B,D)}}stateNumericStart(B,D){return D>=B.length?-1:(B.charCodeAt(D)|o)===s.LOWER_X?(this.state=p.NumericHex,this.consumed+=1,this.stateNumericHex(B,D+1)):(this.state=p.NumericDecimal,this.stateNumericDecimal(B,D))}stateNumericHex(B,D){for(;D<B.length;){const L=B.charCodeAt(D);if(l(L)||u(L)){const U=L<=s.NINE?L-s.ZERO:(L|o)-s.LOWER_A+10;this.result=this.result*16+U,this.consumed++,D++}else return this.emitNumericEntity(L,3)}return-1}stateNumericDecimal(B,D){for(;D<B.length;){const L=B.charCodeAt(D);if(l(L))this.result=this.result*10+(L-s.ZERO),this.consumed++,D++;else return this.emitNumericEntity(L,2)}return-1}emitNumericEntity(B,D){var L;if(this.consumed<=D)return(L=this.errors)===null||L===void 0||L.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(B===s.SEMI)this.consumed+=1;else if(this.decodeMode===m.Strict)return 0;return this.emitCodePoint((0,e.replaceCodePoint)(this.result),this.consumed),this.errors&&(B!==s.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(B,D){const{decodeTree:L}=this;let U=L[this.treeIndex],H=(U&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;D<B.length;){if(H===0&&(U&i.BinTrieFlags.FLAG13)!==0){const I=(U&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const F=U&i.BinTrieFlags.JUMP_TABLE;if(B.charCodeAt(D)!==F)return this.result===0?0:this.emitNotTerminatedNamedEntity();D++,this.excess++,this.runConsumed++}for(;this.runConsumed<I;){if(D>=B.length)return-1;const F=this.runConsumed-1,$=L[this.treeIndex+1+(F>>1)],G=F%2===0?$&255:$>>8&255;if(B.charCodeAt(D)!==G)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();D++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(I>>1),U=L[this.treeIndex],H=(U&i.BinTrieFlags.VALUE_LENGTH)>>14}if(D>=B.length)break;const z=B.charCodeAt(D);if(z===s.SEMI&&H!==0&&(U&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,H,this.consumed+this.excess);if(this.treeIndex=x(L,U,this.treeIndex+Math.max(1,H),z),this.treeIndex<0)return this.result===0||this.decodeMode===m.Attribute&&(H===0||f(z))?0:this.emitNotTerminatedNamedEntity();if(U=L[this.treeIndex],H=(U&i.BinTrieFlags.VALUE_LENGTH)>>14,H!==0){if(z===s.SEMI)return this.emitNamedEntityData(this.treeIndex,H,this.consumed+this.excess);this.decodeMode!==m.Strict&&(U&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}D++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var B;const{result:D,decodeTree:L}=this,U=(L[D]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(D,U,this.consumed),(B=this.errors)===null||B===void 0||B.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(B,D,L){const{decodeTree:U}=this;return this.emitCodePoint(D===1?U[B]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):U[B+1],L),D===3&&this.emitCodePoint(U[B+2],L),L}end(){var B;switch(this.state){case p.NamedEntity:return this.result!==0&&(this.decodeMode!==m.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case p.NumericDecimal:return this.emitNumericEntity(0,2);case p.NumericHex:return this.emitNumericEntity(0,3);case p.NumericStart:return(B=this.errors)===null||B===void 0||B.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case p.EntityStart:return 0}}}t.EntityDecoder=v;function y(N){let B="";const D=new v(N,L=>B+=(0,e.fromCodePoint)(L));return function(U,H){let z=0,I=0;for(;(I=U.indexOf("&",I))>=0;){B+=U.slice(z,I),D.startEntity(H);const $=D.write(U,I+1);if($<0){z=I+D.end();break}z=I+$,I=$===0?z+1:z}const F=B+U.slice(z);return B="",F}}function x(N,B,D,L){const U=(B&i.BinTrieFlags.BRANCH_LENGTH)>>7,H=B&i.BinTrieFlags.JUMP_TABLE;if(U===0)return H!==0&&L===H?D:-1;if(H){const $=L-H;return $<0||$>=U?-1:N[D+$]-1}const z=U+1>>1;let I=0,F=U-1;for(;I<=F;){const $=I+F>>>1,G=$>>1,W=N[D+G]>>($&1)*8&255;if(W<L)I=$+1;else if(W>L)F=$-1;else return N[D+z+$]}return-1}const w=y(n.htmlDecodeTree),A=y(r.xmlDecodeTree);function S(N,B=m.Legacy){return w(N,B)}function C(N){return w(N,m.Attribute)}function j(N){return w(N,m.Strict)}function _(N){return A(N,m.Strict)}var O=ZI();Object.defineProperty(t,"decodeCodePoint",{enumerable:!0,get:function(){return O.decodeCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return O.fromCodePoint}}),Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return O.replaceCodePoint}});var M=tB();Object.defineProperty(t,"htmlDecodeTree",{enumerable:!0,get:function(){return M.htmlDecodeTree}});var R=rB();Object.defineProperty(t,"xmlDecodeTree",{enumerable:!0,get:function(){return R.xmlDecodeTree}})}(H_)),H_}var aB;function ZW(){if(aB)return Sp;aB=1,Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.QuoteType=void 0;const t=KW();var e;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(e||(e={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.BeforeSpecialT=23]="BeforeSpecialT",h[h.SpecialStartSequence=24]="SpecialStartSequence",h[h.InSpecialTag=25]="InSpecialTag",h[h.InEntity=26]="InEntity"})(n||(n={}));function r(h){return h===e.Space||h===e.NewLine||h===e.Tab||h===e.FormFeed||h===e.CarriageReturn}function i(h){return h===e.Slash||h===e.Gt||r(h)}function s(h){return h>=e.LowerA&&h<=e.LowerZ||h>=e.UpperA&&h<=e.UpperZ}var o;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(o||(Sp.QuoteType=o={}));const l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};let u=class{constructor({xmlMode:f=!1,decodeEntities:p=!0},m){this.cbs=m,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=f,this.decodeEntities=p,this.entityDecoder=new t.EntityDecoder(f?t.xmlDecodeTree:t.htmlDecodeTree,(v,y)=>this.emitCodePoint(v,y))}reset(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(f){f===e.Lt||!this.decodeEntities&&this.fastForwardTo(e.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateSpecialStartSequence(f){const p=this.sequenceIndex===this.currentSequence.length;if(!(p?i(f):(f|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!p){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(f)}stateInSpecialTag(f){if(this.sequenceIndex===this.currentSequence.length){if(f===e.Gt||r(f)){const p=this.index-this.currentSequence.length;if(this.sectionStart<p){const m=this.index;this.index=p,this.cbs.ontext(this.sectionStart,p),this.index=m}this.isSpecial=!1,this.sectionStart=p+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}(f|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===l.TitleEnd?this.decodeEntities&&f===e.Amp&&this.startEntity():this.fastForwardTo(e.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(f===e.Lt)}stateCDATASequence(f){f===l.Cdata[this.sequenceIndex]?++this.sequenceIndex===l.Cdata.length&&(this.state=n.InCommentLike,this.currentSequence=l.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=n.InDeclaration,this.stateInDeclaration(f))}fastForwardTo(f){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(f){f===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=n.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):f!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(f){return this.xmlMode?!i(f):s(f)}startSpecial(f,p){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=p,this.state=n.SpecialStartSequence}stateBeforeTagName(f){if(f===e.ExclamationMark)this.state=n.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===e.Questionmark)this.state=n.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){const p=f|32;this.sectionStart=this.index,this.xmlMode?this.state=n.InTagName:p===l.ScriptEnd[2]?this.state=n.BeforeSpecialS:p===l.TitleEnd[2]||p===l.XmpEnd[2]?this.state=n.BeforeSpecialT:this.state=n.InTagName}else f===e.Slash?this.state=n.BeforeClosingTagName:(this.state=n.Text,this.stateText(f))}stateInTagName(f){i(f)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))}stateBeforeClosingTagName(f){r(f)||(f===e.Gt?this.state=n.Text:(this.state=this.isTagStartChar(f)?n.InClosingTagName:n.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(f){(f===e.Gt||r(f))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterClosingTagName,this.stateAfterClosingTagName(f))}stateAfterClosingTagName(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(f){f===e.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=n.InSpecialTag,this.sequenceIndex=0):this.state=n.Text,this.sectionStart=this.index+1):f===e.Slash?this.state=n.InSelfClosingTag:r(f)||(this.state=n.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(f){f===e.Gt?(this.cbs.onselfclosingtag(this.index),this.state=n.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(f)||(this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))}stateInAttributeName(f){(f===e.Eq||i(f))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=n.AfterAttributeName,this.stateAfterAttributeName(f))}stateAfterAttributeName(f){f===e.Eq?this.state=n.BeforeAttributeValue:f===e.Slash||f===e.Gt?(this.cbs.onattribend(o.NoValue,this.sectionStart),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):r(f)||(this.cbs.onattribend(o.NoValue,this.sectionStart),this.state=n.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(f){f===e.DoubleQuote?(this.state=n.InAttributeValueDq,this.sectionStart=this.index+1):f===e.SingleQuote?(this.state=n.InAttributeValueSq,this.sectionStart=this.index+1):r(f)||(this.sectionStart=this.index,this.state=n.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f))}handleInAttributeValue(f,p){f===p||!this.decodeEntities&&this.fastForwardTo(p)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(p===e.DoubleQuote?o.Double:o.Single,this.index+1),this.state=n.BeforeAttributeName):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(f){this.handleInAttributeValue(f,e.DoubleQuote)}stateInAttributeValueSingleQuotes(f){this.handleInAttributeValue(f,e.SingleQuote)}stateInAttributeValueNoQuotes(f){r(f)||f===e.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o.Unquoted,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):this.decodeEntities&&f===e.Amp&&this.startEntity()}stateBeforeDeclaration(f){f===e.OpeningSquareBracket?(this.state=n.CDATASequence,this.sequenceIndex=0):this.state=f===e.Dash?n.BeforeComment:n.InDeclaration}stateInDeclaration(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeComment(f){f===e.Dash?(this.state=n.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=n.InDeclaration}stateInSpecialComment(f){(f===e.Gt||this.fastForwardTo(e.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=n.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(f){const p=f|32;p===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):p===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=n.InTagName,this.stateInTagName(f))}stateBeforeSpecialT(f){switch(f|32){case l.TitleEnd[3]:{this.startSpecial(l.TitleEnd,4);break}case l.TextareaEnd[3]:{this.startSpecial(l.TextareaEnd,4);break}case l.XmpEnd[3]:{this.startSpecial(l.XmpEnd,4);break}default:this.state=n.InTagName,this.stateInTagName(f)}}startEntity(){this.baseState=this.state,this.state=n.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?t.DecodingMode.Strict:this.baseState===n.Text||this.baseState===n.InSpecialTag?t.DecodingMode.Legacy:t.DecodingMode.Attribute)}stateInEntity(){const f=this.index-this.offset,p=this.entityDecoder.write(this.buffer,f);if(p>=0)this.state=this.baseState,p===0&&(this.index-=1);else{if(f<this.buffer.length&&this.buffer.charCodeAt(f)===e.Amp){this.state=this.baseState,this.index-=1;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case n.Text:{this.stateText(f);break}case n.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case n.InSpecialTag:{this.stateInSpecialTag(f);break}case n.CDATASequence:{this.stateCDATASequence(f);break}case n.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case n.InAttributeName:{this.stateInAttributeName(f);break}case n.InCommentLike:{this.stateInCommentLike(f);break}case n.InSpecialComment:{this.stateInSpecialComment(f);break}case n.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case n.InTagName:{this.stateInTagName(f);break}case n.InClosingTagName:{this.stateInClosingTagName(f);break}case n.BeforeTagName:{this.stateBeforeTagName(f);break}case n.AfterAttributeName:{this.stateAfterAttributeName(f);break}case n.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case n.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case n.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case n.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case n.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case n.BeforeSpecialT:{this.stateBeforeSpecialT(f);break}case n.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case n.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case n.InDeclaration:{this.stateInDeclaration(f);break}case n.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case n.BeforeComment:{this.stateBeforeComment(f);break}case n.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case n.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===n.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const f=this.buffer.length+this.offset;this.sectionStart>=f||(this.state===n.InCommentLike?this.currentSequence===l.CdataEnd?this.cbs.oncdata(this.sectionStart,f,0):this.cbs.oncomment(this.sectionStart,f,0):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,f))}emitCodePoint(f,p){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+p,this.index=this.sectionStart-1,this.cbs.onattribentity(f)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+p,this.index=this.sectionStart-1,this.cbs.ontextentity(f,this.sectionStart))}};return Sp.default=u,Sp}var oB;function lB(){if(oB)return Bo;oB=1;var t=Bo&&Bo.__createBinding||(Object.create?function(w,A,S,C){C===void 0&&(C=S);var j=Object.getOwnPropertyDescriptor(A,S);(!j||("get"in j?!A.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return A[S]}}),Object.defineProperty(w,C,j)}:function(w,A,S,C){C===void 0&&(C=S),w[C]=A[S]}),e=Bo&&Bo.__setModuleDefault||(Object.create?function(w,A){Object.defineProperty(w,"default",{enumerable:!0,value:A})}:function(w,A){w.default=A}),n=Bo&&Bo.__importStar||function(){var w=function(A){return w=Object.getOwnPropertyNames||function(S){var C=[];for(var j in S)Object.prototype.hasOwnProperty.call(S,j)&&(C[C.length]=j);return C},w(A)};return function(A){if(A&&A.__esModule)return A;var S={};if(A!=null)for(var C=w(A),j=0;j<C.length;j++)C[j]!=="default"&&t(S,A,C[j]);return e(S,A),S}}();Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.Parser=void 0;const r=n(ZW()),i=KW(),s=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),l=new Set(["thead","tbody"]),u=new Set(["dd","dt"]),h=new Set(["rt","rp"]),f=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",o],["h1",o],["h2",o],["h3",o],["h4",o],["h5",o],["h6",o],["select",s],["input",s],["output",s],["button",s],["datalist",s],["textarea",s],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",u],["dt",u],["address",o],["article",o],["aside",o],["blockquote",o],["details",o],["div",o],["dl",o],["fieldset",o],["figcaption",o],["figure",o],["footer",o],["form",o],["header",o],["hr",o],["main",o],["nav",o],["ol",o],["pre",o],["section",o],["table",o],["ul",o],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),m=new Set(["math","svg"]),v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),y=/\s|\//;let x=class{constructor(A,S={}){var C,j,_,O,M,R;this.options=S,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=A??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(C=S.lowerCaseTags)!==null&&C!==void 0?C:this.htmlMode,this.lowerCaseAttributeNames=(j=S.lowerCaseAttributeNames)!==null&&j!==void 0?j:this.htmlMode,this.recognizeSelfClosing=(_=S.recognizeSelfClosing)!==null&&_!==void 0?_:!this.htmlMode,this.tokenizer=new((O=S.Tokenizer)!==null&&O!==void 0?O:r.default)(this.options,this),this.foreignContext=[!this.htmlMode],(R=(M=this.cbs).onparserinit)===null||R===void 0||R.call(M,this)}ontext(A,S){var C,j;const _=this.getSlice(A,S);this.endIndex=S-1,(j=(C=this.cbs).ontext)===null||j===void 0||j.call(C,_),this.startIndex=S}ontextentity(A,S){var C,j;this.endIndex=S-1,(j=(C=this.cbs).ontext)===null||j===void 0||j.call(C,(0,i.fromCodePoint)(A)),this.startIndex=S}isVoidElement(A){return this.htmlMode&&p.has(A)}onopentagname(A,S){this.endIndex=S;let C=this.getSlice(A,S);this.lowerCaseTagNames&&(C=C.toLowerCase()),this.emitOpenTag(C)}emitOpenTag(A){var S,C,j,_;this.openTagStart=this.startIndex,this.tagname=A;const O=this.htmlMode&&f.get(A);if(O)for(;this.stack.length>0&&O.has(this.stack[0]);){const M=this.stack.shift();(C=(S=this.cbs).onclosetag)===null||C===void 0||C.call(S,M,!0)}this.isVoidElement(A)||(this.stack.unshift(A),this.htmlMode&&(m.has(A)?this.foreignContext.unshift(!0):v.has(A)&&this.foreignContext.unshift(!1))),(_=(j=this.cbs).onopentagname)===null||_===void 0||_.call(j,A),this.cbs.onopentag&&(this.attribs={})}endOpenTag(A){var S,C;this.startIndex=this.openTagStart,this.attribs&&((C=(S=this.cbs).onopentag)===null||C===void 0||C.call(S,this.tagname,this.attribs,A),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(A){this.endIndex=A,this.endOpenTag(!1),this.startIndex=A+1}onclosetag(A,S){var C,j,_,O,M,R,N,B;this.endIndex=S;let D=this.getSlice(A,S);if(this.lowerCaseTagNames&&(D=D.toLowerCase()),this.htmlMode&&(m.has(D)||v.has(D))&&this.foreignContext.shift(),this.isVoidElement(D))this.htmlMode&&D==="br"&&((O=(_=this.cbs).onopentagname)===null||O===void 0||O.call(_,"br"),(R=(M=this.cbs).onopentag)===null||R===void 0||R.call(M,"br",{},!0),(B=(N=this.cbs).onclosetag)===null||B===void 0||B.call(N,"br",!1));else{const L=this.stack.indexOf(D);if(L!==-1)for(let U=0;U<=L;U++){const H=this.stack.shift();(j=(C=this.cbs).onclosetag)===null||j===void 0||j.call(C,H,U!==L)}else this.htmlMode&&D==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=S+1}onselfclosingtag(A){this.endIndex=A,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=A+1):this.onopentagend(A)}closeCurrentTag(A){var S,C;const j=this.tagname;this.endOpenTag(A),this.stack[0]===j&&((C=(S=this.cbs).onclosetag)===null||C===void 0||C.call(S,j,!A),this.stack.shift())}onattribname(A,S){this.startIndex=A;const C=this.getSlice(A,S);this.attribname=this.lowerCaseAttributeNames?C.toLowerCase():C}onattribdata(A,S){this.attribvalue+=this.getSlice(A,S)}onattribentity(A){this.attribvalue+=(0,i.fromCodePoint)(A)}onattribend(A,S){var C,j;this.endIndex=S,(j=(C=this.cbs).onattribute)===null||j===void 0||j.call(C,this.attribname,this.attribvalue,A===r.QuoteType.Double?'"':A===r.QuoteType.Single?"'":A===r.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(A){const S=A.search(y);let C=S<0?A:A.substr(0,S);return this.lowerCaseTagNames&&(C=C.toLowerCase()),C}ondeclaration(A,S){this.endIndex=S;const C=this.getSlice(A,S);if(this.cbs.onprocessinginstruction){const j=this.getInstructionName(C);this.cbs.onprocessinginstruction(`!${j}`,`!${C}`)}this.startIndex=S+1}onprocessinginstruction(A,S){this.endIndex=S;const C=this.getSlice(A,S);if(this.cbs.onprocessinginstruction){const j=this.getInstructionName(C);this.cbs.onprocessinginstruction(`?${j}`,`?${C}`)}this.startIndex=S+1}oncomment(A,S,C){var j,_,O,M;this.endIndex=S,(_=(j=this.cbs).oncomment)===null||_===void 0||_.call(j,this.getSlice(A,S-C)),(M=(O=this.cbs).oncommentend)===null||M===void 0||M.call(O),this.startIndex=S+1}oncdata(A,S,C){var j,_,O,M,R,N,B,D,L,U;this.endIndex=S;const H=this.getSlice(A,S-C);!this.htmlMode||this.options.recognizeCDATA?((_=(j=this.cbs).oncdatastart)===null||_===void 0||_.call(j),(M=(O=this.cbs).ontext)===null||M===void 0||M.call(O,H),(N=(R=this.cbs).oncdataend)===null||N===void 0||N.call(R)):((D=(B=this.cbs).oncomment)===null||D===void 0||D.call(B,`[CDATA[${H}]]`),(U=(L=this.cbs).oncommentend)===null||U===void 0||U.call(L)),this.startIndex=S+1}onend(){var A,S;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let C=0;C<this.stack.length;C++)this.cbs.onclosetag(this.stack[C],!0)}(S=(A=this.cbs).onend)===null||S===void 0||S.call(A)}reset(){var A,S,C,j;(S=(A=this.cbs).onreset)===null||S===void 0||S.call(A),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(j=(C=this.cbs).onparserinit)===null||j===void 0||j.call(C,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(A){this.reset(),this.end(A)}getSlice(A,S){for(;A-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let C=this.buffers[0].slice(A-this.bufferOffset,S-this.bufferOffset);for(;S-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),C+=this.buffers[0].slice(0,S-this.bufferOffset);return C}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(A){var S,C;if(this.ended){(C=(S=this.cbs).onerror)===null||C===void 0||C.call(S,new Error(".write() after done!"));return}this.buffers.push(A),this.tokenizer.running&&(this.tokenizer.write(A),this.writeIndex++)}end(A){var S,C;if(this.ended){(C=(S=this.cbs).onerror)===null||C===void 0||C.call(S,new Error(".end() after done!"));return}A&&this.write(A),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(A){this.write(A)}done(A){this.end(A)}};return Bo.Parser=x,Bo}var Dd={},$_={},cB;function Vb(){return cB||(cB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype}($_)),$_}var en={},uB;function hB(){if(uB)return en;uB=1;var t=en&&en.__extends||function(){var _=function(O,M){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,N){R.__proto__=N}||function(R,N){for(var B in N)Object.prototype.hasOwnProperty.call(N,B)&&(R[B]=N[B])},_(O,M)};return function(O,M){if(typeof M!="function"&&M!==null)throw new TypeError("Class extends value "+String(M)+" is not a constructor or null");_(O,M);function R(){this.constructor=O}O.prototype=M===null?Object.create(M):(R.prototype=M.prototype,new R)}}(),e=en&&en.__assign||function(){return e=Object.assign||function(_){for(var O,M=1,R=arguments.length;M<R;M++){O=arguments[M];for(var N in O)Object.prototype.hasOwnProperty.call(O,N)&&(_[N]=O[N])}return _},e.apply(this,arguments)};Object.defineProperty(en,"__esModule",{value:!0}),en.cloneNode=en.hasChildren=en.isDocument=en.isDirective=en.isComment=en.isText=en.isCDATA=en.isTag=en.Element=en.Document=en.CDATA=en.NodeWithChildren=en.ProcessingInstruction=en.Comment=en.Text=en.DataNode=en.Node=void 0;var n=Vb(),r=function(){function _(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(_.prototype,"parentNode",{get:function(){return this.parent},set:function(O){this.parent=O},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"previousSibling",{get:function(){return this.prev},set:function(O){this.prev=O},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"nextSibling",{get:function(){return this.next},set:function(O){this.next=O},enumerable:!1,configurable:!0}),_.prototype.cloneNode=function(O){return O===void 0&&(O=!1),C(this,O)},_}();en.Node=r;var i=function(_){t(O,_);function O(M){var R=_.call(this)||this;return R.data=M,R}return Object.defineProperty(O.prototype,"nodeValue",{get:function(){return this.data},set:function(M){this.data=M},enumerable:!1,configurable:!0}),O}(r);en.DataNode=i;var s=function(_){t(O,_);function O(){var M=_!==null&&_.apply(this,arguments)||this;return M.type=n.ElementType.Text,M}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),O}(i);en.Text=s;var o=function(_){t(O,_);function O(){var M=_!==null&&_.apply(this,arguments)||this;return M.type=n.ElementType.Comment,M}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),O}(i);en.Comment=o;var l=function(_){t(O,_);function O(M,R){var N=_.call(this,R)||this;return N.name=M,N.type=n.ElementType.Directive,N}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),O}(i);en.ProcessingInstruction=l;var u=function(_){t(O,_);function O(M){var R=_.call(this)||this;return R.children=M,R}return Object.defineProperty(O.prototype,"firstChild",{get:function(){var M;return(M=this.children[0])!==null&&M!==void 0?M:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"childNodes",{get:function(){return this.children},set:function(M){this.children=M},enumerable:!1,configurable:!0}),O}(r);en.NodeWithChildren=u;var h=function(_){t(O,_);function O(){var M=_!==null&&_.apply(this,arguments)||this;return M.type=n.ElementType.CDATA,M}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),O}(u);en.CDATA=h;var f=function(_){t(O,_);function O(){var M=_!==null&&_.apply(this,arguments)||this;return M.type=n.ElementType.Root,M}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),O}(u);en.Document=f;var p=function(_){t(O,_);function O(M,R,N,B){N===void 0&&(N=[]),B===void 0&&(B=M==="script"?n.ElementType.Script:M==="style"?n.ElementType.Style:n.ElementType.Tag);var D=_.call(this,N)||this;return D.name=M,D.attribs=R,D.type=B,D}return Object.defineProperty(O.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"tagName",{get:function(){return this.name},set:function(M){this.name=M},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"attributes",{get:function(){var M=this;return Object.keys(this.attribs).map(function(R){var N,B;return{name:R,value:M.attribs[R],namespace:(N=M["x-attribsNamespace"])===null||N===void 0?void 0:N[R],prefix:(B=M["x-attribsPrefix"])===null||B===void 0?void 0:B[R]}})},enumerable:!1,configurable:!0}),O}(u);en.Element=p;function m(_){return(0,n.isTag)(_)}en.isTag=m;function v(_){return _.type===n.ElementType.CDATA}en.isCDATA=v;function y(_){return _.type===n.ElementType.Text}en.isText=y;function x(_){return _.type===n.ElementType.Comment}en.isComment=x;function w(_){return _.type===n.ElementType.Directive}en.isDirective=w;function A(_){return _.type===n.ElementType.Root}en.isDocument=A;function S(_){return Object.prototype.hasOwnProperty.call(_,"children")}en.hasChildren=S;function C(_,O){O===void 0&&(O=!1);var M;if(y(_))M=new s(_.data);else if(x(_))M=new o(_.data);else if(m(_)){var R=O?j(_.children):[],N=new p(_.name,e({},_.attribs),R);R.forEach(function(U){return U.parent=N}),_.namespace!=null&&(N.namespace=_.namespace),_["x-attribsNamespace"]&&(N["x-attribsNamespace"]=e({},_["x-attribsNamespace"])),_["x-attribsPrefix"]&&(N["x-attribsPrefix"]=e({},_["x-attribsPrefix"])),M=N}else if(v(_)){var R=O?j(_.children):[],B=new h(R);R.forEach(function(H){return H.parent=B}),M=B}else if(A(_)){var R=O?j(_.children):[],D=new f(R);R.forEach(function(H){return H.parent=D}),_["x-mode"]&&(D["x-mode"]=_["x-mode"]),M=D}else if(w(_)){var L=new l(_.name,_.data);_["x-name"]!=null&&(L["x-name"]=_["x-name"],L["x-publicId"]=_["x-publicId"],L["x-systemId"]=_["x-systemId"]),M=L}else throw new Error("Not implemented yet: ".concat(_.type));return M.startIndex=_.startIndex,M.endIndex=_.endIndex,_.sourceCodeLocation!=null&&(M.sourceCodeLocation=_.sourceCodeLocation),M}en.cloneNode=C;function j(_){for(var O=_.map(function(R){return C(R,!0)}),M=1;M<O.length;M++)O[M].prev=O[M-1],O[M-1].next=O[M];return O}return en}var dB;function Yh(){return dB||(dB=1,function(t){var e=Dd&&Dd.__createBinding||(Object.create?function(l,u,h,f){f===void 0&&(f=h);var p=Object.getOwnPropertyDescriptor(u,h);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[h]}}),Object.defineProperty(l,f,p)}:function(l,u,h,f){f===void 0&&(f=h),l[f]=u[h]}),n=Dd&&Dd.__exportStar||function(l,u){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(u,h)&&e(u,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=Vb(),i=hB();n(hB(),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function l(u,h,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof h=="function"&&(f=h,h=s),typeof u=="object"&&(h=u,u=void 0),this.callback=u??null,this.options=h??s,this.elementCB=f??null}return l.prototype.onparserinit=function(u){this.parser=u},l.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(u){this.handleCallback(u)},l.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},l.prototype.onopentag=function(u,h){var f=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,h,void 0,f);this.addNode(p),this.tagStack.push(p)},l.prototype.ontext=function(u){var h=this.lastNode;if(h&&h.type===r.ElementType.Text)h.data+=u,this.options.withEndIndices&&(h.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},l.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var h=new i.Comment(u);this.addNode(h),this.lastNode=h},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var u=new i.Text(""),h=new i.CDATA([u]);this.addNode(h),u.parent=h,this.lastNode=u},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(u,h){var f=new i.ProcessingInstruction(u,h);this.addNode(f)},l.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},l.prototype.addNode=function(u){var h=this.tagStack[this.tagStack.length-1],f=h.children[h.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),h.children.push(u),f&&(u.prev=f,f.next=u),u.parent=h,this.lastNode=null},l}();t.DomHandler=o,t.default=o}(Dd)),Dd}var Nd={},Ml={},sa={},Q_={},Lo={},K1={},fB;function ixe(){return fB||(fB=1,Object.defineProperty(K1,"__esModule",{value:!0}),K1.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(t){return t.charCodeAt(0)}))),K1}var Z1={},pB;function sxe(){return pB||(pB=1,Object.defineProperty(Z1,"__esModule",{value:!0}),Z1.default=new Uint16Array("Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t){return t.charCodeAt(0)}))),Z1}var U_={},mB;function gB(){return mB||(mB=1,function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function r(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=n.get(s))!==null&&o!==void 0?o:s}t.replaceCodePoint=r;function i(s){return(0,t.fromCodePoint)(r(s))}t.default=i}(U_)),U_}var vB;function bB(){return vB||(vB=1,function(t){var e=Lo&&Lo.__createBinding||(Object.create?function(D,L,U,H){H===void 0&&(H=U);var z=Object.getOwnPropertyDescriptor(L,U);(!z||("get"in z?!L.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return L[U]}}),Object.defineProperty(D,H,z)}:function(D,L,U,H){H===void 0&&(H=U),D[H]=L[U]}),n=Lo&&Lo.__setModuleDefault||(Object.create?function(D,L){Object.defineProperty(D,"default",{enumerable:!0,value:L})}:function(D,L){D.default=L}),r=Lo&&Lo.__importStar||function(D){if(D&&D.__esModule)return D;var L={};if(D!=null)for(var U in D)U!=="default"&&Object.prototype.hasOwnProperty.call(D,U)&&e(L,D,U);return n(L,D),L},i=Lo&&Lo.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=i(ixe());t.htmlDecodeTree=s.default;var o=i(sxe());t.xmlDecodeTree=o.default;var l=r(gB());t.decodeCodePoint=l.default;var u=gB();Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var h;(function(D){D[D.NUM=35]="NUM",D[D.SEMI=59]="SEMI",D[D.EQUALS=61]="EQUALS",D[D.ZERO=48]="ZERO",D[D.NINE=57]="NINE",D[D.LOWER_A=97]="LOWER_A",D[D.LOWER_F=102]="LOWER_F",D[D.LOWER_X=120]="LOWER_X",D[D.LOWER_Z=122]="LOWER_Z",D[D.UPPER_A=65]="UPPER_A",D[D.UPPER_F=70]="UPPER_F",D[D.UPPER_Z=90]="UPPER_Z"})(h||(h={}));var f=32,p;(function(D){D[D.VALUE_LENGTH=49152]="VALUE_LENGTH",D[D.BRANCH_LENGTH=16256]="BRANCH_LENGTH",D[D.JUMP_TABLE=127]="JUMP_TABLE"})(p=t.BinTrieFlags||(t.BinTrieFlags={}));function m(D){return D>=h.ZERO&&D<=h.NINE}function v(D){return D>=h.UPPER_A&&D<=h.UPPER_F||D>=h.LOWER_A&&D<=h.LOWER_F}function y(D){return D>=h.UPPER_A&&D<=h.UPPER_Z||D>=h.LOWER_A&&D<=h.LOWER_Z||m(D)}function x(D){return D===h.EQUALS||y(D)}var w;(function(D){D[D.EntityStart=0]="EntityStart",D[D.NumericStart=1]="NumericStart",D[D.NumericDecimal=2]="NumericDecimal",D[D.NumericHex=3]="NumericHex",D[D.NamedEntity=4]="NamedEntity"})(w||(w={}));var A;(function(D){D[D.Legacy=0]="Legacy",D[D.Strict=1]="Strict",D[D.Attribute=2]="Attribute"})(A=t.DecodingMode||(t.DecodingMode={}));var S=function(){function D(L,U,H){this.decodeTree=L,this.emitCodePoint=U,this.errors=H,this.state=w.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=A.Strict}return D.prototype.startEntity=function(L){this.decodeMode=L,this.state=w.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},D.prototype.write=function(L,U){switch(this.state){case w.EntityStart:return L.charCodeAt(U)===h.NUM?(this.state=w.NumericStart,this.consumed+=1,this.stateNumericStart(L,U+1)):(this.state=w.NamedEntity,this.stateNamedEntity(L,U));case w.NumericStart:return this.stateNumericStart(L,U);case w.NumericDecimal:return this.stateNumericDecimal(L,U);case w.NumericHex:return this.stateNumericHex(L,U);case w.NamedEntity:return this.stateNamedEntity(L,U)}},D.prototype.stateNumericStart=function(L,U){return U>=L.length?-1:(L.charCodeAt(U)|f)===h.LOWER_X?(this.state=w.NumericHex,this.consumed+=1,this.stateNumericHex(L,U+1)):(this.state=w.NumericDecimal,this.stateNumericDecimal(L,U))},D.prototype.addToNumericResult=function(L,U,H,z){if(U!==H){var I=H-U;this.result=this.result*Math.pow(z,I)+parseInt(L.substr(U,I),z),this.consumed+=I}},D.prototype.stateNumericHex=function(L,U){for(var H=U;U<L.length;){var z=L.charCodeAt(U);if(m(z)||v(z))U+=1;else return this.addToNumericResult(L,H,U,16),this.emitNumericEntity(z,3)}return this.addToNumericResult(L,H,U,16),-1},D.prototype.stateNumericDecimal=function(L,U){for(var H=U;U<L.length;){var z=L.charCodeAt(U);if(m(z))U+=1;else return this.addToNumericResult(L,H,U,10),this.emitNumericEntity(z,2)}return this.addToNumericResult(L,H,U,10),-1},D.prototype.emitNumericEntity=function(L,U){var H;if(this.consumed<=U)return(H=this.errors)===null||H===void 0||H.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(L===h.SEMI)this.consumed+=1;else if(this.decodeMode===A.Strict)return 0;return this.emitCodePoint((0,l.replaceCodePoint)(this.result),this.consumed),this.errors&&(L!==h.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},D.prototype.stateNamedEntity=function(L,U){for(var H=this.decodeTree,z=H[this.treeIndex],I=(z&p.VALUE_LENGTH)>>14;U<L.length;U++,this.excess++){var F=L.charCodeAt(U);if(this.treeIndex=j(H,z,this.treeIndex+Math.max(1,I),F),this.treeIndex<0)return this.result===0||this.decodeMode===A.Attribute&&(I===0||x(F))?0:this.emitNotTerminatedNamedEntity();if(z=H[this.treeIndex],I=(z&p.VALUE_LENGTH)>>14,I!==0){if(F===h.SEMI)return this.emitNamedEntityData(this.treeIndex,I,this.consumed+this.excess);this.decodeMode!==A.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},D.prototype.emitNotTerminatedNamedEntity=function(){var L,U=this,H=U.result,z=U.decodeTree,I=(z[H]&p.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,I,this.consumed),(L=this.errors)===null||L===void 0||L.missingSemicolonAfterCharacterReference(),this.consumed},D.prototype.emitNamedEntityData=function(L,U,H){var z=this.decodeTree;return this.emitCodePoint(U===1?z[L]&~p.VALUE_LENGTH:z[L+1],H),U===3&&this.emitCodePoint(z[L+2],H),H},D.prototype.end=function(){var L;switch(this.state){case w.NamedEntity:return this.result!==0&&(this.decodeMode!==A.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case w.NumericDecimal:return this.emitNumericEntity(0,2);case w.NumericHex:return this.emitNumericEntity(0,3);case w.NumericStart:return(L=this.errors)===null||L===void 0||L.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case w.EntityStart:return 0}},D}();t.EntityDecoder=S;function C(D){var L="",U=new S(D,function(H){return L+=(0,l.fromCodePoint)(H)});return function(z,I){for(var F=0,$=0;($=z.indexOf("&",$))>=0;){L+=z.slice(F,$),U.startEntity(I);var G=U.write(z,$+1);if(G<0){F=$+U.end();break}F=$+G,$=G===0?F+1:F}var Y=L+z.slice(F);return L="",Y}}function j(D,L,U,H){var z=(L&p.BRANCH_LENGTH)>>7,I=L&p.JUMP_TABLE;if(z===0)return I!==0&&H===I?U:-1;if(I){var F=H-I;return F<0||F>=z?-1:D[U+F]-1}for(var $=U,G=$+z-1;$<=G;){var Y=$+G>>>1,W=D[Y];if(W<H)$=Y+1;else if(W>H)G=Y-1;else return D[Y+z]}return-1}t.determineBranch=j;var _=C(s.default),O=C(o.default);function M(D,L){return L===void 0&&(L=A.Legacy),_(D,L)}t.decodeHTML=M;function R(D){return _(D,A.Attribute)}t.decodeHTMLAttribute=R;function N(D){return _(D,A.Strict)}t.decodeHTMLStrict=N;function B(D){return O(D,A.Strict)}t.decodeXML=B}(Lo)),Lo}var Fc={},J1={},yB;function axe(){if(yB)return J1;yB=1,Object.defineProperty(J1,"__esModule",{value:!0});function t(e){for(var n=1;n<e.length;n++)e[n][0]+=e[n-1][0]+1;return e}return J1.default=new Map(t([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(t([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(t([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(t([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]])),J1}var W_={},xB;function Uk(){return xB||(xB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var e=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(i,s){return i.codePointAt(s)}:function(i,s){return(i.charCodeAt(s)&64512)===55296?(i.charCodeAt(s)-55296)*1024+i.charCodeAt(s+1)-56320+65536:i.charCodeAt(s)};function n(i){for(var s="",o=0,l;(l=t.xmlReplacer.exec(i))!==null;){var u=l.index,h=i.charCodeAt(u),f=e.get(h);f!==void 0?(s+=i.substring(o,u)+f,o=u+1):(s+="".concat(i.substring(o,u),"&#x").concat((0,t.getCodePoint)(i,u).toString(16),";"),o=t.xmlReplacer.lastIndex+=+((h&64512)===55296))}return s+i.substr(o)}t.encodeXML=n,t.escape=n;function r(i,s){return function(l){for(var u,h=0,f="";u=i.exec(l);)h!==u.index&&(f+=l.substring(h,u.index)),f+=s.get(u[0].charCodeAt(0)),h=u.index+1;return f+l.substring(h)}}t.escapeUTF8=r(/[&<>'"]/g,e),t.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),t.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))}(W_)),W_}var AB;function wB(){if(AB)return Fc;AB=1;var t=Fc&&Fc.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.encodeNonAsciiHTML=Fc.encodeHTML=void 0;var e=t(axe()),n=Uk(),r=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function i(l){return o(r,l)}Fc.encodeHTML=i;function s(l){return o(n.xmlReplacer,l)}Fc.encodeNonAsciiHTML=s;function o(l,u){for(var h="",f=0,p;(p=l.exec(u))!==null;){var m=p.index;h+=u.substring(f,m);var v=u.charCodeAt(m),y=e.default.get(v);if(typeof y=="object"){if(m+1<u.length){var x=u.charCodeAt(m+1),w=typeof y.n=="number"?y.n===x?y.o:void 0:y.n.get(x);if(w!==void 0){h+=w,f=l.lastIndex+=1;continue}}y=y.v}if(y!==void 0)h+=y,f=m+1;else{var A=(0,n.getCodePoint)(u,m);h+="&#x".concat(A.toString(16),";"),f=l.lastIndex+=+(A!==v)}}return h+u.substr(f)}return Fc}var SB;function oxe(){return SB||(SB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var e=bB(),n=wB(),r=Uk(),i;(function(m){m[m.XML=0]="XML",m[m.HTML=1]="HTML"})(i=t.EntityLevel||(t.EntityLevel={}));var s;(function(m){m[m.UTF8=0]="UTF8",m[m.ASCII=1]="ASCII",m[m.Extensive=2]="Extensive",m[m.Attribute=3]="Attribute",m[m.Text=4]="Text"})(s=t.EncodingMode||(t.EncodingMode={}));function o(m,v){v===void 0&&(v=i.XML);var y=typeof v=="number"?v:v.level;if(y===i.HTML){var x=typeof v=="object"?v.mode:void 0;return(0,e.decodeHTML)(m,x)}return(0,e.decodeXML)(m)}t.decode=o;function l(m,v){var y;v===void 0&&(v=i.XML);var x=typeof v=="number"?{level:v}:v;return(y=x.mode)!==null&&y!==void 0||(x.mode=e.DecodingMode.Strict),o(m,x)}t.decodeStrict=l;function u(m,v){v===void 0&&(v=i.XML);var y=typeof v=="number"?{level:v}:v;return y.mode===s.UTF8?(0,r.escapeUTF8)(m):y.mode===s.Attribute?(0,r.escapeAttribute)(m):y.mode===s.Text?(0,r.escapeText)(m):y.level===i.HTML?y.mode===s.ASCII?(0,n.encodeNonAsciiHTML)(m):(0,n.encodeHTML)(m):(0,r.encodeXML)(m)}t.encode=u;var h=Uk();Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return h.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return h.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return h.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return h.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return h.escapeText}});var f=wB();Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return f.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return f.encodeHTML}});var p=bB();Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return p.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return p.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return p.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return p.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return p.decodeXML}})}(Q_)),Q_}var Id={},jB;function lxe(){return jB||(jB=1,Object.defineProperty(Id,"__esModule",{value:!0}),Id.attributeNames=Id.elementNames=void 0,Id.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(t){return[t.toLowerCase(),t]})),Id.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(t){return[t.toLowerCase(),t]}))),Id}var CB;function cxe(){if(CB)return sa;CB=1;var t=sa&&sa.__assign||function(){return t=Object.assign||function(j){for(var _,O=1,M=arguments.length;O<M;O++){_=arguments[O];for(var R in _)Object.prototype.hasOwnProperty.call(_,R)&&(j[R]=_[R])}return j},t.apply(this,arguments)},e=sa&&sa.__createBinding||(Object.create?function(j,_,O,M){M===void 0&&(M=O);var R=Object.getOwnPropertyDescriptor(_,O);(!R||("get"in R?!_.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return _[O]}}),Object.defineProperty(j,M,R)}:function(j,_,O,M){M===void 0&&(M=O),j[M]=_[O]}),n=sa&&sa.__setModuleDefault||(Object.create?function(j,_){Object.defineProperty(j,"default",{enumerable:!0,value:_})}:function(j,_){j.default=_}),r=sa&&sa.__importStar||function(j){if(j&&j.__esModule)return j;var _={};if(j!=null)for(var O in j)O!=="default"&&Object.prototype.hasOwnProperty.call(j,O)&&e(_,j,O);return n(_,j),_};Object.defineProperty(sa,"__esModule",{value:!0}),sa.render=void 0;var i=r(Vb()),s=oxe(),o=lxe(),l=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function u(j){return j.replace(/"/g,"&quot;")}function h(j,_){var O;if(j){var M=((O=_.encodeEntities)!==null&&O!==void 0?O:_.decodeEntities)===!1?u:_.xmlMode||_.encodeEntities!=="utf8"?s.encodeXML:s.escapeAttribute;return Object.keys(j).map(function(R){var N,B,D=(N=j[R])!==null&&N!==void 0?N:"";return _.xmlMode==="foreign"&&(R=(B=o.attributeNames.get(R))!==null&&B!==void 0?B:R),!_.emptyAttrs&&!_.xmlMode&&D===""?R:"".concat(R,'="').concat(M(D),'"')}).join(" ")}}var f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function p(j,_){_===void 0&&(_={});for(var O=("length"in j)?j:[j],M="",R=0;R<O.length;R++)M+=m(O[R],_);return M}sa.render=p,sa.default=p;function m(j,_){switch(j.type){case i.Root:return p(j.children,_);case i.Doctype:case i.Directive:return w(j);case i.Comment:return C(j);case i.CDATA:return S(j);case i.Script:case i.Style:case i.Tag:return x(j,_);case i.Text:return A(j,_)}}var v=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),y=new Set(["svg","math"]);function x(j,_){var O;_.xmlMode==="foreign"&&(j.name=(O=o.elementNames.get(j.name))!==null&&O!==void 0?O:j.name,j.parent&&v.has(j.parent.name)&&(_=t(t({},_),{xmlMode:!1}))),!_.xmlMode&&y.has(j.name)&&(_=t(t({},_),{xmlMode:"foreign"}));var M="<".concat(j.name),R=h(j.attribs,_);return R&&(M+=" ".concat(R)),j.children.length===0&&(_.xmlMode?_.selfClosingTags!==!1:_.selfClosingTags&&f.has(j.name))?(_.xmlMode||(M+=" "),M+="/>"):(M+=">",j.children.length>0&&(M+=p(j.children,_)),(_.xmlMode||!f.has(j.name))&&(M+="</".concat(j.name,">"))),M}function w(j){return"<".concat(j.data,">")}function A(j,_){var O,M=j.data||"";return((O=_.encodeEntities)!==null&&O!==void 0?O:_.decodeEntities)!==!1&&!(!_.xmlMode&&j.parent&&l.has(j.parent.name))&&(M=_.xmlMode||_.encodeEntities!=="utf8"?(0,s.encodeXML)(M):(0,s.escapeText)(M)),M}function S(j){return"<![CDATA[".concat(j.children[0].data,"]]>")}function C(j){return"<!--".concat(j.data,"-->")}return sa}var _B;function JW(){if(_B)return Ml;_B=1;var t=Ml&&Ml.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.getOuterHTML=i,Ml.getInnerHTML=s,Ml.getText=o,Ml.textContent=l,Ml.innerText=u;var e=Yh(),n=t(cxe()),r=Vb();function i(h,f){return(0,n.default)(h,f)}function s(h,f){return(0,e.hasChildren)(h)?h.children.map(function(p){return i(p,f)}).join(""):""}function o(h){return Array.isArray(h)?h.map(o).join(""):(0,e.isTag)(h)?h.name==="br"?`
`:o(h.children):(0,e.isCDATA)(h)?o(h.children):(0,e.isText)(h)?h.data:""}function l(h){return Array.isArray(h)?h.map(l).join(""):(0,e.hasChildren)(h)&&!(0,e.isComment)(h)?l(h.children):(0,e.isText)(h)?h.data:""}function u(h){return Array.isArray(h)?h.map(u).join(""):(0,e.hasChildren)(h)&&(h.type===r.ElementType.Tag||(0,e.isCDATA)(h))?u(h.children):(0,e.isText)(h)?h.data:""}return Ml}var Po={},TB;function uxe(){if(TB)return Po;TB=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.getChildren=e,Po.getParent=n,Po.getSiblings=r,Po.getAttributeValue=i,Po.hasAttrib=s,Po.getName=o,Po.nextElementSibling=l,Po.prevElementSibling=u;var t=Yh();function e(h){return(0,t.hasChildren)(h)?h.children:[]}function n(h){return h.parent||null}function r(h){var f,p,m=n(h);if(m!=null)return e(m);for(var v=[h],y=h.prev,x=h.next;y!=null;)v.unshift(y),f=y,y=f.prev;for(;x!=null;)v.push(x),p=x,x=p.next;return v}function i(h,f){var p;return(p=h.attribs)===null||p===void 0?void 0:p[f]}function s(h,f){return h.attribs!=null&&Object.prototype.hasOwnProperty.call(h.attribs,f)&&h.attribs[f]!=null}function o(h){return h.name}function l(h){for(var f,p=h.next;p!==null&&!(0,t.isTag)(p);)f=p,p=f.next;return p}function u(h){for(var f,p=h.prev;p!==null&&!(0,t.isTag)(p);)f=p,p=f.prev;return p}return Po}var zc={},kB;function hxe(){if(kB)return zc;kB=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.removeElement=t,zc.replaceElement=e,zc.appendChild=n,zc.append=r,zc.prependChild=i,zc.prepend=s;function t(o){if(o.prev&&(o.prev.next=o.next),o.next&&(o.next.prev=o.prev),o.parent){var l=o.parent.children,u=l.lastIndexOf(o);u>=0&&l.splice(u,1)}o.next=null,o.prev=null,o.parent=null}function e(o,l){var u=l.prev=o.prev;u&&(u.next=l);var h=l.next=o.next;h&&(h.prev=l);var f=l.parent=o.parent;if(f){var p=f.children;p[p.lastIndexOf(o)]=l,o.parent=null}}function n(o,l){if(t(l),l.next=null,l.parent=o,o.children.push(l)>1){var u=o.children[o.children.length-2];u.next=l,l.prev=u}else l.prev=null}function r(o,l){t(l);var u=o.parent,h=o.next;if(l.next=h,l.prev=o,o.next=l,l.parent=u,h){if(h.prev=l,u){var f=u.children;f.splice(f.lastIndexOf(h),0,l)}}else u&&u.children.push(l)}function i(o,l){if(t(l),l.parent=o,l.prev=null,o.children.unshift(l)!==1){var u=o.children[1];u.prev=l,l.next=u}else l.next=null}function s(o,l){t(l);var u=o.parent;if(u){var h=u.children;h.splice(h.indexOf(o),0,l)}o.prev&&(o.prev.next=l),l.parent=u,l.prev=o.prev,l.next=o,o.prev=l}return zc}var Hc={},OB;function eV(){if(OB)return Hc;OB=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.filter=e,Hc.find=n,Hc.findOneChild=r,Hc.findOne=i,Hc.existsOne=s,Hc.findAll=o;var t=Yh();function e(l,u,h,f){return h===void 0&&(h=!0),f===void 0&&(f=1/0),n(l,Array.isArray(u)?u:[u],h,f)}function n(l,u,h,f){for(var p=[],m=[Array.isArray(u)?u:[u]],v=[0];;){if(v[0]>=m[0].length){if(v.length===1)return p;m.shift(),v.shift();continue}var y=m[0][v[0]++];if(l(y)&&(p.push(y),--f<=0))return p;h&&(0,t.hasChildren)(y)&&y.children.length>0&&(v.unshift(0),m.unshift(y.children))}}function r(l,u){return u.find(l)}function i(l,u,h){h===void 0&&(h=!0);for(var f=Array.isArray(u)?u:[u],p=0;p<f.length;p++){var m=f[p];if((0,t.isTag)(m)&&l(m))return m;if(h&&(0,t.hasChildren)(m)&&m.children.length>0){var v=i(l,m.children,!0);if(v)return v}}return null}function s(l,u){return(Array.isArray(u)?u:[u]).some(function(h){return(0,t.isTag)(h)&&l(h)||(0,t.hasChildren)(h)&&s(l,h.children)})}function o(l,u){for(var h=[],f=[Array.isArray(u)?u:[u]],p=[0];;){if(p[0]>=f[0].length){if(f.length===1)return h;f.shift(),p.shift();continue}var m=f[0][p[0]++];(0,t.isTag)(m)&&l(m)&&h.push(m),(0,t.hasChildren)(m)&&m.children.length>0&&(p.unshift(0),f.unshift(m.children))}}return Hc}var qc={},EB;function tV(){if(EB)return qc;EB=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.testElement=o,qc.getElements=l,qc.getElementById=u,qc.getElementsByTagName=h,qc.getElementsByClassName=f,qc.getElementsByTagType=p;var t=Yh(),e=eV(),n={tag_name:function(m){return typeof m=="function"?function(v){return(0,t.isTag)(v)&&m(v.name)}:m==="*"?t.isTag:function(v){return(0,t.isTag)(v)&&v.name===m}},tag_type:function(m){return typeof m=="function"?function(v){return m(v.type)}:function(v){return v.type===m}},tag_contains:function(m){return typeof m=="function"?function(v){return(0,t.isText)(v)&&m(v.data)}:function(v){return(0,t.isText)(v)&&v.data===m}}};function r(m,v){return typeof v=="function"?function(y){return(0,t.isTag)(y)&&v(y.attribs[m])}:function(y){return(0,t.isTag)(y)&&y.attribs[m]===v}}function i(m,v){return function(y){return m(y)||v(y)}}function s(m){var v=Object.keys(m).map(function(y){var x=m[y];return Object.prototype.hasOwnProperty.call(n,y)?n[y](x):r(y,x)});return v.length===0?null:v.reduce(i)}function o(m,v){var y=s(m);return y?y(v):!0}function l(m,v,y,x){x===void 0&&(x=1/0);var w=s(m);return w?(0,e.filter)(w,v,y,x):[]}function u(m,v,y){return y===void 0&&(y=!0),Array.isArray(v)||(v=[v]),(0,e.findOne)(r("id",m),v,y)}function h(m,v,y,x){return y===void 0&&(y=!0),x===void 0&&(x=1/0),(0,e.filter)(n.tag_name(m),v,y,x)}function f(m,v,y,x){return y===void 0&&(y=!0),x===void 0&&(x=1/0),(0,e.filter)(r("class",m),v,y,x)}function p(m,v,y,x){return y===void 0&&(y=!0),x===void 0&&(x=1/0),(0,e.filter)(n.tag_type(m),v,y,x)}return qc}var Ju={},MB;function dxe(){if(MB)return Ju;MB=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.DocumentPosition=void 0,Ju.removeSubsets=e,Ju.compareDocumentPosition=r,Ju.uniqueSort=i;var t=Yh();function e(s){for(var o=s.length;--o>=0;){var l=s[o];if(o>0&&s.lastIndexOf(l,o-1)>=0){s.splice(o,1);continue}for(var u=l.parent;u;u=u.parent)if(s.includes(u)){s.splice(o,1);break}}return s}var n;(function(s){s[s.DISCONNECTED=1]="DISCONNECTED",s[s.PRECEDING=2]="PRECEDING",s[s.FOLLOWING=4]="FOLLOWING",s[s.CONTAINS=8]="CONTAINS",s[s.CONTAINED_BY=16]="CONTAINED_BY"})(n||(Ju.DocumentPosition=n={}));function r(s,o){var l=[],u=[];if(s===o)return 0;for(var h=(0,t.hasChildren)(s)?s:s.parent;h;)l.unshift(h),h=h.parent;for(h=(0,t.hasChildren)(o)?o:o.parent;h;)u.unshift(h),h=h.parent;for(var f=Math.min(l.length,u.length),p=0;p<f&&l[p]===u[p];)p++;if(p===0)return n.DISCONNECTED;var m=l[p-1],v=m.children,y=l[p],x=u[p];return v.indexOf(y)>v.indexOf(x)?m===o?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:m===s?n.PRECEDING|n.CONTAINS:n.PRECEDING}function i(s){return s=s.filter(function(o,l,u){return!u.includes(o,l+1)}),s.sort(function(o,l){var u=r(o,l);return u&n.PRECEDING?-1:u&n.FOLLOWING?1:0}),s}return Ju}var ex={},RB;function fxe(){if(RB)return ex;RB=1,Object.defineProperty(ex,"__esModule",{value:!0}),ex.getFeed=n;var t=JW(),e=tV();function n(m){var v=u(p,m);return v?v.name==="feed"?r(v):i(v):null}function r(m){var v,y=m.children,x={type:"atom",items:(0,e.getElementsByTagName)("entry",y).map(function(S){var C,j=S.children,_={media:l(j)};f(_,"id","id",j),f(_,"title","title",j);var O=(C=u("link",j))===null||C===void 0?void 0:C.attribs.href;O&&(_.link=O);var M=h("summary",j)||h("content",j);M&&(_.description=M);var R=h("updated",j);return R&&(_.pubDate=new Date(R)),_})};f(x,"id","id",y),f(x,"title","title",y);var w=(v=u("link",y))===null||v===void 0?void 0:v.attribs.href;w&&(x.link=w),f(x,"description","subtitle",y);var A=h("updated",y);return A&&(x.updated=new Date(A)),f(x,"author","email",y,!0),x}function i(m){var v,y,x=(y=(v=u("channel",m.children))===null||v===void 0?void 0:v.children)!==null&&y!==void 0?y:[],w={type:m.name.substr(0,3),id:"",items:(0,e.getElementsByTagName)("item",m.children).map(function(S){var C=S.children,j={media:l(C)};f(j,"id","guid",C),f(j,"title","title",C),f(j,"link","link",C),f(j,"description","description",C);var _=h("pubDate",C)||h("dc:date",C);return _&&(j.pubDate=new Date(_)),j})};f(w,"title","title",x),f(w,"link","link",x),f(w,"description","description",x);var A=h("lastBuildDate",x);return A&&(w.updated=new Date(A)),f(w,"author","managingEditor",x,!0),w}var s=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function l(m){return(0,e.getElementsByTagName)("media:content",m).map(function(v){for(var y=v.attribs,x={medium:y.medium,isDefault:!!y.isDefault},w=0,A=s;w<A.length;w++){var S=A[w];y[S]&&(x[S]=y[S])}for(var C=0,j=o;C<j.length;C++){var S=j[C];y[S]&&(x[S]=parseInt(y[S],10))}return y.expression&&(x.expression=y.expression),x})}function u(m,v){return(0,e.getElementsByTagName)(m,v,!0,1)[0]}function h(m,v,y){return y===void 0&&(y=!1),(0,t.textContent)((0,e.getElementsByTagName)(m,v,y,1)).trim()}function f(m,v,y,x,w){w===void 0&&(w=!1);var A=h(y,x,w);A&&(m[v]=A)}function p(m){return m==="rss"||m==="feed"||m==="rdf:RDF"}return ex}var DB;function V_(){return DB||(DB=1,function(t){var e=Nd&&Nd.__createBinding||(Object.create?function(i,s,o,l){l===void 0&&(l=o);var u=Object.getOwnPropertyDescriptor(s,o);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(i,l,u)}:function(i,s,o,l){l===void 0&&(l=o),i[l]=s[o]}),n=Nd&&Nd.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,n(JW(),t),n(uxe(),t),n(hxe(),t),n(eV(),t),n(tV(),t),n(dxe(),t),n(fxe(),t);var r=Yh();Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return r.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return r.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return r.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return r.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return r.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return r.hasChildren}})}(Nd)),Nd}var NB;function pxe(){return NB||(NB=1,function(t){var e=Io&&Io.__createBinding||(Object.create?function(S,C,j,_){_===void 0&&(_=j);var O=Object.getOwnPropertyDescriptor(C,j);(!O||("get"in O?!C.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return C[j]}}),Object.defineProperty(S,_,O)}:function(S,C,j,_){_===void 0&&(_=j),S[_]=C[j]}),n=Io&&Io.__setModuleDefault||(Object.create?function(S,C){Object.defineProperty(S,"default",{enumerable:!0,value:C})}:function(S,C){S.default=C}),r=Io&&Io.__importStar||function(){var S=function(C){return S=Object.getOwnPropertyNames||function(j){var _=[];for(var O in j)Object.prototype.hasOwnProperty.call(j,O)&&(_[_.length]=O);return _},S(C)};return function(C){if(C&&C.__esModule)return C;var j={};if(C!=null)for(var _=S(C),O=0;O<_.length;O++)_[O]!=="default"&&e(j,C,_[O]);return n(j,C),j}}(),i=Io&&Io.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomUtils=t.getFeed=t.ElementType=t.QuoteType=t.Tokenizer=t.DefaultHandler=t.DomHandler=t.Parser=void 0,t.parseDocument=h,t.parseDOM=f,t.createDocumentStream=p,t.createDomStream=m,t.parseFeed=A;const s=lB();var o=lB();Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return o.Parser}});const l=Yh();var u=Yh();Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return u.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return u.DomHandler}});function h(S,C){const j=new l.DomHandler(void 0,C);return new s.Parser(j,C).end(S),j.root}function f(S,C){return h(S,C).children}function p(S,C,j){const _=new l.DomHandler(O=>S(O,_.root),C,j);return new s.Parser(_,C)}function m(S,C,j){const _=new l.DomHandler(S,C,j);return new s.Parser(_,C)}var v=ZW();Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return i(v).default}}),Object.defineProperty(t,"QuoteType",{enumerable:!0,get:function(){return v.QuoteType}}),t.ElementType=r(Vb());const y=V_();var x=V_();Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});const w={xmlMode:!0};function A(S,C=w){return(0,y.getFeed)(f(S,C))}t.DomUtils=r(V_())}(Io)),Io}var Y_,IB;function mxe(){return IB||(IB=1,Y_=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Y_}var tx={},BB;function gxe(){if(BB)return tx;BB=1,Object.defineProperty(tx,"__esModule",{value:!0});/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */function t(n){return Object.prototype.toString.call(n)==="[object Object]"}function e(n){var r,i;return t(n)===!1?!1:(r=n.constructor,r===void 0?!0:(i=r.prototype,!(t(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}return tx.isPlainObject=e,tx}var G_,LB;function vxe(){if(LB)return G_;LB=1;var t=function(S){return e(S)&&!n(S)};function e(A){return!!A&&typeof A=="object"}function n(A){var S=Object.prototype.toString.call(A);return S==="[object RegExp]"||S==="[object Date]"||s(A)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function s(A){return A.$$typeof===i}function o(A){return Array.isArray(A)?[]:{}}function l(A,S){return S.clone!==!1&&S.isMergeableObject(A)?x(o(A),A,S):A}function u(A,S,C){return A.concat(S).map(function(j){return l(j,C)})}function h(A,S){if(!S.customMerge)return x;var C=S.customMerge(A);return typeof C=="function"?C:x}function f(A){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(A).filter(function(S){return Object.propertyIsEnumerable.call(A,S)}):[]}function p(A){return Object.keys(A).concat(f(A))}function m(A,S){try{return S in A}catch{return!1}}function v(A,S){return m(A,S)&&!(Object.hasOwnProperty.call(A,S)&&Object.propertyIsEnumerable.call(A,S))}function y(A,S,C){var j={};return C.isMergeableObject(A)&&p(A).forEach(function(_){j[_]=l(A[_],C)}),p(S).forEach(function(_){v(A,_)||(m(A,_)&&C.isMergeableObject(S[_])?j[_]=h(_,C)(A[_],S[_],C):j[_]=l(S[_],C))}),j}function x(A,S,C){C=C||{},C.arrayMerge=C.arrayMerge||u,C.isMergeableObject=C.isMergeableObject||t,C.cloneUnlessOtherwiseSpecified=l;var j=Array.isArray(S),_=Array.isArray(A),O=j===_;return O?j?C.arrayMerge(A,S,C):y(A,S,C):l(S,C)}x.all=function(S,C){if(!Array.isArray(S))throw new Error("first argument should be an array");return S.reduce(function(j,_){return x(j,_,C)},{})};var w=x;return G_=w,G_}var Ux={exports:{}},bxe=Ux.exports,PB;function yxe(){return PB||(PB=1,function(t){(function(e,n){t.exports?t.exports=n():e.parseSrcset=n()})(bxe,function(){return function(e){function n(j){return j===" "||j==="	"||j===`
`||j==="\f"||j==="\r"}function r(j){var _,O=j.exec(e.substring(w));if(O)return _=O[0],w+=_.length,_}for(var i=e.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,l=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,h=/^\d+$/,f=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,p,m,v,y,x,w=0,A=[];;){if(r(o),w>=i)return A;p=r(l),m=[],p.slice(-1)===","?(p=p.replace(u,""),C()):S()}function S(){for(r(s),v="",y="in descriptor";;){if(x=e.charAt(w),y==="in descriptor")if(n(x))v&&(m.push(v),v="",y="after descriptor");else if(x===","){w+=1,v&&m.push(v),C();return}else if(x==="(")v=v+x,y="in parens";else if(x===""){v&&m.push(v),C();return}else v=v+x;else if(y==="in parens")if(x===")")v=v+x,y="in descriptor";else if(x===""){m.push(v),C();return}else v=v+x;else if(y==="after descriptor"&&!n(x))if(x===""){C();return}else y="in descriptor",w-=1;w+=1}}function C(){var j=!1,_,O,M,R,N={},B,D,L,U,H;for(R=0;R<m.length;R++)B=m[R],D=B[B.length-1],L=B.substring(0,B.length-1),U=parseInt(L,10),H=parseFloat(L),h.test(L)&&D==="w"?((_||O)&&(j=!0),U===0?j=!0:_=U):f.test(L)&&D==="x"?((_||O||M)&&(j=!0),H<0?j=!0:O=H):h.test(L)&&D==="h"?((M||O)&&(j=!0),U===0?j=!0:M=U):j=!0;j?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+B+"'."):(N.url=p,_&&(N.w=_),O&&(N.d=O),M&&(N.h=M),A.push(N))}}})}(Ux)),Ux.exports}var nx={exports:{}},FB;function xxe(){if(FB)return nx.exports;FB=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return nx.exports=e(),nx.exports.createColors=e,nx.exports}const Axe={},wxe=Object.freeze(Object.defineProperty({__proto__:null,default:Axe},Symbol.toStringTag,{value:"Module"})),sl=eP(wxe);var X_,zB;function s4(){if(zB)return X_;zB=1;let t=xxe(),e=sl;class n extends Error{constructor(i,s,o,l,u,h){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),h&&(this.plugin=h),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported);let o=v=>v,l=v=>v,u=v=>v;if(i){let{bold:v,gray:y,red:x}=t.createColors(!0);l=w=>v(x(w)),o=w=>y(w),e&&(u=w=>e(w))}let h=s.split(/\r?\n/),f=Math.max(this.line-3,0),p=Math.min(this.line+2,h.length),m=String(p).length;return h.slice(f,p).map((v,y)=>{let x=f+1+y,w=" "+(" "+x).slice(-m)+" | ";if(x===this.line){if(v.length>160){let S=20,C=Math.max(0,this.column-S),j=Math.max(this.column+S,this.endColumn+S),_=v.slice(C,j),O=o(w.replace(/\d/g," "))+v.slice(0,Math.min(this.column-1,S-1)).replace(/[^\t]/g," ");return l(">")+o(w)+u(_)+`
 `+O+l("^")}let A=o(w.replace(/\d/g," "))+v.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(w)+u(v)+`
 `+A+l("^")}return" "+o(w)+u(v)}).join(`
`)}toString(){let i=this.showSourceCode();return i&&(i=`

`+i+`
`),this.name+": "+this.message+i}}return X_=n,n.default=n,X_}var K_,HB;function nV(){if(HB)return K_;HB=1;const t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g;function n(o){return typeof o!="string"||!o.includes("<")?o:o.replace(t,"\\3c $2").replace(e,"\\3c $2")}const r={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function i(o){return o[0].toUpperCase()+o.slice(1)}class s{constructor(l){this.builder=l}atrule(l,u){let h=l.raws,f="@"+l.name,p=l.params?this.rawValue(l,"params"):"";if(typeof h.afterName<"u"?f+=h.afterName:p&&(f+=" "),l.nodes)this.block(l,f+p);else{let m=(h.between||"")+(u?";":"");this.builder(n(f+p+m),l)}}beforeAfter(l,u){let h;l.type==="decl"?h=this.raw(l,null,"beforeDecl"):l.type==="comment"?h=this.raw(l,null,"beforeComment"):u==="before"?h=this.raw(l,null,"beforeRule"):h=this.raw(l,null,"beforeClose");let f=l.parent,p=0;for(;f&&f.type!=="root";)p+=1,f=f.parent;if(h.includes(`
`)){let m=this.raw(l,null,"indent");if(m.length)for(let v=0;v<p;v++)h+=m}return h}block(l,u){let h=this.raw(l,"between","beforeOpen");this.builder(n(u+h)+"{",l,"start");let f;l.nodes&&l.nodes.length?(this.body(l),f=this.raw(l,"after")):f=this.raw(l,"after","emptyBody"),f&&this.builder(n(f)),this.builder("}",l,"end")}body(l){let u=l.nodes,h=u.length-1;for(;h>0&&u[h].type==="comment";)h-=1;let f=this.raw(l,"semicolon"),p=l.type==="document";for(let m=0;m<u.length;m++){let v=u[m],y=this.raw(v,"before");y&&this.builder(p?y:n(y)),this.stringify(v,h!==m||f)}}comment(l){let u=this.raw(l,"left","commentLeft"),h=this.raw(l,"right","commentRight");this.builder(n("/*"+u+l.text+h+"*/"),l)}decl(l,u){let h=l.raws,f=this.raw(l,"between","colon"),p=l.prop+f+this.rawValue(l,"value");l.important&&(p+=h.important||" !important"),u&&(p+=";"),this.builder(n(p),l)}document(l){this.body(l)}raw(l,u,h){let f;if(h||(h=u),u&&(f=l.raws[u],typeof f<"u"))return f;let p=l.parent;if(h==="before"&&(!p||p.type==="root"&&p.first===l||p&&p.type==="document"))return"";if(!p)return r[h];let m=l.root(),v=m.rawCache||(m.rawCache={});if(typeof v[h]<"u")return v[h];if(h==="before"||h==="after")return this.beforeAfter(l,h);{let y="raw"+i(h);this[y]?f=this[y](m,l):m.walk(x=>{if(f=x.raws[u],typeof f<"u")return!1})}return typeof f>"u"&&(f=r[h]),v[h]=f,f}rawBeforeClose(l){let u;return l.walk(h=>{if(h.nodes&&h.nodes.length>0&&typeof h.raws.after<"u")return u=h.raws.after,u.includes(`
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawBeforeComment(l,u){let h;return l.walkComments(f=>{if(typeof f.raws.before<"u")return h=f.raws.before,h.includes(`
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h>"u"?h=this.raw(u,null,"beforeDecl"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeDecl(l,u){let h;return l.walkDecls(f=>{if(typeof f.raws.before<"u")return h=f.raws.before,h.includes(`
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h>"u"?h=this.raw(u,null,"beforeRule"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeOpen(l){let u;return l.walk(h=>{if(h.type!=="decl"&&(u=h.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(l){let u;return l.walk(h=>{if(h.nodes&&(h.parent!==l||l.first!==h)&&typeof h.raws.before<"u")return u=h.raws.before,u.includes(`
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(l){let u;return l.walkDecls(h=>{if(typeof h.raws.between<"u")return u=h.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(l){let u;return l.walk(h=>{if(h.nodes&&h.nodes.length===0&&(u=h.raws.after,typeof u<"u"))return!1}),u}rawIndent(l){if(l.raws.indent)return l.raws.indent;let u;return l.walk(h=>{let f=h.parent;if(f&&f!==l&&f.parent&&f.parent===l&&typeof h.raws.before<"u"){let p=h.raws.before.split(`
`);return u=p[p.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(l){let u;return l.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(u=h.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(l,u){let h=l[u],f=l.raws[u];return f&&f.value===h?f.raw:h}root(l){if(this.body(l),l.raws.after){let u=l.raws.after,h=l.parent&&l.parent.type==="document";this.builder(h?u:n(u))}}rule(l){this.block(l,this.rawValue(l,"selector")),l.raws.ownSemicolon&&this.builder(n(l.raws.ownSemicolon),l,"end")}stringify(l,u){if(!this[l.type])throw new Error("Unknown AST node type "+l.type+". Maybe you need to change PostCSS stringifier.");this[l.type](l,u)}}return K_=s,s.default=s,K_}var Z_,qB;function nS(){if(qB)return Z_;qB=1;let t=nV();function e(n,r){new t(r).stringify(n)}return Z_=e,e.default=e,Z_}var rx={},$B;function a4(){return $B||($B=1,rx.isClean=Symbol("isClean"),rx.my=Symbol("my")),rx}var J_,QB;function rS(){if(QB)return J_;QB=1;let t=s4(),e=nV(),n=nS(),{isClean:r,my:i}=a4();function s(u,h){let f=new u.constructor;for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||p==="proxyCache")continue;let m=u[p],v=typeof m;p==="parent"&&v==="object"?h&&(f[p]=h):p==="source"?f[p]=m:Array.isArray(m)?f[p]=m.map(y=>s(y,f)):(v==="object"&&m!==null&&(m=s(m)),f[p]=m)}return f}function o(u,h){if(h&&typeof h.offset<"u")return h.offset;let f=1,p=1,m=0;for(let v=0;v<u.length;v++){if(p===h.line&&f===h.column){m=v;break}u[v]===`
`?(f=1,p+=1):f+=1}return m}class l{get proxyOf(){return this}constructor(h={}){this.raws={},this[r]=!1,this[i]=!0;for(let f in h)if(f==="nodes"){this.nodes=[];for(let p of h[f])typeof p.clone=="function"?this.append(p.clone()):this.append(p)}else this[f]=h[f]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let f=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${f.input.from}:${f.start.line}:${f.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let f in h)this[f]=h[f];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let f=s(this);for(let p in h)f[p]=h[p];return f}cloneAfter(h={}){let f=this.clone(h);return this.parent.insertAfter(this,f),f}cloneBefore(h={}){let f=this.clone(h);return this.parent.insertBefore(this,f),f}error(h,f={}){if(this.source){let{end:p,start:m}=this.rangeBy(f);return this.source.input.error(h,{column:m.column,line:m.line},{column:p.column,line:p.line},f)}return new t(h)}getProxyProcessor(){return{get(h,f){return f==="proxyOf"?h:f==="root"?()=>h.root().toProxy():h[f]},set(h,f,p){return h[f]===p||(h[f]=p,(f==="prop"||f==="value"||f==="name"||f==="params"||f==="important"||f==="text")&&h.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let h=this;for(;h=h.parent;)h[r]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h={}){let f=this.source.start;if(h.index)f=this.positionInside(h.index);else if(h.word){let p="document"in this.source.input?this.source.input.document:this.source.input.css,v=p.slice(o(p,this.source.start),o(p,this.source.end)).indexOf(h.word);v!==-1&&(f=this.positionInside(v))}return f}positionInside(h){let f=this.source.start.column,p=this.source.start.line,m="document"in this.source.input?this.source.input.document:this.source.input.css,v=o(m,this.source.start),y=v+h;for(let x=v;x<y;x++)m[x]===`
`?(f=1,p+=1):f+=1;return{column:f,line:p,offset:y}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h={}){let f="document"in this.source.input?this.source.input.document:this.source.input.css,p={column:this.source.start.column,line:this.source.start.line,offset:o(f,this.source.start)},m=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(f,this.source.end)+1}:{column:p.column+1,line:p.line,offset:p.offset+1};if(h.word){let y=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(h.word);y!==-1&&(p=this.positionInside(y),m=this.positionInside(y+h.word.length))}else h.start?p={column:h.start.column,line:h.start.line,offset:o(f,h.start)}:h.index&&(p=this.positionInside(h.index)),h.end?m={column:h.end.column,line:h.end.line,offset:o(f,h.end)}:typeof h.endIndex=="number"?m=this.positionInside(h.endIndex):h.index&&(m=this.positionInside(h.index+1));return(m.line<p.line||m.line===p.line&&m.column<=p.column)&&(m={column:p.column+1,line:p.line,offset:p.offset+1}),{end:m,start:p}}raw(h,f){return new e().raw(this,h,f)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let f=this,p=!1;for(let m of h)m===this?p=!0:p?(this.parent.insertAfter(f,m),f=m):this.parent.insertBefore(f,m);p||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,f){let p={},m=f==null;f=f||new Map;let v=0;for(let y in this){if(!Object.prototype.hasOwnProperty.call(this,y)||y==="parent"||y==="proxyCache")continue;let x=this[y];if(Array.isArray(x))p[y]=x.map(w=>typeof w=="object"&&w.toJSON?w.toJSON(null,f):w);else if(typeof x=="object"&&x.toJSON)p[y]=x.toJSON(null,f);else if(y==="source"){if(x==null)continue;let w=f.get(x.input);w==null&&(w=v,f.set(x.input,v),v++),p[y]={end:x.end,inputId:w,start:x.start}}else p[y]=x}return m&&(p.inputs=[...f.keys()].map(y=>y.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=n){h.stringify&&(h=h.stringify);let f="";return h(this,p=>{f+=p}),f}warn(h,f,p={}){let m={node:this};for(let v in p)m[v]=p[v];return h.warn(f,m)}}return J_=l,l.default=l,J_}var e3,UB;function iS(){if(UB)return e3;UB=1;let t=rS();class e extends t{constructor(r){super(r),this.type="comment"}}return e3=e,e.default=e,e3}var t3,WB;function sS(){if(WB)return t3;WB=1;let t=rS();class e extends t{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(r){r&&typeof r.value<"u"&&typeof r.value!="string"&&(r={...r,value:String(r.value)}),super(r),this.type="decl"}}return t3=e,e.default=e,t3}var n3,VB;function zf(){if(VB)return n3;VB=1;let t=iS(),e=sS(),n=rS(),{isClean:r,my:i}=a4(),s,o,l,u;function h(m){return m.map(v=>(v.nodes&&(v.nodes=h(v.nodes)),delete v.source,v))}function f(m){if(m[r]=!1,m.proxyOf.nodes)for(let v of m.proxyOf.nodes)f(v)}class p extends n{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...v){for(let y of v){let x=this.normalize(y,this.last);for(let w of x)this.proxyOf.nodes.push(w)}return this.markDirty(),this}cleanRaws(v){if(super.cleanRaws(v),this.nodes)for(let y of this.nodes)y.cleanRaws(v)}each(v){if(!this.proxyOf.nodes)return;let y=this.getIterator(),x,w;for(;this.indexes[y]<this.proxyOf.nodes.length&&(x=this.indexes[y],w=v(this.proxyOf.nodes[x],x),w!==!1);)this.indexes[y]+=1;return delete this.indexes[y],w}every(v){return this.nodes.every(v)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let v=this.lastEach;return this.indexes[v]=0,v}getProxyProcessor(){return{get(v,y){return y==="proxyOf"?v:v[y]?y==="each"||typeof y=="string"&&y.startsWith("walk")?(...x)=>v[y](...x.map(w=>typeof w=="function"?(A,S)=>w(A.toProxy(),S):w)):y==="every"||y==="some"?x=>v[y]((w,...A)=>x(w.toProxy(),...A)):y==="root"?()=>v.root().toProxy():y==="nodes"?v.nodes.map(x=>x.toProxy()):y==="first"||y==="last"?v[y].toProxy():v[y]:v[y]},set(v,y,x){return v[y]===x||(v[y]=x,(y==="name"||y==="params"||y==="selector")&&v.markDirty()),!0}}}index(v){return typeof v=="number"?v:(v.proxyOf&&(v=v.proxyOf),this.proxyOf.nodes.indexOf(v))}insertAfter(v,y){let x=this.index(v),w=this.normalize(y,this.proxyOf.nodes[x]).reverse();x=this.index(v);for(let S of w)this.proxyOf.nodes.splice(x+1,0,S);let A;for(let S in this.indexes)A=this.indexes[S],x<A&&(this.indexes[S]=A+w.length);return this.markDirty(),this}insertBefore(v,y){let x=this.index(v),w=x===0?"prepend":!1,A=this.normalize(y,this.proxyOf.nodes[x],w).reverse();x=this.index(v);for(let C of A)this.proxyOf.nodes.splice(x,0,C);let S;for(let C in this.indexes)S=this.indexes[C],x<=S&&(this.indexes[C]=S+A.length);return this.markDirty(),this}normalize(v,y){if(typeof v=="string")v=h(o(v).nodes);else if(typeof v>"u")v=[];else if(Array.isArray(v)){v=v.slice(0);for(let w of v)w.parent&&w.parent.removeChild(w,"ignore")}else if(v.type==="root"&&this.type!=="document"){v=v.nodes.slice(0);for(let w of v)w.parent&&w.parent.removeChild(w,"ignore")}else if(v.type)v=[v];else if(v.prop){if(typeof v.value>"u")throw new Error("Value field is missed in node creation");typeof v.value!="string"&&(v.value=String(v.value)),v=[new e(v)]}else if(v.selector||v.selectors)v=[new u(v)];else if(v.name)v=[new s(v)];else if(v.text)v=[new t(v)];else throw new Error("Unknown node type in node creation");return v.map(w=>(w[i]||p.rebuild(w),w=w.proxyOf,w.parent&&w.parent.removeChild(w),w[r]&&f(w),w.raws||(w.raws={}),typeof w.raws.before>"u"&&y&&typeof y.raws.before<"u"&&(w.raws.before=y.raws.before.replace(/\S/g,"")),w.parent=this.proxyOf,w))}prepend(...v){v=v.reverse();for(let y of v){let x=this.normalize(y,this.first,"prepend").reverse();for(let w of x)this.proxyOf.nodes.unshift(w);for(let w in this.indexes)this.indexes[w]=this.indexes[w]+x.length}return this.markDirty(),this}push(v){return v.parent=this,this.proxyOf.nodes.push(v),this}removeAll(){for(let v of this.proxyOf.nodes)v.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(v){v=this.index(v),this.proxyOf.nodes[v].parent=void 0,this.proxyOf.nodes.splice(v,1);let y;for(let x in this.indexes)y=this.indexes[x],y>=v&&(this.indexes[x]=y-1);return this.markDirty(),this}replaceValues(v,y,x){return x||(x=y,y={}),this.walkDecls(w=>{y.props&&!y.props.includes(w.prop)||y.fast&&!w.value.includes(y.fast)||(w.value=w.value.replace(v,x))}),this.markDirty(),this}some(v){return this.nodes.some(v)}walk(v){return this.each((y,x)=>{let w;try{w=v(y,x)}catch(A){throw y.addToError(A)}return w!==!1&&y.walk&&(w=y.walk(v)),w})}walkAtRules(v,y){return y?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="atrule"&&v.test(x.name))return y(x,w)}):this.walk((x,w)=>{if(x.type==="atrule"&&x.name===v)return y(x,w)}):(y=v,this.walk((x,w)=>{if(x.type==="atrule")return y(x,w)}))}walkComments(v){return this.walk((y,x)=>{if(y.type==="comment")return v(y,x)})}walkDecls(v,y){return y?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="decl"&&v.test(x.prop))return y(x,w)}):this.walk((x,w)=>{if(x.type==="decl"&&x.prop===v)return y(x,w)}):(y=v,this.walk((x,w)=>{if(x.type==="decl")return y(x,w)}))}walkRules(v,y){return y?v instanceof RegExp?this.walk((x,w)=>{if(x.type==="rule"&&v.test(x.selector))return y(x,w)}):this.walk((x,w)=>{if(x.type==="rule"&&x.selector===v)return y(x,w)}):(y=v,this.walk((x,w)=>{if(x.type==="rule")return y(x,w)}))}}return p.registerParse=m=>{o=m},p.registerRule=m=>{u=m},p.registerAtRule=m=>{s=m},p.registerRoot=m=>{l=m},n3=p,p.default=p,p.rebuild=m=>{m.type==="atrule"?Object.setPrototypeOf(m,s.prototype):m.type==="rule"?Object.setPrototypeOf(m,u.prototype):m.type==="decl"?Object.setPrototypeOf(m,e.prototype):m.type==="comment"?Object.setPrototypeOf(m,t.prototype):m.type==="root"&&Object.setPrototypeOf(m,l.prototype),m[i]=!0,m.nodes&&m.nodes.forEach(v=>{p.rebuild(v)})},n3}var r3,YB;function o4(){if(YB)return r3;YB=1;let t=zf();class e extends t{constructor(r){super(r),this.type="atrule"}append(...r){return this.proxyOf.nodes||(this.nodes=[]),super.append(...r)}prepend(...r){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...r)}}return r3=e,e.default=e,t.registerAtRule(e),r3}var i3,GB;function l4(){if(GB)return i3;GB=1;let t=zf(),e,n;class r extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new n,this,s).stringify()}}return r.registerLazyResult=i=>{e=i},r.registerProcessor=i=>{n=i},i3=r,r.default=r,i3}var s3,XB;function Sxe(){if(XB)return s3;XB=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return s3={nanoid:(r=21)=>{let i="",s=r|0;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(r,i=21)=>(s=i)=>{let o="",l=s|0;for(;l--;)o+=r[Math.random()*r.length|0];return o}},s3}var a3,KB;function rV(){if(KB)return a3;KB=1;let{existsSync:t,readFileSync:e}=sl,{dirname:n,join:r}=sl,{SourceMapConsumer:i,SourceMapGenerator:s}=sl;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(h,f){if(f.map===!1)return;f.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let p=f.map?f.map.prev:void 0,m=this.loadMap(f.from,p);!this.mapFile&&f.from&&(this.mapFile=f.from),this.mapFile&&(this.root=n(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.json||this.text)),this.consumerCache}decodeInline(h){let f=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,m=/^data:application\/json;charset=utf-?8,/,v=/^data:application\/json,/,y=h.match(m)||h.match(v);if(y)return decodeURIComponent(h.substr(y[0].length));let x=h.match(f)||h.match(p);if(x)return o(h.substr(x[0].length));let w=h.slice(22);throw w=w.slice(0,w.indexOf(",")),new Error("Unsupported source map encoding "+w)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let f=h.match(/\/\*\s*# sourceMappingURL=/g);if(!f)return;let p=h.lastIndexOf(f.pop()),m=h.indexOf("*/",p);p>-1&&m>-1&&(this.annotation=this.getAnnotationURL(h.substring(p,m)))}loadFile(h,f,p){if(!(!p&&!this.unsafeMap&&!/\.map$/i.test(h))&&(this.root=n(h),t(h)))return this.mapFile=h,e(h,"utf-8").toString().trim()}loadMap(h,f){if(f===!1)return!1;if(f){if(typeof f=="string")return f;if(typeof f=="function"){let p=f(h);if(p){let m=this.loadFile(p,h,!0);if(!m)throw new Error("Unable to load previous source map: "+p.toString());return m}}else{if(f instanceof i)return s.fromSourceMap(f).toString();if(f instanceof s)return f.toString();if(this.isMap(f))return JSON.stringify(f);throw new Error("Unsupported previous source map format: "+f.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;h&&(p=r(n(h),p));let m=this.loadFile(p,h,!1);if(m)try{this.json=JSON.parse(m.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return m}}}startWith(h,f){return h?h.substr(0,f.length)===f:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return a3=l,l.default=l,a3}var o3,ZB;function aS(){if(ZB)return o3;ZB=1;let{nanoid:t}=Sxe(),{isAbsolute:e,resolve:n}=sl,{SourceMapConsumer:r,SourceMapGenerator:i}=sl,{fileURLToPath:s,pathToFileURL:o}=sl,l=s4(),u=rV(),h=sl,f=Symbol("lineToIndexCache"),p=!!(r&&i),m=!!(n&&e);function v(x){if(x[f])return x[f];let w=x.css.split(`
`),A=new Array(w.length),S=0;for(let C=0,j=w.length;C<j;C++)A[C]=S,S+=w[C].length+1;return x[f]=A,A}class y{get from(){return this.file||this.id}constructor(w,A={}){if(w===null||typeof w>"u"||typeof w=="object"&&!w.toString)throw new Error(`PostCSS received ${w} instead of CSS string`);if(this.css=w.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,A.document&&(this.document=A.document.toString()),A.from&&(!m||/^\w+:\/\//.test(A.from)||e(A.from)?this.file=A.from:this.file=n(A.from)),m&&p){let S=new u(this.css,A);if(S.text){this.map=S;let C=S.consumer().file;!this.file&&C&&(this.file=this.mapResolve(C))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(w,A,S,C={}){let j,_,O,M,R;if(A&&typeof A=="object"){let B=A,D=S;if(typeof B.offset=="number"){M=B.offset;let L=this.fromOffset(M);A=L.line,S=L.col}else A=B.line,S=B.column,M=this.fromLineAndColumn(A,S);if(typeof D.offset=="number"){O=D.offset;let L=this.fromOffset(O);_=L.line,j=L.col}else _=D.line,j=D.column,O=this.fromLineAndColumn(D.line,D.column)}else if(S)M=this.fromLineAndColumn(A,S);else{M=A;let B=this.fromOffset(M);A=B.line,S=B.col}let N=this.origin(A,S,_,j);return N?R=new l(w,N.endLine===void 0?N.line:{column:N.column,line:N.line},N.endLine===void 0?N.column:{column:N.endColumn,line:N.endLine},N.source,N.file,C.plugin):R=new l(w,_===void 0?A:{column:S,line:A},_===void 0?S:{column:j,line:_},this.css,this.file,C.plugin),R.input={column:S,endColumn:j,endLine:_,endOffset:O,line:A,offset:M,source:this.css},this.file&&(o&&(R.input.url=o(this.file).toString()),R.input.file=this.file),R}fromLineAndColumn(w,A){return v(this)[w-1]+A-1}fromOffset(w){let A=v(this),S=A[A.length-1],C=0;if(w>=S)C=A.length-1;else{let j=A.length-2,_;for(;C<j;)if(_=C+(j-C>>1),w<A[_])j=_-1;else if(w>=A[_+1])C=_+1;else{C=_;break}}return{col:w-A[C]+1,line:C+1}}mapResolve(w){return/^\w+:\/\//.test(w)?w:n(this.map.consumer().sourceRoot||this.map.root||".",w)}origin(w,A,S,C){if(!this.map)return!1;let j=this.map.consumer(),_=j.originalPositionFor({column:A,line:w});if(!_.source)return!1;let O;typeof S=="number"&&(O=j.originalPositionFor({column:C,line:S}));let M;e(_.source)?M=o(_.source):M=new URL(_.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let R={column:_.column,endColumn:O&&O.column,endLine:O&&O.line,line:_.line,url:M.toString()};if(M.protocol==="file:")if(s)R.file=s(M);else throw new Error("file: protocol is not available in this PostCSS build");let N=j.sourceContentFor(_.source);return N&&(R.source=N),R}toJSON(){let w={};for(let A of["hasBOM","css","file","id"])this[A]!=null&&(w[A]=this[A]);return this.map&&(w.map={...this.map},w.map.consumerCache&&(w.map.consumerCache=void 0)),w}}return o3=y,y.default=y,h&&h.registerInput&&h.registerInput(y),o3}var l3,JB;function Yb(){if(JB)return l3;JB=1;let t=zf(),e,n;class r extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let u=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of u)h.raws.before=o.raws.before}return u}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new n,this,s).stringify()}}return r.registerLazyResult=i=>{e=i},r.registerProcessor=i=>{n=i},l3=r,r.default=r,t.registerRoot(r),l3}var c3,eL;function iV(){if(eL)return c3;eL=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let n=[" ",`
`,"	"];return t.split(e,n)},split(e,n,r){let i=[],s="",o=!1,l=0,u=!1,h="",f=!1;for(let p of e)f?f=!1:p==="\\"?f=!0:u?p===h&&(u=!1):p==='"'||p==="'"?(u=!0,h=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&n.includes(p)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=p;return(r||s!=="")&&i.push(s.trim()),i}};return c3=t,t.default=t,c3}var u3,tL;function c4(){if(tL)return u3;tL=1;let t=zf(),e=iV();class n extends t{get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}}return u3=n,n.default=n,t.registerRule(n),u3}var h3,nL;function jxe(){if(nL)return h3;nL=1;let t=o4(),e=iS(),n=sS(),r=aS(),i=rV(),s=Yb(),o=c4();function l(u,h){if(Array.isArray(u))return u.map(m=>l(m));let{inputs:f,...p}=u;if(f){h=[];for(let m of f){let v={...m,__proto__:r.prototype};v.map&&(v.map={...v.map,__proto__:i.prototype}),h.push(v)}}if(p.nodes&&(p.nodes=u.nodes.map(m=>l(m,h))),p.source){let{inputId:m,...v}=p.source;p.source=v,m!=null&&(p.source.input=h[m])}if(p.type==="root")return new s(p);if(p.type==="decl")return new n(p);if(p.type==="rule")return new o(p);if(p.type==="comment")return new e(p);if(p.type==="atrule")return new t(p);throw new Error("Unknown node type: "+u.type)}return h3=l,l.default=l,h3}var d3,rL;function sV(){if(rL)return d3;rL=1;let{dirname:t,relative:e,resolve:n,sep:r}=sl,{SourceMapConsumer:i,SourceMapGenerator:s}=sl,{pathToFileURL:o}=sl,l=aS(),u=!!(i&&s),h=!!(t&&n&&e&&r);class f{constructor(m,v,y,x){this.stringify=m,this.mapOpts=y.map||{},this.root=v,this.opts=y,this.css=x,this.originalCSS=x,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let m;this.isInline()?m="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?m=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?m=this.mapOpts.annotation(this.opts.to,this.root):m=this.outputFile()+".map";let v=`
`;this.css.includes(`\r
`)&&(v=`\r
`),this.css+=v+"/*# sourceMappingURL="+m+" */"}applyPrevMaps(){for(let m of this.previous()){let v=this.toUrl(this.path(m.file)),y=m.root||t(m.file),x;this.mapOpts.sourcesContent===!1?(x=new i(m.text),x.sourcesContent&&(x.sourcesContent=null)):x=m.consumer(),this.map.applySourceMap(x,v,this.toUrl(this.path(y)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let m;for(let v=this.root.nodes.length-1;v>=0;v--)m=this.root.nodes[v],m.type==="comment"&&m.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(v)}else if(this.css){let m;for(;(m=this.css.lastIndexOf("/*#"))!==-1;){let v=this.css.indexOf("*/",m+3);if(v===-1)break;for(;m>0&&this.css[m-1]===`
`;)m--;this.css=this.css.slice(0,m)+this.css.slice(v+2)}}}}generate(){if(this.clearAnnotation(),h&&u&&this.isMap())return this.generateMap();{let m="";return this.stringify(this.root,v=>{m+=v}),[m]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let m=this.previous()[0].consumer();m.file=this.outputFile(),this.map=s.fromSourceMap(m,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let m=1,v=1,y="<no source>",x={generated:{column:0,line:0},original:{column:0,line:0},source:""},w,A;this.stringify(this.root,(S,C,j)=>{if(this.css+=S,C&&j!=="end"&&(x.generated.line=m,x.generated.column=v-1,C.source&&C.source.start?(x.source=this.sourcePath(C),x.original.line=C.source.start.line,x.original.column=C.source.start.column-1,this.map.addMapping(x)):(x.source=y,x.original.line=1,x.original.column=0,this.map.addMapping(x))),A=S.match(/\n/g),A?(m+=A.length,w=S.lastIndexOf(`
`),v=S.length-w):v+=S.length,C&&j!=="start"){let _=C.parent||{raws:{}};(!(C.type==="decl"||C.type==="atrule"&&!C.nodes)||C!==_.last||_.raws.semicolon)&&(C.source&&C.source.end?(x.source=this.sourcePath(C),x.original.line=C.source.end.line,x.original.column=C.source.end.column-1,x.generated.line=m,x.generated.column=v-2,this.map.addMapping(x)):(x.source=y,x.original.line=1,x.original.column=0,x.generated.line=m,x.generated.column=v-1,this.map.addMapping(x)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(m=>m.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let m=this.mapOpts.annotation;return typeof m<"u"&&m!==!0?!1:this.previous().length?this.previous().some(v=>v.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(m=>m.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(m){if(this.mapOpts.absolute||m.charCodeAt(0)===60||/^\w+:\/\//.test(m))return m;let v=this.memoizedPaths.get(m);if(v)return v;let y=this.opts.to?t(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(y=t(n(y,this.mapOpts.annotation)));let x=e(y,m);return this.memoizedPaths.set(m,x),x}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(m=>{if(m.source&&m.source.input.map){let v=m.source.input.map;this.previousMaps.includes(v)||this.previousMaps.push(v)}});else{let m=new l(this.originalCSS,this.opts);m.map&&this.previousMaps.push(m.map)}return this.previousMaps}setSourcesContent(){let m={};if(this.root)this.root.walk(v=>{if(v.source){let y=v.source.input.from;if(y&&!m[y]){m[y]=!0;let x=this.usesFileUrls?this.toFileUrl(y):this.toUrl(this.path(y));this.map.setSourceContent(x,v.source.input.css)}}});else if(this.css){let v=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(v,this.css)}}sourcePath(m){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(m.source.input.from):this.toUrl(this.path(m.source.input.from))}toBase64(m){return Buffer?Buffer.from(m).toString("base64"):window.btoa(unescape(encodeURIComponent(m)))}toFileUrl(m){let v=this.memoizedFileURLs.get(m);if(v)return v;if(o){let y=o(m).toString();return this.memoizedFileURLs.set(m,y),y}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(m){let v=this.memoizedURLs.get(m);if(v)return v;r==="\\"&&(m=m.replace(/\\/g,"/"));let y=encodeURI(m).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(m,y),y}}return d3=f,d3}var f3,iL;function Cxe(){if(iL)return f3;iL=1;const t=39,e=34,n=92,r=47,i=10,s=32,o=12,l=9,u=13,h=91,f=93,p=40,m=41,v=123,y=125,x=59,w=42,A=58,S=64,C=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,O=/[\da-f]/i;return f3=function(R,N={}){let B=R.css.valueOf(),D=N.ignoreErrors,L,U,H,z,I,F,$,G,Y,W,V=B.length,X=0,ee=[],le=[],ve=-1;function me(){return X}function Qe(de){throw R.error("Unclosed "+de,X)}function We(){return le.length===0&&X>=V}function qe(de){if(le.length)return le.pop();if(X>=V)return;let Ae=de?de.ignoreUnclosed:!1;switch(L=B.charCodeAt(X),L){case i:case s:case l:case u:case o:{z=X;do z+=1,L=B.charCodeAt(z);while(L===s||L===i||L===l||L===u||L===o);F=["space",B.slice(X,z)],X=z-1;break}case h:case f:case v:case y:case A:case x:case m:{let Te=String.fromCharCode(L);F=[Te,Te,X];break}case p:{if(W=ee.length?ee.pop()[1]:"",Y=B.charCodeAt(X+1),W==="url"&&Y!==t&&Y!==e&&Y!==s&&Y!==i&&Y!==l&&Y!==o&&Y!==u){z=X;do{if($=!1,z=B.indexOf(")",z+1),z===-1)if(D||Ae){z=X;break}else Qe("bracket");for(G=z;B.charCodeAt(G-1)===n;)G-=1,$=!$}while($);F=["brackets",B.slice(X,z+1),X,z],X=z}else X<=ve?F=["(","(",X]:(z=B.indexOf(")",X+1),U=B.slice(X,z+1),z===-1||_.test(U)?(ve=z===-1?V:z,F=["(","(",X]):(F=["brackets",U,X,z],X=z));break}case t:case e:{I=L===t?"'":'"',z=X;do{if($=!1,z=B.indexOf(I,z+1),z===-1)if(D||Ae){z=X+1;break}else Qe("string");for(G=z;B.charCodeAt(G-1)===n;)G-=1,$=!$}while($);F=["string",B.slice(X,z+1),X,z],X=z;break}case S:{C.lastIndex=X+1,C.test(B),C.lastIndex===0?z=B.length-1:z=C.lastIndex-2,F=["at-word",B.slice(X,z+1),X,z],X=z;break}case n:{for(z=X,H=!0;B.charCodeAt(z+1)===n;)z+=1,H=!H;if(L=B.charCodeAt(z+1),H&&L!==r&&L!==s&&L!==i&&L!==l&&L!==u&&L!==o&&(z+=1,O.test(B.charAt(z)))){for(;O.test(B.charAt(z+1));)z+=1;B.charCodeAt(z+1)===s&&(z+=1)}F=["word",B.slice(X,z+1),X,z],X=z;break}default:{L===r&&B.charCodeAt(X+1)===w?(z=B.indexOf("*/",X+2)+1,z===0&&(D||Ae?z=B.length:Qe("comment")),F=["comment",B.slice(X,z+1),X,z],X=z):(j.lastIndex=X+1,j.test(B),j.lastIndex===0?z=B.length-1:z=j.lastIndex-2,F=["word",B.slice(X,z+1),X,z],ee.push(F),X=z);break}}return X++,F}function ae(de){le.push(de)}return{back:ae,endOfFile:We,nextToken:qe,position:me}},f3}var p3,sL;function _xe(){if(sL)return p3;sL=1;let t=o4(),e=iS(),n=sS(),r=Yb(),i=c4(),s=Cxe();const o={empty:!0,space:!0};function l(h){for(let f=h.length-1;f>=0;f--){let p=h[f],m=p[3]||p[2];if(m)return m}}class u{constructor(f){this.input=f,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:f,start:{column:1,line:1,offset:0}}}atrule(f){let p=new t;p.name=f[1].slice(1),p.name===""&&this.unnamedAtrule(p,f),this.init(p,f[2]);let m,v,y,x=!1,w=!1,A=[],S=[];for(;!this.tokenizer.endOfFile();){if(f=this.tokenizer.nextToken(),m=f[0],m==="("||m==="["?S.push(m==="("?")":"]"):m==="{"&&S.length>0?S.push("}"):m===S[S.length-1]&&S.pop(),S.length===0)if(m===";"){p.source.end=this.getPosition(f[2]),p.source.end.offset++,this.semicolon=!0;break}else if(m==="{"){w=!0;break}else if(m==="}"){if(A.length>0){for(y=A.length-1,v=A[y];v&&v[0]==="space";)v=A[--y];v&&(p.source.end=this.getPosition(v[3]||v[2]),p.source.end.offset++)}this.end(f);break}else A.push(f);else A.push(f);if(this.tokenizer.endOfFile()){x=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(A),A.length?(p.raws.afterName=this.spacesAndCommentsFromStart(A),this.raw(p,"params",A),x&&(f=A[A.length-1],p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),w&&(p.nodes=[],this.current=p)}checkMissedSemicolon(f){let p=this.colon(f);if(p===!1)return;let m=0,v;for(let y=p-1;y>=0&&(v=f[y],!(v[0]!=="space"&&(m+=1,m===2)));y--);throw this.input.error("Missed semicolon",v[0]==="word"?v[3]+1:v[2])}colon(f){let p=0,m,v,y;for(let[x,w]of f.entries()){if(v=w,y=v[0],y==="("&&(p+=1),y===")"&&(p-=1),p===0&&y===":")if(!m)this.doubleColon(v);else{if(m[0]==="word"&&m[1]==="progid")continue;return x}m=v}return!1}comment(f){let p=new e;this.init(p,f[2]),p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++;let m=f[1].slice(2,-2);if(!m.trim())p.text="",p.raws.left=m,p.raws.right="";else{let v=m.match(/^(\s*)([^]*\S)(\s*)$/);p.text=v[2],p.raws.left=v[1],p.raws.right=v[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(f,p){let m=new n;this.init(m,f[0][2]);let v=f[f.length-1];for(v[0]===";"&&(this.semicolon=!0,f.pop()),m.source.end=this.getPosition(v[3]||v[2]||l(f)),m.source.end.offset++;f[0][0]!=="word";)f.length===1&&this.unknownWord(f),m.raws.before+=f.shift()[1];for(m.source.start=this.getPosition(f[0][2]),m.prop="";f.length;){let S=f[0][0];if(S===":"||S==="space"||S==="comment")break;m.prop+=f.shift()[1]}m.raws.between="";let y;for(;f.length;)if(y=f.shift(),y[0]===":"){m.raws.between+=y[1];break}else y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]),m.raws.between+=y[1];(m.prop[0]==="_"||m.prop[0]==="*")&&(m.raws.before+=m.prop[0],m.prop=m.prop.slice(1));let x=[],w;for(;f.length&&(w=f[0][0],!(w!=="space"&&w!=="comment"));)x.push(f.shift());this.precheckMissedSemicolon(f);for(let S=f.length-1;S>=0;S--){if(y=f[S],y[1].toLowerCase()==="!important"){m.important=!0;let C=this.stringFrom(f,S);C=this.spacesFromEnd(f)+C,C!==" !important"&&(m.raws.important=C);break}else if(y[1].toLowerCase()==="important"){let C=f.slice(0),j="";for(let _=S;_>0;_--){let O=C[_][0];if(j.trim().startsWith("!")&&O!=="space")break;j=C.pop()[1]+j}j.trim().startsWith("!")&&(m.important=!0,m.raws.important=j,f=C)}if(y[0]!=="space"&&y[0]!=="comment")break}f.some(S=>S[0]!=="space"&&S[0]!=="comment")&&(m.raws.between+=x.map(S=>S[1]).join(""),x=[]),this.raw(m,"value",x.concat(f),p),m.value.includes(":")&&!p&&this.checkMissedSemicolon(f)}doubleColon(f){throw this.input.error("Double colon",{offset:f[2]},{offset:f[2]+f[1].length})}emptyRule(f){let p=new i;this.init(p,f[2]),p.selector="",p.raws.between="",this.current=p}end(f){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(f[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(f)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(f){if(this.spaces+=f[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="",p.source.end=this.getPosition(f[2]),p.source.end.offset+=p.raws.ownSemicolon.length)}}getPosition(f){let p=this.input.fromOffset(f);return{column:p.col,line:p.line,offset:f}}init(f,p){this.current.push(f),f.source={input:this.input,start:this.getPosition(p)},f.raws.before=this.spaces,this.spaces="",f.type!=="comment"&&(this.semicolon=!1)}other(f){let p=!1,m=null,v=!1,y=null,x=[],w=f[1].startsWith("--"),A=[],S=f;for(;S;){if(m=S[0],A.push(S),m==="("||m==="[")y||(y=S),x.push(m==="("?")":"]");else if(w&&v&&m==="{")y||(y=S),x.push("}");else if(x.length===0)if(m===";")if(v){this.decl(A,w);return}else break;else if(m==="{"){this.rule(A);return}else if(m==="}"){this.tokenizer.back(A.pop()),p=!0;break}else m===":"&&(v=!0);else m===x[x.length-1]&&(x.pop(),x.length===0&&(y=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),x.length>0&&this.unclosedBracket(y),p&&v){if(!w)for(;A.length&&(S=A[A.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(A.pop());this.decl(A,w)}else this.unknownWord(A)}parse(){let f;for(;!this.tokenizer.endOfFile();)switch(f=this.tokenizer.nextToken(),f[0]){case"space":this.spaces+=f[1];break;case";":this.freeSemicolon(f);break;case"}":this.end(f);break;case"comment":this.comment(f);break;case"at-word":this.atrule(f);break;case"{":this.emptyRule(f);break;default:this.other(f);break}this.endFile()}precheckMissedSemicolon(){}raw(f,p,m,v){let y,x,w=m.length,A="",S=!0,C,j;for(let _=0;_<w;_+=1)y=m[_],x=y[0],x==="space"&&_===w-1&&!v?S=!1:x==="comment"?(j=m[_-1]?m[_-1][0]:"empty",C=m[_+1]?m[_+1][0]:"empty",!o[j]&&!o[C]?A.slice(-1)===","?S=!1:A+=y[1]:S=!1):A+=y[1];if(!S){let _=m.reduce((O,M)=>O+M[1],"");f.raws[p]={raw:_,value:A}}f[p]=A}rule(f){f.pop();let p=new i;this.init(p,f[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(f),this.raw(p,"selector",f),this.current=p}spacesAndCommentsFromEnd(f){let p,m="";for(;f.length&&(p=f[f.length-1][0],!(p!=="space"&&p!=="comment"));)m=f.pop()[1]+m;return m}spacesAndCommentsFromStart(f){let p,m="";for(;f.length&&(p=f[0][0],!(p!=="space"&&p!=="comment"));)m+=f.shift()[1];return m}spacesFromEnd(f){let p,m="";for(;f.length&&(p=f[f.length-1][0],p==="space");)m=f.pop()[1]+m;return m}stringFrom(f,p){let m="";for(let v=p;v<f.length;v++)m+=f[v][1];return f.splice(p,f.length-p),m}unclosedBlock(){let f=this.current.source.start;throw this.input.error("Unclosed block",f.line,f.column)}unclosedBracket(f){throw this.input.error("Unclosed bracket",{offset:f[2]},{offset:f[2]+1})}unexpectedClose(f){throw this.input.error("Unexpected }",{offset:f[2]},{offset:f[2]+1})}unknownWord(f){throw this.input.error("Unknown word "+f[0][1],{offset:f[0][2]},{offset:f[0][2]+f[0][1].length})}unnamedAtrule(f,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return p3=u,p3}var m3,aL;function u4(){if(aL)return m3;aL=1;let t=zf(),e=aS(),n=_xe();function r(i,s){let o=new e(i,s),l=new n(o);try{l.parse()}catch(u){throw u}return l.root}return m3=r,r.default=r,t.registerParse(r),m3}var g3,oL;function aV(){if(oL)return g3;oL=1;class t{constructor(n,r={}){if(this.type="warning",this.text=n,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return g3=t,t.default=t,g3}var v3,lL;function h4(){if(lL)return v3;lL=1;let t=aV();class e{get content(){return this.css}constructor(r,i,s){this.processor=r,this.messages=[],this.root=i,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(r,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(r,i);return this.messages.push(s),s}warnings(){return this.messages.filter(r=>r.type==="warning")}}return v3=e,e.default=e,v3}var b3,cL;function oV(){if(cL)return b3;cL=1;let t=zf(),e=l4(),n=sV(),r=u4(),i=h4(),s=Yb(),o=nS(),{isClean:l,my:u}=a4();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function v(C){return typeof C=="object"&&typeof C.then=="function"}function y(C){let j=!1,_=h[C.type];return C.type==="decl"?j=C.prop.toLowerCase():C.type==="atrule"&&(j=C.name.toLowerCase()),j&&C.append?[_,_+"-"+j,m,_+"Exit",_+"Exit-"+j]:j?[_,_+"-"+j,_+"Exit",_+"Exit-"+j]:C.append?[_,m,_+"Exit"]:[_,_+"Exit"]}function x(C){let j;return C.type==="document"?j=["Document",m,"DocumentExit"]:C.type==="root"?j=["Root",m,"RootExit"]:j=y(C),{eventIndex:0,events:j,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(j=>w(j)),C}let A={};class S{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(j,_,O){this.stringified=!1,this.processed=!1;let M;if(typeof _=="object"&&_!==null&&(_.type==="root"||_.type==="document"))M=w(_);else if(_ instanceof S||_ instanceof i)M=w(_.root),_.map&&(typeof O.map>"u"&&(O.map={}),O.map.inline||(O.map.inline=!1),O.map.prev=_.map);else{let R=r;O.syntax&&(R=O.syntax.parse),O.parser&&(R=O.parser),R.parse&&(R=R.parse);try{M=R(_,O)}catch(N){this.processed=!0,this.error=N}M&&!M[u]&&t.rebuild(M)}this.result=new i(j,M,O),this.helpers={...A,postcss:A,result:this.result},this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?{...R,...R.prepare(this.result)}:R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(j){return this.async().catch(j)}finally(j){return this.async().then(j,j)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(j,_){let O=this.result.lastPlugin;try{_&&_.addToError(j),this.error=j,j.name==="CssSyntaxError"&&!j.plugin?(j.plugin=O.postcssPlugin,j.setMessage()):O.postcssVersion}catch(M){console&&console.error&&console.error(M)}return j}prepareVisitors(){this.listeners={};let j=(_,O,M)=>{this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push([_,M])};for(let _ of this.plugins)if(typeof _=="object")for(let O in _){if(!f[O]&&/^[A-Z]/.test(O))throw new Error(`Unknown event ${O} in ${_.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[O])if(typeof _[O]=="object")for(let M in _[O])M==="*"?j(_,O,_[O][M]):j(_,O+"-"+M.toLowerCase(),_[O][M]);else typeof _[O]=="function"&&j(_,O,_[O])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let j=0;j<this.plugins.length;j++){let _=this.plugins[j],O=this.runOnRoot(_);if(v(O))try{await O}catch(M){throw this.handleError(M)}}if(this.prepareVisitors(),this.hasListener){let j=this.result.root;for(;!j[l];){j[l]=!0;let _=[x(j)];for(;_.length>0;){let O=this.visitTick(_);if(v(O))try{await O}catch(M){let R=_[_.length-1].node;throw this.handleError(M,R)}}}if(this.listeners.OnceExit)for(let[_,O]of this.listeners.OnceExit){this.result.lastPlugin=_;try{if(j.type==="document"){let M=j.nodes.map(R=>O(R,this.helpers));await Promise.all(M)}else await O(j,this.helpers)}catch(M){throw this.handleError(M)}}}return this.processed=!0,this.stringify()}runOnRoot(j){this.result.lastPlugin=j;try{if(typeof j=="object"&&j.Once){if(this.result.root.type==="document"){let _=this.result.root.nodes.map(O=>j.Once(O,this.helpers));return v(_[0])?Promise.all(_):_}return j.Once(this.result.root,this.helpers)}else if(typeof j=="function")return j(this.result.root,this.result)}catch(_){throw this.handleError(_)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let j=this.result.opts,_=o;j.syntax&&(_=j.syntax.stringify),j.stringifier&&(_=j.stringifier),_.stringify&&(_=_.stringify);let O=this.result.root.source;if(j.map===void 0&&!(O&&O.input&&O.input.map)){let N="";return _(this.result.root,B=>{N+=B}),this.result.css=N,this.result}let R=new n(_,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let j of this.plugins){let _=this.runOnRoot(j);if(v(_))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let j=this.result.root;for(;!j[l];)j[l]=!0,this.walkSync(j);if(this.listeners.OnceExit)if(j.type==="document")for(let _ of j.nodes)this.visitSync(this.listeners.OnceExit,_);else this.visitSync(this.listeners.OnceExit,j)}return this.result}then(j,_){return this.async().then(j,_)}toString(){return this.css}visitSync(j,_){for(let[O,M]of j){this.result.lastPlugin=O;let R;try{R=M(_,this.helpers)}catch(N){throw this.handleError(N,_.proxyOf)}if(_.type!=="root"&&_.type!=="document"&&!_.parent)return!0;if(v(R))throw this.getAsyncError()}}visitTick(j){let _=j[j.length-1],{node:O,visitors:M}=_;if(O.type!=="root"&&O.type!=="document"&&!O.parent){j.pop();return}if(M.length>0&&_.visitorIndex<M.length){let[N,B]=M[_.visitorIndex];_.visitorIndex+=1,_.visitorIndex===M.length&&(_.visitors=[],_.visitorIndex=0),this.result.lastPlugin=N;try{return B(O.toProxy(),this.helpers)}catch(D){throw this.handleError(D,O)}}if(_.iterator!==0){let N=_.iterator,B;for(;B=O.nodes[O.indexes[N]];)if(O.indexes[N]+=1,!B[l]){B[l]=!0,j.push(x(B));return}_.iterator=0,delete O.indexes[N]}let R=_.events;for(;_.eventIndex<R.length;){let N=R[_.eventIndex];if(_.eventIndex+=1,N===m){O.nodes&&O.nodes.length&&(O[l]=!0,_.iterator=O.getIterator());return}else if(this.listeners[N]){_.visitors=this.listeners[N];return}}j.pop()}walkSync(j){j[l]=!0;let _=y(j);for(let O of _)if(O===m)j.nodes&&j.each(M=>{M[l]||this.walkSync(M)});else{let M=this.listeners[O];if(M&&this.visitSync(M,j.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=C=>{A=C},b3=S,S.default=S,s.registerLazyResult(S),e.registerLazyResult(S),b3}var y3,uL;function Txe(){if(uL)return y3;uL=1;let t=sV(),e=u4(),n=h4(),r=nS();class i{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let o,l=e;try{o=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=o,o}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(o,l,u){l=l.toString(),this.stringified=!1,this._processor=o,this._css=l,this._opts=u,this._map=void 0;let h=r;this.result=new n(this._processor,void 0,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let p=new t(h,void 0,this._opts,l);if(p.isMap()){let[m,v]=p.generate();m&&(this.result.css=m),v&&(this.result.map=v)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(o){return this.async().catch(o)}finally(o){return this.async().then(o,o)}sync(){if(this.error)throw this.error;return this.result}then(o,l){return this.async().then(o,l)}toString(){return this._css}warnings(){return[]}}return y3=i,i.default=i,y3}var x3,hL;function kxe(){if(hL)return x3;hL=1;let t=l4(),e=oV(),n=Txe(),r=Yb();class i{constructor(o=[]){this.version="8.5.14",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new n(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return x3=i,i.default=i,r.registerProcessor(i),t.registerProcessor(i),x3}var A3,dL;function Oxe(){if(dL)return A3;dL=1;var t={};let e=o4(),n=iS(),r=zf(),i=s4(),s=sS(),o=l4(),l=jxe(),u=aS(),h=oV(),f=iV(),p=rS(),m=u4(),v=kxe(),y=h4(),x=Yb(),w=c4(),A=nS(),S=aV();function C(...j){return j.length===1&&Array.isArray(j[0])&&(j=j[0]),new v(j)}return C.plugin=function(_,O){let M=!1;function R(...B){console&&console.warn&&!M&&(M=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),t.LANG&&t.LANG.startsWith("cn")&&console.warn(_+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let D=O(...B);return D.postcssPlugin=_,D.postcssVersion=new v().version,D}let N;return Object.defineProperty(R,"postcss",{get(){return N||(N=R()),N}}),R.process=function(B,D,L){return C([R(L)]).process(B,D)},R},C.stringify=A,C.parse=m,C.fromJSON=l,C.list=f,C.comment=j=>new n(j),C.atRule=j=>new e(j),C.decl=j=>new s(j),C.rule=j=>new w(j),C.root=j=>new x(j),C.document=j=>new o(j),C.CssSyntaxError=i,C.Declaration=s,C.Container=r,C.Processor=v,C.Document=o,C.Comment=n,C.Warning=S,C.AtRule=e,C.Result=y,C.Input=u,C.Rule=w,C.Root=x,C.Node=p,h.registerPostcss(C),A3=C,C.default=C,A3}var w3,fL;function Exe(){if(fL)return w3;fL=1;const t=pxe(),e=mxe(),{isPlainObject:n}=gxe(),r=vxe(),i=yxe(),{parse:s}=Oxe(),o=["img","audio","video","picture","svg","object","map","iframe","embed"],l=["script","style"];function u(w,A){w&&Object.keys(w).forEach(function(S){A(w[S],S)})}function h(w,A){return{}.hasOwnProperty.call(w,A)}function f(w,A){const S=[];return u(w,function(C){A(C)&&S.push(C)}),S}function p(w){for(const A in w)if(h(w,A))return!1;return!0}function m(w){return w.map(function(A){if(!A.url)throw new Error("URL missing");return A.url+(A.w?` ${A.w}w`:"")+(A.h?` ${A.h}h`:"")+(A.d?` ${A.d}x`:"")}).join(", ")}w3=y;const v=/^[^\0\t\n\f\r /<=>]+$/;function y(w,A,S){if(w==null)return"";typeof w=="number"&&(w=w.toString());let C="",j="";function _(ae,de){const Ae=this;this.tag=ae,this.attribs=de||{},this.tagPosition=C.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){if(I.length){const Te=I[I.length-1];Te.text+=Ae.text}},this.updateParentNodeMediaChildren=function(){I.length&&o.includes(this.tag)&&I[I.length-1].mediaChildren.push(this.tag)}}A=Object.assign({},y.defaults,A),A.parser=Object.assign({},x,A.parser);const O=function(ae){return A.allowedTags===!1||(A.allowedTags||[]).indexOf(ae)>-1};l.forEach(function(ae){O(ae)&&!A.allowVulnerableTags&&console.warn(`

⚠️ Your \`allowedTags\` option includes, \`${ae}\`, which is inherently
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
Or, to disable this warning, add the \`allowVulnerableTags\` option
and ensure you are accounting for this risk.

`)});const M=A.nonTextTags||["script","style","textarea","option"];let R,N;A.allowedAttributes&&(R={},N={},u(A.allowedAttributes,function(ae,de){R[de]=[];const Ae=[];ae.forEach(function(Te){typeof Te=="string"&&Te.indexOf("*")>=0?Ae.push(e(Te).replace(/\\\*/g,".*")):R[de].push(Te)}),Ae.length&&(N[de]=new RegExp("^("+Ae.join("|")+")$"))}));const B={},D={},L={};u(A.allowedClasses,function(ae,de){if(R&&(h(R,de)||(R[de]=[]),R[de].push("class")),B[de]=ae,Array.isArray(ae)){const Ae=[];B[de]=[],L[de]=[],ae.forEach(function(Te){typeof Te=="string"&&Te.indexOf("*")>=0?Ae.push(e(Te).replace(/\\\*/g,".*")):Te instanceof RegExp?L[de].push(Te):B[de].push(Te)}),Ae.length&&(D[de]=new RegExp("^("+Ae.join("|")+")$"))}});const U={};let H;u(A.transformTags,function(ae,de){let Ae;typeof ae=="function"?Ae=ae:typeof ae=="string"&&(Ae=y.simpleTransform(ae)),de==="*"?H=Ae:U[de]=Ae});let z,I,F,$,G,Y,W=!1;X();const V=new t.Parser({onopentag:function(ae,de){if(A.onOpenTag&&A.onOpenTag(ae,de),A.enforceHtmlBoundary&&ae==="html"&&X(),G){Y++;return}const Ae=new _(ae,de);I.push(Ae);let Te=!1;const Ge=!!Ae.text;let rt;if(h(U,ae)&&(rt=U[ae](ae,de),Ae.attribs=de=rt.attribs,rt.text!==void 0&&(Ae.innerText=rt.text),ae!==rt.tagName&&(Ae.name=ae=rt.tagName,$[z]=rt.tagName)),H&&(rt=H(ae,de),Ae.attribs=de=rt.attribs,ae!==rt.tagName&&(Ae.name=ae=rt.tagName,$[z]=rt.tagName)),(!O(ae)||A.disallowedTagsMode==="recursiveEscape"&&!p(F)||A.nestingLimit!=null&&z>=A.nestingLimit)&&(Te=!0,F[z]=!0,(A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&M.indexOf(ae)!==-1&&(G=!0,Y=1)),z++,Te){if(A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard"){if(Ae.innerText&&!Ge){const Ee=ee(Ae.innerText);A.textFilter?C+=A.textFilter(Ee,ae):C+=Ee,W=!0}return}j=C,C=""}C+="<"+ae,ae==="script"&&(A.allowedScriptHostnames||A.allowedScriptDomains)&&(Ae.innerText=""),Te&&(A.disallowedTagsMode==="escape"||A.disallowedTagsMode==="recursiveEscape")&&A.preserveEscapedAttributes?u(de,function(Ee,Ke){C+=" "+Ke+'="'+ee(Ee||"",!0)+'"'}):(!R||h(R,ae)||R["*"])&&u(de,function(Ee,Ke){if(!v.test(Ke)){delete Ae.attribs[Ke];return}if(Ee===""&&!A.allowedEmptyAttributes.includes(Ke)&&(A.nonBooleanAttributes.includes(Ke)||A.nonBooleanAttributes.includes("*"))){delete Ae.attribs[Ke];return}let Dt=!1;if(!R||h(R,ae)&&R[ae].indexOf(Ke)!==-1||R["*"]&&R["*"].indexOf(Ke)!==-1||h(N,ae)&&N[ae].test(Ke)||N["*"]&&N["*"].test(Ke))Dt=!0;else if(R&&R[ae]){for(const Je of R[ae])if(n(Je)&&Je.name&&Je.name===Ke){Dt=!0;let it="";if(Je.multiple===!0){const Xe=Ee.split(" ");for(const Oe of Xe)Je.values.indexOf(Oe)!==-1&&(it===""?it=Oe:it+=" "+Oe)}else Je.values.indexOf(Ee)>=0&&(it=Ee);Ee=it}}if(Dt){if(A.allowedSchemesAppliedToAttributes.indexOf(Ke)!==-1&&le(ae,Ee)){delete Ae.attribs[Ke];return}if(ae==="script"&&Ke==="src"){let Je=!0;try{const it=ve(Ee);if(A.allowedScriptHostnames||A.allowedScriptDomains){const Xe=(A.allowedScriptHostnames||[]).find(function($e){return $e===it.url.hostname}),Oe=(A.allowedScriptDomains||[]).find(function($e){return it.url.hostname===$e||it.url.hostname.endsWith(`.${$e}`)});Je=Xe||Oe}}catch{Je=!1}if(!Je){delete Ae.attribs[Ke];return}}if(ae==="iframe"&&Ke==="src"){let Je=!0;try{const it=ve(Ee);if(it.isRelativeUrl)Je=h(A,"allowIframeRelativeUrls")?A.allowIframeRelativeUrls:!A.allowedIframeHostnames&&!A.allowedIframeDomains;else if(A.allowedIframeHostnames||A.allowedIframeDomains){const Xe=(A.allowedIframeHostnames||[]).find(function($e){return $e===it.url.hostname}),Oe=(A.allowedIframeDomains||[]).find(function($e){return it.url.hostname===$e||it.url.hostname.endsWith(`.${$e}`)});Je=Xe||Oe}}catch{Je=!1}if(!Je){delete Ae.attribs[Ke];return}}if(Ke==="srcset")try{let Je=i(Ee);if(Je.forEach(function(it){le("srcset",it.url)&&(it.evil=!0)}),Je=f(Je,function(it){return!it.evil}),Je.length)Ee=m(f(Je,function(it){return!it.evil})),Ae.attribs[Ke]=Ee;else{delete Ae.attribs[Ke];return}}catch{delete Ae.attribs[Ke];return}if(Ke==="class"){const Je=B[ae],it=B["*"],Xe=D[ae],Oe=L[ae],$e=L["*"],lt=D["*"],Rn=[Xe,lt].concat(Oe,$e).filter(function(vr){return vr});if(Je&&it?Ee=qe(Ee,r(Je,it),Rn):Ee=qe(Ee,Je||it,Rn),!Ee.length){delete Ae.attribs[Ke];return}}if(Ke==="style"){if(A.parseStyleAttributes)try{const Je=s(ae+" {"+Ee+"}",{map:!1}),it=me(Je,A.allowedStyles);if(Ee=Qe(it),Ee.length===0){delete Ae.attribs[Ke];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+ae+" {"+Ee+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete Ae.attribs[Ke];return}else if(A.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}C+=" "+Ke,Ee&&Ee.length?C+='="'+ee(Ee,!0)+'"':A.allowedEmptyAttributes.includes(Ke)&&(C+='=""')}else delete Ae.attribs[Ke]}),A.selfClosing.indexOf(ae)!==-1?C+=" />":(C+=">",Ae.innerText&&!Ge&&!A.textFilter&&(C+=ee(Ae.innerText),W=!0)),Te&&(C=j+ee(C),j=""),Ae.openingTagLength=C.length-Ae.tagPosition},ontext:function(ae){if(G)return;const de=I[I.length-1];let Ae;if(de&&(Ae=de.tag,ae=de.innerText!==void 0?de.innerText:ae),A.disallowedTagsMode==="completelyDiscard"&&!O(Ae))ae="";else if((A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&(Ae==="script"||Ae==="style"))C+=ae;else if((A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard")&&(Ae==="textarea"||Ae==="xmp"))C+=ae;else if(!W){const Te=ee(ae,!1);A.textFilter?C+=A.textFilter(Te,Ae):C+=Te}if(I.length){const Te=I[I.length-1];Te.text+=ae}},onclosetag:function(ae,de){if(A.onCloseTag&&A.onCloseTag(ae,de),G)if(Y--,!Y)G=!1;else return;const Ae=I.pop();if(!Ae)return;if(Ae.tag!==ae){I.push(Ae);return}G=A.enforceHtmlBoundary?ae==="html":!1,z--;const Te=F[z];if(Te){if(delete F[z],A.disallowedTagsMode==="discard"||A.disallowedTagsMode==="completelyDiscard"){Ae.updateParentNodeText();return}j=C,C=""}if($[z]&&(ae=$[z],delete $[z]),A.exclusiveFilter){const Ge=A.exclusiveFilter(Ae);if(Ge==="excludeTag"){Te&&(C=j,j=""),C=C.substring(0,Ae.tagPosition)+C.substring(Ae.tagPosition+Ae.openingTagLength);return}else if(Ge){C=C.substring(0,Ae.tagPosition);return}}if(Ae.updateParentNodeMediaChildren(),Ae.updateParentNodeText(),A.selfClosing.indexOf(ae)!==-1||de&&!O(ae)&&["escape","recursiveEscape"].indexOf(A.disallowedTagsMode)>=0){Te&&(C=j,j="");return}C+="</"+ae+">",Te&&(C=j+ee(C),j=""),W=!1}},A.parser);if(V.write(w),V.end(),A.disallowedTagsMode==="escape"||A.disallowedTagsMode==="recursiveEscape"){const ae=V.endIndex;if(ae!=null&&ae>=0&&ae<w.length){const de=w.substring(ae);C+=ee(de)}else(ae==null||ae<0)&&w.length>0&&C===""&&(C=ee(w))}return C;function X(){C="",z=0,I=[],F={},$={},G=!1,Y=0}function ee(ae,de){return typeof ae!="string"&&(ae=ae+""),A.parser.decodeEntities&&(ae=ae.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),de&&(ae=ae.replace(/"/g,"&quot;"))),ae=ae.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),de&&(ae=ae.replace(/"/g,"&quot;")),ae}function le(ae,de){for(de=de.replace(/[\x00-\x20]+/g,"");;){const Ge=de.indexOf("<!--");if(Ge===-1)break;const rt=de.indexOf("-->",Ge+4);if(rt===-1)break;de=de.substring(0,Ge)+de.substring(rt+3)}const Ae=de.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!Ae)return de.match(/^[/\\]{2}/)?!A.allowProtocolRelative:!1;const Te=Ae[1].toLowerCase();return h(A.allowedSchemesByTag,ae)?A.allowedSchemesByTag[ae].indexOf(Te)===-1:!A.allowedSchemes||A.allowedSchemes.indexOf(Te)===-1}function ve(ae){if(ae=ae.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),ae.startsWith("relative:"))throw new Error("relative: exploit attempt");let de="relative://relative-site";for(let Ge=0;Ge<100;Ge++)de+=`/${Ge}`;const Ae=new URL(ae,de);return{isRelativeUrl:Ae&&Ae.hostname==="relative-site"&&Ae.protocol==="relative:",url:Ae}}function me(ae,de){if(!de)return ae;const Ae=ae.nodes[0];let Te;return de[Ae.selector]&&de["*"]?Te=r(de[Ae.selector],de["*"]):Te=de[Ae.selector]||de["*"],Te&&(ae.nodes[0].nodes=Ae.nodes.reduce(We(Te),[])),ae}function Qe(ae){return ae.nodes[0].nodes.reduce(function(de,Ae){return de.push(`${Ae.prop}:${Ae.value}${Ae.important?" !important":""}`),de},[]).join(";")}function We(ae){return function(de,Ae){return h(ae,Ae.prop)&&ae[Ae.prop].some(function(Ge){return Ge.test(Ae.value)})&&de.push(Ae),de}}function qe(ae,de,Ae){return de?(ae=ae.split(/\s+/),ae.filter(function(Te){return de.indexOf(Te)!==-1||Ae.some(function(Ge){return Ge.test(Te)})}).join(" ")):ae}}const x={decodeEntities:!0};return y.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},y.simpleTransform=function(w,A,S){return S=S===void 0?!0:S,A=A||{},function(C,j){let _;if(S)for(_ in A)j[_]=A[_];else j=A;return{tagName:w,attribs:j}}},w3}var Mxe=Exe();const Rxe=pl(Mxe);var yt=(t=>(t.aggregation="aggregation",t.binaryExpr="binaryExpr",t.call="call",t.matrixSelector="matrixSelector",t.subquery="subquery",t.numberLiteral="numberLiteral",t.parenExpr="parenExpr",t.stringLiteral="stringLiteral",t.unaryExpr="unaryExpr",t.vectorSelector="vectorSelector",t.placeholder="placeholder",t))(yt||{}),Xt=(t=>(t.add="+",t.sub="-",t.mul="*",t.div="/",t.mod="%",t.pow="^",t.eql="==",t.neq="!=",t.gtr=">",t.lss="<",t.trimUpper="</",t.trimLower=">/",t.gte=">=",t.lte="<=",t.and="and",t.or="or",t.unless="unless",t.atan2="atan2",t))(Xt||{});const Dxe=["==","!=",">","<",">=","<="],Nxe=["and","or","unless"];var _r=(t=>(t.oneToOne="one-to-one",t.manyToOne="many-to-one",t.oneToMany="one-to-many",t.manyToMany="many-to-many",t))(_r||{}),oe=(t=>(t.none="none",t.vector="vector",t.scalar="scalar",t.matrix="matrix",t.string="string",t))(oe||{}),go=(t=>(t.equal="=",t.notEqual="!=",t.matchRegexp="=~",t.matchNotRegexp="!~",t))(go||{});const Ih=t=>t.replace(/([\\"])/g,"\\$1"),d4=t=>Dxe.includes(t),Wk=t=>Nxe.includes(t),pL={[Xt.add]:3,[Xt.sub]:3,[Xt.mul]:2,[Xt.div]:2,[Xt.mod]:2,[Xt.pow]:1,[Xt.eql]:4,[Xt.neq]:4,[Xt.gtr]:4,[Xt.lss]:4,[Xt.gte]:4,[Xt.lte]:4,[Xt.trimLower]:4,[Xt.trimUpper]:4,[Xt.and]:5,[Xt.or]:6,[Xt.unless]:5,[Xt.atan2]:2},ow=(t,e)=>e.type!==yt.binaryExpr||pL[t]>pL[e.op]?e:{type:yt.parenExpr,expr:e},Ixe=t=>{switch(t.type){case yt.aggregation:return t.param===null?[t.expr]:[t.param,t.expr];case yt.subquery:return[t.expr];case yt.parenExpr:return[t.expr];case yt.call:return t.args;case yt.matrixSelector:case yt.vectorSelector:case yt.numberLiteral:case yt.stringLiteral:return[];case yt.placeholder:return t.children;case yt.unaryExpr:return[t.expr];case yt.binaryExpr:return[t.lhs,t.rhs];default:throw new Error("unsupported node type")}},zp=t=>{switch(t.type){case yt.aggregation:return oe.vector;case yt.binaryExpr:{const e=[zp(t.lhs),zp(t.rhs)];return e.includes(null)?null:e.includes(oe.vector)?oe.vector:oe.scalar}case yt.call:return t.func.returnType;case yt.matrixSelector:return oe.matrix;case yt.numberLiteral:return oe.scalar;case yt.parenExpr:return zp(t.expr);case yt.placeholder:return null;case yt.stringLiteral:return oe.string;case yt.subquery:return oe.matrix;case yt.unaryExpr:return zp(t.expr);case yt.vectorSelector:return oe.vector;default:throw new Error("invalid node type")}},Bxe=["topk","bottomk","quantile","count_values","limitk","limit_ratio"];oe.scalar,oe.string,oe.matrix,oe.vector;oe.none+"",oe.string+"",oe.scalar+"",oe.vector+"",oe.matrix+"";const Lxe=/^[a-zA-Z_:][a-zA-Z0-9_:]*$/,Pxe=/^[a-zA-Z_][a-zA-Z0-9_]*$/,oS=t=>t!==""&&!Lxe.test(t),Fxe=t=>!Pxe.test(t),us=t=>t.replace(/([\\"])/g,"\\$1"),Gh=t=>Fxe(t)?`"${us(t)}"`:t,ix=t=>t.map(e=>Gh(e)).join(", "),lV=(t,e,n)=>`${t!==null?` @ ${(t/1e3).toFixed(3)}`:e!==null?` @ ${e}()`:""}${n===0?"":n>0?` offset ${Hn(n)}`:` offset -${Hn(-n)}`}`,mL=t=>{var l;const e=t.matchers.filter(u=>!(u.name==="__name__"&&u.type===go.equal)).map(u=>`${Gh(u.name)}${u.type}"${us(u.value)}"`),n=t.name||((l=t.matchers.find(u=>u.name==="__name__"&&u.type===go.equal))==null?void 0:l.value)||"",r=oS(n);r&&e.unshift(`"${us(n)}"`);const i=t.type===yt.matrixSelector?`[${Hn(t.range)}]`:"",s=t.anchored?" anchored":t.smoothed?" smoothed":"",o=lV(t.timestamp,t.startOrEnd,t.offset);return`${r?"":n}${e.length>0?`{${e.join(",")}}`:""}${i}${s}${o}`},cs=(t,e=0,n=!1,r=!0)=>{const i=n?`
`:"",s=n?`
`:" ",o=e+2,l=n?" ".repeat(e):"",u=r?l:"";switch(t.type){case yt.aggregation:return`${u}${t.op}${t.without?` without(${ix(t.grouping)}) `:t.grouping.length>0?` by(${ix(t.grouping)}) `:""}(${i}${Bxe.includes(t.op)&&t.param!==null?`${cs(t.param,o,n)},${s}`:""}${cs(t.expr,o,n)}${i}${l})`;case yt.subquery:return`${u}${cs(t.expr,e,n)}[${Hn(t.range)}:${t.step!==0?Hn(t.step):""}]${lV(t.timestamp,t.startOrEnd,t.offset)}`;case yt.parenExpr:return`${u}(${i}${cs(t.expr,o,n)}${i}${l})`;case yt.call:{const h=t.args.length>0?i:"";return`${u}${t.func.name}(${h}${t.args.map(f=>cs(f,o,n)).join(","+s)}${h}${t.args.length>0?l:""})`}case yt.matrixSelector:return`${u}${mL(t)}`;case yt.vectorSelector:return`${u}${mL(t)}`;case yt.numberLiteral:return`${u}${t.val}`;case yt.stringLiteral:return`${u}"${us(t.val)}"`;case yt.unaryExpr:return`${u}${t.op}${cs(t.expr,e,n,!1)}`;case yt.binaryExpr:{let h="",f="",p="";const m=t.matching;if(m!==null){(m.labels.length>0||m.on||m.card===_r.manyToOne||m.card===_r.oneToMany)&&(h=` ${m.on?"on":"ignoring"}(${ix(m.labels)})`),(m.card===_r.manyToOne||m.card===_r.oneToMany)&&(f=` group_${m.card===_r.manyToOne?"left":"right"}(${ix(m.include)})`);const v=m.fillValues.lhs,y=m.fillValues.rhs;(v!==null||y!==null)&&(v===y?p=` fill(${v})`:(v!==null&&(p+=` fill_left(${v})`),y!==null&&(p+=` fill_right(${y})`)))}return`${cs(ow(t.op,t.lhs),o,n)}${s}${l}${t.op}${t.bool?" bool":""}${h}${f}${p}${s}${cs(ow(t.op,t.rhs),o,n)}`}case yt.placeholder:return`${u}…${t.children.length>0?`(${i}${t.children.map(h=>cs(h,o,n)).join(","+s)}${i}${l})`:""}`;default:throw new Error("unsupported node type")}},ha=t=>t.map((e,n)=>a.jsxs("span",{children:[n!==0&&", ",a.jsx("span",{className:"promql-code promql-label-name",children:Gh(e)})]},n)),cV=(t,e,n)=>a.jsxs(a.Fragment,{children:[t!==null?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-operator",children:"@"})," ",a.jsx("span",{className:"promql-number",children:(t/1e3).toFixed(3)})]}):e!==null?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-operator",children:"@"})," ",a.jsx("span",{className:"promql-keyword",children:e}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-paren",children:")"})]}):a.jsx(a.Fragment,{}),n===0?a.jsx(a.Fragment,{}):n>0?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"offset"})," ",a.jsx("span",{className:"promql-duration",children:Hn(n)})]}):a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"offset"})," ",a.jsxs("span",{className:"promql-duration",children:["-",Hn(-n)]})]})]}),gL=t=>{var i;const e=[],n=t.name||((i=t.matchers.find(s=>s.name==="__name__"&&s.type===go.equal))==null?void 0:i.value)||"",r=oS(n);return r&&e.push(a.jsx("span",{children:a.jsxs("span",{className:"promql-string",children:['"',us(n),'"']})},"__name__")),e.push(...t.matchers.filter(s=>!(s.name==="__name__"&&s.type===go.equal)).map((s,o)=>a.jsxs("span",{children:[(o!==0||r)&&",",a.jsx("span",{className:"promql-label-name",children:Gh(s.name)}),s.type,a.jsxs("span",{className:"promql-string",children:['"',us(s.value),'"']})]},o))),a.jsxs(a.Fragment,{children:[!r&&a.jsx("span",{className:"promql-metric-name",children:n}),e.length>0&&a.jsxs(a.Fragment,{children:["{",a.jsx("span",{className:"promql-metric-name",children:e}),"}"]}),t.type===yt.matrixSelector&&a.jsxs(a.Fragment,{children:["[",a.jsx("span",{className:"promql-duration",children:Hn(t.range)}),"]"]}),t.anchored&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"anchored"})]}),t.smoothed&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"smoothed"})]}),cV(t.timestamp,t.startOrEnd,t.offset)]})},S3=a.jsx("span",{className:"promql-ellipsis",children:"…"}),zxe=(t,e,n)=>{if(n===0)return S3;const r=n===void 0?void 0:n-1;switch(t.type){case yt.aggregation:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-keyword",children:t.op}),t.without?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"without"}),a.jsx("span",{className:"promql-paren",children:"("}),ha(t.grouping),a.jsx("span",{className:"promql-paren",children:")"})," "]}):t.grouping.length>0&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"by"}),a.jsx("span",{className:"promql-paren",children:"("}),ha(t.grouping),a.jsx("span",{className:"promql-paren",children:")"})," "]}),e&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),t.param!==null&&a.jsxs(a.Fragment,{children:[zo(t.param,e,r),", "]}),zo(t.expr,e,r),a.jsx("span",{className:"promql-paren",children:")"})]})]});case yt.subquery:return a.jsxs(a.Fragment,{children:[e&&zo(t.expr,e,r),"[",a.jsx("span",{className:"promql-duration",children:Hn(t.range)}),":",t.step!==0&&a.jsx("span",{className:"promql-duration",children:Hn(t.step)}),"]",cV(t.timestamp,t.startOrEnd,t.offset)]});case yt.parenExpr:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),e&&zo(t.expr,e,r),a.jsx("span",{className:"promql-paren",children:")"})]});case yt.call:{const i=r===void 0||r>0?t.args.map((s,o)=>a.jsxs("span",{children:[o!==0&&", ",zo(s,e)]},o)):t.args.length>0?S3:"";return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-keyword",children:t.func.name}),e&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-paren",children:"("}),i,a.jsx("span",{className:"promql-paren",children:")"})]})]})}case yt.matrixSelector:return gL(t);case yt.vectorSelector:return gL(t);case yt.numberLiteral:return a.jsx("span",{className:"promql-number",children:t.val});case yt.stringLiteral:return a.jsxs("span",{className:"promql-string",children:['"',us(t.val),'"']});case yt.unaryExpr:return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"promql-operator",children:t.op}),e&&zo(t.expr,e,r)]});case yt.binaryExpr:{let i=a.jsx(a.Fragment,{}),s=a.jsx(a.Fragment,{}),o=a.jsx(a.Fragment,{});const l=t.matching;if(l!==null){(l.labels.length>0||l.on||l.card===_r.manyToOne||l.card===_r.oneToMany)&&(i=a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:l.on?"on":"ignoring"}),a.jsx("span",{className:"promql-paren",children:"("}),ha(l.labels),a.jsx("span",{className:"promql-paren",children:")"})]})),(l.card===_r.manyToOne||l.card===_r.oneToMany)&&(s=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"promql-keyword",children:[" ","group_",l.card===_r.manyToOne?"left":"right"]}),a.jsx("span",{className:"promql-paren",children:"("}),ha(l.include),a.jsx("span",{className:"promql-paren",children:")"})]}));const u=l.fillValues.lhs,h=l.fillValues.rhs;(u!==null||h!==null)&&(u===h?o=a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:u}),a.jsx("span",{className:"promql-paren",children:")"})]}):o=a.jsxs(a.Fragment,{children:[u!==null&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill_left"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:u}),a.jsx("span",{className:"promql-paren",children:")"})]}),h!==null&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"fill_right"}),a.jsx("span",{className:"promql-paren",children:"("}),a.jsx("span",{className:"promql-number",children:h}),a.jsx("span",{className:"promql-paren",children:")"})]})]}))}return a.jsxs(a.Fragment,{children:[e&&zo(ow(t.op,t.lhs),e,r)," ",["atan2","and","or","unless"].includes(t.op)?a.jsx("span",{className:"promql-keyword",children:t.op}):a.jsx("span",{className:"promql-operator",children:t.op}),t.bool&&a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"promql-keyword",children:"bool"})]}),i,s,o," ",e&&zo(ow(t.op,t.rhs),e,r)]})}case yt.placeholder:return S3;default:throw new Error("unsupported node type")}},zo=(t,e,n)=>a.jsx("span",{className:"promql-code",children:zxe(t,e,n)}),Hxe="_labelValue_1cwwq_1",qxe="_promqlPill_1cwwq_13",j3={labelValue:Hxe,promqlPill:qxe},$s={width:fe(16),height:fe(16)},wg={width:fe(14),height:fe(14)},Jo={width:Rs(17),height:Rs(17)},uu={width:"70%",height:"70%"},Hf={width:Rs(16),height:Rs(16)},qg={width:Rs(20),height:Rs(20)},$xe={width:Rs(17.5),height:Rs(17.5)},lw={width:Rs(16),height:Rs(16)};fe(20),fe(20);const Qxe=({metricName:t,insertText:e,hideLabelsExplorer:n})=>{const[r,i]=E.useState([]),[s,o]=E.useState([]),[l,u]=E.useState(null),[h,f]=E.useState(!0),p=_=>{o(s.filter(O=>O.name!==_))},m=()=>{if(l===null)throw new Error("tried to add null label matcher");o([...s,l]),u(null)},v=_=>a.jsx(Ql,{size:"md",withRemoveButton:!0,onRemove:()=>{p(_.name)},className:j3.promqlPill,children:a.jsxs("span",{className:"promql-code",children:[a.jsx("span",{className:"promql-label-name",children:_.name}),_.type,a.jsxs("span",{className:"promql-string",children:['"',Ih(_.value),'"']})]})},_.name),y={type:yt.vectorSelector,name:t,matchers:s,offset:0,timestamp:null,startOrEnd:null,anchored:!1,smoothed:!1},{data:x,error:w,isLoading:A}=Vh({path:"/series",params:{"match[]":cs(y)}}),[S,C,j]=E.useMemo(()=>{const _={},O={},M={};x!==void 0&&(x.data.forEach(N=>{Object.entries(N).forEach(([B,D])=>{B!=="__name__"&&(B in M?D in M[B]?M[B][D]++:M[B][D]=1:M[B]={[D]:1})})}),Object.entries(M).forEach(([N,B])=>{_[N]=Object.keys(B).length,O[N]=Object.entries(B).sort(([,D],[,L])=>L-D).map(([D,L])=>({value:D,count:L}))}));const R=Object.entries(_).sort((N,B)=>h?B[1]-N[1]:0);return[x==null?void 0:x.data.length,R,O]},[x,h]);return w?a.jsxs(Mt,{color:"red",title:"Error querying series",icon:a.jsx(Ei,{}),children:[a.jsx("strong",{children:"Error:"})," ",w.message]}):a.jsxs(xn,{fz:"sm",children:[a.jsxs(xn,{style:{overflow:"auto"},children:[a.jsxs(ut,{align:"center",mt:"lg",wrap:"nowrap",children:[a.jsx(be,{w:70,fw:700,style:{flexShrink:0},children:"Selector:"}),a.jsx(Ql.Group,{children:a.jsx(Ql,{size:"md",className:j3.promqlPill,children:a.jsx("span",{style:{wordBreak:"break-word",whiteSpace:"pre"},children:zo(y,!1)})})}),a.jsxs(ut,{wrap:"nowrap",children:[a.jsx(Oi,{variant:"light",size:"xs",onClick:()=>e(cs(y)),leftSection:a.jsx(nH,{style:qg}),title:"Insert selector at cursor and close explorer",children:"Insert"}),a.jsx(hE,{value:cs(y),children:({copied:_,copy:O})=>a.jsx(Oi,{variant:"light",size:"xs",leftSection:_?a.jsx(cA,{style:qg}):a.jsx(NE,{style:qg}),onClick:O,title:"Copy selector to clipboard",children:"Copy"})})]})]}),a.jsxs(ut,{align:"center",children:[a.jsx(be,{w:70,fw:700,style:{flexShrink:0},children:"Filters:"}),s.length>0?a.jsx(Ql.Group,{children:s.map(_=>v(_))}):a.jsx(a.Fragment,{children:"No label filters"})]}),a.jsxs(ut,{style:{display:"flex",alignItems:"center",marginBottom:25},children:[a.jsx(be,{w:70,fw:700,style:{flexShrink:0},children:"Results:"}),a.jsx(a.Fragment,{children:S!==void 0?`${S} series`:"loading..."})]})]}),a.jsxs(ut,{justify:"space-between",children:[a.jsx(be,{children:a.jsx(Oi,{variant:"light",size:"xs",onClick:n,leftSection:a.jsx(Yre,{style:qg}),children:"Back to all metrics"})}),a.jsx(a0,{w:"fit-content",size:"xs",value:h?"cardinality":"alphabetic",onChange:_=>f(_==="cardinality"),data:[{label:"By cardinality",value:"cardinality"},{label:"Alphabetic",value:"alphabetic"}]})]}),A?a.jsx(be,{mt:"lg",children:Array.from(Array(10),(_,O)=>a.jsx(Qa,{height:40,mb:15,width:"100%"},O))}):a.jsxs(se,{fz:"sm",children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{children:"Label"}),a.jsx(se.Th,{children:"Values"})]})}),a.jsx(se.Tbody,{children:C.map(([_,O])=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{w:"50%",children:a.jsx("form",{onSubmit:M=>{M.preventDefault()},children:a.jsxs(ut,{justify:"space-between",align:"baseline",children:[a.jsx("span",{className:"promql-code promql-label-name",children:_}),s.some(M=>M.name===_)?v(s.find(M=>M.name===_)):(l==null?void 0:l.name)===_?a.jsxs(ut,{wrap:"nowrap",gap:"xs",children:[a.jsx(o0,{size:"xs",w:50,style:{width:"auto"},value:l.type,data:Object.values(go).map(M=>({value:M,label:M})),onChange:(M,R)=>u({...l,type:R.value})}),a.jsx(cE,{value:l.value,size:"xs",placeholder:"label value",onChange:M=>u({...l,value:M}),data:j[_].map(M=>M.value),autoFocus:!0}),a.jsx(Oi,{variant:"secondary",size:"xs",onClick:()=>m(),style:{flexShrink:0},children:"Apply"}),a.jsx(Oi,{variant:"light",w:40,size:"xs",onClick:()=>u(null),title:"Cancel",style:{flexShrink:0},children:a.jsx(yse,{style:{width:fe(18),height:fe(18)}})})]}):a.jsx(Oi,{variant:"light",size:"xs",mr:"xs",onClick:()=>u({name:_,type:go.equal,value:""}),children:"Filter..."})]})})}),a.jsxs(se.Td,{w:"50%",children:[a.jsxs(dt,{fw:700,fz:"sm",my:"xs",children:[O," value",O>1&&"s"]}),a.jsxs(Xn,{size:"sm",listStyleType:"none",children:[(r.includes(_)?j[_]:j[_].slice(0,5)).map(({value:M,count:R})=>a.jsxs(Xn.Item,{children:[a.jsxs("span",{className:`${j3.labelValue} promql-code promql-string`,onClick:()=>{o([...s.filter(N=>N.name!==_),{name:_,type:go.equal,value:M}]),u(null)},title:"Click to filter by value",children:['"',Ih(M),'"']})," ","(",R," series)"]},M)),r.includes(_)?a.jsx(Xn.Item,{my:"xs",children:a.jsx(Ur,{size:"sm",href:"#",onClick:M=>{M.preventDefault(),i(r.filter(R=>R!=_))},children:"Hide full values"})}):j[_].length>5&&a.jsx(Xn.Item,{my:"xs",children:a.jsxs(Ur,{size:"sm",href:"#",onClick:M=>{M.preventDefault(),i([...r,_])},children:["Show ",j[_].length-5," more values..."]})})]})]})]},_))})]})]})},Uxe="_typeLabel_u9odf_1",Wxe="_helpLabel_u9odf_5",vL={typeLabel:Uxe,helpLabel:Wxe};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Vk=function(t,e){return Vk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Vk(t,e)};function Vxe(t,e){Vk(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var rv=function(){return rv=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},rv.apply(this,arguments)};function Yxe(t,e,n,r){var i,s=!1,o=0;function l(){i&&clearTimeout(i)}function u(){l(),s=!0}typeof e!="boolean"&&(r=n,n=e,e=void 0);function h(){var f=this,p=Date.now()-o,m=arguments;if(s)return;function v(){o=Date.now(),n.apply(f,m)}function y(){i=void 0}r&&!i&&v(),l(),r===void 0&&p>t?v():e!==!0&&(i=setTimeout(r?y:v,r===void 0?t-p:t))}return h.cancel=u,h}var rm={Pixel:"Pixel",Percent:"Percent"},bL={unit:rm.Percent,value:.8};function yL(t){return typeof t=="number"?{unit:rm.Percent,value:t*100}:typeof t=="string"?t.match(/^(\d*(\.\d+)?)px$/)?{unit:rm.Pixel,value:parseFloat(t)}:t.match(/^(\d*(\.\d+)?)%$/)?{unit:rm.Percent,value:parseFloat(t)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),bL):(console.warn("scrollThreshold should be string or number"),bL)}var Gxe=function(t){Vxe(e,t);function e(n){var r=t.call(this,n)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:typeof r.props.scrollableTarget=="string"?document.getElementById(r.props.scrollableTarget):(r.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might
        happen because the element may not have been added to DOM yet.
        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
      `),null)},r.onStart=function(i){r.lastScrollTop||(r.dragging=!0,i instanceof MouseEvent?r.startY=i.pageY:i instanceof TouchEvent&&(r.startY=i.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(i){r.dragging&&(i instanceof MouseEvent?r.currentY=i.pageY:i instanceof TouchEvent&&(r.currentY=i.touches[0].pageY),!(r.currentY<r.startY)&&(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>r.maxPullDownDistance*1.5)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(i){typeof r.props.onScroll=="function"&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(i)},0);var s=r.props.height||r._scrollableNode?i.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!r.actionTriggered){var o=r.props.inverse?r.isElementAtTop(s,r.props.scrollThreshold):r.isElementAtBottom(s,r.props.scrollThreshold);o&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=s.scrollTop}},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},r.throttledOnScrollListener=Yxe(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return e.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
          Pull Down To Refresh functionality will not work
          as expected. Check README.md for usage'`)},e.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},e.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},e.getDerivedStateFromProps=function(n,r){var i=n.dataLength!==r.prevDataLength;return i?rv(rv({},r),{prevDataLength:n.dataLength}):null},e.prototype.isElementAtTop=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=yL(r);return s.unit===rm.Pixel?n.scrollTop<=s.value+i-n.scrollHeight+1:n.scrollTop<=s.value/100+i-n.scrollHeight+1},e.prototype.isElementAtBottom=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=yL(r);return s.unit===rm.Pixel?n.scrollTop+i>=n.scrollHeight-s.value:n.scrollTop+i>=s.value/100*n.scrollHeight},e.prototype.render=function(){var n=this,r=rv({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),i=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),s=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return Ln.createElement("div",{style:s,className:"infinite-scroll-component__outerdiv"},Ln.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(o){return n._infScroll=o},style:r},this.props.pullDownToRefresh&&Ln.createElement("div",{style:{position:"relative"},ref:function(o){return n._pullDown=o}},Ln.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!i&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},e}(E.Component);const Sg=50,qm=({allItems:t,child:e})=>{const[n,r]=E.useState(t.slice(0,50)),[i,s]=E.useState(Sg),[o,l]=E.useState(t.length>Sg),u=e;E.useEffect(()=>{r(t.slice(0,Sg)),l(t.length>Sg)},[t]);const h=()=>{if(n.length===t.length)l(!1);else{const f=i+Sg;s(f),r(t.slice(0,f))}};return a.jsx(Gxe,{next:h,hasMore:o,loader:a.jsx("h4",{children:"loading..."}),dataLength:n.length,height:n.length>25?"75vh":"",children:a.jsx(u,{items:n})})},Xxe=new YW({pre:'<b style="color: rgb(0, 102, 191)">',post:"</b>",shouldSort:!0}),Kxe={allowedTags:["b"],allowedAttributes:{b:["style"]}},Zxe=(t,e)=>Xxe.filter(t.replace(/ /g,""),e,{pre:'<b style="color: rgb(0, 102, 191)">',post:"</b>"}),Jxe=({metricNames:t,insertText:e,close:n})=>{const{data:r}=wi({path:"/metadata"}),[i,s]=E.useState(null),[o,l]=E.useState(""),[u]=ib(o,250),h=E.useMemo(()=>u===""?t.map(p=>({original:p,rendered:p})):Zxe(u,t),[u,t]),f=p=>r.data[p]??r.data[p.replace(/(_count|_sum|_bucket|_total)$/,"")]??[{help:"unknown",type:"unknown",unit:"unknown"}];return i!==null?a.jsx(Qxe,{metricName:i,insertText:p=>{e(p),n()},hideLabelsExplorer:()=>s(null)}):a.jsxs(xn,{children:[a.jsx(ic,{title:"Filter by text",placeholder:"Enter text to filter metric names by...",value:o,onChange:p=>l(p.target.value),autoFocus:!0}),a.jsx(qm,{allItems:h,child:({items:p})=>a.jsxs(se,{children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{children:"Metric"}),a.jsx(se.Th,{children:"Type"}),a.jsx(se.Th,{children:"Help"})]})}),a.jsx(se.Tbody,{children:p.map(m=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsxs(ut,{justify:"space-between",wrap:"nowrap",children:[u===""?m.original:a.jsx("div",{dangerouslySetInnerHTML:{__html:Rxe(m.rendered,Kxe)}}),a.jsxs(ut,{gap:"xs",children:[a.jsx(Er,{size:"sm",color:"gray",variant:"light",title:"Explore metric",onClick:()=>{s(m.original)},children:a.jsx(Ase,{style:{width:"70%",height:"70%"},stroke:1.5})}),a.jsx(Er,{size:"sm",color:"gray",variant:"light",title:"Insert at cursor and close explorer",onClick:()=>{e(m.original),n()},children:a.jsx(nH,{style:{width:"70%",height:"70%"},stroke:1.5})}),a.jsx(hE,{value:m.original,children:({copied:v,copy:y})=>a.jsx(Er,{size:"sm",color:"gray",variant:"light",title:"Copy to clipboard",onClick:y,children:v?a.jsx(cA,{style:{width:"70%",height:"70%"},stroke:1.5}):a.jsx(NE,{style:{width:"70%",height:"70%"},stroke:1.5})})})]})]})}),a.jsx(se.Td,{px:"lg",children:f(m.original).map((v,y)=>a.jsxs(Ln.Fragment,{children:[a.jsx("span",{className:vL.typeLabel,children:v.type}),a.jsx("br",{})]},y))}),a.jsx(se.Td,{children:f(m.original).map((v,y)=>a.jsxs(Ln.Fragment,{children:[a.jsx("span",{className:vL.helpLabel,children:v.help}),a.jsx("br",{})]},y))})]},m.original))})]})})]})};class eAe extends E.Component{constructor(){super(...arguments);Dr(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){console.error("Uncaught error:",n,r)}render(){return this.state.error!==null?a.jsxs(Mt,{color:"red",title:this.props.title||"Error querying page data",icon:a.jsx(Ei,{}),maw:500,mx:"auto",mt:"lg",children:[a.jsx("strong",{children:"Error:"})," ",this.state.error.message]}):this.props.children}}const Ef=t=>{const e=To();return a.jsx(eAe,{title:t.title,children:t.children},e.pathname)};class tAe{constructor(e,n){Dr(this,"complete");Dr(this,"queryHistory");this.complete=e,this.queryHistory=n}promQL(e){return Promise.resolve(this.complete.promQL(e)).then(n=>{const{state:r,pos:i}=e,s=Di(r).resolve(i,-1),o=n!=null?n.from:s.from;if(o!==0)return n;const l={from:o,to:i,options:this.queryHistory.map(u=>({label:u.length<80?u:u.slice(0,76).concat("..."),detail:"past query",apply:u,info:u.length<80?void 0:u})),validFor:/^[a-zA-Z0-9_:]+$/};return n!==null&&(l.options=l.options.concat(n.options)),l})}}const xL=new $U,nAe=({initialExpr:t,metricNames:e,executeQuery:n,duplicatePanel:r,removePanel:i,treeShown:s,setShowTree:o})=>{const l=xw(),{queryHistory:u}=ac(M=>M.queryPage),{pathPrefix:h,enableAutocomplete:f,enableSyntaxHighlighting:p,enableLinter:m,enableQueryHistory:v}=hi(),[y,x]=E.useState(t);E.useEffect(()=>{x(t)},[t]);const{data:w,error:A,isFetching:S,refetch:C}=Vh({path:"/format_query",params:{query:y},enabled:!1});E.useEffect(()=>{if(A){ol.show({color:"red",title:"Error formatting query",message:A.message});return}w&&(x(w.data),ol.show({title:"Expression formatted",message:"Expression formatted successfully!"}))},[w,A]);const j=E.useRef(null),[_,O]=E.useState(!1);return E.useEffect(()=>{xL.activateCompletion(f).activateLinter(m).setComplete({completeStrategy:new tAe(Rk({remote:{url:h,cache:{initialMetricList:e}}}),v?u:[])})},[h,e,f,m,v,u]),a.jsxs(ut,{align:"flex-start",wrap:"nowrap",gap:"xs",children:[a.jsx(Ds,{leftSection:S?a.jsx(yo,{size:"xs",color:"gray.5"}):a.jsx(dse,{}),rightSection:a.jsxs(mr,{shadow:"md",width:200,children:[a.jsx(mr.Target,{children:a.jsx(Er,{size:"lg",variant:"transparent",color:"gray","aria-label":"Show query options",children:a.jsx(Tie,{style:Hf})})}),a.jsxs(mr.Dropdown,{children:[a.jsx(mr.Label,{children:"Query options"}),a.jsx(mr.Item,{leftSection:a.jsx(id,{style:wg}),onClick:()=>O(!0),children:"Explore metrics"}),a.jsx(mr.Item,{leftSection:a.jsx(Ure,{style:wg}),onClick:()=>C(),disabled:S||y===""||y===(w==null?void 0:w.data),children:"Format expression"}),a.jsxs(mr.Item,{leftSection:a.jsx(Jre,{style:wg}),onClick:()=>o(!s),children:[s?"Hide":"Show"," tree view"]}),a.jsx(mr.Item,{leftSection:a.jsx(NE,{style:wg}),onClick:()=>r(y),children:"Duplicate query"}),a.jsx(mr.Item,{color:"red",leftSection:a.jsx(sT,{style:wg}),onClick:i,children:"Remove query"})]})]}),component:r4,className:M1e.input,basicSetup:!1,value:y,onChange:x,autoFocus:!0,ref:j,extensions:[BW,UQ(),VU(),vn.allowMultipleSelections.of(!0),tU(),fU(),xU(),CU(),OW(),ot.lineWrapping,Dh.of([...SU,...CW,...KU,...U6,...PU]),WQ("Enter expression (press Shift+Enter for newlines)"),p?X2(l==="light"?PW:FW):[],xL.asExtension(),l==="light"?LW:O1e,Dh.of([{key:"Escape",run:M=>(M.contentDOM.blur(),!1)}]),gu.highest(Dh.of([{key:"Enter",run:()=>(n(y),!0)},{key:"Shift-Enter",run:AW}]))],multiline:!0}),a.jsx(Oi,{variant:"primary",onClick:()=>n(y),style:{flexShrink:0},children:"Execute"}),a.jsx(Ua,{size:"95%",opened:_,onClose:()=>O(!1),title:"Explore metrics",children:a.jsx(Ef,{title:"Error showing metrics",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(20),(M,R)=>a.jsx(Qa,{height:30,mb:15,width:"100%"},R))}),children:a.jsx(Jxe,{metricNames:e,insertText:M=>{if(j.current&&j.current.view){const R=j.current.view;R.dispatch(R.state.update({changes:{from:R.state.selection.ranges[0].from,to:R.state.selection.ranges[0].to,insert:M}}))}},close:()=>O(!1)})})},location.pathname)})]})},rAe="_chartWrapper_apsqz_1",iAe="_uplotChart_apsqz_7",uV={chartWrapper:rAe,uplotChart:iAe};var Wx={exports:{}};const sAe=!0,Ii="u-",aAe="uplot",oAe=Ii+"hz",lAe=Ii+"vt",cAe=Ii+"title",uAe=Ii+"wrap",hAe=Ii+"under",dAe=Ii+"over",fAe=Ii+"axis",Ud=Ii+"off",pAe=Ii+"select",mAe=Ii+"cursor-x",gAe=Ii+"cursor-y",vAe=Ii+"cursor-pt",bAe=Ii+"legend",yAe=Ii+"live",xAe=Ii+"inline",AAe=Ii+"series",wAe=Ii+"marker",AL=Ii+"label",SAe=Ii+"value",$g="width",Qg="height",jg="top",wL="bottom",jp="left",C3="right",f4="#000",SL=f4+"0",_3="mousemove",jL="mousedown",T3="mouseup",CL="mouseenter",_L="mouseleave",TL="dblclick",jAe="resize",CAe="scroll",kL="change",cw="dppxchange",p4="--",m0=typeof window<"u",Yk=m0?document:null,im=m0?window:null,_Ae=m0?navigator:null;let Bn,sx;function Gk(){let t=devicePixelRatio;Bn!=t&&(Bn=t,sx&&Kk(kL,sx,Gk),sx=matchMedia(`(min-resolution: ${Bn-.001}dppx) and (max-resolution: ${Bn+.001}dppx)`),xf(kL,sx,Gk),im.dispatchEvent(new CustomEvent(cw)))}function Oa(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Xk(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Cr(t,e,n){t.style[e]=n+"px"}function Fo(t,e,n,r){let i=Yk.createElement(t);return e!=null&&Oa(i,e),n!=null&&n.insertBefore(i,r),i}function ao(t,e){return Fo("div",t,e)}const OL=new WeakMap;function Rl(t,e,n,r,i){let s="translate("+e+"px,"+n+"px)",o=OL.get(t);s!=o&&(t.style.transform=s,OL.set(t,s),e<0||n<0||e>r||n>i?Oa(t,Ud):Xk(t,Ud))}const EL=new WeakMap;function ML(t,e,n){let r=e+n,i=EL.get(t);r!=i&&(EL.set(t,r),t.style.background=e,t.style.borderColor=n)}const RL=new WeakMap;function DL(t,e,n,r){let i=e+""+n,s=RL.get(t);i!=s&&(RL.set(t,i),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const m4={passive:!0},TAe={...m4,capture:!0};function xf(t,e,n,r){e.addEventListener(t,n,r?TAe:m4)}function Kk(t,e,n,r){e.removeEventListener(t,n,m4)}m0&&Gk();function Xo(t,e,n,r){let i;n=n||0,r=r||e.length-1;let s=r<=2147483647;for(;r-n>1;)i=s?n+r>>1:$a((n+r)/2),e[i]<t?n=i:r=i;return t-e[n]<=e[r]-t?n:r}function hV(t){return(n,r,i)=>{let s=-1,o=-1;for(let l=r;l<=i;l++)if(t(n[l])){s=l;break}for(let l=i;l>=r;l--)if(t(n[l])){o=l;break}return[s,o]}}const dV=t=>t!=null,fV=t=>t!=null&&t>0,lS=hV(dV),kAe=hV(fV);function OAe(t,e,n,r=0,i=!1){let s=i?kAe:lS,o=i?fV:dV;[e,n]=s(t,e,n);let l=t[e],u=t[e];if(e>-1)if(r==1)l=t[e],u=t[n];else if(r==-1)l=t[n],u=t[e];else for(let h=e;h<=n;h++){let f=t[h];o(f)&&(f<l?l=f:f>u&&(u=f))}return[l??ar,u??-ar]}function cS(t,e,n,r){let i=BL(t),s=BL(e);t==e&&(i==-1?(t*=n,e/=n):(t/=n,e*=n));let o=n==10?tu:pV,l=i==1?$a:uo,u=s==1?uo:$a,h=l(o(Ti(t))),f=u(o(Ti(e))),p=$m(n,h),m=$m(n,f);return n==10&&(h<0&&(p=or(p,-h)),f<0&&(m=or(m,-f))),r||n==2?(t=p*i,e=m*s):(t=bV(t,p),e=uS(e,m)),[t,e]}function g4(t,e,n,r){let i=cS(t,e,n,r);return t==0&&(i[0]=0),e==0&&(i[1]=0),i}const v4=.1,NL={mode:3,pad:v4},iv={pad:0,soft:null,mode:0},EAe={min:iv,max:iv};function uw(t,e,n,r){return hS(n)?IL(t,e,n):(iv.pad=n,iv.soft=r?0:null,iv.mode=r?3:0,IL(t,e,EAe))}function Mn(t,e){return t??e}function MAe(t,e,n){for(e=Mn(e,0),n=Mn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function IL(t,e,n){let r=n.min,i=n.max,s=Mn(r.pad,0),o=Mn(i.pad,0),l=Mn(r.hard,-ar),u=Mn(i.hard,ar),h=Mn(r.soft,ar),f=Mn(i.soft,-ar),p=Mn(r.mode,0),m=Mn(i.mode,0),v=e-t,y=tu(v),x=Us(Ti(t),Ti(e)),w=tu(x),A=Ti(w-y);(v<1e-24||A>10)&&(v=0,(t==0||e==0)&&(v=1e-24,p==2&&h!=ar&&(s=0),m==2&&f!=-ar&&(o=0)));let S=v||x||1e3,C=tu(S),j=$m(10,$a(C)),_=S*(v==0?t==0?.1:1:s),O=or(bV(t-_,j/10),24),M=t>=h&&(p==1||p==3&&O<=h||p==2&&O>=h)?h:ar,R=Us(l,O<M&&t>=M?M:el(M,O)),N=S*(v==0?e==0?.1:1:o),B=or(uS(e+N,j/10),24),D=e<=f&&(m==1||m==3&&B>=f||m==2&&B<=f)?f:-ar,L=el(u,B>D&&e<=D?D:Us(D,B));return R==L&&R==0&&(L=100),[R,L]}const RAe=new Intl.NumberFormat(m0?_Ae.language:"en-US"),b4=t=>RAe.format(t),Wa=Math,Vx=Wa.PI,Ti=Wa.abs,$a=Wa.floor,_i=Wa.round,uo=Wa.ceil,el=Wa.min,Us=Wa.max,$m=Wa.pow,BL=Wa.sign,tu=Wa.log10,pV=Wa.log2,DAe=(t,e=1)=>Wa.sinh(t)*e,k3=(t,e=1)=>Wa.asinh(t/e),ar=1/0;function LL(t){return(tu((t^t>>31)-(t>>31))|0)+1}function Zk(t,e,n){return el(Us(t,e),n)}function mV(t){return typeof t=="function"}function gn(t){return mV(t)?t:()=>t}const NAe=()=>{},gV=t=>t,vV=(t,e)=>e,IAe=t=>null,PL=t=>!0,FL=(t,e)=>t==e,BAe=/\.\d*?(?=9{6,}|0{6,})/gm,Mf=t=>{if(xV(t)||Xh.has(t))return t;const e=`${t}`,n=e.match(BAe);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[i,s]=e.split("e");return+`${Mf(i)}e${s}`}return or(t,r)};function Fd(t,e){return Mf(or(Mf(t/e))*e)}function uS(t,e){return Mf(uo(Mf(t/e))*e)}function bV(t,e){return Mf($a(Mf(t/e))*e)}function or(t,e=0){if(xV(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return _i(r)/n}const Xh=new Map;function yV(t){return((""+t).split(".")[1]||"").length}function Vv(t,e,n,r){let i=[],s=r.map(yV);for(let o=e;o<n;o++){let l=Ti(o),u=or($m(t,o),l);for(let h=0;h<r.length;h++){let f=t==10?+`${r[h]}e${o}`:r[h]*u,p=(o>=0?0:l)+(o>=s[h]?0:s[h]),m=t==10?f:or(f,p);i.push(m),Xh.set(m,p)}}return i}const sv={},y4=[],Qm=[null,null],hh=Array.isArray,xV=Number.isInteger,LAe=t=>t===void 0;function zL(t){return typeof t=="string"}function hS(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function PAe(t){return t!=null&&typeof t=="object"}const FAe=Object.getPrototypeOf(Uint8Array),AV="__proto__";function Um(t,e=hS){let n;if(hh(t)){let r=t.find(i=>i!=null);if(hh(r)||e(r)){n=Array(t.length);for(let i=0;i<t.length;i++)n[i]=Um(t[i],e)}else n=t.slice()}else if(t instanceof FAe)n=t.slice();else if(e(t)){n={};for(let r in t)r!=AV&&(n[r]=Um(t[r],e))}else n=t;return n}function xi(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let i in r)i!=AV&&(hS(t[i])?xi(t[i],Um(r[i])):t[i]=Um(r[i]))}return t}const zAe=0,HAe=1,qAe=2;function $Ae(t,e,n){for(let r=0,i,s=-1;r<e.length;r++){let o=e[r];if(o>s){for(i=o-1;i>=0&&t[i]==null;)t[i--]=null;for(i=o+1;i<n&&t[i]==null;)t[s=i++]=null}}}function QAe(t,e){if(VAe(t)){let o=t[0].slice();for(let l=1;l<t.length;l++)o.push(...t[l].slice(1));return YAe(o[0])||(o=WAe(o)),o}let n=new Set;for(let o=0;o<t.length;o++){let u=t[o][0],h=u.length;for(let f=0;f<h;f++)n.add(u[f])}let r=[Array.from(n).sort((o,l)=>o-l)],i=r[0].length,s=new Map;for(let o=0;o<i;o++)s.set(r[0][o],o);for(let o=0;o<t.length;o++){let l=t[o],u=l[0];for(let h=1;h<l.length;h++){let f=l[h],p=Array(i).fill(void 0),m=e?e[o][h]:HAe,v=[];for(let y=0;y<f.length;y++){let x=f[y],w=s.get(u[y]);x===null?m!=zAe&&(p[w]=x,m==qAe&&v.push(w)):p[w]=x}$Ae(p,v,i),r.push(p)}}return r}const UAe=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function WAe(t){let e=t[0],n=e.length,r=Array(n);for(let s=0;s<r.length;s++)r[s]=s;r.sort((s,o)=>e[s]-e[o]);let i=[];for(let s=0;s<t.length;s++){let o=t[s],l=Array(n);for(let u=0;u<n;u++)l[u]=o[r[u]];i.push(l)}return i}function VAe(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let i=t[r][0];if(i.length!=n)return!1;if(i!=e){for(let s=0;s<n;s++)if(i[s]!=e[s])return!1}}return!0}function YAe(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,i=n-1;for(;r<=i&&t[r]==null;)r++;for(;i>=r&&t[i]==null;)i--;if(i<=r)return!0;const s=Us(1,$a((i-r+1)/e));for(let o=t[r],l=r+s;l<=i;l+=s){const u=t[l];if(u!=null){if(u<=o)return!1;o=u}}return!0}const wV=["January","February","March","April","May","June","July","August","September","October","November","December"],SV=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function jV(t){return t.slice(0,3)}const GAe=SV.map(jV),XAe=wV.map(jV),KAe={MMMM:wV,MMM:XAe,WWWW:SV,WWW:GAe};function Cg(t){return(t<10?"0":"")+t}function ZAe(t){return(t<10?"00":t<100?"0":"")+t}const JAe={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Cg(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Cg(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Cg(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Cg(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Cg(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>ZAe(t.getMilliseconds())};function x4(t,e){e=e||KAe;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,i;for(;i=r.exec(t);)n.push(i[0][0]=="{"?JAe[i[1]]:i[0]);return s=>{let o="";for(let l=0;l<n.length;l++)o+=typeof n[l]=="string"?n[l]:n[l](s,e);return o}}const ewe=new Intl.DateTimeFormat().resolvedOptions().timeZone;function twe(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==ewe?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const CV=t=>t%1==0,hw=[1,2,2.5,5],nwe=Vv(10,-32,0,hw),_V=Vv(10,0,32,hw),rwe=_V.filter(CV),zd=nwe.concat(_V),A4=`
`,TV="{YYYY}",HL=A4+TV,kV="{M}/{D}",Ug=A4+kV,ax=Ug+"/{YY}",OV="{aa}",iwe="{h}:{mm}",Dp=iwe+OV,qL=A4+Dp,$L=":{ss}",zn=null;function EV(t){let e=t*1e3,n=e*60,r=n*60,i=r*24,s=i*30,o=i*365,u=(t==1?Vv(10,0,3,hw).filter(CV):Vv(10,-3,0,hw)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,i,i*2,i*3,i*4,i*5,i*6,i*7,i*8,i*9,i*10,i*15,s,s*2,s*3,s*4,s*6,o,o*2,o*5,o*10,o*25,o*50,o*100]);const h=[[o,TV,zn,zn,zn,zn,zn,zn,1],[i*28,"{MMM}",HL,zn,zn,zn,zn,zn,1],[i,kV,HL,zn,zn,zn,zn,zn,1],[r,"{h}"+OV,ax,zn,Ug,zn,zn,zn,1],[n,Dp,ax,zn,Ug,zn,zn,zn,1],[e,$L,ax+" "+Dp,zn,Ug+" "+Dp,zn,qL,zn,1],[t,$L+".{fff}",ax+" "+Dp,zn,Ug+" "+Dp,zn,qL,zn,1]];function f(p){return(m,v,y,x,w,A)=>{let S=[],C=w>=o,j=w>=s&&w<o,_=p(y),O=or(_*t,3),M=O3(_.getFullYear(),C?0:_.getMonth(),j||C?1:_.getDate()),R=or(M*t,3);if(j||C){let N=j?w/s:0,B=C?w/o:0,D=O==R?O:or(O3(M.getFullYear()+B,M.getMonth()+N,1)*t,3),L=new Date(_i(D/t)),U=L.getFullYear(),H=L.getMonth();for(let z=0;D<=x;z++){let I=O3(U+B*z,H+N*z,1),F=I-p(or(I*t,3));D=or((+I+F)*t,3),D<=x&&S.push(D)}}else{let N=w>=i?i:w,B=$a(y)-$a(O),D=R+B+uS(O-R,N);S.push(D);let L=p(D),U=L.getHours()+L.getMinutes()/n+L.getSeconds()/r,H=w/r,z=m.axes[v]._space,I=A/z;for(;D=or(D+w,t==1?0:3),!(D>x);)if(H>1){let F=$a(or(U+H,6))%24,Y=p(D).getHours()-F;Y>1&&(Y=-1),D-=Y*r,U=(U+H)%24;let W=S[S.length-1];or((D-W)/w,3)*I>=.7&&S.push(D)}else S.push(D)}return S}}return[u,h,f]}const[swe,awe,owe]=EV(1),[lwe,cwe,uwe]=EV(.001);Vv(2,-53,53,[1]);function QL(t,e){return t.map(n=>n.map((r,i)=>i==0||i==8||r==null?r:e(i==1||n[8]==0?r:n[1]+r)))}function UL(t,e){return(n,r,i,s,o)=>{let l=e.find(y=>o>=y[0])||e[e.length-1],u,h,f,p,m,v;return r.map(y=>{let x=t(y),w=x.getFullYear(),A=x.getMonth(),S=x.getDate(),C=x.getHours(),j=x.getMinutes(),_=x.getSeconds(),O=w!=u&&l[2]||A!=h&&l[3]||S!=f&&l[4]||C!=p&&l[5]||j!=m&&l[6]||_!=v&&l[7]||l[1];return u=w,h=A,f=S,p=C,m=j,v=_,O(x)})}}function hwe(t,e){let n=x4(e);return(r,i,s,o,l)=>i.map(u=>n(t(u)))}function O3(t,e,n){return new Date(t,e,n)}function WL(t,e){return e(t)}const dwe="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function VL(t,e){return(n,r,i,s)=>s==null?p4:e(t(r))}function fwe(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function pwe(t,e){return t.series[e].fill(t,e)}const mwe={show:!0,live:!0,isolate:!1,mount:NAe,markers:{show:!0,width:2,stroke:fwe,fill:pwe,dash:"solid"},idx:null,idxs:null,values:[]};function gwe(t,e){let n=t.cursor.points,r=ao(),i=n.size(t,e);Cr(r,$g,i),Cr(r,Qg,i);let s=i/-2;Cr(r,"marginLeft",s),Cr(r,"marginTop",s);let o=n.width(t,e,i);return o&&Cr(r,"borderWidth",o),r}function vwe(t,e){let n=t.series[e].points;return n._fill||n._stroke}function bwe(t,e){let n=t.series[e].points;return n._stroke||n._fill}function ywe(t,e){return t.series[e].points.size}const E3=[0,0];function xwe(t,e,n){return E3[0]=e,E3[1]=n,E3}function ox(t,e,n,r=!0){return i=>{i.button==0&&(!r||i.target==e)&&n(i)}}function M3(t,e,n,r=!0){return i=>{(!r||i.target==e)&&n(i)}}const Awe={show:!0,x:!0,y:!0,lock:!1,move:xwe,points:{one:!1,show:gwe,size:ywe,width:0,stroke:bwe,fill:vwe},bind:{mousedown:ox,mouseup:ox,click:ox,dblclick:ox,mousemove:M3,mouseleave:M3,mouseenter:M3},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,i)=>r-i,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},MV={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},w4=xi({},MV,{filter:vV}),RV=xi({},w4,{size:10}),DV=xi({},MV,{show:!1}),S4='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',NV="bold "+S4,IV=1.5,YL={show:!0,scale:"x",stroke:f4,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:NV,side:2,grid:w4,ticks:RV,border:DV,font:S4,lineGap:IV,rotate:0},wwe="Value",Swe="Time",GL={show:!0,scale:"x",auto:!1,sorted:1,min:ar,max:-ar,idxs:[]};function jwe(t,e,n,r,i){return e.map(s=>s==null?"":b4(s))}function Cwe(t,e,n,r,i,s,o){let l=[],u=Xh.get(i)||0;n=o?n:or(uS(n,i),u);for(let h=n;h<=r;h=or(h+i,u))l.push(Object.is(h,-0)?0:h);return l}function Jk(t,e,n,r,i,s,o){const l=[],u=t.scales[t.axes[e].scale].log,h=u==10?tu:pV,f=$a(h(n));i=$m(u,f),u==10&&(i=zd[Xo(i,zd)]);let p=n,m=i*u;u==10&&(m=zd[Xo(m,zd)]);do l.push(p),p=p+i,u==10&&!Xh.has(p)&&(p=or(p,Xh.get(i))),p>=m&&(i=p,m=i*u,u==10&&(m=zd[Xo(m,zd)]));while(p<=r);return l}function _we(t,e,n,r,i,s,o){let u=t.scales[t.axes[e].scale].asinh,h=r>u?Jk(t,e,Us(u,n),r,i):[u],f=r>=0&&n<=0?[0]:[];return(n<-u?Jk(t,e,Us(u,-r),-n,i):[u]).reverse().map(m=>-m).concat(f,h)}const BV=/./,Twe=/[12357]/,kwe=/[125]/,XL=/1/,eO=(t,e,n,r)=>t.map((i,s)=>e==4&&i==0||s%r==0&&n.test(i.toExponential()[i<0?1:0])?i:null);function Owe(t,e,n,r,i){let s=t.axes[n],o=s.scale,l=t.scales[o],u=t.valToPos,h=s._space,f=u(10,o),p=u(9,o)-f>=h?BV:u(7,o)-f>=h?Twe:u(5,o)-f>=h?kwe:XL;if(p==XL){let m=Ti(u(1,o)-f);if(m<h)return eO(e.slice().reverse(),l.distr,p,uo(h/m)).reverse()}return eO(e,l.distr,p,1)}function Ewe(t,e,n,r,i){let s=t.axes[n],o=s.scale,l=s._space,u=t.valToPos,h=Ti(u(1,o)-u(2,o));return h<l?eO(e.slice().reverse(),3,BV,uo(l/h)).reverse():e}function Mwe(t,e,n,r){return r==null?p4:e==null?"":b4(e)}const KL={show:!0,scale:"y",stroke:f4,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:NV,side:3,grid:w4,ticks:RV,border:DV,font:S4,lineGap:IV,rotate:0};function Rwe(t,e){let n=3+(t||1)*2;return or(n*e,3)}function Dwe(t,e){let{scale:n,idxs:r}=t.series[0],i=t._data[0],s=t.valToPos(i[r[0]],n,!0),o=t.valToPos(i[r[1]],n,!0),l=Ti(o-s),u=t.series[e],h=l/(u.points.space*Bn);return r[1]-r[0]<=h}const ZL={scale:null,auto:!0,sorted:0,min:ar,max:-ar},LV=(t,e,n,r,i)=>i,JL={show:!0,auto:!0,sorted:0,gaps:LV,alpha:1,facets:[xi({},ZL,{scale:"x"}),xi({},ZL,{scale:"y"})]},e9={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:LV,alpha:1,points:{show:Dwe,filter:null},values:null,min:ar,max:-ar,idxs:[],path:null,clip:null};function Nwe(t,e,n,r,i){return n/10}const PV={time:sAe,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Iwe=xi({},PV,{time:!1,ori:1}),t9={};function FV(t,e){let n=t9[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(i=>i!=r)},pub(r,i,s,o,l,u,h){for(let f=0;f<n.plots.length;f++)n.plots[f]!=i&&n.plots[f].pub(r,i,s,o,l,u,h)}},t!=null&&(t9[t]=n)),n}const Wm=1,tO=2;function qf(t,e,n){const r=t.mode,i=t.series[e],s=r==2?t._data[e]:t._data,o=t.scales,l=t.bbox;let u=s[0],h=r==2?s[1]:s[e],f=r==2?o[i.facets[0].scale]:o[t.series[0].scale],p=r==2?o[i.facets[1].scale]:o[i.scale],m=l.left,v=l.top,y=l.width,x=l.height,w=t.valToPosH,A=t.valToPosV;return f.ori==0?n(i,u,h,f,p,w,A,m,v,y,x,fS,g0,mS,HV,$V):n(i,u,h,f,p,A,w,v,m,x,y,pS,v0,_4,qV,QV)}function j4(t,e){let n=0,r=0,i=Mn(t.bands,y4);for(let s=0;s<i.length;s++){let o=i[s];o.series[0]==e?n=o.dir:o.series[1]==e&&(o.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function Bwe(t,e,n,r,i){let s=t.mode,o=t.series[e],l=s==2?o.facets[1].scale:o.scale,u=t.scales[l];return i==-1?u.min:i==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function nu(t,e,n,r,i,s){return qf(t,e,(o,l,u,h,f,p,m,v,y,x,w)=>{let A=o.pxRound;const S=h.dir*(h.ori==0?1:-1),C=h.ori==0?g0:v0;let j,_;S==1?(j=n,_=r):(j=r,_=n);let O=A(p(l[j],h,x,v)),M=A(m(u[j],f,w,y)),R=A(p(l[_],h,x,v)),N=A(m(s==1?f.max:f.min,f,w,y)),B=new Path2D(i);return C(B,R,N),C(B,O,N),C(B,O,M),B})}function dS(t,e,n,r,i,s){let o=null;if(t.length>0){o=new Path2D;const l=e==0?mS:_4;let u=n;for(let p=0;p<t.length;p++){let m=t[p];if(m[1]>m[0]){let v=m[0]-u;v>0&&l(o,u,r,v,r+s),u=m[1]}}let h=n+i-u,f=10;h>0&&l(o,u,r-f/2,h,r+s+f)}return o}function Lwe(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function C4(t,e,n,r,i,s,o){let l=[],u=t.length;for(let h=i==1?n:r;h>=n&&h<=r;h+=i)if(e[h]===null){let p=h,m=h;if(i==1)for(;++h<=r&&e[h]===null;)m=h;else for(;--h>=n&&e[h]===null;)m=h;let v=s(t[p]),y=m==p?v:s(t[m]),x=p-i;v=o<=0&&x>=0&&x<u?s(t[x]):v;let A=m+i;y=o>=0&&A>=0&&A<u?s(t[A]):y,y>=v&&l.push([v,y])}return l}function n9(t){return t==0?gV:t==1?_i:e=>Fd(e,t)}function zV(t){let e=t==0?fS:pS,n=t==0?(i,s,o,l,u,h)=>{i.arcTo(s,o,l,u,h)}:(i,s,o,l,u,h)=>{i.arcTo(o,s,u,l,h)},r=t==0?(i,s,o,l,u)=>{i.rect(s,o,l,u)}:(i,s,o,l,u)=>{i.rect(o,s,u,l)};return(i,s,o,l,u,h=0,f=0)=>{h==0&&f==0?r(i,s,o,l,u):(h=el(h,l/2,u/2),f=el(f,l/2,u/2),e(i,s+h,o),n(i,s+l,o,s+l,o+u,h),n(i,s+l,o+u,s,o+u,f),n(i,s,o+u,s,o,f),n(i,s,o,s+l,o,h),i.closePath())}}const fS=(t,e,n)=>{t.moveTo(e,n)},pS=(t,e,n)=>{t.moveTo(n,e)},g0=(t,e,n)=>{t.lineTo(e,n)},v0=(t,e,n)=>{t.lineTo(n,e)},mS=zV(0),_4=zV(1),HV=(t,e,n,r,i,s)=>{t.arc(e,n,r,i,s)},qV=(t,e,n,r,i,s)=>{t.arc(n,e,r,i,s)},$V=(t,e,n,r,i,s,o)=>{t.bezierCurveTo(e,n,r,i,s,o)},QV=(t,e,n,r,i,s,o)=>{t.bezierCurveTo(n,e,i,r,o,s)};function UV(t){return(e,n,r,i,s)=>qf(e,n,(o,l,u,h,f,p,m,v,y,x,w)=>{let{pxRound:A,points:S}=o,C,j;h.ori==0?(C=fS,j=HV):(C=pS,j=qV);const _=or(S.width*Bn,3);let O=(S.size-S.width)/2*Bn,M=or(O*2,3),R=new Path2D,N=new Path2D,{left:B,top:D,width:L,height:U}=e.bbox;mS(N,B-M,D-M,L+M*2,U+M*2);const H=z=>{if(u[z]!=null){let I=A(p(l[z],h,x,v)),F=A(m(u[z],f,w,y));C(R,I+O,F),j(R,I,F,O,0,Vx*2)}};if(s)s.forEach(H);else for(let z=r;z<=i;z++)H(z);return{stroke:_>0?R:null,fill:R,clip:N,flags:Wm|tO}})}function WV(t){return(e,n,r,i,s,o)=>{r!=i&&(s!=r&&o!=r&&t(e,n,r),s!=i&&o!=i&&t(e,n,i),t(e,n,o))}}const Pwe=WV(g0),Fwe=WV(v0);function VV(t){const e=Mn(t==null?void 0:t.alignGaps,0);return(n,r,i,s)=>qf(n,r,(o,l,u,h,f,p,m,v,y,x,w)=>{[i,s]=lS(u,i,s);let A=o.pxRound,S=U=>A(p(U,h,x,v)),C=U=>A(m(U,f,w,y)),j,_;h.ori==0?(j=g0,_=Pwe):(j=v0,_=Fwe);const O=h.dir*(h.ori==0?1:-1),M={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Wm},R=M.stroke;let N=!1;if(s-i>=x*4){let U=X=>n.posToVal(X,h.key,!0),H=null,z=null,I,F,$,G=S(l[O==1?i:s]),Y=S(l[i]),W=S(l[s]),V=U(O==1?Y+1:W-1);for(let X=O==1?i:s;X>=i&&X<=s;X+=O){let ee=l[X],ve=(O==1?ee<V:ee>V)?G:S(ee),me=u[X];ve==G?me!=null?(F=me,H==null?(j(R,ve,C(F)),I=H=z=F):F<H?H=F:F>z&&(z=F)):me===null&&(N=!0):(H!=null&&_(R,G,C(H),C(z),C(I),C(F)),me!=null?(F=me,j(R,ve,C(F)),H=z=I=F):(H=z=null,me===null&&(N=!0)),G=ve,V=U(G+O))}H!=null&&H!=z&&$!=G&&_(R,G,C(H),C(z),C(I),C(F))}else for(let U=O==1?i:s;U>=i&&U<=s;U+=O){let H=u[U];H===null?N=!0:H!=null&&j(R,S(l[U]),C(H))}let[D,L]=j4(n,r);if(o.fill!=null||D!=0){let U=M.fill=new Path2D(R),H=o.fillTo(n,r,o.min,o.max,D),z=C(H),I=S(l[i]),F=S(l[s]);O==-1&&([F,I]=[I,F]),j(U,F,z),j(U,I,z)}if(!o.spanGaps){let U=[];N&&U.push(...C4(l,u,i,s,O,S,e)),M.gaps=U=o.gaps(n,r,i,s,U),M.clip=dS(U,h.ori,v,y,x,w)}return L!=0&&(M.band=L==2?[nu(n,r,i,s,R,-1),nu(n,r,i,s,R,1)]:nu(n,r,i,s,R,L)),M})}function zwe(t){const e=Mn(t.align,1),n=Mn(t.ascDesc,!1),r=Mn(t.alignGaps,0),i=Mn(t.extend,!1);return(s,o,l,u)=>qf(s,o,(h,f,p,m,v,y,x,w,A,S,C)=>{[l,u]=lS(p,l,u);let j=h.pxRound,{left:_,width:O}=s.bbox,M=Y=>j(y(Y,m,S,w)),R=Y=>j(x(Y,v,C,A)),N=m.ori==0?g0:v0;const B={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Wm},D=B.stroke,L=m.dir*(m.ori==0?1:-1);let U=R(p[L==1?l:u]),H=M(f[L==1?l:u]),z=H,I=H;i&&e==-1&&(I=_,N(D,I,U)),N(D,H,U);for(let Y=L==1?l:u;Y>=l&&Y<=u;Y+=L){let W=p[Y];if(W==null)continue;let V=M(f[Y]),X=R(W);e==1?N(D,V,U):N(D,z,X),N(D,V,X),U=X,z=V}let F=z;i&&e==1&&(F=_+O,N(D,F,U));let[$,G]=j4(s,o);if(h.fill!=null||$!=0){let Y=B.fill=new Path2D(D),W=h.fillTo(s,o,h.min,h.max,$),V=R(W);N(Y,F,V),N(Y,I,V)}if(!h.spanGaps){let Y=[];Y.push(...C4(f,p,l,u,L,M,r));let W=h.width*Bn/2,V=n||e==1?W:-W,X=n||e==-1?-W:W;Y.forEach(ee=>{ee[0]+=V,ee[1]+=X}),B.gaps=Y=h.gaps(s,o,l,u,Y),B.clip=dS(Y,m.ori,w,A,S,C)}return G!=0&&(B.band=G==2?[nu(s,o,l,u,D,-1),nu(s,o,l,u,D,1)]:nu(s,o,l,u,D,G)),B})}function r9(t,e,n,r,i,s,o=ar){if(t.length>1){let l=null;for(let u=0,h=1/0;u<t.length;u++)if(e[u]!==void 0){if(l!=null){let f=Ti(t[u]-t[l]);f<h&&(h=f,o=Ti(n(t[u],r,i,s)-n(t[l],r,i,s)))}l=u}}return o}function Hwe(t){t=t||sv;const e=Mn(t.size,[.6,ar,1]),n=t.align||0,r=t.gap||0;let i=t.radius;i=i==null?[0,0]:typeof i=="number"?[i,0]:i;const s=gn(i),o=1-e[0],l=Mn(e[1],ar),u=Mn(e[2],1),h=Mn(t.disp,sv),f=Mn(t.each,v=>{}),{fill:p,stroke:m}=h;return(v,y,x,w)=>qf(v,y,(A,S,C,j,_,O,M,R,N,B,D)=>{let L=A.pxRound,U=n,H=r*Bn,z=l*Bn,I=u*Bn,F,$;j.ori==0?[F,$]=s(v,y):[$,F]=s(v,y);const G=j.dir*(j.ori==0?1:-1);let Y=j.ori==0?mS:_4,W=j.ori==0?f:(Oe,$e,lt,Rn,vr,rn,An)=>{f(Oe,$e,lt,vr,Rn,An,rn)},V=Mn(v.bands,y4).find(Oe=>Oe.series[0]==y),X=V!=null?V.dir:0,ee=A.fillTo(v,y,A.min,A.max,X),le=L(M(ee,_,D,N)),ve,me,Qe,We=B,qe=L(A.width*Bn),ae=!1,de=null,Ae=null,Te=null,Ge=null;p!=null&&(qe==0||m!=null)&&(ae=!0,de=p.values(v,y,x,w),Ae=new Map,new Set(de).forEach(Oe=>{Oe!=null&&Ae.set(Oe,new Path2D)}),qe>0&&(Te=m.values(v,y,x,w),Ge=new Map,new Set(Te).forEach(Oe=>{Oe!=null&&Ge.set(Oe,new Path2D)})));let{x0:rt,size:Ue}=h;if(rt!=null&&Ue!=null){U=1,S=rt.values(v,y,x,w),rt.unit==2&&(S=S.map(lt=>v.posToVal(R+lt*B,j.key,!0)));let Oe=Ue.values(v,y,x,w);Ue.unit==2?me=Oe[0]*B:me=O(Oe[0],j,B,R)-O(0,j,B,R),We=r9(S,C,O,j,B,R,We),Qe=We-me+H}else We=r9(S,C,O,j,B,R,We),Qe=We*o+H,me=We-Qe;Qe<1&&(Qe=0),qe>=me/2&&(qe=0),Qe<5&&(L=gV);let Be=Qe>0,Ee=We-Qe-(Be?qe:0);me=L(Zk(Ee,I,z)),ve=(U==0?me/2:U==G?0:me)-U*G*((U==0?H/2:0)+(Be?qe/2:0));const Ke={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Dt=ae?null:new Path2D;let Je=null;if(V!=null)Je=v.data[V.series[1]];else{let{y0:Oe,y1:$e}=h;Oe!=null&&$e!=null&&(C=$e.values(v,y,x,w),Je=Oe.values(v,y,x,w))}let it=F*me,Xe=$*me;for(let Oe=G==1?x:w;Oe>=x&&Oe<=w;Oe+=G){let $e=C[Oe];if($e==null)continue;if(Je!=null){let zt=Je[Oe]??0;if($e-zt==0)continue;le=M(zt,_,D,N)}let lt=j.distr!=2||h!=null?S[Oe]:Oe,Rn=O(lt,j,B,R),vr=M(Mn($e,ee),_,D,N),rn=L(Rn-ve),An=L(Us(vr,le)),ht=L(el(vr,le)),fn=An-ht;if($e!=null){let zt=$e<0?Xe:it,Nt=$e<0?it:Xe;ae?(qe>0&&Te[Oe]!=null&&Y(Ge.get(Te[Oe]),rn,ht+$a(qe/2),me,Us(0,fn-qe),zt,Nt),de[Oe]!=null&&Y(Ae.get(de[Oe]),rn,ht+$a(qe/2),me,Us(0,fn-qe),zt,Nt)):Y(Dt,rn,ht+$a(qe/2),me,Us(0,fn-qe),zt,Nt),W(v,y,Oe,rn-qe/2,ht,me+qe,fn)}}return qe>0?Ke.stroke=ae?Ge:Dt:ae||(Ke._fill=A.width==0?A._fill:A._stroke??A._fill,Ke.width=0),Ke.fill=ae?Ae:Dt,Ke})}function qwe(t,e){const n=Mn(e==null?void 0:e.alignGaps,0);return(r,i,s,o)=>qf(r,i,(l,u,h,f,p,m,v,y,x,w,A)=>{[s,o]=lS(h,s,o);let S=l.pxRound,C=F=>S(m(F,f,w,y)),j=F=>S(v(F,p,A,x)),_,O,M;f.ori==0?(_=fS,M=g0,O=$V):(_=pS,M=v0,O=QV);const R=f.dir*(f.ori==0?1:-1);let N=C(u[R==1?s:o]),B=N,D=[],L=[];for(let F=R==1?s:o;F>=s&&F<=o;F+=R)if(h[F]!=null){let G=u[F],Y=C(G);D.push(B=Y),L.push(j(h[F]))}const U={stroke:t(D,L,_,M,O,S),fill:null,clip:null,band:null,gaps:null,flags:Wm},H=U.stroke;let[z,I]=j4(r,i);if(l.fill!=null||z!=0){let F=U.fill=new Path2D(H),$=l.fillTo(r,i,l.min,l.max,z),G=j($);M(F,B,G),M(F,N,G)}if(!l.spanGaps){let F=[];F.push(...C4(u,h,s,o,R,C,n)),U.gaps=F=l.gaps(r,i,s,o,F),U.clip=dS(F,f.ori,y,x,w,A)}return I!=0&&(U.band=I==2?[nu(r,i,s,o,H,-1),nu(r,i,s,o,H,1)]:nu(r,i,s,o,H,I)),U})}function $we(t){return qwe(Qwe,t)}function Qwe(t,e,n,r,i,s){const o=t.length;if(o<2)return null;const l=new Path2D;if(n(l,t[0],e[0]),o==2)r(l,t[1],e[1]);else{let u=Array(o),h=Array(o-1),f=Array(o-1),p=Array(o-1);for(let m=0;m<o-1;m++)f[m]=e[m+1]-e[m],p[m]=t[m+1]-t[m],h[m]=f[m]/p[m];u[0]=h[0];for(let m=1;m<o-1;m++)h[m]===0||h[m-1]===0||h[m-1]>0!=h[m]>0?u[m]=0:(u[m]=3*(p[m-1]+p[m])/((2*p[m]+p[m-1])/h[m-1]+(p[m]+2*p[m-1])/h[m]),isFinite(u[m])||(u[m]=0));u[o-1]=h[o-2];for(let m=0;m<o-1;m++)i(l,t[m]+p[m]/3,e[m]+u[m]*p[m]/3,t[m+1]-p[m]/3,e[m+1]-u[m+1]*p[m]/3,t[m+1],e[m+1])}return l}const nO=new Set;function i9(){for(let t of nO)t.syncRect(!0)}m0&&(xf(jAe,im,i9),xf(CAe,im,i9,!0),xf(cw,im,()=>{Mi.pxRatio=Bn}));const Uwe=VV(),Wwe=UV();function s9(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((s,o)=>rO(s,o,e,n))}function Vwe(t,e){return t.map((n,r)=>r==0?{}:xi({},e,n))}function rO(t,e,n,r){return xi({},e==0?n:r,t)}function YV(t,e,n){return e==null?Qm:[e,n]}const Ywe=YV;function Gwe(t,e,n){return e==null?Qm:uw(e,n,v4,!0)}function GV(t,e,n,r){return e==null?Qm:cS(e,n,t.scales[r].log,!1)}const Xwe=GV;function XV(t,e,n,r){return e==null?Qm:g4(e,n,t.scales[r].log,!1)}const Kwe=XV;function Zwe(t,e,n,r,i){let s=Us(LL(t),LL(e)),o=e-t,l=Xo(i/r*o,n);do{let u=n[l],h=r*u/o;if(h>=i&&s+(u<5?Xh.get(u):0)<=17)return[u,h]}while(++l<n.length);return[0,0]}function a9(t){let e,n;return t=t.replace(/(\d+)px/,(r,i)=>(e=_i((n=+i)*Bn))+"px"),[t,e,n]}function Jwe(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=or(e[2]*Bn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Mi(t,e,n){const r={mode:Mn(t.mode,1)},i=r.mode;function s(Q,K,J,te){let ce=K.valToPct(Q);return te+J*(K.dir==-1?1-ce:ce)}function o(Q,K,J,te){let ce=K.valToPct(Q);return te+J*(K.dir==-1?ce:1-ce)}function l(Q,K,J,te){return K.ori==0?s(Q,K,J,te):o(Q,K,J,te)}r.valToPosH=s,r.valToPosV=o;let u=!1;r.status=0;const h=r.root=ao(aAe);if(t.id!=null&&(h.id=t.id),Oa(h,t.class),t.title){let Q=ao(cAe,h);Q.textContent=t.title}const f=Fo("canvas"),p=r.ctx=f.getContext("2d"),m=ao(uAe,h);xf("click",m,Q=>{Q.target===y&&(Pn!=Is||Wn!=Al)&&kn.click(r,Q)},!0);const v=r.under=ao(hAe,m);m.appendChild(f);const y=r.over=ao(dAe,m);t=Um(t);const x=+Mn(t.pxAlign,1),w=n9(x);(t.plugins||[]).forEach(Q=>{Q.opts&&(t=Q.opts(r,t)||t)});const A=t.ms||.001,S=r.series=i==1?s9(t.series||[],GL,e9,!1):Vwe(t.series||[null],JL),C=r.axes=s9(t.axes||[],YL,KL,!0),j=r.scales={},_=r.bands=t.bands||[];_.forEach(Q=>{Q.fill=gn(Q.fill||null),Q.dir=Mn(Q.dir,-1)});const O=i==2?S[1].facets[0].scale:S[0].scale,M={axes:yl,series:y0},R=(t.drawOrder||["axes","series"]).map(Q=>M[Q]);function N(Q){const K=Q.distr==3?J=>tu(J>0?J:Q.clamp(r,J,Q.min,Q.max,Q.key)):Q.distr==4?J=>k3(J,Q.asinh):Q.distr==100?J=>Q.fwd(J):J=>J;return J=>{let te=K(J),{_min:ce,_max:ge}=Q,Ne=ge-ce;return(te-ce)/Ne}}function B(Q){let K=j[Q];if(K==null){let J=(t.scales||sv)[Q]||sv;if(J.from!=null){B(J.from);let te=xi({},j[J.from],J,{key:Q});te.valToPct=N(te),j[Q]=te}else{K=j[Q]=xi({},Q==O?PV:Iwe,J),K.key=Q;let te=K.time,ce=K.range,ge=hh(ce);if((Q!=O||i==2&&!te)&&(ge&&(ce[0]==null||ce[1]==null)&&(ce={min:ce[0]==null?NL:{mode:1,hard:ce[0],soft:ce[0]},max:ce[1]==null?NL:{mode:1,hard:ce[1],soft:ce[1]}},ge=!1),!ge&&hS(ce))){let Ne=ce;ce=(Ve,nt,pt)=>nt==null?Qm:uw(nt,pt,Ne)}K.range=gn(ce||(te?Ywe:Q==O?K.distr==3?Xwe:K.distr==4?Kwe:YV:K.distr==3?GV:K.distr==4?XV:Gwe)),K.auto=gn(ge?!1:K.auto),K.clamp=gn(K.clamp||Nwe),K._min=K._max=null,K.valToPct=N(K)}}}B("x"),B("y"),i==1&&S.forEach(Q=>{B(Q.scale)}),C.forEach(Q=>{B(Q.scale)});for(let Q in t.scales)B(Q);const D=j[O],L=D.distr;let U,H;D.ori==0?(Oa(h,oAe),U=s,H=o):(Oa(h,lAe),U=o,H=s);const z={};for(let Q in j){let K=j[Q];(K.min!=null||K.max!=null)&&(z[Q]={min:K.min,max:K.max},K.min=K.max=null)}const I=t.tzDate||(Q=>new Date(_i(Q/A))),F=t.fmtDate||x4,$=A==1?owe(I):uwe(I),G=UL(I,QL(A==1?awe:cwe,F)),Y=VL(I,WL(dwe,F)),W=[],V=r.legend=xi({},mwe,t.legend),X=r.cursor=xi({},Awe,{drag:{y:i==2}},t.cursor),ee=V.show,le=X.show,ve=V.markers;V.idxs=W,ve.width=gn(ve.width),ve.dash=gn(ve.dash),ve.stroke=gn(ve.stroke),ve.fill=gn(ve.fill);let me,Qe,We,qe=[],ae=[],de,Ae=!1,Te={};if(V.live){const Q=S[1]?S[1].values:null;Ae=Q!=null,de=Ae?Q(r,1,0):{_:0};for(let K in de)Te[K]=p4}if(ee)if(me=Fo("table",bAe,h),We=Fo("tbody",null,me),V.mount(r,me),Ae){Qe=Fo("thead",null,me,We);let Q=Fo("tr",null,Qe);Fo("th",null,Q);for(var Ge in de)Fo("th",AL,Q).textContent=Ge}else Oa(me,xAe),V.live&&Oa(me,yAe);const rt={show:!0},Ue={show:!1};function Be(Q,K){if(K==0&&(Ae||!V.live||i==2))return Qm;let J=[],te=Fo("tr",AAe,We,We.childNodes[K]);Oa(te,Q.class),Q.show||Oa(te,Ud);let ce=Fo("th",null,te);if(ve.show){let Ve=ao(wAe,ce);if(K>0){let nt=ve.width(r,K);nt&&(Ve.style.border=nt+"px "+ve.dash(r,K)+" "+ve.stroke(r,K)),Ve.style.background=ve.fill(r,K)}}let ge=ao(AL,ce);Q.label instanceof HTMLElement?ge.appendChild(Q.label):ge.textContent=Q.label,K>0&&(ve.show||(ge.style.color=Q.width>0?ve.stroke(r,K):ve.fill(r,K)),Ke("click",ce,Ve=>{if(X._lock)return;qt(Ve);let nt=S.indexOf(Q);if((Ve.ctrlKey||Ve.metaKey)!=V.isolate){let pt=S.some((gt,xt)=>xt>0&&xt!=nt&&gt.show);S.forEach((gt,xt)=>{xt>0&&Bs(xt,pt?xt==nt?rt:Ue:rt,!0,Xr.setSeries)})}else Bs(nt,{show:!Q.show},!0,Xr.setSeries)},!1),tt&&Ke(CL,ce,Ve=>{X._lock||(qt(Ve),Bs(S.indexOf(Q),Tu,!0,Xr.setSeries))},!1));for(var Ne in de){let Ve=Fo("td",SAe,te);Ve.textContent="--",J.push(Ve)}return[te,J]}const Ee=new Map;function Ke(Q,K,J,te=!0){const ce=Ee.get(K)||{},ge=X.bind[Q](r,K,J,te);ge&&(xf(Q,K,ce[Q]=ge),Ee.set(K,ce))}function Dt(Q,K,J){const te=Ee.get(K)||{};for(let ce in te)(Q==null||ce==Q)&&(Kk(ce,K,te[ce]),delete te[ce]);Q==null&&Ee.delete(K)}let Je=0,it=0,Xe=0,Oe=0,$e=0,lt=0,Rn=$e,vr=lt,rn=Xe,An=Oe,ht=0,fn=0,zt=0,Nt=0;r.bbox={};let tn=!1,cr=!1,ln=!1,Jn=!1,Fr=!1,It=!1;function Cn(Q,K,J){(J||Q!=r.width||K!=r.height)&&vt(Q,K),xs(!1),ln=!0,cr=!0,Ft()}function vt(Q,K){r.width=Je=Xe=Q,r.height=it=Oe=K,$e=lt=0,He(),Ht();let J=r.bbox;ht=J.left=Fd($e*Bn,.5),fn=J.top=Fd(lt*Bn,.5),zt=J.width=Fd(Xe*Bn,.5),Nt=J.height=Fd(Oe*Bn,.5)}const ne=3;function _e(){let Q=!1,K=0;for(;!Q;){K++;let J=Gr(K),te=Dn(K);Q=K==ne||J&&te,Q||(vt(r.width,r.height),cr=!0)}}function ye({width:Q,height:K}){Cn(Q,K)}r.setSize=ye;function He(){let Q=!1,K=!1,J=!1,te=!1;C.forEach((ce,ge)=>{if(ce.show&&ce._show){let{side:Ne,_size:Ve}=ce,nt=Ne%2,pt=ce.label!=null?ce.labelSize:0,gt=Ve+pt;gt>0&&(nt?(Xe-=gt,Ne==3?($e+=gt,te=!0):J=!0):(Oe-=gt,Ne==0?(lt+=gt,Q=!0):K=!0))}}),vs[0]=Q,vs[1]=J,vs[2]=K,vs[3]=te,Xe-=ya[1]+ya[3],$e+=ya[3],Oe-=ya[2]+ya[0],lt+=ya[0]}function Ht(){let Q=$e+Xe,K=lt+Oe,J=$e,te=lt;function ce(ge,Ne){switch(ge){case 1:return Q+=Ne,Q-Ne;case 2:return K+=Ne,K-Ne;case 3:return J-=Ne,J+Ne;case 0:return te-=Ne,te+Ne}}C.forEach((ge,Ne)=>{if(ge.show&&ge._show){let Ve=ge.side;ge._pos=ce(Ve,ge._size),ge.label!=null&&(ge._lpos=ce(Ve,ge.labelSize))}})}if(X.dataIdx==null){let Q=X.hover,K=Q.skip=new Set(Q.skip??[]);K.add(void 0);let J=Q.prox=gn(Q.prox),te=Q.bias??(Q.bias=0);X.dataIdx=(ce,ge,Ne,Ve)=>{if(ge==0)return Ne;let nt=Ne,pt=J(ce,ge,Ne,Ve)??ar,gt=pt>=0&&pt<ar,xt=D.ori==0?Xe:Oe,$t=X.left,Tn=e[0],Qt=e[ge];if(K.has(Qt[Ne])){nt=null;let Gt=null,Lt=null,Ot;if(te==0||te==-1)for(Ot=Ne;Gt==null&&Ot-- >0;)K.has(Qt[Ot])||(Gt=Ot);if(te==0||te==1)for(Ot=Ne;Lt==null&&Ot++<Qt.length;)K.has(Qt[Ot])||(Lt=Ot);if(Gt!=null||Lt!=null)if(gt){let er=Gt==null?-1/0:U(Tn[Gt],D,xt,0),Ar=Lt==null?1/0:U(Tn[Lt],D,xt,0),Kr=$t-er,Fn=Ar-$t;Kr<=Fn?Kr<=pt&&(nt=Gt):Fn<=pt&&(nt=Lt)}else nt=Lt==null?Gt:Gt==null?Lt:Ne-Gt<=Lt-Ne?Gt:Lt}else gt&&Ti($t-U(Tn[Ne],D,xt,0))>pt&&(nt=null);return nt}}const qt=Q=>{X.event=Q};X.idxs=W,X._lock=!1;let et=X.points;et.show=gn(et.show),et.size=gn(et.size),et.stroke=gn(et.stroke),et.width=gn(et.width),et.fill=gn(et.fill);const Re=r.focus=xi({},t.focus||{alpha:.3},X.focus),tt=Re.prox>=0,jt=tt&&et.one;let Ct=[],nn=[],Vr=[];function Yr(Q,K){let J=et.show(r,K);if(J instanceof HTMLElement)return Oa(J,vAe),Oa(J,Q.class),Rl(J,-10,-10,Xe,Oe),y.insertBefore(J,Ct[K]),J}function Si(Q,K){if(i==1||K>0){let J=i==1&&j[Q.scale].time,te=Q.value;Q.value=J?zL(te)?VL(I,WL(te,F)):te||Y:te||Mwe,Q.label=Q.label||(J?Swe:wwe)}if(jt||K>0){Q.width=Q.width==null?1:Q.width,Q.paths=Q.paths||Uwe||IAe,Q.fillTo=gn(Q.fillTo||Bwe),Q.pxAlign=+Mn(Q.pxAlign,x),Q.pxRound=n9(Q.pxAlign),Q.stroke=gn(Q.stroke||null),Q.fill=gn(Q.fill||null),Q._stroke=Q._fill=Q._paths=Q._focus=null;let J=Rwe(Us(1,Q.width),1),te=Q.points=xi({},{size:J,width:Us(1,J*.2),stroke:Q.stroke,space:J*2,paths:Wwe,_stroke:null,_fill:null},Q.points);te.show=gn(te.show),te.filter=gn(te.filter),te.fill=gn(te.fill),te.stroke=gn(te.stroke),te.paths=gn(te.paths),te.pxAlign=Q.pxAlign}if(ee){let J=Be(Q,K);qe.splice(K,0,J[0]),ae.splice(K,0,J[1]),V.values.push(null)}if(le){W.splice(K,0,null);let J=null;jt?K==0&&(J=Yr(Q,K)):K>0&&(J=Yr(Q,K)),Ct.splice(K,0,J),nn.splice(K,0,0),Vr.splice(K,0,0)}si("addSeries",K)}function br(Q,K){K=K??S.length,Q=i==1?rO(Q,K,GL,e9):rO(Q,K,{},JL),S.splice(K,0,Q),Si(S[K],K)}r.addSeries=br;function Bi(Q){if(S.splice(Q,1),ee){V.values.splice(Q,1),ae.splice(Q,1);let K=qe.splice(Q,1)[0];Dt(null,K.firstChild),K.remove()}le&&(W.splice(Q,1),Ct.splice(Q,1)[0].remove(),nn.splice(Q,1),Vr.splice(Q,1)),si("delSeries",Q)}r.delSeries=Bi;const vs=[!1,!1,!1,!1];function ld(Q,K){if(Q._show=Q.show,Q.show){let J=Q.side%2,te=j[Q.scale];te==null&&(Q.scale=J?S[1].scale:O,te=j[Q.scale]);let ce=te.time;Q.size=gn(Q.size),Q.space=gn(Q.space),Q.rotate=gn(Q.rotate),hh(Q.incrs)&&Q.incrs.forEach(Ne=>{!Xh.has(Ne)&&Xh.set(Ne,yV(Ne))}),Q.incrs=gn(Q.incrs||(te.distr==2?rwe:ce?A==1?swe:lwe:zd)),Q.splits=gn(Q.splits||(ce&&te.distr==1?$:te.distr==3?Jk:te.distr==4?_we:Cwe)),Q.stroke=gn(Q.stroke),Q.grid.stroke=gn(Q.grid.stroke),Q.ticks.stroke=gn(Q.ticks.stroke),Q.border.stroke=gn(Q.border.stroke);let ge=Q.values;Q.values=hh(ge)&&!hh(ge[0])?gn(ge):ce?hh(ge)?UL(I,QL(ge,F)):zL(ge)?hwe(I,ge):ge||G:ge||jwe,Q.filter=gn(Q.filter||(te.distr>=3&&te.log==10?Owe:te.distr==3&&te.log==2?Ewe:vV)),Q.font=a9(Q.font),Q.labelFont=a9(Q.labelFont),Q._size=Q.size(r,null,K,0),Q._space=Q._rotate=Q._incrs=Q._found=Q._splits=Q._values=null,Q._size>0&&(vs[K]=!0,Q._el=ao(fAe,m))}}function bl(Q,K,J,te){let[ce,ge,Ne,Ve]=J,nt=K%2,pt=0;return nt==0&&(Ve||ge)&&(pt=K==0&&!ce||K==2&&!Ne?_i(YL.size/3):0),nt==1&&(ce||Ne)&&(pt=K==1&&!ge||K==3&&!Ve?_i(KL.size/2):0),pt}const hc=r.padding=(t.padding||[bl,bl,bl,bl]).map(Q=>gn(Mn(Q,bl))),ya=r._padding=hc.map((Q,K)=>Q(r,K,vs,0));let yr,Mr=null,wn=null;const Gs=i==1?S[0].idxs:null;let di=null,Xs=!1;function zr(Q,K){if(e=Q??[],r.data=r._data=e,i==2){yr=0;for(let J=1;J<S.length;J++)yr+=e[J][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),di=e[0],yr=di.length;let J=e;if(L==2){J=e.slice();let te=J[0]=Array(yr);for(let ce=0;ce<yr;ce++)te[ce]=ce}r._data=e=J}if(xs(!0),si("setData"),L==2&&(ln=!0),K!==!1){let J=D;J.auto(r,Xs)?bu():Ks(O,J.min,J.max),Jn=Jn||X.left>=0,It=!0,Ft()}}r.setData=zr;function bu(){Xs=!0;let Q,K;i==1&&(yr>0?(Mr=Gs[0]=0,wn=Gs[1]=yr-1,Q=e[0][Mr],K=e[0][wn],L==2?(Q=Mr,K=wn):Q==K&&(L==3?[Q,K]=cS(Q,Q,D.log,!1):L==4?[Q,K]=g4(Q,Q,D.log,!1):D.time?K=Q+_i(86400/A):[Q,K]=uw(Q,K,v4,!0))):(Mr=Gs[0]=Q=null,wn=Gs[1]=K=null)),Ks(O,Q,K)}let Va,bs,Ze,kt,Kt,_n,xr,fi,Ji,Qn;function Un(Q,K,J,te,ce,ge){Q??(Q=SL),J??(J=y4),te??(te="butt"),ce??(ce=SL),ge??(ge="round"),Q!=Va&&(p.strokeStyle=Va=Q),ce!=bs&&(p.fillStyle=bs=ce),K!=Ze&&(p.lineWidth=Ze=K),ge!=Kt&&(p.lineJoin=Kt=ge),te!=_n&&(p.lineCap=_n=te),J!=kt&&p.setLineDash(kt=J)}function ys(Q,K,J,te){K!=bs&&(p.fillStyle=bs=K),Q!=xr&&(p.font=xr=Q),J!=fi&&(p.textAlign=fi=J),te!=Ji&&(p.textBaseline=Ji=te)}function yu(Q,K,J,te,ce=0){if(te.length>0&&Q.auto(r,Xs)&&(K==null||K.min==null)){let ge=Mn(Mr,0),Ne=Mn(wn,te.length-1),Ve=J.min==null?OAe(te,ge,Ne,ce,Q.distr==3):[J.min,J.max];Q.min=el(Q.min,J.min=Ve[0]),Q.max=Us(Q.max,J.max=Ve[1])}}const dc={min:null,max:null};function cd(){for(let te in j){let ce=j[te];z[te]==null&&(ce.min==null||z[O]!=null&&ce.auto(r,Xs))&&(z[te]=dc)}for(let te in j){let ce=j[te];z[te]==null&&ce.from!=null&&z[ce.from]!=null&&(z[te]=dc)}z[O]!=null&&xs(!0);let Q={};for(let te in z){let ce=z[te];if(ce!=null){let ge=Q[te]=Um(j[te],PAe);if(ce.min!=null)xi(ge,ce);else if(te!=O||i==2)if(yr==0&&ge.from==null){let Ne=ge.range(r,null,null,te);ge.min=Ne[0],ge.max=Ne[1]}else ge.min=ar,ge.max=-ar}}if(yr>0){S.forEach((te,ce)=>{if(i==1){let ge=te.scale,Ne=z[ge];if(Ne==null)return;let Ve=Q[ge];if(ce==0){let nt=Ve.range(r,Ve.min,Ve.max,ge);Ve.min=nt[0],Ve.max=nt[1],Mr=Xo(Ve.min,e[0]),wn=Xo(Ve.max,e[0]),wn-Mr>1&&(e[0][Mr]<Ve.min&&Mr++,e[0][wn]>Ve.max&&wn--),te.min=di[Mr],te.max=di[wn]}else te.show&&te.auto&&yu(Ve,Ne,te,e[ce],te.sorted);te.idxs[0]=Mr,te.idxs[1]=wn}else if(ce>0&&te.show&&te.auto){let[ge,Ne]=te.facets,Ve=ge.scale,nt=Ne.scale,[pt,gt]=e[ce],xt=Q[Ve],$t=Q[nt];xt!=null&&yu(xt,z[Ve],ge,pt,ge.sorted),$t!=null&&yu($t,z[nt],Ne,gt,Ne.sorted),te.min=Ne.min,te.max=Ne.max}});for(let te in Q){let ce=Q[te],ge=z[te];if(ce.from==null&&(ge==null||ge.min==null)){let Ne=ce.range(r,ce.min==ar?null:ce.min,ce.max==-ar?null:ce.max,te);ce.min=Ne[0],ce.max=Ne[1]}}}for(let te in Q){let ce=Q[te];if(ce.from!=null){let ge=Q[ce.from];if(ge.min==null)ce.min=ce.max=null;else{let Ne=ce.range(r,ge.min,ge.max,te);ce.min=Ne[0],ce.max=Ne[1]}}}let K={},J=!1;for(let te in Q){let ce=Q[te],ge=j[te];if(ge.min!=ce.min||ge.max!=ce.max){ge.min=ce.min,ge.max=ce.max;let Ne=ge.distr;ge._min=Ne==3?tu(ge.min):Ne==4?k3(ge.min,ge.asinh):Ne==100?ge.fwd(ge.min):ge.min,ge._max=Ne==3?tu(ge.max):Ne==4?k3(ge.max,ge.asinh):Ne==100?ge.fwd(ge.max):ge.max,K[te]=J=!0}}if(J){S.forEach((te,ce)=>{i==2?ce>0&&K.y&&(te._paths=null):K[te.scale]&&(te._paths=null)});for(let te in K)ln=!0,si("setScale",te);le&&X.left>=0&&(Jn=It=!0)}for(let te in z)z[te]=null}function xu(Q){let K=Zk(Mr-1,0,yr-1),J=Zk(wn+1,0,yr-1);for(;Q[K]==null&&K>0;)K--;for(;Q[J]==null&&J<yr-1;)J++;return[K,J]}function y0(){if(yr>0){let Q=S.some(K=>K._focus)&&Qn!=Re.alpha;Q&&(p.globalAlpha=Qn=Re.alpha),S.forEach((K,J)=>{if(J>0&&K.show&&(es(J,!1),es(J,!0),K._paths==null)){let te=Qn;Qn!=K.alpha&&(p.globalAlpha=Qn=K.alpha);let ce=i==2?[0,e[J][0].length-1]:xu(e[J]);K._paths=K.paths(r,J,ce[0],ce[1]),Qn!=te&&(p.globalAlpha=Qn=te)}}),S.forEach((K,J)=>{if(J>0&&K.show){let te=Qn;Qn!=K.alpha&&(p.globalAlpha=Qn=K.alpha),K._paths!=null&&Au(J,!1);{let ce=K._paths!=null?K._paths.gaps:null,ge=K.points.show(r,J,Mr,wn,ce),Ne=K.points.filter(r,J,ge,ce);(ge||Ne)&&(K.points._paths=K.points.paths(r,J,Mr,wn,Ne),Au(J,!0))}Qn!=te&&(p.globalAlpha=Qn=te),si("drawSeries",J)}}),Q&&(p.globalAlpha=Qn=1)}}function es(Q,K){let J=K?S[Q].points:S[Q];J._stroke=J.stroke(r,Q),J._fill=J.fill(r,Q)}function Au(Q,K){let J=K?S[Q].points:S[Q],{stroke:te,fill:ce,clip:ge,flags:Ne,_stroke:Ve=J._stroke,_fill:nt=J._fill,_width:pt=J.width}=J._paths;pt=or(pt*Bn,3);let gt=null,xt=pt%2/2;K&&nt==null&&(nt=pt>0?"#fff":Ve);let $t=J.pxAlign==1&&xt>0;if($t&&p.translate(xt,xt),!K){let Tn=ht-pt/2,Qt=fn-pt/2,Gt=zt+pt,Lt=Nt+pt;gt=new Path2D,gt.rect(Tn,Qt,Gt,Lt)}K?ii(Ve,pt,J.dash,J.cap,nt,te,ce,Ne,ge):fc(Q,Ve,pt,J.dash,J.cap,nt,te,ce,Ne,gt,ge),$t&&p.translate(-xt,-xt)}function fc(Q,K,J,te,ce,ge,Ne,Ve,nt,pt,gt){let xt=!1;nt!=0&&_.forEach(($t,Tn)=>{if($t.series[0]==Q){let Qt=S[$t.series[1]],Gt=e[$t.series[1]],Lt=(Qt._paths||sv).band;hh(Lt)&&(Lt=$t.dir==1?Lt[0]:Lt[1]);let Ot,er=null;Qt.show&&Lt&&MAe(Gt,Mr,wn)?(er=$t.fill(r,Tn)||ge,Ot=Qt._paths.clip):Lt=null,ii(K,J,te,ce,er,Ne,Ve,nt,pt,gt,Ot,Lt),xt=!0}}),xt||ii(K,J,te,ce,ge,Ne,Ve,nt,pt,gt)}const pc=Wm|tO;function ii(Q,K,J,te,ce,ge,Ne,Ve,nt,pt,gt,xt){Un(Q,K,J,te,ce),(nt||pt||xt)&&(p.save(),nt&&p.clip(nt),pt&&p.clip(pt)),xt?(Ve&pc)==pc?(p.clip(xt),gt&&p.clip(gt),Oo(ce,Ne),mc(Q,ge,K)):Ve&tO?(Oo(ce,Ne),p.clip(xt),mc(Q,ge,K)):Ve&Wm&&(p.save(),p.clip(xt),gt&&p.clip(gt),Oo(ce,Ne),p.restore(),mc(Q,ge,K)):(Oo(ce,Ne),mc(Q,ge,K)),(nt||pt||xt)&&p.restore()}function mc(Q,K,J){J>0&&(K instanceof Map?K.forEach((te,ce)=>{p.strokeStyle=Va=ce,p.stroke(te)}):K!=null&&Q&&p.stroke(K))}function Oo(Q,K){K instanceof Map?K.forEach((J,te)=>{p.fillStyle=bs=te,p.fill(J)}):K!=null&&Q&&p.fill(K)}function Bt(Q,K,J,te){let ce=C[Q],ge;if(te<=0)ge=[0,0];else{let Ne=ce._space=ce.space(r,Q,K,J,te),Ve=ce._incrs=ce.incrs(r,Q,K,J,te,Ne);ge=Zwe(K,J,Ve,te,Ne)}return ce._found=ge}function wu(Q,K,J,te,ce,ge,Ne,Ve,nt,pt){let gt=Ne%2/2;x==1&&p.translate(gt,gt),Un(Ve,Ne,nt,pt,Ve),p.beginPath();let xt,$t,Tn,Qt,Gt=ce+(te==0||te==3?-ge:ge);J==0?($t=ce,Qt=Gt):(xt=ce,Tn=Gt);for(let Lt=0;Lt<Q.length;Lt++)K[Lt]!=null&&(J==0?xt=Tn=Q[Lt]:$t=Qt=Q[Lt],p.moveTo(xt,$t),p.lineTo(Tn,Qt));p.stroke(),x==1&&p.translate(-gt,-gt)}function Gr(Q){let K=!0;return C.forEach((J,te)=>{if(!J.show)return;let ce=j[J.scale];if(ce.min==null){J._show&&(K=!1,J._show=!1,xs(!1));return}else J._show||(K=!1,J._show=!0,xs(!1));let ge=J.side,Ne=ge%2,{min:Ve,max:nt}=ce,[pt,gt]=Bt(te,Ve,nt,Ne==0?Xe:Oe);if(gt==0)return;let xt=ce.distr==2,$t=J._splits=J.splits(r,te,Ve,nt,pt,gt,xt),Tn=ce.distr==2?$t.map(Ot=>di[Ot]):$t,Qt=ce.distr==2?di[$t[1]]-di[$t[0]]:pt,Gt=J._values=J.values(r,J.filter(r,Tn,te,gt,Qt),te,gt,Qt);J._rotate=ge==2?J.rotate(r,Gt,te,gt):0;let Lt=J._size;J._size=uo(J.size(r,Gt,te,Q)),Lt!=null&&J._size!=Lt&&(K=!1)}),K}function Dn(Q){let K=!0;return hc.forEach((J,te)=>{let ce=J(r,te,vs,Q);ce!=ya[te]&&(K=!1),ya[te]=ce}),K}function yl(){for(let Q=0;Q<C.length;Q++){let K=C[Q];if(!K.show||!K._show)continue;let J=K.side,te=J%2,ce,ge,Ne=K.stroke(r,Q),Ve=J==0||J==3?-1:1,[nt,pt]=K._found;if(K.label!=null){let Fi=K.labelGap*Ve,Cs=_i((K._lpos+Fi)*Bn);ys(K.labelFont[0],Ne,"center",J==2?jg:wL),p.save(),te==1?(ce=ge=0,p.translate(Cs,_i(fn+Nt/2)),p.rotate((J==3?-Vx:Vx)/2)):(ce=_i(ht+zt/2),ge=Cs);let Sl=mV(K.label)?K.label(r,Q,nt,pt):K.label;p.fillText(Sl,ce,ge),p.restore()}if(pt==0)continue;let gt=j[K.scale],xt=te==0?zt:Nt,$t=te==0?ht:fn,Tn=K._splits,Qt=gt.distr==2?Tn.map(Fi=>di[Fi]):Tn,Gt=gt.distr==2?di[Tn[1]]-di[Tn[0]]:nt,Lt=K.ticks,Ot=K.border,er=Lt.show?Lt.size:0,Ar=_i(er*Bn),Kr=_i((K.alignTo==2?K._size-er-K.gap:K.gap)*Bn),Fn=K._rotate*-Vx/180,Vn=w(K._pos*Bn),ts=(Ar+Kr)*Ve,ai=Vn+ts;ge=te==0?ai:0,ce=te==1?ai:0;let Ss=K.font[0],Zs=K.align==1?jp:K.align==2?C3:Fn>0?jp:Fn<0?C3:te==0?"center":J==3?C3:jp,Li=Fn||te==1?"middle":J==2?jg:wL;ys(Ss,Ne,Zs,Li);let pi=K.font[1]*K.lineGap,js=Tn.map(Fi=>w(l(Fi,gt,xt,$t))),Js=K._values;for(let Fi=0;Fi<Js.length;Fi++){let Cs=Js[Fi];if(Cs!=null){te==0?ce=js[Fi]:ge=js[Fi],Cs=""+Cs;let Sl=Cs.indexOf(`
`)==-1?[Cs]:Cs.split(/\n/gm);for(let ns=0;ns<Sl.length;ns++){let cy=Sl[ns];Fn?(p.save(),p.translate(ce,ge+ns*pi),p.rotate(Fn),p.fillText(cy,0,0),p.restore()):p.fillText(cy,ce,ge+ns*pi)}}}Lt.show&&wu(js,Lt.filter(r,Qt,Q,pt,Gt),te,J,Vn,Ar,or(Lt.width*Bn,3),Lt.stroke(r,Q),Lt.dash,Lt.cap);let Pi=K.grid;Pi.show&&wu(js,Pi.filter(r,Qt,Q,pt,Gt),te,te==0?2:1,te==0?fn:ht,te==0?Nt:zt,or(Pi.width*Bn,3),Pi.stroke(r,Q),Pi.dash,Pi.cap),Ot.show&&wu([Vn],[1],te==0?1:0,te==0?1:2,te==1?fn:ht,te==1?Nt:zt,or(Ot.width*Bn,3),Ot.stroke(r,Q),Ot.dash,Ot.cap)}si("drawAxes")}function xs(Q){S.forEach((K,J)=>{J>0&&(K._paths=null,Q&&(i==1?(K.min=null,K.max=null):K.facets.forEach(te=>{te.min=null,te.max=null})))})}let xl=!1,Ya=!1,st=[];function St(){Ya=!1;for(let Q=0;Q<st.length;Q++)si(...st[Q]);st.length=0}function Ft(){xl||(UAe(ur),xl=!0)}function an(Q,K=!1){xl=!0,Ya=K,Q(r),ur(),K&&st.length>0&&queueMicrotask(St)}r.batch=an;function ur(){if(tn&&(cd(),tn=!1),ln&&(_e(),ln=!1),cr){if(Cr(v,jp,$e),Cr(v,jg,lt),Cr(v,$g,Xe),Cr(v,Qg,Oe),Cr(y,jp,$e),Cr(y,jg,lt),Cr(y,$g,Xe),Cr(y,Qg,Oe),Cr(m,$g,Je),Cr(m,Qg,it),f.width=_i(Je*Bn),f.height=_i(it*Bn),C.forEach(({_el:Q,_show:K,_size:J,_pos:te,side:ce})=>{if(Q!=null)if(K){let ge=ce===3||ce===0?J:0,Ne=ce%2==1;Cr(Q,Ne?"left":"top",te-ge),Cr(Q,Ne?"width":"height",J),Cr(Q,Ne?"top":"left",Ne?lt:$e),Cr(Q,Ne?"height":"width",Ne?Oe:Xe),Xk(Q,Ud)}else Oa(Q,Ud)}),Va=bs=Ze=Kt=_n=xr=fi=Ji=kt=null,Qn=1,fd(!0),$e!=Rn||lt!=vr||Xe!=rn||Oe!=An){xs(!1);let Q=Xe/rn,K=Oe/An;if(le&&!Jn&&X.left>=0){X.left*=Q,X.top*=K,Ga&&Rl(Ga,_i(X.left),0,Xe,Oe),ws&&Rl(ws,0,_i(X.top),Xe,Oe);for(let J=0;J<Ct.length;J++){let te=Ct[J];te!=null&&(nn[J]*=Q,Vr[J]*=K,Rl(te,uo(nn[J]),uo(Vr[J]),Xe,Oe))}}if(Nn.show&&!Fr&&Nn.left>=0&&Nn.width>0){Nn.left*=Q,Nn.width*=Q,Nn.top*=K,Nn.height*=K;for(let J in C0)Cr(Cu,J,Nn[J])}Rn=$e,vr=lt,rn=Xe,An=Oe}si("setSize"),cr=!1}Je>0&&it>0&&(p.clearRect(0,0,f.width,f.height),si("drawClear"),R.forEach(Q=>Q()),si("draw")),Nn.show&&Fr&&(_u(Nn),Fr=!1),le&&Jn&&(bc(null,!0,!1),Jn=!1),V.show&&V.live&&It&&(S0(),It=!1),u||(u=!0,r.status=1,si("ready")),Xs=!1,xl=!1}r.redraw=(Q,K)=>{ln=K||!1,Q!==!1?Ks(O,D.min,D.max):Ft()};function As(Q,K){let J=j[Q];if(J.from==null){if(yr==0){let te=J.range(r,K.min,K.max,Q);K.min=te[0],K.max=te[1]}if(K.min>K.max){let te=K.min;K.min=K.max,K.max=te}if(yr>1&&K.min!=null&&K.max!=null&&K.max-K.min<1e-16)return;Q==O&&J.distr==2&&yr>0&&(K.min=Xo(K.min,e[0]),K.max=Xo(K.max,e[0]),K.min==K.max&&K.max++),z[Q]=K,tn=!0,Ft()}}r.setScale=As;let gc,Su,Ga,ws,$f,ju,Is,Al,ud,x0,Pn,Wn,Eo=!1;const kn=X.drag;let hr=kn.x,Hr=kn.y;le&&(X.x&&(gc=ao(mAe,y)),X.y&&(Su=ao(gAe,y)),D.ori==0?(Ga=gc,ws=Su):(Ga=Su,ws=gc),Pn=X.left,Wn=X.top);const Nn=r.select=xi({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Cu=Nn.show?ao(pAe,Nn.over?y:v):null;function _u(Q,K){if(Nn.show){for(let J in Q)Nn[J]=Q[J],J in C0&&Cr(Cu,J,Q[J]);K!==!1&&si("setSelect")}}r.setSelect=_u;function A0(Q){if(S[Q].show)ee&&Xk(qe[Q],Ud);else if(ee&&Oa(qe[Q],Ud),le){let J=jt?Ct[0]:Ct[Q];J!=null&&Rl(J,-10,-10,Xe,Oe)}}function Ks(Q,K,J){As(Q,{min:K,max:J})}function Bs(Q,K,J,te){K.focus!=null&&jS(Q),K.show!=null&&S.forEach((ce,ge)=>{ge>0&&(Q==ge||Q==null)&&(ce.show=K.show,A0(ge),i==2?(Ks(ce.facets[0].scale,null,null),Ks(ce.facets[1].scale,null,null)):Ks(ce.scale,null,null),Ft())}),J!==!1&&si("setSeries",Q,K),te&&Ou("setSeries",r,Q,K)}r.setSeries=Bs;function Zb(Q,K){xi(_[Q],K)}function AS(Q,K){Q.fill=gn(Q.fill||null),Q.dir=Mn(Q.dir,-1),K=K??_.length,_.splice(K,0,Q)}function wS(Q){Q==null?_.length=0:_.splice(Q,1)}r.addBand=AS,r.setBand=Zb,r.delBand=wS;function SS(Q,K){S[Q].alpha=K,le&&Ct[Q]!=null&&(Ct[Q].style.opacity=K),ee&&qe[Q]&&(qe[Q].style.opacity=K)}let xa,wl,vc;const Tu={focus:!0};function jS(Q){if(Q!=vc){let K=Q==null,J=Re.alpha!=1;S.forEach((te,ce)=>{if(i==1||ce>0){let ge=K||ce==0||ce==Q;te._focus=K?null:ge,J&&SS(ce,ge?1:Re.alpha)}}),vc=Q,J&&Ft()}}ee&&tt&&Ke(_L,me,Q=>{X._lock||(qt(Q),vc!=null&&Bs(null,Tu,!0,Xr.setSeries))});function Xa(Q,K,J){let te=j[K];J&&(Q=Q/Bn-(te.ori==1?lt:$e));let ce=Xe;te.ori==1&&(ce=Oe,Q=ce-Q),te.dir==-1&&(Q=ce-Q);let ge=te._min,Ne=te._max,Ve=Q/ce,nt=ge+(Ne-ge)*Ve,pt=te.distr;return pt==3?$m(10,nt):pt==4?DAe(nt,te.asinh):pt==100?te.bwd(nt):nt}function Jb(Q,K){let J=Xa(Q,O,K);return Xo(J,e[0],Mr,wn)}r.valToIdx=Q=>Xo(Q,e[0]),r.posToIdx=Jb,r.posToVal=Xa,r.valToPos=(Q,K,J)=>j[K].ori==0?s(Q,j[K],J?zt:Xe,J?ht:0):o(Q,j[K],J?Nt:Oe,J?fn:0),r.setCursor=(Q,K,J)=>{Pn=Q.left,Wn=Q.top,bc(null,K,J)};function ey(Q,K){Cr(Cu,jp,Nn.left=Q),Cr(Cu,$g,Nn.width=K)}function ty(Q,K){Cr(Cu,jg,Nn.top=Q),Cr(Cu,Qg,Nn.height=K)}let hd=D.ori==0?ey:ty,dd=D.ori==1?ey:ty;function w0(){if(ee&&V.live)for(let Q=i==2?1:0;Q<S.length;Q++){if(Q==0&&Ae)continue;let K=V.values[Q],J=0;for(let te in K)ae[Q][J++].firstChild.nodeValue=K[te]}}function S0(Q,K){if(Q!=null&&(Q.idxs?Q.idxs.forEach((J,te)=>{W[te]=J}):LAe(Q.idx)||W.fill(Q.idx),V.idx=W[0]),ee&&V.live){for(let J=0;J<S.length;J++)(J>0||i==1&&!Ae)&&CS(J,W[J]);w0()}It=!1,K!==!1&&si("setLegend")}r.setLegend=S0;function CS(Q,K){let J=S[Q],te=Q==0&&L==2?di:e[Q],ce;Ae?ce=J.values(r,Q,K)??Te:(ce=J.value(r,K==null?null:te[K],Q,K),ce=ce==null?Te:{_:ce}),V.values[Q]=ce}function bc(Q,K,J){ud=Pn,x0=Wn,[Pn,Wn]=X.move(r,Pn,Wn),X.left=Pn,X.top=Wn,le&&(Ga&&Rl(Ga,_i(Pn),0,Xe,Oe),ws&&Rl(ws,0,_i(Wn),Xe,Oe));let te,ce=Mr>wn;xa=ar,wl=null;let ge=D.ori==0?Xe:Oe,Ne=D.ori==1?Xe:Oe;if(Pn<0||yr==0||ce){te=X.idx=null;for(let Ve=0;Ve<S.length;Ve++){let nt=Ct[Ve];nt!=null&&Rl(nt,-10,-10,Xe,Oe)}tt&&Bs(null,Tu,!0,Q==null&&Xr.setSeries),V.live&&(W.fill(te),It=!0)}else{let Ve,nt,pt;i==1&&(Ve=D.ori==0?Pn:Wn,nt=Xa(Ve,O),te=X.idx=Xo(nt,e[0],Mr,wn),pt=U(e[0][te],D,ge,0));let gt=-10,xt=-10,$t=0,Tn=0,Qt=!0,Gt="",Lt="";for(let Ot=i==2?1:0;Ot<S.length;Ot++){let er=S[Ot],Ar=W[Ot],Kr=Ar==null?null:i==1?e[Ot][Ar]:e[Ot][1][Ar],Fn=X.dataIdx(r,Ot,te,nt),Vn=Fn==null?null:i==1?e[Ot][Fn]:e[Ot][1][Fn];if(It=It||Vn!=Kr||Fn!=Ar,W[Ot]=Fn,Ot>0&&er.show){let ts=Fn==null?-10:Fn==te?pt:U(i==1?e[0][Fn]:e[Ot][0][Fn],D,ge,0),ai=Vn==null?-10:H(Vn,i==1?j[er.scale]:j[er.facets[1].scale],Ne,0);if(tt&&Vn!=null){let Ss=D.ori==1?Pn:Wn,Zs=Ti(Re.dist(r,Ot,Fn,ai,Ss));if(Zs<xa){let Li=Re.bias;if(Li!=0){let pi=Xa(Ss,er.scale),js=Vn>=0?1:-1,Js=pi>=0?1:-1;Js==js&&(Js==1?Li==1?Vn>=pi:Vn<=pi:Li==1?Vn<=pi:Vn>=pi)&&(xa=Zs,wl=Ot)}else xa=Zs,wl=Ot}}if(It||jt){let Ss,Zs;D.ori==0?(Ss=ts,Zs=ai):(Ss=ai,Zs=ts);let Li,pi,js,Js,Pi,Fi,Cs=!0,Sl=et.bbox;if(Sl!=null){Cs=!1;let ns=Sl(r,Ot);js=ns.left,Js=ns.top,Li=ns.width,pi=ns.height}else js=Ss,Js=Zs,Li=pi=et.size(r,Ot);if(Fi=et.fill(r,Ot),Pi=et.stroke(r,Ot),jt)Ot==wl&&xa<=Re.prox&&(gt=js,xt=Js,$t=Li,Tn=pi,Qt=Cs,Gt=Fi,Lt=Pi);else{let ns=Ct[Ot];ns!=null&&(nn[Ot]=js,Vr[Ot]=Js,DL(ns,Li,pi,Cs),ML(ns,Fi,Pi),Rl(ns,uo(js),uo(Js),Xe,Oe))}}}}if(jt){let Ot=Re.prox,er=vc==null?xa<=Ot:xa>Ot||wl!=vc;if(It||er){let Ar=Ct[0];Ar!=null&&(nn[0]=gt,Vr[0]=xt,DL(Ar,$t,Tn,Qt),ML(Ar,Gt,Lt),Rl(Ar,uo(gt),uo(xt),Xe,Oe))}}}if(Nn.show&&Eo)if(Q!=null){let[Ve,nt]=Xr.scales,[pt,gt]=Xr.match,[xt,$t]=Q.cursor.sync.scales,Tn=Q.cursor.drag;if(hr=Tn._x,Hr=Tn._y,hr||Hr){let{left:Qt,top:Gt,width:Lt,height:Ot}=Q.select,er=Q.scales[xt].ori,Ar=Q.posToVal,Kr,Fn,Vn,ts,ai,Ss=Ve!=null&&pt(Ve,xt),Zs=nt!=null&&gt(nt,$t);Ss&&hr?(er==0?(Kr=Qt,Fn=Lt):(Kr=Gt,Fn=Ot),Vn=j[Ve],ts=U(Ar(Kr,xt),Vn,ge,0),ai=U(Ar(Kr+Fn,xt),Vn,ge,0),hd(el(ts,ai),Ti(ai-ts))):hd(0,ge),Zs&&Hr?(er==1?(Kr=Qt,Fn=Lt):(Kr=Gt,Fn=Ot),Vn=j[nt],ts=H(Ar(Kr,$t),Vn,Ne,0),ai=H(Ar(Kr+Fn,$t),Vn,Ne,0),dd(el(ts,ai),Ti(ai-ts))):dd(0,Ne)}else _0()}else{let Ve=Ti(ud-$f),nt=Ti(x0-ju);if(D.ori==1){let $t=Ve;Ve=nt,nt=$t}hr=kn.x&&Ve>=kn.dist,Hr=kn.y&&nt>=kn.dist;let pt=kn.uni;pt!=null?hr&&Hr&&(hr=Ve>=pt,Hr=nt>=pt,!hr&&!Hr&&(nt>Ve?Hr=!0:hr=!0)):kn.x&&kn.y&&(hr||Hr)&&(hr=Hr=!0);let gt,xt;hr&&(D.ori==0?(gt=Is,xt=Pn):(gt=Al,xt=Wn),hd(el(gt,xt),Ti(xt-gt)),Hr||dd(0,Ne)),Hr&&(D.ori==1?(gt=Is,xt=Pn):(gt=Al,xt=Wn),dd(el(gt,xt),Ti(xt-gt)),hr||hd(0,ge)),!hr&&!Hr&&(hd(0,0),dd(0,0))}if(kn._x=hr,kn._y=Hr,Q==null){if(J){if(oy!=null){let[Ve,nt]=Xr.scales;Xr.values[0]=Ve!=null?Xa(D.ori==0?Pn:Wn,Ve):null,Xr.values[1]=nt!=null?Xa(D.ori==1?Pn:Wn,nt):null}Ou(_3,r,Pn,Wn,Xe,Oe,te)}if(tt){let Ve=J&&Xr.setSeries,nt=Re.prox;vc==null?xa<=nt&&Bs(wl,Tu,!0,Ve):xa>nt?Bs(null,Tu,!0,Ve):wl!=vc&&Bs(wl,Tu,!0,Ve)}}It&&(V.idx=te,S0()),K!==!1&&si("setCursor")}let Mo=null;Object.defineProperty(r,"rect",{get(){return Mo==null&&fd(!1),Mo}});function fd(Q=!1){Q?Mo=null:(Mo=y.getBoundingClientRect(),si("syncRect",Mo))}function ny(Q,K,J,te,ce,ge,Ne){X._lock||Eo&&Q!=null&&Q.movementX==0&&Q.movementY==0||(j0(Q,K,J,te,ce,ge,Ne,!1,Q!=null),Q!=null?bc(null,!0,!0):bc(K,!0,!1))}function j0(Q,K,J,te,ce,ge,Ne,Ve,nt){if(Mo==null&&fd(!1),qt(Q),Q!=null)J=Q.clientX-Mo.left,te=Q.clientY-Mo.top;else{if(J<0||te<0){Pn=-10,Wn=-10;return}let[pt,gt]=Xr.scales,xt=K.cursor.sync,[$t,Tn]=xt.values,[Qt,Gt]=xt.scales,[Lt,Ot]=Xr.match,er=K.axes[0].side%2==1,Ar=D.ori==0?Xe:Oe,Kr=D.ori==1?Xe:Oe,Fn=er?ge:ce,Vn=er?ce:ge,ts=er?te:J,ai=er?J:te;if(Qt!=null?J=Lt(pt,Qt)?l($t,j[pt],Ar,0):-10:J=Ar*(ts/Fn),Gt!=null?te=Ot(gt,Gt)?l(Tn,j[gt],Kr,0):-10:te=Kr*(ai/Vn),D.ori==1){let Ss=J;J=te,te=Ss}}nt&&(K==null||K.cursor.event.type==_3)&&((J<=1||J>=Xe-1)&&(J=Fd(J,Xe)),(te<=1||te>=Oe-1)&&(te=Fd(te,Oe))),Ve?($f=J,ju=te,[Is,Al]=X.move(r,J,te)):(Pn=J,Wn=te)}const C0={width:0,height:0,left:0,top:0};function _0(){_u(C0,!1)}let ry,iy,sy,ay;function Qf(Q,K,J,te,ce,ge,Ne){Eo=!0,hr=Hr=kn._x=kn._y=!1,j0(Q,K,J,te,ce,ge,Ne,!0,!1),Q!=null&&(Ke(T3,Yk,ku,!1),Ou(jL,r,Is,Al,Xe,Oe,null));let{left:Ve,top:nt,width:pt,height:gt}=Nn;ry=Ve,iy=nt,sy=pt,ay=gt}function ku(Q,K,J,te,ce,ge,Ne){Eo=kn._x=kn._y=!1,j0(Q,K,J,te,ce,ge,Ne,!1,!0);let{left:Ve,top:nt,width:pt,height:gt}=Nn,xt=pt>0||gt>0,$t=ry!=Ve||iy!=nt||sy!=pt||ay!=gt;if(xt&&$t&&_u(Nn),kn.setScale&&xt&&$t){let Tn=Ve,Qt=pt,Gt=nt,Lt=gt;if(D.ori==1&&(Tn=nt,Qt=gt,Gt=Ve,Lt=pt),hr&&Ks(O,Xa(Tn,O),Xa(Tn+Qt,O)),Hr)for(let Ot in j){let er=j[Ot];Ot!=O&&er.from==null&&er.min!=ar&&Ks(Ot,Xa(Gt+Lt,Ot),Xa(Gt,Ot))}_0()}else X.lock&&(X._lock=!X._lock,bc(K,!0,Q!=null));Q!=null&&(Dt(T3,Yk),Ou(T3,r,Pn,Wn,Xe,Oe,null))}function _S(Q,K,J,te,ce,ge,Ne){if(X._lock)return;qt(Q);let Ve=Eo;if(Eo){let nt=!0,pt=!0,gt=10,xt,$t;D.ori==0?(xt=hr,$t=Hr):(xt=Hr,$t=hr),xt&&$t&&(nt=Pn<=gt||Pn>=Xe-gt,pt=Wn<=gt||Wn>=Oe-gt),xt&&nt&&(Pn=Pn<Is?0:Xe),$t&&pt&&(Wn=Wn<Al?0:Oe),bc(null,!0,!0),Eo=!1}Pn=-10,Wn=-10,W.fill(null),bc(null,!0,!0),Ve&&(Eo=Ve)}function T0(Q,K,J,te,ce,ge,Ne){X._lock||(qt(Q),bu(),_0(),Q!=null&&Ou(TL,r,Pn,Wn,Xe,Oe,null))}function k0(){C.forEach(Jwe),Cn(r.width,r.height,!0)}xf(cw,im,k0);const yc={};yc.mousedown=Qf,yc.mousemove=ny,yc.mouseup=ku,yc.dblclick=T0,yc.setSeries=(Q,K,J,te)=>{let ce=Xr.match[2];J=ce(r,K,J),J!=-1&&Bs(J,te,!0,!1)},le&&(Ke(jL,y,Qf),Ke(_3,y,ny),Ke(CL,y,Q=>{qt(Q),fd(!1)}),Ke(_L,y,_S),Ke(TL,y,T0),nO.add(r),r.syncRect=fd);const pd=r.hooks=t.hooks||{};function si(Q,K,J){Ya?st.push([Q,K,J]):Q in pd&&pd[Q].forEach(te=>{te.call(null,r,K,J)})}(t.plugins||[]).forEach(Q=>{for(let K in Q.hooks)pd[K]=(pd[K]||[]).concat(Q.hooks[K])});const xc=(Q,K,J)=>J,Xr=xi({key:null,setSeries:!1,filters:{pub:PL,sub:PL},scales:[O,S[1]?S[1].scale:null],match:[FL,FL,xc],values:[null,null]},X.sync);Xr.match.length==2&&Xr.match.push(xc),X.sync=Xr;const oy=Xr.key,O0=FV(oy);function Ou(Q,K,J,te,ce,ge,Ne){Xr.filters.pub(Q,K,J,te,ce,ge,Ne)&&O0.pub(Q,K,J,te,ce,ge,Ne)}O0.sub(r);function ly(Q,K,J,te,ce,ge,Ne){Xr.filters.sub(Q,K,J,te,ce,ge,Ne)&&yc[Q](null,K,J,te,ce,ge,Ne)}r.pub=ly;function md(){O0.unsub(r),nO.delete(r),Ee.clear(),Kk(cw,im,k0),h.remove(),me==null||me.remove(),si("destroy")}r.destroy=md;function Ac(){si("init",t,e),zr(e||t.data,!1),z[O]?As(O,z[O]):bu(),Fr=Nn.show&&(Nn.width>0||Nn.height>0),Jn=It=!0,Cn(t.width,t.height)}return S.forEach(Si),C.forEach(ld),n?n instanceof HTMLElement?(n.appendChild(h),Ac()):n(r,Ac):Ac(),r}Mi.assign=xi;Mi.fmtNum=b4;Mi.rangeNum=uw;Mi.rangeLog=cS;Mi.rangeAsinh=g4;Mi.orient=qf;Mi.pxRatio=Bn;Mi.join=QAe;Mi.fmtDate=x4,Mi.tzDate=twe;Mi.sync=FV;{Mi.addGap=Lwe,Mi.clipGaps=dS;let t=Mi.paths={points:UV};t.linear=VV,t.stepped=zwe,t.bars=Hwe,t.spline=$we}const e2e=Object.freeze(Object.defineProperty({__proto__:null,default:Mi},Symbol.toStringTag,{value:"Module"})),t2e=eP(e2e);var n2e=Wx.exports,o9;function r2e(){return o9||(o9=1,function(t,e){(function(r,i){t.exports=i(nb(),t2e)})(n2e,(n,r)=>(()=>{var i={"./common/index.ts":(u,h,f)=>{f.r(h),f.d(h,{dataMatch:()=>v,optionsUpdateState:()=>m});var p=function(y,x){var w={};for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&x.indexOf(A)<0&&(w[A]=y[A]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,A=Object.getOwnPropertySymbols(y);S<A.length;S++)x.indexOf(A[S])<0&&Object.prototype.propertyIsEnumerable.call(y,A[S])&&(w[A[S]]=y[A[S]]);return w};Object.is||Object.defineProperty(Object,"is",{value:function(x,w){return x===w&&(x!==0||1/x===1/w)||x!==x&&w!==w}});var m=function(x,w){var A=x.width,S=x.height,C=p(x,["width","height"]),j=w.width,_=w.height,O=p(w,["width","height"]),M="keep";if((S!==_||A!==j)&&(M="update"),Object.keys(C).length!==Object.keys(O).length)return"create";for(var R=0,N=Object.keys(C);R<N.length;R++){var B=N[R];if(!Object.is(C[B],O[B])){M="create";break}}return M},v=function(x,w){return x.length!==w.length?!1:x.every(function(A,S){var C=w[S];return A.length!==C.length?!1:A.every(function(j,_){return j===C[_]})})}},react:u=>{u.exports=n},uplot:u=>{u.exports=r}},s={};function o(u){var h=s[u];if(h!==void 0)return h.exports;var f=s[u]={exports:{}};return i[u](f,f.exports,o),f.exports}o.n=u=>{var h=u&&u.__esModule?()=>u.default:()=>u;return o.d(h,{a:h}),h},o.d=(u,h)=>{for(var f in h)o.o(h,f)&&!o.o(u,f)&&Object.defineProperty(u,f,{enumerable:!0,get:h[f]})},o.o=(u,h)=>Object.prototype.hasOwnProperty.call(u,h),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var l={};return(()=>{/*!*******************************!*\
  !*** ./react/uplot-react.tsx ***!
  \*******************************/o.r(l),o.d(l,{default:()=>v});var u=o("react"),h=o.n(u),f=o("uplot"),p=o.n(f),m=o("./common/index.ts");function v(y){var x=y.options,w=y.data,A=y.target,S=y.onDelete,C=y.onCreate,j=y.resetScales,_=j===void 0?!0:j,O=y.className,M=(0,u.useRef)(null),R=(0,u.useRef)(null),N=(0,u.useRef)(x),B=(0,u.useRef)(A),D=(0,u.useRef)(w),L=(0,u.useRef)(C),U=(0,u.useRef)(S);(0,u.useEffect)(function(){L.current=C,U.current=S});var H=(0,u.useCallback)(function(I){var F;I&&((F=U.current)===null||F===void 0||F.call(U,I),I.destroy(),M.current=null)},[]),z=(0,u.useCallback)(function(){var I,F=new(p())(N.current,D.current,B.current||R.current);M.current=F,(I=L.current)===null||I===void 0||I.call(L,F)},[]);return(0,u.useEffect)(function(){return z(),function(){H(M.current)}},[z,H]),(0,u.useEffect)(function(){if(N.current!==x){var I=(0,m.optionsUpdateState)(N.current,x);N.current=x,!M.current||I==="create"?(H(M.current),z()):I==="update"&&M.current.setSize({width:x.width,height:x.height})}},[x,z,H]),(0,u.useEffect)(function(){D.current!==w&&(M.current?(0,m.dataMatch)(D.current,w)||(_?M.current.setData(w,!0):(M.current.setData(w,!1),M.current.redraw())):(D.current=w,z()),D.current=w)},[w,_,z]),(0,u.useEffect)(function(){return B.current!==A&&(B.current=A,z()),function(){return H(M.current)}},[A,z,H]),A?null:h().createElement("div",{ref:R,className:O})}})(),l=l.default,l})())}(Wx)),Wx.exports}var i2e=r2e();const s2e=pl(i2e),KV=t=>t===null?"scalar":oS(t.__name__||"")?`{"${Ih(t.__name__)}",${Object.entries(t).filter(([e])=>e!=="__name__").map(([e,n])=>`${Gh(e)}="${Ih(n)}"`).join(", ")}}`:`${t.__name__||""}{${Object.entries(t).filter(([e])=>e!=="__name__").map(([e,n])=>`${Gh(e)}="${Ih(n)}"`).join(", ")}}`,l9=(t,e)=>{const n=c9[t%c9.length];return e?n:mP(n,.4)},c9=["#008000","#008080","#800000","#800080","#808000","#808080","#0000c0","#008040","#0080c0","#800040","#8000c0","#808040","#8080c0","#00c000","#00c080","#804000","#804080","#80c000","#80c080","#0040c0","#00c040","#00c0c0","#804040","#8040c0","#80c040","#80c0c0","#408000","#408080","#c00000","#c00080","#c08000","#c08080","#4000c0","#408040","#4080c0","#c00040","#c000c0","#c08040","#c080c0","#404000","#404080","#40c000","#40c080","#c04000","#c04080","#c0c000","#c0c080","#404040","#4040c0","#40c040","#40c0c0","#c04040","#c040c0","#c0c040","#0000a0","#008020","#0080a0","#800020","#8000a0","#808020","#8080a0","#0000e0","#008060","#0080e0","#800060","#8000e0","#808060","#8080e0","#0040a0","#00c020","#00c0a0","#804020","#8040a0","#80c020","#80c0a0","#0040e0","#00c060","#00c0e0","#804060","#8040e0","#80c060","#80c0e0","#4000a0","#408020","#4080a0","#c00020","#c000a0","#c08020","#c080a0","#4000e0","#408060","#4080e0","#c00060","#c000e0","#c08060","#c080e0","#404020","#4040a0","#40c020","#40c0a0","#c04020","#c040a0","#c0c020","#c0c0a0","#404060","#4040e0","#40c060","#40c0e0","#c04060","#c040e0","#c0c060","#00a000","#00a080","#802000","#802080","#80a000","#80a080","#0020c0","#00a040","#00a0c0","#802040","#8020c0","#80a040","#80a0c0","#006000","#006080","#00e000","#00e080","#806000","#806080","#80e000","#80e080","#006040","#0060c0","#00e040","#00e0c0","#806040","#8060c0","#80e040","#80e0c0","#40a000","#40a080","#c02000","#c02080","#c0a000","#c0a080","#4020c0","#40a040","#40a0c0","#c02040","#c020c0","#c0a040","#c0a0c0","#406000","#406080","#40e000","#40e080","#c06000","#c06080","#c0e000","#c0e080","#406040","#4060c0","#40e040","#40e0c0","#c06040","#c060c0","#c0e040","#c0e0c0","#0020a0","#00a020","#00a0a0","#802020","#8020a0","#80a020","#80a0a0","#0020e0","#00a060","#00a0e0","#802060","#8020e0","#80a060","#80a0e0","#006020","#0060a0","#00e020","#00e0a0","#806020","#8060a0","#80e020","#80e0a0","#006060","#0060e0","#00e060","#00e0e0","#806060","#8060e0","#80e060","#80e0e0","#4020a0","#40a020","#40a0a0","#c02020","#c020a0","#c0a020","#c0a0a0","#4020e0","#40a060","#40a0e0","#c02060","#c020e0","#c0a060","#c0a0e0","#406020","#4060a0","#40e020","#40e0a0","#c06020","#c060a0","#c0e020","#c0e0a0","#406060","#4060e0","#40e060","#40e0e0","#c06060","#c060e0","#c0e060","#208000","#208080","#a00000","#a00080","#a08000","#a08080","#208040","#2080c0","#a00040","#a000c0","#a08040","#a080c0","#204080","#20c000","#20c080","#a04000","#a04080","#a0c000","#a0c080","#2040c0","#20c040","#20c0c0","#a04040","#a040c0","#a0c040","#a0c0c0","#608000","#608080","#e00000","#e00080","#e08000","#e08080","#6000c0","#608040","#6080c0","#e00040","#e000c0","#e08040","#e080c0","#604080","#60c000","#60c080","#e04000","#e04080","#e0c000","#e0c080","#604040","#6040c0","#60c040","#60c0c0","#e04040","#e040c0","#e0c040","#e0c0c0","#208020","#2080a0","#a00020","#a000a0","#a08020","#a080a0","#2000e0","#208060","#2080e0","#a00060","#a000e0","#a08060","#a080e0","#2040a0","#20c020","#20c0a0","#a04020","#a040a0","#a0c020","#2040e0","#20c060","#20c0e0","#a04060","#a040e0","#a0c060","#a0c0e0","#6000a0","#608020","#6080a0","#e00020","#e000a0","#e08020","#e080a0","#6000e0","#608060","#6080e0","#e00060","#e000e0","#e08060","#e080e0","#604020","#6040a0","#60c020","#60c0a0","#e04020","#e040a0","#e0c020","#e0c0a0","#604060","#6040e0","#60c060","#60c0e0","#e04060","#e040e0","#e0c060","#e0c0e0","#20a000","#20a080","#a02000","#a02080","#a0a000","#a0a080","#2020c0","#20a040","#20a0c0","#a02040","#a020c0","#a0a040","#a0a0c0","#206000","#206080","#20e000","#20e080","#a06000","#a06080","#a0e000","#a0e080","#206040","#2060c0","#20e040","#20e0c0","#a06040","#a060c0","#a0e040","#a0e0c0","#602080","#60a000","#60a080","#e02000","#e02080","#e0a000","#e0a080","#6020c0","#60a040","#60a0c0","#e02040","#e020c0","#e0a040","#e0a0c0","#606000","#606080","#60e000","#60e080","#e06000","#e06080","#e0e000","#e0e080","#606040","#6060c0","#60e040","#60e0c0","#e06040","#e060c0","#e0e040","#e0e0c0","#20a020","#20a0a0","#a02020","#a020a0","#a0a020","#a0a0a0","#2020e0","#20a060","#20a0e0","#a02060","#a020e0","#a0a060","#a0a0e0","#206020","#2060a0","#20e020","#20e0a0","#a06020","#a060a0","#a0e020","#a0e0a0","#206060","#2060e0","#20e060","#20e0e0","#a06060","#a060e0","#a0e060","#a0e0e0","#6020a0","#60a020","#60a0a0","#e02020","#e020a0","#e0a020","#e0a0a0","#602060","#6020e0","#60a060","#60a0e0","#e02060","#e020e0","#e0a060","#e0a0e0","#606020","#6060a0","#60e020","#60e0a0","#e06020","#e060a0","#e0e020","#e0e0a0","#606060","#6060e0","#60e060","#60e0e0","#e06060","#e060e0","#e0e060","#008010","#008090","#800010","#800090","#808010","#808090","#0000d0","#008050","#0080d0","#800050","#8000d0","#808050","#8080d0","#004010","#004090","#00c010","#00c090","#804010","#804090","#80c010","#80c090","#004050","#0040d0","#00c050","#00c0d0","#804050","#8040d0","#80c050","#80c0d0","#400090","#408010","#408090","#c00010","#c00090","#c08010","#c08090","#4000d0","#408050","#4080d0","#c00050","#c000d0","#c08050","#c080d0","#404010","#404090","#40c010","#40c090","#c04010","#c04090","#c0c010","#c0c090","#404050","#4040d0","#40c050","#40c0d0","#c04050","#c040d0","#c0c050","#0000b0","#008030","#0080b0","#800030","#8000b0","#808030","#8080b0","#0000f0","#008070","#0080f0","#800070","#8000f0","#808070","#8080f0","#004030","#0040b0","#00c030","#00c0b0","#804030","#8040b0","#80c030","#80c0b0","#004070","#0040f0","#00c070","#00c0f0","#804070","#8040f0","#80c070","#80c0f0","#4000b0","#408030","#4080b0","#c00030","#c000b0","#c08030","#c080b0","#400070","#4000f0","#408070","#4080f0","#c00070","#c000f0","#c08070","#c080f0","#404030","#4040b0","#40c030","#40c0b0","#c04030","#c040b0","#c0c030","#c0c0b0","#404070","#4040f0","#40c070","#40c0f0","#c04070","#c040f0","#c0c070","#c0c0f0","#002090","#00a010","#00a090","#802010","#802090","#80a010","#80a090","#0020d0","#00a050","#00a0d0","#802050","#8020d0","#80a050","#80a0d0","#006010","#006090","#00e010","#00e090","#806010","#806090","#80e010","#80e090","#006050","#0060d0","#00e050","#00e0d0","#806050","#8060d0","#80e050","#80e0d0","#402090","#40a010","#40a090","#c02010","#c02090","#c0a010","#c0a090","#402050","#4020d0","#40a050","#40a0d0","#c02050","#c020d0","#c0a050","#c0a0d0","#406010","#406090","#40e010","#40e090","#c06010","#c06090","#c0e010","#c0e090","#406050","#4060d0","#40e050","#40e0d0","#c06050","#c060d0","#c0e050","#c0e0d0","#0020b0","#00a030","#00a0b0","#802030","#8020b0","#80a030","#80a0b0","#0020f0","#00a070","#00a0f0","#802070","#8020f0","#80a070","#80a0f0","#006030","#0060b0","#00e030","#00e0b0","#806030","#8060b0","#80e030","#80e0b0","#006070","#0060f0","#00e070","#00e0f0","#806070","#8060f0","#80e070","#80e0f0","#4020b0","#40a030","#40a0b0","#c02030","#c020b0","#c0a030","#c0a0b0","#4020f0","#40a070","#40a0f0","#c02070","#c020f0","#c0a070","#c0a0f0","#406030","#4060b0","#40e030","#40e0b0","#c06030","#c060b0","#c0e030","#c0e0b0","#406070","#4060f0","#40e070","#40e0f0","#c06070","#c060f0","#c0e070","#208010","#208090","#a00010","#a00090","#a08010","#a08090","#2000d0","#208050","#2080d0","#a00050","#a000d0","#a08050","#a080d0","#204010","#204090","#20c010","#20c090","#a04010","#a04090","#a0c010","#a0c090","#204050","#2040d0","#20c050","#20c0d0","#a04050","#a040d0","#a0c050","#a0c0d0","#600090","#608010","#608090","#e00010","#e00090","#e08010","#e08090","#600050","#6000d0","#608050","#6080d0","#e00050","#e000d0","#e08050","#e080d0","#604010","#604090","#60c010","#60c090","#e04010","#e04090","#e0c010","#e0c090","#604050","#6040d0","#60c050","#60c0d0","#e04050","#e040d0","#e0c050","#e0c0d0","#2000b0","#208030","#2080b0","#a00030","#a000b0","#a08030","#a080b0","#2000f0","#208070","#2080f0","#a00070","#a000f0","#a08070","#a080f0","#204030","#2040b0","#20c030","#20c0b0","#a04030","#a040b0","#a0c030","#a0c0b0","#204070","#2040f0","#20c070","#20c0f0","#a04070","#a040f0","#a0c070","#a0c0f0","#6000b0","#608030","#6080b0","#e00030","#e000b0","#e08030","#e080b0","#600070","#6000f0","#608070","#e00070","#e000f0","#e08070","#e080f0","#604030","#6040b0","#60c030","#60c0b0","#e04030","#e040b0","#e0c030","#e0c0b0","#604070","#6040f0","#60c070","#60c0f0","#e04070","#e040f0","#e0c070","#e0c0f0","#20a010","#20a090","#a02010","#a02090","#a0a010","#a0a090","#2020d0","#20a050","#20a0d0","#a02050","#a020d0","#a0a050","#a0a0d0","#206010","#206090","#20e010","#20e090","#a06010","#a06090","#a0e010","#a0e090","#206050","#2060d0","#20e050","#20e0d0","#a06050","#a060d0","#a0e050","#a0e0d0","#602090","#60a010","#60a090","#e02010","#e02090","#e0a010","#e0a090","#602050","#6020d0","#60a050","#60a0d0","#e02050","#e020d0","#e0a050","#e0a0d0","#606010","#606090","#60e010","#60e090","#e06010","#e06090","#e0e010","#e0e090","#606050","#6060d0","#60e050","#60e0d0","#e06050","#e060d0","#e0e050","#2020b0","#20a030","#20a0b0","#a02030","#a020b0","#a0a030","#a0a0b0","#2020f0","#20a070","#20a0f0","#a02070","#a020f0","#a0a070","#a0a0f0","#206030","#2060b0","#20e030","#20e0b0","#a06030","#a060b0","#a0e030","#a0e0b0","#206070","#2060f0","#20e070","#20e0f0","#a06070","#a060f0","#a0e070","#a0e0f0","#6020b0","#60a030","#60a0b0","#e02030","#e020b0","#e0a030","#e0a0b0","#6020f0","#60a070","#60a0f0","#e02070","#e020f0","#e0a070","#e0a0f0","#606030","#6060b0","#60e030","#60e0b0","#e06030","#e060b0","#e0e030","#e0e0b0","#606070","#6060f0","#60e070","#60e0f0","#e06070","#e060f0","#e0e070"],R3=(t,e=2)=>{if(t===null)return"null";const n=Math.abs(t);if(n>=1e24)return(t/1e24).toFixed(e)+"Y";if(n>=1e21)return(t/1e21).toFixed(e)+"Z";if(n>=1e18)return(t/1e18).toFixed(e)+"E";if(n>=1e15)return(t/1e15).toFixed(e)+"P";if(n>=1e12)return(t/1e12).toFixed(e)+"T";if(n>=1e9)return(t/1e9).toFixed(e)+"G";if(n>=1e6)return(t/1e6).toFixed(e)+"M";if(n>=1e3)return(t/1e3).toFixed(e)+"k";if(n>=1)return t.toFixed(e);if(n===0)return t.toFixed(e);if(n<1e-23)return(t/1e-24).toFixed(e)+"y";if(n<1e-20)return(t/1e-21).toFixed(e)+"z";if(n<1e-17)return(t/1e-18).toFixed(e)+"a";if(n<1e-14)return(t/1e-15).toFixed(e)+"f";if(n<1e-11)return(t/1e-12).toFixed(e)+"p";if(n<1e-8)return(t/1e-9).toFixed(e)+"n";if(n<1e-5)return(t/1e-6).toFixed(e)+"µ";if(n<.01)return(t/.001).toFixed(e)+"m";if(n<=1)return t.toFixed(e);throw Error("couldn't format a value, this is a bug")},u9=8,h9=t=>new Set(t).size!==t.length,a2e=t=>{const e=t.map(n=>R3(n));if(!h9(e))return e;for(let n=3;n<=u9;n++){const r=t.map(i=>R3(i,n));if(!h9(r))return r}return t.map(n=>R3(n,u9))},Yx=t=>{const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(t).replace(/[&<>"'/]/g,function(n){return e[n]})},o2e=t=>`
            <div class="labels">
              ${Object.keys(t).length===0?'<div class="no-labels">no labels</div>':""}
              ${t.__name__?`<div><strong>${Yx(t.__name__)}</strong></div>`:""}
              ${Object.keys(t).filter(e=>e!=="__name__").map(e=>`<div><strong>${Yx(e)}</strong>: ${Yx(t[e])}</div>`).join("")}
            </div>`,l2e=(t,e)=>{let n,r=null;const i=document.createElement("div");return i.className="u-tooltip",i.style.display="none",{hooks:{init:s=>{n=s.over,n.addEventListener("mouseenter",()=>{i.style.display="block"}),n.addEventListener("mouseleave",()=>{i.style.display="none"}),document.body.appendChild(i)},destroy:()=>{i.remove()},setSeries:(s,o,l)=>{r=o},setCursor:s=>{const{left:o,top:l,idx:u}=s.cursor;if(u==null||o===null||o===void 0||l===null||l===void 0||r===null)return;const h=s.data[0][u],f=e[r][u],p=s.series[r],m=p.labels;if(typeof p.stroke!="function")throw new Error("series.stroke is not a function");const v=p.stroke(s,r),y=n.getBoundingClientRect(),x=o+y.left,w=l+y.top;i.innerHTML=`
            <div class="date">${mf(h,t)}</div>
            <div class="series-value">
              <span class="detail-swatch" style="background-color: ${v}"></span>
              <span>${m.__name__?Yx(m.__name__)+": ":" "}<strong>${f}</strong></span>
            </div>
            ${o2e(m)}
          `.trimEnd(),ZP({getBoundingClientRect(){return{width:0,height:0,x,y:w,left:x,right:x,top:w,bottom:w}}},i,{placement:"right-start",middleware:[GP(5),KP(),XP()]}).then(({x:S,y:C})=>{Object.assign(i.style,{top:`${C}px`,left:`${S}px`})})}}}},c2e=(t,e,n,r)=>{const i=t.axes[n];if(r>1)return i._size;let s=i.ticks.size+i.gap;const o=(e??[]).reduce((l,u)=>u.length>l.length?u:l,"");return o!=""&&(t.ctx.font=i.font[0],s+=t.ctx.measureText(o).width/devicePixelRatio),Math.ceil(s)},u2e=(t,e,n,r)=>{const i=[],s=t.series[e];if(!n&&r&&r.length){const[o,l]=s.idxs,u=t.data[0],h=t.data[e],f=Math.round(t.valToPos(u[o],"x",!0)),p=Math.round(t.valToPos(u[l],"x",!0));r[0][0]===f&&i.push(o);for(let m=0;m<r.length;m++){const v=r[m],y=r[m+1];if(y&&v[1]===y[0]){let x=t.posToIdx(v[1],!0);if(h[x]==null)for(let w=1;w<100;w++){if(h[x+w]!=null){x+=w;break}if(h[x-w]!=null){x-=w;break}}i.push(x)}}r[r.length-1][1]===p&&i.push(l)}return i.length?i:null},h2e=(t,e,n,r,i,s,o)=>({width:e-30,height:550,cursor:{focus:{prox:1e3},drag:{x:!0,setScale:!1}},tzDate:r?void 0:l=>Mi.tzDate(new Date(l*1e3),"Etc/UTC"),plugins:[l2e(r,t)],legend:{show:!0,live:!1,isolate:!0,markers:{fill:(l,u)=>l9(u-1,s)}},drawOrder:["series","axes"],focus:{alpha:1},scales:i!==null?{y:{range:(l,u,h)=>{const f=Mi.rangeNum(i,h,.1,!0);return[i,f[1]]}}}:void 0,axes:[{space:80,labelSize:20,stroke:s?"#333":"#eee",ticks:{stroke:s?"#00000010":"#ffffff20"},grid:{show:!0,stroke:s?"#00000010":"#ffffff20",width:2,dash:[]},values:[[3600*24*365,"{YYYY}",null,null,null,null,null,null,1],[3600*24*28,"{MMM}",`
{YYYY}`,null,null,null,null,null,1],[3600*24,"{MMM} {D}",`
{YYYY}`,null,null,null,null,null,1],[3600,"{HH}:{mm}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[60,"{HH}:{mm}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[1,"{HH}:{mm}:{ss}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1],[.001,"{HH}:{mm}:{ss}.{fff}",`
{MMM} {D} '{YY}`,null,`
{MMM} {D}`,null,null,null,1]]},{values:(l,u)=>a2e(u),ticks:{stroke:s?"#00000010":"#ffffff20"},grid:{show:!0,stroke:s?"#00000010":"#ffffff20",width:2,dash:[]},labelGap:8,labelSize:28,stroke:s?"#333":"#eee",size:c2e}],series:[{},...n.map((l,u)=>({points:{filter:u2e},label:KV(l.metric),width:1.5,labels:l.metric,stroke:l9(u,s)}))],hooks:{setSelect:[l=>{const u=l.posToVal(l.select.left,"x"),h=Math.max(l.posToVal(l.select.left+l.select.width,"x"),u+1);o(u,h)}]}}),d9=t=>{const e=parseFloat(t);return isNaN(e)?null:e},d2e=(t,e,n,r)=>{const i=[];for(let o=e;o<=n;o+=r)i.push(o);const s=t.map(({values:o,histograms:l})=>{const u=[];let h=0,f=0;for(let p=e;p<=n;p+=r){const m=o&&o[h],v=l&&l[f];m&&o.length>h&&m[0]<p+r/100?(u.push(d9(m[1])),h++):v&&l.length>f&&v[0]<p+r/100?(u.push(d9(v[1].sum)),f++):u.push(null)}return u});return[i,...s]};function f9(t,e){const n=[];let r=[];const i=t[0].length,s=Array(i);for(let o=0;o<i;o++)s[o]=0;for(let o=1;o<t.length;o++)n.push(e(o)?t[o]:t[o].map((l,u)=>s[u]+=+(l||0)));for(let o=1;o<t.length;o++)e(o)||r.push({series:[t.findIndex((l,u)=>u>o&&!e(u)),o]});return r=r.filter(o=>o.series[1]>-1),{data:[t[0]].concat(n),bands:r}}function f2e(t,e){const n=f9(e,r=>!1);return t.bands=n.bands,t.cursor=t.cursor||{},t.cursor.dataIdx=(r,i,s,o)=>e[i][s]==null?null:s,t.series.forEach(r=>{r.points=r.points||{},r.stroke&&(r.fill=mP(r.stroke,.6)),r.points.filter=(i,s,o,l)=>{if(o){const u=[];return e[s].forEach((h,f)=>{h!=null&&u.push(f)}),u}return null}}),t.scales=t.scales||{},t.scales.y={range:(r,i,s)=>[0,Mi.rangeNum(0,s,.1,!0)[1]]},t.hooks=t.hooks||{},t.hooks.setSeries=t.hooks.setSeries||[],t.hooks.setSeries.push((r,i,s)=>{if(s.show!=null){const o=f9(e,l=>!r.series[l].show);r.delBand(null),o.bands.forEach(l=>r.addBand(l)),r.setData(o.data)}}),{opts:t,data:n.data}}const p2e=({data:t,range:{startTime:e,endTime:n,resolution:r},width:i,displayMode:s,yAxisMin:o,onSelectRange:l})=>{const[u,h]=E.useState(null),[f,p]=E.useState(null),{useLocalTime:m}=hi(),v=xw();if(E.useEffect(()=>{if(i===0)return;const y=d2e(t,e,n,r),x=h2e(y,i,t,m,o,v==="light",l);s===Rm.Stacked?p(f2e(x,y).data):p(y),h(x)},[i,t,s,e,n,r,m,v,l,o]),!(u===null||f===null))return a.jsxs(a.Fragment,{children:[a.jsx(s2e,{options:u,data:f,className:uV.uplotChart}),a.jsxs(dt,{fz:"xs",c:"dimmed",ml:40,mt:-25,mb:"lg",children:["Click: show single series,"," ",navigator.userAgent.includes("Mac")?"⌘":"Ctrl"," + click: hide single series"]})]})},m2e=({expr:t,node:e,endTime:n,range:r,resolution:i,showExemplars:s,displayMode:o,yAxisMin:l,retriggerIdx:u,onSelectRange:h})=>{const{ref:f,width:p}=BX(),[m,v]=E.useState(!0),{showQueryWarnings:y,showQueryInfoNotices:x}=hi(),w=e===null?t:cs(e.type===yt.matrixSelector?{type:yt.vectorSelector,name:e.name,matchers:e.matchers,offset:e.offset,timestamp:e.timestamp,startOrEnd:e.startOrEnd,anchored:e.anchored,smoothed:e.smoothed}:e),A=(n!==null?n:Date.now())/1e3,S=A-r/1e3,C=kx(i,r)/1e3,{data:j,error:_,isFetching:O,isLoading:M,refetch:R}=Vh({key:[E.useId()],path:"/query_range",params:{query:w,step:C.toString(),start:S.toString(),end:A.toString()},enabled:w!==""}),[N,B]=E.useState(null),D=(U,H)=>a.jsxs(a.Fragment,{children:[y&&(U==null?void 0:U.map((z,I)=>a.jsx(Mt,{color:"red",title:"Query warning",icon:a.jsx(Ei,{}),children:z},I))),x&&(H==null?void 0:H.map((z,I)=>a.jsx(Mt,{color:"yellow",title:"Query notice",icon:a.jsx(Kn,{}),children:z},I)))]});if(E.useEffect(()=>{j!==void 0&&B({data:j,range:{startTime:S,endTime:A,resolution:C}})},[j]),E.useEffect(()=>{w!==""&&R()},[u,R,w,n,r,i]),E.useEffect(()=>{N!==null&&m&&v(!1)},[N,m,v]),M)return a.jsx(be,{children:Array.from(Array(5),(U,H)=>a.jsx(Qa,{height:30,mb:15},H))});if(_)return a.jsx(Mt,{color:"red",title:"Error executing query",icon:a.jsx(Ei,{}),children:_.message});if(N===null)return a.jsx(Mt,{variant:"transparent",children:"No data queried yet"});const{result:L}=N.data.data;return L.length===0?a.jsxs(xn,{children:[a.jsx(Mt,{title:"Empty query result",icon:a.jsx(Kn,{}),children:"This query returned no data."}),D(N.data.warnings)]}):a.jsxs(xn,{children:[e!==null&&e.type===yt.matrixSelector&&a.jsxs(Mt,{color:"orange",title:"Graphing modified expression",icon:a.jsx(Ei,{}),children:[a.jsx("strong",{children:"Note:"})," Range vector selectors can't be graphed, so graphing the equivalent instant vector selector instead."]}),D(N.data.warnings,N.data.infos),a.jsxs(be,{pos:"relative",ref:f,className:uV.chartWrapper,children:[a.jsx(Ww,{visible:O,zIndex:1e3,h:570,overlayProps:{radius:"sm",blur:.5},loaderProps:{type:"dots",color:"gray.6"}}),a.jsx(p2e,{data:N.data.data.result,range:N.range,width:p,showExemplars:s,displayMode:o,yAxisMin:l,onSelectRange:h})]})]})},g2e=({resolution:t,range:e,onChangeResolution:n})=>{const[r,i]=E.useState(Hn(kx(t,e))),s=o=>{const l=n6(o);t.type==="custom"&&l===t.step||(l===null?i(Hn(kx(t,e))):n({type:"custom",step:l}))};return a.jsxs(a.Fragment,{children:[a.jsx(o0,{title:"Resolution",placeholder:"Resolution",maxDropdownHeight:500,data:[{group:"Automatic resolution",items:[{label:"Low res.",value:"low"},{label:"Medium res.",value:"medium"},{label:"High res.",value:"high"}]},{group:"Fixed resolution",items:[{label:"10s",value:"10000"},{label:"30s",value:"30000"},{label:"1m",value:"60000"},{label:"5m",value:"300000"},{label:"15m",value:"900000"},{label:"1h",value:"3600000"}]},{group:"Custom resolution",items:[{label:"Enter value...",value:"custom"}]}],w:160,value:t.type==="auto"?t.density:t.type==="fixed"?t.step.toString():"custom",onChange:(o,l)=>{if(["low","medium","high"].includes(l.value)){n({type:"auto",density:l.value});return}if(l.value==="custom"){const h=kx(t,e);n({type:"custom",step:h}),i(Hn(h));return}const u=parseInt(l.value);if(!isNaN(u))n({type:"fixed",step:u});else throw new Error("Invalid resolution value")}}),t.type==="custom"&&a.jsx(ic,{placeholder:"Resolution",value:r,onChange:o=>i(o.currentTarget.value),onBlur:()=>s(r),onKeyDown:o=>o.key==="Enter"&&s(r),"aria-label":"Range",style:{width:`calc(44px + ${r.length+3}ch)`}})]})};var Gx={exports:{}},v2e=Gx.exports,p9;function b2e(){return p9||(p9=1,function(t,e){(function(n,r){t.exports=r()})(v2e,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,s,o){var l,u=function(m,v,y){y===void 0&&(y={});var x=new Date(m),w=function(A,S){S===void 0&&(S={});var C=S.timeZoneName||"short",j=A+"|"+C,_=r[j];return _||(_=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[j]=_),_}(v,y);return w.formatToParts(x)},h=function(m,v){for(var y=u(m,v),x=[],w=0;w<y.length;w+=1){var A=y[w],S=A.type,C=A.value,j=n[S];j>=0&&(x[j]=parseInt(C,10))}var _=x[3],O=_===24?0:_,M=x[0]+"-"+x[1]+"-"+x[2]+" "+O+":"+x[4]+":"+x[5]+":000",R=+m;return(o.utc(M).valueOf()-(R-=R%1e3))/6e4},f=s.prototype;f.tz=function(m,v){m===void 0&&(m=l);var y,x=this.utcOffset(),w=this.toDate(),A=w.toLocaleString("en-US",{timeZone:m}),S=Math.round((w-new Date(A))/1e3/60),C=15*-Math.round(w.getTimezoneOffset()/15)-S;if(!Number(C))y=this.utcOffset(0,v);else if(y=o(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),v){var j=y.utcOffset();y=y.add(x-j,"minute")}return y.$x.$timezone=m,y},f.offsetName=function(m){var v=this.$x.$timezone||o.tz.guess(),y=u(this.valueOf(),v,{timeZoneName:m}).find(function(x){return x.type.toLowerCase()==="timezonename"});return y&&y.value};var p=f.startOf;f.startOf=function(m,v){if(!this.$x||!this.$x.$timezone)return p.call(this,m,v);var y=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(y,m,v).tz(this.$x.$timezone,!0)},o.tz=function(m,v,y){var x=y&&v,w=y||v||l,A=h(+o(),w);if(typeof m!="string")return o(m).tz(w);var S=function(O,M,R){var N=O-60*M*1e3,B=h(N,R);if(M===B)return[N,M];var D=h(N-=60*(B-M)*1e3,R);return B===D?[N,B]:[O-60*Math.min(B,D)*1e3,Math.max(B,D)]}(o.utc(m,x).valueOf(),A,w),C=S[0],j=S[1],_=o(C).utcOffset(j);return _.$x.$timezone=w,_},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(m){l=m}}})}(Gx)),Gx.exports}var y2e=b2e();const ZV=pl(y2e),x2e="_metricName_13uqi_1",A2e="_labelPair_13uqi_4",w2e="_labelName_13uqi_14",S2e="_labelValue_13uqi_18",_g={metricName:x2e,labelPair:A2e,labelName:w2e,labelValue:S2e},j2e=t=>{"clipboard"in navigator?navigator.clipboard.writeText(t).then(()=>ol.show({title:"Copied matcher!",message:`Label matcher ${t} copied to clipboard`})).catch(()=>ol.show({color:"red",title:"Failed to copy matcher!",message:"Label matcher could not be copied to clipboard."})):ol.show({color:"red",title:"Failed to copy matcher!",message:"Clipboard API is not supported in this context (most likely due to non-HTTPS origin)."})},sm=({labels:t,format:e})=>{const n=()=>{const r=t&&oS(t.__name__||""),i=[];let s=!0;r&&(i.push(a.jsx("span",{children:a.jsxs("span",{className:_g.labelValue,children:['"',Ih(t.__name__),'"']})},"__name__")),s=!1);for(const o in t)o!=="__name__"&&(i.push(a.jsxs("span",{children:[!s&&", ",a.jsxs("span",{className:_g.labelPair,onDoubleClick:l=>j2e(l.currentTarget.innerText),title:"Double click to copy label matcher",children:[a.jsx("span",{className:_g.labelName,children:Gh(o)}),"=",a.jsxs("span",{className:_g.labelValue,children:['"',Ih(t[o]),'"']})]})]},o)),s&&(s=!1));return a.jsxs("span",{children:[!r&&a.jsx("span",{className:_g.metricName,children:t?t.__name__:""}),"{",i,"}"]})};return t===null?a.jsx(a.Fragment,{children:"scalar"}):e?n():a.jsx(a.Fragment,{children:KV(t)})},C2e="_tableWrapper_n77eh_1",_2e="_numberCell_n77eh_7",lx={tableWrapper:C2e,numberCell:_2e};function T2e(t,e){if(parseFloat(t[2])===0||parseFloat(t[1])===0){if(e.length>1)return Math.abs(Math.log(Math.abs(parseFloat(e[e.length-2][2])))-Math.log(Math.abs(parseFloat(e[e.length-2][1]))));throw new Error("Only one bucket in histogram ([-0, 0]). Cannot calculate defaultExpBucketWidth.")}else return Math.abs(Math.log(Math.abs(parseFloat(t[2])))-Math.log(Math.abs(parseFloat(t[1]))))}function k2e(t){if(!t||t.length===0)return 0;for(let e=0;e<t.length;e++){const n=parseFloat(t[e][2]),r=parseFloat(t[e][1]);if(r>0)return r;if(r<0&&n>0||e===t.length-1&&n>0)return n}return 0}function O2e(t){if(!t||t.length===0)return 0;for(let e=0;e<t.length;e++){const n=parseFloat(t[e][2]),r=parseFloat(t[e][1]),i=e>0?parseFloat(t[e-1][2]):0;if(n>=0)return e===0?r<0?r:0:i}return console.log("findmaxneg returning: ",t[t.length-1][2]),parseFloat(t[t.length-1][2])}function E2e(t,e,n,r,i,s,o,l,u){return t==="linear"?(0-e)/(n-e)*100+"%":i===0?"0%":r===0?"100%":s===-1?o/l*100+"%":(o+.5*u)/l>0?(o+.5*u)/l*100+"%":"0%"}function M2e(t){const e=parseFloat(t.slice(0,-1));return 5<e&&e<95}function R2e(t){for(let e=0;e<t.length;e++){const n=parseFloat(t[e][1]),r=parseFloat(t[e][2]);if(n<=0&&r>=0)return e}return-1}const D2e=t=>t===3||t===1?"[":"(",N2e=t=>t===3||t===0?"]":")",JV=([t,e,n,r])=>`${D2e(t)}${e} -> ${n}${N2e(t)}`,I2e="_histogramYWrapper_4ql1n_1",B2e="_histogramYLabels_4ql1n_10",L2e="_histogramYLabel_4ql1n_10",P2e="_histogramXWrapper_4ql1n_22",F2e="_histogramXLabels_4ql1n_29",z2e="_histogramXLabel_4ql1n_29",H2e="_histogramContainer_4ql1n_40",q2e="_histogramAxes_4ql1n_46",$2e="_histogramYGrid_4ql1n_55",Q2e="_histogramYTick_4ql1n_61",U2e="_histogramXGrid_4ql1n_69",W2e="_histogramXTick_4ql1n_76",V2e="_histogramBucketSlot_4ql1n_84",Y2e="_histogramBucket_4ql1n_84",qi={histogramYWrapper:I2e,histogramYLabels:B2e,histogramYLabel:L2e,histogramXWrapper:P2e,histogramXLabels:F2e,histogramXLabel:z2e,histogramContainer:H2e,histogramAxes:q2e,histogramYGrid:$2e,histogramYTick:Q2e,histogramXGrid:U2e,histogramXTick:W2e,histogramBucketSlot:V2e,histogramBucket:Y2e},G2e=({index:t,histogram:e,scale:n})=>{const{buckets:r}=e;if(!r||r.length===0)return a.jsx("div",{children:"No data"});const i=Intl.NumberFormat("en",{notation:"compact"}),s=[];for(const D of r){const L=parseFloat(D[1]),U=parseFloat(D[2]),H=parseFloat(D[3]),z=U-L;if(z===0){s.push(0);continue}s.push(H/z)}const o=Math.max(...s),l=r[0],u=r[r.length-1],h=parseFloat(u[2]),f=parseFloat(l[1]),p=Math.max(...r.map(D=>parseFloat(D[3]))),m=T2e(u,r),v=h>0?h:0,y=k2e(r),x=O2e(r),w=parseFloat(l[1])<0?parseFloat(l[1]):0,A=w!==0?-Math.log(Math.abs(w)):0,S=x!==0?-Math.log(Math.abs(x)):0,C=y!==0?Math.log(y):0,j=v!==0?Math.log(v):0,_=S-A,O=j-C,M=_+m+O,R=R2e(r),N=E2e(n,f,h,y,x,R,_,M,m),B=M2e(N);return a.jsxs("div",{className:qi.histogramYWrapper,children:[a.jsxs("div",{className:qi.histogramYLabels,children:[[1,.75,.5,.25].map(D=>a.jsx("div",{className:qi.histogramYLabel,children:n==="linear"?"":i.format(p*D)},D)),a.jsx("div",{className:qi.histogramYLabel,style:{height:0},children:"0"},0)]}),a.jsxs("div",{className:qi.histogramXWrapper,children:[a.jsxs("div",{className:qi.histogramContainer,children:[[0,.25,.5,.75,1].map(D=>a.jsxs(Ln.Fragment,{children:[a.jsx("div",{className:qi.histogramYGrid,style:{bottom:D*100+"%"}}),a.jsx("div",{className:qi.histogramYTick,style:{bottom:D*100+"%"}}),a.jsx("div",{className:qi.histogramXGrid,style:{left:D*100+"%"}})]},D)),a.jsx("div",{className:qi.histogramXTick,style:{left:"0%"}}),a.jsx("div",{className:qi.histogramXTick,style:{left:N}}),a.jsx("div",{className:qi.histogramXGrid,style:{left:N}}),a.jsx("div",{className:qi.histogramXTick,style:{left:"100%"}}),a.jsx(X2e,{buckets:r,scale:n,rangeMin:f,rangeMax:h,index:t,fds:s,fdMax:o,countMax:p,defaultExpBucketWidth:m,minPositive:y,maxNegative:x,startPositive:C,startNegative:A,xWidthNegative:_,xWidthTotal:M}),a.jsx("div",{className:qi.histogramAxes})]}),a.jsx("div",{className:qi.histogramXLabels,children:a.jsx("div",{className:qi.histogramXLabel,children:a.jsxs(Ln.Fragment,{children:[a.jsx("div",{style:{position:"absolute",left:0},children:i.format(f)}),f<0&&B&&a.jsx("div",{style:{position:"absolute",left:N},children:"0"}),a.jsx("div",{style:{position:"absolute",right:0},children:i.format(h)})]})})})]})]})},X2e=({buckets:t,scale:e,rangeMin:n,rangeMax:r,index:i,fds:s,fdMax:o,countMax:l,defaultExpBucketWidth:u,minPositive:h,maxNegative:f,startPositive:p,startNegative:m,xWidthNegative:v,xWidthTotal:y})=>a.jsx(Ln.Fragment,{children:t.map((x,w)=>{const A=parseFloat(x[1]),S=parseFloat(x[2]),C=parseFloat(x[3]),j=`bucket-${i}-${w}-${Math.ceil(parseFloat(x[3])*100)}`,_=Math.abs(Math.log(Math.abs(S))-Math.log(Math.abs(A))),O=_===0?u:_;let M="",R="",N="";switch(e){case"linear":{M=(S-A)/(r-n)*100+"%",R=(A-n)/(r-n)*100+"%",A===0&&S===0&&(R="0%",M="0%"),N=s[w]/o*100+"%";break}case"exponential":{let B=0;(h===0||f===0)&&(B=u),M=O/(y-B)*100+"%",A<0?R=-(Math.log(Math.abs(A))+m)/(y-B)*100+"%":R=(Math.log(A)-p+u+v-B)/(y-B)*100+"%",A<0&&S>0&&(R=v/y*100+"%"),A===0&&S===0&&(R="0%",M="0%"),N=C/l*100+"%";break}default:throw new Error("Invalid scale")}return a.jsx(qr,{label:`range: ${JV(x)}`,children:a.jsx("div",{id:j,className:qi.histogramBucketSlot,style:{left:R,width:M},children:a.jsx("div",{id:j,className:qi.histogramBucket,style:{height:N}})})},w)})});Pe.extend(ZV);const m9=1e3,dw=1e4,g9=(t,e)=>e&&t.length>dw?t.slice(0,dw):t,K2e=({data:t,limitResults:e,setLimitResults:n})=>{const[r,i]=E.useState("exponential"),{useLocalTime:s}=hi(),{result:o,resultType:l}=t,u=o.length<=m9;return a.jsxs(xn,{gap:"lg",mt:0,children:[e&&["vector","matrix"].includes(l)&&o.length>dw&&a.jsxs(Mt,{color:"orange",icon:a.jsx(Ei,{}),title:"Showing limited results",children:["Fetched ",t.result.length," metrics, only displaying first"," ",dw," for performance reasons.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>n(!1),children:"Show all results"})]}),!u&&a.jsxs(Mt,{title:"Formatting turned off",icon:a.jsx(Kn,{}),children:["Showing more than ",m9," series, turning off label formatting to improve rendering performance."]}),a.jsx(be,{pos:"relative",className:lx.tableWrapper,children:a.jsx(se,{fz:"xs",children:a.jsx(se.Tbody,{children:l==="vector"?g9(o,e).map((h,f)=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsx(sm,{labels:h.metric,format:u})}),a.jsxs(se.Td,{className:lx.numberCell,children:[h.value&&h.value[1],h.histogram&&a.jsxs(xn,{children:[a.jsx(G2e,{histogram:h.histogram[1],index:f,scale:r}),a.jsxs(ut,{justify:"space-between",align:"center",p:10,children:[a.jsxs(ut,{align:"center",gap:"1rem",children:[a.jsxs("span",{children:[a.jsx("strong",{children:"Count:"})," ",h.histogram[1].count]}),a.jsxs("span",{children:[a.jsx("strong",{children:"Sum:"})," ",h.histogram[1].sum]})]}),a.jsxs(ut,{align:"center",gap:"1rem",children:[a.jsx("span",{children:"x-axis scale:"}),a.jsx(a0,{size:"xs",value:r,onChange:i,data:["exponential","linear"]})]})]}),Z2e(h.histogram[1])]})]})]},f)):l==="matrix"?g9(o,e).map((h,f)=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsx(sm,{labels:h.metric,format:u})}),a.jsx(se.Td,{className:lx.numberCell,children:h.values&&h.values.map((p,m)=>a.jsxs("div",{children:[p[1]," ",a.jsxs(dt,{span:!0,c:"gray.7",size:"1em",title:mf(p[0],s),children:["@ ",p[0]]})]},m))})]},f)):l==="scalar"?a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:"Scalar value"}),a.jsx(se.Td,{className:lx.numberCell,children:o[1]})]}):l==="string"?a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:"String value"}),a.jsx(se.Td,{children:o[1]})]}):a.jsx(Mt,{color:"red",title:"Invalid query response",icon:a.jsx(Ei,{}),children:"Invalid result value type"})})})})]})},Z2e=t=>{var e;return a.jsx(se,{withTableBorder:!0,fz:"xs",children:a.jsxs(se.Tbody,{style:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[a.jsxs(se.Tr,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[a.jsx(se.Th,{children:"Bucket range"}),a.jsx(se.Th,{children:"Count"})]}),a.jsx(ma,{w:"100%",h:265,children:(e=t.buckets)==null?void 0:e.map((n,r)=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{style:{textAlign:"left"},children:JV(n)}),a.jsx(se.Td,{children:n[3]})]},r))})]})})},v9=t=>a.jsx(se,{withRowBorders:!1,children:a.jsx(se.Tbody,{children:Object.entries(t).map(([e,n])=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{pl:0,py:3,c:"dimmed",children:e}),a.jsx(se.Td,{pr:0,py:3,ta:"right",children:n})]},e))})}),J2e=({numResults:t,responseTime:e,stats:n})=>a.jsx(qr,{label:a.jsxs(be,{p:"xs",children:[a.jsx(dt,{mb:"xs",children:"Timing stats (s):"}),v9(n.timings),a.jsx(dt,{mt:"sm",mb:"xs",children:"Sample stats:"}),v9(n.samples)]}),children:a.jsxs(dt,{size:"xs",c:"gray",children:["Load time: ",e,"ms   Result series: ",t]})});Pe.extend(ZV);const eSe=({panelIdx:t,retriggerIdx:e,expr:n})=>{var A,S;const[r,i]=E.useState(0),[s,o]=E.useState(!0),{visualizer:l}=ac(C=>C.queryPage.panels[t]),u=pu(),{showQueryWarnings:h,showQueryInfoNotices:f}=hi(),{endTime:p,range:m}=l,{data:v,error:y,isFetching:x,refetch:w}=Vh({key:[E.useId()],path:"/query",params:{query:n,time:`${(p!==null?p:Date.now())/1e3}`,stats:"true"},enabled:n!=="",recordResponseTime:i});return E.useEffect(()=>{n!==""&&w()},[e,w,n,p]),E.useLayoutEffect(()=>{o(!0)},[v,x]),a.jsxs(xn,{gap:"lg",mt:"sm",children:[a.jsxs(ut,{justify:"space-between",children:[a.jsx(t$,{time:p,range:m,description:"Evaluation time",onChangeTime:C=>u(nh({idx:t,visualizer:{...l,endTime:C}}))}),!x&&v!==void 0&&a.jsx(J2e,{numResults:v.data.result.length,responseTime:r,stats:v.data.stats})]}),x?a.jsx(be,{children:Array.from(Array(5),(C,j)=>a.jsx(Qa,{height:30,mb:15},j))}):y!==null?a.jsx(Mt,{color:"red",title:"Error executing query",icon:a.jsx(Ei,{}),children:y.message}):v===void 0?a.jsx(Mt,{variant:"transparent",children:"No data queried yet"}):a.jsxs(a.Fragment,{children:[v.data.result.length===0&&a.jsx(Mt,{title:"Empty query result",icon:a.jsx(Kn,{}),children:"This query returned no data."}),h&&((A=v.warnings)==null?void 0:A.map((C,j)=>a.jsx(Mt,{color:"red",title:"Query warning",icon:a.jsx(Ei,{}),children:C},j))),f&&((S=v.infos)==null?void 0:S.map((C,j)=>a.jsx(Mt,{color:"yellow",title:"Query notice",icon:a.jsx(Kn,{}),children:C},j))),a.jsx(K2e,{data:v.data,limitResults:s,setLimitResults:o})]})]})},tSe="_nodeText_1076s_1",nSe="_nodeTextSelected_1076s_10",rSe="_nodeTextError_1076s_27",iSe="_errorText_1076s_34",cx={nodeText:tSe,nodeTextSelected:nSe,nodeTextError:rSe,errorText:iSe},sSe={abs:{argTypes:[oe.vector],returnType:oe.vector},absent:{argTypes:[oe.vector],returnType:oe.vector},absent_over_time:{argTypes:[oe.matrix],returnType:oe.vector},acos:{argTypes:[oe.vector],returnType:oe.vector},acosh:{argTypes:[oe.vector],returnType:oe.vector},asin:{argTypes:[oe.vector],returnType:oe.vector},asinh:{argTypes:[oe.vector],returnType:oe.vector},atan:{argTypes:[oe.vector],returnType:oe.vector},atanh:{argTypes:[oe.vector],returnType:oe.vector},avg_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ceil:{argTypes:[oe.vector],returnType:oe.vector},changes:{argTypes:[oe.matrix],returnType:oe.vector},clamp:{argTypes:[oe.vector,oe.scalar,oe.scalar],returnType:oe.vector},clamp_max:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},clamp_min:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},cos:{argTypes:[oe.vector],returnType:oe.vector},cosh:{argTypes:[oe.vector],returnType:oe.vector},count_over_time:{argTypes:[oe.matrix],returnType:oe.vector},day_of_month:{argTypes:[oe.vector],returnType:oe.vector},day_of_week:{argTypes:[oe.vector],returnType:oe.vector},day_of_year:{argTypes:[oe.vector],returnType:oe.vector},days_in_month:{argTypes:[oe.vector],returnType:oe.vector},deg:{argTypes:[oe.vector],returnType:oe.vector},delta:{argTypes:[oe.matrix],returnType:oe.vector},deriv:{argTypes:[oe.matrix],returnType:oe.vector},double_exponential_smoothing:{argTypes:[oe.matrix,oe.scalar,oe.scalar],returnType:oe.vector},end:{returnType:oe.scalar},exp:{argTypes:[oe.vector],returnType:oe.vector},first_over_time:{argTypes:[oe.matrix],returnType:oe.vector},floor:{argTypes:[oe.vector],returnType:oe.vector},histogram_avg:{argTypes:[oe.vector],returnType:oe.vector},histogram_count:{argTypes:[oe.vector],returnType:oe.vector},histogram_fraction:{argTypes:[oe.scalar,oe.scalar,oe.vector],returnType:oe.vector},histogram_quantile:{argTypes:[oe.scalar,oe.vector],returnType:oe.vector},histogram_quantiles:{argTypes:[oe.vector,oe.string,oe.scalar,oe.scalar],returnType:oe.vector},histogram_stddev:{argTypes:[oe.vector],returnType:oe.vector},histogram_stdvar:{argTypes:[oe.vector],returnType:oe.vector},histogram_sum:{argTypes:[oe.vector],returnType:oe.vector},hour:{argTypes:[oe.vector],returnType:oe.vector},idelta:{argTypes:[oe.matrix],returnType:oe.vector},increase:{argTypes:[oe.matrix],returnType:oe.vector},info:{argTypes:[oe.vector,oe.vector],returnType:oe.vector},irate:{argTypes:[oe.matrix],returnType:oe.vector},label_join:{argTypes:[oe.vector,oe.string,oe.string,oe.string],returnType:oe.vector},label_replace:{argTypes:[oe.vector,oe.string,oe.string,oe.string,oe.string],returnType:oe.vector},last_over_time:{name:"last_over_time",argTypes:[oe.matrix],variadic:0,returnType:oe.vector},ln:{argTypes:[oe.vector],returnType:oe.vector},log10:{argTypes:[oe.vector],returnType:oe.vector},log2:{argTypes:[oe.vector],returnType:oe.vector},mad_over_time:{argTypes:[oe.matrix],returnType:oe.vector},max_over_time:{argTypes:[oe.matrix],returnType:oe.vector},min_over_time:{argTypes:[oe.matrix],returnType:oe.vector},minute:{argTypes:[oe.vector],returnType:oe.vector},month:{argTypes:[oe.vector],returnType:oe.vector},pi:{returnType:oe.scalar},predict_linear:{argTypes:[oe.matrix,oe.scalar],returnType:oe.vector},present_over_time:{argTypes:[oe.matrix],returnType:oe.vector},quantile_over_time:{argTypes:[oe.scalar,oe.matrix],returnType:oe.vector},rad:{argTypes:[oe.vector],returnType:oe.vector},range:{returnType:oe.scalar},rate:{argTypes:[oe.matrix],returnType:oe.vector},resets:{argTypes:[oe.matrix],returnType:oe.vector},round:{argTypes:[oe.vector,oe.scalar],returnType:oe.vector},scalar:{argTypes:[oe.vector],returnType:oe.scalar},sgn:{argTypes:[oe.vector],returnType:oe.vector},sin:{argTypes:[oe.vector],returnType:oe.vector},sinh:{argTypes:[oe.vector],returnType:oe.vector},sort:{argTypes:[oe.vector],returnType:oe.vector},sort_by_label:{argTypes:[oe.vector,oe.string],returnType:oe.vector},sort_by_label_desc:{argTypes:[oe.vector,oe.string],returnType:oe.vector},sort_desc:{argTypes:[oe.vector],returnType:oe.vector},sqrt:{argTypes:[oe.vector],returnType:oe.vector},start:{returnType:oe.scalar},stddev_over_time:{argTypes:[oe.matrix],returnType:oe.vector},stdvar_over_time:{argTypes:[oe.matrix],returnType:oe.vector},step:{returnType:oe.scalar},sum_over_time:{argTypes:[oe.matrix],returnType:oe.vector},tan:{argTypes:[oe.vector],returnType:oe.vector},tanh:{argTypes:[oe.vector],returnType:oe.vector},time:{returnType:oe.scalar},timestamp:{argTypes:[oe.vector],returnType:oe.vector},ts_of_first_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_last_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_max_over_time:{argTypes:[oe.matrix],returnType:oe.vector},ts_of_min_over_time:{argTypes:[oe.matrix],returnType:oe.vector},vector:{argTypes:[oe.scalar],returnType:oe.vector},year:{argTypes:[oe.vector],returnType:oe.vector}},Tg=20,D3=10,b9=10,N3={width:fe(18),height:fe(18)},aSe=t=>t.includes("error")?"error":t.includes("waiting")?"waiting":t.includes("running")?"running":"success",Xx=({node:t,selectedNode:e,setSelectedNode:n,parentEl:r,reportNodeState:i,reverse:s,childIdx:o})=>{const l=Ri(),[u,h]=E.useState(null),f=E.useCallback(D=>h(D),[]),[p,m]=E.useState({borderColor:"light-dark(var(--mantine-color-gray-4), var(--mantine-color-dark-3))",borderLeftStyle:"solid",borderLeftWidth:2,width:Tg-7,left:-Tg+7}),[v,y]=E.useState(0),[x,w]=E.useState({numSeries:0,labelExamples:{},sortedLabelCards:[]});E.useEffect(()=>{r===void 0&&n({id:l,node:t})},[r,n,l,t]),E.useEffect(()=>()=>{n(null)},[n]);const A=Ixe(t),[S,C]=E.useState(A.map(()=>"waiting")),j=E.useMemo(()=>aSe(S),[S]);let _=t;if(_.type===yt.matrixSelector){const D={..._};D.anchored=!1,D.smoothed=!1,_={type:yt.call,func:sSe.last_over_time,args:[D]}}const{data:O,error:M,isFetching:R}=Vh({key:[Ri()],path:"/query",params:{query:cs(_)},recordResponseTime:y,enabled:j==="success"});E.useEffect(()=>{j==="error"&&i&&i(o,"error")},[j,i,o]),E.useEffect(()=>{M&&i&&i(o,"error")},[M,i,o]),E.useEffect(()=>{R&&i&&i(o,"running")},[R,i,o]);const N=E.useCallback((D,L)=>{C(U=>{const H=[...U];return H[D]=L,H})},[C]);E.useLayoutEffect(()=>{if(r===void 0||r===null||u===null)return;const D=r.getBoundingClientRect(),L=u.getBoundingClientRect();m(s?U=>({...U,top:"calc(50% - 1px)",bottom:L.bottom-D.top,borderTopLeftRadius:3,borderTopStyle:"solid",borderBottomLeftRadius:void 0}):U=>({...U,top:D.bottom-L.top,bottom:"calc(50% - 1px)",borderBottomLeftRadius:3,borderBottomStyle:"solid",borderTopLeftRadius:void 0}))},[r,u,s,f,m]),E.useEffect(()=>{if(!O)return;i&&i(o,"success");let D=0;const L={},{resultType:U,result:H}=O.data;U==="scalar"||U==="string"?D=1:H&&H.length>0&&(D=H.length,H.forEach(F=>{Object.entries(F.metric).forEach(([$,G])=>{$!=="__name__"&&(L[$]||(L[$]={}),L[$][G]=(L[$][G]||0)+1)})}));const z={},I={};Object.entries(L).forEach(([F,$])=>{z[F]=Object.keys($).length,I[F]=Object.entries($).sort(([,G],[,Y])=>Y-G).slice(0,b9).map(([G,Y])=>({value:G,count:Y}))}),w({numSeries:D,sortedLabelCards:Object.entries(z).sort((F,$)=>$[1]-F[1]),labelExamples:I})},[O,i,o]);const B=a.jsxs(ut,{w:"fit-content",gap:"lg",my:"sm",wrap:"nowrap",pos:"relative",align:"center",children:[r!==void 0&&a.jsx(be,{pos:"absolute",display:"inline-block",style:p}),a.jsx(be,{ref:f,w:"fit-content",px:10,py:4,style:{borderRadius:4,flexShrink:0},className:Pr(cx.nodeText,{[cx.nodeTextError]:M,[cx.nodeTextSelected]:(e==null?void 0:e.id)===l}),onClick:()=>{(e==null?void 0:e.id)===l?n(null):n({id:l,node:t})},children:zo(t,!1,1)}),j==="waiting"?a.jsx(ut,{c:"gray",children:a.jsx(VC,{style:N3})}):j==="running"?a.jsx(yo,{size:14,color:"gray",type:"dots"}):j==="error"?a.jsxs(ut,{c:"orange.7",gap:5,fz:"xs",wrap:"nowrap",children:[a.jsx(VC,{style:N3})," Blocked on child query error"]}):R?a.jsx(yo,{size:14,color:"gray"}):M?a.jsxs(ut,{gap:5,wrap:"nowrap",style:{flexShrink:0},className:cx.errorText,children:[a.jsx(VC,{style:N3}),a.jsxs(dt,{fz:"xs",children:[a.jsx("strong",{children:"Error executing query:"})," ",M.message]})]}):a.jsxs(ut,{gap:0,wrap:"nowrap",children:[a.jsxs(dt,{c:"dimmed",fz:"xs",style:{whiteSpace:"nowrap"},children:[x.numSeries," result",x.numSeries!==1&&"s","  –  ",v,"ms",x.sortedLabelCards.length>0&&a.jsx(a.Fragment,{children:"  –  "})]}),a.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[x.sortedLabelCards.slice(0,D3).map(([D,L])=>a.jsx(qr,{position:"bottom",withArrow:!0,color:"dark.6",label:a.jsx(be,{p:"xs",children:a.jsxs(Xn,{fz:"xs",children:[x.labelExamples[D].map(({value:U,count:H})=>a.jsxs(Xn.Item,{py:1,children:[a.jsx(Qw,{c:"red.3",bg:"gray.8",children:us(U)})," ","(",H,"x)"]},U)),L>b9&&a.jsx("li",{children:"..."})]})}),children:a.jsxs("span",{style:{cursor:"pointer",whiteSpace:"nowrap"},children:[a.jsx(dt,{component:"span",fz:"xs",className:"promql-code promql-label-name",c:"light-dark(var(--mantine-color-green-9), var(--mantine-color-green-6))",children:D}),a.jsxs(dt,{component:"span",fz:"xs",c:"dimmed",children:[": ",L]})]})},D)),x.sortedLabelCards.length>D3?a.jsxs(dt,{component:"span",c:"dimmed",fz:"xs",style:{whiteSpace:"nowrap"},children:["...",x.sortedLabelCards.length-D3," more..."]}):null]})]})]});return t.type===yt.binaryExpr?a.jsxs("div",{children:[a.jsx(be,{ml:Tg,children:a.jsx(Xx,{node:A[0],selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!0,childIdx:0,reportNodeState:N})}),B,a.jsx(be,{ml:Tg,children:a.jsx(Xx,{node:A[1],selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!1,childIdx:1,reportNodeState:N})})]}):a.jsxs("div",{children:[B,A.map((D,L)=>a.jsx(be,{ml:Tg,children:a.jsx(Xx,{node:D,selectedNode:e,setSelectedNode:n,parentEl:u,reverse:!1,childIdx:L,reportNodeState:N})},L))]})},oSe=({panelIdx:t,selectedNode:e,setSelectedNode:n,closeTreeView:r})=>{const{expr:i}=ac(o=>o.queryPage.panels[t]),{data:s}=wi({path:"/parse_query",params:{query:i}});return a.jsxs($r,{withBorder:!0,fz:"sm",style:{overflowX:"auto"},pl:"sm",children:[a.jsx(ml,{"aria-label":"Close tree view",title:"Close tree view",pos:"absolute",top:7,size:"sm",right:7,onClick:r}),a.jsx(Xx,{childIdx:0,node:s.data,selectedNode:e,setSelectedNode:n,reverse:!1})]})},lSe={abs:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"abs(v instant-vector)"})," returns a vector containing all float samples in the input vector converted to their absolute value. Histogram samples in the input vector are ignored silently."]})}),absent:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"absent(v instant-vector)"})," returns an empty vector if the vector passed to it has any elements (float samples or histogram samples) and a 1-element vector with the value 1 if the vector passed to it has no elements."]}),a.jsx("p",{children:"This is useful for alerting on when no time series exist for a given metric name and label combination."}),a.jsx("pre",{children:a.jsxs("code",{children:["absent(nonexistent","{",'job="myjob"',"}",") # => ","{",'job="myjob"',"}","absent(nonexistent","{",'job="myjob",instance=~".*"',"}",") # => ","{",'job="myjob"',"}","absent(sum(nonexistent","{",'job="myjob"',"}",")) # => ","{","}"]})}),a.jsxs("p",{children:["In the first two examples, ",a.jsx("code",{children:"absent()"})," tries to be smart about deriving labels of the 1-element output vector from the input vector."]})]}),absent_over_time:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"absent_over_time(v range-vector)"})," returns an empty vector if the range vector passed to it has any elements (float samples or histogram samples) and a 1-element vector with the value 1 if the range vector passed to it has no elements."]}),a.jsx("p",{children:"This is useful for alerting on when no time series exist for a given metric name and label combination for a certain amount of time."}),a.jsx("pre",{children:a.jsxs("code",{children:["absent_over_time(nonexistent","{",'job="myjob"',"}","[1h]) # => ","{",'job="myjob"',"}","absent_over_time(nonexistent","{",'job="myjob",instance=~".*"',"}","[1h]) # => ","{",'job="myjob"',"}","absent_over_time(sum(nonexistent","{",'job="myjob"',"}",")[1h:]) # => ","{","}"]})}),a.jsxs("p",{children:["In the first two examples, ",a.jsx("code",{children:"absent_over_time()"})," tries to be smart about deriving labels of the 1-element output vector from the input vector."]})]}),acos:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),acosh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),asin:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),asinh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),atan:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),atanh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),avg_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ceil:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"ceil(v instant-vector)"})," returns a vector containing all float samples in the input vector rounded up to the nearest integer value greater than or equal to their original value. Histogram samples in the input vector are ignored silently."]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"ceil(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(±0) = ±0"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(1.49) = 2.0"})}),a.jsx("li",{children:a.jsx("code",{children:"ceil(1.78) = 2.0"})})]})]}),changes:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["For each input time series, ",a.jsx("code",{children:"changes(v range-vector)"})," returns the number of times its value has changed within the provided time range as an instant vector. A float sample followed by a histogram sample, or vice versa, counts as a change. A counter histogram sample followed by a gauge histogram sample with otherwise exactly the same values, or vice versa, does not count as a change."]})}),clamp:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"clamp(v instant-vector, min scalar, max scalar)"})," clamps the values of all float samples in"," ",a.jsx("code",{children:"v"})," to have a lower limit of ",a.jsx("code",{children:"min"})," and an upper limit of",a.jsx("code",{children:"max"}),". Histogram samples in the input vector are ignored silently."]}),a.jsx("p",{children:"Special cases:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["Return an empty vector if ",a.jsx("code",{children:"min > max"})]}),a.jsxs("li",{children:["Float samples are clamped to ",a.jsx("code",{children:"NaN"})," if ",a.jsx("code",{children:"min"})," or ",a.jsx("code",{children:"max"})," is ",a.jsx("code",{children:"NaN"})]})]})]}),clamp_max:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"clamp_max(v instant-vector, max scalar)"})," clamps the values of all float samples in ",a.jsx("code",{children:"v"})," to have an upper limit of ",a.jsx("code",{children:"max"}),". Histogram samples in the input vector are ignored silently."]})}),clamp_min:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"clamp_min(v instant-vector, min scalar)"})," clamps the values of all float samples in ",a.jsx("code",{children:"v"})," to have a lower limit of ",a.jsx("code",{children:"min"}),". Histogram samples in the input vector are ignored silently."]})}),cos:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),cosh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),count_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),day_of_month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_month(v=vector(time()) instant-vector)"})," interprets float samples in",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the month (in UTC) for each of those timestamps. Returned values are from 1 to 31. Histogram samples in the input vector are ignored silently."]})}),day_of_week:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_week(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"}),"as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the week (in UTC) for each of those timestamps. Returned values are from 0 to 6, where 0 means Sunday etc. Histogram samples in the input vector are ignored silently."]})}),day_of_year:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"day_of_year(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"}),"as timestamps (number of seconds since January 1, 1970 UTC) and returns the day of the year (in UTC) for each of those timestamps. Returned values are from 1 to 365 for non-leap years, and 1 to 366 in leap years. Histogram samples in the input vector are ignored silently."]})}),days_in_month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"days_in_month(v=vector(time()) instant-vector)"})," interprets float samples in",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the number of days in the month of each of those timestamps (in UTC). Returned values are from 28 to 31. Histogram samples in the input vector are ignored silently."]})}),deg:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),delta:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"delta(v range-vector)"})," calculates the difference between the first and last value of each time series element in a range vector ",a.jsx("code",{children:"v"}),", returning an instant vector with the given deltas and equivalent labels. The delta is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if the sample values are all integers."]}),a.jsx("p",{children:"The following example expression returns the difference in CPU temperature between now and 2 hours ago:"}),a.jsx("pre",{children:a.jsxs("code",{children:["delta(cpu_temp_celsius","{",'host="zeus"',"}","[2h])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"delta"})," acts on histogram samples by calculating a new histogram where each component (sum and count of observations, buckets) is the difference between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float samples and histogram samples within the range will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"delta"})," should only be used with gauges (for both floats and histograms)."]})]}),deriv:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"deriv(v range-vector)"})," calculates the per-second derivative of each float time series in the range vector ",a.jsx("code",{children:"v"}),", using"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Simple_linear_regression",children:"simple linear regression"}),". The range vector must have at least two float samples in order to perform the calculation. When ",a.jsx("code",{children:"+Inf"})," or"," ",a.jsx("code",{children:"-Inf"})," are found in the range vector, the slope and offset value calculated will be ",a.jsx("code",{children:"NaN"}),"."]}),a.jsxs("p",{children:[a.jsx("code",{children:"deriv"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),double_exponential_smoothing:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"double_exponential_smoothing(v range-vector, sf scalar, tf scalar)"})," produces a smoothed value for each float time series in the range in ",a.jsx("code",{children:"v"}),". The lower the smoothing factor ",a.jsx("code",{children:"sf"}),", the more importance is given to old data. The higher the trend factor ",a.jsx("code",{children:"tf"}),", the more trends in the data is considered. Both ",a.jsx("code",{children:"sf"})," and",a.jsx("code",{children:"tf"})," must be between 0 and 1. For additional details, refer to"," ",a.jsx("a",{href:"https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc433.htm",children:"NIST Engineering Statistics Handbook"}),". In Prometheus V2 this function was called ",a.jsx("code",{children:"holt_winters"}),". This caused confusion since the Holt-Winters method usually refers to triple exponential smoothing. Double exponential smoothing as implemented here is also referred to as “Holt Linear”."]}),a.jsxs("p",{children:[a.jsx("code",{children:"double_exponential_smoothing"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),end:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"end()"})," returns the end timestamp of the current query range evaluation as the number of seconds since January 1, 1970 UTC. For instant queries, this is equal to the evaluation timestamp."]})]}),exp:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"exp(v instant-vector)"})," calculates the exponential function for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples are ignored silently. Special cases are:"]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"Exp(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"Exp(NaN) = NaN"})})]})]}),first_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),floor:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"floor(v instant-vector)"})," returns a vector containing all float samples in the input vector rounded down to the nearest integer value smaller than or equal to their original value. Histogram samples in the input vector are ignored silently."]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"floor(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(±0) = ±0"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(1.49) = 1.0"})}),a.jsx("li",{children:a.jsx("code",{children:"floor(1.78) = 1.0"})})]})]}),histogram_avg:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_avg(v instant-vector)"})," returns the arithmetic average of observed values stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_avg"})," as demonstrated below to compute the average request duration over a 5-minute window from a native histogram:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_avg(rate(http_request_duration_seconds[5m]))"})}),a.jsx("p",{children:"Which is equivalent to the following query:"}),a.jsx("pre",{children:a.jsxs("code",{children:[" ","histogram_sum(rate(http_request_duration_seconds[5m])) / histogram_count(rate(http_request_duration_seconds[5m]))"]})})]}),histogram_count:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_count(v instant-vector)"})," returns the count of observations stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_sum(v instant-vector)"})," returns the sum of observations stored in each native histogram sample."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_count"})," in the following way to calculate a rate of observations (in this case corresponding to “requests per second”) from a series of histogram samples:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_count(rate(http_request_duration_seconds[10m]))"})})]}),histogram_fraction:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_fraction(lower scalar, upper scalar, b instant-vector)"})," returns the estimated fraction of observations between the provided lower and upper values for each classic or native histogram contained in"," ",a.jsx("code",{children:"b"}),". Float samples in ",a.jsx("code",{children:"b"})," are considered the counts of observations in each bucket of one or more classic histograms, while native histogram samples in ",a.jsx("code",{children:"b"})," are treated each individually as a separate histogram. This works in the same way as for ",a.jsx("code",{children:"histogram_quantile()"}),". (See there for more details.)"]}),a.jsxs("p",{children:["If the provided lower and upper values do not coincide with bucket boundaries, the calculated fraction is an estimate, using the same interpolation method as for",a.jsx("code",{children:"histogram_quantile()"}),". (See there for more details.) Especially with classic histograms, it is easy to accidentally pick lower or upper values that are very far away from any bucket boundary, leading to large margins of error. Rather than using ",a.jsx("code",{children:"histogram_fraction()"})," with classic histograms, it is often a more robust approach to directly act on the bucket series when calculating fractions. See the",a.jsx("a",{href:"https://prometheus.io/docs/practices/histograms/#apdex-score",children:"calculation of the Apdex score"}),"as a typical example."]}),a.jsx("p",{children:"For example, the following expression calculates the fraction of HTTP requests over the last hour that took 200ms or less:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_fraction(0, 0.2, rate(http_request_duration_seconds[1h]))"})}),a.jsx("p",{children:"The error of the estimation depends on the resolution of the underlying native histogram and how closely the provided boundaries are aligned with the bucket boundaries in the histogram."}),a.jsxs("p",{children:[a.jsx("code",{children:"+Inf"})," and ",a.jsx("code",{children:"-Inf"})," are valid boundary values. For example, if the histogram in the expression above included negative observations (which shouldn’t be the case for request durations), the appropriate lower boundary to include all observations less than or equal 0.2 would be ",a.jsx("code",{children:"-Inf"})," rather than ",a.jsx("code",{children:"0"}),"."]}),a.jsx("p",{children:"Whether the provided boundaries are inclusive or exclusive is only relevant if the provided boundaries are precisely aligned with bucket boundaries in the underlying native histogram. In this case, the behavior depends on the schema definition of the histogram. (The usual standard exponential schemas all feature inclusive upper boundaries and exclusive lower boundaries for positive values, and vice versa for negative values.) Without a precise alignment of boundaries, the function uses interpolation to estimate the fraction. With the resulting uncertainty, it becomes irrelevant if the boundaries are inclusive or exclusive."}),a.jsxs("p",{children:["Special case for native histograms with standard exponential buckets:",a.jsx("code",{children:"NaN"})," observations are considered outside of any buckets in this case.",a.jsx("code",{children:"histogram_fraction(-Inf, +Inf, b)"})," effectively returns the fraction of non-",a.jsx("code",{children:"NaN"})," ","observations and may therefore be less than 1."]})]}),histogram_quantile:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_quantile(φ scalar, b instant-vector)"})," calculates the φ-quantile (0 ≤ φ ≤ 1) from a"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"classic histogram"})," or from a native histogram. (See ",a.jsx("a",{href:"https://prometheus.io/docs/practices/histograms",children:"histograms and summaries"})," for a detailed explanation of φ-quantiles and the usage of the (classic) histogram metric type in general.)"]}),a.jsxs("p",{children:["The float samples in ",a.jsx("code",{children:"b"})," are considered the counts of observations in each bucket of one or more classic histograms. Each float sample must have a label",a.jsx("code",{children:"le"})," where the label value denotes the inclusive upper bound of the bucket. (Float samples without such a label are silently ignored.) The other labels and the metric name are used to identify the buckets belonging to each classic histogram. The"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"histogram metric type"}),"automatically provides time series with the ",a.jsx("code",{children:"_bucket"})," suffix and the appropriate labels."]}),a.jsxs("p",{children:["The (native) histogram samples in ",a.jsx("code",{children:"b"})," are treated each individually as a separate histogram to calculate the quantile from."]}),a.jsxs("p",{children:["As long as no naming collisions arise, ",a.jsx("code",{children:"b"})," may contain a mix of classic and native histograms."]}),a.jsxs("p",{children:["Use the ",a.jsx("code",{children:"rate()"})," function to specify the time window for the quantile calculation."]}),a.jsxs("p",{children:["Example: A histogram metric is called ",a.jsx("code",{children:"http_request_duration_seconds"})," (and therefore the metric name for the buckets of a classic histogram is",a.jsx("code",{children:"http_request_duration_seconds_bucket"}),"). To calculate the 90th percentile of request durations over the last 10m, use the following expression in case",a.jsx("code",{children:"http_request_duration_seconds"})," is a classic histogram:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, rate(http_request_duration_seconds_bucket[10m]))"})}),a.jsx("p",{children:"For a native histogram, use the following expression instead:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, rate(http_request_duration_seconds[10m]))"})}),a.jsxs("p",{children:["The quantile is calculated for each label combination in",a.jsx("code",{children:"http_request_duration_seconds"}),". To aggregate, use the ",a.jsx("code",{children:"sum()"})," aggregator around the"," ",a.jsx("code",{children:"rate()"})," function. Since the ",a.jsx("code",{children:"le"})," label is required by",a.jsx("code",{children:"histogram_quantile()"})," to deal with classic histograms, it has to be included in the ",a.jsx("code",{children:"by"})," ","clause. The following expression aggregates the 90th percentile by ",a.jsx("code",{children:"job"})," for classic histograms:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (job, le) (rate(http_request_duration_seconds_bucket[10m])))"})}),a.jsx("p",{children:"When aggregating native histograms, the expression simplifies to:"}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (job) (rate(http_request_duration_seconds[10m])))"})}),a.jsxs("p",{children:["To aggregate all classic histograms, specify only the ",a.jsx("code",{children:"le"})," label:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum by (le) (rate(http_request_duration_seconds_bucket[10m])))"})}),a.jsxs("p",{children:["With native histograms, aggregating everything works as usual without any ",a.jsx("code",{children:"by"})," clause:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_quantile(0.9, sum(rate(http_request_duration_seconds[10m])))"})}),a.jsxs("p",{children:["In the (common) case that a quantile value does not coincide with a bucket boundary, the"," ",a.jsx("code",{children:"histogram_quantile()"})," function interpolates the quantile value within the bucket the quantile value falls into. For classic histograms, for native histograms with custom bucket boundaries, and for the zero bucket of other native histograms, it assumes a uniform distribution of observations within the bucket (also called"," ",a.jsx("em",{children:"linear interpolation"}),"). For the non-zero-buckets of native histograms with a standard exponential bucketing schema, the interpolation is done under the assumption that the samples within the bucket are distributed in a way that they would uniformly populate the buckets in a hypothetical histogram with higher resolution. (This is also called ",a.jsx("em",{children:"exponential interpolation"}),". See the"," ",a.jsx("a",{href:"https://prometheus.io/docs/specs/native_histograms/#interpolation-within-a-bucket",children:"native histogram specification"}),"for more details.)"]}),a.jsxs("p",{children:["If ",a.jsx("code",{children:"b"})," has 0 observations, ",a.jsx("code",{children:"NaN"})," is returned. For φ < 0, ",a.jsx("code",{children:"-Inf"})," is returned. For φ > 1, ",a.jsx("code",{children:"+Inf"})," is returned. For φ = ",a.jsx("code",{children:"NaN"}),", ",a.jsx("code",{children:"NaN"})," is returned."]}),a.jsx("p",{children:"Special cases for classic histograms:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["If ",a.jsx("code",{children:"b"})," contains fewer than two buckets, ",a.jsx("code",{children:"NaN"})," is returned."]}),a.jsxs("li",{children:["The highest bucket must have an upper bound of ",a.jsx("code",{children:"+Inf"}),". (Otherwise, ",a.jsx("code",{children:"NaN"})," is returned.)"]}),a.jsx("li",{children:"If a quantile is located in the highest bucket, the upper bound of the second highest bucket is returned."}),a.jsx("li",{children:"The lower limit of the lowest bucket is assumed to be 0 if the upper bound of that bucket is greater than 0. In that case, the usual linear interpolation is applied within that bucket. Otherwise, the upper bound of the lowest bucket is returned for quantiles located in the lowest bucket."})]}),a.jsx("p",{children:"Special cases for native histograms:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:["If a native histogram with standard exponential buckets has ",a.jsx("code",{children:"NaN"}),"observations and the quantile falls into one of the existing exponential buckets, the result is skewed towards higher values due to ",a.jsx("code",{children:"NaN"}),"observations treated as ",a.jsx("code",{children:"+Inf"}),". This is flagged with an info level annotation."]}),a.jsxs("li",{children:["If a native histogram with standard exponential buckets has ",a.jsx("code",{children:"NaN"}),"observations and the quantile falls above all of the existing exponential buckets, ",a.jsx("code",{children:"NaN"})," is returned. This is flagged with an info level annotation."]}),a.jsx("li",{children:"A zero bucket with finite width is assumed to contain no negative observations if the histogram has observations in positive buckets, but none in negative buckets."}),a.jsx("li",{children:"A zero bucket with finite width is assumed to contain no positive observations if the histogram has observations in negative buckets, but none in positive buckets."})]}),a.jsxs("p",{children:["You can use ",a.jsx("code",{children:"histogram_quantile(0, v instant-vector)"})," to get the estimated minimum value stored in a histogram."]}),a.jsxs("p",{children:["You can use ",a.jsx("code",{children:"histogram_quantile(1, v instant-vector)"})," to get the estimated maximum value stored in a histogram."]}),a.jsx("p",{children:"Buckets of classic histograms are cumulative. Therefore, the following should always be the case:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"The counts in the buckets are monotonically increasing (strictly non-decreasing)."}),a.jsx("li",{children:"A lack of observations between the upper limits of two consecutive buckets results in equal counts in those two buckets."})]}),a.jsxs("p",{children:["However, floating point precision issues (e.g. small discrepancies introduced by computing of buckets with"," ",a.jsx("code",{children:"sum(rate(...))"}),") or invalid data might violate these assumptions. In that case,"," ",a.jsx("code",{children:"histogram_quantile"})," would be unable to return meaningful results. To mitigate the issue,"," ",a.jsx("code",{children:"histogram_quantile"})," assumes that tiny relative differences between consecutive buckets are happening because of floating point precision errors and ignores them. (The threshold to ignore a difference between two buckets is a trillionth (1e-12) of the sum of both buckets.) Furthermore, if there are non-monotonic bucket counts even after this adjustment, they are increased to the value of the previous buckets to enforce monotonicity. The latter is evidence for an actual issue with the input data and is therefore flagged by an info-level annotation reading ",a.jsx("code",{children:"input to histogram_quantile needed to be fixed for monotonicity"}),". If you encounter this annotation, you should find and remove the source of the invalid data."]})]}),histogram_quantiles:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"histogram_quantiles(v instant-vector, quantile_label string, φ_1 scalar, φ_2 scalar, ...)"})," ","calculates multiple (between 1 and 10) φ-quantiles (0 ≤ φ ≤ 1) from a"," ",a.jsx("a",{href:"https://prometheus.io/docs/concepts/metric_types/#histogram",children:"classic histogram"})," or from a native histogram. Quantile calculation works the same way as in ",a.jsx("code",{children:"histogram_quantile()"}),". The second argument (a string) specifies the label name that is used to identify different quantiles in the query result."]}),a.jsx("pre",{children:a.jsxs("code",{children:['histogram_quantiles(sum(rate(foo[1m])), "quantile", 0.9, 0.99) # => ',"{",'quantile="0.9"',"}"," 123","{",'quantile="0.99"',"}"," 128"]})})]}),histogram_stddev:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_stddev(v instant-vector)"})," returns the estimated standard deviation of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),". For this estimation, all observations in a bucket are assumed to have the value of the mean of the bucket boundaries. For the zero bucket and for buckets with custom boundaries, the arithmetic mean is used. For the usual exponential buckets, the geometric mean is used. Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_stdvar(v instant-vector)"})," returns the estimated variance of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),"."]})]}),histogram_stdvar:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_stddev(v instant-vector)"})," returns the estimated standard deviation of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),". For this estimation, all observations in a bucket are assumed to have the value of the mean of the bucket boundaries. For the zero bucket and for buckets with custom boundaries, the arithmetic mean is used. For the usual exponential buckets, the geometric mean is used. Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_stdvar(v instant-vector)"})," returns the estimated variance of observations for each native histogram sample in ",a.jsx("code",{children:"v"}),"."]})]}),histogram_sum:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"histogram_count(v instant-vector)"})," returns the count of observations stored in each native histogram sample in ",a.jsx("code",{children:"v"}),". Float samples are ignored and do not show up in the returned vector."]}),a.jsxs("p",{children:["Similarly, ",a.jsx("code",{children:"histogram_sum(v instant-vector)"})," returns the sum of observations stored in each native histogram sample."]}),a.jsxs("p",{children:["Use ",a.jsx("code",{children:"histogram_count"})," in the following way to calculate a rate of observations (in this case corresponding to “requests per second”) from a series of histogram samples:"]}),a.jsx("pre",{children:a.jsx("code",{children:"histogram_count(rate(http_request_duration_seconds[10m]))"})})]}),hour:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"hour(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the hour of the day (in UTC) for each of those timestamps. Returned values are from 0 to 23. Histogram samples in the input vector are ignored silently."]})}),idelta:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"idelta(v range-vector)"})," calculates the difference between the last two samples in the range vector"," ",a.jsx("code",{children:"v"}),", returning an instant vector with the given deltas and equivalent labels. Both samples must be either float samples or histogram samples. Elements in ",a.jsx("code",{children:"v"})," where one of the last two samples is a float sample and the other is a histogram sample will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"idelta"})," should only be used with gauges (for both floats and histograms)."]})]}),increase:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"increase(v range-vector)"})," calculates the increase in the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. The increase is extrapolated to cover the full time range as specified in the range vector selector, so that it is possible to get a non-integer result even if a counter increases only by integer increments."]}),a.jsx("p",{children:"The following example expression returns the number of HTTP requests as measured over the last 5 minutes, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["increase(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"increase"})," acts on histogram samples by calculating a new histogram where each component (sum and count of observations, buckets) is the increase between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float samples and histogram samples within the range, will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"increase"})," should only be used with counters (for both floats and histograms). It is syntactic sugar for ",a.jsx("code",{children:"rate(v)"})," multiplied by the number of seconds under the specified time range window, and should be used primarily for human readability. Use ",a.jsx("code",{children:"rate"})," in recording rules so that increases are tracked consistently on a per-second basis."]})]}),info:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["_The ",a.jsx("code",{children:"info"})," function is an experiment to improve UX around including labels from"," ",a.jsx("a",{href:"https://grafana.com/blog/2021/08/04/how-to-use-promql-joins-for-more-effective-queries-of-prometheus-metrics-at-scale/#info-metrics",children:"info metrics"}),". The behavior of this function may change in future versions of Prometheus, including its removal from PromQL."," ",a.jsx("code",{children:"info"})," has to be enabled via the",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"})," ",a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"._"]}),a.jsxs("p",{children:[a.jsx("code",{children:"info(v instant-vector, [data-label-selector instant-vector])"})," finds, for each time series in"," ",a.jsx("code",{children:"v"}),", all info series with matching ",a.jsx("em",{children:"identifying"})," labels (more on this later), and adds the union of their ",a.jsx("em",{children:"data"})," (i.e., non-identifying) labels to the time series. The second argument"," ",a.jsx("code",{children:"data-label-selector"})," is optional. It is not a real instant vector, but uses a subset of its syntax. It must start and end with curly braces (",a.jsxs("code",{children:["{"," ... ","}"]}),") and may only contain label matchers. The label matchers are used to constrain which info series to consider and which data labels to add to ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("p",{children:["If there is no matching info series for a given time series in ",a.jsx("code",{children:"v"})," at a particular timestamp (e.g. because the info series has gone stale), the behavior depends on the data label matchers: If the"," ",a.jsx("code",{children:"data-label-selector"}),"contains any matcher that does not match the empty string (e.g.",a.jsxs("code",{children:["{",'data=~".+"',"}"]}),"), then that time series is dropped from the result at that timestamp, because the required enrichment is unavailable. If all matchers match the empty string (e.g."," ",a.jsxs("code",{children:["{",'data=~".*"',"}"]}),"), or if no ",a.jsx("code",{children:"data-label-selector"}),"is provided, the time series is returned without enrichment."]}),a.jsxs("p",{children:["Identifying labels of an info series are the subset of labels that uniquely identify the info series. The remaining labels are considered",a.jsx("em",{children:"data labels"})," (also called non-identifying). (Note that Prometheus’s concept of time series identity always includes ",a.jsx("em",{children:"all"})," the labels. For the sake of the ",a.jsx("code",{children:"info"}),"function, we “logically” define info series identity in a different way than in the conventional Prometheus view.) The identifying labels of an info series are used to join it to regular (non-info) series, i.e. those series that have the same labels as the identifying labels of the info series. The data labels, which are the ones added to the regular series by the ",a.jsx("code",{children:"info"})," function, effectively encode metadata key value pairs. (This implies that a change in the data labels in the conventional Prometheus view constitutes the end of one info series and the beginning of a new info series, while the “logical” view of the ",a.jsx("code",{children:"info"})," function is that the same info series continues to exist, just with different “data”.)"]}),a.jsx("p",{children:"The conventional approach of adding data labels is sometimes called a “join query”, as illustrated by the following example:"}),a.jsx("pre",{children:a.jsxs("code",{children:[" ","rate(http_server_request_duration_seconds_count[2m]) * on (job, instance) group_left (k8s_cluster_name) target_info"]})}),a.jsxs("p",{children:["The core of the query is the expression ",a.jsx("code",{children:"rate(http_server_request_duration_seconds_count[2m])"}),". But to add data labels from an info metric, the user has to use elaborate (and not very obvious) syntax to specify which info metric to use (",a.jsx("code",{children:"target_info"}),"), what the identifying labels are (",a.jsx("code",{children:"on (job, instance)"}),"), and which data labels to add (",a.jsx("code",{children:"group_left (k8s_cluster_name)"}),")."]}),a.jsxs("p",{children:["This query is not only verbose and hard to write, it might also run into an “identity crisis”: If any of the data labels of ",a.jsx("code",{children:"target_info"})," changes, Prometheus sees that as a change of series (as alluded to above, Prometheus just has no native concept of non-identifying labels). If the old ",a.jsx("code",{children:"target_info"})," ","series is not properly marked as stale (which can happen with certain ingestion paths), the query above will fail for up to 5m (the lookback delta) because it will find a conflicting match with both the old and the new version of ",a.jsx("code",{children:"target_info"}),"."]}),a.jsxs("p",{children:["The ",a.jsx("code",{children:"info"})," function not only resolves this conflict in favor of the newer series, it also simplifies the syntax because it knows about the available info series and what their identifying labels are. The example query looks like this with the ",a.jsx("code",{children:"info"})," function:"]}),a.jsx("pre",{children:a.jsxs("code",{children:["info( rate(http_server_request_duration_seconds_count[2m]),","{",'k8s_cluster_name=~".+"',"}",")"]})}),a.jsxs("p",{children:["The common case of adding ",a.jsx("em",{children:"all"})," data labels can be achieved by omitting the 2nd argument of the"," ",a.jsx("code",{children:"info"})," function entirely, simplifying the example even more:"]}),a.jsx("pre",{children:a.jsx("code",{children:"info(rate(http_server_request_duration_seconds_count[2m]))"})}),a.jsxs("p",{children:["While ",a.jsx("code",{children:"info"})," normally automatically finds all matching info series, it’s possible to restrict them by providing a ",a.jsx("code",{children:"__name__"})," label matcher, e.g.",a.jsxs("code",{children:["{",'__name__="target_info"',"}"]}),"."]}),a.jsxs("p",{children:["Note that if there are any time series in ",a.jsx("code",{children:"v"})," that match the ",a.jsx("code",{children:"data-label-selector"})," (or the default ",a.jsx("code",{children:"target_info"})," if that argument is not specified), they will be treated as info series and will be returned unchanged."]}),a.jsx("h3",{children:"Limitations"}),a.jsxs("p",{children:["In its current iteration, ",a.jsx("code",{children:"info"})," defaults to considering only info series with the name"," ",a.jsx("code",{children:"target_info"}),". It also assumes that the identifying info series labels are",a.jsx("code",{children:"instance"})," and ",a.jsx("code",{children:"job"}),". ",a.jsx("code",{children:"info"})," does support other info series names however, through",a.jsx("code",{children:"__name__"})," label matchers. E.g., one can explicitly say to consider both",a.jsx("code",{children:"target_info"})," and ",a.jsx("code",{children:"build_info"})," as follows:",a.jsxs("code",{children:["{",'__name__=~"(target|build)_info"',"}"]}),". However, the identifying labels always have to be ",a.jsx("code",{children:"instance"})," and ",a.jsx("code",{children:"job"}),"."]}),a.jsxs("p",{children:["When only negated ",a.jsx("code",{children:"__name__"})," matchers are provided (e.g.",a.jsxs("code",{children:["{",'__name__!="target_info"',"}"]}),"), ",a.jsx("code",{children:"info"})," considers all metrics matching",a.jsx("code",{children:".+_info"})," and then applies the negated matchers as filters. This is because negated matchers alone cannot positively identify which info metrics to consider."]}),a.jsxs("p",{children:["These limitations are partially defeating the purpose of the ",a.jsx("code",{children:"info"})," function. At the current stage, this is an experiment to find out how useful the approach turns out to be in practice. A final version of the"," ",a.jsx("code",{children:"info"})," function will indeed consider all matching info series and with their appropriate identifying labels."]})]}),irate:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"irate(v range-vector)"})," calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Both samples must be either float samples or histogram samples. Elements in ",a.jsx("code",{children:"v"})," where one of the last two samples is a float sample and the other is a histogram sample will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"irate"})," should only be used with counters (for both floats and histograms)."]}),a.jsx("p",{children:"The following example expression returns the per-second rate of HTTP requests looking up to 5 minutes back for the two most recent data points, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["irate(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"irate"})," should only be used when graphing volatile, fast-moving counters. Use ",a.jsx("code",{children:"rate"})," for alerts and slow-moving counters, as brief changes in the rate can reset the ",a.jsx("code",{children:"FOR"})," clause and graphs consisting entirely of rare spikes are hard to read."]}),a.jsxs("p",{children:["Note that when combining ",a.jsx("code",{children:"irate()"})," with an",a.jsx("a",{href:"operators.md#aggregation-operators",children:"aggregation operator"})," (e.g. ",a.jsx("code",{children:"sum()"}),") or a function aggregating over time (any function ending in ",a.jsx("code",{children:"_over_time"}),"), always take an ",a.jsx("code",{children:"irate()"})," ","first, then aggregate. Otherwise ",a.jsx("code",{children:"irate()"})," cannot detect counter resets when your target restarts."]})]}),label_join:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each timeseries in ",a.jsx("code",{children:"v"}),","," ",a.jsx("code",{children:"label_join(v instant-vector, dst_label string, separator string, src_label_1 string, src_label_2 string, ...)"})," ","joins all the values of all the ",a.jsx("code",{children:"src_labels"}),"using ",a.jsx("code",{children:"separator"})," and returns the timeseries with the label ",a.jsx("code",{children:"dst_label"})," containing the joined value. There can be any number of ",a.jsx("code",{children:"src_labels"})," in this function."]}),a.jsxs("p",{children:[a.jsx("code",{children:"label_join"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["This example will return a vector with each time series having a ",a.jsx("code",{children:"foo"})," label with the value"," ",a.jsx("code",{children:"a,b,c"})," added to it:"]}),a.jsx("pre",{children:a.jsxs("code",{children:["label_join(up","{",'job="api-server",src1="a",src2="b",src3="c"',"}",', "foo", ",", "src1", "src2", "src3")']})})]}),label_replace:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each timeseries in ",a.jsx("code",{children:"v"}),","," ",a.jsx("code",{children:"label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)"}),"matches the ",a.jsx("a",{href:"./basics.md#regular-expressions",children:"regular expression"})," ",a.jsx("code",{children:"regex"})," against the value of the label ",a.jsx("code",{children:"src_label"}),". If it matches, the value of the label ",a.jsx("code",{children:"dst_label"})," in the returned timeseries will be the expansion of ",a.jsx("code",{children:"replacement"}),", together with the original labels in the input. Capturing groups in the regular expression can be referenced with ",a.jsx("code",{children:"$1"}),", ",a.jsx("code",{children:"$2"}),", etc. Named capturing groups in the regular expression can be referenced with ",a.jsx("code",{children:"$name"})," (where"," ",a.jsx("code",{children:"name"})," is the capturing group name). If the regular expression doesn’t match then the timeseries is returned unchanged."]}),a.jsxs("p",{children:[a.jsx("code",{children:"label_replace"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["This example will return timeseries with the values ",a.jsx("code",{children:"a:c"})," at label ",a.jsx("code",{children:"service"})," and"," ",a.jsx("code",{children:"a"})," at label ",a.jsx("code",{children:"foo"}),":"]}),a.jsx("pre",{children:a.jsxs("code",{children:["label_replace(up","{",'job="api-server",service="a:c"',"}",', "foo", "$1", "service", "(.*):.*")']})}),a.jsx("p",{children:"This second example has the same effect than the first example, and illustrates use of named capturing groups:"}),a.jsx("pre",{children:a.jsxs("code",{children:["label_replace(up","{",'job="api-server",service="a:c"',"}",', "foo", "$name", "service", "(?P<name>.*):(?P<version>.*)")']})})]}),last_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ln:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"ln(v instant-vector)"})," calculates the natural logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. Special cases are:"]}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("code",{children:"ln(+Inf) = +Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(0) = -Inf"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(x < 0) = NaN"})}),a.jsx("li",{children:a.jsx("code",{children:"ln(NaN) = NaN"})})]})]}),log10:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"log10(v instant-vector)"})," calculates the decimal logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. The special cases are equivalent to those in"," ",a.jsx("code",{children:"ln"}),"."]})}),log2:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"log2(v instant-vector)"})," calculates the binary logarithm for all float samples in ",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently. The special cases are equivalent to those in"," ",a.jsx("code",{children:"ln"}),"."]})}),mad_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),max_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),min_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),minute:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"minute(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the minute of the hour (in UTC) for each of those timestamps. Returned values are from 0 to 59. Histogram samples in the input vector are ignored silently."]})}),month:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"month(v=vector(time()) instant-vector)"})," interprets float samples in ",a.jsx("code",{children:"v"})," as timestamps (number of seconds since January 1, 1970 UTC) and returns the month of the year (in UTC) for each of those timestamps. Returned values are from 1 to 12, where 1 means January etc. Histogram samples in the input vector are ignored silently."]})}),pi:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),predict_linear:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"predict_linear(v range-vector, t scalar)"})," predicts the value of time series",a.jsx("code",{children:"t"})," seconds from now, based on the range vector ",a.jsx("code",{children:"v"}),", using"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Simple_linear_regression",children:"simple linear regression"}),". The range vector must have at least two float samples in order to perform the calculation. When ",a.jsx("code",{children:"+Inf"})," or"," ",a.jsx("code",{children:"-Inf"})," are found in the range vector, the predicted value will be ",a.jsx("code",{children:"NaN"}),"."]}),a.jsxs("p",{children:[a.jsx("code",{children:"predict_linear"})," should only be used with gauges and only works for float samples. Elements in the range vector that contain only histogram samples are ignored entirely. For elements that contain a mix of float and histogram samples, only the float samples are used as input, which is flagged by an info-level annotation."]})]}),present_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),quantile_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),rad:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),range:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"range()"})," returns the range duration of the current query range evaluation in seconds and is equivalent to ",a.jsx("code",{children:"end() - start()"}),". For instant queries, this returns ",a.jsx("code",{children:"0"}),"."]})]}),rate:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"rate(v range-vector)"})," calculates the per-second average rate of increase of the time series in the range vector. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for. Also, the calculation extrapolates to the ends of the time range, allowing for missed scrapes or imperfect alignment of scrape cycles with the range’s time period."]}),a.jsx("p",{children:"The following example expression returns the per-second average rate of HTTP requests over the last 5 minutes, per time series in the range vector:"}),a.jsx("pre",{children:a.jsxs("code",{children:["rate(http_requests_total","{",'job="api-server"',"}","[5m])"]})}),a.jsxs("p",{children:[a.jsx("code",{children:"rate"})," acts on native histograms by calculating a new histogram where each component (sum and count of observations, buckets) is the rate of increase between the respective component in the first and last native histogram in ",a.jsx("code",{children:"v"}),". However, each element in ",a.jsx("code",{children:"v"})," that contains a mix of float and native histogram samples within the range, will be omitted from the result vector, flagged by a warn-level annotation."]}),a.jsxs("p",{children:[a.jsx("code",{children:"rate"})," should only be used with counters (for both floats and histograms). It is best suited for alerting, and for graphing of slow-moving counters."]}),a.jsxs("p",{children:["Note that when combining ",a.jsx("code",{children:"rate()"})," with an aggregation operator (e.g. ",a.jsx("code",{children:"sum()"}),") or a function aggregating over time (any function ending in ",a.jsx("code",{children:"_over_time"}),"), always take a"," ",a.jsx("code",{children:"rate()"})," first, then aggregate. Otherwise ",a.jsx("code",{children:"rate()"})," cannot detect counter resets when your target restarts."]})]}),resets:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["For each input time series, ",a.jsx("code",{children:"resets(v range-vector)"})," returns the number of counter resets within the provided time range as an instant vector. Any decrease in the value between two consecutive float samples is interpreted as a counter reset. A reset in a native histogram is detected in a more complex way: Any decrease in any bucket, including the zero bucket, or in the count of observation constitutes a counter reset, but also the disappearance of any previously populated bucket, a decrease of the zero-bucket width, or any schema change that is not a compatible decrease of resolution."]}),a.jsxs("p",{children:[a.jsx("code",{children:"resets"})," should only be used with counters (for both floats and histograms)."]}),a.jsxs("p",{children:["A float sample followed by a histogram sample, or vice versa, counts as a reset. A counter histogram sample followed by a gauge histogram sample, or vice versa, also counts as a reset (but note that ",a.jsx("code",{children:"resets"})," ","should not be used on gauges in the first place, see above)."]})]}),round:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"round(v instant-vector, to_nearest=1 scalar)"})," rounds the sample values of all elements in"," ",a.jsx("code",{children:"v"})," to the nearest integer. Ties are resolved by rounding up. The optional ",a.jsx("code",{children:"to_nearest"})," ","argument allows specifying the nearest multiple to which the sample values should be rounded. This multiple may also be a fraction. Histogram samples in the input vector are ignored silently."]})}),scalar:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["Given an input vector that contains only one element with a float sample,",a.jsx("code",{children:"scalar(v instant-vector)"})," returns the sample value of that float sample as a scalar. If the input vector does not have exactly one element with a float sample, ",a.jsx("code",{children:"scalar"})," will return ",a.jsx("code",{children:"NaN"}),". Histogram samples in the input vector are ignored silently."]})}),sgn:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"sgn(v instant-vector)"})," returns a vector with all float sample values converted to their sign, defined as this: 1 if v is positive, -1 if v is negative and 0 if v is equal to zero. Histogram samples in the input vector are ignored silently."]})}),sin:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),sinh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),sort:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[a.jsx("code",{children:"sort(v instant-vector)"})," returns vector elements sorted by their float sample values, in ascending order. Histogram samples in the input vector are ignored silently."]}),a.jsxs("p",{children:["Please note that ",a.jsx("code",{children:"sort"})," only affects the results of instant queries, as range query results always have a fixed output ordering."]})]}),sort_by_label:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"sort_by_label(v instant-vector, label string, ...)"})," returns vector elements sorted by the values of the given labels in ascending order. In case these label values are equal, elements are sorted by their full label sets.",a.jsx("code",{children:"sort_by_label"})," acts on float and histogram samples in the same way."]}),a.jsxs("p",{children:["Please note that ",a.jsx("code",{children:"sort_by_label"})," only affects the results of instant queries, as range query results always have a fixed output ordering."]}),a.jsxs("p",{children:[a.jsx("code",{children:"sort_by_label"})," uses"," ",a.jsx("a",{href:"https://en.wikipedia.org/wiki/Natural_sort_order",children:"natural sort order"}),"."]})]}),sort_by_label_desc:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:["Same as ",a.jsx("code",{children:"sort_by_label"}),", but sorts in descending order."]})]}),sort_desc:a.jsx(a.Fragment,{children:a.jsxs("p",{children:["Same as ",a.jsx("code",{children:"sort"}),", but sorts in descending order."]})}),sqrt:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"sqrt(v instant-vector)"})," calculates the square root of all float samples in",a.jsx("code",{children:"v"}),". Histogram samples in the input vector are ignored silently."]})}),start:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"start()"})," returns the start timestamp of the current query range evaluation as the number of seconds since January 1, 1970 UTC. For instant queries, this is equal to the evaluation timestamp."]})]}),stddev_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),stdvar_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),step:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:a.jsxs("strong",{children:["This function has to be enabled via the"," ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"}),"."]})}),a.jsxs("p",{children:[a.jsx("code",{children:"step()"})," returns the query resolution step as the number of seconds. For instant queries, this returns ",a.jsx("code",{children:"0"}),"."]})]}),sum_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),tan:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),tanh:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The trigonometric functions work in radians. They ignore histogram samples in the input vector."}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"acos(v instant-vector)"}),": calculates the arccosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"acosh(v instant-vector)"}),": calculates the inverse hyperbolic cosine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Acosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asin(v instant-vector)"}),": calculates the arcsine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"asinh(v instant-vector)"}),": calculates the inverse hyperbolic sine of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Asinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atan(v instant-vector)"}),": calculates the arctangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"atanh(v instant-vector)"}),": calculates the inverse hyperbolic tangent of all float samples in"," ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Atanh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cos(v instant-vector)"}),": calculates the cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cos",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"cosh(v instant-vector)"}),": calculates the hyperbolic cosine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Cosh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sin(v instant-vector)"}),": calculates the sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sin",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sinh(v instant-vector)"}),": calculates the hyperbolic sine of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Sinh",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tan(v instant-vector)"}),": calculates the tangent of all float samples in ",a.jsx("code",{children:"v"})," (",a.jsx("a",{href:"https://pkg.go.dev/math#Tan",children:"special cases"}),")."]}),a.jsxs("li",{children:[a.jsx("code",{children:"tanh(v instant-vector)"}),": calculates the hyperbolic tangent of all float samples in ",a.jsx("code",{children:"v"})," ","(",a.jsx("a",{href:"https://pkg.go.dev/math#Tanh",children:"special cases"}),")."]})]}),a.jsx("p",{children:"The following are useful for converting between degrees and radians:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"deg(v instant-vector)"}),": converts radians to degrees for all float samples in ",a.jsx("code",{children:"v"}),"."]}),a.jsxs("li",{children:[a.jsx("code",{children:"pi()"}),": returns pi."]}),a.jsxs("li",{children:[a.jsx("code",{children:"rad(v instant-vector)"}),": converts degrees to radians for all float samples in ",a.jsx("code",{children:"v"}),"."]})]})]}),time:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"time()"})," returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is to be evaluated."]})}),timestamp:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"timestamp(v instant-vector)"})," returns the timestamp of each of the samples of the given vector as the number of seconds since January 1, 1970 UTC. It acts on float and histogram samples in the same way."]})}),ts_of_first_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_last_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_max_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),ts_of_min_over_time:a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"The following functions allow aggregating each series of a given range vector over time and return an instant vector with per-series aggregation results:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time(range-vector)"}),": the average value of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"min_over_time(range-vector)"}),": the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"max_over_time(range-vector)"}),": the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"sum_over_time(range-vector)"}),": the sum of all float or histogram samples in the specified interval (see details below)."]}),a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time(range-vector)"}),": the count of all samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"quantile_over_time(scalar, range-vector)"}),": the φ-quantile (0 ≤ φ ≤ 1) of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stddev_over_time(range-vector)"}),": the population standard deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"stdvar_over_time(range-vector)"}),": the population variance of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"last_over_time(range-vector)"}),": the most recent sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"present_over_time(range-vector)"}),": the value 1 for any series in the specified interval."]})]}),a.jsxs("p",{children:["If the ",a.jsx("a",{href:"../feature_flags.md#experimental-promql-functions",children:"feature flag"}),a.jsx("code",{children:"--enable-feature=promql-experimental-functions"})," is set, the following additional functions are available:"]}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"mad_over_time(range-vector)"}),": the median absolute deviation of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_min_over_time(range-vector)"}),": the timestamp of the last float sample that has the minimum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_max_over_time(range-vector)"}),": the timestamp of the last float sample that has the maximum value of all float samples in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_last_over_time(range-vector)"}),": the timestamp of last sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"first_over_time(range-vector)"}),": the oldest sample in the specified interval."]}),a.jsxs("li",{children:[a.jsx("code",{children:"ts_of_first_over_time(range-vector)"}),": the timestamp of earliest sample in the specified interval."]})]}),a.jsx("p",{children:"Note that all values in the specified interval have the same weight in the aggregation even if the values are not equally spaced throughout the interval."}),a.jsx("p",{children:"These functions act on histograms in the following way:"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("code",{children:"count_over_time"}),", ",a.jsx("code",{children:"first_over_time"}),", ",a.jsx("code",{children:"last_over_time"}),", and",a.jsx("code",{children:"present_over_time()"})," act on float and histogram samples in the same way."]}),a.jsxs("li",{children:[a.jsx("code",{children:"avg_over_time()"})," and ",a.jsx("code",{children:"sum_over_time()"})," act on histogram samples in a way that corresponds to the respective aggregation operators. If a series contains a mix of float samples and histogram samples within the range, the corresponding result is removed entirely from the output vector. Such a removal is flagged by a warn-level annotation."]}),a.jsx("li",{children:"All other functions ignore histogram samples in the following way: Input ranges containing only histogram samples are silently removed from the output. For ranges with a mix of histogram and float samples, only the float samples are processed and the omission of the histogram samples is flagged by an info-level annotation."})]}),a.jsxs("p",{children:[a.jsx("code",{children:"first_over_time(m[1m])"})," differs from ",a.jsx("code",{children:"m offset 1m"})," in that the former will select the first sample of ",a.jsx("code",{children:"m"})," ",a.jsx("em",{children:"within"})," the 1m range, where ",a.jsx("code",{children:"m offset 1m"})," will select the most recent sample within the lookback interval ",a.jsx("em",{children:"outside and prior to"})," the 1m offset. This is particularly useful with ",a.jsx("code",{children:"first_over_time(m[step()])"}),"in range queries (available when ",a.jsx("code",{children:"--enable-feature=promql-duration-expr"})," is set) to ensure that the sample selected is within the range step."]})]}),vector:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"vector(s scalar)"})," converts the scalar ",a.jsx("code",{children:"s"})," to a float sample and returns it as a single-element instant vector with no labels."]})}),year:a.jsx(a.Fragment,{children:a.jsxs("p",{children:[a.jsx("code",{children:"year(v=vector(time()) instant-vector)"})," returns the year for each of the given times in UTC. Histogram samples in the input vector are ignored silently."]})})},cSe="_funcDoc_mrib5_1",uSe={funcDoc:cSe},hSe=(t,e)=>a.jsxs(Xn,{fz:"sm",my:"md",withPadding:!0,children:[t.length>0&&a.jsxs(Xn.Item,{children:["The metric name is"," ",a.jsx("span",{className:"promql-code promql-metric-name",children:t}),"."]}),e.filter(n=>n.name!=="__name__").map(n=>{switch(n.type){case go.equal:return a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","is exactly"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),"."]});case go.notEqual:return a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","is not"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),"."]});case go.matchRegexp:return a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","matches the regular expression"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),"."]});case go.matchNotRegexp:return a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-label-name",children:n.name}),a.jsx("span",{className:"promql-code promql-operator",children:n.type}),a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),": The label"," ",a.jsx("span",{className:"promql-code promql-label-name",children:n.name})," ","does not match the regular expression"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',us(n.value),'"']}),"."]});default:throw new Error("invalid matcher type")}})]}),y9=({node:t})=>{const e=t.name.replace(/(_count|_sum|_bucket|_total)$/,""),{lookbackDelta:n}=hi(),{data:r}=wi({path:"/metadata",params:{metric:t.name}}),{data:i}=wi({path:"/metadata",params:{metric:e}}),s=r.data[t.name]??i.data[e];return a.jsxs($r,{withBorder:!0,children:[a.jsxs(dt,{fz:"lg",fw:600,mb:"md",children:[t.type===yt.vectorSelector?"Instant":"Range"," vector selector"]}),a.jsx(dt,{fz:"sm",children:s===void 0||s.length<1?a.jsx(a.Fragment,{children:"No metric metadata found."}):a.jsxs(a.Fragment,{children:[a.jsx("strong",{children:"Metric help"}),": ",s[0].help,a.jsx("br",{}),a.jsx("strong",{children:"Metric type"}),": ",s[0].type]})}),a.jsx(n0,{my:"md"}),a.jsxs(dt,{fz:"sm",children:[t.type===yt.vectorSelector?a.jsxs(a.Fragment,{children:["This node ",t.smoothed?"smooths the value":"selects the latest"," ",t.anchored||t.smoothed?"":"non-stale ",!t.smoothed&&a.jsxs(a.Fragment,{children:["sample value within the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:n})]}),t.smoothed&&a.jsxs(a.Fragment,{children:["using ",a.jsx("code",{children:"smoothed"})," mode (linear interpolation with nearest points within"," ",a.jsx("span",{className:"promql-code promql-duration",children:n})," ","before and after execution timestamp, ignoring staleness markers)"]})]}):a.jsxs(a.Fragment,{children:["This node selects"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.range)})," ","of data going backward from the evaluation timestamp",t.anchored&&a.jsxs(a.Fragment,{children:[" ","using ",a.jsx("code",{children:"anchored"})," mode (includes first sample before or at start boundary, and last sample of the range at end boundary, ignoring staleness markers)"]}),t.smoothed&&a.jsxs(a.Fragment,{children:[" ","using ",a.jsx("code",{children:"smoothed"})," mode (applies linear interpolation at the boundaries using nearest samples before and after boundaries, ignoring staleness markers)"]})]}),t.timestamp!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to an absolute evaluation timestamp of"," ",a.jsx("span",{className:"promql-number",children:(t.timestamp/1e3).toFixed(3)})]}):t.startOrEnd!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to the ",t.startOrEnd," of the query range"]}):a.jsx(a.Fragment,{}),t.offset===0?a.jsx(a.Fragment,{}):t.offset>0?a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","into the past,"]}):a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(-t.offset)})," ","into the future,"]})," ","for any series that match all of the following criteria:"]}),hSe(t.name,t.matchers),a.jsxs(dt,{fz:"sm",children:["If a series has no values in the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:t.type===yt.vectorSelector?n:Hn(t.range)}),t.offset>0&&a.jsxs(a.Fragment,{children:[" ","(relative to the time-shifted instant"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","in the past)"]}),", the series will not be returned."]})]})},Kh=t=>{switch(t){case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(t)}},av=t=>{switch(t){case 1/0:return"+Inf";case-1/0:return"-Inf";default:return t.toString()}},dSe=(t,e)=>{switch(t){case"sum":return"sums over the sample values of the input series";case"min":return"takes the minimum of the sample values of the input series";case"max":return"takes the maximum of the sample values of the input series";case"avg":return"calculates the average of the sample values of the input series";case"stddev":return"calculates the population standard deviation of the sample values of the input series";case"stdvar":return"calculates the population standard variation of the sample values of the input series";case"count":return"counts the number of input series";case"group":return"groups the input series by the supplied grouping labels, while setting the sample value to 1";case"count_values":if(e===null)throw new Error("encountered count_values() node without label parameter");if(e.type!=="stringLiteral")throw new Error("encountered count_values() node without string literal label parameter");return a.jsxs(a.Fragment,{children:["outputs one time series for each unique sample value in the input series (each counting the number of occurrences of that value and indicating the original value in the ",ha([e.val])," ","label)"]});case"bottomk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["returns the bottom"," ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," series by value"]}):a.jsxs(a.Fragment,{children:["returns the bottom"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series by value"]});case"topk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["returns the top ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," ","series by value"]}):a.jsxs(a.Fragment,{children:["returns the top"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series by value"]});case"quantile":if(e===null)throw new Error("encountered quantile() node without quantile parameter");return e.type==="numberLiteral"?`calculates the ${e.val}th quantile (${Kh(e.val)*100}th percentile) over the sample values of the input series`:"calculates a quantile over the sample values of the input series";case"limitk":return e===null||e.type!=="numberLiteral"?a.jsxs(a.Fragment,{children:["limits the output to"," ",a.jsx("span",{className:"promql-code promql-number",children:"K"})," series"]}):a.jsxs(a.Fragment,{children:["limits the output to"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," series"]});case"limit_ratio":return e===null||e.type!=="numberLiteral"?"limits the output to a ratio of the input series":a.jsxs(a.Fragment,{children:["limits the output to a ratio of"," ",a.jsx("span",{className:"promql-code promql-number",children:e.val})," (",Kh(e.val)*100,"%) of the input series"]});default:throw new Error(`invalid aggregation type ${t}`)}},fSe=(t,e)=>e?a.jsxs(a.Fragment,{children:["aggregating away the [",ha(t),"] label dimensions"]}):t.length===1?a.jsxs(a.Fragment,{children:["grouped by their ",ha(t)," label dimension"]}):t.length>1?a.jsxs(a.Fragment,{children:["grouped by their [",ha(t),"] label dimensions"]}):"aggregating away any label dimensions",pSe=({node:t})=>a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Aggregation"}),a.jsxs(dt,{fz:"sm",children:["This node ",dSe(t.op,t.param),","," ",fSe(t.grouping,t.without),"."]})]}),eY="filtered";var Wg=(t=>(t.multipleMatchesForOneToOneMatching="multipleMatchesForOneToOneMatching",t.multipleMatchesOnBothSides="multipleMatchesOnBothSides",t.multipleMatchesOnOneSide="multipleMatchesOnOneSide",t))(Wg||{});const x9=16777619,mSe=2166136261,gSe=55296,A9=t=>{let e=mSe;for(let n=0;n<t.length;n++){if(t[n]!==void 0)for(let r=0;r<t[n].length;r++)e^=t[n].charCodeAt(r),e*=x9;n<t.length-1&&(e^=gSe,e*=x9)}return e.toString()},vSe=(t,e)=>(e.sort(),t?n=>A9(e.map(r=>n[r])):n=>A9(Object.keys(n).filter(r=>!e.includes(r)&&r!=="__name__").map(r=>n[r]))),w9=(t,e,n)=>{const r={};for(const i in t)n.includes(i)===e&&(e||i!=="__name__")&&(r[i]=t[i]);return r},bSe=(t,e,n)=>{const{value:r,keep:i}=fw(t,e,n);return d4(t)?Number(i):r},fw=(t,e,n)=>{switch(t){case Xt.add:return{value:e+n,keep:!0};case Xt.sub:return{value:e-n,keep:!0};case Xt.mul:return{value:e*n,keep:!0};case Xt.div:return{value:e/n,keep:!0};case Xt.pow:return{value:Math.pow(e,n),keep:!0};case Xt.mod:return{value:e%n,keep:!0};case Xt.eql:return{value:e,keep:e===n};case Xt.neq:return{value:e,keep:e!==n};case Xt.gtr:return{value:e,keep:e>n};case Xt.lss:return{value:e,keep:e<n};case Xt.gte:return{value:e,keep:e>=n};case Xt.lte:return{value:e,keep:e<=n};case Xt.atan2:return{value:Math.atan2(e,n),keep:!0};default:throw new Error("invalid binop")}},ySe=t=>[Xt.add,Xt.sub,Xt.mul,Xt.div,Xt.pow,Xt.mod,Xt.atan2].includes(t),xSe=(t,e,n,r)=>{const i={};for(const s in t)i[s]=t[s];if(ySe(n)&&delete i.__name__,r.card===_r.oneToOne)if(r.on)for(const s in i)r.labels.includes(s)||delete i[s];else for(const s of r.labels)delete i[s];return r.include.forEach(s=>{s in e?i[s]=e[s]:delete i[s]}),i},ASe=(t,e,n,r,i,s)=>{[r,i]=e.card===_r.oneToMany?[i,r]:[r,i];const o={},l=vSe(e.on,e.labels),u=new Set;return i.forEach(h=>{const f=l(h.metric);if(!(f in o)){if(s!=null&&s.maxGroups&&Object.keys(o).length>=s.maxGroups){u.add(f);return}o[f]={groupLabels:w9(h.metric,e.on,e.labels),lhs:[],lhsCount:0,rhs:[],rhsCount:0,result:[],error:null}}(!(s!=null&&s.maxSeriesPerGroup)||o[f].rhsCount<s.maxSeriesPerGroup)&&o[f].rhs.push(h),o[f].rhsCount++}),r.forEach(h=>{const f=l(h.metric);if(!(f in o)){if(s!=null&&s.maxGroups&&Object.keys(o).length>=s.maxGroups){u.add(f);return}o[f]={groupLabels:w9(h.metric,e.on,e.labels),lhs:[],lhsCount:0,rhs:[],rhsCount:0,result:[],error:null}}(!(s!=null&&s.maxSeriesPerGroup)||o[f].lhsCount<s.maxSeriesPerGroup)&&o[f].lhs.push(h),o[f].lhsCount++}),Object.values(o).forEach(h=>{h.lhs.length===0&&e.fillValues.lhs!==null&&(h.lhs.push({metric:h.groupLabels,value:[0,av(e.fillValues.lhs)],filled:!0}),h.lhsCount=1),h.rhs.length===0&&e.fillValues.rhs!==null&&(h.rhs.push({metric:h.groupLabels,value:[0,av(e.fillValues.rhs)],filled:!0}),h.rhsCount=1)}),Object.values(o).forEach(h=>{switch(e.card){case _r.oneToOne:h.lhs.length>1&&h.rhs.length>1?h.error={type:"multipleMatchesOnBothSides"}:(h.lhs.length>1||h.rhs.length>1)&&(h.error={type:"multipleMatchesForOneToOneMatching",dupeSide:h.lhs.length>1?"left":"right"});break;case _r.oneToMany:case _r.manyToOne:h.rhs.length>1&&(h.error={type:"multipleMatchesOnOneSide"});break;case _r.manyToMany:if(!Wk(t))throw new Error("unexpected many-to-many matching for non-set operator");break;default:throw new Error("unknown vector matching cardinality")}h.error||(Wk(t)?(h.lhs.forEach((f,p)=>{(t===Xt.and&&h.rhs.length>0||t===Xt.unless&&h.rhs.length===0||t===Xt.or)&&h.result.push({sample:{metric:f.metric,value:f.value},manySideIdx:p})}),t===Xt.or&&h.rhs.forEach((f,p)=>{h.lhs.length===0&&h.result.push({sample:{metric:f.metric,value:f.value},manySideIdx:p})})):h.rhs.forEach(f=>{h.lhs.forEach((p,m)=>{if(!p.value||!f.value)throw new Error("native histogram support not implemented yet");const[v,y]=e.card!==_r.oneToMany?[p.value[1],f.value[1]]:[f.value[1],p.value[1]];let{value:x,keep:w}=fw(t,Kh(v),Kh(y));const A=xSe(p.metric,f.metric,t,e);n&&(x=w?1:0,delete A.__name__),h.result.push({sample:{metric:A,value:[p.value[0],w||n?av(x):eY]},manySideIdx:m})})}))}),e.card===_r.oneToMany&&Object.keys(o).forEach(h=>{[o[h].lhs,o[h].rhs]=[o[h].rhs,o[h].lhs],[o[h].lhsCount,o[h].rhsCount]=[o[h].rhsCount,o[h].lhsCount]}),{groups:o,numGroups:Object.keys(o).length+u.size}},S9=({node:t,scalar:e,vector:n,scalarLeft:r})=>n.length===0?a.jsx(Mt,{children:"One side of the binary operation produces 0 results, no matching information shown."}):a.jsxs(se,{withTableBorder:!0,withRowBorders:!0,withColumnBorders:!0,fz:"xs",children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[!r&&a.jsx(se.Th,{children:"Left labels"}),a.jsx(se.Th,{children:"Left value"}),a.jsx(se.Th,{children:"Operator"}),r&&a.jsx(se.Th,{children:"Right labels"}),a.jsx(se.Th,{children:"Right value"}),a.jsx(se.Th,{}),a.jsx(se.Th,{children:"Result"})]})}),a.jsx(se.Tbody,{children:n.map((i,s)=>{if(!i.value)throw new Error("Native histograms are not supported yet");const o=Kh(i.value[1]),l=Kh(e[1]);let{value:u,keep:h}=r?fw(t.op,l,o):fw(t.op,o,l);d4(t.op)&&r&&(u=o),t.bool&&(u=Number(h),h=!0);const f=a.jsx(se.Td,{ta:"right",children:e[1]}),p=a.jsxs(a.Fragment,{children:[a.jsx(se.Td,{children:a.jsx(sm,{labels:i.metric,format:!0})}),a.jsx(se.Td,{ta:"right",children:i.value[1]})]});return a.jsxs(se.Tr,{children:[r?f:p,a.jsxs(se.Td,{ta:"center",children:[t.op,t.bool&&" bool"]}),r?p:f,a.jsx(se.Td,{ta:"center",children:"="}),a.jsx(se.Td,{ta:"right",children:h?av(u):a.jsx(dt,{c:"dimmed",children:"dropped"})})]},s)})})]}),Yv=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2","#c7c7c7","#dbdb8d","#9edae5","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2","#c7c7c7","#dbdb8d","#9edae5","#17becf","#393b79","#637939","#8c6d31","#843c39","#d6616b","#7b4173","#ce6dbd","#9c9ede","#c5b0d5","#c49c94","#f7b6d2"],j9=Yv.length/2+3,I3=(t,e)=>`${Yv[(t+(e||0))%Yv.length]}80`,B3=t=>a.jsx(be,{display:"inline-block",w:12,h:12,bg:t,style:{borderRadius:2,flexShrink:0}}),wSe=(t,e,n)=>{const r={};for(const i in t)n.includes(i)===e&&(e||i!=="__name__")||(r[i]=t[i]);return r},SSe=t=>{const e=t.matching,[n,r]=e.card===_r.oneToMany?["left","right"]:["right","left"];return a.jsxs(a.Fragment,{children:[a.jsx(dt,{size:"sm",children:d4(t.op)?a.jsxs(a.Fragment,{children:['This node filters the series from the left-hand side based on the result of a "',a.jsx("span",{className:"promql-code promql-operator",children:t.op}),'" comparison with matching series from the right-hand side.']}):a.jsxs(a.Fragment,{children:['This node calculates the result of applying the "',a.jsx("span",{className:"promql-code promql-operator",children:t.op}),'" operator between the sample values of matching series from two sets of time series.']})}),a.jsxs(Xn,{my:"md",fz:"sm",withPadding:!0,children:[(e.labels.length>0||e.on)&&(e.on?a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"on"}),"(",ha(e.labels),"):"," ",e.labels.length>0?a.jsxs(a.Fragment,{children:["series on both sides are matched on the labels"," ",ha(e.labels)]}):a.jsx(a.Fragment,{children:"all series from one side are matched to all series on the other side."})]}):a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"ignoring"}),"(",ha(e.labels),"): series on both sides are matched on all of their labels, except"," ",ha(e.labels),"."]})),e.card===_r.oneToOne?a.jsx(Xn.Item,{children:"One-to-one match. Each series from the left-hand side is allowed to match with at most one series on the right-hand side, and vice versa."}):a.jsxs(Xn.Item,{children:[a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",r]}),"(",ha(e.include),") : ",e.card," match. Each series from the ",n,"-hand side is allowed to match with multiple series from the ",r,"-hand side.",e.include.length!==0&&a.jsxs(a.Fragment,{children:[" ","Any ",ha(e.include)," labels found on the"," ",n,"-hand side are propagated into the result, in addition to the match group's labels."]})]}),(e.fillValues.lhs!==null||e.fillValues.rhs!==null)&&(e.fillValues.lhs===e.fillValues.rhs?a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),") : For series on either side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),"."]}):a.jsxs(a.Fragment,{children:[e.fillValues.lhs!==null&&a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill_left"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),") : For series on the left-hand side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.lhs}),"."]}),e.fillValues.rhs!==null&&a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"fill_right"}),"(",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.rhs}),") : For series on the right-hand side missing a match, fill in the sample value"," ",a.jsx("span",{className:"promql-code promql-number",children:e.fillValues.rhs}),"."]})]})),t.bool&&a.jsxs(Xn.Item,{children:[a.jsx("span",{className:"promql-code promql-keyword",children:"bool"}),": Instead of filtering series based on the outcome of the comparison for matched series, keep all series, but return the comparison outcome as a boolean ",a.jsx("span",{className:"promql-code promql-number",children:"0"})," or"," ",a.jsx("span",{className:"promql-code promql-number",children:"1"})," sample value."]})]})]})},jSe=(t,e,n)=>{const r=a.jsxs(a.Fragment,{children:[a.jsx(dt,{size:"sm",children:a.jsx("strong",{children:"Possible fixes:"})}),a.jsxs(Xn,{withPadding:!0,my:"md",fz:"sm",children:[n.type===Wg.multipleMatchesForOneToOneMatching&&a.jsxs(Xn.Item,{children:[a.jsxs(dt,{size:"sm",children:[a.jsxs("strong",{children:["Allow ",n.dupeSide==="left"?"many-to-one":"one-to-many"," ","matching"]}),": If you want to allow"," ",n.dupeSide==="left"?"many-to-one":"one-to-many"," ","matching, you need to explicitly request it by adding a"," ",a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",n.dupeSide,"()"]})," ","modifier to the operator:"]}),a.jsx(dt,{size:"sm",ta:"center",my:"md",children:zo({...t,matching:{...t.matching?t.matching:{labels:[],on:!1,include:[],fillValues:{lhs:null,rhs:null}},card:n.dupeSide==="left"?_r.manyToOne:_r.oneToMany}},!0,1)})]}),a.jsxs(Xn.Item,{children:[a.jsx("strong",{children:"Update your matching parameters:"})," Consider including more differentiating labels in your matching modifiers (via"," ",a.jsx("span",{className:"promql-code promql-keyword",children:"on()"})," /"," ",a.jsx("span",{className:"promql-code promql-keyword",children:"ignoring()"}),") to split multiple series into distinct match groups."]}),a.jsxs(Xn.Item,{children:[a.jsx("strong",{children:"Aggregate the input:"})," Consider aggregating away the extra labels that create multiple series per group before applying the binary operation."]})]})]});switch(n.type){case Wg.multipleMatchesForOneToOneMatching:return a.jsxs(a.Fragment,{children:[a.jsxs(dt,{size:"sm",children:["Binary operators only allow ",a.jsx("strong",{children:"one-to-one"})," matching by default, but we found"," ",a.jsxs("strong",{children:["multiple series on the ",n.dupeSide," side"]})," for this match group."]}),r]});case Wg.multipleMatchesOnBothSides:return a.jsxs(a.Fragment,{children:[a.jsxs(dt,{size:"sm",children:["We found ",a.jsx("strong",{children:"multiple series on both sides"})," for this match group. Since ",a.jsx("strong",{children:"many-to-many matching"})," is not supported, you need to ensure that at least one of the sides only yields a single series."]}),r]});case Wg.multipleMatchesOnOneSide:{const[i,s]=t.matching.card===_r.oneToMany?["left","right"]:["right","left"];return a.jsxs(a.Fragment,{children:[a.jsxs(dt,{size:"sm",children:["You requested"," ",a.jsxs("strong",{children:[i==="right"?"many-to-one":"one-to-many"," matching"]})," ","via"," ",a.jsxs("span",{className:"promql-code promql-keyword",children:["group_",s,"()"]}),", but we also found"," ",a.jsxs("strong",{children:["multiple series on the ",i," side"]})," of the match group. Make sure that the ",i," side only contains a single series."]}),r]})}default:throw new Error("unknown match error")}},CSe=({node:t,lhs:e,rhs:n})=>{const[r,i]=sb({key:"queryPage.explain.binaryOperators.showSampleValues",defaultValue:!1}),[s,o]=E.useState(100),[l,u]=E.useState(100),{matching:h}=t;if(h===null)throw new Error("missing matching parameters in vector-to-vector binop");const{groups:f,numGroups:p}=ASe(t.op,h,t.bool,e,n,{maxGroups:s,maxSeriesPerGroup:l}),m=Object.values(f).filter(v=>v.error).length;return a.jsxs(a.Fragment,{children:[a.jsx(dt,{size:"sm",children:SSe(t)}),a.jsx(ut,{my:"lg",justify:"flex-end",gap:"xl",children:a.jsx(Tb,{label:"Show sample values",checked:r,onChange:v=>i(v.currentTarget.checked)})}),p>Object.keys(f).length&&a.jsxs(Mt,{color:"yellow",mb:"md",icon:a.jsx(Ei,{}),children:["Too many match groups to display, only showing"," ",Object.keys(f).length," out of ",p," groups.",a.jsx("br",{}),a.jsx("br",{}),a.jsx(Ur,{fz:"sm",onClick:()=>o(void 0),children:"Show all groups"})]}),m>0&&a.jsxs(Mt,{color:"yellow",mb:"md",icon:a.jsx(Ei,{}),children:["Found matching issues in ",m," match group",m>1?"s":"",". See below for per-group error details."]}),a.jsx(se,{fz:"xs",withRowBorders:!1,children:a.jsx(se.Tbody,{children:Object.values(f).map((v,y)=>{const{groupLabels:x,lhs:w,lhsCount:A,rhs:S,rhsCount:C,result:j,error:_}=v,O=L=>a.jsx(se.Tr,{ta:"center",children:a.jsx(se.Td,{colSpan:2,style:{backgroundColor:`${L}25`},children:a.jsx(sm,{labels:x,format:!0})})}),M=(L,U,H,z)=>a.jsx(be,{style:{borderRadius:3,border:"2px solid",borderColor:U===0?"light-dark(var(--mantine-color-gray-4), var(--mantine-color-gray-7))":H},children:a.jsx(se,{fz:"xs",withRowBorders:!1,verticalSpacing:5,children:a.jsxs(se.Tbody,{children:[U===0?a.jsx(se.Tr,{children:a.jsx(se.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"no matching series"})}):a.jsxs(a.Fragment,{children:[O(H),L.map((I,F)=>{if(I.value===void 0)throw new Error("Native histograms are not supported yet");return a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsxs(ut,{wrap:"nowrap",gap:7,align:"center",children:[B3(I3(F,z)),a.jsx(sm,{labels:wSe(I.metric,h.on,h.labels),format:!0}),I.filled&&a.jsx(dt,{size:"sm",c:"dimmed",children:"no match, filling in default value"})]})}),r&&a.jsx(se.Td,{ta:"right",children:I.value[1]})]},F)})]}),U>L.length&&a.jsx(se.Tr,{children:a.jsxs(se.Td,{ta:"center",py:"md",fw:"bold",c:"gray.6",children:[U-L.length," more series omitted   –  ",a.jsx(Ur,{size:"xs",onClick:()=>u(void 0),children:"Show all series"})]})})]})})}),R=Yv[y%Yv.length],N=M(w,A,R),B=M(S,C,R,j9),D=a.jsx(be,{style:{borderRadius:3,border:"2px solid",borderColor:j.length===0||_!==null?"light-dark(var(--mantine-color-gray-4), var(--mantine-color-gray-7))":R},children:a.jsx(se,{fz:"xs",withRowBorders:!1,verticalSpacing:5,children:a.jsx(se.Tbody,{children:_!==null?a.jsx(se.Tr,{children:a.jsx(se.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"error, result omitted"})}):j.length===0?a.jsx(se.Tr,{children:a.jsx(se.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"dropped"})}):_!==null?a.jsx(se.Tr,{children:a.jsx(se.Td,{ta:"center",c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-5))",py:"md",fw:"bold",children:"error, result omitted"})}):a.jsx(a.Fragment,{children:j.map(({sample:L,manySideIdx:U},H)=>{if(L.value===void 0)throw new Error("Native histograms are not supported yet");const z=L.value[1]===eY,[I,F]=h.card===_r.oneToMany?[0,U]:[U,0];return a.jsxs(se.Tr,{children:[a.jsx(se.Td,{style:{opacity:z?.5:1},title:z?"Series has been filtered by comparison operator":void 0,children:a.jsxs(ut,{wrap:"nowrap",gap:"xs",align:"flex-start",children:[a.jsxs(ut,{wrap:"nowrap",gap:0,children:[B3(I3(I)),a.jsx("span",{style:{color:"#aaa"},children:"–"}),B3(I3(F,j9))]}),a.jsx(sm,{labels:L.metric,format:!0})]})}),r&&a.jsx(se.Td,{ta:"right",children:z?a.jsx("span",{style:{color:"grey"},children:"filtered"}):a.jsx("span",{children:L.value[1]})})]},H)})})})})});return a.jsxs(Ln.Fragment,{children:[y!==0&&a.jsx("tr",{style:{height:30}}),a.jsx(se.Tr,{children:a.jsx(se.Td,{colSpan:5,children:_&&a.jsx(Mt,{color:"red",mb:"md",title:"Error in match group below",icon:a.jsx(Ei,{}),children:jSe(t,v,_)})})}),a.jsxs(se.Tr,{children:[a.jsx(se.Td,{valign:"middle",p:0,children:N}),a.jsxs(se.Td,{ta:"center",fw:Wk(t.op)?"bold":void 0,children:[t.op,t.bool&&" bool"]}),a.jsx(se.Td,{valign:"middle",p:0,children:B}),a.jsx(se.Td,{ta:"center",children:"="}),a.jsx(se.Td,{valign:"middle",p:0,children:D})]})]},y)})})})]})},_Se=({node:t,lhs:e,rhs:n})=>{const[r,i]=[Kh(e[1]),Kh(n[1])];return a.jsxs(se,{withColumnBorders:!0,withTableBorder:!0,children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{children:"Left value"}),a.jsx(se.Th,{children:"Operator"}),a.jsx(se.Th,{children:"Right value"}),a.jsx(se.Th,{}),a.jsx(se.Th,{children:"Result"})]})}),a.jsx(se.Tbody,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Td,{className:"number-cell",children:e[1]}),a.jsxs(se.Td,{className:"op-cell",children:[t.op,t.bool&&" bool"]}),a.jsx(se.Td,{className:"number-cell",children:n[1]}),a.jsx(se.Td,{className:"op-cell",children:"="}),a.jsx(se.Td,{className:"number-cell",children:av(bSe(t.op,r,i))})]})})]})},TSe=({node:t})=>{const{data:e}=wi({path:"/query",params:{query:cs(t.lhs)}}),{data:n}=wi({path:"/query",params:{query:cs(t.rhs)}});if(e.data.resultType!==zp(t.lhs)||n.data.resultType!==zp(t.rhs))return null;if(e.data.resultType==="scalar"&&n.data.resultType==="scalar")return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Scalar-to-scalar binary operation"}),a.jsx(_Se,{node:t,lhs:e.data.result,rhs:n.data.result})]});if(e.data.resultType==="scalar"&&n.data.resultType==="vector")return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Scalar-to-vector binary operation"}),a.jsx(S9,{node:t,vector:n.data.result,scalar:e.data.result,scalarLeft:!0})]});if(e.data.resultType==="vector"&&n.data.resultType==="scalar")return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Vector-to-scalar binary operation"}),a.jsx(S9,{node:t,scalar:n.data.result,vector:e.data.result,scalarLeft:!1})]});if(e.data.resultType==="vector"&&n.data.resultType==="vector")return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Vector-to-vector binary operation"}),a.jsx(CSe,{node:t,lhs:e.data.result,rhs:n.data.result})]});throw new Error("invalid binary operator argument types")},kSe=({node:t,treeShown:e,showTree:n})=>{if(t===null)return a.jsxs(Mt,{title:"How to use the Explain view",icon:a.jsx(Kn,{}),children:["This tab can help you understand the behavior of individual components of a query.",a.jsx("br",{}),a.jsx("br",{}),"To use the Explain view,"," ",!e&&a.jsxs(a.Fragment,{children:[a.jsx(Ur,{fz:"unset",onClick:n,children:"enable the query tree view"})," ","(also available via the expression input menu) and then"]})," ","select a node in the tree above."]});switch(t.type){case yt.aggregation:return a.jsx(pSe,{node:t});case yt.binaryExpr:return a.jsx(TSe,{node:t});case yt.call:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Function call"}),a.jsxs(dt,{fz:"sm",children:["This node calls the"," ",a.jsx(Ur,{fz:"inherit",href:`https://prometheus.io/docs/prometheus/latest/querying/functions/#${t.func.name}`,target:"_blank",children:a.jsxs("span",{className:"promql-code promql-keyword",children:[t.func.name,"()"]})})," ","function",t.args.length>0?" on the provided inputs":"","."]}),a.jsx(n0,{my:"md"}),a.jsx(dt,{fz:"sm",className:uSe.funcDoc,children:lSe[t.func.name]})]});case yt.matrixSelector:return a.jsx(y9,{node:t});case yt.subquery:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Subquery"}),a.jsxs(dt,{fz:"sm",children:["This node evaluates the passed expression as a subquery over the last"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.range)})," ","at a query resolution"," ",t.step>0?a.jsxs(a.Fragment,{children:["of"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.step)})]}):"equal to the default rule evaluation interval",t.timestamp!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to an absolute evaluation timestamp of"," ",a.jsx("span",{className:"promql-number",children:(t.timestamp/1e3).toFixed(3)})]}):t.startOrEnd!==null?a.jsxs(a.Fragment,{children:[", evaluated relative to the ",t.startOrEnd," of the query range"]}):a.jsx(a.Fragment,{}),t.offset===0?a.jsx(a.Fragment,{}):t.offset>0?a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(t.offset)})," ","into the past"]}):a.jsxs(a.Fragment,{children:[", time-shifted"," ",a.jsx("span",{className:"promql-code promql-duration",children:Hn(-t.offset)})," ","into the future"]}),"."]})]});case yt.numberLiteral:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Number literal"}),a.jsxs(dt,{fz:"sm",children:["A scalar number literal with the value"," ",a.jsx("span",{className:"promql-code promql-number",children:t.val}),"."]})]});case yt.parenExpr:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Parentheses"}),a.jsx(dt,{fz:"sm",children:"Parentheses that contain a sub-expression to be evaluated."})]});case yt.stringLiteral:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"String literal"}),a.jsxs(dt,{fz:"sm",children:["A string literal with the value"," ",a.jsxs("span",{className:"promql-code promql-string",children:['"',us(t.val),'"']}),"."]})]});case yt.unaryExpr:return a.jsxs($r,{withBorder:!0,children:[a.jsx(dt,{fz:"lg",fw:600,mb:"md",children:"Unary expression"}),a.jsxs(dt,{fz:"sm",children:["A unary expression that"," ",t.op==="+"?"does not affect the expression it is applied to":"changes the sign of the expression it is applied to","."]})]});case yt.vectorSelector:return a.jsx(y9,{node:t});default:throw new Error("invalid node type")}},kg={width:"0.9rem",height:"0.9rem"},OSe=({idx:t,metricNames:e})=>{const[n,r]=E.useState(0),i=ac(f=>f.queryPage.panels[t]),s=pu(),[o,l]=E.useState(null),u=E.useMemo(()=>o!==null?cs(o.node):i.expr,[o,i.expr]),h=E.useCallback((f,p)=>s(nh({idx:t,visualizer:{...i.visualizer,range:(p-f)*1e3,endTime:p*1e3}})),[s,t,i.visualizer]);return a.jsxs(xn,{gap:"lg",children:[a.jsx(nAe,{initialExpr:i.expr,metricNames:e,executeQuery:f=>{r(p=>p+1),s(Mce({idx:t,expr:f})),!e.includes(f)&&f.trim()!==""&&s(xq(f))},treeShown:i.showTree,setShowTree:f=>{s(i_({idx:t,showTree:f})),f||l(null)},duplicatePanel:f=>{s(Ece({idx:t,expr:f}))},removePanel:()=>{s(Oce(t))}}),i.expr.trim()!==""&&i.showTree&&a.jsx(Ef,{title:"Error showing tree view",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(20),(f,p)=>a.jsx(Qa,{height:30,mb:15,width:"100%"},p))}),children:a.jsx(oSe,{panelIdx:t,selectedNode:o,setSelectedNode:l,closeTreeView:()=>{s(i_({idx:t,showTree:!1})),l(null)}})})},n),a.jsxs(oa,{value:i.visualizer.activeTab,onChange:f=>s(nh({idx:t,visualizer:{...i.visualizer,activeTab:f}})),keepMounted:!1,children:[a.jsxs(oa.List,{children:[a.jsx(oa.Tab,{value:"table",leftSection:a.jsx(cH,{style:kg}),children:"Table"}),a.jsx(oa.Tab,{value:"graph",leftSection:a.jsx(Mie,{style:kg}),children:"Graph"}),a.jsx(oa.Tab,{value:"explain",leftSection:a.jsx(Kn,{style:kg}),children:"Explain"})]}),a.jsx(oa.Panel,{pt:"sm",value:"table",children:a.jsx(eSe,{expr:u,panelIdx:t,retriggerIdx:n})}),a.jsxs(oa.Panel,{pt:"sm",value:"graph",children:[a.jsxs(ut,{mt:"xs",justify:"space-between",children:[a.jsxs(ut,{children:[a.jsx(que,{range:i.visualizer.range,onChangeRange:f=>s(nh({idx:t,visualizer:{...i.visualizer,range:f}}))}),a.jsx(t$,{time:i.visualizer.endTime,range:i.visualizer.range,description:"End time",onChangeTime:f=>s(nh({idx:t,visualizer:{...i.visualizer,endTime:f}}))}),a.jsx(g2e,{resolution:i.visualizer.resolution,range:i.visualizer.range,onChangeResolution:f=>{s(nh({idx:t,visualizer:{...i.visualizer,resolution:f}}))}})]}),a.jsxs(ut,{gap:"lg",children:[a.jsx(a0,{onChange:f=>s(nh({idx:t,visualizer:{...i.visualizer,displayMode:f}})),value:i.visualizer.displayMode,data:[{value:Rm.Lines,label:a.jsxs(dv,{fw:500,children:[a.jsx(rie,{style:kg}),a.jsx(be,{ml:10,children:"Unstacked"})]})},{value:Rm.Stacked,label:a.jsxs(dv,{fw:500,children:[a.jsx(Tse,{style:kg}),a.jsx(be,{ml:10,children:"Stacked"})]})}]}),a.jsxs(jn,{position:"bottom",withArrow:!0,shadow:"md",children:[a.jsx(jn.Target,{children:a.jsx(Er,{variant:"light",color:"gray",size:32,title:"Graph settings",children:a.jsx(zre,{style:uu,stroke:1.5})})}),a.jsx(jn.Dropdown,{p:"lg",children:a.jsx(Hs,{size:"xs",checked:i.visualizer.yAxisMin!==null,label:"Start Y axis at 0",onChange:f=>s(nh({idx:t,visualizer:{...i.visualizer,yAxisMin:f.currentTarget.checked?0:null}}))})})]})]})]}),a.jsx(Hz,{h:"lg"}),a.jsx(m2e,{expr:u,node:(o==null?void 0:o.node)??null,endTime:i.visualizer.endTime,range:i.visualizer.range,resolution:i.visualizer.resolution,showExemplars:i.visualizer.showExemplars,displayMode:i.visualizer.displayMode,yAxisMin:i.visualizer.yAxisMin,retriggerIdx:n,onSelectRange:h})]}),a.jsx(oa.Panel,{pt:"sm",value:"explain",children:a.jsx(Ef,{title:"Error showing explain view",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(20),(f,p)=>a.jsx(Qa,{height:30,mb:15,width:"100%"},p))}),children:a.jsx(kSe,{node:(o==null?void 0:o.node)??null,treeShown:i.showTree,showTree:()=>{s(i_({idx:t,showTree:!0}))}})})},o==null?void 0:o.id)})]})]})};function tY(){const t=ac(u=>u.queryPage.panels),e=pu(),[n,r]=E.useState(0);E.useEffect(()=>{const u=()=>{const h=Cce(window.location.search);h.length>0&&e(R5(h))};return u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)}},[e]),E.useEffect(()=>()=>{e(R5([C2()]))},[e]);const{data:i,error:s}=Vh({path:"/label/__name__/values"}),{data:o,error:l}=Vh({path:"/query",params:{query:"time()"}});return E.useEffect(()=>{if(!o)return;if(o.data.resultType!=="scalar")throw new Error("Unexpected result type from time query");const u=new Date().getTime()/1e3,h=o.data.result[0];r(Math.abs(u-h))},[o]),a.jsxs(be,{mt:"xs",children:[s&&a.jsxs(Mt,{mb:"sm",icon:a.jsx(Ei,{}),color:"red",title:"Error fetching metrics list",children:["Unable to fetch list of metric names: ",s.message]}),l&&a.jsx(Mt,{mb:"sm",icon:a.jsx(Ei,{}),color:"red",title:"Error fetching server time",children:l.message}),n>30&&a.jsxs(Mt,{mb:"sm",title:"Server time is out of sync",color:"red",icon:a.jsx(qre,{}),onClose:()=>r(0),children:["Detected a time difference of"," ",a.jsx("strong",{children:Wp(n*1e3)})," between your browser and the server. You may see unexpected time-shifted query results due to the time drift."]}),a.jsx(xn,{gap:"xl",children:t.map((u,h)=>a.jsx(OSe,{idx:h,metricNames:(i==null?void 0:i.data)||[]},u.id))}),a.jsx(Oi,{variant:"light",mt:"xl",leftSection:a.jsx(aH,{style:qg}),onClick:()=>e(kce()),children:"Add query"})]})}const ESe="_statsBadge_w76va_1",MSe="_labelBadge_w76va_9",RSe="_healthOk_w76va_35",DSe="_healthErr_w76va_43",NSe="_healthWarn_w76va_51",ISe="_healthInfo_w76va_62",BSe="_healthUnknown_w76va_70",hn={statsBadge:ESe,labelBadge:MSe,healthOk:RSe,healthErr:DSe,healthWarn:NSe,healthInfo:ISe,healthUnknown:BSe},LSe="_panelHealthOk_p1xoy_1",PSe="_panelHealthErr_p1xoy_6",FSe="_panelHealthWarn_p1xoy_11",zSe="_panelHealthUnknown_p1xoy_16",Oh={panelHealthOk:LSe,panelHealthErr:PSe,panelHealthWarn:FSe,panelHealthUnknown:zSe},HSe="_codebox_b9wnp_1",qSe="_queryButton_b9wnp_8",C9={codebox:HSe,queryButton:qSe},Vm=({labels:t,wrapper:e=ut,style:n})=>a.jsx(e,{gap:"xs",children:Object.entries(t).map(([r,i])=>a.jsxs("span",{className:hn.labelBadge,style:n,children:[Gh(r),'="',Ih(i),'"']},r))}),$Se=new $U,nY=({rule:t})=>{const e=xw(),{pathPrefix:n}=hi();return a.jsxs(a.Fragment,{children:[a.jsxs($r,{p:"xs",className:C9.codebox,fz:"sm",shadow:"none",children:[a.jsx(r4,{basicSetup:!1,value:t.query,editable:!1,extensions:[BW,LW,X2(e==="light"?PW:FW),$Se.asExtension(),ot.lineWrapping]}),a.jsx(qr,{label:"Query rule expression",withArrow:!0,position:"top",children:a.jsx(Er,{pos:"absolute",top:7,right:7,variant:"light",onClick:()=>{window.open(`${n}/query?g0.expr=${encodeURIComponent(t.query)}&g0.tab=1`,"_blank")},className:C9.queryButton,children:a.jsx(id,{style:uu})})})]}),t.type==="alerting"&&a.jsxs(ut,{mt:"lg",gap:"xs",children:[t.duration&&a.jsxs(Nr,{variant:"light",styles:{label:{textTransform:"none"}},leftSection:a.jsx(mie,{style:Jo}),children:["for: ",Hn(t.duration*1e3)]}),t.keepFiringFor&&a.jsxs(Nr,{variant:"light",styles:{label:{textTransform:"none"}},leftSection:a.jsx(vie,{style:Jo}),children:["keep_firing_for: ",Hn(t.keepFiringFor*1e3)]})]}),t.labels&&Object.keys(t.labels).length>0&&a.jsx(be,{mt:"lg",children:a.jsx(Vm,{labels:t.labels})}),t.type==="alerting"&&Object.keys(t.annotations).length>0&&a.jsx(se,{mt:"lg",fz:"sm",children:a.jsx(se.Tbody,{children:Object.entries(t.annotations).map(([r,i])=>a.jsxs(se.Tr,{children:[a.jsx(se.Th,{c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-4))",children:r}),a.jsx(se.Td,{children:i})]},r))})})]})};function _9({value:t,onRemove:e,...n}){return a.jsx(Ql,{fw:600,style:{textTransform:"uppercase",fontWeight:600},onRemove:e,...n,withRemoveButton:!!e,children:t})}const gS=({options:t,optionClass:e,optionCount:n,placeholder:r,values:i,onChange:s})=>{const o=Bw({onDropdownClose:()=>o.resetSelectedOption(),onDropdownOpen:()=>o.updateSelectedOptionIndex("active")}),l=f=>s(i.includes(f)?i.filter(p=>p!==f):[...i,f]),u=f=>s(i.filter(p=>p!==f)),h=i.map(f=>a.jsx(_9,{value:n?`${f} (${n(f)})`:f,className:e(f),onRemove:()=>u(f)},f));return a.jsxs(sn,{store:o,onOptionSubmit:l,withinPortal:!1,children:[a.jsx(sn.DropdownTarget,{children:a.jsx(Qp,{pointer:!0,onClick:()=>o.toggleDropdown(),miw:200,leftSection:a.jsx(rH,{style:Hf}),rightSection:i.length>0?a.jsx(XO,{onClear:()=>s([])}):a.jsx(bb,{}),children:a.jsxs(Ql.Group,{children:[h.length>0?h:a.jsx(Qp.Field,{placeholder:r,mt:1}),a.jsx(sn.EventsTarget,{children:a.jsx(Qp.Field,{type:"hidden",onBlur:()=>o.closeDropdown(),onKeyDown:f=>{f.key==="Backspace"&&(f.preventDefault(),u(i[i.length-1]))}})})]})})}),a.jsx(sn.Dropdown,{children:a.jsx(sn.Options,{children:t.map(f=>a.jsx(sn.Option,{value:f,active:i.includes(f),children:a.jsxs(ut,{gap:"sm",children:[i.includes(f)?a.jsx(Pw,{size:12,color:"gray"}):null,a.jsx(_9,{value:n?`${f} (${n(f)})`:f,className:e(f)})]})},f))})})]})};function Jl(t,e,n=!0){return{...t,default:e,decode:(...i)=>{const s=t.decode(...i);return s===void 0||n&&s===null?e:s}}}function rY(t,e){if(t==null)return t;if(t.length===0&&(!e||e&&t!==""))return null;const n=t instanceof Array?t[0]:t;return n==null?n:!e&&n===""?null:n}function QSe(t){return t==null||t instanceof Array?t:t===""?[]:[t]}function USe(t){return t==null?t:String(t)}function WSe(t){const e=rY(t);return e==null?e:e===""?null:+e}function VSe(t){return t==null?t:String(t)}function YSe(t){const e=rY(t,!0);return e==null?e:String(e)}function GSe(t){return t==null,t}function XSe(t){const e=QSe(t);return e==null,e}const Zh={encode:VSe,decode:YSe},iY={encode:USe,decode:WSe},vS={encode:GSe,decode:XSe};function KSe(t){const e=new URLSearchParams,n=Object.entries(t);for(const[r,i]of n)if(i!==void 0&&i!==null)if(Array.isArray(i))for(const s of i)e.append(r,s??"");else e.append(r,i);return e.toString()}'{}[],":'.split("").map(t=>[t,encodeURIComponent(t)]);function ZSe(t,e){const n={},r=Object.keys(e);for(const i of r){const s=e[i];t[i]?n[i]=t[i].encode(e[i]):n[i]=s==null?s:String(s)}return n}function JSe(t){const e=new URLSearchParams(t),n={};for(let[r,i]of e)Object.prototype.hasOwnProperty.call(n,r)?Array.isArray(n[r])?n[r].push(i):n[r]=[n[r],i]:n[r]=i;return n}class eje{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,n,r,i){this.paramsMap.set(e,{stringified:n,decoded:r,decode:i})}has(e,n,r){if(!this.paramsMap.has(e))return!1;const i=this.paramsMap.get(e);return i?i.stringified===n&&(r==null||i.decode===r):!1}get(e){var n;if(this.paramsMap.has(e))return(n=this.paramsMap.get(e))==null?void 0:n.decoded}registerParams(e){for(const n of e){const r=this.registeredParams.get(n)||0;this.registeredParams.set(n,r+1)}}unregisterParams(e){for(const n of e){const r=(this.registeredParams.get(n)||0)-1;r<=0?(this.registeredParams.delete(n),this.paramsMap.has(n)&&this.paramsMap.delete(n)):this.registeredParams.set(n,r)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}}const Kx=new eje;function tje(t,e){var n,r,i;const s={};let o=!1;const l=Object.keys(t);let u=l;if(e.includeKnownParams||e.includeKnownParams!==!1&&l.length===0){const f=Object.keys((n=e.params)!=null?n:{});u.push(...f)}for(const f of u){const p=t[f];if(p!=null&&typeof p=="object"){s[f]=p;continue}o=!0,s[f]=(i=(r=e.params)==null?void 0:r[f])!=null?i:Zh}return o?s:t}function sY(t,e,n,r){var i;if(!n||!e.length)return t;let s={...t},o=!1;for(const l of e)Object.prototype.hasOwnProperty.call(s,l)||(s[l]=(i=n[l])!=null?i:r,o=!0);return o?s:t}const nje=Object.prototype.hasOwnProperty;function T9(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function aY(t,e,n){var r,i;if(T9(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(let l=0;l<s.length;l++){const u=(i=(r=void 0)==null?void 0:r.equals)!=null?i:T9;if(!nje.call(e,s[l])||!u(t[s[l]],e[s[l]]))return!1}return!0}function oY(t,e,n){const r={},i=Object.keys(e);for(const s of i){const o=e[s],l=t[s];let u;if(n.has(s,l,o.decode))u=n.get(s);else{if(u=o.decode(l),o.equals&&n.has(s,l)){const h=n.get(s);o.equals(u,h)&&(u=h)}u!==void 0&&n.set(s,l,u,o.decode)}u===void 0&&o.default!==void 0&&(u=o.default),r[s]=u}return r}function rje(){let t;function e(n,r,i){const s=oY(n,r,i);return t!=null&&aY(t,s)?t:(t=s,s)}return e}function ije(t){let e;for(const n in t)if(t[n].urlName){const i=`${t[n].urlName}\0${n}`;e?e.push(i):e=[i]}return e?e.join(`
`):void 0}function sje(t){if(t)return Object.fromEntries(t.split(`
`).map(e=>e.split("\0")))}function aje(t,e){var n;let r={};for(const i in t)((n=e[i])==null?void 0:n.urlName)!=null?r[e[i].urlName]=t[i]:r[i]=t[i];return r}let k9,O9,E9,L3={};const lY=(t,e,n)=>{if(k9===e&&E9===t&&O9===n)return L3;k9=e,E9=t;const r=t(e??"");O9=n;const i=sje(n);for(let[s,o]of Object.entries(r)){i!=null&&i[s]&&(delete r[s],s=i[s],r[s]=o);const l=L3[s];aY(o,l)&&(r[s]=l)}return L3=r,r},oje={searchStringToObject:JSe,objectToSearchString:KSe,updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0};function cY(t,e){e==null&&(e={});const n={...t,...e};return e.params&&t.params&&(n.params={...t.params,...e.params}),n}const uY={adapter:{},options:oje},iO=E.createContext(uY);function lje(){const t=E.useContext(iO);if(t===void 0||t===uY)throw new Error("useQueryParams must be used within a QueryParamProvider");return t}function M9({children:t,adapter:e,options:n}){const{adapter:r,options:i}=E.useContext(iO),s=E.useMemo(()=>({adapter:e??r,options:cY(i,n)}),[e,n,r,i]);return E.createElement(iO.Provider,{value:s},t)}function cje({children:t,adapter:e,options:n}){const r=e;return r?E.createElement(r,null,i=>E.createElement(M9,{adapter:i,options:n},t)):E.createElement(M9,{options:n},t)}function uje(t,e){var n;for(const r in t)((n=e[r])==null?void 0:n.default)!==void 0&&t[r]!==void 0&&e[r].encode(e[r].default)===t[r]&&(t[r]=void 0)}function hje({changes:t,updateType:e,currentSearchString:n,paramConfigMap:r,options:i}){const{searchStringToObject:s,objectToSearchString:o}=i;e==null&&(e=i.updateType);let l;const u=lY(s,n),h=sY(r,Object.keys(t),i.params);let f;if(typeof t=="function"){const m=oY(u,h,Kx);f=t(m)}else f=t;l=ZSe(h,f),i.removeDefaultsFromUrl&&uje(l,h),l=aje(l,h);let p;return e==="push"||e==="replace"?p=o(l):p=o({...u,...l}),p!=null&&p.length&&p[0]!=="?"&&(p=`?${p}`),p??""}function dje({searchString:t,adapter:e,navigate:n,updateType:r}){const s={...e.location,search:t};typeof r=="string"&&r.startsWith("replace")?e.replace(s):e.push(s)}const fje=t=>t(),pje=t=>setTimeout(()=>t(),0),ux=[];function mje(t,{immediate:e}={}){ux.push(t);let n=e?fje:pje;ux.length===1&&n(()=>{const r=ux.slice();ux.length=0;const i=r[0].currentSearchString;let s;for(let o=0;o<r.length;++o){const l=o===0?r[o]:{...r[o],currentSearchString:s};s=hje(l)}t.options.skipUpdateWhenNoChange&&s===i||dje({searchString:s??"",adapter:r[r.length-1].adapter,navigate:!0,updateType:r[r.length-1].updateType})})}function gje(t,e){const{adapter:n,options:r}=lje(),[i]=E.useState(rje),{paramConfigMap:s,options:o}=bje(t,e),l=E.useMemo(()=>cY(r,o),[r,o]);let u=tje(s,l);const h=lY(l.searchStringToObject,n.location.search,ije(u));l.includeAllParams&&(u=sY(u,Object.keys(h),l.params,Zh));const f=i(h,u,Kx),p=Object.keys(u).join("\0");E.useEffect(()=>{const x=p.split("\0");return Kx.registerParams(x),()=>{Kx.unregisterParams(x)}},[p]);const m={adapter:n,paramConfigMap:u,options:l},v=E.useRef(m);v.current==null&&(v.current=m),E.useEffect(()=>{v.current.adapter=n,v.current.paramConfigMap=u,v.current.options=l},[n,u,l]);const[y]=E.useState(()=>(w,A)=>{const{adapter:S,paramConfigMap:C,options:j}=v.current;A==null&&(A=j.updateType),mje({changes:w,updateType:A,currentSearchString:S.location.search,paramConfigMap:C,options:j,adapter:S},{immediate:!j.enableBatching})});return[f,y]}var vje=gje;function bje(t,e){let n,r;return t===void 0?(n={},r=e):Array.isArray(t)?(n=Object.fromEntries(t.map(i=>[i,"inherit"])),r=e):(n=t,r=e),{paramConfigMap:n,options:r}}const vo=(t,e,n)=>{const r=E.useMemo(()=>({[t]:e??"inherit"}),[t,e]),[i,s]=vje(r,n),o=i[t],l=E.useCallback((u,h)=>s(typeof u=="function"?f=>{const p=u(f[t]);return{[t]:p}}:{[t]:u},h),[t,s]);return[o,l]};function yje(t,e,n,r){let i=[];for(const s of e){const o=T4(t,s,n,r.concat([]));o!==null&&(Array.isArray(o)?i=i.concat(o):i.push(o))}return i.length===0?null:i.length===1?i[0]:i}function T4(t,e,n=0,r=[]){let i=e;for(let s=n;s<t.length;s++){if(i==null||typeof i!="object")return null;if(Array.isArray(i))return yje(t,i,s,r);const o=t[s];if(typeof o=="string")if(i[o]!==void 0)r.push(o),i=i[o];else return null;else{let l=[];for(const u of Object.keys(i))if(o.test(u)){const h=T4(t,i[u],s+1,r.concat([u]));h!==null&&(Array.isArray(h)?l=l.concat(h):l.push(h))}return l}}return{path:r,value:i}}function xje(t){return t.right!==void 0}function Aje(t){return t.keyPath!==void 0}function pw(t,e){const n={original:t.original,rendered:t.rendered,score:t.score+e.score,index:t.index};let r;return t.matched&&e.matched?r=t.matched.concat(e.matched):t.matched?r=t.matched:e.matched&&(r=e.matched),r&&(n.matched=r),n}function wje(t,e){const n=t;for(const[r,i]of Object.entries(e)){const s=r;n[s]!==void 0?n[s]=pw(n[s],i):n[s]=i}}function Sje(t,e){const n={};for(const[r,i]of Object.entries(e)){const s=r;t[s]!==void 0&&(n[s]=pw(t[s],i))}return n}function jje(t,e,n){return b0(t,e,(r,i)=>r===i,n)}function Cje(t,e,n){return b0(t,e,(r,i)=>r!==i,n)}function _je(t,e,n){return b0(t,e,(r,i)=>r>i,n)}function Tje(t,e,n){return b0(t,e,(r,i)=>r>=i,n)}function kje(t,e,n){return b0(t,e,(r,i)=>r<i,n)}function Oje(t,e,n){return b0(t,e,(r,i)=>r<=i,n)}function b0(t,e,n,r){let i=t,s=e;return!r&&typeof i=="string"&&typeof s=="string"&&(i=i.toLocaleLowerCase(),s=s.toLocaleLowerCase()),n(s,i)}function R9(t,e){const n={match:"fuzzy",pattern:t,keyPath:[]};return Array.isArray(e)?n.keyPath=n.keyPath.concat(e):n.keyPath=[e],n}class Gb{constructor(e){this.conf={caseSensitive:(e==null?void 0:e.caseSensitive)===void 0?!1:e.caseSensitive,excludedChars:(e==null?void 0:e.excludedChars)===void 0?[]:e.excludedChars,includeMatches:(e==null?void 0:e.includeMatches)===void 0?!1:e.includeMatches,shouldSort:(e==null?void 0:e.shouldSort)===void 0?!1:e.shouldSort,shouldRender:(e==null?void 0:e.shouldRender)===void 0?!0:e.shouldRender,escapeHTML:(e==null?void 0:e.escapeHTML)===void 0?!1:e.escapeHTML,findAllMatches:(e==null?void 0:e.findAllMatches)==null?!1:e.findAllMatches,pre:e==null?void 0:e.pre,post:e==null?void 0:e.post,indexedKeys:e==null?void 0:e.indexedKeys}}filter(e,n,r){const i=r!=null&&r.indexedKeys?r.indexedKeys:this.conf.indexedKeys;if(i===void 0)return[];const s=i.length,o=R9(e,i[0]);if(s===1)return this.filterWithQuery(o,n,r);const l={operator:"or",left:o,right:o};let u=l;for(let h=1;h<s;h++){const f=R9(e,i[h]);if(h+1<s){const p={operator:"or",left:f,right:f};u.right=p,u=p}else u.right=f}return this.filterWithQuery(l,n,r)}filterWithQuery(e,n,r){const i=(r==null?void 0:r.shouldSort)!==void 0?r.shouldSort:this.conf.shouldSort,s=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender,o=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,l=(r==null?void 0:r.findAllMatches)!==void 0?r.findAllMatches:this.conf.findAllMatches,u=[{current:e,depth:0}],h=[];for(;u.length>0;){const p=u.shift();if(!p)break;const m=p.current;if(xje(m)){u.unshift({current:m.left,parent:m.operator,depth:p.depth+1},{current:m.right,parent:m.operator,depth:p.depth+1},{current:m.operator,parent:p.parent,depth:p.depth});continue}if(Aje(m)){let x;!l&&h.length>1&&h[h.length-1].depth===p.depth&&p.parent!==void 0&&(x={result:h[h.length-1].result,parent:p.parent}),h.push({result:this.executeQuery(m,n,x,r),depth:p.depth});continue}const v=h.pop(),y=h.pop();if(!v||!y)break;m==="or"?(wje(v.result,y.result),h.push({result:v.result,depth:p.depth})):h.push({result:Sje(v.result,y.result),depth:p.depth})}let f=Object.values(h[0].result);for(let p=0;p<f.length;p++)f[p].rendered=s?this.render(f[p].original,f[p].matched,r):f[p].original,o||(f[p].matched=void 0);return i&&(f=f.sort((p,m)=>m.score-p.score)),f||[]}match(e,n,r){const i=(r==null?void 0:r.includeMatches)!==void 0?r.includeMatches:this.conf.includeMatches,s=(r==null?void 0:r.shouldRender)!==void 0?r.shouldRender:this.conf.shouldRender,o=this.internalMatch(e,n,r);return o!==null&&(o.original=n,o.rendered=s?this.render(n,o.matched,r):n,i||(o.matched=void 0)),o}render(e,n,r){const i=r!=null&&r.pre?r.pre:this.conf.pre,s=r!=null&&r.post?r.post:this.conf.post;if(i===void 0&&s===void 0||n===void 0)return e;const o=JSON.parse(JSON.stringify(e)),l={};for(const u of n)this.renderingWalk(u,o,l,r);return o}renderingWalk(e,n,r,i){let s=n,o=0;const l=e.path;for(;o<l.length-1;)s[l[o]]!==void 0?s=s[l[o]]:s=s[r[l.slice(0,o).toString()]],o++;const u={pre:i!=null&&i.pre?i.pre:this.conf.pre,post:i!=null&&i.post?i.post:this.conf.post,escapeHTML:i!=null&&i.escapeHTML?i.escapeHTML:this.conf.escapeHTML};let h=l[o];if(typeof s[h]=="object"&&typeof e.value=="string"){s=s[h];const f=XI(e.value,e.intervals,u);s[f]=s[e.value],r[l.concat(e.value).toString()]=f,delete s[e.value]}else s[h]===void 0&&(h=r[l.toString()]),s[h]=XI(s[h],e.intervals,u)}executeQuery(e,n,r,i){const s={};for(let o=0;o<n.length;o++){const l=n[o];if(r){if(r.parent==="or"){if(r.result[o])continue}else if(!r.result[o])continue}const u=this.internalMatch(e,l,i);u!==null&&(u.index=o,u.original=l,s[o]=u)}return s}internalMatch(e,n,r){const i=T4(e.keyPath,n);return this.processWalkingPath(i,e,r)}processWalkingPath(e,n,r){let i=null;if(e===null)return null;if(Array.isArray(e))for(const s of e){const o=this.recursiveMatch(s.value,s.path,n,r);o!==null&&(i!=null?i=pw(o,i):i=o)}else i=this.recursiveMatch(e.value,e.path,n,r);return i}recursiveMatch(e,n,r,i){let s=null;if(typeof e=="string"||typeof e=="number")s=this.matchSingleStringOrNumber(e,n,r,i);else if(Array.isArray(e))for(const o of e){const l=this.recursiveMatch(o,n,r,i);l!==null&&(s!=null?s=pw(l,s):s=l)}else for(const o of Object.keys(e))if(s=this.matchSingleStringOrNumber(o,n,r,i),s!==null)break;return s}matchSingleStringOrNumber(e,n,r,i){const s=(i==null?void 0:i.caseSensitive)!==void 0?i.caseSensitive:this.conf.caseSensitive;let o=[];switch((i==null?void 0:i.excludedChars)!==void 0?o=i.excludedChars:this.conf.excludedChars!==void 0&&(o=this.conf.excludedChars),r.match){case"exact":return jje(r.pattern,e,s)?{score:1/0,matched:[{path:n,value:e,intervals:typeof e=="string"?[{from:0,to:e.length-1}]:[]}]}:null;case"negative":return Cje(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"fuzzy":{if(typeof r.pattern!="string"||typeof e!="string")return null;const l=nxe(r.pattern,e,{includeMatches:!0,caseSensitive:s,excludedChars:o});return l===null?null:{score:l.score,matched:[{path:n,value:e,intervals:l.intervals?l.intervals:[]}]}}case"greater":return _je(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"greaterEqual":return Tje(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"less":return kje(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null;case"lessEqual":return Oje(r.pattern,e,s)?{score:1,matched:[{path:n,value:e,intervals:[]}]}:null}}}const Eje="_item_11v54_1",Mje={item:Eje},Rje=new Gb({shouldSort:!0,indexedKeys:["name","labels",["labels",/.*/]]}),Dje=(t,e,n)=>{const r={globalCounts:{inactive:0,pending:0,firing:0,unknown:0},groups:[]};for(const i of t.groups){const s={total:0,inactive:0,pending:0,firing:0,unknown:0};for(const l of i.rules)switch(s.total++,l.state){case"inactive":r.globalCounts.inactive++,s.inactive++;break;case"firing":r.globalCounts.firing++,s.firing++;break;case"pending":r.globalCounts.pending++,s.pending++;break;case"unknown":r.globalCounts.unknown++,s.unknown++;break;default:throw new Error(`Unknown rule state: ${l.state}`)}const o=(e===""?i.rules:Rje.filter(e,i.rules).map(l=>l.original)).filter(l=>n.length===0||n.includes(l.state));r.groups.push({name:i.name,file:i.file,counts:s,rules:o.map(l=>({rule:l,counts:{firing:l.alerts.filter(u=>u.state==="firing").length,pending:l.alerts.filter(u=>u.state==="pending").length}}))})}return r},Nje=[];function hY(){const{data:t}=wi({path:"/rules",params:{type:"alert"}}),{showAnnotations:e}=hi(),[n,r]=vo("state",Jl(vS,Nje)),[i,s]=vo("search",Jl(Zh,"")),[o]=ib(i.trim(),250),[l,u]=sb({key:"alertsPage.showEmptyGroups",defaultValue:!1}),{alertGroupsPerPage:h}=hi(),[f,p]=vo("page",Jl(iY,1)),m=E.useMemo(()=>Dje(t.data,o,n),[t,n,o]),v=E.useMemo(()=>l?m.groups:m.groups.filter(S=>S.rules.length>0),[m.groups,l]),y=Math.ceil(v.length/h),x=Math.max(1,Math.min(f,y));E.useEffect(()=>{x!==f&&p(x)},[x,f,p]);const w=E.useMemo(()=>v.slice((x-1)*h,x*h),[v,x,h]),A=E.useMemo(()=>w.map(S=>a.jsxs($r,{shadow:"xs",withBorder:!0,p:"md",children:[a.jsxs(ut,{mb:"sm",justify:"space-between",children:[a.jsxs(ut,{align:"baseline",children:[a.jsx(dt,{fz:"xl",fw:600,c:"var(--mantine-primary-color-filled)",children:S.name}),a.jsx(dt,{fz:"sm",c:"gray.6",children:S.file})]}),a.jsxs(ut,{children:[S.counts.firing>0&&a.jsxs(Nr,{className:hn.healthErr,children:["firing (",S.counts.firing,")"]}),S.counts.pending>0&&a.jsxs(Nr,{className:hn.healthWarn,children:["pending (",S.counts.pending,")"]}),S.counts.unknown>0&&a.jsxs(Nr,{className:hn.healthUnknown,children:["unknown (",S.counts.unknown,")"]}),S.counts.inactive>0&&a.jsxs(Nr,{className:hn.healthOk,children:["inactive (",S.counts.inactive,")"]})]})]}),S.counts.total===0?a.jsxs(Mt,{title:"No rules",icon:a.jsx(Kn,{}),children:["No rules in this group.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>u(!1),children:"Hide empty groups"})]}):S.rules.length===0?a.jsxs(Mt,{title:"No matching rules",icon:a.jsx(Kn,{}),children:["No rules in this group match your filter criteria (omitted"," ",S.counts.total," filtered rules).",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>u(!1),children:"Hide empty groups"})]}):a.jsx(qm,{allItems:S.rules,child:({items:C})=>a.jsx(Qr,{multiple:!0,variant:"separated",keepMounted:!1,classNames:Mje,children:C.map((j,_)=>a.jsxs(Qr.Item,{mt:fe(5),value:_.toString(),className:j.counts.firing>0?Oh.panelHealthErr:j.counts.pending>0?Oh.panelHealthWarn:j.rule.state==="unknown"?Oh.panelHealthUnknown:Oh.panelHealthOk,children:[a.jsx(Qr.Control,{styles:{label:{paddingBlock:fe(10)}},children:a.jsxs(ut,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(dt,{children:j.rule.name}),a.jsxs(ut,{gap:"xs",children:[j.counts.firing>0&&a.jsxs(Nr,{className:hn.healthErr,children:["firing (",j.counts.firing,")"]}),j.counts.pending>0&&a.jsxs(Nr,{className:hn.healthWarn,children:["pending (",j.counts.pending,")"]})]})]})}),a.jsxs(Qr.Panel,{children:[a.jsx(nY,{rule:j.rule}),j.rule.alerts.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(n0,{my:"md"}),a.jsx(qm,{allItems:j.rule.alerts,child:({items:O})=>a.jsxs(se,{mt:"lg",children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{style:{whiteSpace:"nowrap"},children:[a.jsx(se.Th,{children:"Alert labels"}),a.jsx(se.Th,{children:"State"}),a.jsx(se.Th,{children:"Active Since"}),a.jsx(se.Th,{children:"Value"})]})}),a.jsx(se.Tbody,{children:O.map((M,R)=>a.jsxs(E.Fragment,{children:[a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsx(Vm,{labels:M.labels})}),a.jsx(se.Td,{children:a.jsx(Nr,{className:M.state==="firing"?hn.healthErr:hn.healthWarn,children:M.state})}),a.jsx(se.Td,{style:{whiteSpace:"nowrap"},children:a.jsx(qr,{label:M.activeAt,children:a.jsx(be,{children:jA(M.activeAt,SA(),"")})})}),a.jsx(se.Td,{style:{whiteSpace:"nowrap"},children:isNaN(Number(M.value))?M.value:Number(M.value)})]}),e&&a.jsx(se.Tr,{children:a.jsx(se.Td,{colSpan:4,children:a.jsx(se,{mt:"md",mb:"xl",children:a.jsx(se.Tbody,{children:Object.entries(M.annotations).map(([N,B])=>a.jsxs(se.Tr,{children:[a.jsx(se.Th,{c:"light-dark(var(--mantine-color-gray-7), var(--mantine-color-gray-4))",children:N}),a.jsx(se.Td,{children:B})]},N))})})})})]},R))})]})})]})]})]},_))})})]},`${S.file}-${S.name}`)),[w,e,u]);return a.jsxs(xn,{mt:"xs",children:[a.jsxs(ut,{children:[a.jsx(gS,{options:["inactive","pending","firing","unknown"],optionClass:S=>S==="inactive"?hn.healthOk:S==="pending"?hn.healthWarn:S==="firing"?hn.healthErr:hn.healthUnknown,optionCount:S=>m.globalCounts[S],placeholder:"Filter by rule group state",values:(n==null?void 0:n.filter(S=>S!==null))||[],onChange:S=>r(S)}),a.jsx(ic,{flex:1,leftSection:a.jsx(id,{style:Hf}),placeholder:"Filter by rule name or labels",value:i||"",onChange:S=>s(S.currentTarget.value||null)})]}),m.groups.length===0?a.jsx(Mt,{title:"No rules found",icon:a.jsx(Kn,{}),children:"No rules found."}):!l&&m.groups.length!==v.length&&a.jsxs(Mt,{title:"Hiding groups with no matching rules",icon:a.jsx(Kn,{}),children:["Hiding ",m.groups.length-v.length," empty groups due to filters or no rules.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>u(!0),children:"Show empty groups"})]}),a.jsx(_o,{total:y,value:x,onChange:p,hideWithOnePage:!0}),A]})}const Ije="_item_11v54_1",Bje={item:Ije},Lje=new Gb({shouldSort:!0,indexedKeys:["name","labels",["labels",/.*/]]}),Pje=(t,e,n)=>({groups:t.groups.map(i=>({...i,prefilterRulesCount:i.rules.length,rules:(e===""?i.rules:Lje.filter(e,i.rules).map(s=>s.original)).filter(s=>n.length===0||n.includes(s.health))}))}),Fje=t=>{switch(t){case"ok":return hn.healthOk;case"err":return hn.healthErr;case"unknown":return hn.healthUnknown;default:throw new Error("Unknown rule health state")}},zje=[];function Hje(){const{data:t}=wi({path:"/rules"}),[e,n]=vo("health",Jl(vS,zje)),[r,i]=vo("search",Jl(Zh,"")),[s]=ib(r.trim(),250),[o,l]=sb({key:"alertsPage.showEmptyGroups",defaultValue:!1}),{ruleGroupsPerPage:u}=hi(),[h,f]=vo("page",Jl(iY,1)),p=E.useMemo(()=>Pje(t.data,s,e),[t,e,s]),m=E.useMemo(()=>o?p.groups:p.groups.filter(A=>A.rules.length>0),[p.groups,o]),v=Math.ceil(m.length/u),y=Math.max(1,Math.min(h,v));E.useEffect(()=>{y!==h&&f(y)},[y,h,f]);const x=E.useMemo(()=>m.slice((y-1)*u,y*u),[m,y,u]),w=E.useMemo(()=>x.map(A=>a.jsxs($r,{shadow:"xs",withBorder:!0,p:"md",children:[a.jsxs(ut,{mb:"sm",justify:"space-between",children:[a.jsxs(ut,{align:"baseline",children:[a.jsx(dt,{fz:"xl",fw:600,c:"var(--mantine-primary-color-filled)",children:A.name}),a.jsx(dt,{fz:"sm",c:"gray.6",children:A.file})]}),a.jsxs(ut,{children:[a.jsx(qr,{label:"Last group evaluation",withArrow:!0,children:a.jsxs(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(iT,{style:Jo}),children:["last run ",jA(A.lastEvaluation,SA())]})}),a.jsx(qr,{label:"Duration of last group evaluation",withArrow:!0,children:a.jsxs(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(rT,{style:Jo}),children:["took ",Wp(parseFloat(A.evaluationTime)*1e3)]})}),a.jsx(qr,{label:"Group evaluation interval",withArrow:!0,children:a.jsxs(Nr,{variant:"transparent",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(oH,{style:Jo}),children:["every ",Wp(parseFloat(A.interval)*1e3)," "]})})]})]}),A.prefilterRulesCount===0?a.jsxs(Mt,{title:"No rules",icon:a.jsx(Kn,{}),children:["No rules in this group.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty groups"})]}):A.rules.length===0?a.jsxs(Mt,{title:"No matching rules",icon:a.jsx(Kn,{}),children:["No rules in this group match your filter criteria (omitted"," ",A.prefilterRulesCount," filtered rules).",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty groups"})]}):a.jsx(qm,{allItems:A.rules,child:({items:S})=>a.jsx(Qr,{multiple:!0,variant:"separated",keepMounted:!1,classNames:Bje,children:S.map((C,j)=>a.jsxs(Qr.Item,{mt:fe(5),value:j.toString(),style:{borderLeft:C.health==="err"?"5px solid var(--mantine-color-red-4)":C.health==="unknown"?"5px solid var(--mantine-color-gray-5)":"5px solid var(--mantine-color-green-4)"},children:[a.jsx(Qr.Control,{styles:{label:{paddingBlock:fe(10)}},children:a.jsxs(ut,{justify:"space-between",mr:"lg",children:[a.jsxs(ut,{gap:"xs",wrap:"nowrap",children:[C.type==="alerting"?a.jsx(qr,{label:"Alerting rule",withArrow:!0,children:a.jsx(RE,{style:{width:fe(15),height:fe(15)}})}):a.jsx(qr,{label:"Recording rule",withArrow:!0,children:a.jsx(pse,{style:{width:fe(15),height:fe(15)}})}),a.jsx(dt,{children:C.name})]}),a.jsxs(ut,{gap:"xs",children:[a.jsxs(ut,{gap:"xs",wrap:"wrap",children:[a.jsx(qr,{label:"Last rule evaluation",withArrow:!0,children:a.jsx(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(iT,{style:Jo}),children:jA(C.lastEvaluation,SA())})}),a.jsx(qr,{label:"Duration of last rule evaluation",withArrow:!0,children:a.jsx(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(rT,{style:Jo}),children:Wp(parseFloat(C.evaluationTime)*1e3)})})]}),a.jsx(Nr,{className:Fje(C.health),children:C.health})]})]})}),a.jsxs(Qr.Panel,{children:[a.jsx(nY,{rule:C}),C.lastError&&a.jsxs(Mt,{color:"red",mt:"sm",title:"Rule failed to evaluate",icon:a.jsx(Ei,{}),children:[a.jsx("strong",{children:"Error:"})," ",C.lastError]})]})]},j))})})]},`${A.file}-${A.name}`)),[x,l]);return a.jsxs(xn,{mt:"xs",children:[a.jsxs(ut,{children:[a.jsx(gS,{options:["ok","unknown","err"],optionClass:A=>A==="ok"?hn.healthOk:A==="unknown"?hn.healthWarn:hn.healthErr,placeholder:"Filter by rule health",values:(e==null?void 0:e.filter(A=>A!==null))||[],onChange:A=>n(A)}),a.jsx(ic,{flex:1,leftSection:a.jsx(id,{style:Hf}),placeholder:"Filter by rule name or labels",value:r||"",onChange:A=>i(A.currentTarget.value||null)})]}),p.groups.length===0?a.jsx(Mt,{title:"No rules found",icon:a.jsx(Kn,{}),children:"No rules found."}):!o&&p.groups.length!==m.length&&a.jsxs(Mt,{title:"Hiding groups with no matching rules",icon:a.jsx(Kn,{}),children:["Hiding ",p.groups.length-m.length," empty groups due to filters or no rules.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!0),children:"Show empty groups"})]}),a.jsx(_o,{total:v,value:y,onChange:f,hideWithOnePage:!0}),w]})}const dY="targetsPage.collapsedPools",qje={collapsedPools:Ea(dY,[]),showLimitAlert:!1},fY=w2({name:"targetsPage",initialState:qje,reducers:{setCollapsedPools:(t,{payload:e})=>{t.collapsedPools=e},setShowLimitAlert:(t,{payload:e})=>{t.showLimitAlert=e}}}),{setCollapsedPools:k4,setShowLimitAlert:sO}=fY.actions,$je=fY.reducer,aO=({endpoint:t,globalUrl:e})=>{let n,r="",i=!1;try{n=new URL(t)}catch{i=!0,t.indexOf("?")>-1&&(r=t.substring(t.indexOf("?"))),n=new URL("http://0.0.0.0"+r)}const{host:s,pathname:o,protocol:l,searchParams:u}=n,h=Array.from(u.entries()),f=i?t.replace(r,""):`${l}//${s}${o}`;return a.jsxs(xn,{gap:0,children:[a.jsx(Ur,{size:"sm",href:e,target:"_blank",children:f}),h.length>0&&a.jsx(ut,{gap:"xs",mt:"md",children:h.map(([p,m])=>a.jsx(Nr,{size:"sm",variant:"light",color:"gray",style:{textTransform:"none"},children:`${p}="${m}"`},`${p}/${m}`))})]})},Qje=({discoveredLabels:t,labels:e})=>{const[n,{toggle:r}]=ob(!1);return a.jsxs(xn,{children:[a.jsxs(ut,{wrap:"nowrap",align:"flex-start",children:[a.jsx(Vm,{labels:e}),a.jsx(Er,{size:"xs",color:"gray",variant:"light",onClick:r,title:`${n?"Hide":"Show"} discovered (pre-relabeling) labels`,children:n?a.jsx(DE,{style:uu}):a.jsx(gv,{style:uu})})]}),a.jsx(ww,{expanded:n,children:n&&a.jsxs(a.Fragment,{children:[a.jsx(dt,{fw:700,size:"1em",my:"lg",c:"gray.7",children:"Discovered labels:"}),a.jsx(Vm,{labels:t,style:{color:"var(--mantine-color-blue-light-color)",backgroundColor:"var(--mantine-color-blue-light)"}})]})})]})},Uje=({target:t})=>{const[e,{toggle:n}]=ob(!1);return a.jsxs(xn,{gap:"xs",children:[a.jsxs(ut,{wrap:"nowrap",align:"flex-start",children:[a.jsxs(ut,{gap:"xs",wrap:"wrap",children:[a.jsx(qr,{label:"Last target scrape",withArrow:!0,children:a.jsx(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(iT,{style:Jo}),children:jA(t.lastScrape,SA())})}),a.jsx(qr,{label:"Duration of last target scrape",withArrow:!0,children:a.jsx(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(rT,{style:Jo}),children:Wp(t.lastScrapeDuration*1e3)})})]}),a.jsx(Er,{size:"xs",color:"gray",variant:"light",onClick:n,title:`${e?"Hide":"Show"} additional timing info`,children:e?a.jsx(DE,{style:uu}):a.jsx(gv,{style:uu})})]}),a.jsx(ww,{expanded:e,children:e&&a.jsxs(ut,{gap:"xs",wrap:"wrap",children:[a.jsx(qr,{label:"Scrape interval",withArrow:!0,children:a.jsxs(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(oH,{style:Jo}),children:["every ",t.scrapeInterval]})}),a.jsx(qr,{label:"Scrape timeout",withArrow:!0,children:a.jsxs(Nr,{variant:"light",className:hn.statsBadge,styles:{label:{textTransform:"none"}},leftSection:a.jsx(Qie,{style:Jo}),children:["after ",t.scrapeTimeout]})})]})})]})},Wje=t=>t.count>0&&t.downCount===t.count?Oh.panelHealthErr:t.downCount>=1?Oh.panelHealthWarn:t.unknownCount===t.count?Oh.panelHealthUnknown:Oh.panelHealthOk,Vje=t=>{switch(t.toLowerCase()){case"up":return hn.healthOk;case"down":return hn.healthErr;case"unknown":return hn.healthUnknown;default:return hn.healthWarn}},Yje=new Gb({shouldSort:!0,indexedKeys:["labels","scrapePool",["labels",/.*/]]}),Gje=(t,e,n,r)=>{const i={};for(const o of t)i[o]={targets:[],count:0,upCount:0,downCount:0,unknownCount:0};for(const o of e){if(!i[o.scrapePool])throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");switch(i[o.scrapePool].count++,o.health.toLowerCase()){case"up":i[o.scrapePool].upCount++;break;case"down":i[o.scrapePool].downCount++;break;case"unknown":i[o.scrapePool].unknownCount++;break}}const s=(n===""?e:Yje.filter(n,e).map(o=>o.original)).filter(o=>r.length===0||r.includes(o.health));for(const o of s)i[o.scrapePool].targets.push(o);return i},Xje=E.memo(({poolNames:t,selectedPool:e,healthFilter:n,searchFilter:r})=>{const{data:{data:{activeTargets:i}}}=wi({path:"/targets",params:{state:"active",scrapePool:e===null?"":e}}),s=pu(),[o,l]=sb({key:"targetsPage.showEmptyPools",defaultValue:!1}),{collapsedPools:u,showLimitAlert:h}=ac(v=>v.targetsPage),f=E.useMemo(()=>Gje(e?[e]:t,i,r,n),[e,t,i,r,n]),p=Object.keys(f),m=o?p:p.filter(v=>f[v].targets.length!==0);return a.jsxs(xn,{children:[p.length===0?a.jsx(Mt,{title:"No scrape pools found",icon:a.jsx(Kn,{}),children:"No scrape pools found."}):!o&&p.length!==m.length&&a.jsxs(Mt,{title:"Hiding pools with no matching targets",icon:a.jsx(Kn,{}),children:["Hiding ",p.length-m.length," empty pools due to filters or no targets.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!0),children:"Show empty pools"})]}),h&&a.jsxs(Mt,{title:"Found many pools, showing only one",icon:a.jsx(Kn,{}),withCloseButton:!0,onClose:()=>s(sO(!1)),children:["There are more than ",pY," scrape pools. Showing only the first one. Use the dropdown to select a different pool."]}),a.jsx(Qr,{multiple:!0,variant:"separated",keepMounted:!1,value:p.filter(v=>!u.includes(v)),onChange:v=>s(k4(p.filter(y=>!v.includes(y)))),children:m.map(v=>{const y=f[v];return a.jsxs(Qr.Item,{value:v,className:Wje(y),children:[a.jsx(Qr.Control,{children:a.jsxs(ut,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(dt,{children:v}),a.jsxs(ut,{gap:"xs",children:[a.jsxs(dt,{c:"gray.6",children:[y.upCount," / ",y.count," up"]}),a.jsx(_b,{size:25,thickness:5,sections:y.count===0?[]:[{value:y.upCount/y.count*100,color:"green.4"},{value:y.unknownCount/y.count*100,color:"gray.4"},{value:y.downCount/y.count*100,color:"red.5"}]})]})]})}),a.jsx(Qr.Panel,{children:y.count===0?a.jsxs(Mt,{title:"No targets",icon:a.jsx(Kn,{}),children:["No active targets in this scrape pool.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty pools"})]}):y.targets.length===0?a.jsxs(Mt,{title:"No matching targets",icon:a.jsx(Kn,{}),children:["No targets in this pool match your filter criteria (omitted ",y.count," filtered targets).",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>l(!1),children:"Hide empty pools"})]}):a.jsx(qm,{allItems:y.targets,child:({items:x})=>a.jsxs(se,{children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{w:"25%",children:"Endpoint"}),a.jsx(se.Th,{children:"Labels"}),a.jsx(se.Th,{w:230,children:"Last scrape"}),a.jsx(se.Th,{w:100,children:"State"})]})}),a.jsx(se.Tbody,{children:x.map((w,A)=>a.jsxs(Ln.Fragment,{children:[a.jsxs(se.Tr,{style:{borderBottom:w.lastError?"none":void 0},children:[a.jsx(se.Td,{valign:"top",children:a.jsx(aO,{endpoint:w.scrapeUrl,globalUrl:w.globalUrl})}),a.jsx(se.Td,{valign:"top",children:a.jsx(Qje,{labels:w.labels,discoveredLabels:w.discoveredLabels})}),a.jsx(se.Td,{valign:"top",children:a.jsx(Uje,{target:w})}),a.jsx(se.Td,{valign:"top",children:a.jsx(Nr,{className:Vje(w.health),children:w.health})})]}),w.lastError&&a.jsx(se.Tr,{children:a.jsx(se.Td,{colSpan:5,valign:"top",children:a.jsxs(Mt,{color:"red",mb:"sm",icon:a.jsx(Ei,{}),children:[a.jsx("strong",{children:"Error scraping target:"})," ",w.lastError]})})})]},A))})]})})})]},v)})})]})}),pY=20,Kje=[];function Zje(){const{data:{data:{scrapePools:t}}}=wi({path:"/scrape_pools"}),e=pu(),n="Select scrape pool",[r,i]=vo("pool",Zh),[s,o]=E.useState(n),[l,u]=E.useState(!1),[h,f]=vo("health",Jl(vS,Kje)),[p,m]=vo("search",Jl(Zh,"")),[v]=ib(p.trim(),250),{collapsedPools:y,showLimitAlert:x}=ac(A=>A.targetsPage),w=t.length>pY&&r===void 0;return w&&(i(t[0]),e(sO(!0))),a.jsxs(a.Fragment,{children:[a.jsxs(ut,{mb:"md",mt:"xs",children:[a.jsx(o0,{placeholder:s,data:[{label:"All pools",value:""},...t],value:l?null:w&&t[0]||r||null,onChange:A=>{i(A),x&&e(sO(!1))},onDropdownOpen:()=>{o(r||n),u(!0)},onDropdownClose:()=>{o(n),u(!1)},searchable:!0}),a.jsx(gS,{options:["unknown","up","down"],optionClass:A=>A==="unknown"?hn.healthUnknown:A==="up"?hn.healthOk:hn.healthErr,placeholder:"Filter by target health",values:(h==null?void 0:h.filter(A=>A!==null))||[],onChange:A=>f(A)}),a.jsx(ic,{flex:1,leftSection:a.jsx(id,{style:Hf}),placeholder:"Filter by endpoint or labels",value:p||"",onChange:A=>m(A.currentTarget.value||null)}),a.jsx(Er,{size:"input-sm",title:y.length>0?"Expand all pools":"Collapse all pools",variant:"light",onClick:()=>e(k4(y.length>0?[]:t)),children:y.length>0?a.jsx(sH,{style:lw}):a.jsx(iH,{style:lw})})]}),a.jsx(Ef,{title:"Error showing target pools",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(10),(A,S)=>a.jsx(Qa,{height:40,mb:15,width:1e3,mx:"auto"},S))}),children:a.jsx(Xje,{poolNames:t,selectedPool:w&&t[0]||r||null,healthFilter:h,searchFilter:v})})},location.pathname)]})}const ru=({children:t,title:e,icon:n})=>a.jsxs($r,{shadow:"xs",withBorder:!0,p:"md",children:[e&&a.jsxs(ut,{wrap:"nowrap",align:"center",ml:"xs",mb:"sm",gap:"xs",fz:"xl",fw:600,children:[n&&a.jsx(n,{style:$xe}),e]}),t]}),Xb=({children:t})=>a.jsx(xn,{gap:"lg",maw:1e3,mx:"auto",mt:"xs",children:t});function Jje(){const{data:t}=wi({path:"/status/buildinfo"}),{data:e}=wi({path:"/status/runtimeinfo"}),{useLocalTime:n}=hi(),r={startTime:{title:"Start time",formatValue:i=>mf(new Date(i).valueOf()/1e3,n)},CWD:{title:"Working directory"},hostname:{title:"Hostname"},serverTime:{title:"Server Time",formatValue:i=>mf(new Date(i).valueOf()/1e3,n)},reloadConfigSuccess:{title:"Configuration reload",formatValue:i=>i?"Successful":"Unsuccessful"},lastConfigTime:{title:"Last successful configuration reload",formatValue:i=>mf(new Date(i).valueOf()/1e3,n)},corruptionCount:{title:"WAL corruptions"},goroutineCount:{title:"Goroutines"},storageRetention:{title:"Storage retention"}};return a.jsxs(Xb,{children:[a.jsx(ru,{title:"Build information",icon:vse,children:a.jsx(se,{layout:"fixed",children:a.jsx(se.Tbody,{children:Object.entries(t.data).map(([i,s])=>a.jsxs(se.Tr,{children:[a.jsx(se.Th,{style:{textTransform:"capitalize"},children:i}),a.jsx(se.Td,{children:s})]},i))})})}),a.jsx(ru,{title:"Runtime information",icon:Xie,children:a.jsx(se,{layout:"fixed",children:a.jsx(se.Tbody,{children:Object.entries(e.data).map(([i,s])=>{const{title:o=i,formatValue:l=u=>u}=r[i]||{};return a.jsxs(se.Tr,{children:[a.jsx(se.Th,{style:{textTransform:"capitalize"},children:o}),a.jsx(se.Td,{children:l(s)})]},i)})})})})]})}Pe.extend(gq);function eCe(){const{data:{data:{headStats:t,labelValueCountByLabelName:e,seriesCountByMetricName:n,memoryInBytesByLabelName:r,seriesCountByLabelValuePair:i}}}=wi({path:"/status/tsdb"}),{useLocalTime:s,pathPrefix:o}=hi(),l=$=>{const G=mf($,s);return G==="Invalid Date"?h===0?"No datapoints yet":`Error parsing time (${$})`:G},{chunkCount:u,numSeries:h,numLabelPairs:f,minTime:p,maxTime:m}=t,v=[{name:"Number of Series",value:h},{name:"Number of Chunks",value:u},{name:"Number of Label Pairs",value:f},{name:"Current Min Time",value:`${l(p/1e3)}`},{name:"Current Max Time",value:`${l(m/1e3)}`}],[y,x]=E.useState(""),[w,A]=E.useState(null),[S,C]=E.useState(null),[j,_]=E.useState(null),[O,M]=E.useState(null),[R,N]=E.useState(!1),[B,D]=E.useState(null),[L,U]=E.useState(null),[H,z]=E.useState(!1),I=async()=>{var Y;_(null),M(null);const $=y.split(`
`).map(W=>W.trim()).filter(W=>W!=="");if($.length===0){_("Provide at least one match[] selector.");return}const G=new URLSearchParams;for(const W of $)G.append("match[]",W);w!==null&&G.append("start",(w/1e3).toString()),S!==null&&G.append("end",(S/1e3).toString()),N(!0);try{const W=await fetch(`${o}/${Hk}/admin/tsdb/delete_series?${G.toString()}`,{method:"POST",credentials:"same-origin"});if(!W.ok){if((Y=W.headers.get("content-type"))!=null&&Y.startsWith("application/json")){const V=await W.json();throw new Error(V.error||W.statusText)}throw new Error(W.statusText)}M(`Successfully deleted series matching: ${$.join(", ")}`),x(""),A(null),C(null)}catch(W){_(W instanceof Error?W.message:"Unknown error")}finally{N(!1)}},F=async()=>{var $;D(null),U(null),z(!0);try{const G=await fetch(`${o}/${Hk}/admin/tsdb/clean_tombstones`,{method:"POST",credentials:"same-origin"});if(!G.ok){if(($=G.headers.get("content-type"))!=null&&$.startsWith("application/json")){const Y=await G.json();throw new Error(Y.error||G.statusText)}throw new Error(G.statusText)}U("Tombstones cleaned successfully.")}catch(G){D(G instanceof Error?G.message:"Unknown error")}finally{z(!1)}};return a.jsxs(Xb,{children:[[{title:"TSDB Head Status",stats:v,formatAsCode:!1},{title:"Top 10 label names with value count",stats:e,formatAsCode:!0},{title:"Top 10 series count by metric names",stats:n,formatAsCode:!0},{title:"Top 10 label names with high memory usage",unit:"Bytes",stats:r,formatAsCode:!0},{title:"Top 10 series count by label value pairs",stats:i,formatAsCode:!0}].map(({title:$,unit:G="Count",stats:Y,formatAsCode:W})=>a.jsx(ru,{title:$,children:a.jsxs(se,{layout:"fixed",children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{children:"Name"}),a.jsx(se.Th,{children:G})]})}),a.jsx(se.Tbody,{children:Y.map(({name:V,value:X})=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{style:{wordBreak:"break-all"},children:W?a.jsx("code",{children:V}):V}),a.jsx(se.Td,{children:X})]},V))})]})})),a.jsx(ru,{title:"Delete Series",icon:sT,children:a.jsxs(xn,{gap:"md",children:[a.jsx(Mt,{icon:a.jsx(Ei,{size:16}),color:"yellow",title:"Warning",children:'This operation marks matching series for deletion. Deleted data cannot be recovered. Use "Clean Tombstones" afterwards to reclaim disk space.'}),j&&a.jsx(Mt,{color:"red",title:"Error",withCloseButton:!0,onClose:()=>_(null),children:j}),O&&a.jsx(Mt,{icon:a.jsx(cA,{size:16}),color:"green",title:"Success",withCloseButton:!0,onClose:()=>M(null),children:O}),a.jsx(dE,{label:"Series selector(s)",description:'PromQL series selectors, one per line. Example: up{job="prometheus"}',placeholder:'up{job="prometheus"}',value:y,onChange:$=>x($.currentTarget.value),autosize:!0,minRows:2,maxRows:6}),a.jsxs(ut,{grow:!0,children:[a.jsx(jv,{label:"Start time",description:"Optional",placeholder:"Select start time",valueFormat:"YYYY-MM-DD HH:mm:ss",withSeconds:!0,value:w!==null?s?Pe(w).format():Pe(w).subtract(Pe().utcOffset(),"minutes").format():void 0,onChange:$=>A($?s?new Date($).getTime():Pe.utc($).valueOf():null),clearable:!0}),a.jsx(jv,{label:"End time",description:"Optional",placeholder:"Select end time",valueFormat:"YYYY-MM-DD HH:mm:ss",withSeconds:!0,value:S!==null?s?Pe(S).format():Pe(S).subtract(Pe().utcOffset(),"minutes").format():void 0,onChange:$=>C($?s?new Date($).getTime():Pe.utc($).valueOf():null),clearable:!0})]}),a.jsx(ut,{children:a.jsx(Oi,{color:"red",leftSection:a.jsx(sT,{size:16}),onClick:I,loading:R,disabled:!y.trim(),children:"Delete series"})})]})}),a.jsx(ru,{title:"Clean Tombstones",children:a.jsxs(xn,{gap:"md",children:[B&&a.jsx(Mt,{color:"red",title:"Error",withCloseButton:!0,onClose:()=>D(null),children:B}),L&&a.jsx(Mt,{icon:a.jsx(cA,{size:16}),color:"green",title:"Success",withCloseButton:!0,onClose:()=>U(null),children:L}),a.jsx(dt,{size:"sm",c:"dimmed",children:"After deleting series, tombstones mark the data for deletion but do not free disk space immediately. Use this to remove tombstones and reclaim storage."}),a.jsx(ut,{children:a.jsx(Oi,{variant:"outline",onClick:F,loading:H,children:"Clean tombstones"})})]})})]})}const tCe="_th_1w9xk_1",nCe="_control_1w9xk_5",rCe="_icon_1w9xk_17",P3={th:tCe,control:nCe,icon:rCe};function D9({children:t,reversed:e,sorted:n,onSort:r}){const i=n?e?DE:gv:Jie;return a.jsx(se.Th,{className:P3.th,children:a.jsx(Br,{onClick:r,className:P3.control,children:a.jsxs(ut,{justify:"space-between",children:[a.jsx(dt,{fw:600,fz:"sm",children:t}),a.jsx(dv,{className:P3.icon,children:a.jsx(i,{style:{width:fe(16),height:fe(16)},stroke:1.5})})]})})})}function N9(t,e){const n=e.toLowerCase().trim();return t.filter(r=>ni(t[0]).some(i=>r[i].toLowerCase().includes(n)))}function I9(t,e){const{sortBy:n}=e;return N9(n?[...t].sort((r,i)=>e.reversed?i[n].localeCompare(r[n]):r[n].localeCompare(i[n])):t,e.search)}function iCe(){const{data:t}=wi({path:"/status/flags"}),e=Object.entries(t.data).map(([v,y])=>({flag:v,value:y})),[n,r]=E.useState(""),[i,s]=E.useState(e),[o,l]=E.useState(null),[u,h]=E.useState(!1),f=v=>{const y=v===o?!u:!1;h(y),l(v),s(I9(e,{sortBy:v,reversed:y,search:n}))},p=v=>{const{value:y}=v.currentTarget;r(y),s(I9(e,{sortBy:o,reversed:u,search:y}))},m=i.map(v=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{children:a.jsxs("code",{children:["--",v.flag]})}),a.jsx(se.Td,{children:a.jsx("code",{children:v.value})})]},v.flag));return a.jsx(Xb,{children:a.jsxs(ru,{children:[a.jsx(ic,{placeholder:"Filter by flag name or value",mb:"md",autoFocus:!0,leftSection:a.jsx(id,{style:Hf}),value:n,onChange:p}),a.jsxs(se,{horizontalSpacing:"md",verticalSpacing:"xs",miw:700,layout:"fixed",children:[a.jsx(se.Tbody,{children:a.jsxs(se.Tr,{children:[a.jsx(D9,{sorted:o==="flag",reversed:u,onSort:()=>f("flag"),children:"Flag"}),a.jsx(D9,{sorted:o==="value",reversed:u,onSort:()=>f("value"),children:"Value"})]})}),a.jsx(se.Tbody,{children:m.length>0?m:a.jsx(se.Tr,{children:a.jsx(se.Td,{colSpan:2,children:a.jsx(dt,{fw:500,ta:"center",children:"Nothing found"})})})})]})]})})}const oO={getHighlighter:()=>({code:t})=>({highlightedCode:t,isHighlighted:!1})},mY=E.createContext({adapter:oO,highlight:oO.getHighlighter(null)});function sCe({adapter:t,children:e}){const[n,r]=E.useState(null),i=E.useMemo(()=>t.getHighlighter(n),[t,n]);return E.useEffect(()=>{t.loadContext&&t.loadContext().then(r)},[t]),a.jsx(mY,{value:{adapter:t,highlight:i},children:e})}function aCe(){var t;return((t=E.use(mY))==null?void 0:t.highlight)||oO.getHighlighter(null)}const[oCe,lCe]=Ki("CodeHighlightProvider was not found in the component tree"),bS=Zi(t=>{const{children:e,vars:n,tooltipLabel:r,...i}=je("CodeHighlightControl",null,t),s=lCe(),o=s.getStyles("controlTooltip"),l=a.jsx(Er,{...s.getStyles("control"),...i,variant:"none","data-code-color-scheme":s.codeColorScheme,children:e});return r?a.jsx(qr,{label:r,fz:"sm",position:"bottom",classNames:{tooltip:o.className},styles:{tooltip:o.style},"data-code-color-scheme":s.codeColorScheme,transitionProps:{duration:0},children:l}):l});bS.displayName="@mantine/code-highlight/CodeHighlightControl";function gY({copied:t,...e}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...e,children:t?a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M5 12l5 5l10 -10"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),a.jsx("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]})})}gY.displayName="@mantine/code-highlight/CopyIcon";function vY({code:t,copyLabel:e="Copy",copiedLabel:n="Copied"}){const r=aP();return a.jsx(bS,{onClick:()=>r.copy(t.trim()),variant:"none",tooltipLabel:r.copied?n:e,"aria-label":r.copied?n:`${e} code`,children:a.jsx(gY,{copied:r.copied})})}vY.displayName="@mantine/code-highlight/CopyCodeButton";function bY({expanded:t,style:e,...n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...n,children:t?a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M12 13v-8l-3 3m6 0l-3 -3"}),a.jsx("path",{d:"M9 17l1 0"}),a.jsx("path",{d:"M14 17l1 0"}),a.jsx("path",{d:"M19 17l1 0"}),a.jsx("path",{d:"M4 17l1 0"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),a.jsx("path",{d:"M12 11v8l3 -3m-6 0l3 3"}),a.jsx("path",{d:"M9 7l1 0"}),a.jsx("path",{d:"M14 7l1 0"}),a.jsx("path",{d:"M19 7l1 0"}),a.jsx("path",{d:"M4 7l1 0"})]})})}bY.displayName="@mantine/code-highlight/ExpandIcon";function yY({expanded:t,onExpand:e,expandCodeLabel:n="Expand code",collapseCodeLabel:r="Collapse code"}){return a.jsx(bS,{onClick:()=>e(!t),tooltipLabel:t?r:n,"aria-label":t?r:n,children:a.jsx(bY,{expanded:t})})}yY.displayName="@mantine/code-highlight/ExpandCodeButton";var xY={root:"m_5cb1b9c8",codeHighlight:"m_e597c321",inlineCodeHighlight:"m_dfe9c588",pre:"m_2c47c4fd",code:"m_5caae6d3",controls:"m_be7e9c9c",control:"m_d498bab7",controlTooltip:"m_4c3d814c",scrollarea:"m_f744fd40",showCodeButton:"m_c9378bc2",file:"m_5cac2e62",fileIcon:"m_b46cddfb",filesScrollarea:"m_7b14120b",files:"m_38d99e51"};const cCe={withCopyButton:!0,expandCodeLabel:"Expand code",collapseCodeLabel:"Collapse code"},AY=(t,{maxCollapsedHeight:e,background:n,radius:r})=>({codeHighlight:{"--ch-max-height":fe(e),"--ch-background":n?gr(n,t):void 0,"--ch-radius":typeof r<"u"?Zn(r):void 0}}),Kb=Ie(t=>{var W,V,X,ee;const e=je("CodeHighlight",cCe,t),{classNames:n,className:r,style:i,styles:s,unstyled:o,vars:l,code:u,copiedLabel:h,copyLabel:f,defaultExpanded:p,expanded:m,onExpandedChange:v,maxCollapsedHeight:y,withCopyButton:x,withExpandButton:w,expandCodeLabel:A,collapseCodeLabel:S,radius:C,background:j,withBorder:_,controls:O,language:M,codeColorScheme:R,__withOffset:N,__inline:B,__staticSelector:D,attributes:L,...U}=e,H=ft({name:D||"CodeHighlight",classes:xY,props:e,className:r,style:i,classNames:n,styles:s,unstyled:o,attributes:L,vars:l,varsResolver:AY,rootSelector:"codeHighlight"}),[z,I]=Xi({value:m,defaultValue:p,finalValue:!0,onChange:v}),F=O&&O.length>0||w||x,$=xw(),G=aCe()({code:u.trim(),language:M,colorScheme:R??$}),Y=G.isHighlighted?{dangerouslySetInnerHTML:{__html:G.highlightedCode}}:{children:u.trim()};return B?a.jsx(be,{component:"code",...U,...G.codeElementProps,...H("codeHighlight",{className:Pr((W=G.codeElementProps)==null?void 0:W.className,r),style:[{...(V=G.codeElementProps)==null?void 0:V.style},i]}),"data-with-border":_||void 0,...Y}):a.jsx(oCe,{value:{getStyles:H,codeColorScheme:R},children:a.jsxs(be,{...H("codeHighlight"),...U,dir:"ltr","data-code-color-scheme":R,"data-with-border":_||void 0,children:[F&&a.jsxs("div",{...H("controls"),"data-with-offset":N||void 0,children:[O,w&&a.jsx(yY,{expanded:z,onExpand:I,expandCodeLabel:A,collapseCodeLabel:S}),x&&a.jsx(vY,{code:u,copiedLabel:h,copyLabel:f})]}),a.jsx(ma,{type:"hover",scrollbarSize:4,dir:"ltr",offsetScrollbars:!1,"data-collapsed":!z||void 0,styles:{viewport:{overscrollBehaviorInline:"none"}},...H("scrollarea"),children:a.jsx("pre",{...H("pre"),"data-with-offset":N||void 0,children:a.jsx("code",{...G.codeElementProps,...H("code",{className:(X=G.codeElementProps)==null?void 0:X.className,style:(ee=G.codeElementProps)==null?void 0:ee.style}),...Y})})}),a.jsx(Br,{...H("showCodeButton"),mod:{hidden:z},onClick:()=>I(!0),"data-code-color-scheme":R,children:A})]})})});Kb.displayName="@mantine/code-highlight/CodeHighlight";Kb.classes=xY;Kb.varsResolver=AY;Kb.Control=bS;function uCe(t){return{getHighlighter:()=>({code:e,language:n})=>{const r=t.getLanguage(n)?n:"plaintext";return{highlightedCode:t.highlight(e.trim(),{language:r}).value,isHighlighted:!0,codeElementProps:{className:`hljs ${r}`}}}}}function hCe(){const{data:{data:{yaml:t}}}=wi({path:"/status/config"});return a.jsx(Kb,{code:t,language:"yaml",miw:"50vw",w:"fit-content",maw:"calc(100vw - 75px)",mx:"auto",mt:"xs"})}const dCe=()=>a.jsx(Xb,{children:a.jsxs(ru,{title:"Prometheus Agent",icon:ose,children:[a.jsxs(dt,{p:"md",children:["This Prometheus instance is running in ",a.jsx("strong",{children:"agent mode"}),". In this mode, Prometheus is only used to scrape discovered targets and forward the scraped metrics to remote write endpoints."]}),a.jsx(dt,{p:"md",children:"Some features are not available in this mode, such as querying and alerting."})]})}),fCe=()=>{const{colorScheme:t,setColorScheme:e}=gP(),n={style:{width:fe(20),height:fe(20),display:"block"},stroke:1.5};return a.jsx(Er,{color:"gray",title:`Switch to ${t==="light"?"dark":t==="dark"?"browser-preferred":"light"} theme`,"aria-label":`Switch to ${t==="light"?"dark":t==="dark"?"browser-preferred":"light"} theme`,size:32,onClick:()=>e(t==="light"?"dark":t==="dark"?"auto":"light"),children:t==="light"?a.jsx(Rse,{...n}):t==="dark"?a.jsx(Ose,{...n}):a.jsx(Cse,{...n})})},pCe=()=>{const{useLocalTime:t,enableQueryHistory:e,enableAutocomplete:n,enableSyntaxHighlighting:r,enableLinter:i,showAnnotations:s,showQueryWarnings:o,showQueryInfoNotices:l,ruleGroupsPerPage:u,alertGroupsPerPage:h}=hi(),f=pu();return a.jsxs(jn,{position:"bottom",withArrow:!0,shadow:"md",children:[a.jsx(jn.Target,{children:a.jsx(Er,{color:"gray",title:"Settings","aria-label":"Settings",size:32,children:a.jsx(sse,{style:uu})})}),a.jsx(jn.Dropdown,{children:a.jsxs(ut,{align:"flex-start",children:[a.jsxs(xn,{children:[a.jsx(Vd,{p:"md",legend:"Global settings",children:a.jsx(Hs,{checked:t,label:"Use local time",onChange:p=>f(oo({useLocalTime:p.currentTarget.checked}))})}),a.jsx(Vd,{p:"md",legend:"Query page settings",children:a.jsxs(xn,{children:[a.jsx(Hs,{checked:e,label:"Enable query history",onChange:p=>f(oo({enableQueryHistory:p.currentTarget.checked}))}),a.jsx(Hs,{checked:n,label:"Enable autocomplete",onChange:p=>f(oo({enableAutocomplete:p.currentTarget.checked}))}),a.jsx(Hs,{checked:r,label:"Enable syntax highlighting",onChange:p=>f(oo({enableSyntaxHighlighting:p.currentTarget.checked}))}),a.jsx(Hs,{checked:i,label:"Enable linter",onChange:p=>f(oo({enableLinter:p.currentTarget.checked}))}),a.jsx(Hs,{checked:o,label:"Show query warnings",onChange:p=>f(oo({showQueryWarnings:p.currentTarget.checked}))}),a.jsx(Hs,{checked:l,label:"Show query info notices",onChange:p=>f(oo({showQueryInfoNotices:p.currentTarget.checked}))})]})})]}),a.jsxs(xn,{children:[a.jsx(Vd,{p:"md",legend:"Alerts page settings",children:a.jsxs(xn,{children:[a.jsx(Hs,{checked:s,label:"Show expanded annotations",onChange:p=>f(oo({showAnnotations:p.currentTarget.checked}))}),a.jsx(mv,{min:1,allowDecimal:!1,label:"Alert groups per page",value:h,onChange:p=>{typeof p=="number"&&f(oo({alertGroupsPerPage:p}))}})]})}),a.jsx(Vd,{p:"md",legend:"Rules page settings",children:a.jsx(mv,{min:1,allowDecimal:!1,label:"Rule groups per page",value:u,onChange:p=>{typeof p=="number"&&f(oo({ruleGroupsPerPage:p}))}})})]})]})})]})},B9="is starting up...",mCe="is shutting down...",gCe="is not ready...",vCe=()=>{const{pathPrefix:t,agentMode:e}=hi(),n=pu(),[r,i]=E.useState(0),[s,o]=E.useState(""),{data:l}=qH({queryKey:["ready",r],retry:!1,refetchOnWindowFocus:!1,gcTime:0,queryFn:async({signal:p})=>{try{const m=await fetch(`${t}/-/ready`,{cache:"no-store",credentials:"same-origin",signal:p});switch(m.status){case 200:return o(""),!0;case 503:return m.headers.get("X-Prometheus-Stopping")==="true"?o(mCe):o(B9),!1;default:throw new Error(m.statusText)}}catch{throw new Error("Unexpected error while fetching ready status")}}}),u=s===B9,{data:h,isSuccess:f}=wi({path:"/status/walreplay",key:["walreplay",r]});return E.useEffect(()=>{l&&n(oo({ready:l}))},[l,n]),E.useEffect(()=>{const p=setInterval(()=>i(m=>m+1),1e3);return()=>clearInterval(p)},[]),a.jsx(Mt,{color:"yellow",title:"Prometheus "+(e&&"Agent "||"")+(s||gCe),icon:a.jsx(Ei,{}),maw:500,mx:"auto",mt:"lg",children:u&&f&&h&&a.jsxs(xn,{children:[a.jsxs("strong",{children:["Replaying WAL (",h.data.current,"/",h.data.max,")"]}),a.jsx(s0,{size:"xl",animated:!0,color:"yellow",value:(h.data.current-h.data.min+1)/(h.data.max-h.data.min+1)*100})]})})},hx=({children:t})=>{const{ready:e}=hi();return e?a.jsx(a.Fragment,{children:t}):a.jsx(vCe,{})},bCe={notifications:[],isConnectionError:!1},wY=E.createContext(bCe),yCe=()=>E.useContext(wY);async function xCe(t,e){const n=t.getReader();let r;for(;!(r=await n.read()).done;)e(r.value)}function ACe(t){let e,n,r,i=!1;return function(o){e===void 0?(e=o,n=0,r=-1):e=SCe(e,o);const l=e.length;let u=0;for(;n<l;){i&&(e[n]===10&&(u=++n),i=!1);let h=-1;for(;n<l&&h===-1;++n)switch(e[n]){case 58:r===-1&&(r=n-u);break;case 13:i=!0;case 10:h=n;break}if(h===-1)break;t(e.subarray(u,h),r),u=n,r=-1}u===l?e=void 0:u!==0&&(e=e.subarray(u),n-=u)}}function wCe(t,e,n){let r=L9();const i=new TextDecoder;return function(o,l){if(o.length===0)n==null||n(r),r=L9();else if(l>0){const u=i.decode(o.subarray(0,l)),h=l+(o[l+1]===32?2:1),f=i.decode(o.subarray(h));switch(u){case"data":r.data=r.data?r.data+`
`+f:f;break;case"event":r.event=f;break;case"id":t(r.id=f);break;case"retry":const p=parseInt(f,10);isNaN(p)||e(r.retry=p);break}}}}function SCe(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function L9(){return{data:"",event:"",id:"",retry:void 0}}var jCe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const lO="text/event-stream",CCe=1e3,P9="last-event-id";function _Ce(t,e){var{signal:n,headers:r,onopen:i,onmessage:s,onclose:o,onerror:l,openWhenHidden:u,fetch:h}=e,f=jCe(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((p,m)=>{const v=Object.assign({},r);v.accept||(v.accept=lO);let y;function x(){y.abort(),document.hidden||_()}u||document.addEventListener("visibilitychange",x);let w=CCe,A=0;function S(){document.removeEventListener("visibilitychange",x),window.clearTimeout(A),y.abort()}n==null||n.addEventListener("abort",()=>{S(),p()});const C=h??window.fetch,j=i??TCe;async function _(){var O;y=new AbortController;try{const M=await C(t,Object.assign(Object.assign({},f),{headers:v,signal:y.signal}));await j(M),await xCe(M.body,ACe(wCe(R=>{R?v[P9]=R:delete v[P9]},R=>{w=R},s))),o==null||o(),S(),p()}catch(M){if(!y.signal.aborted)try{const R=(O=l==null?void 0:l(M))!==null&&O!==void 0?O:w;window.clearTimeout(A),A=window.setTimeout(_,R)}catch(R){S(),m(R)}}}_()})}function TCe(t){const e=t.headers.get("content-type");if(!(e!=null&&e.startsWith(lO)))throw new Error(`Expected content-type to be ${lO}, Actual: ${e}`)}const kCe=({children:t})=>{const{pathPrefix:e}=hi(),[n,r]=E.useState([]),[i,s]=E.useState(!1),[o,l]=E.useState(!1),{data:u,isError:h}=Vh({path:"/notifications",enabled:o,refetchInterval:1e4});return E.useEffect(()=>{u&&u.data&&r(u.data),s(h)},[u,h]),E.useEffect(()=>{const f=new AbortController;return _Ce(`${e}/api/v1/notifications/live`,{signal:f.signal,async onopen(p){if(p.ok)p.status===200?(r([]),s(!1)):p.status===204&&(f.abort(),l(!0));else throw s(!0),new Error(`Unexpected response: ${p.status} ${p.statusText}`)},onmessage(p){const m=JSON.parse(p.data);r(v=>{const y=[...v.filter(x=>x.text!==m.text)];return m.active&&y.push(m),y})},onclose(){throw new Error("Server closed the connection")},onerror(){return s(!0),5e3}}),()=>{f.abort()}},[e]),a.jsx(wY.Provider,{value:{notifications:n,isConnectionError:i},children:t})},OCe=()=>{const{notifications:t,isConnectionError:e}=yCe(),{useLocalTime:n}=hi();return t.length===0&&!e?null:a.jsx(Uw,{color:"red",size:16,label:e?"!":t.length,children:a.jsxs(jn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[a.jsx(jn.Target,{children:a.jsx(Er,{color:"gray",title:"Notifications","aria-label":"Notifications",size:32,children:a.jsx(Pie,{style:uu})})}),a.jsx(jn.Dropdown,{children:a.jsxs(xn,{gap:"xs",children:[a.jsx(dt,{fw:700,size:"xs",c:"dimmed",ta:"center",children:"Notifications"}),a.jsx(ma.Autosize,{mah:200,children:e?a.jsx($r,{p:"xs",color:"red",children:a.jsxs(ut,{wrap:"nowrap",children:[a.jsx(qie,{color:"red",style:{width:fe(20),height:fe(20)}}),a.jsxs(xn,{gap:"0",children:[a.jsx(dt,{size:"sm",fw:500,children:"Real-time notifications interrupted."}),a.jsx(dt,{size:"xs",c:"dimmed",children:"Please refresh the page or check your connection."})]})]})}):t.length===0?a.jsx(dt,{ta:"center",c:"dimmed",children:"No notifications"}):t.map((r,i)=>a.jsx($r,{p:"xs",children:a.jsxs(ut,{wrap:"nowrap",align:"flex-start",children:[a.jsx(Ei,{color:"red",style:{width:fe(20),height:fe(20),marginTop:fe(3)}}),a.jsxs(xn,{maw:250,gap:5,children:[a.jsx(dt,{size:"sm",fw:500,children:r.text}),a.jsx(dt,{size:"xs",c:"dimmed",children:mf(new Date(r.date).valueOf()/1e3,n)})]})]})},i))})]})})]})})},ECe=({children:t})=>{var e;const{navigator:n}=E.useContext(ba),r=LE(),i=(e=E.useContext(Bf))==null?void 0:e.router,s=To();return t({replace(l){r(l.search||"?",{replace:!0,state:l.state})},push(l){r(l.search||"?",{replace:!1,state:l.state})},get location(){var l,u,h;return(h=(u=(l=i==null?void 0:i.state)==null?void 0:l.location)!=null?u:n==null?void 0:n.location)!=null?h:s}})},SY="serviceDiscovery.collapsedPools",MCe={collapsedPools:Ea(SY,[]),showLimitAlert:!1},jY=w2({name:"serviceDiscoveryPage",initialState:MCe,reducers:{setCollapsedPools:(t,{payload:e})=>{t.collapsedPools=e},setShowLimitAlert:(t,{payload:e})=>{t.showLimitAlert=e}}}),{setCollapsedPools:O4,setShowLimitAlert:cO}=jY.actions,RCe=jY.reducer,Jd={width:Rs(18),height:Rs(18),verticalAlign:"middle"},DCe=(t,e)=>a.jsxs(se,{w:"60%",withTableBorder:!0,withColumnBorders:!0,bg:"light-dark(var(--mantine-color-gray-0), var(--mantine-color-gray-8))",children:[a.jsx(se.Thead,{children:a.jsx(se.Tr,{bg:"light-dark(var(--mantine-color-gray-1), var(--mantine-color-gray-7))",children:a.jsx(se.Th,{colSpan:2,children:a.jsxs(ut,{gap:"xs",children:[a.jsx(lH,{style:Jd})," Rule ",e+1]})})})}),a.jsx(se.Tbody,{children:Object.entries(t).sort(([n],[r])=>{const i=["action","source_labels","regex","modulus","replacement","target_label"],s=i.indexOf(n),o=i.indexOf(r);return s===-1&&o===-1?n.localeCompare(r):s===-1?1:o===-1?-1:s-o}).map(([n,r])=>a.jsxs(se.Tr,{children:[a.jsx(se.Th,{children:a.jsx("code",{children:n})}),a.jsx(se.Td,{children:a.jsx("code",{children:typeof r=="object"?JSON.stringify(r):String(r)})})]},n))})]}),F9=(t,e)=>t===null?a.jsx(dt,{c:"dimmed",children:"dropped"}):a.jsxs(se,{w:"50%",withTableBorder:!0,children:[a.jsx(se.Thead,{children:a.jsx(se.Tr,{bg:"light-dark(var(--mantine-color-gray-1), var(--mantine-color-gray-7))",children:a.jsx(se.Th,{colSpan:3,children:a.jsxs(ut,{gap:"xs",children:[a.jsx(use,{style:Jd})," Labels"]})})})}),a.jsx(se.Tbody,{children:Object.entries(t).concat(e?Object.entries(e).filter(([n])=>t[n]===void 0):[]).sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>{const i=e!==null&&e[n]===void 0,s=e!==null&&!i&&e[n]!==r,o=e!==null&&!s&&e[n]!==void 0&&t[n]===void 0;return a.jsxs(se.Tr,{bg:i?"light-dark(var(--mantine-color-green-1), var(--mantine-color-green-8))":s?"light-dark(var(--mantine-color-blue-1), var(--mantine-color-blue-8))":o?"light-dark(var(--mantine-color-red-1), var(--mantine-color-red-8))":void 0,children:[a.jsx(se.Td,{w:40,children:i?a.jsx(fie,{style:Jd}):s?a.jsx(lH,{style:Jd}):o?a.jsx(hie,{style:Jd}):null}),a.jsx(se.Th,{children:a.jsx("code",{children:n})}),a.jsx(se.Td,{children:a.jsx("code",{children:r})})]},n)})})]}),NCe=({labels:t,pool:e})=>{const{data:n}=wi({path:"/targets/relabel_steps",params:{labels:JSON.stringify(t),scrapePool:e}});return a.jsxs(xn,{align:"center",children:[F9(t,null),n.data.steps.map((r,i)=>a.jsxs(Ln.Fragment,{children:[a.jsx(Q8,{style:Jd}),DCe(r.rule,i),a.jsx(Q8,{style:Jd}),r.keep?F9(r.output,i===0?t:n.data.steps[i-1].output):a.jsx(dt,{c:"dimmed",children:"dropped"})]},i))]})},ICe=new Gb({shouldSort:!0,indexedKeys:["labels","discoveredLabels",["discoveredLabels",/.*/],["labels",/.*/]]}),BCe=new Gb({shouldSort:!0,indexedKeys:["discoveredLabels",["discoveredLabels",/.*/]]}),LCe=(t,e,n,r)=>{const{activeTargets:i,droppedTargets:s,droppedTargetCounts:o}=e,l={};for(const f of t)l[f]={targets:[],active:0,total:0,serverTotal:o[f]||0};for(const f of i){const p=l[f.scrapePool];if(!p)throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");p.active++,p.total++,p.serverTotal++}const u=r.length!==0&&!r.includes("active")?[]:n===""?i:ICe.filter(n,i).map(f=>f.original);for(const f of u)l[f.scrapePool].targets.push({discoveredLabels:f.discoveredLabels,labels:f.labels,isDropped:!1});for(const f of s){const p=l[f.scrapePool];if(!p)throw new Error("Received target information for an unknown scrape pool, likely the list of scrape pools has changed. Please reload the page.");p.total++}const h=r.length!==0&&!r.includes("dropped")?[]:n===""?s:BCe.filter(n,s).map(f=>f.original);for(const f of h)l[f.scrapePool].targets.push({discoveredLabels:f.discoveredLabels,isDropped:!0,labels:{}});return l},PCe=({poolNames:t,selectedPool:e,stateFilter:n,searchFilter:r})=>{const i=pu(),[s,o]=sb({key:"serviceDiscoveryPage.showEmptyPools",defaultValue:!1}),[l,u]=E.useState(null),{data:{data:h}}=wi({path:"/targets",params:{scrapePool:e===null?"":e}}),{collapsedPools:f,showLimitAlert:p}=ac(w=>w.serviceDiscoveryPage),[m]=ib(r,250),v=E.useMemo(()=>LCe(e?[e]:t,h,m,n),[e,t,h,m,n]),y=Object.keys(v),x=s?y:y.filter(w=>v[w].targets.length!==0);return a.jsxs(xn,{children:[y.length===0?a.jsx(Mt,{title:"No scrape pools found",icon:a.jsx(Kn,{}),children:"No scrape pools found."}):!s&&y.length!==x.length&&a.jsxs(Mt,{title:"Hiding pools with no matching targets",icon:a.jsx(Kn,{}),children:["Hiding ",y.length-x.length," empty pools due to filters or no targets.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>o(!0),children:"Show empty pools"})]}),p&&a.jsxs(Mt,{title:"Found many pools, showing only one",icon:a.jsx(Kn,{}),withCloseButton:!0,onClose:()=>i(cO(!1)),children:["There are more than ",CY," scrape pools. Showing only the first one. Use the dropdown to select a different pool."]}),a.jsx(Qr,{multiple:!0,variant:"separated",keepMounted:!1,value:y.filter(w=>!f.includes(w)),onChange:w=>i(O4(y.filter(A=>!w.includes(A)))),children:x.map(w=>{const A=v[w];return a.jsxs(Qr.Item,{value:w,children:[a.jsx(Qr.Control,{children:a.jsxs(ut,{wrap:"nowrap",justify:"space-between",mr:"lg",children:[a.jsx(dt,{children:w}),a.jsxs(ut,{gap:"xs",children:[a.jsxs(dt,{c:"gray.6",children:[A.active," / ",A.serverTotal]}),a.jsx(_b,{size:25,thickness:5,sections:A.serverTotal===0?[]:[{value:A.active/A.serverTotal*100,color:"green.4"},{value:(A.serverTotal-A.active)/A.serverTotal*100,color:"blue.6"}]})]})]})}),a.jsxs(Qr.Panel,{children:[A.total!==A.serverTotal&&a.jsxs(Mt,{title:"Only showing partial dropped targets",icon:a.jsx(Kn,{}),color:"yellow",mb:"sm",children:[A.serverTotal-A.total," further dropped targets are not shown here because the server only kept details on a maximum of ",A.total-A.active," dropped targets (",a.jsx("code",{children:"keep_dropped_targets"})," configuration setting)."]}),A.total===0?a.jsxs(Mt,{title:"No targets",icon:a.jsx(Kn,{}),children:["No targets in this scrape pool.",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>o(!1),children:"Hide empty pools"})]}):A.targets.length===0?a.jsxs(Mt,{title:"No matching targets",icon:a.jsx(Kn,{}),children:["No targets in this pool match your filter criteria (omitted"," ",A.total," filtered targets).",a.jsx(Ur,{ml:"md",fz:"1em",onClick:()=>o(!1),children:"Hide empty pools"})]}):a.jsx(qm,{allItems:A.targets,child:({items:S})=>a.jsxs(se,{children:[a.jsx(se.Thead,{children:a.jsxs(se.Tr,{children:[a.jsx(se.Th,{w:"50%",children:"Discovered labels"}),a.jsx(se.Th,{w:"50%",children:"Target labels"})]})}),a.jsx(se.Tbody,{children:S.map((C,j)=>a.jsxs(se.Tr,{children:[a.jsx(se.Td,{py:"lg",valign:"top",children:a.jsx(Vm,{labels:C.discoveredLabels,wrapper:xn})}),a.jsx(se.Td,{py:"lg",valign:C.isDropped?"middle":"top",children:a.jsxs(xn,{children:[C.isDropped?a.jsx(dt,{c:"dimmed",fw:"bold",children:"dropped"}):a.jsx(Vm,{labels:C.labels,wrapper:xn}),a.jsx(Ur,{inherit:!0,onClick:()=>{u({labels:C.discoveredLabels,pool:w})},children:"show relabeling"})]})})]},j))})]})})]})]},w)})}),a.jsx(Ua,{size:"95%",opened:l!==null,onClose:()=>u(null),title:"Relabeling steps for target",children:a.jsx(Ef,{title:"Error showing relabeling steps",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(20),(w,A)=>a.jsx(Qa,{height:30,mb:15,width:"100%"},A))}),children:a.jsx(NCe,{pool:(l==null?void 0:l.pool)||"",labels:(l==null?void 0:l.labels)||{}})})},location.pathname)})]})},CY=20;function FCe(){const{data:{data:{scrapePools:t}}}=wi({path:"/scrape_pools"}),e=pu(),[n,r]=vo("pool",Zh),[i,s]=vo("state",Jl(vS,[])),[o,l]=vo("search",Jl(Zh,"")),{collapsedPools:u,showLimitAlert:h}=ac(p=>p.serviceDiscoveryPage),f=t.length>CY&&n===void 0;return f&&(r(t[0]),e(cO(!0))),a.jsxs(a.Fragment,{children:[a.jsxs(ut,{mb:"md",mt:"xs",children:[a.jsx(o0,{placeholder:"Select scrape pool",data:[{label:"All pools",value:""},...t],value:f&&t[0]||n||null,onChange:p=>{r(p),h&&e(cO(!1))},searchable:!0}),a.jsx(gS,{options:["active","dropped"],optionClass:p=>p==="active"?hn.healthOk:hn.healthInfo,placeholder:"Filter by state",values:(i==null?void 0:i.filter(p=>p!==null))||[],onChange:p=>s(p)}),a.jsx(ic,{flex:1,leftSection:a.jsx(id,{style:Hf}),placeholder:"Filter by labels",value:o||"",onChange:p=>l(p.currentTarget.value)}),a.jsx(Er,{size:"input-sm",title:u.length>0?"Expand all pools":"Collapse all pools",variant:"light",onClick:()=>e(O4(u.length>0?[]:t)),children:u.length>0?a.jsx(sH,{style:lw}):a.jsx(iH,{style:lw})})]}),a.jsx(Ef,{title:"Error showing target pools",children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(10),(p,m)=>a.jsx(Qa,{height:40,mb:15,width:1e3,mx:"auto"},m))}),children:a.jsx(PCe,{poolNames:t,selectedPool:f&&t[0]||n||null,stateFilter:i,searchFilter:o})})},location.pathname)]})}function zCe(){const{data:{data:{activeAlertmanagers:t,droppedAlertmanagers:e}}}=wi({path:"/alertmanagers"});return a.jsxs(Xb,{children:[a.jsx(ru,{title:"Active Alertmanagers",icon:RE,children:t.length===0?a.jsx(Mt,{title:"No active alertmanagers",icon:a.jsx(Kn,{}),children:"No active alertmanagers found."}):a.jsx(se,{layout:"fixed",children:a.jsx(se.Tbody,{children:t.map(n=>a.jsx(se.Tr,{children:a.jsx(se.Td,{children:a.jsx(aO,{endpoint:n.url,globalUrl:n.url})})},n.url))})})}),a.jsx(ru,{title:"Dropped Alertmanagers",icon:Xre,children:e.length===0?a.jsx(Mt,{title:"No dropped alertmanagers",icon:a.jsx(Kn,{}),children:"No dropped alertmanagers found."}):a.jsx(se,{layout:"fixed",children:a.jsx(se.Tbody,{children:e.map(n=>a.jsx(se.Tr,{children:a.jsx(se.Td,{children:a.jsx(aO,{endpoint:n.url,globalUrl:n.url})})},n.url))})})})]})}var F3,z9;function HCe(){if(z9)return F3;z9=1;function t(ne){return ne instanceof Map?ne.clear=ne.delete=ne.set=function(){throw new Error("map is read-only")}:ne instanceof Set&&(ne.add=ne.clear=ne.delete=function(){throw new Error("set is read-only")}),Object.freeze(ne),Object.getOwnPropertyNames(ne).forEach(_e=>{const ye=ne[_e],He=typeof ye;(He==="object"||He==="function")&&!Object.isFrozen(ye)&&t(ye)}),ne}class e{constructor(_e){_e.data===void 0&&(_e.data={}),this.data=_e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(ne){return ne.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(ne,..._e){const ye=Object.create(null);for(const He in ne)ye[He]=ne[He];return _e.forEach(function(He){for(const Ht in He)ye[Ht]=He[Ht]}),ye}const i="</span>",s=ne=>!!ne.scope,o=(ne,{prefix:_e})=>{if(ne.startsWith("language:"))return ne.replace("language:","language-");if(ne.includes(".")){const ye=ne.split(".");return[`${_e}${ye.shift()}`,...ye.map((He,Ht)=>`${He}${"_".repeat(Ht+1)}`)].join(" ")}return`${_e}${ne}`};class l{constructor(_e,ye){this.buffer="",this.classPrefix=ye.classPrefix,_e.walk(this)}addText(_e){this.buffer+=n(_e)}openNode(_e){if(!s(_e))return;const ye=o(_e.scope,{prefix:this.classPrefix});this.span(ye)}closeNode(_e){s(_e)&&(this.buffer+=i)}value(){return this.buffer}span(_e){this.buffer+=`<span class="${_e}">`}}const u=(ne={})=>{const _e={children:[]};return Object.assign(_e,ne),_e};class h{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(_e){this.top.children.push(_e)}openNode(_e){const ye=u({scope:_e});this.add(ye),this.stack.push(ye)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(_e){return this.constructor._walk(_e,this.rootNode)}static _walk(_e,ye){return typeof ye=="string"?_e.addText(ye):ye.children&&(_e.openNode(ye),ye.children.forEach(He=>this._walk(_e,He)),_e.closeNode(ye)),_e}static _collapse(_e){typeof _e!="string"&&_e.children&&(_e.children.every(ye=>typeof ye=="string")?_e.children=[_e.children.join("")]:_e.children.forEach(ye=>{h._collapse(ye)}))}}class f extends h{constructor(_e){super(),this.options=_e}addText(_e){_e!==""&&this.add(_e)}startScope(_e){this.openNode(_e)}endScope(){this.closeNode()}__addSublanguage(_e,ye){const He=_e.root;ye&&(He.scope=`language:${ye}`),this.add(He)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(ne){return ne?typeof ne=="string"?ne:ne.source:null}function m(ne){return x("(?=",ne,")")}function v(ne){return x("(?:",ne,")*")}function y(ne){return x("(?:",ne,")?")}function x(...ne){return ne.map(ye=>p(ye)).join("")}function w(ne){const _e=ne[ne.length-1];return typeof _e=="object"&&_e.constructor===Object?(ne.splice(ne.length-1,1),_e):{}}function A(...ne){return"("+(w(ne).capture?"":"?:")+ne.map(He=>p(He)).join("|")+")"}function S(ne){return new RegExp(ne.toString()+"|").exec("").length-1}function C(ne,_e){const ye=ne&&ne.exec(_e);return ye&&ye.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _(ne,{joinWith:_e}){let ye=0;return ne.map(He=>{ye+=1;const Ht=ye;let qt=p(He),et="";for(;qt.length>0;){const Re=j.exec(qt);if(!Re){et+=qt;break}et+=qt.substring(0,Re.index),qt=qt.substring(Re.index+Re[0].length),Re[0][0]==="\\"&&Re[1]?et+="\\"+String(Number(Re[1])+Ht):(et+=Re[0],Re[0]==="("&&ye++)}return et}).map(He=>`(${He})`).join(_e)}const O=/\b\B/,M="[a-zA-Z]\\w*",R="[a-zA-Z_]\\w*",N="\\b\\d+(\\.\\d+)?",B="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",D="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",U=(ne={})=>{const _e=/^#![ ]*\//;return ne.binary&&(ne.begin=x(_e,/.*\b/,ne.binary,/\b.*/)),r({scope:"meta",begin:_e,end:/$/,relevance:0,"on:begin":(ye,He)=>{ye.index!==0&&He.ignoreMatch()}},ne)},H={begin:"\\\\[\\s\\S]",relevance:0},z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[H]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[H]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},$=function(ne,_e,ye={}){const He=r({scope:"comment",begin:ne,end:_e,contains:[]},ye);He.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ht=A("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return He.contains.push({begin:x(/[ ]+/,"(",Ht,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),He},G=$("//","$"),Y=$("/\\*","\\*/"),W=$("#","$"),V={scope:"number",begin:N,relevance:0},X={scope:"number",begin:B,relevance:0},ee={scope:"number",begin:D,relevance:0},le={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[H,{begin:/\[/,end:/\]/,relevance:0,contains:[H]}]},ve={scope:"title",begin:M,relevance:0},me={scope:"title",begin:R,relevance:0},Qe={begin:"\\.\\s*"+R,relevance:0};var qe=Object.freeze({__proto__:null,APOS_STRING_MODE:z,BACKSLASH_ESCAPE:H,BINARY_NUMBER_MODE:ee,BINARY_NUMBER_RE:D,COMMENT:$,C_BLOCK_COMMENT_MODE:Y,C_LINE_COMMENT_MODE:G,C_NUMBER_MODE:X,C_NUMBER_RE:B,END_SAME_AS_BEGIN:function(ne){return Object.assign(ne,{"on:begin":(_e,ye)=>{ye.data._beginMatch=_e[1]},"on:end":(_e,ye)=>{ye.data._beginMatch!==_e[1]&&ye.ignoreMatch()}})},HASH_COMMENT_MODE:W,IDENT_RE:M,MATCH_NOTHING_RE:O,METHOD_GUARD:Qe,NUMBER_MODE:V,NUMBER_RE:N,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:I,REGEXP_MODE:le,RE_STARTERS_RE:L,SHEBANG:U,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:R,UNDERSCORE_TITLE_MODE:me});function ae(ne,_e){ne.input[ne.index-1]==="."&&_e.ignoreMatch()}function de(ne,_e){ne.className!==void 0&&(ne.scope=ne.className,delete ne.className)}function Ae(ne,_e){_e&&ne.beginKeywords&&(ne.begin="\\b("+ne.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",ne.__beforeBegin=ae,ne.keywords=ne.keywords||ne.beginKeywords,delete ne.beginKeywords,ne.relevance===void 0&&(ne.relevance=0))}function Te(ne,_e){Array.isArray(ne.illegal)&&(ne.illegal=A(...ne.illegal))}function Ge(ne,_e){if(ne.match){if(ne.begin||ne.end)throw new Error("begin & end are not supported with match");ne.begin=ne.match,delete ne.match}}function rt(ne,_e){ne.relevance===void 0&&(ne.relevance=1)}const Ue=(ne,_e)=>{if(!ne.beforeMatch)return;if(ne.starts)throw new Error("beforeMatch cannot be used with starts");const ye=Object.assign({},ne);Object.keys(ne).forEach(He=>{delete ne[He]}),ne.keywords=ye.keywords,ne.begin=x(ye.beforeMatch,m(ye.begin)),ne.starts={relevance:0,contains:[Object.assign(ye,{endsParent:!0})]},ne.relevance=0,delete ye.beforeMatch},Be=["of","and","for","in","not","or","if","then","parent","list","value"],Ee="keyword";function Ke(ne,_e,ye=Ee){const He=Object.create(null);return typeof ne=="string"?Ht(ye,ne.split(" ")):Array.isArray(ne)?Ht(ye,ne):Object.keys(ne).forEach(function(qt){Object.assign(He,Ke(ne[qt],_e,qt))}),He;function Ht(qt,et){_e&&(et=et.map(Re=>Re.toLowerCase())),et.forEach(function(Re){const tt=Re.split("|");He[tt[0]]=[qt,Dt(tt[0],tt[1])]})}}function Dt(ne,_e){return _e?Number(_e):Je(ne)?0:1}function Je(ne){return Be.includes(ne.toLowerCase())}const it={},Xe=ne=>{console.error(ne)},Oe=(ne,..._e)=>{console.log(`WARN: ${ne}`,..._e)},$e=(ne,_e)=>{it[`${ne}/${_e}`]||(console.log(`Deprecated as of ${ne}. ${_e}`),it[`${ne}/${_e}`]=!0)},lt=new Error;function Rn(ne,_e,{key:ye}){let He=0;const Ht=ne[ye],qt={},et={};for(let Re=1;Re<=_e.length;Re++)et[Re+He]=Ht[Re],qt[Re+He]=!0,He+=S(_e[Re-1]);ne[ye]=et,ne[ye]._emit=qt,ne[ye]._multi=!0}function vr(ne){if(Array.isArray(ne.begin)){if(ne.skip||ne.excludeBegin||ne.returnBegin)throw Xe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),lt;if(typeof ne.beginScope!="object"||ne.beginScope===null)throw Xe("beginScope must be object"),lt;Rn(ne,ne.begin,{key:"beginScope"}),ne.begin=_(ne.begin,{joinWith:""})}}function rn(ne){if(Array.isArray(ne.end)){if(ne.skip||ne.excludeEnd||ne.returnEnd)throw Xe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),lt;if(typeof ne.endScope!="object"||ne.endScope===null)throw Xe("endScope must be object"),lt;Rn(ne,ne.end,{key:"endScope"}),ne.end=_(ne.end,{joinWith:""})}}function An(ne){ne.scope&&typeof ne.scope=="object"&&ne.scope!==null&&(ne.beginScope=ne.scope,delete ne.scope)}function ht(ne){An(ne),typeof ne.beginScope=="string"&&(ne.beginScope={_wrap:ne.beginScope}),typeof ne.endScope=="string"&&(ne.endScope={_wrap:ne.endScope}),vr(ne),rn(ne)}function fn(ne){function _e(et,Re){return new RegExp(p(et),"m"+(ne.case_insensitive?"i":"")+(ne.unicodeRegex?"u":"")+(Re?"g":""))}class ye{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Re,tt){tt.position=this.position++,this.matchIndexes[this.matchAt]=tt,this.regexes.push([tt,Re]),this.matchAt+=S(Re)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Re=this.regexes.map(tt=>tt[1]);this.matcherRe=_e(_(Re,{joinWith:"|"}),!0),this.lastIndex=0}exec(Re){this.matcherRe.lastIndex=this.lastIndex;const tt=this.matcherRe.exec(Re);if(!tt)return null;const jt=tt.findIndex((nn,Vr)=>Vr>0&&nn!==void 0),Ct=this.matchIndexes[jt];return tt.splice(0,jt),Object.assign(tt,Ct)}}class He{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Re){if(this.multiRegexes[Re])return this.multiRegexes[Re];const tt=new ye;return this.rules.slice(Re).forEach(([jt,Ct])=>tt.addRule(jt,Ct)),tt.compile(),this.multiRegexes[Re]=tt,tt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Re,tt){this.rules.push([Re,tt]),tt.type==="begin"&&this.count++}exec(Re){const tt=this.getMatcher(this.regexIndex);tt.lastIndex=this.lastIndex;let jt=tt.exec(Re);if(this.resumingScanAtSamePosition()&&!(jt&&jt.index===this.lastIndex)){const Ct=this.getMatcher(0);Ct.lastIndex=this.lastIndex+1,jt=Ct.exec(Re)}return jt&&(this.regexIndex+=jt.position+1,this.regexIndex===this.count&&this.considerAll()),jt}}function Ht(et){const Re=new He;return et.contains.forEach(tt=>Re.addRule(tt.begin,{rule:tt,type:"begin"})),et.terminatorEnd&&Re.addRule(et.terminatorEnd,{type:"end"}),et.illegal&&Re.addRule(et.illegal,{type:"illegal"}),Re}function qt(et,Re){const tt=et;if(et.isCompiled)return tt;[de,Ge,ht,Ue].forEach(Ct=>Ct(et,Re)),ne.compilerExtensions.forEach(Ct=>Ct(et,Re)),et.__beforeBegin=null,[Ae,Te,rt].forEach(Ct=>Ct(et,Re)),et.isCompiled=!0;let jt=null;return typeof et.keywords=="object"&&et.keywords.$pattern&&(et.keywords=Object.assign({},et.keywords),jt=et.keywords.$pattern,delete et.keywords.$pattern),jt=jt||/\w+/,et.keywords&&(et.keywords=Ke(et.keywords,ne.case_insensitive)),tt.keywordPatternRe=_e(jt,!0),Re&&(et.begin||(et.begin=/\B|\b/),tt.beginRe=_e(tt.begin),!et.end&&!et.endsWithParent&&(et.end=/\B|\b/),et.end&&(tt.endRe=_e(tt.end)),tt.terminatorEnd=p(tt.end)||"",et.endsWithParent&&Re.terminatorEnd&&(tt.terminatorEnd+=(et.end?"|":"")+Re.terminatorEnd)),et.illegal&&(tt.illegalRe=_e(et.illegal)),et.contains||(et.contains=[]),et.contains=[].concat(...et.contains.map(function(Ct){return Nt(Ct==="self"?et:Ct)})),et.contains.forEach(function(Ct){qt(Ct,tt)}),et.starts&&qt(et.starts,Re),tt.matcher=Ht(tt),tt}if(ne.compilerExtensions||(ne.compilerExtensions=[]),ne.contains&&ne.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return ne.classNameAliases=r(ne.classNameAliases||{}),qt(ne)}function zt(ne){return ne?ne.endsWithParent||zt(ne.starts):!1}function Nt(ne){return ne.variants&&!ne.cachedVariants&&(ne.cachedVariants=ne.variants.map(function(_e){return r(ne,{variants:null},_e)})),ne.cachedVariants?ne.cachedVariants:zt(ne)?r(ne,{starts:ne.starts?r(ne.starts):null}):Object.isFrozen(ne)?r(ne):ne}var tn="11.11.1";class cr extends Error{constructor(_e,ye){super(_e),this.name="HTMLInjectionError",this.html=ye}}const ln=n,Jn=r,Fr=Symbol("nomatch"),It=7,Cn=function(ne){const _e=Object.create(null),ye=Object.create(null),He=[];let Ht=!0;const qt="Could not find the language '{}', did you forget to load/include a language module?",et={disableAutodetect:!0,name:"Plain text",contains:[]};let Re={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function tt(Ze){return Re.noHighlightRe.test(Ze)}function jt(Ze){let kt=Ze.className+" ";kt+=Ze.parentNode?Ze.parentNode.className:"";const Kt=Re.languageDetectRe.exec(kt);if(Kt){const _n=wn(Kt[1]);return _n||(Oe(qt.replace("{}",Kt[1])),Oe("Falling back to no-highlight mode for this block.",Ze)),_n?Kt[1]:"no-highlight"}return kt.split(/\s+/).find(_n=>tt(_n)||wn(_n))}function Ct(Ze,kt,Kt){let _n="",xr="";typeof kt=="object"?(_n=Ze,Kt=kt.ignoreIllegals,xr=kt.language):($e("10.7.0","highlight(lang, code, ...args) has been deprecated."),$e("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),xr=Ze,_n=kt),Kt===void 0&&(Kt=!0);const fi={code:_n,language:xr};Va("before:highlight",fi);const Ji=fi.result?fi.result:nn(fi.language,fi.code,Kt);return Ji.code=fi.code,Va("after:highlight",Ji),Ji}function nn(Ze,kt,Kt,_n){const xr=Object.create(null);function fi(st,St){return st.keywords[St]}function Ji(){if(!Bt.keywords){Gr.addText(Dn);return}let st=0;Bt.keywordPatternRe.lastIndex=0;let St=Bt.keywordPatternRe.exec(Dn),Ft="";for(;St;){Ft+=Dn.substring(st,St.index);const an=ii.case_insensitive?St[0].toLowerCase():St[0],ur=fi(Bt,an);if(ur){const[As,gc]=ur;if(Gr.addText(Ft),Ft="",xr[an]=(xr[an]||0)+1,xr[an]<=It&&(yl+=gc),As.startsWith("_"))Ft+=St[0];else{const Su=ii.classNameAliases[As]||As;ys(St[0],Su)}}else Ft+=St[0];st=Bt.keywordPatternRe.lastIndex,St=Bt.keywordPatternRe.exec(Dn)}Ft+=Dn.substring(st),Gr.addText(Ft)}function Qn(){if(Dn==="")return;let st=null;if(typeof Bt.subLanguage=="string"){if(!_e[Bt.subLanguage]){Gr.addText(Dn);return}st=nn(Bt.subLanguage,Dn,!0,wu[Bt.subLanguage]),wu[Bt.subLanguage]=st._top}else st=Yr(Dn,Bt.subLanguage.length?Bt.subLanguage:null);Bt.relevance>0&&(yl+=st.relevance),Gr.__addSublanguage(st._emitter,st.language)}function Un(){Bt.subLanguage!=null?Qn():Ji(),Dn=""}function ys(st,St){st!==""&&(Gr.startScope(St),Gr.addText(st),Gr.endScope())}function yu(st,St){let Ft=1;const an=St.length-1;for(;Ft<=an;){if(!st._emit[Ft]){Ft++;continue}const ur=ii.classNameAliases[st[Ft]]||st[Ft],As=St[Ft];ur?ys(As,ur):(Dn=As,Ji(),Dn=""),Ft++}}function dc(st,St){return st.scope&&typeof st.scope=="string"&&Gr.openNode(ii.classNameAliases[st.scope]||st.scope),st.beginScope&&(st.beginScope._wrap?(ys(Dn,ii.classNameAliases[st.beginScope._wrap]||st.beginScope._wrap),Dn=""):st.beginScope._multi&&(yu(st.beginScope,St),Dn="")),Bt=Object.create(st,{parent:{value:Bt}}),Bt}function cd(st,St,Ft){let an=C(st.endRe,Ft);if(an){if(st["on:end"]){const ur=new e(st);st["on:end"](St,ur),ur.isMatchIgnored&&(an=!1)}if(an){for(;st.endsParent&&st.parent;)st=st.parent;return st}}if(st.endsWithParent)return cd(st.parent,St,Ft)}function xu(st){return Bt.matcher.regexIndex===0?(Dn+=st[0],1):(Ya=!0,0)}function y0(st){const St=st[0],Ft=st.rule,an=new e(Ft),ur=[Ft.__beforeBegin,Ft["on:begin"]];for(const As of ur)if(As&&(As(st,an),an.isMatchIgnored))return xu(St);return Ft.skip?Dn+=St:(Ft.excludeBegin&&(Dn+=St),Un(),!Ft.returnBegin&&!Ft.excludeBegin&&(Dn=St)),dc(Ft,st),Ft.returnBegin?0:St.length}function es(st){const St=st[0],Ft=kt.substring(st.index),an=cd(Bt,st,Ft);if(!an)return Fr;const ur=Bt;Bt.endScope&&Bt.endScope._wrap?(Un(),ys(St,Bt.endScope._wrap)):Bt.endScope&&Bt.endScope._multi?(Un(),yu(Bt.endScope,st)):ur.skip?Dn+=St:(ur.returnEnd||ur.excludeEnd||(Dn+=St),Un(),ur.excludeEnd&&(Dn=St));do Bt.scope&&Gr.closeNode(),!Bt.skip&&!Bt.subLanguage&&(yl+=Bt.relevance),Bt=Bt.parent;while(Bt!==an.parent);return an.starts&&dc(an.starts,st),ur.returnEnd?0:St.length}function Au(){const st=[];for(let St=Bt;St!==ii;St=St.parent)St.scope&&st.unshift(St.scope);st.forEach(St=>Gr.openNode(St))}let fc={};function pc(st,St){const Ft=St&&St[0];if(Dn+=st,Ft==null)return Un(),0;if(fc.type==="begin"&&St.type==="end"&&fc.index===St.index&&Ft===""){if(Dn+=kt.slice(St.index,St.index+1),!Ht){const an=new Error(`0 width match regex (${Ze})`);throw an.languageName=Ze,an.badRule=fc.rule,an}return 1}if(fc=St,St.type==="begin")return y0(St);if(St.type==="illegal"&&!Kt){const an=new Error('Illegal lexeme "'+Ft+'" for mode "'+(Bt.scope||"<unnamed>")+'"');throw an.mode=Bt,an}else if(St.type==="end"){const an=es(St);if(an!==Fr)return an}if(St.type==="illegal"&&Ft==="")return Dn+=`
`,1;if(xl>1e5&&xl>St.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Dn+=Ft,Ft.length}const ii=wn(Ze);if(!ii)throw Xe(qt.replace("{}",Ze)),new Error('Unknown language: "'+Ze+'"');const mc=fn(ii);let Oo="",Bt=_n||mc;const wu={},Gr=new Re.__emitter(Re);Au();let Dn="",yl=0,xs=0,xl=0,Ya=!1;try{if(ii.__emitTokens)ii.__emitTokens(kt,Gr);else{for(Bt.matcher.considerAll();;){xl++,Ya?Ya=!1:Bt.matcher.considerAll(),Bt.matcher.lastIndex=xs;const st=Bt.matcher.exec(kt);if(!st)break;const St=kt.substring(xs,st.index),Ft=pc(St,st);xs=st.index+Ft}pc(kt.substring(xs))}return Gr.finalize(),Oo=Gr.toHTML(),{language:Ze,value:Oo,relevance:yl,illegal:!1,_emitter:Gr,_top:Bt}}catch(st){if(st.message&&st.message.includes("Illegal"))return{language:Ze,value:ln(kt),illegal:!0,relevance:0,_illegalBy:{message:st.message,index:xs,context:kt.slice(xs-100,xs+100),mode:st.mode,resultSoFar:Oo},_emitter:Gr};if(Ht)return{language:Ze,value:ln(kt),illegal:!1,relevance:0,errorRaised:st,_emitter:Gr,_top:Bt};throw st}}function Vr(Ze){const kt={value:ln(Ze),illegal:!1,relevance:0,_top:et,_emitter:new Re.__emitter(Re)};return kt._emitter.addText(Ze),kt}function Yr(Ze,kt){kt=kt||Re.languages||Object.keys(_e);const Kt=Vr(Ze),_n=kt.filter(wn).filter(di).map(Un=>nn(Un,Ze,!1));_n.unshift(Kt);const xr=_n.sort((Un,ys)=>{if(Un.relevance!==ys.relevance)return ys.relevance-Un.relevance;if(Un.language&&ys.language){if(wn(Un.language).supersetOf===ys.language)return 1;if(wn(ys.language).supersetOf===Un.language)return-1}return 0}),[fi,Ji]=xr,Qn=fi;return Qn.secondBest=Ji,Qn}function Si(Ze,kt,Kt){const _n=kt&&ye[kt]||Kt;Ze.classList.add("hljs"),Ze.classList.add(`language-${_n}`)}function br(Ze){let kt=null;const Kt=jt(Ze);if(tt(Kt))return;if(Va("before:highlightElement",{el:Ze,language:Kt}),Ze.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ze);return}if(Ze.children.length>0&&(Re.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ze)),Re.throwUnescapedHTML))throw new cr("One of your code blocks includes unescaped HTML.",Ze.innerHTML);kt=Ze;const _n=kt.textContent,xr=Kt?Ct(_n,{language:Kt,ignoreIllegals:!0}):Yr(_n);Ze.innerHTML=xr.value,Ze.dataset.highlighted="yes",Si(Ze,Kt,xr.language),Ze.result={language:xr.language,re:xr.relevance,relevance:xr.relevance},xr.secondBest&&(Ze.secondBest={language:xr.secondBest.language,relevance:xr.secondBest.relevance}),Va("after:highlightElement",{el:Ze,result:xr,text:_n})}function Bi(Ze){Re=Jn(Re,Ze)}const vs=()=>{hc(),$e("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function ld(){hc(),$e("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let bl=!1;function hc(){function Ze(){hc()}if(document.readyState==="loading"){bl||window.addEventListener("DOMContentLoaded",Ze,!1),bl=!0;return}document.querySelectorAll(Re.cssSelector).forEach(br)}function ya(Ze,kt){let Kt=null;try{Kt=kt(ne)}catch(_n){if(Xe("Language definition for '{}' could not be registered.".replace("{}",Ze)),Ht)Xe(_n);else throw _n;Kt=et}Kt.name||(Kt.name=Ze),_e[Ze]=Kt,Kt.rawDefinition=kt.bind(null,ne),Kt.aliases&&Gs(Kt.aliases,{languageName:Ze})}function yr(Ze){delete _e[Ze];for(const kt of Object.keys(ye))ye[kt]===Ze&&delete ye[kt]}function Mr(){return Object.keys(_e)}function wn(Ze){return Ze=(Ze||"").toLowerCase(),_e[Ze]||_e[ye[Ze]]}function Gs(Ze,{languageName:kt}){typeof Ze=="string"&&(Ze=[Ze]),Ze.forEach(Kt=>{ye[Kt.toLowerCase()]=kt})}function di(Ze){const kt=wn(Ze);return kt&&!kt.disableAutodetect}function Xs(Ze){Ze["before:highlightBlock"]&&!Ze["before:highlightElement"]&&(Ze["before:highlightElement"]=kt=>{Ze["before:highlightBlock"](Object.assign({block:kt.el},kt))}),Ze["after:highlightBlock"]&&!Ze["after:highlightElement"]&&(Ze["after:highlightElement"]=kt=>{Ze["after:highlightBlock"](Object.assign({block:kt.el},kt))})}function zr(Ze){Xs(Ze),He.push(Ze)}function bu(Ze){const kt=He.indexOf(Ze);kt!==-1&&He.splice(kt,1)}function Va(Ze,kt){const Kt=Ze;He.forEach(function(_n){_n[Kt]&&_n[Kt](kt)})}function bs(Ze){return $e("10.7.0","highlightBlock will be removed entirely in v12.0"),$e("10.7.0","Please use highlightElement now."),br(Ze)}Object.assign(ne,{highlight:Ct,highlightAuto:Yr,highlightAll:hc,highlightElement:br,highlightBlock:bs,configure:Bi,initHighlighting:vs,initHighlightingOnLoad:ld,registerLanguage:ya,unregisterLanguage:yr,listLanguages:Mr,getLanguage:wn,registerAliases:Gs,autoDetection:di,inherit:Jn,addPlugin:zr,removePlugin:bu}),ne.debugMode=function(){Ht=!1},ne.safeMode=function(){Ht=!0},ne.versionString=tn,ne.regex={concat:x,lookahead:m,either:A,optional:y,anyNumberOfTimes:v};for(const Ze in qe)typeof qe[Ze]=="object"&&t(qe[Ze]);return Object.assign(ne,qe),ne},vt=Cn({});return vt.newInstance=()=>Cn({}),F3=vt,vt.HighlightJS=vt,vt.default=vt,F3}var qCe=HCe();const _Y=pl(qCe);function $Ce(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},l=t.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},y={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},m,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},y,x,s,o],A=[...w];return A.pop(),A.push(l),v.contains=A,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}_Y.registerLanguage("yaml",$Ce);const QCe=uCe(_Y),UCe=new Doe,WCe=[{title:"Query",path:"/query",icon:a.jsx(id,{style:$s}),element:a.jsx(tY,{}),inAgentMode:!1},{title:"Alerts",path:"/alerts",icon:a.jsx(Sse,{style:$s}),element:a.jsx(hY,{}),inAgentMode:!1}],TY=[{title:"Target health",path:"/targets",icon:a.jsx(rH,{style:$s}),element:a.jsx(Zje,{}),inAgentMode:!0},{title:"Rule health",path:"/rules",icon:a.jsx(cH,{style:$s}),element:a.jsx(Hje,{}),inAgentMode:!1},{title:"Service discovery",path:"/service-discovery",icon:a.jsx(yie,{style:$s}),element:a.jsx(FCe,{}),inAgentMode:!0}],kY=[{title:"Runtime & build information",path:"/status",icon:a.jsx(Kn,{style:$s}),element:a.jsx(Jje,{}),inAgentMode:!0},{title:"TSDB status",path:"/tsdb-status",icon:a.jsx(Sie,{style:$s}),element:a.jsx(eCe,{}),inAgentMode:!1},{title:"Command-line flags",path:"/flags",icon:a.jsx(Oie,{style:$s}),element:a.jsx(iCe,{}),inAgentMode:!0},{title:"Configuration",path:"/config",icon:a.jsx(tse,{style:$s}),element:a.jsx(hCe,{}),inAgentMode:!0},{title:"Alertmanager discovery",path:"/alertmanager-discovery",icon:a.jsx(RE,{style:$s}),element:a.jsx(zCe,{}),inAgentMode:!1}],H9=[...TY,...kY],VCe={defaultRadius:"sm",colors:{"codebox-bg":["#f5f5f5","#e7e7e7","#cdcdcd","#b2b2b2","#9a9a9a","#8b8b8b","#848484","#717171","#656565","#575757"]}},dx="md";function YCe(){const[t,{toggle:e}]=ob(),{agentMode:n,consolesLink:r,pathPrefix:i}=hi(),s=a.jsxs(a.Fragment,{children:[r&&a.jsx(Oi,{component:"a",href:r,className:d1.link,leftSection:a.jsx(Cie,{style:$s}),px:dx,children:"Consoles"}),WCe.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(Oi,{component:Mg,to:l.path,className:d1.link,leftSection:l.icon,px:dx,children:l.title},l.path)),a.jsxs(mr,{shadow:"md",width:240,children:[a.jsxs(K8,{children:[H9.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(eh,{path:l.path,element:a.jsx(mr.Target,{children:a.jsxs(Oi,{component:Mg,to:l.path,className:d1.link,leftSection:l.icon,rightSection:a.jsx(gv,{style:$s}),px:dx,onClick:u=>u.preventDefault(),children:["Status ",a.jsx(tH,{style:$s})," ",l.title]})})},l.path)),a.jsx(eh,{path:"*",element:a.jsx(mr.Target,{children:a.jsx(Oi,{className:d1.link,leftSection:a.jsx(rse,{style:$s}),rightSection:a.jsx(gv,{style:$s}),px:dx,children:"Status"})})})]}),a.jsxs(mr.Dropdown,{children:[a.jsx(mr.Label,{children:"Monitoring status"}),TY.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(mr.Item,{component:Mg,to:l.path,leftSection:l.icon,children:l.title},l.path)),a.jsx(mr.Divider,{}),a.jsx(mr.Label,{children:"Server status"}),kY.filter(l=>!n||l.inAgentMode).map(l=>a.jsx(mr.Item,{component:Mg,to:l.path,leftSection:l.icon,children:l.title},l.path))]})]})]}),o=a.jsxs(a.Fragment,{children:[a.jsx(fCe,{}),a.jsx(OCe,{}),a.jsx(pCe,{}),a.jsx(Er,{component:"a",href:"https://prometheus.io/docs/prometheus/latest/getting_started/",target:"_blank",color:"gray",title:"Documentation","aria-label":"Documentation",size:fe(32),children:a.jsx(tie,{style:uu})})]});return a.jsx(eoe,{basename:i,children:a.jsx(cje,{adapter:ECe,children:a.jsx(AP,{defaultColorScheme:"auto",theme:VCe,children:a.jsxs(sCe,{adapter:QCe,children:[a.jsx(uc,{position:"top-right"}),a.jsx(Ioe,{client:UCe,children:a.jsxs(Fa,{header:{height:56},navbar:{width:300,breakpoint:"sm",collapsed:{desktop:!0,mobile:!t}},padding:"md",children:[a.jsxs(kCe,{children:[a.jsx(Fa.Header,{bg:"rgb(65, 73, 81)",c:"#fff",children:a.jsxs(ut,{h:"100%",px:"md",wrap:"nowrap",children:[a.jsxs(ut,{style:{flex:1},justify:"space-between",wrap:"nowrap",children:[a.jsxs(ut,{gap:40,wrap:"nowrap",children:[a.jsx(QE,{to:"/",style:{textDecoration:"none",color:"white"},children:a.jsxs(ut,{gap:10,wrap:"nowrap",children:[a.jsx("img",{src:lX,height:30}),a.jsx(dt,{hiddenFrom:"sm",fz:20,children:"Prometheus"}),a.jsx(dt,{visibleFrom:"md",fz:20,children:"Prometheus"}),a.jsx(dt,{fz:20,children:n&&"Agent"})]})}),a.jsx(ut,{gap:12,visibleFrom:"sm",wrap:"nowrap",children:s})]}),a.jsx(ut,{visibleFrom:"xs",wrap:"nowrap",gap:"xs",children:o})]}),a.jsx(zw,{opened:t,onClick:e,hiddenFrom:"sm",size:"sm",color:"gray.2"})]})}),a.jsxs(Fa.Navbar,{py:"md",px:4,bg:"rgb(65, 73, 81)",c:"#fff",children:[s,a.jsx(ut,{mt:"md",hiddenFrom:"xs",justify:"center",children:o})]})]}),a.jsx(Fa.Main,{children:a.jsx(Ef,{children:a.jsx(E.Suspense,{fallback:a.jsx(be,{mt:"lg",children:Array.from(Array(10),(l,u)=>a.jsx(Qa,{height:40,mb:15,width:1e3,mx:"auto"},u))}),children:a.jsxs(K8,{children:[a.jsx(eh,{path:"/",element:a.jsx(Oae,{to:n?"/agent":"/query",replace:!0})}),n?a.jsx(eh,{path:"/agent",element:a.jsx(hx,{children:a.jsx(dCe,{})})}):a.jsxs(a.Fragment,{children:[a.jsx(eh,{path:"/query",element:a.jsx(hx,{children:a.jsx(tY,{})})}),a.jsx(eh,{path:"/alerts",element:a.jsx(hx,{children:a.jsx(hY,{})})})]}),H9.map(l=>a.jsx(eh,{path:l.path,element:a.jsx(hx,{children:l.element})},l.path))]})})},location.pathname)})]})})]})})})})}const yS=(t,e)=>{localStorage.setItem(t,JSON.stringify(e))},OY=fce(),xS=OY.startListening.withTypes();xS({actionCreator:k4,effect:({payload:t})=>{yS(dY,t)}});xS({actionCreator:O4,effect:({payload:t})=>{yS(SY,t)}});xS({actionCreator:xq,effect:(t,{getState:e})=>{yS(bq,e().queryPage.queryHistory)}});xS({actionCreator:oo,effect:({payload:t})=>{Object.entries(t).forEach(([e,n])=>{switch(e){case"useLocalTime":case"enableQueryHistory":case"enableAutocomplete":case"enableSyntaxHighlighting":case"enableLinter":case"showAnnotations":case"showQueryWarnings":case"showQueryInfoNotices":case"alertGroupsPerPage":case"ruleGroupsPerPage":return yS(`settings.${e}`,n)}})}});const GCe=$le({reducer:{settings:Hue,queryPage:Rce,targetsPage:$je,serviceDiscoveryPage:RCe},middleware:t=>t().prepend(OY.middleware)});aX.createRoot(document.getElementById("root")).render(a.jsx(Ln.StrictMode,{children:a.jsx(lle,{store:GCe,children:a.jsx(YCe,{})})}));
