@perses-dev/prometheus-plugin 0.58.0-beta.3 → 0.58.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/Prometheus.b529e8d3.js +7 -0
- package/__mf/js/async/1432.e29db35e.js +1 -0
- package/__mf/js/async/{1605.7c7a0998.js → 1605.a204b95c.js} +2 -2
- package/__mf/js/async/1616.3041c72f.js +1 -0
- package/__mf/js/async/1728.ed039ac8.js +1 -0
- package/__mf/js/async/1969.6563f651.js +1 -0
- package/__mf/js/async/2043.d03e35cf.js +2 -0
- package/__mf/js/async/{2177.a9ef2479.js → 2177.1bd9b5dd.js} +5 -5
- package/__mf/js/async/{2186.9a98bd8f.js → 2186.a78343d7.js} +1 -1
- package/__mf/js/async/2506.a5e3fa9e.js +1 -0
- package/__mf/js/async/2979.bb987a1e.js +1 -0
- package/__mf/js/async/3075.10dd1cd7.js +1 -0
- package/__mf/js/async/3499.24f1fd45.js +1 -0
- package/__mf/js/async/392.7bf830d9.js +2 -0
- package/__mf/js/async/3963.d41ea897.js +1 -0
- package/__mf/js/async/4121.c001d061.js +2 -0
- package/__mf/js/async/425.e5eb361a.js +1 -0
- package/__mf/js/async/4626.f0edb327.js +1 -0
- package/__mf/js/async/4635.1d829282.js +2 -0
- package/__mf/js/async/4987.fc4d4c7c.js +1 -0
- package/__mf/js/async/5002.95d78deb.js +1 -0
- package/__mf/js/async/5061.758604ba.js +1 -0
- package/__mf/js/async/5071.96533845.js +1 -0
- package/__mf/js/async/5440.62626c57.js +2 -0
- package/__mf/js/async/5587.da62b369.js +1 -0
- package/__mf/js/async/5763.32764827.js +1 -0
- package/__mf/js/async/6274.404a3115.js +2 -0
- package/__mf/js/async/6293.3d4c6e7f.js +1 -0
- package/__mf/js/async/6438.6cf5bc56.js +1 -0
- package/__mf/js/async/6507.6eff5f62.js +1 -0
- package/__mf/js/async/6593.3cb2cfba.js +3 -0
- package/__mf/js/async/7177.a7b44f03.js +1 -0
- package/__mf/js/async/7192.4de9c6ee.js +1 -0
- package/__mf/js/async/7647.56445ecd.js +1 -0
- package/__mf/js/async/7862.9d9007af.js +2 -0
- package/__mf/js/async/7894.3f4153b0.js +1 -0
- package/__mf/js/async/7968.e2c70459.js +1 -0
- package/__mf/js/async/7978.ddabf18e.js +1 -0
- package/__mf/js/async/7984.e80ae184.js +22 -0
- package/__mf/js/async/8356.e01ee829.js +1 -0
- package/__mf/js/async/8470.b11a8957.js +2 -0
- package/__mf/js/async/851.c5db9756.js +1 -0
- package/__mf/js/async/873.5877e102.js +1 -0
- package/__mf/js/async/8888.8d48a6ee.js +1 -0
- package/__mf/js/async/899.253567a6.js +1 -0
- package/__mf/js/async/9020.3de2dac7.js +1 -0
- package/__mf/js/async/9184.e1e86d58.js +1 -0
- package/__mf/js/async/9235.a8bf4fd8.js +1 -0
- package/__mf/js/async/941.3020e9b0.js +2 -0
- package/__mf/js/async/9537.d74b4d52.js +1 -0
- package/__mf/js/async/9588.a934a42d.js +1 -0
- package/__mf/js/async/9745.8a112555.js +1 -0
- package/__mf/js/async/9836.5d033753.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusDatasource.3e365ba8.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusExplorer.54b7bd6d.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.39d61ff7.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.625e0810.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusPromQLAnnotation.0ada2816.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusPromQLVariable.1f09a9bc.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.63010995.js +1 -0
- package/__mf/js/main.50a64eeb.js +7 -0
- package/lib/annotations/PrometheusPromQLAnnotation.d.ts +4 -0
- package/lib/annotations/PrometheusPromQLAnnotation.d.ts.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotation.js +32 -0
- package/lib/annotations/PrometheusPromQLAnnotation.js.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.d.ts +13 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.d.ts.map +1 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.js +139 -0
- package/lib/annotations/PrometheusPromQLAnnotationOptionEditor.js.map +1 -0
- package/lib/annotations/get-annotation-data.d.ts +5 -0
- package/lib/annotations/get-annotation-data.d.ts.map +1 -0
- package/lib/annotations/get-annotation-data.js +79 -0
- package/lib/annotations/get-annotation-data.js.map +1 -0
- package/lib/annotations/index.d.ts +2 -0
- package/lib/annotations/index.d.ts.map +1 -0
- package/lib/annotations/index.js +15 -0
- package/lib/annotations/index.js.map +1 -0
- package/lib/cjs/annotations/PrometheusPromQLAnnotation.js +40 -0
- package/lib/cjs/annotations/PrometheusPromQLAnnotationOptionEditor.js +147 -0
- package/lib/cjs/annotations/get-annotation-data.js +87 -0
- package/lib/cjs/annotations/index.js +30 -0
- package/lib/cjs/explore/PrometheusExplorer.js +2 -16
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/MetricOverview.js +3 -13
- package/lib/cjs/index.js +1 -0
- package/lib/explore/PrometheusExplorer.d.ts.map +1 -1
- package/lib/explore/PrometheusExplorer.js +2 -16
- package/lib/explore/PrometheusExplorer.js.map +1 -1
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.d.ts.map +1 -1
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js +3 -13
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/plugins/PrometheusLabelValuesVariable.d.ts.map +1 -1
- package/lib/plugins/PrometheusLabelValuesVariable.js.map +1 -1
- package/lib/plugins/types.d.ts +7 -0
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/types.js.map +1 -1
- package/mf-manifest.json +341 -267
- package/mf-stats.json +356 -286
- package/package.json +15 -6
- package/__mf/js/Prometheus.e833859d.js +0 -7
- package/__mf/js/async/1432.0bb0ef6b.js +0 -1
- package/__mf/js/async/1616.ed429c53.js +0 -1
- package/__mf/js/async/1728.11ee7ff9.js +0 -1
- package/__mf/js/async/1969.a1e1979e.js +0 -1
- package/__mf/js/async/2043.c2948add.js +0 -2
- package/__mf/js/async/2228.53db17f4.js +0 -2
- package/__mf/js/async/2506.baf20a10.js +0 -1
- package/__mf/js/async/2814.fbf52858.js +0 -1
- package/__mf/js/async/2979.1d711dae.js +0 -1
- package/__mf/js/async/3075.08023434.js +0 -1
- package/__mf/js/async/3499.19c4bfa6.js +0 -1
- package/__mf/js/async/3613.f0b10cb1.js +0 -22
- package/__mf/js/async/392.233c0945.js +0 -2
- package/__mf/js/async/3963.81c8be7e.js +0 -1
- package/__mf/js/async/4121.9ed83f2a.js +0 -2
- package/__mf/js/async/425.b9d2dc6f.js +0 -1
- package/__mf/js/async/4626.90ae092f.js +0 -1
- package/__mf/js/async/4987.f7360bdf.js +0 -1
- package/__mf/js/async/5002.bd952313.js +0 -1
- package/__mf/js/async/5071.5fcfd9a8.js +0 -1
- package/__mf/js/async/5440.9f33f7a9.js +0 -2
- package/__mf/js/async/5587.e4d331db.js +0 -1
- package/__mf/js/async/5763.ccf403b7.js +0 -1
- package/__mf/js/async/5922.ba33c996.js +0 -1
- package/__mf/js/async/6274.f04c9ecd.js +0 -2
- package/__mf/js/async/6438.b86a2aba.js +0 -1
- package/__mf/js/async/6507.71182781.js +0 -1
- package/__mf/js/async/7177.0ab860e0.js +0 -1
- package/__mf/js/async/7192.bbf62500.js +0 -1
- package/__mf/js/async/7647.82297501.js +0 -1
- package/__mf/js/async/7862.e13fbb9d.js +0 -2
- package/__mf/js/async/7894.9fe90396.js +0 -1
- package/__mf/js/async/7968.253f5f1d.js +0 -1
- package/__mf/js/async/7978.be30c741.js +0 -1
- package/__mf/js/async/8002.011a74d4.js +0 -3
- package/__mf/js/async/8356.6a2bfd53.js +0 -1
- package/__mf/js/async/8470.84935087.js +0 -2
- package/__mf/js/async/873.6aafbb7b.js +0 -1
- package/__mf/js/async/8888.3a188176.js +0 -1
- package/__mf/js/async/9020.311b6932.js +0 -1
- package/__mf/js/async/9184.e6de21be.js +0 -1
- package/__mf/js/async/9235.85fb6b63.js +0 -1
- package/__mf/js/async/941.075ed563.js +0 -2
- package/__mf/js/async/9537.d1466e1b.js +0 -1
- package/__mf/js/async/9588.dfdaeff2.js +0 -1
- package/__mf/js/async/9594.d1a3d0d9.js +0 -1
- package/__mf/js/async/9745.0a6c90a2.js +0 -1
- package/__mf/js/async/9836.888f4ed2.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusDatasource.534ca47d.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusExplorer.2c37dbd9.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.ffb9bbc3.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.a17f75cc.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusPromQLVariable.26f85fc6.js +0 -1
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.6626e886.js +0 -1
- package/__mf/js/main.f4a1cbf1.js +0 -7
- /package/__mf/js/async/{1605.7c7a0998.js.LICENSE.txt → 1605.a204b95c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2043.c2948add.js.LICENSE.txt → 2043.d03e35cf.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2177.a9ef2479.js.LICENSE.txt → 2177.1bd9b5dd.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.233c0945.js.LICENSE.txt → 392.7bf830d9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4121.9ed83f2a.js.LICENSE.txt → 4121.c001d061.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2228.53db17f4.js.LICENSE.txt → 4635.1d829282.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5440.9f33f7a9.js.LICENSE.txt → 5440.62626c57.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.f04c9ecd.js.LICENSE.txt → 6274.404a3115.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7862.e13fbb9d.js.LICENSE.txt → 7862.9d9007af.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3613.f0b10cb1.js.LICENSE.txt → 7984.e80ae184.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.84935087.js.LICENSE.txt → 8470.b11a8957.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.075ed563.js.LICENSE.txt → 941.3020e9b0.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self
|
|
1
|
+
"use strict";(self.chunk_Prometheus=self.chunk_Prometheus||[]).push([["2186"],{42927(e,t,a){a.d(t,{A:()=>S});var r=a(70451),i=a(11750),o=a(81023),n=a(59238),l=a(32560),s=a(22402),p=a(62540);let d=(0,s.A)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),c=(0,s.A)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,s.A)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var u=a(24726),g=a(83926),m=a(29009),y=a(46733);function v(e){return(0,y.Ay)("MuiCheckbox",e)}let f=(0,m.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var b=a(77308),A=a(23434),x=a(26952),k=a(72052),C=a(64606),$=a(73397);let z=(0,b.A)(l.A,{shouldForwardProp:e=>(0,g.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:a}=e;return[t.root,a.indeterminate&&t.indeterminate,t[`size${(0,u.A)(a.size)}`],"default"!==a.color&&t[`color${(0,u.A)(a.color)}`]]}})((0,A.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,n.X4)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,x.A)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,n.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,x.A)()).map(([t])=>({props:{color:t},style:{[`&.${f.checked}, &.${f.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${f.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),w=(0,p.jsx)(c,{}),R=(0,p.jsx)(d,{}),M=(0,p.jsx)(h,{}),S=r.forwardRef(function(e,t){let a=(0,k.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:n=w,color:l="primary",icon:s=R,indeterminate:d=!1,indeterminateIcon:c=M,inputProps:h,size:g="medium",disableRipple:m=!1,className:y,slots:f={},slotProps:b={},...A}=a,x=d?c:s,S=d?c:n,H={...a,disableRipple:m,color:l,indeterminate:d,size:g},j=(e=>{let{classes:t,indeterminate:a,color:r,size:i}=e,n={root:["root",a&&"indeterminate",`color${(0,u.A)(r)}`,`size${(0,u.A)(i)}`]},l=(0,o.A)(n,v,t);return{...t,...l}})(H),T=b.input??h,[X,O]=(0,$.A)("root",{ref:t,elementType:z,className:(0,i.A)(j.root,y),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:b,...A},ownerState:H,additionalProps:{type:"checkbox",icon:r.cloneElement(x,{fontSize:x.props.fontSize??g}),checkedIcon:r.cloneElement(S,{fontSize:S.props.fontSize??g}),disableRipple:m,slots:f,slotProps:{input:(0,C.A)("function"==typeof T?T(H):T,{"data-indeterminate":d})}}});return(0,p.jsx)(X,{...O,classes:j})})},33313(e,t,a){a.d(t,{A:()=>A});var r=a(70451),i=a(11750),o=a(81023),n=a(59238),l=a(69402),s=a(77308),p=a(23434),d=a(72052),c=a(29009),h=a(46733);function u(e){return(0,h.Ay)("MuiSkeleton",e)}(0,c.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=a(62540);let m=(0,l.keyframes)`
|
|
2
2
|
0% {
|
|
3
3
|
opacity: 1;
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Prometheus=self.chunk_Prometheus||[]).push([["2506"],{48865(e,t,n){n.d(t,{A:()=>eM});var r,o,i,a,s,f=n(35216),c=n(70451),p=n(95591),l=n(31789),u=n(10713);function d(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){var t=d(e).Element;return e instanceof t||e instanceof Element}function h(e){var t=d(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function v(e){if("u"<typeof ShadowRoot)return!1;var t=d(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var y=Math.max,g=Math.min,b=Math.round;function x(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function w(){return!/^((?!chrome|android).)*safari/i.test(x())}function O(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&h(e)&&(o=e.offsetWidth>0&&b(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&b(r.height)/e.offsetHeight||1);var a=(m(e)?d(e):window).visualViewport,s=!w()&&n,f=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,l=r.height/i;return{width:p,height:l,top:c,right:f+p,bottom:c+l,left:f,x:f,y:c}}function A(e){var t=d(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function j(e){return e?(e.nodeName||"").toLowerCase():null}function E(e){return((m(e)?e.ownerDocument:e.document)||window.document).documentElement}function P(e){return O(E(e)).left+A(e).scrollLeft}function D(e){return d(e).getComputedStyle(e)}function R(e){var t=D(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function M(e){var t=O(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function k(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(v(e)?e.host:null)||E(e)}function L(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(j(t))>=0?t.ownerDocument.body:h(t)&&R(t)?t:e(k(t))}(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=d(r),a=o?[i].concat(i.visualViewport||[],R(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(L(k(a)))}function W(e){return h(e)&&"fixed"!==D(e).position?e.offsetParent:null}function B(e){for(var t=d(e),n=W(e);n&&["table","td","th"].indexOf(j(n))>=0&&"static"===D(n).position;)n=W(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===D(n).position)?t:n||function(e){var t=/firefox/i.test(x());if(/Trident/i.test(x())&&h(e)&&"fixed"===D(e).position)return null;var n=k(e);for(v(n)&&(n=n.host);h(n)&&0>["html","body"].indexOf(j(n));){var r=D(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var T="bottom",H="right",S="left",V="auto",q=["top",T,H,S],C="start",N="viewport",I="popper",U=q.reduce(function(e,t){return e.concat([t+"-"+C,t+"-end"])},[]),F=[].concat(q,[V]).reduce(function(e,t){return e.concat([t,t+"-"+C,t+"-end"])},[]),_=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],z={placement:"bottom",modifiers:[],strategy:"absolute"};function X(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var Y={passive:!0};function G(e){return e.split("-")[0]}function J(e){return e.split("-")[1]}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Q(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?G(o):null,a=o?J(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case"top":t={x:s,y:n.y-r.height};break;case T:t={x:s,y:n.y+n.height};break;case H:t={x:n.x+n.width,y:f};break;case S:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?K(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case C:t[c]=t[c]-(n[p]/2-r[p]/2);break;case"end":t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}var Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $(e){var t,n,r,o,i,a,s,f=e.popper,c=e.popperRect,p=e.placement,l=e.variation,u=e.offsets,m=e.position,h=e.gpuAcceleration,v=e.adaptive,y=e.roundOffsets,g=e.isFixed,x=u.x,w=void 0===x?0:x,O=u.y,A=void 0===O?0:O,j="function"==typeof y?y({x:w,y:A}):{x:w,y:A};w=j.x,A=j.y;var P=u.hasOwnProperty("x"),R=u.hasOwnProperty("y"),M=S,k="top",L=window;if(v){var W=B(f),V="clientHeight",q="clientWidth";W===d(f)&&"static"!==D(W=E(f)).position&&"absolute"===m&&(V="scrollHeight",q="scrollWidth"),("top"===p||(p===S||p===H)&&"end"===l)&&(k=T,A-=(g&&W===L&&L.visualViewport?L.visualViewport.height:W[V])-c.height,A*=h?1:-1),(p===S||("top"===p||p===T)&&"end"===l)&&(M=H,w-=(g&&W===L&&L.visualViewport?L.visualViewport.width:W[q])-c.width,w*=h?1:-1)}var C=Object.assign({position:m},v&&Z),N=!0===y?(t={x:w,y:A},n=d(f),r=t.x,o=t.y,{x:b(r*(i=n.devicePixelRatio||1))/i||0,y:b(o*i)/i||0}):{x:w,y:A};return(w=N.x,A=N.y,h)?Object.assign({},C,((s={})[k]=R?"0":"",s[M]=P?"0":"",s.transform=1>=(L.devicePixelRatio||1)?"translate("+w+"px, "+A+"px)":"translate3d("+w+"px, "+A+"px, 0)",s)):Object.assign({},C,((a={})[k]=R?A+"px":"",a[M]=P?w+"px":"",a.transform="",a))}var ee={left:"right",right:"left",bottom:"top",top:"bottom"};function et(e){return e.replace(/left|right|bottom|top/g,function(e){return ee[e]})}var en={start:"end",end:"start"};function er(e){return e.replace(/start|end/g,function(e){return en[e]})}function eo(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&v(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ei(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ea(e,t,n){var r,o,i,a,s,f,c,p,l,u;return t===N?ei(function(e,t){var n=d(e),r=E(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;if(o){i=o.width,a=o.height;var c=w();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,f=o.offsetTop)}return{width:i,height:a,x:s+P(e),y:f}}(e,n)):m(t)?((r=O(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):ei((o=E(e),a=E(o),s=A(o),f=null==(i=o.ownerDocument)?void 0:i.body,c=y(a.scrollWidth,a.clientWidth,f?f.scrollWidth:0,f?f.clientWidth:0),p=y(a.scrollHeight,a.clientHeight,f?f.scrollHeight:0,f?f.clientHeight:0),l=-s.scrollLeft+P(o),u=-s.scrollTop,"rtl"===D(f||a).direction&&(l+=y(a.clientWidth,f?f.clientWidth:0)-c),{width:c,height:p,x:l,y:u}))}function es(){return{top:0,right:0,bottom:0,left:0}}function ef(e){return Object.assign({},es(),e)}function ec(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function ep(e,t){void 0===t&&(t={});var n,r,o,i,a,s,f,c,p=t,l=p.placement,u=void 0===l?e.placement:l,d=p.strategy,v=void 0===d?e.strategy:d,b=p.boundary,x=p.rootBoundary,w=p.elementContext,A=void 0===w?I:w,P=p.altBoundary,R=p.padding,M=void 0===R?0:R,W=ef("number"!=typeof M?M:ec(M,q)),S=e.rects.popper,V=e.elements[void 0!==P&&P?A===I?"reference":I:A],C=(n=m(V)?V:V.contextElement||E(e.elements.popper),r=void 0===b?"clippingParents":b,o=void 0===x?N:x,f=(s=[].concat("clippingParents"===r?(i=L(k(n)),!m(a=["absolute","fixed"].indexOf(D(n).position)>=0&&h(n)?B(n):n)?[]:i.filter(function(e){return m(e)&&eo(e,a)&&"body"!==j(e)})):[].concat(r),[o]))[0],(c=s.reduce(function(e,t){var r=ea(n,t,v);return e.top=y(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=y(r.left,e.left),e},ea(n,f,v))).width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c),U=O(e.elements.reference),F=Q({reference:U,element:S,strategy:"absolute",placement:u}),_=ei(Object.assign({},S,F)),z=A===I?_:U,X={top:C.top-z.top+W.top,bottom:z.bottom-C.bottom+W.bottom,left:C.left-z.left+W.left,right:z.right-C.right+W.right},Y=e.modifiersData.offset;if(A===I&&Y){var G=Y[u];Object.keys(X).forEach(function(e){var t=[H,T].indexOf(e)>=0?1:-1,n=["top",T].indexOf(e)>=0?"y":"x";X[e]+=G[n]*t})}return X}function el(e,t,n){return y(e,g(t,n))}function eu(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ed(e){return["top",H,T,S].some(function(t){return e[t]>=0})}var em=(i=void 0===(o=(r={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,f=d(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,Y)}),s&&f.addEventListener("resize",n.update,Y),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Y)}),s&&f.removeEventListener("resize",n.update,Y)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=n.adaptive,i=n.roundOffsets,a=void 0===i||i,s={placement:G(t.placement),variation:J(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===o||o,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];h(o)&&j(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});h(r)&&j(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=F.reduce(function(e,n){var r,o,a,s,f,c;return e[n]=(r=t.rects,a=[S,"top"].indexOf(o=G(n))>=0?-1:1,f=(s="function"==typeof i?i(Object.assign({},r,{placement:n})):i)[0],c=s[1],f=f||0,c=(c||0)*a,[S,H].indexOf(o)>=0?{x:c,y:f}:{x:f,y:c}),e},{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.flipVariations,m=void 0===d||d,h=n.allowedAutoPlacements,v=t.options.placement,y=G(v)===v,g=f||(y||!m?[et(v)]:function(e){if(G(e)===V)return[];var t=et(e);return[er(e),t,er(t)]}(v)),b=[v].concat(g).reduce(function(e,n){var r,o,i,a,s,f,u,d,v,y,g,b;return e.concat(G(n)===V?(o=(r={placement:n,boundary:p,rootBoundary:l,padding:c,flipVariations:m,allowedAutoPlacements:h}).placement,i=r.boundary,a=r.rootBoundary,s=r.padding,f=r.flipVariations,d=void 0===(u=r.allowedAutoPlacements)?F:u,0===(g=(y=(v=J(o))?f?U:U.filter(function(e){return J(e)===v}):q).filter(function(e){return d.indexOf(e)>=0})).length&&(g=y),Object.keys(b=g.reduce(function(e,n){return e[n]=ep(t,{placement:n,boundary:i,rootBoundary:a,padding:s})[G(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,w=t.rects.popper,O=new Map,A=!0,j=b[0],E=0;E<b.length;E++){var P=b[E],D=G(P),R=J(P)===C,M=["top",T].indexOf(D)>=0,k=M?"width":"height",L=ep(t,{placement:P,boundary:p,rootBoundary:l,altBoundary:u,padding:c}),W=M?R?H:S:R?T:"top";x[k]>w[k]&&(W=et(W));var B=et(W),N=[];if(i&&N.push(L[D]<=0),s&&N.push(L[W]<=0,L[B]<=0),N.every(function(e){return e})){j=P,A=!1;break}O.set(P,N)}if(A)for(var I=m?3:1,_=function(e){var t=b.find(function(t){var n=O.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return j=t,"break"},z=I;z>0&&"break"!==_(z);z--);t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=n.altAxis,a=n.boundary,s=n.rootBoundary,f=n.altBoundary,c=n.padding,p=n.tether,l=void 0===p||p,u=n.tetherOffset,d=void 0===u?0:u,m=ep(t,{boundary:a,rootBoundary:s,padding:c,altBoundary:f}),h=G(t.placement),v=J(t.placement),b=!v,x=K(h),w="x"===x?"y":"x",O=t.modifiersData.popperOffsets,A=t.rects.reference,j=t.rects.popper,E="function"==typeof d?d(Object.assign({},t.rects,{placement:t.placement})):d,P="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(O){if(void 0===o||o){var k,L="y"===x?"top":S,W="y"===x?T:H,V="y"===x?"height":"width",q=O[x],N=q+m[L],I=q-m[W],U=l?-j[V]/2:0,F=v===C?A[V]:j[V],_=v===C?-j[V]:-A[V],z=t.elements.arrow,X=l&&z?M(z):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:es(),Q=Y[L],Z=Y[W],$=el(0,A[V],X[V]),ee=b?A[V]/2-U-$-Q-P.mainAxis:F-$-Q-P.mainAxis,et=b?-A[V]/2+U+$+Z+P.mainAxis:_+$+Z+P.mainAxis,en=t.elements.arrow&&B(t.elements.arrow),er=en?"y"===x?en.clientTop||0:en.clientLeft||0:0,eo=null!=(k=null==D?void 0:D[x])?k:0,ei=el(l?g(N,q+ee-eo-er):N,q,l?y(I,q+et-eo):I);O[x]=ei,R[x]=ei-q}if(void 0!==i&&i){var ea,ef,ec="x"===x?"top":S,eu="x"===x?T:H,ed=O[w],em="y"===w?"height":"width",eh=ed+m[ec],ev=ed-m[eu],ey=-1!==["top",S].indexOf(h),eg=null!=(ef=null==D?void 0:D[w])?ef:0,eb=ey?eh:ed-A[em]-j[em]-eg+P.altAxis,ex=ey?ed+A[em]+j[em]-eg-P.altAxis:ev,ew=l&&ey?(ea=el(eb,ed,ex))>ex?ex:ea:el(l?eb:eh,ed,l?ex:ev);O[w]=ew,R[w]=ew-ed}t.modifiersData[r]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=G(n.placement),f=K(s),c=[S,H].indexOf(s)>=0?"height":"width";if(i&&a){var p,l=(p=o.padding,ef("number"!=typeof(p="function"==typeof p?p(Object.assign({},n.rects,{placement:n.placement})):p)?p:ec(p,q))),u=M(i),d="y"===f?"top":S,m="y"===f?T:H,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],v=a[f]-n.rects.reference[f],y=B(i),g=y?"y"===f?y.clientHeight||0:y.clientWidth||0:0,b=l[d],x=g-u[c]-l[m],w=g/2-u[c]/2+(h/2-v/2),O=el(b,w,x);n.modifiersData[r]=((t={})[f]=O,t.centerOffset=O-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&eo(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ep(t,{elementContext:"reference"}),s=ep(t,{altBoundary:!0}),f=eu(a,r),c=eu(s,o,i),p=ed(f),l=ed(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:l},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":l})}}]}).defaultModifiers)?[]:o,s=void 0===(a=r.defaultOptions)?z:a,function(e,t,n){void 0===n&&(n=s);var r,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},z,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:a,setOptions:function(n){var r,o,c,u,d,h,v="function"==typeof n?n(a.options):n;l(),a.options=Object.assign({},s,a.options,v),a.scrollParents={reference:m(e)?L(e):e.contextElement?L(e.contextElement):[],popper:L(t)};var y=(o=Object.keys(r=[].concat(i,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),c=new Map,u=new Set,d=[],o.forEach(function(e){c.set(e.name,e)}),o.forEach(function(e){u.has(e.name)||function e(t){u.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!u.has(t)){var n=c.get(t);n&&e(n)}}),d.push(t)}(e)}),h=d,_.reduce(function(e,t){return e.concat(h.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=y.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var o=r({state:a,name:t,instance:p,options:void 0===n?{}:n});f.push(o||function(){})}}),p.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(X(t,n)){a.rects={reference:(r=B(n),o="fixed"===a.options.strategy,i=h(r),u=h(r)&&(f=b((s=r.getBoundingClientRect()).width)/r.offsetWidth||1,l=b(s.height)/r.offsetHeight||1,1!==f||1!==l),m=E(r),v=O(t,u,o),y={scrollLeft:0,scrollTop:0},g={x:0,y:0},(i||!i&&!o)&&(("body"!==j(r)||R(m))&&(y=function(e){return e!==d(e)&&h(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:A(e)}(r)),h(r)?(g=O(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):m&&(g.x=P(m))),{x:v.left+y.scrollLeft-g.x,y:v.top+y.scrollTop-g.y,width:v.width,height:v.height}),popper:M(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var r,o,i,s,f,l,u,m,v,y,g,x=0;x<a.orderedModifiers.length;x++){if(!0===a.reset){a.reset=!1,x=-1;continue}var w=a.orderedModifiers[x],D=w.fn,k=w.options,L=void 0===k?{}:k,W=w.name;"function"==typeof D&&(a=D({state:a,options:L,name:W,instance:p})||a)}}}},update:(r=function(){return new Promise(function(e){p.forceUpdate(),e(a)})},function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(r())})})),o}),destroy:function(){l(),c=!0}};if(!X(e,t))return p;function l(){f.forEach(function(e){return e()}),f=[]}return p.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),p}),eh=n(81023),ev=n(77893),ey=n(36961),eg=n(29009),eb=n(46733);function ex(e){return(0,eb.Ay)("MuiPopper",e)}(0,eg.A)("MuiPopper",["root"]);var ew=n(62540);function eO(e){return"function"==typeof e?e():e}let eA={},ej=c.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:f,popperOptions:u,popperRef:d,slotProps:m={},slots:h={},TransitionProps:v,ownerState:y,...g}=e,b=c.useRef(null),x=(0,p.A)(b,t),w=c.useRef(null),O=(0,p.A)(w,d),A=c.useRef(O);(0,l.A)(()=>{A.current=O},[O]),c.useImperativeHandle(d,()=>w.current,[]);let j=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(f,o),[E,P]=c.useState(j),[D,R]=c.useState(eO(n));c.useEffect(()=>{w.current&&w.current.forceUpdate()}),c.useEffect(()=>{n&&R(eO(n))},[n]),(0,l.A)(()=>{if(!D||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{P(e.placement)}}];null!=a&&(e=e.concat(a)),u&&null!=u.modifiers&&(e=e.concat(u.modifiers));let t=em(D,b.current,{placement:j,...u,modifiers:e});return A.current(t),()=>{t.destroy(),A.current(null)}},[D,i,a,s,u,j]);let M={placement:E};null!==v&&(M.TransitionProps=v);let k=(e=>{let{classes:t}=e;return(0,eh.A)({root:["root"]},ex,t)})(e),L=h.root??"div",W=(0,ev.A)({elementType:L,externalSlotProps:m.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:k.root});return(0,ew.jsx)(L,{...W,children:"function"==typeof r?r(M):r})}),eE=c.forwardRef(function(e,t){let n,{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:f=!1,modifiers:p,open:l,placement:d="bottom",popperOptions:m=eA,popperRef:h,style:v,transition:y=!1,slotProps:g={},slots:b={},...x}=e,[w,O]=c.useState(!0);if(!f&&!l&&(!y||w))return null;if(i)n=i;else if(r){let e=eO(r);n=e&&void 0!==e.nodeType?(0,u.A)(e).body:(0,u.A)(null).body}let A=!l&&f&&(!y||w)?"none":void 0,j=y?{in:l,onEnter:()=>{O(!1)},onExited:()=>{O(!0)}}:void 0;return(0,ew.jsx)(ey.A,{disablePortal:s,container:n,children:(0,ew.jsx)(ej,{anchorEl:r,direction:a,disablePortal:s,modifiers:p,ref:t,open:y?!w:l,placement:d,popperOptions:m,popperRef:h,slotProps:g,slots:b,...x,style:{position:"fixed",top:0,left:0,display:A,...v},TransitionProps:j,children:o})})});var eP=n(77308),eD=n(72052);let eR=(0,eP.A)(eE,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eM=c.forwardRef(function(e,t){let n=(0,f.I)(),{anchorEl:r,component:o,components:i,componentsProps:a,container:s,disablePortal:c,keepMounted:p,modifiers:l,open:u,placement:d,popperOptions:m,popperRef:h,transition:v,slots:y,slotProps:g,...b}=(0,eD.b)({props:e,name:"MuiPopper"}),x=y?.root??i?.Root,w={anchorEl:r,container:s,disablePortal:c,keepMounted:p,modifiers:l,open:u,placement:d,popperOptions:m,popperRef:h,transition:v,...b};return(0,ew.jsx)(eR,{as:o,direction:n?"rtl":"ltr",slots:{root:x},slotProps:g??a,...w,ref:t})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Prometheus=self.chunk_Prometheus||[]).push([["2979"],{315(e,t,i){i.d(t,{A:()=>o});var a=i(68335),r=i(77308),n=i(72052);let o=(0,a.A)({createStyledComponent:(0,r.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,n.b)({props:e,name:"MuiStack"})})},68335(e,t,i){i.d(t,{A:()=>v});var a=i(70451),r=i(11750),n=i(6121),o=i(46733),s=i(81023),l=i(7939),c=i(51327),h=i(20523),u=i(80787),d=i(85351),p=i(89187),f=i(62540);let O=(0,u.A)(),m=(0,l.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function P(e){return(0,c.A)({props:e,name:"MuiStack",defaultTheme:O})}let g=({ownerState:e,theme:t})=>{let i={display:"flex",flexDirection:"column",...(0,d.NI)({theme:t},(0,d.kW)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let a=(0,p.LX)(t),r=Object.keys(t.breakpoints.values).reduce((t,i)=>(("object"==typeof e.spacing&&null!=e.spacing[i]||"object"==typeof e.direction&&null!=e.direction[i])&&(t[i]=!0),t),{}),o=(0,d.kW)({values:e.direction,base:r}),s=(0,d.kW)({values:e.spacing,base:r});"object"==typeof o&&Object.keys(o).forEach((e,t,i)=>{if(!o[e]){let a=t>0?o[i[t-1]]:"column";o[e]=a}}),i=(0,n.A)(i,(0,d.NI)({theme:t},s,(t,i)=>e.useFlexGap?{gap:(0,p._W)(a,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[i?o[i]:e.direction]}`]:(0,p._W)(a,t)}}))}return(0,d.iZ)(t.breakpoints,i)};function v(e={}){let{createStyledComponent:t=m,useThemeProps:i=P,componentName:n="MuiStack"}=e,l=t(g);return a.forwardRef(function(e,t){let c,u=i(e),{component:d="div",direction:p="column",spacing:O=0,divider:m,children:P,className:g,useFlexGap:v=!1,...y}=(0,h.A)(u),b=(0,s.A)({root:["root"]},e=>(0,o.Ay)(n,e),{});return(0,f.jsx)(l,{as:d,ownerState:{direction:p,spacing:O,useFlexGap:v},ref:t,className:(0,r.A)(b.root,g),...y,children:m?(c=a.Children.toArray(P).filter(Boolean)).reduce((e,t,i)=>(e.push(t),i<c.length-1&&e.push(a.cloneElement(m,{key:`separator-${i}`})),e),[]):P})})}},7939(e,t,i){i.d(t,{A:()=>a});let a=(0,i(57867).Ay)()},70320(e,t,i){i.d(t,{A:()=>r});var a=i(52215);function r(e){let{theme:t,name:i,props:r}=e;return t&&t.components&&t.components[i]&&t.components[i].defaultProps?(0,a.A)(t.components[i].defaultProps,r):r}},51327(e,t,i){i.d(t,{A:()=>n});var a=i(70320),r=i(26041);function n({props:e,name:t,defaultTheme:i,themeId:o}){let s=(0,r.A)(i);return o&&(s=s[o]||s),(0,a.A)({theme:s,name:t,props:e})}},74830(e,t,i){var a;t.default=void 0,t.default=(0,((a=i(1448))&&a.__esModule?a:{default:a}).default)("M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","AlertCircle")},7800(e,t,i){var a;t.default=void 0,t.default=(0,((a=i(1448))&&a.__esModule?a:{default:a}).default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},93196(e,t,i){var a;t.default=void 0,t.default=(0,((a=i(1448))&&a.__esModule?a:{default:a}).default)("M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z","FileTree")},98207(e,t,i){i.d(t,{TI:()=>es});var a,r,n,o,s,l,c,h,u=i(782),d=i(31650);let p={inf:177,nan:178,bool:1,ignoring:2,on:3,group_left:4,group_right:5,offset:6},f=(e,t)=>p[e.toLowerCase()]||-1,O={avg:8,atan2:7,bottomk:9,count:10,count_values:11,group:12,max:13,min:14,quantile:15,limitk:16,limit_ratio:17,stddev:18,stdvar:19,sum:20,topk:21,by:22,without:23,and:24,or:25,unless:26,start:27,end:28,smoothed:29,anchored:30,fill:31,fill_left:32,fill_right:33},m=(e,t)=>O[e.toLowerCase()]||-1,P=(0,d.pn)({LineComment:d._A.comment,LabelName:d._A.labelName,StringLiteral:d._A.string,NumberDurationLiteral:d._A.number,NumberDurationLiteralInDurationContext:d._A.number,Identifier:d._A.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 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 Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":d._A.function(d._A.variableName),"Avg Bottomk Count Count_values Group LimitK LimitRatio Max Min Quantile Stddev Stdvar Sum Topk":d._A.operatorKeyword,"By Without Bool On Ignoring GroupLeft GroupRight Offset Start End Smoothed Anchored":d._A.modifier,"And Unless Or":d._A.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":d._A.operator,UnaryOp:d._A.arithmeticOperator,"( )":d._A.paren,"[ ]":d._A.squareBracket,"{ }":d._A.brace,"⚠":d._A.invalid}),g={__proto__:null,absent_over_time:379,absent:381,abs:383,acos:385,acosh:387,asin:389,asinh:391,atan:393,atanh:395,avg_over_time:397,ceil:399,changes:401,clamp:403,clamp_max:405,clamp_min:407,cos:409,cosh:411,count_over_time:413,days_in_month:415,day_of_month:417,day_of_week:419,day_of_year:421,deg:423,delta:425,deriv:427,exp:429,first_over_time:431,floor:433,histogram_count:435,histogram_fraction:437,histogram_quantile:439,histogram_quantiles:441,histogram_stddev:443,histogram_stdvar:445,histogram_sum:447,histogram_avg:449,double_exponential_smoothing:451,hour:453,idelta:455,increase:457,info:459,irate:461,label_replace:463,label_join:465,last_over_time:467,ln:469,log10:471,log2:473,mad_over_time:475,max_over_time:477,min_over_time:479,ts_of_first_over_time:481,ts_of_max_over_time:483,ts_of_min_over_time:485,ts_of_last_over_time:487,minute:489,month:491,pi:493,predict_linear:495,present_over_time:497,quantile_over_time:499,rad:501,rate:503,resets:505,round:507,scalar:509,sgn:511,sin:513,sinh:515,sort:517,sort_desc:519,sort_by_label:521,sort_by_label_desc:523,sqrt:525,stddev_over_time:527,stdvar_over_time:529,sum_over_time:531,tan:533,tanh:535,timestamp:537,time:539,vector:541,year:543},v=u.U1.deserialize({version:14,states:"<zOYQPOOO(WQPOOOOQO'#DR'#DRO(]QPO'#DQOOQO'#D`'#D`O(hQPO'#FrQ/oQQOOOOQO'#Dq'#DqO(cQPO'#DpOYQPO'#FoOYQPO'#FqO1YQSO'#FtO1eQQO'#FsOOQO'#Fs'#FsOOQO'#GX'#GXOOQO'#Dr'#DrOOQO'#Dt'#DtOOQO'#Du'#DuOOQO'#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'#E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p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p(p%R(|%R%R%R%R%R%R)V%R)c)r)zPPP)r%RP*RP*U*[*bPPPPP*iPPP+Xe^OXY#W$P$Q$R$S$T$geROXY#W$P$Q$R$S$T$gQ#XRR#s#YQ#p#VQ$j#uR%g%XQ#kZQ$f#oU$|$b%P%bV%c%R%e%mQ#YRQ#fWR#s#XZ$O#[#]#^#_#`Y#}#[#]#^#_#`R$p$OY#|#[#]#^#_#`S$o#}$OR%]$pa#y#[#]#^#_#`#}$O$pd^OXY#W$P$Q$R$S$T$gQ$[#eQ%Y$kQ%Z$lR%[$m`#z#[#]#^#_#`#}$O$pR$n#{`#{#[#]#^#_#`#}$O$pR$n#zeWOXY#W$P$Q$R$S$T$geVOXY#W$P$Q$R$S$T$gQ$W#aQ$X#bR%_$xeYOXY#W$P$Q$R$S$T$gd]OXY#W$P$Q$R$S$T$gR#n[Q#mZV$}$b%P%bQ$`#jT$a#k$|R$]#eQ%S$fR%f%SQ$h#rR%V$hS$c#k#mR%Q$cQUOQ#gXQ#hYQ#r#WQ$q$PQ$r$QQ$s$RQ$t$SQ$u$TR%U$gQ$P#[Q$Q#]Q$R#^Q$S#_R$T#`",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 Start End 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 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:276,nodeProps:[["group",-14,36,42,44,50,66,152,154,155,156,157,158,159,161,169,"Expr"]],propSources:[P],skippedNodes:[0,34],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$z~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!c~~$tO$m~~$yWz~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f<%lO$t~%hOz~~%kRO;'S$t;'S;=`%t;=`O$t~%yXz~OY$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P!Q2V!_!`2[~2[O!_~~2aO!a~~2fQ$kP!_!`2l#r#s2qQ2qO![Q~2vO$l~~2{Q!^~!P!Q3R!_!`3W~3WO!`~~3]O!]~~3bO$p~V3iT!gRxS!Q![3b![!]1f!c!}3b#R#S3b#T#o3b~3}O&z~~4SO&{~~4XO}~~4[TO#S4X#S#T%c#T;'S4X;'S;=`4k<%lO4X~4nP;=`<%l4X~4vO&}~~4{O'O~",tokenizers:[0,1,2],topRules:{PromQL:[0,35],MetricName:[1,172]},specialized:[{term:69,get:(e,t)=>f(e)<<1,external:f},{term:69,get:(e,t)=>m(e)<<1|1,external:m,extend:!0},{term:69,get:e=>g[e]||-1}],tokenPrec:0});(a=s||(s={})).none="none",a.vector="vector",a.scalar="scalar",a.matrix="matrix",a.string="string";let y={71:{name:"abs",argTypes:[s.vector],variadic:0,returnType:s.vector},70:{name:"absent",argTypes:[s.vector],variadic:0,returnType:s.vector},68:{name:"absent_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},72:{name:"acos",argTypes:[s.vector],variadic:0,returnType:s.vector},73:{name:"acosh",argTypes:[s.vector],variadic:0,returnType:s.vector},74:{name:"asin",argTypes:[s.vector],variadic:0,returnType:s.vector},75:{name:"asinh",argTypes:[s.vector],variadic:0,returnType:s.vector},76:{name:"atan",argTypes:[s.vector],variadic:0,returnType:s.vector},77:{name:"atanh",argTypes:[s.vector],variadic:0,returnType:s.vector},78:{name:"avg_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},79:{name:"ceil",argTypes:[s.vector],variadic:0,returnType:s.vector},80:{name:"changes",argTypes:[s.matrix],variadic:0,returnType:s.vector},81:{name:"clamp",argTypes:[s.vector,s.scalar,s.scalar],variadic:0,returnType:s.vector},82:{name:"clamp_max",argTypes:[s.vector,s.scalar],variadic:0,returnType:s.vector},83:{name:"clamp_min",argTypes:[s.vector,s.scalar],variadic:0,returnType:s.vector},84:{name:"cos",argTypes:[s.vector],variadic:0,returnType:s.vector},85:{name:"Cosh",argTypes:[s.vector],variadic:0,returnType:s.vector},86:{name:"count_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},87:{name:"days_in_month",argTypes:[s.vector],variadic:1,returnType:s.vector},88:{name:"day_of_month",argTypes:[s.vector],variadic:1,returnType:s.vector},89:{name:"day_of_week",argTypes:[s.vector],variadic:1,returnType:s.vector},90:{name:"day_of_year",argTypes:[s.vector],variadic:1,returnType:s.vector},91:{name:"deg",argTypes:[s.vector],variadic:0,returnType:s.vector},92:{name:"delta",argTypes:[s.matrix],variadic:0,returnType:s.vector},93:{name:"deriv",argTypes:[s.matrix],variadic:0,returnType:s.vector},94:{name:"exp",argTypes:[s.vector],variadic:0,returnType:s.vector},95:{name:"first_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},96:{name:"floor",argTypes:[s.vector],variadic:0,returnType:s.vector},104:{name:"histogram_avg",argTypes:[s.vector],variadic:0,returnType:s.vector},97:{name:"histogram_count",argTypes:[s.vector],variadic:0,returnType:s.vector},98:{name:"histogram_fraction",argTypes:[s.scalar,s.scalar,s.vector],variadic:0,returnType:s.vector},99:{name:"histogram_quantile",argTypes:[s.scalar,s.vector],variadic:0,returnType:s.vector},100:{name:"histogram_quantiles",argTypes:[s.vector,s.string,s.scalar,s.scalar],variadic:10,returnType:s.vector},101:{name:"histogram_stddev",argTypes:[s.vector],variadic:0,returnType:s.vector},102:{name:"histogram_stdvar",argTypes:[s.vector],variadic:0,returnType:s.vector},103:{name:"histogram_sum",argTypes:[s.vector],variadic:0,returnType:s.vector},105:{name:"double_exponential_smoothing",argTypes:[s.matrix,s.scalar,s.scalar],variadic:0,returnType:s.vector},106:{name:"hour",argTypes:[s.vector],variadic:1,returnType:s.vector},107:{name:"idelta",argTypes:[s.matrix],variadic:0,returnType:s.vector},108:{name:"increase",argTypes:[s.matrix],variadic:0,returnType:s.vector},109:{name:"info",argTypes:[s.vector,s.vector],variadic:1,returnType:s.vector},110:{name:"irate",argTypes:[s.matrix],variadic:0,returnType:s.vector},111:{name:"label_replace",argTypes:[s.vector,s.string,s.string,s.string,s.string],variadic:0,returnType:s.vector},112:{name:"label_join",argTypes:[s.vector,s.string,s.string,s.string],variadic:-1,returnType:s.vector},113:{name:"last_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},114:{name:"ln",argTypes:[s.vector],variadic:0,returnType:s.vector},115:{name:"log10",argTypes:[s.vector],variadic:0,returnType:s.vector},116:{name:"log2",argTypes:[s.vector],variadic:0,returnType:s.vector},117:{name:"mad_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},118:{name:"max_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},119:{name:"min_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},120:{name:"ts_of_first_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},121:{name:"ts_of_max_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},122:{name:"ts_of_min_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},123:{name:"ts_of_last_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},124:{name:"minute",argTypes:[s.vector],variadic:1,returnType:s.vector},125:{name:"month",argTypes:[s.vector],variadic:1,returnType:s.vector},126:{name:"pi",argTypes:[],variadic:0,returnType:s.vector},127:{name:"predict_linear",argTypes:[s.matrix,s.scalar],variadic:0,returnType:s.vector},128:{name:"present_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},129:{name:"quantile_over_time",argTypes:[s.scalar,s.matrix],variadic:0,returnType:s.vector},130:{name:"rad",argTypes:[s.vector],variadic:0,returnType:s.vector},131:{name:"rate",argTypes:[s.matrix],variadic:0,returnType:s.vector},132:{name:"resets",argTypes:[s.matrix],variadic:0,returnType:s.vector},133:{name:"round",argTypes:[s.vector,s.scalar],variadic:1,returnType:s.vector},134:{name:"scalar",argTypes:[s.vector],variadic:0,returnType:s.scalar},135:{name:"sgn",argTypes:[s.vector],variadic:0,returnType:s.vector},136:{name:"sin",argTypes:[s.vector],variadic:0,returnType:s.vector},137:{name:"Sinh",argTypes:[s.vector],variadic:0,returnType:s.vector},138:{name:"sort",argTypes:[s.vector],variadic:0,returnType:s.vector},139:{name:"sort_desc",argTypes:[s.vector],variadic:0,returnType:s.vector},140:{name:"sort_by_label",argTypes:[s.vector,s.string],variadic:-1,returnType:s.vector},141:{name:"sort_by_label_desc",argTypes:[s.vector,s.string],variadic:-1,returnType:s.vector},142:{name:"sqrt",argTypes:[s.vector],variadic:0,returnType:s.vector},143:{name:"stddev_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},144:{name:"stdvar_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},145:{name:"sum_over_time",argTypes:[s.matrix],variadic:0,returnType:s.vector},146:{name:"tan",argTypes:[s.vector],variadic:0,returnType:s.vector},147:{name:"tanh",argTypes:[s.vector],variadic:0,returnType:s.vector},149:{name:"time",argTypes:[],variadic:0,returnType:s.scalar},148:{name:"timestamp",argTypes:[s.vector],variadic:0,returnType:s.vector},150:{name:"vector",argTypes:[s.scalar],variadic:0,returnType:s.vector},151:{name:"year",argTypes:[s.vector],variadic:1,returnType:s.vector}};class b{constructor(e,t,i){this.type=e,this.name=t,this.value=i}matchesEmpty(){switch(this.type){case 165:return""===this.value;case 65:return""!==this.value;default:return!1}}}function _(e,t){let i=[];return e.forEach(e=>{i.push(function(e,t){let i=new b(0,"",""),a=e.cursor();switch(a.type.id){case 168:if(!a.next())break;do switch(a.type.id){case 41:i.name=t.sliceDoc(a.from,a.to).slice(1,-1);break;case 164:{let e=a.node.firstChild;e&&(i.type=e.type.id);break}case 42:i.value=t.sliceDoc(a.from,a.to).slice(1,-1)}while(a.nextSibling());break;case 163:if(!a.next())break;do switch(a.type.id){case 40:i.name=t.sliceDoc(a.from,a.to);break;case 164:{let e=a.node.firstChild;e&&(i.type=e.type.id);break}case 42:i.value=t.sliceDoc(a.from,a.to).slice(1,-1)}while(a.nextSibling());break;case 41:i.name="__name__",i.value=t.sliceDoc(a.from,a.to).slice(1,-1),i.type=165}return i}(e,t))}),i}function $(e,t,i){if(!t||0===t.length)return e;let a="";for(let e of t){if(e.name===i||""===e.value)continue;let t="";switch(e.type){case 165:default:t="=";break;case 65:t="!=";break;case 167:t="!~";break;case 166:t="=~"}let r=`${e.name}${t}"${e.value}"`;a=""===a?r:`${a},${r}`}return`${e}{${a}}`}function Q(e,t){for(;;){if(!e||e.type.id===t)return e;e=e.parent}return null}function X(e,...t){let i=e.cursor();if(!i.next())return!1;let a=!1;do a=t.some(e=>i.type.id===e||i.type.name===e);while(!a&&i.nextSibling());return a}function T(e,...t){let i=e.cursor();if(!i.next())return!1;let a=0;do i.type.is(t[a])&&a++;while(a<t.length&&i.nextSibling());return a>=t.length}function S(e){var t;if(!e)return s.none;switch(e.type.id){case 36:case 161:return s.vector;case 154:case 156:case 155:return S(e.firstChild);case 42:return s.string;case 50:return s.scalar;case 152:case 158:return s.matrix;case 157:case 159:case 169:return S(e.getChild("Expr"));case 44:{let t=S(e.firstChild),i=S(e.lastChild);if(t===s.scalar&&i===s.scalar)return s.scalar;return s.vector}case 66:{let i=null==(t=e.firstChild)?void 0:t.firstChild;if(!i)return s.none;return y[i.type.id].returnType}default:return s.none}}(r=l||(l={})).CardOneToOne="one-to-one",r.CardManyToOne="many-to-one",r.CardOneToMany="one-to-many",r.CardManyToMany="many-to-many";var k=i(63960);class x{constructor(e){this.tree=(0,k.mv)(e),this.state=e,this.diagnostics=[]}getDiagnostics(){return this.diagnostics.sort((e,t)=>e.from-t.from)}analyze(){this.checkAST(this.tree.topNode.firstChild),this.diagnoseAllErrorNodes()}diagnoseAllErrorNodes(){let e=this.tree.cursor();for(;e.next();)if(0===e.type.id&&e.to!==this.tree.topNode.to){let t=e.node.parent;this.diagnostics.push({severity:"error",message:"unexpected expression",from:t?t.from:e.from,to:t?t.to:e.to})}}checkAST(e){if(!e)return s.none;switch(e.type.id){case 36:this.checkAggregationExpr(e);break;case 44:this.checkBinaryExpr(e);break;case 66:this.checkCallFunction(e);break;case 157:case 152:this.checkAST(e.getChild("Expr"));break;case 159:{let t=this.checkAST(e.getChild("Expr"));t!==s.scalar&&t!==s.vector&&this.addDiagnostic(e,`unary expression only allowed on expressions of type scalar or instant vector, got ${t}`);break}case 156:this.checkAnchoredSmoothedExpr(e,[131,108,92]);break;case 155:this.checkAnchoredSmoothedExpr(e,[132,80,131,108,92]);break;case 158:{let t=this.checkAST(e.getChild("Expr"));t!==s.vector&&this.addDiagnostic(e,`subquery is only allowed on instant vector, got ${t} in ${e.name} instead`);break}case 161:this.checkVectorSelector(e);break;case 169:{let t=this.checkAST(e.getChild("Expr"));t!==s.vector&&t!==s.matrix&&this.addDiagnostic(e,"@ modifier must be preceded by an instant selector vector or range vector selector or a subquery")}}return S(e)}checkAggregationExpr(e){var t;let i=null==(t=e.firstChild)?void 0:t.firstChild;if(!i)return void this.addDiagnostic(e,"aggregation operator expected in aggregation expression but got nothing");let a=e.getChild(43),r=a?a.getChildren("Expr"):[];r.length?(this.expectType(r[r.length-1],s.vector,"aggregation expression"),(21===i.type.id||9===i.type.id||16===i.type.id||17===i.type.id||15===i.type.id)&&this.expectType(r[0],s.scalar,"aggregation parameter"),11===i.type.id&&this.expectType(r[0],s.string,"aggregation parameter")):this.addDiagnostic(e,"unable to find the parameter for the expression")}checkBinaryExpr(e){let t=e.firstChild,i=e.lastChild;if(!t||!i)return void this.addDiagnostic(e,"left or right expression is missing in binary expression");let a=this.checkAST(t),r=this.checkAST(i),n=e.getChild(46),o=X(e,58,65,63,64,59,60),c=T(e,62),h=T(e,61),u=X(e,24,25,26);n?o||this.addDiagnostic(e,"bool modifier can only be used on comparison operators"):a===s.scalar&&r===s.scalar&&(o?this.addDiagnostic(e,"comparisons between scalars must use BOOL modifier"):c?this.addDiagnostic(e,'operator ">/" not allowed for Scalar operations'):h&&this.addDiagnostic(e,'operator "</" not allowed for Scalar operations'));let d=function(e,t){if(!t||44!==t.type.id)return null;let i={card:l.CardOneToOne,matchingLabels:[],on:!1,include:[],fill:{lhs:null,rhs:null}},a=t.getChild(47);if(a){i.on=null!==a.getChild(3);let t=a.getChild(39);for(let a of t?t.getChildren(40):[])i.matchingLabels.push(e.sliceDoc(a.from,a.to));let r=a.getChild(4),n=a.getChild(5),o=r||n;if(o){i.card=r?l.CardManyToOne:l.CardOneToMany;let t=o.nextSibling;for(let a of(null==t?void 0:t.getChildren(40))||[])i.include.push(e.sliceDoc(a.from,a.to))}}let r=t.getChild(48);if(r){let t=r.getChild(49),a=r.getChild(51),n=r.getChild(52),o=t=>{let i=t.getChild(50);return i?parseFloat(e.sliceDoc(i.from,i.to)):null};if(t){let e=o(t);i.fill.lhs=e,i.fill.rhs=e}a&&(i.fill.lhs=o(a)),n&&(i.fill.rhs=o(n))}return X(t,24,25,26)&&i.card===l.CardOneToOne&&(i.card=l.CardManyToMany),i}(this.state,e);if(null!==d&&d.on)for(let t of d.matchingLabels)for(let i of d.include)t===i&&this.addDiagnostic(e,`label "${t}" must not occur in ON and GROUP clause at once`);a!==s.scalar&&a!==s.vector&&this.addDiagnostic(t,"binary expression must contain only scalar and instant vector types"),r!==s.scalar&&r!==s.vector&&this.addDiagnostic(i,"binary expression must contain only scalar and instant vector types"),(a!==s.vector||r!==s.vector)&&null!==d?d.matchingLabels.length>0&&this.addDiagnostic(e,"vector matching only allowed between instant vectors"):u&&(((null==d?void 0:d.card)===l.CardOneToMany||(null==d?void 0:d.card)===l.CardManyToOne)&&this.addDiagnostic(e,"no grouping allowed for set operations"),(null==d?void 0:d.card)!==l.CardManyToMany&&this.addDiagnostic(e,"set operations must always be many-to-many")),(a===s.scalar||r===s.scalar)&&u&&this.addDiagnostic(e,"set operator not allowed in binary scalar expression")}checkCallFunction(e){var t;let i=null==(t=e.firstChild)?void 0:t.firstChild;if(!i)return void this.addDiagnostic(e,"function not defined");let a=e.getChild(43),r=a?a.getChildren("Expr"):[],n=y[i.type.id],o=n.argTypes.length;if(0===n.variadic)r.length!==o&&this.addDiagnostic(e,`expected ${o} argument(s) in call to "${n.name}", got ${r.length}`);else{let t=o-1;if(t>r.length)this.addDiagnostic(e,`expected at least ${t} argument(s) in call to "${n.name}", got ${r.length}`);else{let i=t+n.variadic;n.variadic>0&&i<r.length&&this.addDiagnostic(e,`expected at most ${i} argument(s) in call to "${n.name}", got ${r.length}`)}}"info"===n.name&&r.length>1&&r[1].getChild(69)&&this.addDiagnostic(e,`expected label selectors as the second argument to "info" function, got ${r[1].type}`);let s=0;for(let e=0;e<r.length;e++){if((s=e)>=n.argTypes.length){if(0===n.variadic)break;s=n.argTypes.length-1}this.expectType(r[e],n.argTypes[s],`call to function "${n.name}"`)}}checkAnchoredSmoothedExpr(e,t){var i,a;let r=S(e);if(r!==s.vector&&r!==s.matrix)return void this.addDiagnostic(e,`smoothed/anchored expression only allowed on instant vector or range vector selector, got ${r} instead`);let n=null==(i=e.parent)?void 0:i.parent;if(!n||66!==n.type.id)return;let o=null==(a=n.firstChild)?void 0:a.firstChild;o?t.includes(o.type.id)||this.addDiagnostic(e,"smoothed/anchored expression can only be used in specific functions"):this.addDiagnostic(e,"function not defined")}checkVectorSelector(e){let t=e.getChild(162),i=[];for(let e of[41,168,163])i=i.concat(_(t?t.getChildren(e):[],this.state));let a="",r=e.getChild(69);if(r&&(a=this.state.sliceDoc(r.from,r.to)),""!==a){let t=i.find(e=>"__name__"===e.name);t&&this.addDiagnostic(e,`metric name must not be set twice: ${a} or ${t.value}`),i.push(new b(165,"__name__",a))}else{let t=i.filter(e=>"__name__"===e.name);t.length>1&&this.addDiagnostic(e,`metric name must not be set twice: ${t[0].value} or ${t[1].value}`)}i.every(e=>e.matchesEmpty())&&this.addDiagnostic(e,"vector selector must contain at least one non-empty matcher")}expectType(e,t,i){let a=this.checkAST(e);a!==t&&this.addDiagnostic(e,`expected type ${t} in ${i}, got ${a}`)}addDiagnostic(e,t){this.diagnostics.push({severity:"error",message:t,from:e.from,to:e.to})}}var w=i(9714);let A=[{label:"y"},{label:"w"},{label:"d"},{label:"h"},{label:"m"},{label:"s"},{label:"ms"}],E=[{label:"^"},{label:"*"},{label:"/"},{label:"%"},{label:"+"},{label:"-"},{label:"=="},{label:">="},{label:">"},{label:"<"},{label:"</"},{label:">/"},{label:"<="},{label:"!="},{label:"atan2"},{label:"and"},{label:"or"},{label:"unless"}],C=[{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"}],R=[{label:"sum(rate(__input_vector__[5m]))",type:"function",detail:"snippet",info:"Sum over rates of increase",apply:(0,w.UA)("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:(0,w.UA)("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:(0,w.UA)('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:(0,w.UA)("topk(${__rank_number__}, ${__input_vector__})")},{label:"bottomk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Smallest k elements by sample value",apply:(0,w.UA)("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:(0,w.UA)('count_values("${__label_name__}", ${__metric__})')}],F=[{label:"="},{label:"!="},{label:"=~"},{label:"!~"}],D=[{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"}],M=[{label:"start()",info:"resolve to the start of the query",type:"keyword"},{label:"end()",info:"resolve to the end of the query",type:"keyword"}],q=[{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:"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:"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:"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"}],L=[{label:"by",info:"Keep the listed labels, remove all others.",type:"keyword"},{label:"without",info:"Remove the listed labels, preserve all others.",type:"keyword"}],z=[{label:"nan",info:"Floating-point NaN value",type:"constant"},{label:"inf",info:"Floating-point infinity",type:"constant"}];function W(e,t){let i=Q(e,161);return i&&(i=i.getChild(69))?t.sliceDoc(i.from,i.to):""}(n=c||(c={}))[n.MetricName=0]="MetricName",n[n.LabelName=1]="LabelName",n[n.LabelValue=2]="LabelValue",n[n.Function=3]="Function",n[n.Aggregation=4]="Aggregation",n[n.BinOpModifier=5]="BinOpModifier",n[n.BinOp=6]="BinOp",n[n.MatchOp=7]="MatchOp",n[n.AggregateOpModifier=8]="AggregateOpModifier",n[n.Duration=9]="Duration",n[n.Offset=10]="Offset",n[n.Bool=11]="Bool",n[n.AtModifiers=12]="AtModifiers",n[n.Number=13]="Number";let V=RegExp(`^(\\d+(${A.map(e=>e.label).join("|")}))+$`);function N(e,t){if(t.from>=t.to)return!1;let i=e.sliceDoc(t.from,t.to);return V.test(i)}function Y(e){var t;let i=e.parent;if(null!==i&&(null==(t=i.firstChild)?void 0:t.type.id)===37){let e=i.firstChild.firstChild;if(null!==e&&[21,9,16,17,11].includes(e.type.id))return!0}return!1}class U{constructor(e,t=1e4){this.prometheusClient=e,this.maxMetricsMetadata=t}getPrometheusClient(){return this.prometheusClient}destroy(){var e,t;null==(t=null==(e=this.prometheusClient)?void 0:e.destroy)||t.call(e)}promQL(e){let{state:t,pos:i}=e,a=(0,k.mv)(t).resolve(i,-1),r=function(e,t,i){var a,r,n,o,s,l,h,u,d,p,f,O,m,P,g,v,y,b,$,S,k;let x=[];switch(t.type.id){case 0:{if((null==(a=t.parent)?void 0:a.type.id)===154){x.push({kind:c.Duration});break}if((null==(r=t.parent)?void 0:r.type.id)===163||(null==(n=t.parent)?void 0:n.type.id)===168){x.push({kind:c.MatchOp});break}if((null==(o=t.parent)?void 0:o.type.id)===152||(null==(s=t.parent)?void 0:s.type.id)===158&&X(t.parent,153)){x.push({kind:c.Duration});break}let i=e.sliceDoc(t.from,t.to);E.filter(e=>e.label.includes(i)).length>0&&x.push({kind:c.BinOp});break}case 69:{if((null==(l=t.parent)?void 0:l.type.id)===0){let i=t.parent.parent;if((null==i?void 0:i.type.id)===169){x.push({kind:c.AtModifiers});break}if((null==i?void 0:i.type.id)===36){x.push({kind:c.AggregateOpModifier},{kind:c.BinOp});break}if((null==i?void 0:i.type.id)===161){let i=W(t,e);C.filter(e=>e.label===i).length>0&&x.push({kind:c.AggregateOpModifier}),x.push({kind:c.BinOp},{kind:c.Offset});break}if(i&&T(i,"Expr")){x.push({kind:c.BinOp},{kind:c.Offset});break}}let i=null==(h=t.parent)?void 0:h.parent;if(!i){x.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)});break}T(i,"Expr","Expr")&&43!==i.type.id?44!==i.type.id||X(i,0)||(x.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:c.Function},{kind:c.Aggregation},{kind:c.BinOpModifier},{kind:c.Number}),X(i,58,59,60,63,64,65)&&!X(i,46)&&x.push({kind:c.Bool})):(x.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:c.Function},{kind:c.Aggregation}),43!==i.type.id&&152!==i.type.id&&x.push({kind:c.Number}));break}case 35:null!==t.firstChild&&0===t.firstChild.type.id&&x.push({kind:c.MetricName,metricName:""},{kind:c.Function},{kind:c.Aggregation},{kind:c.Number});break;case 39:x.push({kind:c.LabelName,metricName:function(e,t){let i=Q(e,36);if(!i)return"";let a="";return i.cursor().iterate(e=>{if(161===e.type.id&&(a=W(e.node,t)))return!1}),a}(t,e)});break;case 162:if(i>=t.to)break;x.push({kind:c.LabelName,metricName:W(t,e)});break;case 40:(null==(u=t.parent)?void 0:u.type.id)===39?x.push({kind:c.LabelName}):(null==(d=t.parent)?void 0:d.type.id)===163&&x.push({kind:c.LabelName,metricName:W(t,e)});break;case 42:if((null==(p=t.parent)?void 0:p.type.id)===163||(null==(f=t.parent)?void 0:f.type.id)===168){let i="";(null==(O=t.parent.firstChild)?void 0:O.type.id)===40?i=e.sliceDoc(t.parent.firstChild.from,t.parent.firstChild.to):(null==(m=t.parent.firstChild)?void 0:m.type.id)===41&&(i=e.sliceDoc(t.parent.firstChild.from,t.parent.firstChild.to).slice(1,-1));let a=W(t,e),r=Q(t,162),n=[];for(let t of[41,168,163])n=n.concat(_(r?r.getChildren(t):[],e));x.push({kind:c.LabelValue,metricName:a,labelName:i,matchers:n})}else(null==(g=null==(P=t.parent)?void 0:P.parent)?void 0:g.type.id)===39?x.push({kind:c.LabelName}):(null==(y=null==(v=t.parent)?void 0:v.parent)?void 0:y.type.id)===162&&x.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to).slice(1,-1)});break;case 50:(null==(b=t.parent)?void 0:b.type.id)===0&&(null==($=t.parent.parent)?void 0:$.type.id)===158?N(e,t)||x.push({kind:c.Duration}):x.push({kind:c.Number});break;case 153:N(e,t)||x.push({kind:c.Duration});break;case 154:x.push({kind:c.Duration});break;case 43:if(Y(t)){if(null===t.firstChild||t.firstChild.from<=i&&t.firstChild.to>=i){x.push({kind:c.Number});break}x.push({kind:c.MetricName,metricName:""},{kind:c.Function},{kind:c.Aggregation});break}x.push({kind:c.MetricName,metricName:""},{kind:c.Function},{kind:c.Aggregation});break;case 65:(null==(S=t.parent)?void 0:S.type.id)===164?x.push({kind:c.MatchOp}):(null==(k=t.parent)?void 0:k.type.id)===44&&x.push({kind:c.BinOp});break;case 165:case 166:case 167:case 164:x.push({kind:c.MatchOp});break;case 45:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 62:case 61:case 63:case 64:case 24:case 26:case 25:case 44:x.push({kind:c.BinOp})}return x}(t,a,i),n=Promise.resolve([]),o=!1,s=!0;for(let e of r)switch(e.kind){case c.Aggregation:o=!0,n=n.then(e=>e.concat(C));break;case c.Function:o=!0,n=n.then(e=>e.concat(q));break;case c.BinOpModifier:n=n.then(e=>e.concat(D));break;case c.BinOp:n=n.then(e=>e.concat(E));break;case c.MatchOp:n=n.then(e=>e.concat(F));break;case c.AggregateOpModifier:n=n.then(e=>e.concat(L));break;case c.Duration:s=!1,n=n.then(e=>e.concat(A));break;case c.Offset:n=n.then(e=>e.concat([{label:"offset"}]));break;case c.Bool:n=n.then(e=>e.concat([{label:"bool"}]));break;case c.AtModifiers:n=n.then(e=>e.concat(M));break;case c.Number:n=n.then(e=>e.concat(z));break;case c.MetricName:n=n.then(t=>this.autocompleteMetricName(t,e));break;case c.LabelName:n=n.then(t=>this.autocompleteLabelName(t,e));break;case c.LabelValue:n=n.then(t=>this.autocompleteLabelValue(t,e))}return n.then(e=>{var r,n;return function(e,t,i,a=!1,r=!0){return a&&e.push(...R),{from:t,to:i,options:e,validFor:r?/^[a-zA-Z0-9_:]+$/:void 0}}(e,function(e,t,i){var a,r,n,o,s,l,c;let h=e.doc.slice(t.from,i).toString(),u=t.from;if(162===t.type.id||39===t.type.id){let e;e=t.from+1,null!==t.firstChild&&(e=i),u=e}else 43===t.type.id&&null===t.firstChild||42===t.type.id&&((null==(a=t.parent)?void 0:a.type.id)===163||(null==(r=t.parent)?void 0:r.type.id)===168)?u++:(154===t.type.id||153===t.type.id&&!A.map(e=>e.label).includes(h[h.length-1])||50===t.type.id&&(null==(n=t.parent)?void 0:n.type.id)===0&&(null==(o=t.parent.parent)?void 0:o.type.id)===158||43===t.type.id&&Y(t)&&null!==t.firstChild||0===t.type.id&&((null==(s=t.parent)?void 0:s.type.id)===154||(null==(l=t.parent)?void 0:l.type.id)===152||(null==(c=t.parent)?void 0:c.type.id)===158&&X(t.parent,153)))&&(u=i);return u}(t,a,i),0===a.type.id?i:162===a.type.id||39===a.type.id||43===a.type.id||152===a.type.id||158===a.type.id?a.to-1:42===a.type.id&&((null==(r=a.parent)?void 0:r.type.id)===163||(null==(n=a.parent)?void 0:n.type.id)===168)?a.parent.to-1:a.to,o,s)})}autocompleteMetricName(e,t){if(!this.prometheusClient)return e;let i=new Map;return this.prometheusClient.metricNames(t.metricName).then(e=>{var t;for(let t of e)i.set(t,{label:t,type:"constant"});if(e.length<=this.maxMetricsMetadata)return null==(t=this.prometheusClient)?void 0:t.metricMetadata()}).then(t=>{var a;if(t)for(let[e,r]of i){let i=null!=(a=t[e])?a:t[e.replace(/(_count|_sum|_bucket|_total)$/,"")];if(i){if(i.length>1)for(let e of i)""===r.detail?r.detail=e.type:r.detail!==e.type&&(r.detail="unknown",r.info="multiple different definitions for this metric"),""===r.info?r.info=e.help:r.info!==e.help&&(r.info="multiple different definitions for this metric");else if(1===i.length){let{type:t,help:a}=i[0];("histogram"===t||"summary"===t)&&(e.endsWith("_count")&&(t="counter",a=`The total number of observations for: ${a}`),e.endsWith("_sum")&&(t="counter",a=`The total sum of observations for: ${a}`),e.endsWith("_bucket")&&(t="counter",a=`The total count of observations for a bucket in the histogram: ${a}`)),r.detail=t,r.info=a}}}return e.concat(Array.from(i.values()))})}autocompleteLabelName(e,t){return this.prometheusClient?this.prometheusClient.labelNames(t.metricName).then(t=>e.concat(t.map(e=>({label:e,type:"constant"})))):e}autocompleteLabelValue(e,t){return this.prometheusClient&&t.labelName?this.prometheusClient.labelValues(t.labelName,t.metricName,t.matchers).then(t=>e.concat(t.map(e=>({label:e,type:"text"})))):e}}var G={hasSubscribers:!1},j="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,Z=new Set,H="object"==typeof process&&process?process:{},I=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),B=e=>I(e)?e<=256?Uint8Array:e<=65536?Uint16Array:e<=0x100000000?Uint32Array:e<=Number.MAX_SAFE_INTEGER?J:null:null,J=class extends Array{constructor(e){super(e),this.fill(0)}},K=class e{heap;length;static #e=!1;static create(t){let i=B(t);if(!i)return[];e.#e=!0;let a=new e(t,i);return e.#e=!1,a}constructor(t,i){if(!e.#e)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},ee=class e{#e;#t;#i;#a;#r;#n;#o;#s;get perf(){return this.#s}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#c;#h;#u;#d;#p;#f;#O;#m;#P;#g;#v;#y;#b;#_;#$;#Q;#X;#T;static unsafeExposeInternals(e){return{starts:e.#y,ttls:e.#b,autopurgeTimers:e.#_,sizes:e.#v,keyMap:e.#h,keyList:e.#u,valList:e.#d,next:e.#p,prev:e.#f,get head(){return e.#O},get tail(){return e.#m},free:e.#P,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,i,a,r)=>e.#k(t,i,a,r),moveToTail:t=>e.#x(t),indexes:t=>e.#w(t),rindexes:t=>e.#A(t),isStale:t=>e.#E(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#l}get fetchMethod(){return this.#n}get memoMethod(){return this.#o}get dispose(){return this.#i}get onInsert(){return this.#a}get disposeAfter(){return this.#r}constructor(t){let{max:i=0,ttl:a,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:l,dispose:c,onInsert:h,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:p,maxSize:f=0,maxEntrySize:O=0,sizeCalculation:m,fetchMethod:P,memoMethod:g,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:_,ignoreFetchAbort:$,perf:Q}=t;if(void 0!==Q&&"function"!=typeof Q?.now)throw TypeError("perf option must have a now() method if specified");if(this.#s=Q??j,0!==i&&!I(i))throw TypeError("max option must be a nonnegative integer");let X=i?B(i):Array;if(!X)throw Error("invalid max value: "+i);if(this.#e=i,this.#t=f,this.maxEntrySize=O||this.#t,this.sizeCalculation=m,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==g&&"function"!=typeof g)throw TypeError("memoMethod must be a function if defined");if(this.#o=g,void 0!==P&&"function"!=typeof P)throw TypeError("fetchMethod must be a function if specified");if(this.#n=P,this.#Q=!!P,this.#h=new Map,this.#u=Array.from({length:i}).fill(void 0),this.#d=Array.from({length:i}).fill(void 0),this.#p=new X(i),this.#f=new X(i),this.#O=0,this.#m=0,this.#P=K.create(i),this.#l=0,this.#c=0,"function"==typeof c&&(this.#i=c),"function"==typeof h&&(this.#a=h),"function"==typeof u?(this.#r=u,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#$=!!this.#i,this.#T=!!this.#a,this.#X=!!this.#r,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!$,0!==this.maxEntrySize){if(0!==this.#t&&!I(this.#t))throw TypeError("maxSize must be a positive integer if specified");if(!I(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#C()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=I(r)||0===r?r:1,this.ttlAutopurge=!!n,this.ttl=a||0,this.ttl){if(!I(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#R()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";(e=>!Z.has(e))(t)&&(Z.add(t),((e,t,i,a)=>{"function"==typeof H.emitWarning?H.emitWarning(e,t,i,a):console.error(`[${i}] ${t}: ${e}`)})("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}}getRemainingTTL(e){return this.#h.has(e)?1/0:0}#R(){let e=new J(this.#e),t=new J(this.#e);this.#b=e,this.#y=t;let i=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=i,this.#F=(i,r,n=this.#s.now())=>{t[i]=0!==r?n:0,e[i]=r,a(i,r)},this.#D=i=>{t[i]=0!==e[i]?this.#s.now():0,a(i,e[i])};let a=this.ttlAutopurge?(e,t)=>{if(i?.[e]&&(clearTimeout(i[e]),i[e]=void 0),t&&0!==t&&i){let a=setTimeout(()=>{this.#E(e)&&this.#M(this.#u[e],"expire")},t+1);a.unref&&a.unref(),i[e]=a}}:()=>{};this.#q=(i,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;i.ttl=o,i.start=s,i.now=r||n();let l=i.now-s;i.remainingTTL=o-l}};let r=0,n=()=>{let e=this.#s.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=i=>{let a=this.#h.get(i);if(void 0===a)return 0;let o=e[a],s=t[a];return o&&s?o-((r||n())-s):1/0},this.#E=i=>{let a=t[i],o=e[i];return!!o&&!!a&&(r||n())-a>o}}#D=()=>{};#q=()=>{};#F=()=>{};#E=()=>!1;#C(){let e=new J(this.#e);this.#c=0,this.#v=e,this.#L=t=>{this.#c-=e[t],e[t]=0},this.#z=(e,t,i,a)=>{if(this.#S(t))return 0;if(!I(i))if(a){if("function"!=typeof a)throw TypeError("sizeCalculation must be a function");if(!I(i=a(t,e)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#W=(t,i,a)=>{if(e[t]=i,this.#t){let i=this.#t-e[t];for(;this.#c>i;)this.#V(!0)}this.#c+=e[t],a&&(a.entrySize=i,a.totalCalculatedSize=this.#c)}}#L=e=>{};#W=(e,t,i)=>{};#z=(e,t,i,a)=>{if(i||a)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#m;this.#N(t)&&((e||!this.#E(t))&&(yield t),t!==this.#O);)t=this.#f[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#O;this.#N(t)&&((e||!this.#E(t))&&(yield t),t!==this.#m);)t=this.#p[t]}#N(e){return void 0!==e&&this.#h.get(this.#u[e])===e}*entries(){for(let e of this.#w())void 0===this.#d[e]||void 0===this.#u[e]||this.#S(this.#d[e])||(yield[this.#u[e],this.#d[e]])}*rentries(){for(let e of this.#A())void 0===this.#d[e]||void 0===this.#u[e]||this.#S(this.#d[e])||(yield[this.#u[e],this.#d[e]])}*keys(){for(let e of this.#w()){let t=this.#u[e];void 0===t||this.#S(this.#d[e])||(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#u[e];void 0===t||this.#S(this.#d[e])||(yield t)}}*values(){for(let e of this.#w())void 0===this.#d[e]||this.#S(this.#d[e])||(yield this.#d[e])}*rvalues(){for(let e of this.#A())void 0===this.#d[e]||this.#S(this.#d[e])||(yield this.#d[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#w()){let a=this.#d[i],r=this.#S(a)?a.__staleWhileFetching:a;if(void 0!==r&&e(r,this.#u[i],this))return this.#Y(this.#u[i],t)}}forEach(e,t=this){for(let i of this.#w()){let a=this.#d[i],r=this.#S(a)?a.__staleWhileFetching:a;void 0!==r&&e.call(t,r,this.#u[i],this)}}rforEach(e,t=this){for(let i of this.#A()){let a=this.#d[i],r=this.#S(a)?a.__staleWhileFetching:a;void 0!==r&&e.call(t,r,this.#u[i],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#E(t)&&(this.#M(this.#u[t],"expire"),e=!0);return e}info(e){let t=this.#h.get(e);if(void 0===t)return;let i=this.#d[t],a=this.#S(i)?i.__staleWhileFetching:i;if(void 0===a)return;let r={value:a};if(this.#b&&this.#y){let e=this.#b[t],i=this.#y[t];e&&i&&(r.ttl=e-(this.#s.now()-i),r.start=Date.now())}return this.#v&&(r.size=this.#v[t]),r}dump(){let e=[];for(let t of this.#w({allowStale:!0})){let i=this.#u[t],a=this.#d[t],r=this.#S(a)?a.__staleWhileFetching:a;if(void 0===r||void 0===i)continue;let n={value:r};if(this.#b&&this.#y){n.ttl=this.#b[t];let e=this.#s.now()-this.#y[t];n.start=Math.floor(Date.now()-e)}this.#v&&(n.size=this.#v[t]),e.unshift([i,n])}return e}load(e){for(let[t,i]of(this.clear(),e)){if(i.start){let e=Date.now()-i.start;i.start=this.#s.now()-e}this.#U(t,i.value,i)}}set(e,t,i={}){let{status:a=G.hasSubscribers?{}:void 0}=i;i.status=a,a&&(a.op="set",a.key=e,void 0!==t&&(a.value=t),a.cache=this);let r=this.#U(e,t,i);return a&&G.hasSubscribers&&G.publish(a),r}#U(e,t,i,a){let{ttl:r=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=i;if(void 0===t)return l&&(l.set="deleted"),this.delete(e),this;let{noUpdateTTL:c=this.noUpdateTTL}=i,h=this.#S(t);l&&!h&&(l.value=t);let u=this.#z(e,t,i.size||0,s,l);if(this.maxEntrySize&&u>this.maxEntrySize)return this.#M(e,"set"),l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this;let d=0===this.#l?void 0:this.#h.get(e);if(void 0===d)d=0===this.#l?this.#m:0!==this.#P.length?this.#P.pop():this.#l===this.#e?this.#V(!1):this.#l,this.#u[d]=e,this.#d[d]=t,this.#h.set(e,d),this.#p[this.#m]=d,this.#f[d]=this.#m,this.#m=d,this.#l++,this.#W(d,u,l),l&&(l.set="add"),c=!1,this.#T&&!h&&this.#a?.(t,e,"add");else{this.#x(d);let i=this.#d[d];if(t!==i){if(!o)if(this.#S(i)){i!==a&&i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:r}=i;void 0!==r&&r!==t&&(this.#$&&this.#i?.(r,e,"set"),this.#X&&this.#g?.push([r,e,"set"]))}else this.#$&&this.#i?.(i,e,"set"),this.#X&&this.#g?.push([i,e,"set"]);if(this.#L(d),this.#W(d,u,l),this.#d[d]=t,!h){let a=i&&this.#S(i)?i.__staleWhileFetching:i,r=void 0===a?"add":t!==a?"replace":"update";l&&(l.set=r,void 0!==a&&(l.oldValue=a)),this.#T&&this.onInsert?.(t,e,r)}}else h||(l&&(l.set="update"),this.#T&&this.onInsert?.(t,e,"update"))}if(0===r||this.#b||this.#R(),this.#b&&(c||this.#F(d,r,n),l&&this.#q(l,d)),!o&&this.#X&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#l;){let e=this.#d[this.#O];if(this.#V(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#X&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#V(e){let t=this.#O,i=this.#u[t],a=this.#d[t],r=this.#S(a);r&&a.__abortController.abort(Error("evicted"));let n=r?a.__staleWhileFetching:a;return(this.#$||this.#X)&&void 0!==n&&(this.#$&&this.#i?.(n,i,"evict"),this.#X&&this.#g?.push([n,i,"evict"])),this.#L(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#u[t]=void 0,this.#d[t]=void 0,this.#P.push(t)),1===this.#l?(this.#O=this.#m=0,this.#P.length=0):this.#O=this.#p[t],this.#h.delete(i),this.#l--,t}has(e,t={}){let{status:i=G.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let a=this.#G(e,t);return G.hasSubscribers&&G.publish(i),a}#G(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:a}=t,r=this.#h.get(e);if(void 0!==r){let e=this.#d[r];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#E(r))return i&&this.#D(r),a&&(a.has="hit",this.#q(a,r)),!0;a&&(a.has="stale",this.#q(a,r))}else a&&(a.has="miss");return!1}peek(e,t={}){let{status:i=G.hasSubscribers||G.hasSubscribers?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let a=this.#j(e,t);return G.hasSubscribers&&G.publish(i),a}#j(e,t){let{status:i,allowStale:a=this.allowStale}=t,r=this.#h.get(e);if(void 0===r||!a&&this.#E(r)){i&&(i.peek=void 0===r?"miss":"stale");return}let n=this.#d[r],o=this.#S(n)?n.__staleWhileFetching:n;return i&&(void 0!==o?(i.peek="hit",i.value=o):i.peek="miss"),o}#k(e,t,i,a){let r=void 0===t?void 0:this.#d[t];if(this.#S(r))return r;let n=new AbortController,{signal:o}=i;o?.addEventListener("abort",()=>n.abort(o.reason),{signal:n.signal});let s={signal:n.signal,options:i,context:a},l=(a,r=!1)=>{let{aborted:o}=n.signal,l=i.ignoreFetchAbort&&void 0!==a,h=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&void 0!==a);if(i.status&&(o&&!r?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,l&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!l&&!r)return c(n.signal.reason,h);let d=this.#d[t];return(d===u||void 0===d&&l&&r)&&(void 0===a?void 0!==u.__staleWhileFetching?this.#d[t]=u.__staleWhileFetching:this.#M(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#U(e,a,s.options,u))),a},c=(a,r)=>{let{aborted:o}=n.signal,s=o&&i.allowStaleOnFetchAbort,l=s||i.allowStaleOnFetchRejection,c=l||i.noDeleteOnFetchRejection;if(this.#d[t]===u&&(c&&(r||void 0!==u.__staleWhileFetching)?s||(this.#d[t]=u.__staleWhileFetching):this.#M(e,"fetch")),l)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw a},h=(t,a)=>{let o=this.#n?.(e,r,s);n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(t(void 0),i.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}),o&&o instanceof Promise?o.then(e=>t(void 0===e?void 0:e),a):void 0!==o&&t(o)};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(h).then(l,e=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=e),c(e,!1))),d=Object.assign(u,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===t?(this.#U(e,d,{...s.options,status:void 0}),t=this.#h.get(e)):this.#d[t]=d,d}#S(e){return!!this.#Q&&!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(e,t={}){let i=G.hasSubscribers,{status:a=G.hasSubscribers||G.hasSubscribers?{}:void 0}=t;t.status=a,a&&t.context&&(a.context=t.context);let r=this.#Z(e,t);return a&&i&&(a.trace=!0,G.tracePromise(()=>r,a).catch(()=>{})),r}async #Z(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:O=!1,status:m,signal:P}=t;if(m&&(m.op="fetch",m.key=e,O&&(m.forceRefresh=!0),m.cache=this),!this.#Q)return m&&(m.fetch="get"),this.#Y(e,{allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:r,status:m});let g={allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:s,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:m,signal:P},v=this.#h.get(e);if(void 0===v){m&&(m.fetch="miss");let t=this.#k(e,v,g,f);return t.__returned=t}{let t=this.#d[v];if(this.#S(t)){let e=i&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let r=this.#E(v);if(!O&&!r)return m&&(m.fetch="hit"),this.#x(v),a&&this.#D(v),m&&this.#q(m,v),t;let n=this.#k(e,v,g,f),o=void 0!==n.__staleWhileFetching&&i;return m&&(m.fetch=r?"stale":"refresh",o&&r&&(m.returnedStale=!0)),o?n.__staleWhileFetching:n.__returned=n}}forceFetch(e,t={}){let i=G.hasSubscribers,{status:a=G.hasSubscribers||G.hasSubscribers?{}:void 0}=t;t.status=a,a&&t.context&&(a.context=t.context);let r=this.#H(e,t);return a&&i&&(a.trace=!0,G.tracePromise(()=>r,a).catch(()=>{})),r}async #H(e,t={}){let i=await this.#Z(e,t);if(void 0===i)throw Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=G.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let a=this.#I(e,t);return i&&(i.value=a),G.hasSubscribers&&G.publish(i),a}#I(e,t={}){let i=this.#o;if(!i)throw Error("no memoMethod provided to constructor");let{context:a,status:r,forceRefresh:n,...o}=t;r&&n&&(r.forceRefresh=!0);let s=this.#Y(e,o),l=n||void 0===s;if(r&&(r.memo=l?"miss":"hit",l||(r.value=s)),!l)return s;let c=i(e,s,{options:o,context:a});return r&&(r.value=c),this.#U(e,c,o),c}get(e,t={}){let{status:i=G.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let a=this.#Y(e,t);return i&&(void 0!==a&&(i.value=a),G.hasSubscribers&&G.publish(i)),a}#Y(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=t,o=this.#h.get(e);if(void 0===o){n&&(n.get="miss");return}let s=this.#d[o],l=this.#S(s);return n&&this.#q(n,o),this.#E(o)?l?(n&&(n.get="stale-fetching"),i&&void 0!==s.__staleWhileFetching?(n&&(n.returnedStale=!0),s.__staleWhileFetching):void 0):(r||this.#M(e,"expire"),n&&(n.get="stale"),i?(n&&(n.returnedStale=!0),s):void 0):(n&&(n.get=l?"fetching":"hit"),this.#x(o),a&&this.#D(o),l?s.__staleWhileFetching:s)}#B(e,t){this.#f[t]=e,this.#p[e]=t}#x(e){e!==this.#m&&(e===this.#O?this.#O=this.#p[e]:this.#B(this.#f[e],this.#p[e]),this.#B(this.#m,e),this.#m=e)}delete(e){return this.#M(e,"delete")}#M(e,t){G.hasSubscribers&&G.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(0!==this.#l){let a=this.#h.get(e);if(void 0!==a)if(this.#_?.[a]&&(clearTimeout(this.#_?.[a]),this.#_[a]=void 0),i=!0,1===this.#l)this.#J(t);else{this.#L(a);let i=this.#d[a];if(this.#S(i)?i.__abortController.abort(Error("deleted")):(this.#$||this.#X)&&(this.#$&&this.#i?.(i,e,t),this.#X&&this.#g?.push([i,e,t])),this.#h.delete(e),this.#u[a]=void 0,this.#d[a]=void 0,a===this.#m)this.#m=this.#f[a];else if(a===this.#O)this.#O=this.#p[a];else{let e=this.#f[a];this.#p[e]=this.#p[a];let t=this.#p[a];this.#f[t]=this.#f[a]}this.#l--,this.#P.push(a)}}if(this.#X&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return i}clear(){return this.#J("delete")}#J(e){for(let t of this.#A({allowStale:!0})){let i=this.#d[t];if(this.#S(i))i.__abortController.abort(Error("deleted"));else{let a=this.#u[t];this.#$&&this.#i?.(i,a,e),this.#X&&this.#g?.push([i,a,e])}}if(this.#h.clear(),this.#d.fill(void 0),this.#u.fill(void 0),this.#b&&this.#y){for(let e of(this.#b.fill(0),this.#y.fill(0),this.#_??[]))void 0!==e&&clearTimeout(e);this.#_?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#O=0,this.#m=0,this.#P.length=0,this.#c=0,this.#l=0,this.#X&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}};class et{constructor(e){this.httpMethod="POST",this.apiPrefix="/api/v1",this.fetchFn=(e,t)=>fetch(e,t),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){let t=new URLSearchParams;if(this.lookbackInterval){let e=new Date,i=new Date(e.getTime()-this.lookbackInterval);t.set("start",i.toISOString()),t.set("end",e.toISOString())}e&&e.length>0&&t.set("match[]",$(e));let i=this.buildRequest(this.labelsEndpoint(),t);return this.fetchAPI(i.uri,{method:this.httpMethod,body:i.body}).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}labelValues(e,t,i){let a=new URLSearchParams;if(this.lookbackInterval){let e=new Date,t=new Date(e.getTime()-this.lookbackInterval);a.set("start",t.toISOString()),a.set("end",e.toISOString())}return t&&t.length>0&&a.set("match[]",$(t,i,e)),this.fetchAPI(`${this.labelValuesEndpoint().replace(/:name/gi,e)}?${a}`).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}metricMetadata(){return this.fetchAPI(this.metricMetadataEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}series(e,t,i){let a=new URLSearchParams;if(this.lookbackInterval){let e=new Date,t=new Date(e.getTime()-this.lookbackInterval);a.set("start",t.toISOString()),a.set("end",e.toISOString())}a.set("match[]",$(e,t,i));let r=this.buildRequest(this.seriesEndpoint(),a);return this.fetchAPI(r.uri,{method:this.httpMethod,body:r.body}).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}metricNames(){return this.labelValues("__name__")}flags(){return this.fetchAPI(this.flagsEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}destroy(){for(let e of this.abortControllers)e.abort();this.abortControllers.clear()}fetchAPI(e,t){let i=new AbortController;return this.abortControllers.add(i),t?(t.headers=this.requestHeaders,t.signal=i.signal):t={headers:this.requestHeaders,signal:i.signal},this.fetchFn(this.url+e,t).then(e=>{if(!e.ok&&![400,422,503].includes(e.status))throw Error(e.statusText);return e}).then(e=>e.json()).then(e=>{if("error"===e.status)throw Error(void 0!==e.error?e.error:'missing "error" field in response JSON');if(void 0===e.data)throw Error('missing "data" field in response JSON');return e.data}).finally(()=>{this.abortControllers.delete(i)})}buildRequest(e,t){let i=e,a=t;return"GET"===this.httpMethod&&(i=`${i}?${t}`,a=null),{uri:i,body:a}}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 ei{constructor(e){const t={ttl:e&&e.maxAge?e.maxAge:3e5,ttlAutopurge:!0};this.completeAssociation=new ee(t),this.metricMetadata={},this.labelValues=new ee(t),this.labelNames=[],this.flags={},(null==e?void 0:e.initialMetricList)&&this.setLabelValues("__name__",e.initialMetricList)}getAssociations(e){let t=this.completeAssociation.get(e);return t||(t=new Map,this.completeAssociation.set(e,t)),t}setAssociations(e,t){t.forEach(t=>{let i=this.getAssociations(e);for(let[e,a]of Object.entries(t)){if("__name__"===e)continue;let t=i.get(e);void 0===t?i.set(e,new Set([a])):t.add(a)}})}setLabelValuesAssociation(e,t,i){let a=this.getAssociations(e),r=a.get(t);void 0===r?a.set(t,new Set(i)):i.forEach(e=>{r.add(e)})}setLabelNamesAssociation(e,t){let i=this.getAssociations(e);t.forEach(e=>{"__name__"!==e&&(i.has(e)||i.set(e,new Set))})}setFlags(e){this.flags=e}getFlags(){return this.flags}setMetricMetadata(e){this.metricMetadata=e}getMetricMetadata(){return this.metricMetadata}setLabelNames(e,t){t&&t.length>0&&this.setLabelNamesAssociation(t,e),this.labelNames=e}getLabelNames(e){if(!e||0===e.length)return this.labelNames;let t=this.completeAssociation.get(e);return t?Array.from(t.keys()):[]}setLabelValues(e,t,i){i&&i.length>0&&this.setLabelValuesAssociation(i,e,t),this.labelValues.set(e,t)}getLabelValues(e,t){if(!t||0===t.length)return this.labelValues.get(e)||[];let i=this.completeAssociation.get(t);if(i){let t=i.get(e);return t?Array.from(t):[]}return[]}}class ea{constructor(e,t){this.client=e,this.cache=new ei(t)}labelNames(e){let t=this.cache.getLabelNames(e);return t&&t.length>0?Promise.resolve(t):this.client.labelNames(e).then(t=>(this.cache.setLabelNames(t,e),this.cache.getLabelNames(e)))}labelValues(e,t){let i=this.cache.getLabelValues(e,t);return i&&i.length>0?Promise.resolve(i):this.client.labelValues(e,t).then(i=>(this.cache.setLabelValues(e,i,t),i))}metricMetadata(){let e=this.cache.getMetricMetadata();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.metricMetadata().then(e=>(this.cache.setMetricMetadata(e),e))}series(e){return this.client.series(e).then(t=>(this.cache.setAssociations(e,t),t))}metricNames(){return this.labelValues("__name__")}flags(){let e=this.cache.getFlags();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.flags().then(e=>(this.cache.setFlags(e),e))}destroy(){var e,t;null==(t=(e=this.client).destroy)||t.call(e)}}function er(e){if(null==e?void 0:e.completeStrategy)return e.completeStrategy;if(null==e?void 0:e.remote){var t;return"function"==typeof(t=e.remote).labelNames&&"function"==typeof t.labelValues&&"function"==typeof t.metricMetadata&&"function"==typeof t.series&&"function"==typeof t.metricNames?new U(e.remote,e.maxMetricsMetadata):new U(new ea(new et(e.remote),e.remote.cache),e.maxMetricsMetadata)}return new U}var en=i(13313);class eo{promQL(){return e=>{let t=new x(e.state);return t.analyze(),t.getDiagnostics()}}}(o=h||(h={})).PromQL="PromQL",o.MetricName="MetricName";class es{constructor(){this.complete=er(),this.lint=new eo,this.enableLinter=!0,this.enableCompletion=!0}setComplete(e){return this.complete=er(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,t;null==(t=(e=this.complete).destroy)||t.call(e)}asExtension(e=h.PromQL){var t,i;let a=k.bj.define({parser:v.configure({top:e}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}}),r=[a];if(this.enableCompletion){let e=a.data.of({autocomplete:e=>this.complete.promQL(e)});r=r.concat(e)}return this.enableLinter&&(r=r.concat((t=this.lint.promQL,i=this.lint,(0,en.bu)(t.call(i))))),r}}}}]);
|