From 0a74ffee1e46b4b39fd3787892d6f6688fb40333 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Fri, 8 May 2026 13:38:32 +0200 Subject: [PATCH] make vmui-update --- .../{index-fsxQMWD9.js => index-C7gvW_Zn.js} | 6 ++--- ...{vendor-BF3F25aG.js => vendor-C8Kwp93_.js} | 24 +++++++++---------- app/vmselect/vmui/index.html | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) rename app/vmselect/vmui/assets/{index-fsxQMWD9.js => index-C7gvW_Zn.js} (99%) rename app/vmselect/vmui/assets/{vendor-BF3F25aG.js => vendor-C8Kwp93_.js} (95%) diff --git a/app/vmselect/vmui/assets/index-fsxQMWD9.js b/app/vmselect/vmui/assets/index-C7gvW_Zn.js similarity index 99% rename from app/vmselect/vmui/assets/index-fsxQMWD9.js rename to app/vmselect/vmui/assets/index-C7gvW_Zn.js index 264bc2d288..83c82d6dc9 100644 --- a/app/vmselect/vmui/assets/index-fsxQMWD9.js +++ b/app/vmselect/vmui/assets/index-C7gvW_Zn.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-BF3F25aG.js","./rolldown-runtime-COnpUsM8.js","./vendor-CnsZ1jie.css"])))=>i.map(i=>d[i]); -import{a as e,r as t}from"./rolldown-runtime-COnpUsM8.js";import{A as n,B as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,R as m,S as h,T as g,V as _,_ as v,a as y,b,c as x,d as S,f as C,g as w,h as T,i as E,j as D,k as O,l as k,m as A,n as j,o as M,p as N,r as P,s as F,u as I,v as ee,w as te,x as ne,y as re,z as ie}from"./vendor-BF3F25aG.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),r(),a();var L=e(i(),1),ae=e(h(),1),oe=e(ne(),1),se=e(b(),1),ce=e(re(),1);L.default.extend(ae.default),L.default.extend(oe.default),L.default.extend(ce.default),L.default.extend(se.default);var R={home:`/`,metrics:`/metrics`,dashboards:`/dashboards`,cardinality:`/cardinality`,topQueries:`/top-queries`,trace:`/trace`,withTemplate:`/expand-with-exprs`,relabel:`/relabeling`,activeQueries:`/active-queries`,queryAnalyzer:`/query-analyzer`,icons:`/icons`,query:`/query`,rawQuery:`/raw-query`,downsamplingDebug:`/downsampling-filters-debug`,retentionDebug:`/retention-filters-debug`,rules:`/rules`,notifiers:`/notifiers`},le={header:{tenant:!0,stepControl:!0,timeSelector:!0,executionControls:{tooltip:`Refresh dashboard`,useAutorefresh:!0}}},ue={[R.home]:{title:`Query`,...le},[R.rawQuery]:{title:`Raw query`,header:{tenant:!0,stepControl:!1,timeSelector:!0,executionControls:{tooltip:`Refresh dashboard`,useAutorefresh:!0}}},[R.metrics]:{title:`Explore Prometheus metrics`,header:{tenant:!0,stepControl:!0,timeSelector:!0}},[R.cardinality]:{title:`Explore cardinality`,header:{tenant:!0,cardinalityDatePicker:!0}},[R.topQueries]:{title:`Top queries`,header:{tenant:!0}},[R.trace]:{title:`Trace analyzer`,header:{}},[R.queryAnalyzer]:{title:`Query analyzer`,header:{}},[R.dashboards]:{title:`Dashboards`,...le},[R.rules]:{title:`Rules`,header:{executionControls:{tooltip:`Refresh alerts`,useAutorefresh:!1}}},[R.notifiers]:{title:`Notifiers`,header:{executionControls:{tooltip:`Refresh notifiers`,useAutorefresh:!1}}},[R.withTemplate]:{title:`WITH templates`,header:{}},[R.relabel]:{title:`Metric relabel debug`,header:{}},[R.activeQueries]:{title:`Active Queries`,header:{}},[R.icons]:{title:`Icons`,header:{}},[R.query]:{title:`Query`,...le},[R.downsamplingDebug]:{title:`Downsampling filters debug`,header:{}},[R.retentionDebug]:{title:`Retention filters debug`,header:{}}},de=()=>{let e=document.getElementById(`root`)?.dataset.params||`{}`;try{return JSON.parse(e)}catch(e){return console.error(e),{}}},fe=()=>!!Object.keys(de()).length,pe=`VMUI:`,me=[`AUTOCOMPLETE`,`NO_CACHE`,`QUERY_TRACING`,`SERIES_LIMITS`,`LEGEND_AUTO_COLLAPSE`,`TABLE_COMPACT`,`TIMEZONE`,`DISABLED_DEFAULT_TIMEZONE`,`THEME`,`EXPLORE_METRICS_TIPS`,`METRICS_QUERY_HISTORY`,`SERVER_URL`,`POINTS_SHOW_ALL`],he=e=>`${pe}${e}`,ge=(e,t,n=!0)=>{try{let r=n?he(e):e;t?window.localStorage.setItem(r,JSON.stringify({value:t})):window.localStorage.removeItem(r),window.dispatchEvent(new Event(`storage`))}catch(e){console.error(e)}},z=(e,t=!0)=>{let n=t?he(e):e,r=window.localStorage.getItem(n);if(r!==null)try{return JSON.parse(r)?.value}catch{return r}},_e=(e,t=!0)=>{(t?e.map(he):e).forEach(e=>window.localStorage.removeItem(e))},ve=()=>{let e={migrated:[],removed:[],skipped:[]};for(let t of me){let n=t,r=z(n,!1),i=z(n,!0);if(r===void 0){e.skipped.push(n);continue}if(i!==void 0){_e([n],!1),e.removed.push(n);continue}ge(n,r,!0),_e([n],!1),e.migrated.push(n)}return e},ye=e=>e.replace(/(\/(?:prometheus\/)?(?:graph|vmui)\/.*|\/#\/.*)/,`/prometheus`),be=()=>{let{serverURL:e}=de(),t=z(`SERVER_URL`),n=ye(window.location.href);return e||t||n},B=function(e){return e.table=`table`,e.chart=`chart`,e.code=`code`,e}({}),V=function(e){return e.emptyServer=`Please enter Server URL`,e.validServer=`Please provide a valid Server URL`,e.validQuery=`Please enter a valid Query and execute it`,e.traceNotFound=`Not found the tracing information`,e.emptyTitle=`Please enter title`,e.positiveNumber=`Please enter positive number`,e.validStep=`Please enter a valid step`,e.unknownType=`Unknown server response format: must have 'errorType'`,e}({}),xe=function(e){return e.system=`system`,e.light=`light`,e.dark=`dark`,e}({}),Se=function(e){return e.empty=`empty`,e.metricsql=`metricsql`,e.label=`label`,e.labelValue=`labelValue`,e}({}),Ce=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),we=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},Te=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,Ee=e=>e===xe.system&&Te()||e===xe.dark,De=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`http:`||t.protocol===`https:`},Oe=e=>e.replace(/\/$/,``),ke=(e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0},Ae=e=>{try{let t=e.match(/\/api\/v1\/[^?]+/);return t?t[0]:null}catch(e){return console.error(`Invalid URL:`,e),null}},je=/(\/select\/)(\d+(?::\d+)?)(\/.*)?$/,Me=(e,t)=>e.replace(je,`$1${t}$3`),Ne=e=>e.match(je)?.[2]??``,Pe=e=>e.replace(je,``),Fe=Oe(be()),Ie={serverUrl:Fe,tenantId:Ne(Fe),theme:z(`THEME`)||xe.system,isDarkTheme:null,appConfig:{}};function Le(e,t){switch(t.type){case`SET_SERVER`:return{...e,tenantId:Ne(t.payload),serverUrl:Oe(t.payload)};case`SET_THEME`:return ge(`THEME`,t.payload),{...e,theme:t.payload};case`SET_DARK_THEME`:return{...e,isDarkTheme:Ee(e.theme)};case`SET_APP_CONFIG`:return{...e,appConfig:t.payload};default:throw Error()}}var Re=e(x(),1),ze={table:100,chart:20,code:1e3},Be=[{id:`small`,isDefault:!0,height:()=>window.innerHeight*.2},{id:`medium`,height:()=>window.innerHeight*.4},{id:`large`,height:()=>window.innerHeight*.8}],Ve=[`min`,`median`,`max`],H=(e,t)=>{let n=window.location.hash.split(`?`)[1];return Re.default.parse(n,{ignoreQueryPrefix:!0})?.[e]||t||``},He=()=>{let e=(window.location.hash.split(`?`)[1]||``).match(/g\d+\.expr/g)?.length||1;return Array(e>10?10:e).fill(1).map((e,t)=>H(`g${t}.expr`,``))},Ue=ie({}),U=()=>s(Ue).state,We=()=>s(Ue).dispatch,Ge=Object.entries(Ie).reduce((e,[t,n])=>({...e,[t]:H(t)||n}),{}),Ke=({children:e})=>{let[t,n]=d(Le,Ge),r=D(()=>({state:t,dispatch:n}),[t,n]);return c(()=>{t.serverUrl&&(z(`SERVER_URL`)?ge(`SERVER_URL`,t.serverUrl):_e([`SERVER_URL`]))},[t.serverUrl]),F(Ue.Provider,{value:r,children:e})},qe=`YYYY-MM-DD`,Je=`YYYY-MM-DD HH:mm:ss`,Ye=`YYYY-MM-DD HH:mm:ss:SSS (Z)`,Xe=`YYYY-MM-DD[T]HH:mm:ss`,Ze=`YYYY-MM-DD_HHmmss`,Qe=`Africa/Abidjan.Africa/Accra.Africa/Addis_Ababa.Africa/Algiers.Africa/Asmera.Africa/Bamako.Africa/Bangui.Africa/Banjul.Africa/Bissau.Africa/Blantyre.Africa/Brazzaville.Africa/Bujumbura.Africa/Cairo.Africa/Casablanca.Africa/Ceuta.Africa/Conakry.Africa/Dakar.Africa/Dar_es_Salaam.Africa/Djibouti.Africa/Douala.Africa/El_Aaiun.Africa/Freetown.Africa/Gaborone.Africa/Harare.Africa/Johannesburg.Africa/Juba.Africa/Kampala.Africa/Khartoum.Africa/Kigali.Africa/Kinshasa.Africa/Lagos.Africa/Libreville.Africa/Lome.Africa/Luanda.Africa/Lubumbashi.Africa/Lusaka.Africa/Malabo.Africa/Maputo.Africa/Maseru.Africa/Mbabane.Africa/Mogadishu.Africa/Monrovia.Africa/Nairobi.Africa/Ndjamena.Africa/Niamey.Africa/Nouakchott.Africa/Ouagadougou.Africa/Porto-Novo.Africa/Sao_Tome.Africa/Tripoli.Africa/Tunis.Africa/Windhoek.America/Adak.America/Anchorage.America/Anguilla.America/Antigua.America/Araguaina.America/Argentina/La_Rioja.America/Argentina/Rio_Gallegos.America/Argentina/Salta.America/Argentina/San_Juan.America/Argentina/San_Luis.America/Argentina/Tucuman.America/Argentina/Ushuaia.America/Aruba.America/Asuncion.America/Bahia.America/Bahia_Banderas.America/Barbados.America/Belem.America/Belize.America/Blanc-Sablon.America/Boa_Vista.America/Bogota.America/Boise.America/Buenos_Aires.America/Cambridge_Bay.America/Campo_Grande.America/Cancun.America/Caracas.America/Catamarca.America/Cayenne.America/Cayman.America/Chicago.America/Chihuahua.America/Coral_Harbour.America/Cordoba.America/Costa_Rica.America/Creston.America/Cuiaba.America/Curacao.America/Danmarkshavn.America/Dawson.America/Dawson_Creek.America/Denver.America/Detroit.America/Dominica.America/Edmonton.America/Eirunepe.America/El_Salvador.America/Fort_Nelson.America/Fortaleza.America/Glace_Bay.America/Godthab.America/Goose_Bay.America/Grand_Turk.America/Grenada.America/Guadeloupe.America/Guatemala.America/Guayaquil.America/Guyana.America/Halifax.America/Havana.America/Hermosillo.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Inuvik.America/Iqaluit.America/Jamaica.America/Jujuy.America/Juneau.America/Kentucky/Monticello.America/Kralendijk.America/La_Paz.America/Lima.America/Los_Angeles.America/Louisville.America/Lower_Princes.America/Maceio.America/Managua.America/Manaus.America/Marigot.America/Martinique.America/Matamoros.America/Mazatlan.America/Mendoza.America/Menominee.America/Merida.America/Metlakatla.America/Mexico_City.America/Miquelon.America/Moncton.America/Monterrey.America/Montevideo.America/Montreal.America/Montserrat.America/Nassau.America/New_York.America/Nipigon.America/Nome.America/Noronha.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Ojinaga.America/Panama.America/Pangnirtung.America/Paramaribo.America/Phoenix.America/Port-au-Prince.America/Port_of_Spain.America/Porto_Velho.America/Puerto_Rico.America/Punta_Arenas.America/Rainy_River.America/Rankin_Inlet.America/Recife.America/Regina.America/Resolute.America/Rio_Branco.America/Santa_Isabel.America/Santarem.America/Santiago.America/Santo_Domingo.America/Sao_Paulo.America/Scoresbysund.America/Sitka.America/St_Barthelemy.America/St_Johns.America/St_Kitts.America/St_Lucia.America/St_Thomas.America/St_Vincent.America/Swift_Current.America/Tegucigalpa.America/Thule.America/Thunder_Bay.America/Tijuana.America/Toronto.America/Tortola.America/Vancouver.America/Whitehorse.America/Winnipeg.America/Yakutat.America/Yellowknife.Antarctica/Casey.Antarctica/Davis.Antarctica/DumontDUrville.Antarctica/Macquarie.Antarctica/Mawson.Antarctica/McMurdo.Antarctica/Palmer.Antarctica/Rothera.Antarctica/Syowa.Antarctica/Troll.Antarctica/Vostok.Arctic/Longyearbyen.Asia/Aden.Asia/Almaty.Asia/Amman.Asia/Anadyr.Asia/Aqtau.Asia/Aqtobe.Asia/Ashgabat.Asia/Atyrau.Asia/Baghdad.Asia/Bahrain.Asia/Baku.Asia/Bangkok.Asia/Barnaul.Asia/Beirut.Asia/Bishkek.Asia/Brunei.Asia/Calcutta.Asia/Chita.Asia/Choibalsan.Asia/Colombo.Asia/Damascus.Asia/Dhaka.Asia/Dili.Asia/Dubai.Asia/Dushanbe.Asia/Famagusta.Asia/Gaza.Asia/Hebron.Asia/Hong_Kong.Asia/Hovd.Asia/Irkutsk.Asia/Jakarta.Asia/Jayapura.Asia/Jerusalem.Asia/Kabul.Asia/Kamchatka.Asia/Karachi.Asia/Katmandu.Asia/Khandyga.Asia/Krasnoyarsk.Asia/Kuala_Lumpur.Asia/Kuching.Asia/Kuwait.Asia/Macau.Asia/Magadan.Asia/Makassar.Asia/Manila.Asia/Muscat.Asia/Nicosia.Asia/Novokuznetsk.Asia/Novosibirsk.Asia/Omsk.Asia/Oral.Asia/Phnom_Penh.Asia/Pontianak.Asia/Pyongyang.Asia/Qatar.Asia/Qostanay.Asia/Qyzylorda.Asia/Rangoon.Asia/Riyadh.Asia/Saigon.Asia/Sakhalin.Asia/Samarkand.Asia/Seoul.Asia/Shanghai.Asia/Singapore.Asia/Srednekolymsk.Asia/Taipei.Asia/Tashkent.Asia/Tbilisi.Asia/Tehran.Asia/Thimphu.Asia/Tokyo.Asia/Tomsk.Asia/Ulaanbaatar.Asia/Urumqi.Asia/Ust-Nera.Asia/Vientiane.Asia/Vladivostok.Asia/Yakutsk.Asia/Yekaterinburg.Asia/Yerevan.Atlantic/Azores.Atlantic/Bermuda.Atlantic/Canary.Atlantic/Cape_Verde.Atlantic/Faeroe.Atlantic/Madeira.Atlantic/Reykjavik.Atlantic/South_Georgia.Atlantic/St_Helena.Atlantic/Stanley.Australia/Adelaide.Australia/Brisbane.Australia/Broken_Hill.Australia/Currie.Australia/Darwin.Australia/Eucla.Australia/Hobart.Australia/Lindeman.Australia/Lord_Howe.Australia/Melbourne.Australia/Perth.Australia/Sydney.Europe/Amsterdam.Europe/Andorra.Europe/Astrakhan.Europe/Athens.Europe/Belgrade.Europe/Berlin.Europe/Bratislava.Europe/Brussels.Europe/Bucharest.Europe/Budapest.Europe/Busingen.Europe/Chisinau.Europe/Copenhagen.Europe/Dublin.Europe/Gibraltar.Europe/Guernsey.Europe/Helsinki.Europe/Isle_of_Man.Europe/Istanbul.Europe/Jersey.Europe/Kaliningrad.Europe/Kiev.Europe/Kirov.Europe/Lisbon.Europe/Ljubljana.Europe/London.Europe/Luxembourg.Europe/Madrid.Europe/Malta.Europe/Mariehamn.Europe/Minsk.Europe/Monaco.Europe/Moscow.Europe/Oslo.Europe/Paris.Europe/Podgorica.Europe/Prague.Europe/Riga.Europe/Rome.Europe/Samara.Europe/San_Marino.Europe/Sarajevo.Europe/Saratov.Europe/Simferopol.Europe/Skopje.Europe/Sofia.Europe/Stockholm.Europe/Tallinn.Europe/Tirane.Europe/Ulyanovsk.Europe/Uzhgorod.Europe/Vaduz.Europe/Vatican.Europe/Vienna.Europe/Vilnius.Europe/Volgograd.Europe/Warsaw.Europe/Zagreb.Europe/Zaporozhye.Europe/Zurich.Indian/Antananarivo.Indian/Chagos.Indian/Christmas.Indian/Cocos.Indian/Comoro.Indian/Kerguelen.Indian/Mahe.Indian/Maldives.Indian/Mauritius.Indian/Mayotte.Indian/Reunion.Pacific/Apia.Pacific/Auckland.Pacific/Bougainville.Pacific/Chatham.Pacific/Easter.Pacific/Efate.Pacific/Enderbury.Pacific/Fakaofo.Pacific/Fiji.Pacific/Funafuti.Pacific/Galapagos.Pacific/Gambier.Pacific/Guadalcanal.Pacific/Guam.Pacific/Honolulu.Pacific/Johnston.Pacific/Kiritimati.Pacific/Kosrae.Pacific/Kwajalein.Pacific/Majuro.Pacific/Marquesas.Pacific/Midway.Pacific/Nauru.Pacific/Niue.Pacific/Norfolk.Pacific/Noumea.Pacific/Pago_Pago.Pacific/Palau.Pacific/Pitcairn.Pacific/Ponape.Pacific/Port_Moresby.Pacific/Rarotonga.Pacific/Saipan.Pacific/Tahiti.Pacific/Tarawa.Pacific/Tongatapu.Pacific/Truk.Pacific/Wake.Pacific/Wallis`.split(`.`);function $e(e,t,n=0,r=e.length-1,i=tt){for(;r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1);$e(e,t,Math.max(n,Math.floor(t-o*c/a+l)),Math.min(r,Math.floor(t+(a-o)*c/a+l)),i)}let a=e[t],o=n,s=r;for(et(e,n,t),i(e[r],a)>0&&et(e,n,r);o0;)s--}i(e[n],a)===0?et(e,n,s):(s++,et(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}}function et(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function tt(e,t){return et)}var nt=e=>Math.round(e*1e3)/1e3,rt=e=>{let t=e.length;if(t===0)return null;let n=t>>1;$e(e,n);let r=e[n];if(t&1)return r;let i=-1/0;for(let t=0;ti&&(i=n)}return(i+r)/2},it=(e,t)=>{let n=!!t.min,r=!!t.max,i=!!t.avg,a=!!t.median;if(!n&&!r&&!i&&!a)return{min:null,max:null,median:null,avg:null};let o=1/0,s=-1/0,c=0,l=0,u=[];for(let t of e)t==null||!Number.isFinite(t)||(n&&ts&&(s=t),i&&(l++,c+=(t-c)/l),a&&u.push(t));return{min:Number.isFinite(o)?o:null,max:Number.isFinite(s)?s:null,avg:l?c:null,median:u&&a?rt(u):null}},at=window.innerWidth/4,ot=window.innerWidth/40,st={min:1,max:1578e8},ct=Intl.supportedValuesOf,lt=ct?ct(`timeZone`):Qe,ut=[{long:`years`,short:`y`,possible:`year`},{long:`weeks`,short:`w`,possible:`week`},{long:`days`,short:`d`,possible:`day`},{long:`hours`,short:`h`,possible:`hour`},{long:`minutes`,short:`m`,possible:`min`},{long:`seconds`,short:`s`,possible:`sec`},{long:`milliseconds`,short:`ms`,possible:`millisecond`}],dt=ut.map(e=>e.short),ft=(e,t)=>nt(e)===nt(t),pt=e=>wt(L.default.duration(e,`seconds`).asMilliseconds()),mt=e=>{let t=nt(e),n=Math.round(e);return e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(e*40)/40),pt(t||.001).replace(/\s/g,``)},ht=e=>{if(!e)return;let t=e.trim().replace(/,/g,`.`).match(/\d*\.?\d+\s*[a-zA-Z]+/g);if(!t)return;let n={};for(let e of t){let t=e.match(/\d*\.?\d+/)?.[0],r=e.match(/[a-zA-Z]+/)?.[0]?.toLowerCase();if(!t||!r||!dt.includes(r))return;n[r]=t}return Object.keys(n).length?n:void 0},gt=e=>{let t=ut.map(e=>e.short).join(`|`),n=RegExp(`\\d+(\\.\\d+)?[${t}]+`,`g`),r=(e.match(n)||[]).reduce((e,t)=>{let n=ht(t);return n?{...e,...n}:{...e}},{});return L.default.duration(r).asSeconds()},_t=[B.table,B.code],vt=(e,t,n)=>n&&_t.includes(n)?mt(e):mt(e/(t?ot:at)),yt=(e,t)=>{let n=(t||(0,L.default)().toDate()).valueOf()/1e3,r=gt(e);return{start:n-r,end:n,step:vt(r),date:xt(t||(0,L.default)().toDate())}},bt=e=>(0,L.default)(e).utcOffset(0,!0).toDate(),xt=e=>L.default.tz(e).utc().format(Xe),St=e=>L.default.tz(e).format(Xe),Ct=()=>(0,L.default)().utc().format(Xe),wt=e=>{let t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),a=Math.floor(e/(1e3*60*60*24)),o=[`d`,`h`,`m`,`s`,`ms`];return[a,i,r,n,t].map((e,t)=>e?`${e}${o[t]}`:``).filter(e=>e).join(``)},Tt=e=>wt(e.to.valueOf()-e.from.valueOf()),Et=e=>{let t=(0,L.default)(e*1e3);return t.isValid()?t.toDate():new Date},Dt=[{title:`Last 5 minutes`,duration:`5m`},{title:`Last 15 minutes`,duration:`15m`},{title:`Last 30 minutes`,duration:`30m`,isDefault:!0},{title:`Last 1 hour`,duration:`1h`},{title:`Last 3 hours`,duration:`3h`},{title:`Last 6 hours`,duration:`6h`},{title:`Last 12 hours`,duration:`12h`},{title:`Last 24 hours`,duration:`24h`},{title:`Last 2 days`,duration:`2d`},{title:`Last 7 days`,duration:`7d`},{title:`Last 30 days`,duration:`30d`},{title:`Last 90 days`,duration:`90d`},{title:`Last 180 days`,duration:`180d`},{title:`Last 1 year`,duration:`1y`},{title:`Yesterday`,duration:`1d`,until:()=>(0,L.default)().tz().subtract(1,`day`).endOf(`day`).toDate()},{title:`Today`,duration:`1d`,until:()=>(0,L.default)().tz().endOf(`day`).toDate()}].map(e=>({id:e.title.replace(/\s/g,`_`).toLocaleLowerCase(),until:e.until?e.until:()=>(0,L.default)().tz().toDate(),...e})),Ot=({relativeTimeId:e,defaultDuration:t,defaultEndInput:n})=>{let r=Dt.find(e=>e.isDefault)?.id,i=e||H(`g0.relative_time`,r),a=Dt.find(e=>e.id===i);return{relativeTimeId:a?i:`none`,duration:a?a.duration:t,endInput:a?a.until():n}},kt=e=>`UTC${(0,L.default)().tz(e).format(`Z`)}`,At=(e=``)=>{let t=new RegExp(e,`i`);return lt.reduce((n,r)=>{let i=(r.match(/^(.*?)\//)||[])[1]||`unknown`,a=kt(r),o=a.replace(/UTC|0/,``),s={region:r,utc:a,search:`${r} ${a} ${r.replace(/[/_]/g,` `)} ${o}`},c=!e||e&&t.test(s.search);return c&&n[i]?n[i].push(s):c&&(n[i]=[s]),n},{})},jt=e=>{L.default.tz.setDefault(e)},Mt=e=>{try{return(0,L.default)().tz(e),!0}catch{return!1}},Nt=()=>{let e=L.default.tz.guess(),t=Mt(e);return{isValid:t,title:t?`Browser Time (${e})`:`Browser timezone (UTC)`,region:t?e:`UTC`}},Pt=e=>{if(!e)return 0n;let t=(0,L.default)(e).valueOf();if(!e.includes(`.`))return BigInt(t)*1000000n;let n=e.match(/\.(\d+)Z/);if(!n)return BigInt(t)*1000000n;let r=n[1];r=r.padEnd(9,`0`);let i=parseInt(r.slice(3),10);return BigInt(t)*1000000n+BigInt(i)},Ft=z(`TIMEZONE`)||Nt().region;jt(Ft);var It=()=>{let e=H(`g0.range_input`),{duration:t,endInput:n,relativeTimeId:r}=Ot({defaultDuration:e||`1h`,defaultEndInput:bt(H(`g0.end_input`,Ct())),relativeTimeId:e?H(`g0.relative_time`,`none`):void 0});return{duration:t,period:yt(t,n),relativeTime:r}},Lt={...It(),timezone:Ft};function Rt(e,t){switch(t.type){case`SET_TIME_STATE`:return{...e,...t.payload};case`SET_DURATION`:return{...e,duration:t.payload,period:yt(t.payload,Et(e.period.end)),relativeTime:`none`};case`SET_RELATIVE_TIME`:return{...e,duration:t.payload.duration,period:yt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case`SET_PERIOD`:let n=Tt(t.payload);return{...e,duration:n,period:yt(n,t.payload.to),relativeTime:`none`};case`RUN_QUERY`:let{duration:r,endInput:i}=Ot({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Et(e.period.end)});return{...e,period:yt(r,i)};case`RUN_QUERY_TO_NOW`:return{...e,period:yt(e.duration)};case`SET_TIMEZONE`:return jt(t.payload),ge(`TIMEZONE`,t.payload),e.defaultTimezone&&ge(`DISABLED_DEFAULT_TIMEZONE`,t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case`SET_DEFAULT_TIMEZONE`:return{...e,defaultTimezone:t.payload};default:throw Error()}}a();var zt=ie({}),W=()=>s(zt).state,Bt=()=>s(zt).dispatch,Vt=({children:e})=>{let[t,n]=d(Rt,Lt),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(zt.Provider,{value:r,children:e})},Ht=e=>{let t=z(e);return t?JSON.parse(t):{}},Ut=(e,t,n)=>{let r=Ht(e);ge(e,JSON.stringify({...r,[t]:n}))},Wt=(e,t)=>Ht(e)[t]||[],Gt=(e,t)=>{let n=t.map(e=>e.values[e.index]),r=Ht(e),i=r.QUERY_HISTORY||[];i[0]||=[];let a=i[0];n.forEach(e=>{!a.includes(e)&&e&&a.unshift(e),a.length>250&&a.pop()});let o={...r,QUERY_HISTORY:[a]};ge(e,JSON.stringify(o))},Kt=(e,t)=>{Ut(e,`QUERY_FAVORITES`,t)},qt=(e,t)=>{let n=Ht(e);ge(e,JSON.stringify({...n,[t]:[]}))},Jt=(e,t)=>{let n=t||{values:[]},r=e===n.values[n.values.length-1],i=!r&&e?[...n.values,e]:n.values;return i.length>25&&i.shift(),{index:n.values.length-Number(r),values:i}},Yt={displayResults:50,queryLimit:1e3,cacheLimit:1e3},Xt=class{maxSize;map;constructor(){this.maxSize=Yt.cacheLimit,this.map=new Map}get(e){for(let[t,n]of this.map){let r=JSON.parse(t),i=r.start===e.start&&r.end===e.end,a=r.type===e.type,o=e.value&&r.value&&e.value.includes(r.value),s=r.match===e.match||o,c=n.length=this.maxSize){let e=this.map.keys().next().value;e&&this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},Zt=He(),Qt={query:Zt,queryHistory:Zt.map(e=>({index:0,values:[e]})),autocomplete:z(`AUTOCOMPLETE`)||!1,autocompleteQuick:!1,autocompleteCache:new Xt,metricsQLFunctions:[]};function $t(e,t){switch(t.type){case`SET_QUERY`:return{...e,query:t.payload.map(e=>e)};case`SET_QUERY_HISTORY`:return Gt(t.payload.key,t.payload.history),{...e,queryHistory:t.payload.history};case`SET_QUERY_HISTORY_BY_INDEX`:return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case`TOGGLE_AUTOCOMPLETE`:return ge(`AUTOCOMPLETE`,!e.autocomplete),{...e,autocomplete:!e.autocomplete};case`SET_AUTOCOMPLETE_QUICK`:return{...e,autocompleteQuick:t.payload};case`SET_AUTOCOMPLETE_CACHE`:return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case`SET_METRICSQL_FUNCTIONS`:return{...e,metricsQLFunctions:t.payload};default:throw Error()}}a();var en=ie({}),tn=()=>s(en).state,nn=()=>s(en).dispatch,rn=({children:e})=>{let[t,n]=d($t,Qt),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(en.Provider,{value:r,children:e})},an=t({AlarmIcon:()=>En,AlertIcon:()=>ln,AlertingRuleIcon:()=>un,ArrowDownIcon:()=>G,ArrowDropDownIcon:()=>Cn,CalendarIcon:()=>Tn,ChartIcon:()=>An,ClockIcon:()=>wn,CloseIcon:()=>hn,CodeIcon:()=>Mn,CollapseIcon:()=>ar,CommentIcon:()=>cr,CopyIcon:()=>Bn,DebugIcon:()=>lr,DeleteIcon:()=>Nn,DetailsIcon:()=>cn,DoneIcon:()=>In,DownloadIcon:()=>rr,DragIcon:()=>Vn,ErrorIcon:()=>bn,ExpandIcon:()=>ir,FunctionIcon:()=>er,GroupIcon:()=>sn,InfoIcon:()=>_n,InfoOutlinedIcon:()=>vn,IssueIcon:()=>Wn,KeyboardIcon:()=>Dn,LabelIcon:()=>tr,LinkIcon:()=>on,ListIcon:()=>Xn,LogoIcon:()=>fn,LogoShortIcon:()=>pn,MetricIcon:()=>$n,MinusIcon:()=>Fn,MoreIcon:()=>qn,PlayCircleOutlineIcon:()=>kn,PlayIcon:()=>On,PlusIcon:()=>Pn,Prettify:()=>zn,QuestionIcon:()=>Gn,RecordingRuleIcon:()=>dn,RefreshIcon:()=>Sn,RestartIcon:()=>gn,SearchIcon:()=>or,SettingsIcon:()=>mn,SpinnerIcon:()=>sr,StarBorderIcon:()=>Zn,StarIcon:()=>Qn,StorageIcon:()=>Kn,SuccessIcon:()=>xn,TableIcon:()=>jn,TimelineIcon:()=>Hn,TipIcon:()=>Yn,TuneIcon:()=>Jn,ValueIcon:()=>nr,VisibilityIcon:()=>Ln,VisibilityOffIcon:()=>Rn,WarningIcon:()=>yn,WikiIcon:()=>Un}),on=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M10.975 14.51a1.05 1.05 0 0 0 0-1.485 2.95 2.95 0 0 1 0-4.172l3.536-3.535a2.95 2.95 0 1 1 4.172 4.172l-1.093 1.092a1.05 1.05 0 0 0 1.485 1.485l1.093-1.092a5.05 5.05 0 0 0-7.142-7.142L9.49 7.368a5.05 5.05 0 0 0 0 7.142c.41.41 1.075.41 1.485 0m2.05-5.02a1.05 1.05 0 0 0 0 1.485 2.95 2.95 0 0 1 0 4.172l-3.5 3.5a2.95 2.95 0 1 1-4.171-4.172l1.025-1.025a1.05 1.05 0 0 0-1.485-1.485L3.87 12.99a5.05 5.05 0 0 0 7.142 7.142l3.5-3.5a5.05 5.05 0 0 0 0-7.142 1.05 1.05 0 0 0-1.485 0z`})}),sn=()=>F(`svg`,{fill:`currentColor`,viewBox:`0 0 512 512`,children:F(`path`,{d:`M170.667 64v42.667h-64v298.666h64V448H64V64zM448 64v384H341.333v-42.667h64V106.667h-64V64zm-85.333 256v42.667H149.333V320zm0-85.333v42.666H149.333v-42.666zm0-85.334V192H149.333v-42.667z`})}),cn=()=>F(`svg`,{fill:`currentColor`,viewBox:`0 0 20 20`,children:F(`path`,{d:`M12 3a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 5a2 2 0 1 1 0 4 2 2 0 0 1 0-4m0 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4`})}),ln=()=>F(`svg`,{viewBox:`-1 0 30 30`,fill:`currentColor`,children:F(`path`,{d:`m3 24 3-6v-8a8 8 0 0 1 16 0v8l3 6zm11 4a2.99 2.99 0 0 1-2.816-2h5.632A2.99 2.99 0 0 1 14 28m10-10v-8c0-5.522-4.478-10-10-10S4 4.478 4 10v8l-4 8h9.101a5 5 0 0 0 9.798 0H28z`})}),un=()=>F(`svg`,{viewBox:`411.014 448.582 21.637 17.836`,fill:`currentColor`,children:F(`path`,{d:`M411.47 453.837a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m-.016 5.54c-.284.124-.44.372-.439.701.001.354.204.614.553.708.092.025 1.214.034 3.267.028 3.481-.011 3.23.008 3.468-.264a.714.714 0 0 0-.003-.963c-.249-.283-.03-.267-3.564-.266-2.735 0-3.171.008-3.282.056m-.018 5.016a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m.161-15.761a.85.85 0 0 0-.389.417c-.023.07-.034.224-.026.343.018.239.078.345.301.525l.139.112 8.729.01 8.73.009.163-.079c.193-.093.36-.332.395-.565a.75.75 0 0 0-.388-.75c-.142-.072-.227-.073-8.844-.072-7.105.002-8.721.011-8.81.05m14.005 2.595c-.286.18-.371.401-.371.961v.334l-.499.024c-.598.028-.961.126-1.456.392a3.5 3.5 0 0 0-1.721 2.199c-.081.307-.091.479-.115 1.923-.027 1.566-.028 1.59-.138 1.966-.145.496-.557 1.361-.929 1.945a5 5 0 0 0-.368.677c-.1.292-.095.679.013.982.112.32.461.686.75.789.276.099 1.255.259 2.268.373l.84.095.028.287q.089.935.767 1.579a2.383 2.383 0 0 0 3.659-.434c.227-.351.36-.745.396-1.161l.023-.283.291-.027c.956-.093 2.47-.32 2.715-.408.393-.14.694-.464.817-.875.16-.539.093-.833-.354-1.554-.373-.601-.832-1.565-.956-2.007-.083-.29-.093-.448-.119-1.903-.027-1.427-.039-1.619-.118-1.924a3.5 3.5 0 0 0-1.895-2.327c-.422-.202-.758-.282-1.309-.312l-.489-.025-.022-.473c-.022-.521-.062-.621-.325-.806-.124-.088-.182-.096-.69-.096-.489.001-.57.012-.693.089m2.696 2.786c.546.176.994.583 1.249 1.135l.149.326.025 1.543c.027 1.672.046 1.837.286 2.598.166.52.621 1.468.974 2.028.189.303.274.472.244.492-.104.066-1.778.288-2.915.387-.788.068-3.246.068-4.037 0-1.154-.099-2.811-.32-2.919-.39-.035-.023.03-.16.223-.469.375-.603.805-1.493.976-2.024.246-.763.272-1 .272-2.426 0-.701.019-1.398.043-1.549.083-.554.47-1.148.931-1.429.103-.063.308-.157.453-.209.258-.092.315-.094 2.025-.096 1.642-.001 1.776.005 2.021.083m-1.384 10.771a1.06 1.06 0 0 1-.748.2c-.394-.066-.776-.451-.835-.841l-.026-.168h2.005v.108z`})}),dn=()=>F(`svg`,{viewBox:`411.014 448.582 23.358 18.492`,fill:`currentColor`,children:[F(`path`,{d:`M411.47 453.837a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m15.967 7.103a1.592 1.612 0 1 1 1.592-1.612 1.592 1.612 0 0 1-1.592 1.612m0-1.612`}),F(`path`,{d:`M427.405 466.377a6.966 7.052 0 1 1 6.965-7.053 6.974 7.06 0 0 1-6.965 7.053m0-12.09a4.975 5.037 0 1 0 4.975 5.037 4.981 5.043 0 0 0-4.975-5.037`}),F(`path`,{d:`M421.832 467.074a.996 1.008 0 0 1-.708-1.715l3.582-3.675a.995 1.008 0 0 1 1.417 1.415l-3.582 3.675a.995 1.007 0 0 1-.709.3m-10.378-7.697c-.284.124-.44.372-.439.701.001.354.204.614.553.708.092.025 1.214.034 3.267.028 3.481-.011 3.23.008 3.468-.264a.714.714 0 0 0-.003-.963c-.249-.283-.03-.267-3.564-.266-2.735 0-3.171.008-3.282.056m-.018 5.016a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m.161-15.761a.85.85 0 0 0-.389.417c-.023.07-.034.224-.026.343.018.239.078.345.301.525l.139.112 8.729.01 8.73.009.163-.079c.193-.093.36-.332.395-.565a.75.75 0 0 0-.388-.75c-.142-.072-.227-.073-8.844-.072-7.105.002-8.721.011-8.81.05`})]}),fn=()=>F(`svg`,{viewBox:`0 0 74 24`,fill:`currentColor`,children:F(`path`,{d:`M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z`})}),pn=()=>F(`svg`,{viewBox:`0 0 15 17`,fill:`currentColor`,children:F(`path`,{d:`M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z`})}),mn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z`})}),hn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`})}),gn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z`})}),_n=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z`})}),vn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8`})}),yn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`})}),bn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z`})}),xn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`})}),Sn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z`})}),G=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z`})}),Cn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m7 10 5 5 5-5z`})}),wn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:[F(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),F(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),Tn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z`})}),En=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z`})}),Dn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z`})}),On=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M8 5v14l11-7z`})}),kn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z`})}),An=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z`})}),jn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z`})}),Mn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z`})}),Nn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z`})}),Pn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})}),Fn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 13H5v-2h14v2z`})}),In=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z`})}),Ln=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z`})}),Rn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z`})}),zn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z`})}),Bn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z`})}),Vn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 9H4v2h16V9zM4 15h16v-2H4v2z`})}),Hn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z`})}),Un=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:[F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z`}),F(`path`,{d:`M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z`}),F(`path`,{d:`M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z`})]}),Wn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z`})}),Gn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z`})}),Kn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z`})}),qn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`})}),Jn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z`})}),Yn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z`})}),Xn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z`})}),Zn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z`})}),Qn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z`})}),$n=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-error`),children:F(`path`,{d:`M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z`})}),er=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-primary`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z`})}),tr=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-warning`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z`})}),nr=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-primary`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z`})}),rr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z`})}),ir=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z`})}),ar=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z`})}),or=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`})}),sr=()=>F(`svg`,{viewBox:`0 0 24 24`,children:F(`path`,{fill:`currentColor`,d:`M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z`,children:F(`animateTransform`,{attributeName:`transform`,dur:`0.75s`,repeatCount:`indefinite`,type:`rotate`,values:`0 12 12;360 12 12`})})}),cr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z`})}),lr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z`})}),K=e(M(),1),ur=({to:e,isNavLink:t,children:n,...r})=>t?F(S,{to:e,...r,children:n}):F(`div`,{...r,children:n}),dr=({activeItem:e,item:t,color:n=Ce(`color-primary`),activeNavRef:r,onChange:i,isNavLink:a})=>{let o=e=>()=>{i&&i(e)};return F(ur,{className:(0,K.default)({"vm-tabs-item":!0,"vm-tabs-item_active":e===t.value,[t.className||``]:t.className}),isNavLink:a,to:t.value,style:{color:n},onClick:o(t.value),ref:e===t.value?r:void 0,children:[t.icon&&F(`div`,{className:(0,K.default)({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!t.label}),children:t.icon}),t.label]})};a();function q(e,t,n,r){let i=O(t);c(()=>{i.current=t},[t]),c(()=>{let t=n?.current??window;if(!(t&&t.addEventListener))return;let a=e=>i.current(e);return t.addEventListener(e,a,r),()=>{t.removeEventListener(e,a,r)}},[e,n,r])}a();var fr=()=>{let[e,t]=u({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return q(`resize`,n),c(n,[]),e};a();var pr=({activeItem:e,items:t,color:n=Ce(`color-primary`),onChange:r,indicatorPlacement:i=`bottom`,isNavLink:a})=>{let o=fr(),s=O(null),[l,d]=u({left:0,width:0,bottom:0});return c(()=>{if(s.current?.base instanceof HTMLElement){let{offsetLeft:e,offsetWidth:t,offsetHeight:n}=s.current.base;d({left:e,width:t,bottom:i===`top`?n-2:0})}},[o,e,s,t]),F(`div`,{className:`vm-tabs`,children:[t.map(t=>F(dr,{activeItem:e,item:t,onChange:r,color:n,activeNavRef:s,isNavLink:a},t.value)),F(`div`,{className:`vm-tabs__indicator`,style:{...l,borderColor:n}})]})},mr=[{value:B.chart,icon:F(An,{}),label:`Graph`,prometheusCode:0},{value:B.code,icon:F(Mn,{}),label:`JSON`,prometheusCode:3},{value:B.table,icon:F(jn,{}),label:`Table`,prometheusCode:1}],hr=({tabFilter:e})=>{let{displayType:t}=xr(),n=Sr();return F(pr,{activeItem:t,items:mr.filter(e??(()=>!0)),onChange:e=>{n({type:`SET_DISPLAY_TYPE`,payload:e??t})}})},gr=()=>{let e=H(`g0.tab`,0);return mr.find(t=>t.prometheusCode===+e||t.value===e)?.value||B.chart},_r=z(`SERIES_LIMITS`),vr={displayType:gr(),nocache:!1,isTracingEnabled:!1,seriesLimits:_r?JSON.parse(_r):ze,tableCompact:z(`TABLE_COMPACT`)||!1,reduceMemUsage:!1};function yr(e,t){switch(t.type){case`SET_DISPLAY_TYPE`:return{...e,displayType:t.payload};case`SET_SERIES_LIMITS`:return ge(`SERIES_LIMITS`,JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case`TOGGLE_QUERY_TRACING`:return{...e,isTracingEnabled:!e.isTracingEnabled};case`TOGGLE_NO_CACHE`:return{...e,nocache:!e.nocache};case`TOGGLE_TABLE_COMPACT`:return ge(`TABLE_COMPACT`,!e.tableCompact),{...e,tableCompact:!e.tableCompact};case`TOGGLE_REDUCE_MEM_USAGE`:return ge(`TABLE_COMPACT`,!e.reduceMemUsage),{...e,reduceMemUsage:!e.reduceMemUsage};default:throw Error()}}a();var br=ie({}),xr=()=>s(br).state,Sr=()=>s(br).dispatch,Cr=({children:e})=>{let[t,n]=d(yr,vr),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(br.Provider,{value:r,children:e})},wr={customStep:H(`g0.step_input`,``),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,isEmptyHistogram:!1,spanGaps:!1,showAllPoints:!!z(`POINTS_SHOW_ALL`),openSettings:!1};function Tr(e,t){switch(t.type){case`TOGGLE_ENABLE_YAXIS_LIMITS`:return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case`SET_CUSTOM_STEP`:return{...e,customStep:t.payload};case`SET_YAXIS_LIMITS`:return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case`SET_IS_HISTOGRAM`:return{...e,isHistogram:t.payload};case`SET_IS_EMPTY_HISTOGRAM`:return{...e,isEmptyHistogram:t.payload};case`SET_SPAN_GAPS`:return{...e,spanGaps:t.payload};case`SET_SHOW_POINTS`:return ge(`POINTS_SHOW_ALL`,t.payload),{...e,showAllPoints:t.payload};case`SET_OPEN_SETTINGS`:return{...e,openSettings:t.payload};default:throw Error()}}a();var Er=ie({}),Dr=()=>s(Er).state,Or=()=>s(Er).dispatch,kr=({children:e})=>{let[t,n]=d(Tr,wr),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(Er.Provider,{value:r,children:e})},Ar={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:``};function jr(e,t){switch(t.type){case`SET_DASHBOARDS_SETTINGS`:return{...e,dashboardsSettings:t.payload};case`SET_DASHBOARDS_LOADING`:return{...e,dashboardsLoading:t.payload};case`SET_DASHBOARDS_ERROR`:return{...e,dashboardsError:t.payload};default:throw Error()}}a();var Mr=ie({}),Nr=()=>s(Mr).state,Pr=()=>s(Mr).dispatch,Fr=({children:e})=>{let[t,n]=d(jr,Ar),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(Mr.Provider,{value:r,children:e})},Ir={windows:`Windows`,mac:`Mac OS`,linux:`Linux`},Lr=()=>Object.values(Ir).find(e=>navigator.userAgent.indexOf(e)>=0)||`unknown`,Rr=()=>Lr()===Ir.mac,zr=()=>[`Android`,`webOS`,`iPhone`,`iPad`,`iPod`,`BlackBerry`,`Windows Phone`].map(e=>navigator.userAgent.match(new RegExp(e,`i`))).some(e=>e);a();function J(){let e=fr(),t=()=>{let e=zr(),t=window.innerWidth<500;return e||t},[n,r]=u(t());return c(()=>{r(t())},[e]),{isMobile:n}}var Br={success:F(xn,{}),error:F(bn,{}),warning:F(yn,{}),info:F(_n,{})},Y=({variant:e,children:t})=>{let{isDarkTheme:n}=U(),{isMobile:r}=J();return F(`div`,{className:(0,K.default)({"vm-alert":!0,[`vm-alert_${e}`]:e,"vm-alert_dark":n,"vm-alert_mobile":r}),children:[F(`div`,{className:`vm-alert__icon`,children:Br[e||`info`]}),F(`div`,{className:`vm-alert__content`,children:t})]})};a();var Vr=ie({showInfoMessage:()=>{}}),Hr=()=>s(Vr),Ur=((...e)=>e.reduce((e,t)=>({children:n})=>F(e,{children:F(t,{children:n})}),({children:e})=>F(m,{children:e})))(Ke,Vt,rn,Cr,kr,({children:e})=>{let{isMobile:t}=J(),[n,r]=u({text:``,type:`info`}),[i,a]=u(!1),[o,s]=u(null);c(()=>{if(!o)return;r({...o,key:Date.now()}),a(!0);let e=setTimeout(l,o.timeout||4e3);return()=>clearTimeout(e)},[o]);let l=()=>{s(null),a(!1)};return F(Vr.Provider,{value:{showInfoMessage:s},children:[i&&F(`div`,{className:(0,K.default)({"vm-snackbar":!0,"vm-snackbar_mobile":t}),children:F(Y,{variant:n.type,children:F(`div`,{className:`vm-snackbar-content`,children:[F(`span`,{children:n.text}),F(`div`,{className:`vm-snackbar-content__close`,onClick:l,children:F(hn,{})})]})})}),e]})},Fr),Wr=function(e){return e[e.internalLink=0]=`internalLink`,e[e.externalLink=1]=`externalLink`,e}({}),Gr=e=>[{value:R.trace},{value:R.queryAnalyzer},{value:R.withTemplate},{value:R.relabel},{value:R.downsamplingDebug,hide:!e},{value:R.retentionDebug,hide:!e}],Kr=()=>[{value:R.metrics},{value:R.cardinality},{value:R.topQueries},{value:R.activeQueries}],qr=()=>[{value:R.rules},{value:R.notifiers}],Jr=({isEnterpriseLicense:e,showPredefinedDashboards:t,showAlerting:n})=>[{value:R.home},{value:R.rawQuery},{label:`Explore`,submenu:Kr()},{label:`Tools`,submenu:Gr(e)},{value:R.dashboards,hide:!t},{value:`Alerting`,submenu:qr(),hide:!n}],Yr=({activeMenu:e,label:t,value:n,type:r,color:i})=>r===Wr.externalLink?F(`a`,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_active":e===n}),style:{color:i},href:n,target:`_blank`,rel:`noreferrer`,children:t}):F(S,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_active":e===n}),style:{color:i},to:n,children:t});a();var Xr=(e,t,n)=>{let r=p(r=>{let i=e?.current,a=r.target,o=n?.current&&n.current.contains(a);!i||i.contains(r?.target||null)||o||t(r)},[e,t]);q(`mouseup`,r),q(`touchstart`,r)},X=({variant:e=`contained`,color:t=`primary`,size:n=`medium`,ariaLabel:r,children:i,endIcon:a,startIcon:o,fullWidth:s=!1,className:c,disabled:l,onClick:u,onMouseDown:d,"data-id":f})=>F(`button`,{className:(0,K.default)({"vm-button":!0,[`vm-button_${e}_${t}`]:!0,[`vm-button_${n}`]:n,"vm-button_icon_only":(o||a)&&!i,"vm-button_full-width":s,"vm-button_with-icons":o||a,[c||``]:c}),disabled:l,"aria-label":r,onClick:u,onMouseDown:d,"data-id":f,children:[o,i,a]});a();var Zr=({children:e,buttonRef:t,placement:n=`bottom-left`,placementPosition:r,open:i=!1,onClose:a,offset:o={top:6,left:0},clickOutside:s=!0,fullWidth:l,title:d,disabledFullScreen:f,classes:h,variant:g})=>{let{isMobile:_}=J(),v=w(),y=T(),[b,x]=u({width:0,height:0}),[S,C]=u(!1),E=O(null);c(()=>(C(i),!i&&a&&a(),i&&_&&!f&&(document.body.style.overflow=`hidden`),()=>{document.body.style.overflow=`auto`}),[i]),c(()=>{x({width:E?.current?.clientWidth||0,height:E?.current?.clientHeight||0}),C(!1)},[E]);let k=D(()=>{if(!t)return{};let e=t.current;if(!e||!S)return{};let i=e.getBoundingClientRect(),a={top:0,left:0,width:`auto`},s=n?.includes(`right`),c=n?.includes(`top`),u=n?.includes(`center`),d=o?.top||0,f=o?.left||0;if(a.left=a.left=i.left+f,a.top=i.height+i.top+d,s&&(a.left=i.right-b.width),c&&(a.top=i.top-b.height-d),u&&(a.top=i.top+(i.height-b.height)/2-d),n===`fixed`&&r)return a.top=Math.max(r.top+o.top,0),a.left=Math.max(r.left+o.left,0),a;let{innerWidth:p,innerHeight:m}=window,h=a.top+b.height>m,g=a.top<0,_=a.left+b.width>p,v=a.left<0;return h&&(a.top=i.top-b.height-d),g&&(a.top=i.height+i.top+d),_&&(a.left=i.right-b.width-f),v&&(a.left=i.left+f),l&&(a.width=`${i.width}px`),a.top<0&&(a.top=0),a.left<0&&(a.left=0),a},[t,n,S,e,l]),A=e=>{e.stopPropagation(),a()},j=()=>{C(!1),a()},M=()=>{s&&j()};c(()=>{if(!E.current||!S||_&&!f)return;let{right:e,width:t}=E.current.getBoundingClientRect();if(e>window.innerWidth){let e=window.innerWidth-t;E.current.style.left=`${e}px`}},[S,E,r]);let N=p(()=>{S&&_&&!f&&(v(y,{replace:!0}),a())},[S,_,f,y,a]);q(`scroll`,j),q(`popstate`,N),Xr(E,M,t);let P={};return(h||[]).forEach(e=>{P[e]=!0}),F(m,{children:(S||!b.width)&&te(F(`div`,{className:(0,K.default)({"vm-popper":!0,[`vm-popper_${g}`]:g,"vm-popper_mobile":_&&!f,"vm-popper_open":(_||Object.keys(k).length)&&S,...P}),ref:E,style:_&&!f?{}:k,children:[(d||_&&!f)&&F(`div`,{className:`vm-popper-header`,children:[F(`p`,{className:`vm-popper-header__title`,children:d}),F(X,{variant:`text`,color:g===`dark`?`white`:`primary`,size:`small`,onClick:A,ariaLabel:`close`,children:F(hn,{})})]}),e]}),document.body)})};a();var Z=e=>{let[t,n]=u(!!e);return{value:t,setValue:n,setTrue:p(()=>n(!0),[]),setFalse:p(()=>n(!1),[]),toggle:p(()=>n(e=>!e),[])}};a();var Qr=({activeMenu:e,label:t,color:n,background:r,submenu:i,direction:a=`row`})=>{let{pathname:o}=T(),[s,l]=u(null),d=O(null),{value:f,setFalse:p,setTrue:m}=Z(!1),h=()=>{(a===`row`||!f)&&m(),a===`column`&&f&&p(),a===`row`&&s&&clearTimeout(s)},g=()=>{s&&clearTimeout(s),l(setTimeout(p,300))};return c(()=>{p()},[o]),F(`div`,{className:(0,K.default)({"vm-header-nav-item_open":f}),style:{color:n},onMouseEnter:a===`column`?void 0:h,onMouseLeave:a===`column`?void 0:g,onClick:a===`column`?h:void 0,ref:d,children:[F(`div`,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_active":i.find(t=>t.value===e)}),children:[t,F(Cn,{})]}),a===`column`?F(`div`,{className:`vm-header-nav-item-submenu`,style:{background:r},children:i.map(t=>F(Yr,{activeMenu:e,value:t.value||``,label:t.label||``,color:n,type:t.type||Wr.internalLink},t.value))}):F(Zr,{open:f,placement:`bottom-left`,offset:{top:12,left:0},onClose:p,buttonRef:d,children:F(`div`,{className:`vm-header-nav-item-submenu`,style:{background:r},onMouseLeave:g,onMouseEnter:()=>{s&&clearTimeout(s)},children:i.map(t=>F(Yr,{activeMenu:e,value:t.value||``,label:t.label||``,color:n,type:t.type||Wr.internalLink},t.value))})})]})},$r=e=>{try{return e.replace(/^\/+/,``).replace(/-/g,` `).trim().replace(/^\w/,e=>e.toUpperCase())}catch{return e}},ei=e=>e.filter(e=>!e.hide).map(e=>{let t={...e};return t.value&&!t.label&&(t.label=ue[t.value]?.title||$r(t.value)),t.submenu&&t.submenu.length>0&&(t.submenu=ei(t.submenu)),t});a();var ti=()=>{let e=fe(),{dashboardsSettings:t}=Nr(),{serverUrl:n,appConfig:r}=U(),i=r.license?.type===`enterprise`,a=r?.vmalert?.enabled||!1,o=!!(!e&&t.length),s=D(()=>({serverUrl:n,isEnterpriseLicense:i,showAlerting:a,showPredefinedDashboards:o}),[n,i,a,o]);return ei(D(()=>Jr(s),[s]))};a();var ni=({color:e,background:t,direction:n})=>{let{pathname:r}=T(),[i,a]=u(r),o=ti();return c(()=>{a(r)},[r]),F(`nav`,{className:(0,K.default)({"vm-header-nav":!0,[`vm-header-nav_${n}`]:n}),children:o.map(r=>r.submenu?F(Qr,{activeMenu:i,label:r.label||``,submenu:r.submenu,color:e,background:t,direction:n},r.label):F(Yr,{activeMenu:i,value:r.value||``,label:r.label||``,color:e,type:r.type||Wr.internalLink},r.value))})};a();var ri=({title:e,children:t,onClose:n,className:r,isOpen:i=!0})=>{let{isMobile:a}=J(),o=w(),s=T(),l=p(e=>{i&&e.key===`Escape`&&n()},[i]),u=e=>{e.stopPropagation()},d=p(()=>{i&&(o(s,{replace:!0}),n())},[i,s,n]);return c(()=>{if(i)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=`auto`}},[i]),q(`popstate`,d),q(`keyup`,l),te(F(`div`,{className:(0,K.default)({"vm-modal":!0,"vm-modal_mobile":a,[`${r}`]:r}),onMouseDown:n,children:F(`div`,{className:`vm-modal-content`,onMouseDown:u,children:[F(`div`,{className:`vm-modal-content-header`,children:[e&&F(`div`,{className:`vm-modal-content-header__title`,children:e}),F(`div`,{className:`vm-modal-header__close`,children:F(X,{variant:`text`,size:`small`,onClick:n,ariaLabel:`close`,children:F(hn,{})})})]}),F(`div`,{className:`vm-modal-content-body`,tabIndex:0,children:t})]})}),document.body)};a();var Q=({children:e,title:t,open:n,placement:r=`bottom-center`,offset:i={top:6,left:0}})=>{let{isMobile:a}=J(),[o,s]=u(!1),[l,d]=u({width:0,height:0}),f=O(null),p=O(null),h=()=>s(!1);c(()=>{if(!(!p.current||!o))return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener(`scroll`,h),()=>{window.removeEventListener(`scroll`,h)}},[o,t]);let g=D(()=>{let e=f?.current?.base;if(!e||!o)return{};let t=e.getBoundingClientRect(),n={top:0,left:0},a=r===`bottom-right`||r===`top-right`,s=r===`bottom-left`||r===`top-left`,c=r?.includes(`top`),u=i?.top||0,d=i?.left||0;n.left=t.left-(l.width-t.width)/2+d,n.top=t.height+t.top+u,a&&(n.left=t.right-l.width),s&&(n.left=t.left+d),c&&(n.top=t.top-l.height-u);let{innerWidth:p,innerHeight:m}=window,h=n.top+l.height+20>m,g=n.top-20<0,_=n.left+l.width+20>p,v=n.left-20<0;return h&&(n.top=t.top-l.height-u),g&&(n.top=t.height+t.top+u),_&&(n.left=t.right-l.width-d),v&&(n.left=t.left+d),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n},[f,r,o,l]),_=()=>{typeof n!=`boolean`&&s(!0)},v=()=>{s(!1)};return c(()=>{typeof n==`boolean`&&s(n)},[n]),c(()=>{let e=f?.current?.base;if(e)return e.addEventListener(`mouseenter`,_),e.addEventListener(`mouseleave`,v),()=>{e.removeEventListener(`mouseenter`,_),e.removeEventListener(`mouseleave`,v)}},[f]),F(m,{children:[F(m,{ref:f,children:e}),!a&&o&&te(F(`div`,{className:`vm-tooltip`,ref:p,style:g,children:t}),document.body)]})},ii=F(`code`,{children:Rr()?`Cmd`:`Ctrl`}),ai=[{title:`Zoom in`,description:F(m,{children:[`To zoom in, hold down the `,ii,` + `,F(`code`,{children:`scroll up`}),`, or press the `,F(`code`,{children:`+`}),`. Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range.`]})},{title:`Zoom out`,description:F(m,{children:[`To zoom out, hold down the `,ii,` + `,F(`code`,{children:`scroll down`}),`, or press the `,F(`code`,{children:`-`}),`.`]})},{title:`Move horizontal axis`,description:F(m,{children:[`To move the graph, hold down the `,ii,` + `,F(`code`,{children:`drag`}),` the graph to the right or left.`]})},{title:`Fixing a tooltip`,description:F(m,{children:[`To fix the tooltip, `,F(`code`,{children:`click`}),` mouse when it's open. Then, you can drag the fixed tooltip by `,F(`code`,{children:`clicking`}),` and `,F(`code`,{children:`dragging`}),` on the `,F(Vn,{}),` icon.`]})},{title:`Set a custom range for the vertical axis`,description:F(m,{children:[`To set a custom range for the vertical axis, click on the `,F(mn,{}),` icon located in the upper right corner of the graph, activate the toggle, and set the values.`]})}],oi=[{title:`Show/hide a legend item`,description:F(m,{children:[F(`code`,{children:`click`}),` on a legend item to isolate it on the graph.`,ii,` + `,F(`code`,{children:`click`}),` on a legend item to remove it from the graph. To revert to the previous state, click again.`]})},{title:`Copy label key-value pairs`,description:F(m,{children:[F(`code`,{children:`click`}),` on a label key-value pair to save it to the clipboard.`]})},{title:`Collapse/Expand the legend group`,description:F(m,{children:[F(`code`,{children:`click`}),` on the group name (e.g. `,F(`b`,{children:`Query 1: {__name__!=""}`}),`) to collapse or expand the legend.`]})}],si=ai.concat(oi),ci=()=>{let{value:e,setFalse:t,setTrue:n}=Z(!1);return F(m,{children:[F(Q,{title:`Show tips on working with the graph`,children:F(X,{variant:`text`,color:`gray`,startIcon:F(Yn,{}),onClick:n,ariaLabel:`open the tips`})}),e&&F(ri,{title:`Tips on working with the graph and the legend`,onClose:t,children:F(`div`,{className:`fc-graph-tips`,children:si.map(({title:e,description:t})=>F(`div`,{className:`fc-graph-tips-item`,children:[F(`h4`,{className:`fc-graph-tips-item__action`,children:e}),F(`p`,{className:`fc-graph-tips-item__description`,children:t})]},e))})})]})},li=F(`code`,{children:Rr()?`Cmd`:`Ctrl`}),ui=F(m,{children:[F(`code`,{children:Rr()?`Option`:`Ctrl`}),` + `,F(`code`,{children:`Space`})]}),di=[{title:`Query`,list:[{keys:F(`code`,{children:`Enter`}),description:`Run`},{keys:F(m,{children:[F(`code`,{children:`Shift`}),` + `,F(`code`,{children:`Enter`})]}),description:`Multi-line queries`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`Arrow Up`})]}),description:`Previous command from the Query history`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`Arrow Down`})]}),description:`Next command from the Query history`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`click`}),` by `,F(Ln,{})]}),description:`Toggle multiple queries`},{keys:ui,description:`Show quick autocomplete tips`}]},{title:`Graph`,readMore:F(ci,{}),list:[{keys:F(m,{children:[li,` + `,F(`code`,{children:`scroll Up`}),` or `,F(`code`,{children:`+`})]}),description:`Zoom in`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`scroll Down`}),` or `,F(`code`,{children:`-`})]}),description:`Zoom out`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`drag`})]}),description:`Move the graph left/right`},{keys:F(m,{children:F(`code`,{children:`click`})}),description:`Select the series in the legend`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`click`})]}),description:`Toggle multiple series in the legend`}]}];a();var fi=`Shortcut keys`,pi=Rr(),mi=pi?`Cmd + /`:`F1`,hi=({showTitle:e})=>{let t=fe(),{value:n,setTrue:r,setFalse:i}=Z(!1);return q(`keydown`,p(e=>{let t=pi&&e.key===`/`&&e.metaKey,n=!pi&&e.key===`F1`&&!e.metaKey;(t||n)&&r()},[r])),F(m,{children:[F(Q,{open:e===!0?!1:void 0,title:`${fi} (${mi})`,placement:`bottom-center`,children:F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Dn,{}),onClick:r,ariaLabel:fi,children:e&&fi})}),n&&F(ri,{title:`Shortcut keys`,onClose:i,children:F(`div`,{className:`vm-shortcuts`,children:di.map(e=>F(`div`,{className:`vm-shortcuts-section`,children:[e.readMore&&F(`div`,{className:`vm-shortcuts-section__read-more`,children:e.readMore}),F(`h3`,{className:`vm-shortcuts-section__title`,children:e.title}),F(`div`,{className:`vm-shortcuts-section-list`,children:e.list.map((t,n)=>F(`div`,{className:`vm-shortcuts-section-list-item`,children:[F(`div`,{className:`vm-shortcuts-section-list-item__key`,children:t.keys}),F(`p`,{className:`vm-shortcuts-section-list-item__description`,children:t.description})]},`${e.title}_${n}`))})]},e.title))})})]})},gi=({open:e})=>F(`button`,{className:(0,K.default)({"vm-menu-burger":!0,"vm-menu-burger_opened":e}),"aria-label":`menu`,children:F(`span`,{})});a();var _i=({background:e,color:t})=>{let{pathname:n}=T(),{isMobile:r}=J(),i=O(null),{value:a,toggle:o,setFalse:s}=Z(!1);return c(s,[n]),Xr(i,s),F(`div`,{className:`vm-header-sidebar`,ref:i,children:[F(`div`,{className:(0,K.default)({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":a}),onClick:o,children:F(gi,{open:a})}),F(`div`,{className:(0,K.default)({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":a}),children:[F(`div`,{className:`vm-header-sidebar-scrollable`,children:F(ni,{color:t,background:e,direction:`column`})}),F(`div`,{className:`vm-header-sidebar-menu-settings`,children:!r&&F(hi,{showTitle:!0})})]})]})},vi=e=>`${Pe(e)}/admin/tenants`;a();var yi=()=>{let{useTenantID:e}=de(),t=fe(),{tenantId:n,serverUrl:r}=U(),[i,a]=u(!1),[o,s]=u(),[l,d]=u([]),f=D(()=>vi(r),[r]),p=D(()=>!!n,[n]),m=t?!e:!p;return c(()=>{m||(async()=>{a(!0);try{let e=await fetch(f),t=await e.json();d((t.data||[]).sort((e,t)=>e.localeCompare(t))),e.ok?s(void 0):s(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&s(`${e.name}: ${e.message}`)}a(!1)})().catch(console.error)},[f]),{accountIds:l,isLoading:i,error:o}};a();var bi=({controlsComponent:e,isMobile:t,...n})=>{let r=fe(),{pathname:i}=T(),{accountIds:a}=yi(),{value:o,toggle:s,setFalse:c}=Z(!1),l=D(()=>(ue[i]||{}).header||{},[i]),u=F(e,{...n,isMobile:t,accountIds:a,headerSetup:l,closeModal:c});return t?F(m,{children:[F(`div`,{className:`vm-header-controls vm-header-controls_mobile`,children:F(X,{className:(0,K.default)({"vm-header-button":!r}),startIcon:F(qn,{}),onClick:s,ariaLabel:`controls`})}),F(ri,{title:`Controls`,onClose:c,isOpen:o,className:(0,K.default)({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":o}),children:u})]}):u};a();var xi=({controlsComponent:e})=>{let{isMobile:t}=J(),n=D(()=>window.innerWidth<1230,[fr()]),{isDarkTheme:r}=U(),i=fe(),a=D(()=>Ce(r?`color-background-block`:`color-primary`),[r]),{background:o,color:s}=D(()=>{let{headerStyles:{background:e=i?`#FFF`:a,color:t=i?a:`#FFF`}={}}=de();return{background:e,color:t}},[a]),c=w();return F(`header`,{className:(0,K.default)({"vm-header":!0,"vm-header_app":i,"vm-header_dark":r,"vm-header_sidebar":n,"vm-header_mobile":t}),style:{background:o,color:s},children:[F(`div`,{className:(0,K.default)({"vm-header-logo":!0,"vm-header-logo_mobile":n}),onClick:()=>{c({pathname:R.home}),window.location.reload()},style:{color:s},children:F(fn,{})}),n?F(_i,{background:o,color:s}):F(ni,{color:s,background:o}),F(bi,{controlsComponent:e,displaySidebar:n,isMobile:t,closeModal:()=>{}})]})},Si=[{href:`https://docs.victoriametrics.com/victoriametrics/metricsql/`,Icon:Mn,title:`MetricsQL`},{href:`https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#vmui`,Icon:Un,title:`Documentation`},{href:`https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose`,Icon:Wn,title:`Create an issue`}];a();var Ci=o(({links:e=Si})=>{let t=`2019-${new Date().getFullYear()}`,{appConfig:n}=U(),r=n?.version;return F(`footer`,{className:`vm-footer`,children:[F(`a`,{className:`vm-link vm-footer__link`,target:`_blank`,href:`https://victoriametrics.com/`,rel:`me noreferrer`,children:[F(pn,{}),`victoriametrics.com`]}),e.map(({href:e,Icon:t,title:n})=>F(`a`,{className:`vm-link vm-footer__link`,target:`_blank`,href:e,rel:`help noreferrer`,children:[F(t,{}),n]},`${e}-${n}`)),F(`div`,{className:`vm-footer__copyright`,children:[`© `,t,` VictoriaMetrics.`,r&&F(`span`,{className:`vm-footer__version`,children:[`\xA0Version: `,r]})]})]})});a();var wi=async e=>await(await fetch(`./dashboards/${e}`)).json(),Ti=()=>{let e=fe(),{serverUrl:t}=U(),n=Pr(),[r,i]=u(!1),[a,o]=u(``),[s,l]=u([]),d=async()=>{try{let e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(!e?.length)return[];let t=await Promise.all(e.map(async e=>wi(e)));l(e=>[...t,...e])}catch(e){e instanceof Error&&o(`${e.name}: ${e.message}`)}},f=async()=>{if(t){o(``),i(!0);try{let e=await fetch(`${t}/vmui/custom-dashboards`),n=await e.json();if(e.ok){let{dashboardsSettings:e}=n;e&&e.length>0?l(t=>[...t,...e]):await d(),i(!1)}else await d(),o(n.error),i(!1)}catch(e){i(!1),e instanceof Error&&o(`${e.name}: ${e.message}`),await d()}}};return c(()=>{e||(l([]),f())},[t]),c(()=>{n({type:`SET_DASHBOARDS_SETTINGS`,payload:s})},[s]),c(()=>{n({type:`SET_DASHBOARDS_LOADING`,payload:r})},[r]),c(()=>{n({type:`SET_DASHBOARDS_ERROR`,payload:a})},[a]),{dashboardsSettings:s,isLoading:r,error:a}};a();var Ei=({error:e,warning:t,info:n})=>{let r=O(null),[i,a]=u(!1),[o,s]=u(!1),l=`${D(()=>e?`ERROR: `:t?`WARNING: `:``,[e,t])}${e||t||n}`,d=()=>{let e=r.current;if(e){let{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:i}=e;a(t+1{s(!1),d()},[r,l]),q(`resize`,d),!e&&!t&&!n?null:F(`span`,{className:(0,K.default)({"vm-text-field__error":!0,"vm-text-field__warning":t&&!e,"vm-text-field__helper-text":!t&&!e,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":o}),"data-show":!!l,ref:r,onClick:()=>{i&&(s(!0),a(!1))},children:l})};a();var $=({label:e,value:t,type:n=`text`,error:r=``,warning:i=``,helperText:a=``,placeholder:o,endIcon:s,startIcon:l,disabled:u=!1,readonly:d=!1,autofocus:f=!1,inputmode:p=`text`,caretPosition:m,onChange:h,onEnter:g,onKeyDown:_,onFocus:v,onBlur:y,onChangeCaret:b})=>{let{isDarkTheme:x}=U(),{isMobile:S}=J(),C=O(null),w=O(null),T=D(()=>n===`textarea`?w:C,[n]),E=(0,K.default)({"vm-text-field__input":!0,"vm-text-field__input_error":r,"vm-text-field__input_warning":!r&&i,"vm-text-field__input_icon-start":l,"vm-text-field__input_textarea":n===`textarea`}),k=e=>{if(!b)return;let{selectionStart:t,selectionEnd:n}=e;b&&b([t||0,n||0])},A=e=>{k(e.currentTarget)},j=e=>{_&&_(e);let{key:t,ctrlKey:r,metaKey:i}=e,a=t===`Enter`;(n===`textarea`?a&&(i||r):a)&&g&&(e.preventDefault(),g())},M=e=>{k(e.currentTarget)},N=e=>{u||(h&&h(e.currentTarget.value),k(e.currentTarget))},P=()=>{v&&v()},I=()=>{y&&y()},ee=e=>{try{T.current&&T.current.setSelectionRange(e[0],e[1])}catch(e){return e}};return c(()=>{!f||S||T?.current?.focus&&T.current.focus()},[T,f]),c(()=>{m&&ee(m)},[m]),F(`label`,{className:(0,K.default)({"vm-text-field":!0,"vm-text-field_textarea":n===`textarea`,"vm-text-field_dark":x,"vm-text-field_disabled":u}),"data-replicated-value":t,children:[l&&F(`div`,{className:`vm-text-field__icon-start`,children:l}),s&&F(`div`,{className:`vm-text-field__icon-end`,children:s}),e&&F(`span`,{className:`vm-text-field__label`,children:e}),n===`textarea`?F(`textarea`,{className:E,disabled:u,readOnly:d,ref:w,value:t,rows:1,inputMode:p,placeholder:o,autoCapitalize:`none`,onInput:N,onKeyDown:j,onKeyUp:M,onFocus:P,onBlur:I,onMouseUp:A}):F(`input`,{className:E,disabled:u,readOnly:d,ref:C,value:t,type:n,placeholder:o,inputMode:p,autoCapitalize:`none`,onInput:N,onKeyDown:j,onKeyUp:M,onFocus:P,onBlur:I,onMouseUp:A}),F(Ei,{error:r,warning:i,info:a})]})};a();var Di=({accountIds:e})=>{let t=fe(),{isMobile:n}=J(),{tenantId:r,serverUrl:i}=U(),a=We(),o=Bt(),[s,c]=u(``),l=O(null),{value:d,toggle:f,setFalse:p}=Z(!1),m=D(()=>{if(!s)return e;try{let t=new RegExp(s,`i`);return e.filter(e=>t.test(e)).sort((e,n)=>(e.match(t)?.index||0)-(n.match(t)?.index||0))}catch{return[]}},[s,e]),h=D(()=>{let t=!e.length,n=e.length===1&&e[0]===`0:0`;return!t&&!n},[e]),g=e=>()=>{if(i){let t=Me(i,e);if(t===i)return;a({type:`SET_SERVER`,payload:t}),o({type:`RUN_QUERY`})}p()};return h?F(`div`,{className:`vm-tenant-input`,children:[F(Q,{title:`Define Tenant ID if you need request to another storage`,children:F(`div`,{ref:l,children:n?F(`div`,{className:`vm-mobile-option`,onClick:f,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Kn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Tenant ID`}),F(`span`,{className:`vm-mobile-option-text__value`,children:r})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,fullWidth:!0,startIcon:F(Kn,{}),endIcon:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":d}),children:F(G,{})}),onClick:f,children:r})})}),F(Zr,{open:d,placement:`bottom-right`,onClose:p,buttonRef:l,title:n?`Define Tenant ID`:void 0,children:F(`div`,{className:(0,K.default)({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n}),children:[F(`div`,{className:`vm-tenant-input-list__search`,children:F($,{autofocus:!0,label:`Search`,value:s,onChange:c,type:`search`})}),m.map(e=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":n,"vm-list-item_active":e===r}),onClick:g(e),children:e},e))]})})]}):null};a();function Oi(e){let t=O();return c(()=>{t.current=e},[e]),t.current}var ki=({text:e,href:t,children:n,colored:r=!0,underlined:i=!1,withIcon:a=!1})=>F(`a`,{href:t,className:(0,K.default)({"vm-link":!0,"vm-link_colored":r,"vm-link_underlined":i,"vm-link_with-icon":a}),target:`_blank`,rel:`noreferrer`,children:e||n});a();var Ai=()=>{let e=fe(),{isMobile:t}=J(),{customStep:n,isHistogram:r}=Dr(),{period:{step:i,end:a,start:o}}=W(),s=Or(),{displayType:l}=xr(),d=Oi(a-o),f=D(()=>vt(a-o,r,l),[a,o,r,l]),p=Oi(f),[m,h]=u(n||f),[g,_]=u(``),v=n===f,{value:y,toggle:b,setFalse:x}=Z(!1),S=O(null),C=e=>{let t=e||m||f||`1s`,n=(t.match(/[a-zA-Z]+/g)||[]).length?t:`${t}s`;s({type:`SET_CUSTOM_STEP`,payload:n}),h(n),_(``)},w=()=>{C(),x()},T=()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},E=()=>{C(),w()},k=e=>{let t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every(e=>parseFloat(e)>0),i=n.every(e=>ut.find(t=>t.short===e)),a=r&&i;h(e),_(a?``:V.validStep)};return c(()=>{n&&C(n)},[n]),c(()=>{!n&&f&&C(f)},[f]),c(()=>{a-o===d||!d||n!==p||f&&C(f)},[d,f]),c(()=>{(i===n||i===f)&&C(f)},[r,l]),F(`div`,{className:`vm-step-control`,ref:S,children:[t?F(`div`,{className:`vm-mobile-option`,onClick:b,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Hn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Step`}),F(`span`,{className:`vm-mobile-option-text__value`,children:m})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(X,{className:e?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Hn,{}),onClick:b,children:[`Step: `,v?`auto (${m})`:m]}),F(Zr,{open:y,placement:`bottom-right`,onClose:w,buttonRef:S,title:t?`Query resolution step width`:void 0,children:F(`div`,{className:(0,K.default)({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[F($,{autofocus:!0,label:`Step value`,value:m,error:g,onChange:k,onEnter:E,onFocus:T,onBlur:C,endIcon:F(Q,{title:`Reset to auto step (${f})`,children:F(X,{size:`small`,variant:`text`,color:`primary`,startIcon:F(gn,{}),onClick:()=>{let e=f||`1s`;k(e),C(e)},ariaLabel:`reset step`})})}),F(`div`,{className:`vm-step-control-popper-info`,children:[F(`p`,{children:[F(`code`,{children:`step`}),` - the `,F(ki,{href:`https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations`,text:`interval`}),` between datapoints, which must be returned from the range query. The `,F(`code`,{children:`query`}),` is executed at `,F(`code`,{children:`start`}),`, `,F(`code`,{children:`start+step`}),`, `,F(`code`,{children:`start+2*step`}),`, …, `,F(`code`,{children:`end`}),` timestamps.`]}),F(`p`,{children:[`Read more about `,F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#range-query`,text:`Range`}),` and `,F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#instant-query`,text:`Instant`}),` queries.`]})]})]})})]})},ji=({relativeTime:e,setDuration:t})=>{let{isMobile:n}=J(),r=e=>()=>{t(e)};return F(`div`,{className:(0,K.default)({"vm-time-duration":!0,"vm-time-duration_mobile":n}),children:Dt.map(({id:t,duration:i,until:a,title:o})=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":n,"vm-list-item_active":t===e}),onClick:r({duration:i,until:a(),id:t}),children:o||i},t))})},Mi=({hasPrev:e,hasNext:t,viewDate:n,showArrowNav:r,onChangeViewDate:i,toggleDisplayYears:a})=>F(`div`,{className:`vm-calendar-header`,children:[F(`div`,{className:`vm-calendar-header-left`,onClick:a,children:[F(`span`,{className:`vm-calendar-header-left__date`,children:n.format(`MMMM YYYY`)}),F(`div`,{className:`vm-calendar-header-left__select-year`,children:F(Cn,{})})]}),r&&F(`div`,{className:`vm-calendar-header-right`,children:[F(`div`,{className:(0,K.default)({"vm-calendar-header-right__prev":!0,"vm-calendar-header-right_disabled":!e}),onClick:e?()=>{i(n.subtract(1,`month`))}:void 0,children:F(G,{})}),F(`div`,{className:(0,K.default)({"vm-calendar-header-right__next":!0,"vm-calendar-header-right_disabled":!t}),onClick:t?()=>{i(n.add(1,`month`))}:void 0,children:F(G,{})})]})]});a();var Ni=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],Pi=({minDate:e,maxDate:t,viewDate:n,selectDate:r,onChangeSelectDate:i})=>{let a=`YYYY-MM-DD`,o=L.default.tz(),s=(0,L.default)(n.format(a)),c=D(()=>{let e=Array(42).fill(null),t=s.startOf(`month`),n=s.endOf(`month`).diff(t,`day`)+1,r=Array(n).fill(t).map((e,t)=>e.add(t,`day`)),i=t.day();return e.splice(i,n,...r),e},[s]),l=e=>()=>{e&&i(e)};return F(`div`,{className:`vm-calendar-body`,children:[Ni.map(e=>F(Q,{title:e,children:F(`div`,{className:`vm-calendar-body-cell vm-calendar-body-cell_weekday`,children:e[0]})},e)),c.map((n,i)=>{let s=n&&(e&&n.isBefore(e)||t&&n.isAfter(t));return F(`div`,{className:(0,K.default)({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!n,"vm-calendar-body-cell_day_active":(n&&n.format(a))===r.format(a),"vm-calendar-body-cell_day_today":(n&&n.format(a))===o.format(a),"vm-calendar-body-cell_day_disabled":s}),onClick:s?void 0:l(n),children:n&&n.format(`D`)},n?n.format(a):i)})]})};a();var Fi=({minDate:e,maxDate:t,viewDate:n,onChangeViewDate:r})=>{let i=(0,L.default)().format(`YYYY`),a=D(()=>n.format(`YYYY`),[n]),o=D(()=>{let e=(0,L.default)().subtract(18/2,`year`);return Array(18).fill(e).map((e,t)=>e.add(t,`year`))},[n]);c(()=>{let e=document.getElementById(`vm-calendar-year-${a}`);e&&e.scrollIntoView({block:`center`})},[]);let s=e=>()=>{r(e)};return F(`div`,{className:`vm-calendar-years`,children:o.map(n=>{let r=n&&e&&n.isBefore(e)||t&&n.isAfter(t);return F(`div`,{className:(0,K.default)({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":n.format(`YYYY`)===a,"vm-calendar-years__year_today":n.format(`YYYY`)===i,"vm-calendar-years__year_disabled":r}),id:`vm-calendar-year-${n.format(`YYYY`)}`,onClick:r?void 0:s(n),children:n.format(`YYYY`)},n.format(`YYYY`))})})};a();var Ii=({minDate:e,maxDate:t,viewDate:n,selectDate:r,onChangeViewDate:i})=>{let a=(0,L.default)().format(`MM`),o=D(()=>r.format(`MM`),[r]),s=D(()=>Array(12).fill(``).map((e,t)=>(0,L.default)(n).month(t)),[n]);c(()=>{let e=document.getElementById(`vm-calendar-year-${o}`);e&&e.scrollIntoView({block:`center`})},[]);let l=e=>()=>{i(e)};return F(`div`,{className:`vm-calendar-years`,children:s.map(n=>{let r=n&&(e&&n.isBefore(e)||t&&n.isAfter(t));return F(`div`,{className:(0,K.default)({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":n.format(`MM`)===o,"vm-calendar-years__year_today":n.format(`MM`)===a,"vm-calendar-years__year_disabled":r}),id:`vm-calendar-year-${n.format(`MM`)}`,onClick:r?void 0:l(n),children:n.format(`MMMM`)},n.format(`MM`))})})};a();var Li=function(e){return e[e.days=0]=`days`,e[e.months=1]=`months`,e[e.years=2]=`years`,e}(Li||{}),Ri=({date:e,minDate:t,maxDate:n,format:r=Je,onChange:i})=>{let[a,o]=u(Li.days),[s,l]=u(L.default.tz(e)),[d,f]=u(L.default.tz(e)),p=L.default.tz(),m=p.format(qe)===s.format(qe),{isMobile:h}=J(),g=t?(0,L.default)(t):void 0,_=n?(0,L.default)(n):void 0,v=()=>{o(e=>e===Li.years?Li.days:Li.years)},y=e=>{l(e),o(e=>e===Li.years?Li.months:Li.days)};return c(()=>{d.format()!==L.default.tz(e).format()&&i(d.format(r))},[d]),c(()=>{let t=L.default.tz(e);l(t),f(t)},[e]),F(`div`,{className:(0,K.default)({"vm-calendar":!0,"vm-calendar_mobile":h}),children:[F(Mi,{viewDate:s,onChangeViewDate:y,toggleDisplayYears:v,showArrowNav:a===Li.days,hasPrev:a===Li.days&&(!g||s.startOf(`month`).isAfter(g)),hasNext:a===Li.days&&(!_||s.endOf(`month`).isBefore(_))}),a===Li.days&&F(Pi,{minDate:g,maxDate:_,viewDate:s,selectDate:d,onChangeSelectDate:e=>{f(e)}}),a===Li.years&&F(Fi,{minDate:g,maxDate:_,viewDate:s,onChangeViewDate:y}),a===Li.months&&F(Ii,{minDate:g,maxDate:_,selectDate:d,viewDate:s,onChangeViewDate:y}),!m&&a===Li.days&&F(`div`,{className:`vm-calendar-footer`,children:F(X,{variant:`text`,size:`small`,onClick:()=>{l(p)},children:`show today`})})]})};a();var zi=g(({date:e,targetRef:t,format:n=Je,onChange:r,label:i,minDate:a,maxDate:o},s)=>{let c=D(()=>(0,L.default)(e).isValid()?L.default.tz(e):(0,L.default)().tz(),[e]),{isMobile:l}=J(),{value:u,toggle:d,setFalse:f}=Z(!1);return q(`click`,d,t),q(`keyup`,e=>{(e.key===`Escape`||e.key===`Enter`)&&f()}),F(m,{children:F(Zr,{open:u,buttonRef:t,placement:`bottom-right`,onClose:f,title:l?i:void 0,children:F(`div`,{ref:s,children:F(Ri,{date:c,format:n,onChange:e=>{r(e),f()},minDate:a,maxDate:o})})})})}),Bi=e(y(),1);a();var Vi=(e,t)=>(0,L.default)(e).isValid()?L.default.tz(e).format(t):e,Hi={[Xe]:`9999-99-99T99:99:99`,[qe]:`9999-99-99`,[Je]:`9999-99-99 99:99:99`},Ui=({value:e=``,format:t=Je,minDate:n,maxDate:r,label:i,pickerLabel:a,pickerRef:o,onChange:s,onEnter:l,disabled:d})=>{let f=O(null),[p,m]=u(null),h=Hi[t],[g,_]=u(Vi(e,t)),[v,y]=u(!1),[b,x]=u(!1),S=(0,L.default)(g).isValid()?``:`Invalid date format`;return c(()=>{let n=Vi(e,t);n!==g&&_(n),b&&(l(),x(!1))},[e]),c(()=>{v&&p&&(p.focus(),p.setSelectionRange(11,11),y(!1))},[v]),F(`div`,{className:(0,K.default)({"vm-date-time-input":!0,"vm-date-time-input_error":S,"vm-date-time-input_disabled":d}),children:[F(`label`,{children:i}),F(Bi.default,{tabIndex:1,inputRef:m,mask:h,placeholder:t,value:g,autoCapitalize:`none`,inputMode:`numeric`,maskChar:null,onChange:e=>{_(e.currentTarget.value)},onBlur:()=>{s(g)},onKeyUp:e=>{e.key===`Enter`&&(s(g),x(!0))},disabled:d}),S&&F(`span`,{className:`vm-date-time-input__error-text`,children:S}),F(`div`,{className:`vm-date-time-input__icon`,ref:f,children:F(X,{variant:`text`,color:`gray`,size:`small`,startIcon:F(Tn,{}),ariaLabel:`calendar`,disabled:d})}),F(zi,{label:a,ref:o,date:g,onChange:e=>{_(e),y(!0)},targetRef:f,minDate:n,maxDate:r,format:t})]})};a();var Wi=()=>{let{isMobile:e}=J(),{isDarkTheme:t}=U(),n=O(null),r=fr(),i=D(()=>r.width>1120,[r]),[a,o]=u(),[s,l]=u(),{period:{end:d,start:f},relativeTime:p,timezone:h,duration:g}=W(),_=Bt(),v=fe(),y=Oi(h),{value:b,toggle:x,setFalse:S}=Z(!1),C=D(()=>({region:h,utc:kt(h)}),[h]);c(()=>{o(St(Et(d)))},[h,d]),c(()=>{l(St(Et(f)))},[h,f]);let w=({duration:e,until:t,id:n})=>{_({type:`SET_RELATIVE_TIME`,payload:{duration:e,until:t,id:n}}),S()},T=D(()=>({start:L.default.tz(Et(f)).format(Je),end:L.default.tz(Et(d)).format(Je)}),[f,d,h]),E=D(()=>p&&p!==`none`?p.replace(/_/g,` `):`${T.start} - ${T.end}`,[p,T]),k=O(null),A=O(null),j=O(null),M=()=>{s&&a&&_({type:`SET_PERIOD`,payload:{from:L.default.tz(s).toDate(),to:L.default.tz(a).toDate()}}),S()};return c(()=>{let e=Ot({relativeTimeId:p,defaultDuration:g,defaultEndInput:Et(d)});y&&h!==y&&w({id:e.relativeTimeId,duration:e.duration,until:e.endInput})},[h,y]),Xr(n,t=>{if(e)return;let n=t.target,r=k?.current&&k?.current?.contains(n),i=A?.current&&A?.current?.contains(n);r||i||S()}),F(m,{children:[F(`div`,{ref:j,children:e?F(`div`,{className:`vm-mobile-option`,onClick:x,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(wn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Time range`}),F(`span`,{className:`vm-mobile-option-text__value`,children:E})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:i?`Time range controls`:E,children:F(X,{className:v?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(wn,{}),onClick:x,ariaLabel:`time range controls`,children:i&&F(`span`,{children:E})})})}),F(Zr,{open:b,buttonRef:j,placement:`bottom-right`,onClose:S,clickOutside:!1,title:e?`Time range controls`:``,children:F(`div`,{className:(0,K.default)({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[F(`div`,{className:`vm-time-selector-left`,children:[F(`div`,{className:(0,K.default)({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[F(Ui,{value:s,label:`From:`,pickerLabel:`Date From`,pickerRef:k,onChange:l,onEnter:M}),F(Ui,{value:a,label:`To:`,pickerLabel:`Date To`,pickerRef:A,onChange:o,onEnter:M})]}),F(`div`,{className:`vm-time-selector-left-timezone`,children:[F(`div`,{className:`vm-time-selector-left-timezone__title`,children:C.region}),F(`div`,{className:`vm-time-selector-left-timezone__utc`,children:C.utc})]}),F(X,{variant:`text`,startIcon:F(En,{}),onClick:()=>_({type:`RUN_QUERY_TO_NOW`}),children:`switch to now`}),F(`div`,{className:`vm-time-selector-left__controls`,children:[F(X,{color:`error`,variant:`outlined`,onClick:()=>{o(St(Et(d))),l(St(Et(f))),S()},children:`Cancel`}),F(X,{color:`primary`,onClick:M,children:`Apply`})]})]}),F(ji,{relativeTime:p||``,setDuration:w})]})})]})};a();var Gi=()=>{let[e,t]=v();return{setSearchParamsFromKeys:p(n=>{let r=!!e.size,i=new URLSearchParams(e),a=e.toString();for(let[e,t]of Object.entries(n)){if(t==null||t===``){i.delete(e);continue}let n=String(t);i.get(e)!==n&&i.set(e,n)}a!==i.toString()&&t(i,{replace:!r})},[e,t])}};a();var Ki=()=>{let{isMobile:e}=J(),t=fe(),n=O(null),[r]=v(),{setSearchParamsFromKeys:i}=Gi(),a=r.get(`date`)||(0,L.default)().tz().format(`YYYY-MM-DD`),o=D(()=>L.default.tz(a).format(qe),[a]),s=e=>{i({date:e})};return c(()=>{s(a)},[]),F(`div`,{children:[F(`div`,{ref:n,children:e?F(`div`,{className:`vm-mobile-option`,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Tn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Date control`}),F(`span`,{className:`vm-mobile-option-text__value`,children:o})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:`Date control`,children:F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Tn,{}),children:o})})}),F(zi,{label:`Date control`,date:a||``,format:qe,onChange:s,targetRef:n})]})};a();var qi=[{seconds:0,title:`Off`},{seconds:1,title:`1s`},{seconds:2,title:`2s`},{seconds:5,title:`5s`},{seconds:10,title:`10s`},{seconds:30,title:`30s`},{seconds:60,title:`1m`},{seconds:300,title:`5m`},{seconds:900,title:`15m`},{seconds:1800,title:`30m`},{seconds:3600,title:`1h`},{seconds:7200,title:`2h`}],Ji=({tooltip:e,useAutorefresh:t,closeModal:n})=>{let{isMobile:r}=J(),i=Bt(),a=fe(),[o,s]=u(!1),[l,d]=u(qi[0]),{value:f,toggle:p,setFalse:h}=Z(!1),g=O(null),_=e=>{(o&&!e.seconds||!o&&e.seconds)&&s(e=>!e),d(e),h()},v=()=>{i({type:`RUN_QUERY`}),!t&&r&&n()};c(()=>{let e=l.seconds,t;return o?t=setInterval(()=>{i({type:`RUN_QUERY`})},e*1e3):d(qi[0]),()=>{t&&clearInterval(t)}},[l,o]);let y=e=>()=>{_(e)};return F(m,{children:[F(`div`,{className:`vm-execution-controls`,children:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":r,"vm-header-button":!a,"vm-autorefresh":t}),children:t?r?F(`div`,{className:`vm-mobile-option`,onClick:p,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(gn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Auto-refresh`}),F(`span`,{className:`vm-mobile-option-text__value`,children:l.title})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(m,{children:[F(Q,{title:e,children:F(X,{variant:`contained`,color:`primary`,onClick:v,startIcon:F(Sn,{}),ariaLabel:e})}),F(Q,{title:`Auto-refresh control`,children:F(`div`,{ref:g,children:F(X,{variant:`contained`,color:`primary`,fullWidth:!0,endIcon:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":f}),children:F(G,{})}),onClick:p,children:l.title})})})]}):r?F(`div`,{className:`vm-mobile-option`,onClick:v,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(gn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:F(`span`,{className:`vm-mobile-option-text__label`,children:`Refresh`})})]}):F(X,{variant:`contained`,color:`primary`,onClick:v,startIcon:F(Sn,{}),ariaLabel:e})})}),t&&F(Zr,{open:f,placement:`bottom-right`,onClose:h,buttonRef:g,title:r?`Auto-refresh duration`:void 0,children:F(`div`,{className:(0,K.default)({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":r}),children:qi.map(e=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":e.seconds===l.seconds}),onClick:y(e),children:e.title},e.seconds))})})]})};a();var Yi={enable:`Enable to save the modified server URL to local storage, preventing reset upon page refresh.`,disable:`Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.`},Xi=g(({onClose:e},t)=>{let{serverUrl:r}=U(),i=We(),{value:a,toggle:o}=Z(!!z(`SERVER_URL`)),[s,l]=u(r),[d,f]=u(``),m=e=>{l(e||``),f(``)},h=p(()=>{i({type:`SET_SERVER`,payload:s}),e()},[s]);return c(()=>{r||f(V.emptyServer),De(r)||f(V.validServer)},[r]),c(()=>{a?ge(`SERVER_URL`,s):_e([`SERVER_URL`])},[a]),c(()=>{r!==s&&l(r)},[r]),n(t,()=>({handleApply:h}),[h]),F(`div`,{children:[F(`div`,{className:`vm-server-configurator__title`,children:`Server URL`}),F(`div`,{className:`vm-server-configurator-url`,children:[F($,{autofocus:!0,value:s,error:d,onChange:m,onEnter:h,inputmode:`url`}),F(Q,{title:a?Yi.disable:Yi.enable,children:F(X,{className:`vm-server-configurator-url__button`,variant:`text`,color:a?`primary`:`gray`,onClick:o,startIcon:F(Kn,{})})})]})]})}),Zi=({value:e=!1,disabled:t=!1,label:n,color:r=`secondary`,fullWidth:i,onChange:a})=>{let o=()=>{t||a(!e)};return F(`div`,{className:(0,K.default)({"vm-switch":!0,"vm-switch_full-width":i,"vm-switch_disabled":t,"vm-switch_active":e,[`vm-switch_${r}_active`]:e,[`vm-switch_${r}`]:r}),onClick:o,children:[F(`div`,{className:`vm-switch-track`,children:F(`div`,{className:`vm-switch-track__thumb`})}),n&&F(`span`,{className:`vm-switch__label`,children:n})]})};a();var Qi=[{label:`Graph`,type:B.chart},{label:`JSON`,type:B.code},{label:`Table`,type:B.table}],$i=g(({onClose:e},t)=>{let{isMobile:r}=J(),{seriesLimits:i}=xr(),a=Sr(),o=z(`LEGEND_AUTO_COLLAPSE`),[s,l]=u(o?o===`true`:!0),[d,f]=u(i),[m,h]=u({table:``,chart:``,code:``}),g=()=>{f(ze)},_=e=>t=>{let n=t||``;h(t=>({...t,[e]:+n<0?V.positiveNumber:``})),f({...d,[e]:n||1/0})},v=p(()=>{a({type:`SET_SERIES_LIMITS`,payload:d}),e()},[d]);return c(()=>{ge(`LEGEND_AUTO_COLLAPSE`,`${s}`)},[s]),n(t,()=>({handleApply:v}),[v]),F(`div`,{className:`vm-limits-configurator`,children:[F(`div`,{className:`vm-server-configurator__title`,children:[`Series limits by tabs`,F(Q,{title:`Set to 0 to disable the limit`,children:F(X,{variant:`text`,color:`primary`,size:`small`,startIcon:F(_n,{})})}),F(`div`,{className:`vm-limits-configurator-title__reset`,children:F(X,{variant:`text`,color:`primary`,size:`small`,startIcon:F(gn,{}),onClick:g,children:`Reset limits`})})]}),F(`div`,{className:(0,K.default)({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":r}),children:Qi.map(e=>F(`div`,{children:F($,{label:e.label,value:d[e.type],error:m[e.type],onChange:_(e.type),onEnter:v,type:`number`})},e.type))}),F(`div`,{className:`vm-graph-settings-row`,children:[F(`span`,{className:`vm-graph-settings-row__label`,children:`Auto-collapse legend`}),F(Zi,{value:s,onChange:l,label:s?`Enabled`:`Disabled`,fullWidth:r}),F(`span`,{className:`vm-legend-configs-item__info`,children:[`Collapses the legend when series count exceeds `,100,` to reduce UI load.`]})]})]})});a();var ea=({defaultExpanded:e=!1,onChange:t,title:n,children:r,id:i})=>{let[a,o]=u(e);return c(()=>{o(e)},[e]),F(m,{children:[F(`header`,{className:(0,K.default)({"vm-accordion-header":!0,"vm-accordion-header_open":a}),onClick:e=>{let n=window.getSelection();if(e.target.closest(`button`)){e.preventDefault();return}if(n&&n.toString()){e.preventDefault();return}o(e=>{let n=!e;return t&&t(n),n})},id:i,children:[n,F(`div`,{className:(0,K.default)({"vm-accordion-header__arrow":!0,"vm-accordion-header__arrow_open":a}),children:F(G,{})})]}),a&&F(`section`,{className:`vm-accordion-section`,children:r},`content`)]})},ta=`Browser timezone is not recognized, supported, or could not be determined.`,na=()=>F(Q,{title:ta,children:F(yn,{})});a();var ra=Nt(),ia=g((e,t)=>{let{isMobile:r}=J(),i=At(),{timezone:a,defaultTimezone:o}=W(),s=Bt(),[l,d]=u(a),[f,p]=u(``),m=O(null),{value:h,toggle:g,setFalse:_}=Z(!1),v=D(()=>[{title:`Default time (${o})`,region:o,utc:o?kt(o):`UTC`},{title:ra.title,region:ra.region,utc:kt(ra.region),isInvalid:!ra.isValid},{title:`UTC (Coordinated Universal Time)`,region:`UTC`,utc:`UTC`}].filter(e=>e.region),[o]),y=D(()=>{if(!f)return i;try{return At(f)}catch{return{}}},[f,i]),b=D(()=>Object.keys(y),[y]),x=D(()=>({region:l,utc:kt(l)}),[l]),S=e=>{p(e)},C=e=>{d(e.region),p(``),_()},w=e=>()=>{C(e)};return c(()=>{d(a)},[a]),n(t,()=>({handleApply:()=>{s({type:`SET_TIMEZONE`,payload:l})}}),[l]),F(`div`,{className:`vm-timezones`,children:[F(`div`,{className:`vm-server-configurator__title`,children:`Time zone`}),F(`div`,{className:`vm-timezones-item vm-timezones-item_selected`,onClick:g,ref:m,children:[F(`div`,{className:`vm-timezones-item__title`,children:x.region}),F(`div`,{className:`vm-timezones-item__utc`,children:x.utc}),F(`div`,{className:(0,K.default)({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":h}),children:F(Cn,{})})]}),F(Zr,{open:h,buttonRef:m,placement:`bottom-left`,onClose:_,fullWidth:!0,title:r?`Time zone`:void 0,children:F(`div`,{className:(0,K.default)({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[F(`div`,{className:`vm-timezones-list-header`,children:[F(`div`,{className:`vm-timezones-list-header__search`,children:F($,{autofocus:!0,label:`Search`,value:f,onChange:S})}),v.map((e,t)=>e&&F(`div`,{className:`vm-timezones-item vm-timezones-list-group-options__item`,onClick:w(e),children:[F(`div`,{className:`vm-timezones-item__title`,children:[e.title,e.isInvalid&&F(na,{})]}),F(`div`,{className:`vm-timezones-item__utc`,children:e.utc})]},`${t}_${e.region}`))]}),b.map(e=>F(`div`,{className:`vm-timezones-list-group`,children:F(ea,{defaultExpanded:!0,title:F(`div`,{className:`vm-timezones-list-group__title`,children:e}),children:F(`div`,{className:`vm-timezones-list-group-options`,children:y[e]&&y[e].map(e=>F(`div`,{className:`vm-timezones-item vm-timezones-list-group-options__item`,onClick:w(e),children:[F(`div`,{className:`vm-timezones-item__title`,children:e.region}),F(`div`,{className:`vm-timezones-item__utc`,children:e.utc})]},e.search))})})},e))]})})]})});a();var aa=({options:e,value:t,label:n,onChange:r})=>{let i=O(null),[a,o]=u({width:`0px`,left:`0px`,borderRadius:`0px`}),s=e=>()=>{r(e)};return c(()=>{if(!i.current){o({width:`0px`,left:`0px`,borderRadius:`0px`});return}let n=e.findIndex(e=>e.value===t),{width:r}=i.current.getBoundingClientRect(),a=r,s=n*a,c=`0`;n===0&&(c=`16px 0 0 16px`),n===e.length-1&&(c=`10px`,--s,c=`0 16px 16px 0`),n!==0&&n!==e.length-1&&(a+=1,--s),o({width:`${a}px`,left:`${s}px`,borderRadius:c})},[i,t,e]),F(`div`,{className:`vm-toggles`,children:[n&&F(`label`,{className:`vm-toggles__label`,children:n}),F(`div`,{className:`vm-toggles-group`,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`},children:[a.borderRadius&&F(`div`,{className:`vm-toggles-group__highlight`,style:a}),e.map((e,n)=>F(`div`,{className:(0,K.default)({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":n===0,"vm-toggles-group-item_active":e.value===t,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:s(e.value),ref:e.value===t?i:null,children:[e.icon,e.title]},e.value))]})]})},oa=Object.values(xe).map(e=>({title:e,value:e})),sa=()=>{let{isMobile:e}=J(),t=We(),{theme:n}=U();return F(`div`,{className:(0,K.default)({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[F(`div`,{className:`vm-server-configurator__title`,children:`Theme preferences`}),F(`div`,{className:`vm-theme-control__toggle`,children:F(aa,{options:oa,value:n,onChange:e=>{t({type:`SET_THEME`,payload:e})}})},`${e}`)]})};a();var ca=`Settings`,la=()=>{let{isMobile:e}=J(),t=fe(),n=O(null),r=O(null),i=O(null),{value:a,setTrue:o,setFalse:s}=Z(!1),c=()=>{n.current&&n.current.handleApply(),r.current&&r.current.handleApply(),i.current&&i.current.handleApply(),s()},l=[{show:!t,component:F(Xi,{ref:n,onClose:s})},{show:!0,component:F($i,{ref:r,onClose:s})},{show:!0,component:F(ia,{ref:i})},{show:!t,component:F(sa,{})}].filter(e=>e.show);return F(m,{children:[e?F(`div`,{className:`vm-mobile-option`,onClick:o,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(mn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:F(`span`,{className:`vm-mobile-option-text__label`,children:ca})}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:ca,children:F(X,{className:(0,K.default)({"vm-header-button":!t}),variant:`contained`,color:`primary`,startIcon:F(mn,{}),onClick:o,ariaLabel:`settings`})}),a&&F(ri,{title:ca,onClose:s,children:F(`div`,{className:(0,K.default)({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[l.map((e,t)=>F(`div`,{className:`vm-server-configurator__input`,children:e.component},t)),F(`div`,{className:`vm-server-configurator-footer`,children:[F(X,{color:`error`,variant:`outlined`,onClick:s,children:`Cancel`}),F(X,{color:`primary`,variant:`contained`,onClick:c,children:`Apply`})]})]})})]})},ua=({displaySidebar:e,isMobile:t,headerSetup:n,accountIds:r,closeModal:i})=>F(`div`,{className:(0,K.default)({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[n?.tenant&&F(Di,{accountIds:r||[]}),n?.stepControl&&F(Ai,{}),n?.timeSelector&&F(Wi,{}),n?.cardinalityDatePicker&&F(Ki,{}),n?.executionControls&&F(Ji,{tooltip:n?.executionControls?.tooltip,useAutorefresh:n?.executionControls?.useAutorefresh,closeModal:i}),F(la,{}),!e&&F(hi,{})]});a();var da=!!z(`DISABLED_DEFAULT_TIMEZONE`),fa=()=>{let{serverUrl:e}=U(),t=Bt(),[n,r]=u(!1),[i,a]=u(``),o=e=>{let n=e.toLowerCase()===`local`?Nt().region:e;try{if((0,L.default)().tz(n).isValid(),t({type:`SET_DEFAULT_TIMEZONE`,payload:n}),da)return;t({type:`SET_TIMEZONE`,payload:n})}catch(e){e instanceof Error&&a(`${e.name}: ${e.message}`)}},s=async()=>{if(e){a(``),r(!0);try{let t=await fetch(`${e}/vmui/timezone`),n=await t.json();t.ok?(o(n.timezone),r(!1)):(a(n.error),r(!1))}catch(e){r(!1),e instanceof Error&&a(`${e.name}: ${e.message}`)}}};return c(()=>{s()},[e]),{isLoading:n,error:i}};a();var pa=()=>{let{serverUrl:e}=U(),t=We(),[n,r]=u(!1),[i,a]=u(``);return c(()=>{(async()=>{a(``),r(!0);try{t({type:`SET_APP_CONFIG`,payload:await(await fetch(`${e}/vmui/config.json`)).json()||{}})}catch(e){r(!1),e instanceof Error&&a(`${e.name}: ${e.message}`)}})()},[e]),{isLoading:n,error:i}},ma=function(e){return e.NO_STORAGE=`NO_STORAGE`,e.SECURITY_ERROR=`SECURITY_ERROR`,e.QUOTA_EXCEEDED=`QUOTA_EXCEEDED`,e.UNKNOWN=`UNKNOWN`,e}({}),ha={[ma.NO_STORAGE]:{title:`Storage unavailable`,description:`Browser storage is not available for this website.`,fix:[`Disable Private/Incognito mode and reload the page.`,`Disable privacy or ad-blocking extensions for this site and reload.`,`Open the site in another browser.`]},[ma.SECURITY_ERROR]:{title:`Storage access blocked`,description:`Browser settings or an extension are blocking access to browser storage.`,fix:[`Disable Private/Incognito mode and reload the page.`,`Disable privacy or ad-blocking extensions for this site and reload.`,`Open the site in a regular browser tab (not embedded).`]},[ma.QUOTA_EXCEEDED]:{title:`Storage quota exceeded`,description:`The storage limit for this website has been reached.`,fix:[`Clear this website’s stored data and reload the page.`,`Close other tabs for this website and try again.`,`Use another browser or browser profile.`]},[ma.UNKNOWN]:{title:`Storage error`,description:`An unexpected error occurred while accessing browser storage.`,fix:[`Reload the page.`,`Update the browser and try again.`,`Disable browser extensions and reload.`]}};a();var ga=e=>{if(!(e instanceof DOMException))return ma.UNKNOWN;switch(e.name){case`QuotaExceededError`:return ma.QUOTA_EXCEEDED;case`SecurityError`:return ma.SECURITY_ERROR;default:return ma.UNKNOWN}},_a=e=>{if(!e)return ma.NO_STORAGE;try{let t=`__vmui_test__`;return e.setItem(t,`1`),e.removeItem(t),null}catch(e){return ga(e)}},va=()=>{let{showInfoMessage:e}=Hr();return c(()=>{let t=_a(window.localStorage);if(t){let{title:n,description:r,fix:i}=ha[t];e({text:F(`div`,{className:`vm-storage-check`,children:[F(`h3`,{children:n}),F(`p`,{children:r}),!!i?.length&&F(`div`,{className:`vm-storage-check__fix`,children:[F(`div`,{children:`Try this:`}),F(`ul`,{children:i.map((e,t)=>F(`li`,{children:e},`${t}-${e}`))})]})]}),type:`error`,timeout:6e5})}},[]),null};a();var ya=()=>{let e=fe(),{isMobile:t}=J(),{pathname:n}=T(),[r,i]=v();return Ti(),fa(),pa(),c(()=>{let e=`vmui`,t=ue[n]?.title;document.title=t?`${t} - ${e}`:e},[n]),c(()=>{let{search:e,href:t}=window.location;if(e){let t=Re.default.parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach(([e,t])=>r.set(e,t)),i(r),window.location.search=``}let n=t.replace(/\/\?#\//,`/#/`);n!==t&&window.location.replace(n)},[]),c(()=>{let e=ve();(e.removed.length||e.migrated.length)&&console.info(e)},[]),F(`section`,{className:`vm-container`,children:[F(xi,{controlsComponent:ua}),F(`div`,{className:(0,K.default)({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:F(C,{})}),!e&&F(Ci,{}),F(va,{})]})},ba=`No match! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-C8Kwp93_.js","./rolldown-runtime-COnpUsM8.js","./vendor-CnsZ1jie.css"])))=>i.map(i=>d[i]); +import{a as e,r as t}from"./rolldown-runtime-COnpUsM8.js";import{A as n,B as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,R as m,S as h,T as g,V as _,_ as v,a as y,b,c as x,d as S,f as C,g as w,h as T,i as E,j as D,k as O,l as k,m as A,n as j,o as M,p as N,r as P,s as F,u as I,v as ee,w as te,x as ne,y as re,z as ie}from"./vendor-C8Kwp93_.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),r(),a();var L=e(i(),1),ae=e(h(),1),oe=e(ne(),1),se=e(b(),1),ce=e(re(),1);L.default.extend(ae.default),L.default.extend(oe.default),L.default.extend(ce.default),L.default.extend(se.default);var R={home:`/`,metrics:`/metrics`,dashboards:`/dashboards`,cardinality:`/cardinality`,topQueries:`/top-queries`,trace:`/trace`,withTemplate:`/expand-with-exprs`,relabel:`/relabeling`,activeQueries:`/active-queries`,queryAnalyzer:`/query-analyzer`,icons:`/icons`,query:`/query`,rawQuery:`/raw-query`,downsamplingDebug:`/downsampling-filters-debug`,retentionDebug:`/retention-filters-debug`,rules:`/rules`,notifiers:`/notifiers`},le={header:{tenant:!0,stepControl:!0,timeSelector:!0,executionControls:{tooltip:`Refresh dashboard`,useAutorefresh:!0}}},ue={[R.home]:{title:`Query`,...le},[R.rawQuery]:{title:`Raw query`,header:{tenant:!0,stepControl:!1,timeSelector:!0,executionControls:{tooltip:`Refresh dashboard`,useAutorefresh:!0}}},[R.metrics]:{title:`Explore Prometheus metrics`,header:{tenant:!0,stepControl:!0,timeSelector:!0}},[R.cardinality]:{title:`Explore cardinality`,header:{tenant:!0,cardinalityDatePicker:!0}},[R.topQueries]:{title:`Top queries`,header:{tenant:!0}},[R.trace]:{title:`Trace analyzer`,header:{}},[R.queryAnalyzer]:{title:`Query analyzer`,header:{}},[R.dashboards]:{title:`Dashboards`,...le},[R.rules]:{title:`Rules`,header:{executionControls:{tooltip:`Refresh alerts`,useAutorefresh:!1}}},[R.notifiers]:{title:`Notifiers`,header:{executionControls:{tooltip:`Refresh notifiers`,useAutorefresh:!1}}},[R.withTemplate]:{title:`WITH templates`,header:{}},[R.relabel]:{title:`Metric relabel debug`,header:{}},[R.activeQueries]:{title:`Active Queries`,header:{}},[R.icons]:{title:`Icons`,header:{}},[R.query]:{title:`Query`,...le},[R.downsamplingDebug]:{title:`Downsampling filters debug`,header:{}},[R.retentionDebug]:{title:`Retention filters debug`,header:{}}},de=()=>{let e=document.getElementById(`root`)?.dataset.params||`{}`;try{return JSON.parse(e)}catch(e){return console.error(e),{}}},fe=()=>!!Object.keys(de()).length,pe=`VMUI:`,me=[`AUTOCOMPLETE`,`NO_CACHE`,`QUERY_TRACING`,`SERIES_LIMITS`,`LEGEND_AUTO_COLLAPSE`,`TABLE_COMPACT`,`TIMEZONE`,`DISABLED_DEFAULT_TIMEZONE`,`THEME`,`EXPLORE_METRICS_TIPS`,`METRICS_QUERY_HISTORY`,`SERVER_URL`,`POINTS_SHOW_ALL`],he=e=>`${pe}${e}`,ge=(e,t,n=!0)=>{try{let r=n?he(e):e;t?window.localStorage.setItem(r,JSON.stringify({value:t})):window.localStorage.removeItem(r),window.dispatchEvent(new Event(`storage`))}catch(e){console.error(e)}},z=(e,t=!0)=>{let n=t?he(e):e,r=window.localStorage.getItem(n);if(r!==null)try{return JSON.parse(r)?.value}catch{return r}},_e=(e,t=!0)=>{(t?e.map(he):e).forEach(e=>window.localStorage.removeItem(e))},ve=()=>{let e={migrated:[],removed:[],skipped:[]};for(let t of me){let n=t,r=z(n,!1),i=z(n,!0);if(r===void 0){e.skipped.push(n);continue}if(i!==void 0){_e([n],!1),e.removed.push(n);continue}ge(n,r,!0),_e([n],!1),e.migrated.push(n)}return e},ye=e=>e.replace(/(\/(?:prometheus\/)?(?:graph|vmui)\/.*|\/#\/.*)/,`/prometheus`),be=()=>{let{serverURL:e}=de(),t=z(`SERVER_URL`),n=ye(window.location.href);return e||t||n},B=function(e){return e.table=`table`,e.chart=`chart`,e.code=`code`,e}({}),V=function(e){return e.emptyServer=`Please enter Server URL`,e.validServer=`Please provide a valid Server URL`,e.validQuery=`Please enter a valid Query and execute it`,e.traceNotFound=`Not found the tracing information`,e.emptyTitle=`Please enter title`,e.positiveNumber=`Please enter positive number`,e.validStep=`Please enter a valid step`,e.unknownType=`Unknown server response format: must have 'errorType'`,e}({}),xe=function(e){return e.system=`system`,e.light=`light`,e.dark=`dark`,e}({}),Se=function(e){return e.empty=`empty`,e.metricsql=`metricsql`,e.label=`label`,e.labelValue=`labelValue`,e}({}),Ce=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),we=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},Te=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,Ee=e=>e===xe.system&&Te()||e===xe.dark,De=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`http:`||t.protocol===`https:`},Oe=e=>e.replace(/\/$/,``),ke=(e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0},Ae=e=>{try{let t=e.match(/\/api\/v1\/[^?]+/);return t?t[0]:null}catch(e){return console.error(`Invalid URL:`,e),null}},je=/(\/select\/)(\d+(?::\d+)?)(\/.*)?$/,Me=(e,t)=>e.replace(je,`$1${t}$3`),Ne=e=>e.match(je)?.[2]??``,Pe=e=>e.replace(je,``),Fe=Oe(be()),Ie={serverUrl:Fe,tenantId:Ne(Fe),theme:z(`THEME`)||xe.system,isDarkTheme:null,appConfig:{}};function Le(e,t){switch(t.type){case`SET_SERVER`:return{...e,tenantId:Ne(t.payload),serverUrl:Oe(t.payload)};case`SET_THEME`:return ge(`THEME`,t.payload),{...e,theme:t.payload};case`SET_DARK_THEME`:return{...e,isDarkTheme:Ee(e.theme)};case`SET_APP_CONFIG`:return{...e,appConfig:t.payload};default:throw Error()}}var Re=e(x(),1),ze={table:100,chart:20,code:1e3},Be=[{id:`small`,isDefault:!0,height:()=>window.innerHeight*.2},{id:`medium`,height:()=>window.innerHeight*.4},{id:`large`,height:()=>window.innerHeight*.8}],Ve=[`min`,`median`,`max`],H=(e,t)=>{let n=window.location.hash.split(`?`)[1];return Re.default.parse(n,{ignoreQueryPrefix:!0})?.[e]||t||``},He=()=>{let e=(window.location.hash.split(`?`)[1]||``).match(/g\d+\.expr/g)?.length||1;return Array(e>10?10:e).fill(1).map((e,t)=>H(`g${t}.expr`,``))},Ue=ie({}),U=()=>s(Ue).state,We=()=>s(Ue).dispatch,Ge=Object.entries(Ie).reduce((e,[t,n])=>({...e,[t]:H(t)||n}),{}),Ke=({children:e})=>{let[t,n]=d(Le,Ge),r=D(()=>({state:t,dispatch:n}),[t,n]);return c(()=>{t.serverUrl&&(z(`SERVER_URL`)?ge(`SERVER_URL`,t.serverUrl):_e([`SERVER_URL`]))},[t.serverUrl]),F(Ue.Provider,{value:r,children:e})},qe=`YYYY-MM-DD`,Je=`YYYY-MM-DD HH:mm:ss`,Ye=`YYYY-MM-DD HH:mm:ss:SSS (Z)`,Xe=`YYYY-MM-DD[T]HH:mm:ss`,Ze=`YYYY-MM-DD_HHmmss`,Qe=`Africa/Abidjan.Africa/Accra.Africa/Addis_Ababa.Africa/Algiers.Africa/Asmera.Africa/Bamako.Africa/Bangui.Africa/Banjul.Africa/Bissau.Africa/Blantyre.Africa/Brazzaville.Africa/Bujumbura.Africa/Cairo.Africa/Casablanca.Africa/Ceuta.Africa/Conakry.Africa/Dakar.Africa/Dar_es_Salaam.Africa/Djibouti.Africa/Douala.Africa/El_Aaiun.Africa/Freetown.Africa/Gaborone.Africa/Harare.Africa/Johannesburg.Africa/Juba.Africa/Kampala.Africa/Khartoum.Africa/Kigali.Africa/Kinshasa.Africa/Lagos.Africa/Libreville.Africa/Lome.Africa/Luanda.Africa/Lubumbashi.Africa/Lusaka.Africa/Malabo.Africa/Maputo.Africa/Maseru.Africa/Mbabane.Africa/Mogadishu.Africa/Monrovia.Africa/Nairobi.Africa/Ndjamena.Africa/Niamey.Africa/Nouakchott.Africa/Ouagadougou.Africa/Porto-Novo.Africa/Sao_Tome.Africa/Tripoli.Africa/Tunis.Africa/Windhoek.America/Adak.America/Anchorage.America/Anguilla.America/Antigua.America/Araguaina.America/Argentina/La_Rioja.America/Argentina/Rio_Gallegos.America/Argentina/Salta.America/Argentina/San_Juan.America/Argentina/San_Luis.America/Argentina/Tucuman.America/Argentina/Ushuaia.America/Aruba.America/Asuncion.America/Bahia.America/Bahia_Banderas.America/Barbados.America/Belem.America/Belize.America/Blanc-Sablon.America/Boa_Vista.America/Bogota.America/Boise.America/Buenos_Aires.America/Cambridge_Bay.America/Campo_Grande.America/Cancun.America/Caracas.America/Catamarca.America/Cayenne.America/Cayman.America/Chicago.America/Chihuahua.America/Coral_Harbour.America/Cordoba.America/Costa_Rica.America/Creston.America/Cuiaba.America/Curacao.America/Danmarkshavn.America/Dawson.America/Dawson_Creek.America/Denver.America/Detroit.America/Dominica.America/Edmonton.America/Eirunepe.America/El_Salvador.America/Fort_Nelson.America/Fortaleza.America/Glace_Bay.America/Godthab.America/Goose_Bay.America/Grand_Turk.America/Grenada.America/Guadeloupe.America/Guatemala.America/Guayaquil.America/Guyana.America/Halifax.America/Havana.America/Hermosillo.America/Indiana/Knox.America/Indiana/Marengo.America/Indiana/Petersburg.America/Indiana/Tell_City.America/Indiana/Vevay.America/Indiana/Vincennes.America/Indiana/Winamac.America/Indianapolis.America/Inuvik.America/Iqaluit.America/Jamaica.America/Jujuy.America/Juneau.America/Kentucky/Monticello.America/Kralendijk.America/La_Paz.America/Lima.America/Los_Angeles.America/Louisville.America/Lower_Princes.America/Maceio.America/Managua.America/Manaus.America/Marigot.America/Martinique.America/Matamoros.America/Mazatlan.America/Mendoza.America/Menominee.America/Merida.America/Metlakatla.America/Mexico_City.America/Miquelon.America/Moncton.America/Monterrey.America/Montevideo.America/Montreal.America/Montserrat.America/Nassau.America/New_York.America/Nipigon.America/Nome.America/Noronha.America/North_Dakota/Beulah.America/North_Dakota/Center.America/North_Dakota/New_Salem.America/Ojinaga.America/Panama.America/Pangnirtung.America/Paramaribo.America/Phoenix.America/Port-au-Prince.America/Port_of_Spain.America/Porto_Velho.America/Puerto_Rico.America/Punta_Arenas.America/Rainy_River.America/Rankin_Inlet.America/Recife.America/Regina.America/Resolute.America/Rio_Branco.America/Santa_Isabel.America/Santarem.America/Santiago.America/Santo_Domingo.America/Sao_Paulo.America/Scoresbysund.America/Sitka.America/St_Barthelemy.America/St_Johns.America/St_Kitts.America/St_Lucia.America/St_Thomas.America/St_Vincent.America/Swift_Current.America/Tegucigalpa.America/Thule.America/Thunder_Bay.America/Tijuana.America/Toronto.America/Tortola.America/Vancouver.America/Whitehorse.America/Winnipeg.America/Yakutat.America/Yellowknife.Antarctica/Casey.Antarctica/Davis.Antarctica/DumontDUrville.Antarctica/Macquarie.Antarctica/Mawson.Antarctica/McMurdo.Antarctica/Palmer.Antarctica/Rothera.Antarctica/Syowa.Antarctica/Troll.Antarctica/Vostok.Arctic/Longyearbyen.Asia/Aden.Asia/Almaty.Asia/Amman.Asia/Anadyr.Asia/Aqtau.Asia/Aqtobe.Asia/Ashgabat.Asia/Atyrau.Asia/Baghdad.Asia/Bahrain.Asia/Baku.Asia/Bangkok.Asia/Barnaul.Asia/Beirut.Asia/Bishkek.Asia/Brunei.Asia/Calcutta.Asia/Chita.Asia/Choibalsan.Asia/Colombo.Asia/Damascus.Asia/Dhaka.Asia/Dili.Asia/Dubai.Asia/Dushanbe.Asia/Famagusta.Asia/Gaza.Asia/Hebron.Asia/Hong_Kong.Asia/Hovd.Asia/Irkutsk.Asia/Jakarta.Asia/Jayapura.Asia/Jerusalem.Asia/Kabul.Asia/Kamchatka.Asia/Karachi.Asia/Katmandu.Asia/Khandyga.Asia/Krasnoyarsk.Asia/Kuala_Lumpur.Asia/Kuching.Asia/Kuwait.Asia/Macau.Asia/Magadan.Asia/Makassar.Asia/Manila.Asia/Muscat.Asia/Nicosia.Asia/Novokuznetsk.Asia/Novosibirsk.Asia/Omsk.Asia/Oral.Asia/Phnom_Penh.Asia/Pontianak.Asia/Pyongyang.Asia/Qatar.Asia/Qostanay.Asia/Qyzylorda.Asia/Rangoon.Asia/Riyadh.Asia/Saigon.Asia/Sakhalin.Asia/Samarkand.Asia/Seoul.Asia/Shanghai.Asia/Singapore.Asia/Srednekolymsk.Asia/Taipei.Asia/Tashkent.Asia/Tbilisi.Asia/Tehran.Asia/Thimphu.Asia/Tokyo.Asia/Tomsk.Asia/Ulaanbaatar.Asia/Urumqi.Asia/Ust-Nera.Asia/Vientiane.Asia/Vladivostok.Asia/Yakutsk.Asia/Yekaterinburg.Asia/Yerevan.Atlantic/Azores.Atlantic/Bermuda.Atlantic/Canary.Atlantic/Cape_Verde.Atlantic/Faeroe.Atlantic/Madeira.Atlantic/Reykjavik.Atlantic/South_Georgia.Atlantic/St_Helena.Atlantic/Stanley.Australia/Adelaide.Australia/Brisbane.Australia/Broken_Hill.Australia/Currie.Australia/Darwin.Australia/Eucla.Australia/Hobart.Australia/Lindeman.Australia/Lord_Howe.Australia/Melbourne.Australia/Perth.Australia/Sydney.Europe/Amsterdam.Europe/Andorra.Europe/Astrakhan.Europe/Athens.Europe/Belgrade.Europe/Berlin.Europe/Bratislava.Europe/Brussels.Europe/Bucharest.Europe/Budapest.Europe/Busingen.Europe/Chisinau.Europe/Copenhagen.Europe/Dublin.Europe/Gibraltar.Europe/Guernsey.Europe/Helsinki.Europe/Isle_of_Man.Europe/Istanbul.Europe/Jersey.Europe/Kaliningrad.Europe/Kiev.Europe/Kirov.Europe/Lisbon.Europe/Ljubljana.Europe/London.Europe/Luxembourg.Europe/Madrid.Europe/Malta.Europe/Mariehamn.Europe/Minsk.Europe/Monaco.Europe/Moscow.Europe/Oslo.Europe/Paris.Europe/Podgorica.Europe/Prague.Europe/Riga.Europe/Rome.Europe/Samara.Europe/San_Marino.Europe/Sarajevo.Europe/Saratov.Europe/Simferopol.Europe/Skopje.Europe/Sofia.Europe/Stockholm.Europe/Tallinn.Europe/Tirane.Europe/Ulyanovsk.Europe/Uzhgorod.Europe/Vaduz.Europe/Vatican.Europe/Vienna.Europe/Vilnius.Europe/Volgograd.Europe/Warsaw.Europe/Zagreb.Europe/Zaporozhye.Europe/Zurich.Indian/Antananarivo.Indian/Chagos.Indian/Christmas.Indian/Cocos.Indian/Comoro.Indian/Kerguelen.Indian/Mahe.Indian/Maldives.Indian/Mauritius.Indian/Mayotte.Indian/Reunion.Pacific/Apia.Pacific/Auckland.Pacific/Bougainville.Pacific/Chatham.Pacific/Easter.Pacific/Efate.Pacific/Enderbury.Pacific/Fakaofo.Pacific/Fiji.Pacific/Funafuti.Pacific/Galapagos.Pacific/Gambier.Pacific/Guadalcanal.Pacific/Guam.Pacific/Honolulu.Pacific/Johnston.Pacific/Kiritimati.Pacific/Kosrae.Pacific/Kwajalein.Pacific/Majuro.Pacific/Marquesas.Pacific/Midway.Pacific/Nauru.Pacific/Niue.Pacific/Norfolk.Pacific/Noumea.Pacific/Pago_Pago.Pacific/Palau.Pacific/Pitcairn.Pacific/Ponape.Pacific/Port_Moresby.Pacific/Rarotonga.Pacific/Saipan.Pacific/Tahiti.Pacific/Tarawa.Pacific/Tongatapu.Pacific/Truk.Pacific/Wake.Pacific/Wallis`.split(`.`);function $e(e,t,n=0,r=e.length-1,i=tt){for(;r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1);$e(e,t,Math.max(n,Math.floor(t-o*c/a+l)),Math.min(r,Math.floor(t+(a-o)*c/a+l)),i)}let a=e[t],o=n,s=r;for(et(e,n,t),i(e[r],a)>0&&et(e,n,r);o0;)s--}i(e[n],a)===0?et(e,n,s):(s++,et(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}}function et(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function tt(e,t){return et)}var nt=e=>Math.round(e*1e3)/1e3,rt=e=>{let t=e.length;if(t===0)return null;let n=t>>1;$e(e,n);let r=e[n];if(t&1)return r;let i=-1/0;for(let t=0;ti&&(i=n)}return(i+r)/2},it=(e,t)=>{let n=!!t.min,r=!!t.max,i=!!t.avg,a=!!t.median;if(!n&&!r&&!i&&!a)return{min:null,max:null,median:null,avg:null};let o=1/0,s=-1/0,c=0,l=0,u=[];for(let t of e)t==null||!Number.isFinite(t)||(n&&ts&&(s=t),i&&(l++,c+=(t-c)/l),a&&u.push(t));return{min:Number.isFinite(o)?o:null,max:Number.isFinite(s)?s:null,avg:l?c:null,median:u&&a?rt(u):null}},at=window.innerWidth/4,ot=window.innerWidth/40,st={min:1,max:1578e8},ct=Intl.supportedValuesOf,lt=ct?ct(`timeZone`):Qe,ut=[{long:`years`,short:`y`,possible:`year`},{long:`weeks`,short:`w`,possible:`week`},{long:`days`,short:`d`,possible:`day`},{long:`hours`,short:`h`,possible:`hour`},{long:`minutes`,short:`m`,possible:`min`},{long:`seconds`,short:`s`,possible:`sec`},{long:`milliseconds`,short:`ms`,possible:`millisecond`}],dt=ut.map(e=>e.short),ft=(e,t)=>nt(e)===nt(t),pt=e=>wt(L.default.duration(e,`seconds`).asMilliseconds()),mt=e=>{let t=nt(e),n=Math.round(e);return e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(e*40)/40),pt(t||.001).replace(/\s/g,``)},ht=e=>{if(!e)return;let t=e.trim().replace(/,/g,`.`).match(/\d*\.?\d+\s*[a-zA-Z]+/g);if(!t)return;let n={};for(let e of t){let t=e.match(/\d*\.?\d+/)?.[0],r=e.match(/[a-zA-Z]+/)?.[0]?.toLowerCase();if(!t||!r||!dt.includes(r))return;n[r]=t}return Object.keys(n).length?n:void 0},gt=e=>{let t=ut.map(e=>e.short).join(`|`),n=RegExp(`\\d+(\\.\\d+)?[${t}]+`,`g`),r=(e.match(n)||[]).reduce((e,t)=>{let n=ht(t);return n?{...e,...n}:{...e}},{});return L.default.duration(r).asSeconds()},_t=[B.table,B.code],vt=(e,t,n)=>n&&_t.includes(n)?mt(e):mt(e/(t?ot:at)),yt=(e,t)=>{let n=(t||(0,L.default)().toDate()).valueOf()/1e3,r=gt(e);return{start:n-r,end:n,step:vt(r),date:xt(t||(0,L.default)().toDate())}},bt=e=>(0,L.default)(e).utcOffset(0,!0).toDate(),xt=e=>L.default.tz(e).utc().format(Xe),St=e=>L.default.tz(e).format(Xe),Ct=()=>(0,L.default)().utc().format(Xe),wt=e=>{let t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),a=Math.floor(e/(1e3*60*60*24)),o=[`d`,`h`,`m`,`s`,`ms`];return[a,i,r,n,t].map((e,t)=>e?`${e}${o[t]}`:``).filter(e=>e).join(``)},Tt=e=>wt(e.to.valueOf()-e.from.valueOf()),Et=e=>{let t=(0,L.default)(e*1e3);return t.isValid()?t.toDate():new Date},Dt=[{title:`Last 5 minutes`,duration:`5m`},{title:`Last 15 minutes`,duration:`15m`},{title:`Last 30 minutes`,duration:`30m`,isDefault:!0},{title:`Last 1 hour`,duration:`1h`},{title:`Last 3 hours`,duration:`3h`},{title:`Last 6 hours`,duration:`6h`},{title:`Last 12 hours`,duration:`12h`},{title:`Last 24 hours`,duration:`24h`},{title:`Last 2 days`,duration:`2d`},{title:`Last 7 days`,duration:`7d`},{title:`Last 30 days`,duration:`30d`},{title:`Last 90 days`,duration:`90d`},{title:`Last 180 days`,duration:`180d`},{title:`Last 1 year`,duration:`1y`},{title:`Yesterday`,duration:`1d`,until:()=>(0,L.default)().tz().subtract(1,`day`).endOf(`day`).toDate()},{title:`Today`,duration:`1d`,until:()=>(0,L.default)().tz().endOf(`day`).toDate()}].map(e=>({id:e.title.replace(/\s/g,`_`).toLocaleLowerCase(),until:e.until?e.until:()=>(0,L.default)().tz().toDate(),...e})),Ot=({relativeTimeId:e,defaultDuration:t,defaultEndInput:n})=>{let r=Dt.find(e=>e.isDefault)?.id,i=e||H(`g0.relative_time`,r),a=Dt.find(e=>e.id===i);return{relativeTimeId:a?i:`none`,duration:a?a.duration:t,endInput:a?a.until():n}},kt=e=>`UTC${(0,L.default)().tz(e).format(`Z`)}`,At=(e=``)=>{let t=new RegExp(e,`i`);return lt.reduce((n,r)=>{let i=(r.match(/^(.*?)\//)||[])[1]||`unknown`,a=kt(r),o=a.replace(/UTC|0/,``),s={region:r,utc:a,search:`${r} ${a} ${r.replace(/[/_]/g,` `)} ${o}`},c=!e||e&&t.test(s.search);return c&&n[i]?n[i].push(s):c&&(n[i]=[s]),n},{})},jt=e=>{L.default.tz.setDefault(e)},Mt=e=>{try{return(0,L.default)().tz(e),!0}catch{return!1}},Nt=()=>{let e=L.default.tz.guess(),t=Mt(e);return{isValid:t,title:t?`Browser Time (${e})`:`Browser timezone (UTC)`,region:t?e:`UTC`}},Pt=e=>{if(!e)return 0n;let t=(0,L.default)(e).valueOf();if(!e.includes(`.`))return BigInt(t)*1000000n;let n=e.match(/\.(\d+)Z/);if(!n)return BigInt(t)*1000000n;let r=n[1];r=r.padEnd(9,`0`);let i=parseInt(r.slice(3),10);return BigInt(t)*1000000n+BigInt(i)},Ft=z(`TIMEZONE`)||Nt().region;jt(Ft);var It=()=>{let e=H(`g0.range_input`),{duration:t,endInput:n,relativeTimeId:r}=Ot({defaultDuration:e||`1h`,defaultEndInput:bt(H(`g0.end_input`,Ct())),relativeTimeId:e?H(`g0.relative_time`,`none`):void 0});return{duration:t,period:yt(t,n),relativeTime:r}},Lt={...It(),timezone:Ft};function Rt(e,t){switch(t.type){case`SET_TIME_STATE`:return{...e,...t.payload};case`SET_DURATION`:return{...e,duration:t.payload,period:yt(t.payload,Et(e.period.end)),relativeTime:`none`};case`SET_RELATIVE_TIME`:return{...e,duration:t.payload.duration,period:yt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case`SET_PERIOD`:let n=Tt(t.payload);return{...e,duration:n,period:yt(n,t.payload.to),relativeTime:`none`};case`RUN_QUERY`:let{duration:r,endInput:i}=Ot({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Et(e.period.end)});return{...e,period:yt(r,i)};case`RUN_QUERY_TO_NOW`:return{...e,period:yt(e.duration)};case`SET_TIMEZONE`:return jt(t.payload),ge(`TIMEZONE`,t.payload),e.defaultTimezone&&ge(`DISABLED_DEFAULT_TIMEZONE`,t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case`SET_DEFAULT_TIMEZONE`:return{...e,defaultTimezone:t.payload};default:throw Error()}}a();var zt=ie({}),W=()=>s(zt).state,Bt=()=>s(zt).dispatch,Vt=({children:e})=>{let[t,n]=d(Rt,Lt),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(zt.Provider,{value:r,children:e})},Ht=e=>{let t=z(e);return t?JSON.parse(t):{}},Ut=(e,t,n)=>{let r=Ht(e);ge(e,JSON.stringify({...r,[t]:n}))},Wt=(e,t)=>Ht(e)[t]||[],Gt=(e,t)=>{let n=t.map(e=>e.values[e.index]),r=Ht(e),i=r.QUERY_HISTORY||[];i[0]||=[];let a=i[0];n.forEach(e=>{!a.includes(e)&&e&&a.unshift(e),a.length>250&&a.pop()});let o={...r,QUERY_HISTORY:[a]};ge(e,JSON.stringify(o))},Kt=(e,t)=>{Ut(e,`QUERY_FAVORITES`,t)},qt=(e,t)=>{let n=Ht(e);ge(e,JSON.stringify({...n,[t]:[]}))},Jt=(e,t)=>{let n=t||{values:[]},r=e===n.values[n.values.length-1],i=!r&&e?[...n.values,e]:n.values;return i.length>25&&i.shift(),{index:n.values.length-Number(r),values:i}},Yt={displayResults:50,queryLimit:1e3,cacheLimit:1e3},Xt=class{maxSize;map;constructor(){this.maxSize=Yt.cacheLimit,this.map=new Map}get(e){for(let[t,n]of this.map){let r=JSON.parse(t),i=r.start===e.start&&r.end===e.end,a=r.type===e.type,o=e.value&&r.value&&e.value.includes(r.value),s=r.match===e.match||o,c=n.length=this.maxSize){let e=this.map.keys().next().value;e&&this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},Zt=He(),Qt={query:Zt,queryHistory:Zt.map(e=>({index:0,values:[e]})),autocomplete:z(`AUTOCOMPLETE`)||!1,autocompleteQuick:!1,autocompleteCache:new Xt,metricsQLFunctions:[]};function $t(e,t){switch(t.type){case`SET_QUERY`:return{...e,query:t.payload.map(e=>e)};case`SET_QUERY_HISTORY`:return Gt(t.payload.key,t.payload.history),{...e,queryHistory:t.payload.history};case`SET_QUERY_HISTORY_BY_INDEX`:return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case`TOGGLE_AUTOCOMPLETE`:return ge(`AUTOCOMPLETE`,!e.autocomplete),{...e,autocomplete:!e.autocomplete};case`SET_AUTOCOMPLETE_QUICK`:return{...e,autocompleteQuick:t.payload};case`SET_AUTOCOMPLETE_CACHE`:return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case`SET_METRICSQL_FUNCTIONS`:return{...e,metricsQLFunctions:t.payload};default:throw Error()}}a();var en=ie({}),tn=()=>s(en).state,nn=()=>s(en).dispatch,rn=({children:e})=>{let[t,n]=d($t,Qt),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(en.Provider,{value:r,children:e})},an=t({AlarmIcon:()=>En,AlertIcon:()=>ln,AlertingRuleIcon:()=>un,ArrowDownIcon:()=>G,ArrowDropDownIcon:()=>Cn,CalendarIcon:()=>Tn,ChartIcon:()=>An,ClockIcon:()=>wn,CloseIcon:()=>hn,CodeIcon:()=>Mn,CollapseIcon:()=>ar,CommentIcon:()=>cr,CopyIcon:()=>Bn,DebugIcon:()=>lr,DeleteIcon:()=>Nn,DetailsIcon:()=>cn,DoneIcon:()=>In,DownloadIcon:()=>rr,DragIcon:()=>Vn,ErrorIcon:()=>bn,ExpandIcon:()=>ir,FunctionIcon:()=>er,GroupIcon:()=>sn,InfoIcon:()=>_n,InfoOutlinedIcon:()=>vn,IssueIcon:()=>Wn,KeyboardIcon:()=>Dn,LabelIcon:()=>tr,LinkIcon:()=>on,ListIcon:()=>Xn,LogoIcon:()=>fn,LogoShortIcon:()=>pn,MetricIcon:()=>$n,MinusIcon:()=>Fn,MoreIcon:()=>qn,PlayCircleOutlineIcon:()=>kn,PlayIcon:()=>On,PlusIcon:()=>Pn,Prettify:()=>zn,QuestionIcon:()=>Gn,RecordingRuleIcon:()=>dn,RefreshIcon:()=>Sn,RestartIcon:()=>gn,SearchIcon:()=>or,SettingsIcon:()=>mn,SpinnerIcon:()=>sr,StarBorderIcon:()=>Zn,StarIcon:()=>Qn,StorageIcon:()=>Kn,SuccessIcon:()=>xn,TableIcon:()=>jn,TimelineIcon:()=>Hn,TipIcon:()=>Yn,TuneIcon:()=>Jn,ValueIcon:()=>nr,VisibilityIcon:()=>Ln,VisibilityOffIcon:()=>Rn,WarningIcon:()=>yn,WikiIcon:()=>Un}),on=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M10.975 14.51a1.05 1.05 0 0 0 0-1.485 2.95 2.95 0 0 1 0-4.172l3.536-3.535a2.95 2.95 0 1 1 4.172 4.172l-1.093 1.092a1.05 1.05 0 0 0 1.485 1.485l1.093-1.092a5.05 5.05 0 0 0-7.142-7.142L9.49 7.368a5.05 5.05 0 0 0 0 7.142c.41.41 1.075.41 1.485 0m2.05-5.02a1.05 1.05 0 0 0 0 1.485 2.95 2.95 0 0 1 0 4.172l-3.5 3.5a2.95 2.95 0 1 1-4.171-4.172l1.025-1.025a1.05 1.05 0 0 0-1.485-1.485L3.87 12.99a5.05 5.05 0 0 0 7.142 7.142l3.5-3.5a5.05 5.05 0 0 0 0-7.142 1.05 1.05 0 0 0-1.485 0z`})}),sn=()=>F(`svg`,{fill:`currentColor`,viewBox:`0 0 512 512`,children:F(`path`,{d:`M170.667 64v42.667h-64v298.666h64V448H64V64zM448 64v384H341.333v-42.667h64V106.667h-64V64zm-85.333 256v42.667H149.333V320zm0-85.333v42.666H149.333v-42.666zm0-85.334V192H149.333v-42.667z`})}),cn=()=>F(`svg`,{fill:`currentColor`,viewBox:`0 0 20 20`,children:F(`path`,{d:`M12 3a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 5a2 2 0 1 1 0 4 2 2 0 0 1 0-4m0 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4`})}),ln=()=>F(`svg`,{viewBox:`-1 0 30 30`,fill:`currentColor`,children:F(`path`,{d:`m3 24 3-6v-8a8 8 0 0 1 16 0v8l3 6zm11 4a2.99 2.99 0 0 1-2.816-2h5.632A2.99 2.99 0 0 1 14 28m10-10v-8c0-5.522-4.478-10-10-10S4 4.478 4 10v8l-4 8h9.101a5 5 0 0 0 9.798 0H28z`})}),un=()=>F(`svg`,{viewBox:`411.014 448.582 21.637 17.836`,fill:`currentColor`,children:F(`path`,{d:`M411.47 453.837a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m-.016 5.54c-.284.124-.44.372-.439.701.001.354.204.614.553.708.092.025 1.214.034 3.267.028 3.481-.011 3.23.008 3.468-.264a.714.714 0 0 0-.003-.963c-.249-.283-.03-.267-3.564-.266-2.735 0-3.171.008-3.282.056m-.018 5.016a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m.161-15.761a.85.85 0 0 0-.389.417c-.023.07-.034.224-.026.343.018.239.078.345.301.525l.139.112 8.729.01 8.73.009.163-.079c.193-.093.36-.332.395-.565a.75.75 0 0 0-.388-.75c-.142-.072-.227-.073-8.844-.072-7.105.002-8.721.011-8.81.05m14.005 2.595c-.286.18-.371.401-.371.961v.334l-.499.024c-.598.028-.961.126-1.456.392a3.5 3.5 0 0 0-1.721 2.199c-.081.307-.091.479-.115 1.923-.027 1.566-.028 1.59-.138 1.966-.145.496-.557 1.361-.929 1.945a5 5 0 0 0-.368.677c-.1.292-.095.679.013.982.112.32.461.686.75.789.276.099 1.255.259 2.268.373l.84.095.028.287q.089.935.767 1.579a2.383 2.383 0 0 0 3.659-.434c.227-.351.36-.745.396-1.161l.023-.283.291-.027c.956-.093 2.47-.32 2.715-.408.393-.14.694-.464.817-.875.16-.539.093-.833-.354-1.554-.373-.601-.832-1.565-.956-2.007-.083-.29-.093-.448-.119-1.903-.027-1.427-.039-1.619-.118-1.924a3.5 3.5 0 0 0-1.895-2.327c-.422-.202-.758-.282-1.309-.312l-.489-.025-.022-.473c-.022-.521-.062-.621-.325-.806-.124-.088-.182-.096-.69-.096-.489.001-.57.012-.693.089m2.696 2.786c.546.176.994.583 1.249 1.135l.149.326.025 1.543c.027 1.672.046 1.837.286 2.598.166.52.621 1.468.974 2.028.189.303.274.472.244.492-.104.066-1.778.288-2.915.387-.788.068-3.246.068-4.037 0-1.154-.099-2.811-.32-2.919-.39-.035-.023.03-.16.223-.469.375-.603.805-1.493.976-2.024.246-.763.272-1 .272-2.426 0-.701.019-1.398.043-1.549.083-.554.47-1.148.931-1.429.103-.063.308-.157.453-.209.258-.092.315-.094 2.025-.096 1.642-.001 1.776.005 2.021.083m-1.384 10.771a1.06 1.06 0 0 1-.748.2c-.394-.066-.776-.451-.835-.841l-.026-.168h2.005v.108z`})}),dn=()=>F(`svg`,{viewBox:`411.014 448.582 23.358 18.492`,fill:`currentColor`,children:[F(`path`,{d:`M411.47 453.837a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m15.967 7.103a1.592 1.612 0 1 1 1.592-1.612 1.592 1.612 0 0 1-1.592 1.612m0-1.612`}),F(`path`,{d:`M427.405 466.377a6.966 7.052 0 1 1 6.965-7.053 6.974 7.06 0 0 1-6.965 7.053m0-12.09a4.975 5.037 0 1 0 4.975 5.037 4.981 5.043 0 0 0-4.975-5.037`}),F(`path`,{d:`M421.832 467.074a.996 1.008 0 0 1-.708-1.715l3.582-3.675a.995 1.008 0 0 1 1.417 1.415l-3.582 3.675a.995 1.007 0 0 1-.709.3m-10.378-7.697c-.284.124-.44.372-.439.701.001.354.204.614.553.708.092.025 1.214.034 3.267.028 3.481-.011 3.23.008 3.468-.264a.714.714 0 0 0-.003-.963c-.249-.283-.03-.267-3.564-.266-2.735 0-3.171.008-3.282.056m-.018 5.016a.72.72 0 0 0-.422.679c0 .319.137.535.422.667.139.065.322.068 3.814.069l3.668.001.164-.083c.484-.245.535-.904.096-1.254l-.141-.112-3.746-.008c-3.05-.006-3.766.001-3.855.041m.161-15.761a.85.85 0 0 0-.389.417c-.023.07-.034.224-.026.343.018.239.078.345.301.525l.139.112 8.729.01 8.73.009.163-.079c.193-.093.36-.332.395-.565a.75.75 0 0 0-.388-.75c-.142-.072-.227-.073-8.844-.072-7.105.002-8.721.011-8.81.05`})]}),fn=()=>F(`svg`,{viewBox:`0 0 74 24`,fill:`currentColor`,children:F(`path`,{d:`M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z`})}),pn=()=>F(`svg`,{viewBox:`0 0 15 17`,fill:`currentColor`,children:F(`path`,{d:`M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z`})}),mn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z`})}),hn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`})}),gn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z`})}),_n=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z`})}),vn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8`})}),yn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`})}),bn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z`})}),xn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`})}),Sn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z`})}),G=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z`})}),Cn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m7 10 5 5 5-5z`})}),wn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:[F(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),F(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),Tn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z`})}),En=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z`})}),Dn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z`})}),On=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M8 5v14l11-7z`})}),kn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z`})}),An=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z`})}),jn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z`})}),Mn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z`})}),Nn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z`})}),Pn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})}),Fn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 13H5v-2h14v2z`})}),In=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z`})}),Ln=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z`})}),Rn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z`})}),zn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z`})}),Bn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z`})}),Vn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 9H4v2h16V9zM4 15h16v-2H4v2z`})}),Hn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z`})}),Un=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:[F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z`}),F(`path`,{d:`M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z`}),F(`path`,{d:`M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z`})]}),Wn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z`})}),Gn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z`})}),Kn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z`})}),qn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z`})}),Jn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z`})}),Yn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z`})}),Xn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z`})}),Zn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z`})}),Qn=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z`})}),$n=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-error`),children:F(`path`,{d:`M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z`})}),er=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-primary`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z`})}),tr=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-warning`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z`})}),nr=()=>F(`svg`,{viewBox:`0 0 16 16`,fill:Ce(`color-primary`),children:F(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z`})}),rr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z`})}),ir=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z`})}),ar=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z`})}),or=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`})}),sr=()=>F(`svg`,{viewBox:`0 0 24 24`,children:F(`path`,{fill:`currentColor`,d:`M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z`,children:F(`animateTransform`,{attributeName:`transform`,dur:`0.75s`,repeatCount:`indefinite`,type:`rotate`,values:`0 12 12;360 12 12`})})}),cr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z`})}),lr=()=>F(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:F(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z`})}),K=e(M(),1),ur=({to:e,isNavLink:t,children:n,...r})=>t?F(S,{to:e,...r,children:n}):F(`div`,{...r,children:n}),dr=({activeItem:e,item:t,color:n=Ce(`color-primary`),activeNavRef:r,onChange:i,isNavLink:a})=>{let o=e=>()=>{i&&i(e)};return F(ur,{className:(0,K.default)({"vm-tabs-item":!0,"vm-tabs-item_active":e===t.value,[t.className||``]:t.className}),isNavLink:a,to:t.value,style:{color:n},onClick:o(t.value),ref:e===t.value?r:void 0,children:[t.icon&&F(`div`,{className:(0,K.default)({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!t.label}),children:t.icon}),t.label]})};a();function q(e,t,n,r){let i=O(t);c(()=>{i.current=t},[t]),c(()=>{let t=n?.current??window;if(!(t&&t.addEventListener))return;let a=e=>i.current(e);return t.addEventListener(e,a,r),()=>{t.removeEventListener(e,a,r)}},[e,n,r])}a();var fr=()=>{let[e,t]=u({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return q(`resize`,n),c(n,[]),e};a();var pr=({activeItem:e,items:t,color:n=Ce(`color-primary`),onChange:r,indicatorPlacement:i=`bottom`,isNavLink:a})=>{let o=fr(),s=O(null),[l,d]=u({left:0,width:0,bottom:0});return c(()=>{if(s.current?.base instanceof HTMLElement){let{offsetLeft:e,offsetWidth:t,offsetHeight:n}=s.current.base;d({left:e,width:t,bottom:i===`top`?n-2:0})}},[o,e,s,t]),F(`div`,{className:`vm-tabs`,children:[t.map(t=>F(dr,{activeItem:e,item:t,onChange:r,color:n,activeNavRef:s,isNavLink:a},t.value)),F(`div`,{className:`vm-tabs__indicator`,style:{...l,borderColor:n}})]})},mr=[{value:B.chart,icon:F(An,{}),label:`Graph`,prometheusCode:0},{value:B.code,icon:F(Mn,{}),label:`JSON`,prometheusCode:3},{value:B.table,icon:F(jn,{}),label:`Table`,prometheusCode:1}],hr=({tabFilter:e})=>{let{displayType:t}=xr(),n=Sr();return F(pr,{activeItem:t,items:mr.filter(e??(()=>!0)),onChange:e=>{n({type:`SET_DISPLAY_TYPE`,payload:e??t})}})},gr=()=>{let e=H(`g0.tab`,0);return mr.find(t=>t.prometheusCode===+e||t.value===e)?.value||B.chart},_r=z(`SERIES_LIMITS`),vr={displayType:gr(),nocache:!1,isTracingEnabled:!1,seriesLimits:_r?JSON.parse(_r):ze,tableCompact:z(`TABLE_COMPACT`)||!1,reduceMemUsage:!1};function yr(e,t){switch(t.type){case`SET_DISPLAY_TYPE`:return{...e,displayType:t.payload};case`SET_SERIES_LIMITS`:return ge(`SERIES_LIMITS`,JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case`TOGGLE_QUERY_TRACING`:return{...e,isTracingEnabled:!e.isTracingEnabled};case`TOGGLE_NO_CACHE`:return{...e,nocache:!e.nocache};case`TOGGLE_TABLE_COMPACT`:return ge(`TABLE_COMPACT`,!e.tableCompact),{...e,tableCompact:!e.tableCompact};case`TOGGLE_REDUCE_MEM_USAGE`:return ge(`TABLE_COMPACT`,!e.reduceMemUsage),{...e,reduceMemUsage:!e.reduceMemUsage};default:throw Error()}}a();var br=ie({}),xr=()=>s(br).state,Sr=()=>s(br).dispatch,Cr=({children:e})=>{let[t,n]=d(yr,vr),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(br.Provider,{value:r,children:e})},wr={customStep:H(`g0.step_input`,``),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,isEmptyHistogram:!1,spanGaps:!1,showAllPoints:!!z(`POINTS_SHOW_ALL`),openSettings:!1};function Tr(e,t){switch(t.type){case`TOGGLE_ENABLE_YAXIS_LIMITS`:return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case`SET_CUSTOM_STEP`:return{...e,customStep:t.payload};case`SET_YAXIS_LIMITS`:return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case`SET_IS_HISTOGRAM`:return{...e,isHistogram:t.payload};case`SET_IS_EMPTY_HISTOGRAM`:return{...e,isEmptyHistogram:t.payload};case`SET_SPAN_GAPS`:return{...e,spanGaps:t.payload};case`SET_SHOW_POINTS`:return ge(`POINTS_SHOW_ALL`,t.payload),{...e,showAllPoints:t.payload};case`SET_OPEN_SETTINGS`:return{...e,openSettings:t.payload};default:throw Error()}}a();var Er=ie({}),Dr=()=>s(Er).state,Or=()=>s(Er).dispatch,kr=({children:e})=>{let[t,n]=d(Tr,wr),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(Er.Provider,{value:r,children:e})},Ar={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:``};function jr(e,t){switch(t.type){case`SET_DASHBOARDS_SETTINGS`:return{...e,dashboardsSettings:t.payload};case`SET_DASHBOARDS_LOADING`:return{...e,dashboardsLoading:t.payload};case`SET_DASHBOARDS_ERROR`:return{...e,dashboardsError:t.payload};default:throw Error()}}a();var Mr=ie({}),Nr=()=>s(Mr).state,Pr=()=>s(Mr).dispatch,Fr=({children:e})=>{let[t,n]=d(jr,Ar),r=D(()=>({state:t,dispatch:n}),[t,n]);return F(Mr.Provider,{value:r,children:e})},Ir={windows:`Windows`,mac:`Mac OS`,linux:`Linux`},Lr=()=>Object.values(Ir).find(e=>navigator.userAgent.indexOf(e)>=0)||`unknown`,Rr=()=>Lr()===Ir.mac,zr=()=>[`Android`,`webOS`,`iPhone`,`iPad`,`iPod`,`BlackBerry`,`Windows Phone`].map(e=>navigator.userAgent.match(new RegExp(e,`i`))).some(e=>e);a();function J(){let e=fr(),t=()=>{let e=zr(),t=window.innerWidth<500;return e||t},[n,r]=u(t());return c(()=>{r(t())},[e]),{isMobile:n}}var Br={success:F(xn,{}),error:F(bn,{}),warning:F(yn,{}),info:F(_n,{})},Y=({variant:e,children:t})=>{let{isDarkTheme:n}=U(),{isMobile:r}=J();return F(`div`,{className:(0,K.default)({"vm-alert":!0,[`vm-alert_${e}`]:e,"vm-alert_dark":n,"vm-alert_mobile":r}),children:[F(`div`,{className:`vm-alert__icon`,children:Br[e||`info`]}),F(`div`,{className:`vm-alert__content`,children:t})]})};a();var Vr=ie({showInfoMessage:()=>{}}),Hr=()=>s(Vr),Ur=((...e)=>e.reduce((e,t)=>({children:n})=>F(e,{children:F(t,{children:n})}),({children:e})=>F(m,{children:e})))(Ke,Vt,rn,Cr,kr,({children:e})=>{let{isMobile:t}=J(),[n,r]=u({text:``,type:`info`}),[i,a]=u(!1),[o,s]=u(null);c(()=>{if(!o)return;r({...o,key:Date.now()}),a(!0);let e=setTimeout(l,o.timeout||4e3);return()=>clearTimeout(e)},[o]);let l=()=>{s(null),a(!1)};return F(Vr.Provider,{value:{showInfoMessage:s},children:[i&&F(`div`,{className:(0,K.default)({"vm-snackbar":!0,"vm-snackbar_mobile":t}),children:F(Y,{variant:n.type,children:F(`div`,{className:`vm-snackbar-content`,children:[F(`span`,{children:n.text}),F(`div`,{className:`vm-snackbar-content__close`,onClick:l,children:F(hn,{})})]})})}),e]})},Fr),Wr=function(e){return e[e.internalLink=0]=`internalLink`,e[e.externalLink=1]=`externalLink`,e}({}),Gr=e=>[{value:R.trace},{value:R.queryAnalyzer},{value:R.withTemplate},{value:R.relabel},{value:R.downsamplingDebug,hide:!e},{value:R.retentionDebug,hide:!e}],Kr=()=>[{value:R.metrics},{value:R.cardinality},{value:R.topQueries},{value:R.activeQueries}],qr=()=>[{value:R.rules},{value:R.notifiers}],Jr=({isEnterpriseLicense:e,showPredefinedDashboards:t,showAlerting:n})=>[{value:R.home},{value:R.rawQuery},{label:`Explore`,submenu:Kr()},{label:`Tools`,submenu:Gr(e)},{value:R.dashboards,hide:!t},{value:`Alerting`,submenu:qr(),hide:!n}],Yr=({activeMenu:e,label:t,value:n,type:r,color:i})=>r===Wr.externalLink?F(`a`,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_active":e===n}),style:{color:i},href:n,target:`_blank`,rel:`noreferrer`,children:t}):F(S,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_active":e===n}),style:{color:i},to:n,children:t});a();var Xr=(e,t,n)=>{let r=p(r=>{let i=e?.current,a=r.target,o=n?.current&&n.current.contains(a);!i||i.contains(r?.target||null)||o||t(r)},[e,t]);q(`mouseup`,r),q(`touchstart`,r)},X=({variant:e=`contained`,color:t=`primary`,size:n=`medium`,ariaLabel:r,children:i,endIcon:a,startIcon:o,fullWidth:s=!1,className:c,disabled:l,onClick:u,onMouseDown:d,"data-id":f})=>F(`button`,{className:(0,K.default)({"vm-button":!0,[`vm-button_${e}_${t}`]:!0,[`vm-button_${n}`]:n,"vm-button_icon_only":(o||a)&&!i,"vm-button_full-width":s,"vm-button_with-icons":o||a,[c||``]:c}),disabled:l,"aria-label":r,onClick:u,onMouseDown:d,"data-id":f,children:[o,i,a]});a();var Zr=({children:e,buttonRef:t,placement:n=`bottom-left`,placementPosition:r,open:i=!1,onClose:a,offset:o={top:6,left:0},clickOutside:s=!0,fullWidth:l,title:d,disabledFullScreen:f,classes:h,variant:g})=>{let{isMobile:_}=J(),v=w(),y=T(),[b,x]=u({width:0,height:0}),[S,C]=u(!1),E=O(null);c(()=>(C(i),!i&&a&&a(),i&&_&&!f&&(document.body.style.overflow=`hidden`),()=>{document.body.style.overflow=`auto`}),[i]),c(()=>{x({width:E?.current?.clientWidth||0,height:E?.current?.clientHeight||0}),C(!1)},[E]);let k=D(()=>{if(!t)return{};let e=t.current;if(!e||!S)return{};let i=e.getBoundingClientRect(),a={top:0,left:0,width:`auto`},s=n?.includes(`right`),c=n?.includes(`top`),u=n?.includes(`center`),d=o?.top||0,f=o?.left||0;if(a.left=a.left=i.left+f,a.top=i.height+i.top+d,s&&(a.left=i.right-b.width),c&&(a.top=i.top-b.height-d),u&&(a.top=i.top+(i.height-b.height)/2-d),n===`fixed`&&r)return a.top=Math.max(r.top+o.top,0),a.left=Math.max(r.left+o.left,0),a;let{innerWidth:p,innerHeight:m}=window,h=a.top+b.height>m,g=a.top<0,_=a.left+b.width>p,v=a.left<0;return h&&(a.top=i.top-b.height-d),g&&(a.top=i.height+i.top+d),_&&(a.left=i.right-b.width-f),v&&(a.left=i.left+f),l&&(a.width=`${i.width}px`),a.top<0&&(a.top=0),a.left<0&&(a.left=0),a},[t,n,S,e,l]),A=e=>{e.stopPropagation(),a()},j=()=>{C(!1),a()},M=()=>{s&&j()};c(()=>{if(!E.current||!S||_&&!f)return;let{right:e,width:t}=E.current.getBoundingClientRect();if(e>window.innerWidth){let e=window.innerWidth-t;E.current.style.left=`${e}px`}},[S,E,r]);let N=p(()=>{S&&_&&!f&&(v(y,{replace:!0}),a())},[S,_,f,y,a]);q(`scroll`,j),q(`popstate`,N),Xr(E,M,t);let P={};return(h||[]).forEach(e=>{P[e]=!0}),F(m,{children:(S||!b.width)&&te(F(`div`,{className:(0,K.default)({"vm-popper":!0,[`vm-popper_${g}`]:g,"vm-popper_mobile":_&&!f,"vm-popper_open":(_||Object.keys(k).length)&&S,...P}),ref:E,style:_&&!f?{}:k,children:[(d||_&&!f)&&F(`div`,{className:`vm-popper-header`,children:[F(`p`,{className:`vm-popper-header__title`,children:d}),F(X,{variant:`text`,color:g===`dark`?`white`:`primary`,size:`small`,onClick:A,ariaLabel:`close`,children:F(hn,{})})]}),e]}),document.body)})};a();var Z=e=>{let[t,n]=u(!!e);return{value:t,setValue:n,setTrue:p(()=>n(!0),[]),setFalse:p(()=>n(!1),[]),toggle:p(()=>n(e=>!e),[])}};a();var Qr=({activeMenu:e,label:t,color:n,background:r,submenu:i,direction:a=`row`})=>{let{pathname:o}=T(),[s,l]=u(null),d=O(null),{value:f,setFalse:p,setTrue:m}=Z(!1),h=()=>{(a===`row`||!f)&&m(),a===`column`&&f&&p(),a===`row`&&s&&clearTimeout(s)},g=()=>{s&&clearTimeout(s),l(setTimeout(p,300))};return c(()=>{p()},[o]),F(`div`,{className:(0,K.default)({"vm-header-nav-item_open":f}),style:{color:n},onMouseEnter:a===`column`?void 0:h,onMouseLeave:a===`column`?void 0:g,onClick:a===`column`?h:void 0,ref:d,children:[F(`div`,{className:(0,K.default)({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_active":i.find(t=>t.value===e)}),children:[t,F(Cn,{})]}),a===`column`?F(`div`,{className:`vm-header-nav-item-submenu`,style:{background:r},children:i.map(t=>F(Yr,{activeMenu:e,value:t.value||``,label:t.label||``,color:n,type:t.type||Wr.internalLink},t.value))}):F(Zr,{open:f,placement:`bottom-left`,offset:{top:12,left:0},onClose:p,buttonRef:d,children:F(`div`,{className:`vm-header-nav-item-submenu`,style:{background:r},onMouseLeave:g,onMouseEnter:()=>{s&&clearTimeout(s)},children:i.map(t=>F(Yr,{activeMenu:e,value:t.value||``,label:t.label||``,color:n,type:t.type||Wr.internalLink},t.value))})})]})},$r=e=>{try{return e.replace(/^\/+/,``).replace(/-/g,` `).trim().replace(/^\w/,e=>e.toUpperCase())}catch{return e}},ei=e=>e.filter(e=>!e.hide).map(e=>{let t={...e};return t.value&&!t.label&&(t.label=ue[t.value]?.title||$r(t.value)),t.submenu&&t.submenu.length>0&&(t.submenu=ei(t.submenu)),t});a();var ti=()=>{let e=fe(),{dashboardsSettings:t}=Nr(),{serverUrl:n,appConfig:r}=U(),i=r.license?.type===`enterprise`,a=r?.vmalert?.enabled||!1,o=!!(!e&&t.length),s=D(()=>({serverUrl:n,isEnterpriseLicense:i,showAlerting:a,showPredefinedDashboards:o}),[n,i,a,o]);return ei(D(()=>Jr(s),[s]))};a();var ni=({color:e,background:t,direction:n})=>{let{pathname:r}=T(),[i,a]=u(r),o=ti();return c(()=>{a(r)},[r]),F(`nav`,{className:(0,K.default)({"vm-header-nav":!0,[`vm-header-nav_${n}`]:n}),children:o.map(r=>r.submenu?F(Qr,{activeMenu:i,label:r.label||``,submenu:r.submenu,color:e,background:t,direction:n},r.label):F(Yr,{activeMenu:i,value:r.value||``,label:r.label||``,color:e,type:r.type||Wr.internalLink},r.value))})};a();var ri=({title:e,children:t,onClose:n,className:r,isOpen:i=!0})=>{let{isMobile:a}=J(),o=w(),s=T(),l=p(e=>{i&&e.key===`Escape`&&n()},[i]),u=e=>{e.stopPropagation()},d=p(()=>{i&&(o(s,{replace:!0}),n())},[i,s,n]);return c(()=>{if(i)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=`auto`}},[i]),q(`popstate`,d),q(`keyup`,l),te(F(`div`,{className:(0,K.default)({"vm-modal":!0,"vm-modal_mobile":a,[`${r}`]:r}),onMouseDown:n,children:F(`div`,{className:`vm-modal-content`,onMouseDown:u,children:[F(`div`,{className:`vm-modal-content-header`,children:[e&&F(`div`,{className:`vm-modal-content-header__title`,children:e}),F(`div`,{className:`vm-modal-header__close`,children:F(X,{variant:`text`,size:`small`,onClick:n,ariaLabel:`close`,children:F(hn,{})})})]}),F(`div`,{className:`vm-modal-content-body`,tabIndex:0,children:t})]})}),document.body)};a();var Q=({children:e,title:t,open:n,placement:r=`bottom-center`,offset:i={top:6,left:0}})=>{let{isMobile:a}=J(),[o,s]=u(!1),[l,d]=u({width:0,height:0}),f=O(null),p=O(null),h=()=>s(!1);c(()=>{if(!(!p.current||!o))return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener(`scroll`,h),()=>{window.removeEventListener(`scroll`,h)}},[o,t]);let g=D(()=>{let e=f?.current?.base;if(!e||!o)return{};let t=e.getBoundingClientRect(),n={top:0,left:0},a=r===`bottom-right`||r===`top-right`,s=r===`bottom-left`||r===`top-left`,c=r?.includes(`top`),u=i?.top||0,d=i?.left||0;n.left=t.left-(l.width-t.width)/2+d,n.top=t.height+t.top+u,a&&(n.left=t.right-l.width),s&&(n.left=t.left+d),c&&(n.top=t.top-l.height-u);let{innerWidth:p,innerHeight:m}=window,h=n.top+l.height+20>m,g=n.top-20<0,_=n.left+l.width+20>p,v=n.left-20<0;return h&&(n.top=t.top-l.height-u),g&&(n.top=t.height+t.top+u),_&&(n.left=t.right-l.width-d),v&&(n.left=t.left+d),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n},[f,r,o,l]),_=()=>{typeof n!=`boolean`&&s(!0)},v=()=>{s(!1)};return c(()=>{typeof n==`boolean`&&s(n)},[n]),c(()=>{let e=f?.current?.base;if(e)return e.addEventListener(`mouseenter`,_),e.addEventListener(`mouseleave`,v),()=>{e.removeEventListener(`mouseenter`,_),e.removeEventListener(`mouseleave`,v)}},[f]),F(m,{children:[F(m,{ref:f,children:e}),!a&&o&&te(F(`div`,{className:`vm-tooltip`,ref:p,style:g,children:t}),document.body)]})},ii=F(`code`,{children:Rr()?`Cmd`:`Ctrl`}),ai=[{title:`Zoom in`,description:F(m,{children:[`To zoom in, hold down the `,ii,` + `,F(`code`,{children:`scroll up`}),`, or press the `,F(`code`,{children:`+`}),`. Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range.`]})},{title:`Zoom out`,description:F(m,{children:[`To zoom out, hold down the `,ii,` + `,F(`code`,{children:`scroll down`}),`, or press the `,F(`code`,{children:`-`}),`.`]})},{title:`Move horizontal axis`,description:F(m,{children:[`To move the graph, hold down the `,ii,` + `,F(`code`,{children:`drag`}),` the graph to the right or left.`]})},{title:`Fixing a tooltip`,description:F(m,{children:[`To fix the tooltip, `,F(`code`,{children:`click`}),` mouse when it's open. Then, you can drag the fixed tooltip by `,F(`code`,{children:`clicking`}),` and `,F(`code`,{children:`dragging`}),` on the `,F(Vn,{}),` icon.`]})},{title:`Set a custom range for the vertical axis`,description:F(m,{children:[`To set a custom range for the vertical axis, click on the `,F(mn,{}),` icon located in the upper right corner of the graph, activate the toggle, and set the values.`]})}],oi=[{title:`Show/hide a legend item`,description:F(m,{children:[F(`code`,{children:`click`}),` on a legend item to isolate it on the graph.`,ii,` + `,F(`code`,{children:`click`}),` on a legend item to remove it from the graph. To revert to the previous state, click again.`]})},{title:`Copy label key-value pairs`,description:F(m,{children:[F(`code`,{children:`click`}),` on a label key-value pair to save it to the clipboard.`]})},{title:`Collapse/Expand the legend group`,description:F(m,{children:[F(`code`,{children:`click`}),` on the group name (e.g. `,F(`b`,{children:`Query 1: {__name__!=""}`}),`) to collapse or expand the legend.`]})}],si=ai.concat(oi),ci=()=>{let{value:e,setFalse:t,setTrue:n}=Z(!1);return F(m,{children:[F(Q,{title:`Show tips on working with the graph`,children:F(X,{variant:`text`,color:`gray`,startIcon:F(Yn,{}),onClick:n,ariaLabel:`open the tips`})}),e&&F(ri,{title:`Tips on working with the graph and the legend`,onClose:t,children:F(`div`,{className:`fc-graph-tips`,children:si.map(({title:e,description:t})=>F(`div`,{className:`fc-graph-tips-item`,children:[F(`h4`,{className:`fc-graph-tips-item__action`,children:e}),F(`p`,{className:`fc-graph-tips-item__description`,children:t})]},e))})})]})},li=F(`code`,{children:Rr()?`Cmd`:`Ctrl`}),ui=F(m,{children:[F(`code`,{children:Rr()?`Option`:`Ctrl`}),` + `,F(`code`,{children:`Space`})]}),di=[{title:`Query`,list:[{keys:F(`code`,{children:`Enter`}),description:`Run`},{keys:F(m,{children:[F(`code`,{children:`Shift`}),` + `,F(`code`,{children:`Enter`})]}),description:`Multi-line queries`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`Arrow Up`})]}),description:`Previous command from the Query history`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`Arrow Down`})]}),description:`Next command from the Query history`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`click`}),` by `,F(Ln,{})]}),description:`Toggle multiple queries`},{keys:ui,description:`Show quick autocomplete tips`}]},{title:`Graph`,readMore:F(ci,{}),list:[{keys:F(m,{children:[li,` + `,F(`code`,{children:`scroll Up`}),` or `,F(`code`,{children:`+`})]}),description:`Zoom in`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`scroll Down`}),` or `,F(`code`,{children:`-`})]}),description:`Zoom out`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`drag`})]}),description:`Move the graph left/right`},{keys:F(m,{children:F(`code`,{children:`click`})}),description:`Select the series in the legend`},{keys:F(m,{children:[li,` + `,F(`code`,{children:`click`})]}),description:`Toggle multiple series in the legend`}]}];a();var fi=`Shortcut keys`,pi=Rr(),mi=pi?`Cmd + /`:`F1`,hi=({showTitle:e})=>{let t=fe(),{value:n,setTrue:r,setFalse:i}=Z(!1);return q(`keydown`,p(e=>{let t=pi&&e.key===`/`&&e.metaKey,n=!pi&&e.key===`F1`&&!e.metaKey;(t||n)&&r()},[r])),F(m,{children:[F(Q,{open:e===!0?!1:void 0,title:`${fi} (${mi})`,placement:`bottom-center`,children:F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Dn,{}),onClick:r,ariaLabel:fi,children:e&&fi})}),n&&F(ri,{title:`Shortcut keys`,onClose:i,children:F(`div`,{className:`vm-shortcuts`,children:di.map(e=>F(`div`,{className:`vm-shortcuts-section`,children:[e.readMore&&F(`div`,{className:`vm-shortcuts-section__read-more`,children:e.readMore}),F(`h3`,{className:`vm-shortcuts-section__title`,children:e.title}),F(`div`,{className:`vm-shortcuts-section-list`,children:e.list.map((t,n)=>F(`div`,{className:`vm-shortcuts-section-list-item`,children:[F(`div`,{className:`vm-shortcuts-section-list-item__key`,children:t.keys}),F(`p`,{className:`vm-shortcuts-section-list-item__description`,children:t.description})]},`${e.title}_${n}`))})]},e.title))})})]})},gi=({open:e})=>F(`button`,{className:(0,K.default)({"vm-menu-burger":!0,"vm-menu-burger_opened":e}),"aria-label":`menu`,children:F(`span`,{})});a();var _i=({background:e,color:t})=>{let{pathname:n}=T(),{isMobile:r}=J(),i=O(null),{value:a,toggle:o,setFalse:s}=Z(!1);return c(s,[n]),Xr(i,s),F(`div`,{className:`vm-header-sidebar`,ref:i,children:[F(`div`,{className:(0,K.default)({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":a}),onClick:o,children:F(gi,{open:a})}),F(`div`,{className:(0,K.default)({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":a}),children:[F(`div`,{className:`vm-header-sidebar-scrollable`,children:F(ni,{color:t,background:e,direction:`column`})}),F(`div`,{className:`vm-header-sidebar-menu-settings`,children:!r&&F(hi,{showTitle:!0})})]})]})},vi=e=>`${Pe(e)}/admin/tenants`;a();var yi=()=>{let{useTenantID:e}=de(),t=fe(),{tenantId:n,serverUrl:r}=U(),[i,a]=u(!1),[o,s]=u(),[l,d]=u([]),f=D(()=>vi(r),[r]),p=D(()=>!!n,[n]),m=t?!e:!p;return c(()=>{m||(async()=>{a(!0);try{let e=await fetch(f),t=await e.json();d((t.data||[]).sort((e,t)=>e.localeCompare(t))),e.ok?s(void 0):s(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&s(`${e.name}: ${e.message}`)}a(!1)})().catch(console.error)},[f]),{accountIds:l,isLoading:i,error:o}};a();var bi=({controlsComponent:e,isMobile:t,...n})=>{let r=fe(),{pathname:i}=T(),{accountIds:a}=yi(),{value:o,toggle:s,setFalse:c}=Z(!1),l=D(()=>(ue[i]||{}).header||{},[i]),u=F(e,{...n,isMobile:t,accountIds:a,headerSetup:l,closeModal:c});return t?F(m,{children:[F(`div`,{className:`vm-header-controls vm-header-controls_mobile`,children:F(X,{className:(0,K.default)({"vm-header-button":!r}),startIcon:F(qn,{}),onClick:s,ariaLabel:`controls`})}),F(ri,{title:`Controls`,onClose:c,isOpen:o,className:(0,K.default)({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":o}),children:u})]}):u};a();var xi=({controlsComponent:e})=>{let{isMobile:t}=J(),n=D(()=>window.innerWidth<1230,[fr()]),{isDarkTheme:r}=U(),i=fe(),a=D(()=>Ce(r?`color-background-block`:`color-primary`),[r]),{background:o,color:s}=D(()=>{let{headerStyles:{background:e=i?`#FFF`:a,color:t=i?a:`#FFF`}={}}=de();return{background:e,color:t}},[a]),c=w();return F(`header`,{className:(0,K.default)({"vm-header":!0,"vm-header_app":i,"vm-header_dark":r,"vm-header_sidebar":n,"vm-header_mobile":t}),style:{background:o,color:s},children:[F(`div`,{className:(0,K.default)({"vm-header-logo":!0,"vm-header-logo_mobile":n}),onClick:()=>{c({pathname:R.home}),window.location.reload()},style:{color:s},children:F(fn,{})}),n?F(_i,{background:o,color:s}):F(ni,{color:s,background:o}),F(bi,{controlsComponent:e,displaySidebar:n,isMobile:t,closeModal:()=>{}})]})},Si=[{href:`https://docs.victoriametrics.com/victoriametrics/metricsql/`,Icon:Mn,title:`MetricsQL`},{href:`https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#vmui`,Icon:Un,title:`Documentation`},{href:`https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose`,Icon:Wn,title:`Create an issue`}];a();var Ci=o(({links:e=Si})=>{let t=`2019-${new Date().getFullYear()}`,{appConfig:n}=U(),r=n?.version;return F(`footer`,{className:`vm-footer`,children:[F(`a`,{className:`vm-link vm-footer__link`,target:`_blank`,href:`https://victoriametrics.com/`,rel:`me noreferrer`,children:[F(pn,{}),`victoriametrics.com`]}),e.map(({href:e,Icon:t,title:n})=>F(`a`,{className:`vm-link vm-footer__link`,target:`_blank`,href:e,rel:`help noreferrer`,children:[F(t,{}),n]},`${e}-${n}`)),F(`div`,{className:`vm-footer__copyright`,children:[`© `,t,` VictoriaMetrics.`,r&&F(`span`,{className:`vm-footer__version`,children:[`\xA0Version: `,r]})]})]})});a();var wi=async e=>await(await fetch(`./dashboards/${e}`)).json(),Ti=()=>{let e=fe(),{serverUrl:t}=U(),n=Pr(),[r,i]=u(!1),[a,o]=u(``),[s,l]=u([]),d=async()=>{try{let e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(!e?.length)return[];let t=await Promise.all(e.map(async e=>wi(e)));l(e=>[...t,...e])}catch(e){e instanceof Error&&o(`${e.name}: ${e.message}`)}},f=async()=>{if(t){o(``),i(!0);try{let e=await fetch(`${t}/vmui/custom-dashboards`),n=await e.json();if(e.ok){let{dashboardsSettings:e}=n;e&&e.length>0?l(t=>[...t,...e]):await d(),i(!1)}else await d(),o(n.error),i(!1)}catch(e){i(!1),e instanceof Error&&o(`${e.name}: ${e.message}`),await d()}}};return c(()=>{e||(l([]),f())},[t]),c(()=>{n({type:`SET_DASHBOARDS_SETTINGS`,payload:s})},[s]),c(()=>{n({type:`SET_DASHBOARDS_LOADING`,payload:r})},[r]),c(()=>{n({type:`SET_DASHBOARDS_ERROR`,payload:a})},[a]),{dashboardsSettings:s,isLoading:r,error:a}};a();var Ei=({error:e,warning:t,info:n})=>{let r=O(null),[i,a]=u(!1),[o,s]=u(!1),l=`${D(()=>e?`ERROR: `:t?`WARNING: `:``,[e,t])}${e||t||n}`,d=()=>{let e=r.current;if(e){let{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:i}=e;a(t+1{s(!1),d()},[r,l]),q(`resize`,d),!e&&!t&&!n?null:F(`span`,{className:(0,K.default)({"vm-text-field__error":!0,"vm-text-field__warning":t&&!e,"vm-text-field__helper-text":!t&&!e,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":o}),"data-show":!!l,ref:r,onClick:()=>{i&&(s(!0),a(!1))},children:l})};a();var $=({label:e,value:t,type:n=`text`,error:r=``,warning:i=``,helperText:a=``,placeholder:o,endIcon:s,startIcon:l,disabled:u=!1,readonly:d=!1,autofocus:f=!1,inputmode:p=`text`,caretPosition:m,onChange:h,onEnter:g,onKeyDown:_,onFocus:v,onBlur:y,onChangeCaret:b})=>{let{isDarkTheme:x}=U(),{isMobile:S}=J(),C=O(null),w=O(null),T=D(()=>n===`textarea`?w:C,[n]),E=(0,K.default)({"vm-text-field__input":!0,"vm-text-field__input_error":r,"vm-text-field__input_warning":!r&&i,"vm-text-field__input_icon-start":l,"vm-text-field__input_textarea":n===`textarea`}),k=e=>{if(!b)return;let{selectionStart:t,selectionEnd:n}=e;b&&b([t||0,n||0])},A=e=>{k(e.currentTarget)},j=e=>{_&&_(e);let{key:t,ctrlKey:r,metaKey:i}=e,a=t===`Enter`;(n===`textarea`?a&&(i||r):a)&&g&&(e.preventDefault(),g())},M=e=>{k(e.currentTarget)},N=e=>{u||(h&&h(e.currentTarget.value),k(e.currentTarget))},P=()=>{v&&v()},I=()=>{y&&y()},ee=e=>{try{T.current&&T.current.setSelectionRange(e[0],e[1])}catch(e){return e}};return c(()=>{!f||S||T?.current?.focus&&T.current.focus()},[T,f]),c(()=>{m&&ee(m)},[m]),F(`label`,{className:(0,K.default)({"vm-text-field":!0,"vm-text-field_textarea":n===`textarea`,"vm-text-field_dark":x,"vm-text-field_disabled":u}),"data-replicated-value":t,children:[l&&F(`div`,{className:`vm-text-field__icon-start`,children:l}),s&&F(`div`,{className:`vm-text-field__icon-end`,children:s}),e&&F(`span`,{className:`vm-text-field__label`,children:e}),n===`textarea`?F(`textarea`,{className:E,disabled:u,readOnly:d,ref:w,value:t,rows:1,inputMode:p,placeholder:o,autoCapitalize:`none`,onInput:N,onKeyDown:j,onKeyUp:M,onFocus:P,onBlur:I,onMouseUp:A}):F(`input`,{className:E,disabled:u,readOnly:d,ref:C,value:t,type:n,placeholder:o,inputMode:p,autoCapitalize:`none`,onInput:N,onKeyDown:j,onKeyUp:M,onFocus:P,onBlur:I,onMouseUp:A}),F(Ei,{error:r,warning:i,info:a})]})};a();var Di=({accountIds:e})=>{let t=fe(),{isMobile:n}=J(),{tenantId:r,serverUrl:i}=U(),a=We(),o=Bt(),[s,c]=u(``),l=O(null),{value:d,toggle:f,setFalse:p}=Z(!1),m=D(()=>{if(!s)return e;try{let t=new RegExp(s,`i`);return e.filter(e=>t.test(e)).sort((e,n)=>(e.match(t)?.index||0)-(n.match(t)?.index||0))}catch{return[]}},[s,e]),h=D(()=>{let t=!e.length,n=e.length===1&&e[0]===`0:0`;return!t&&!n},[e]),g=e=>()=>{if(i){let t=Me(i,e);if(t===i)return;a({type:`SET_SERVER`,payload:t}),o({type:`RUN_QUERY`})}p()};return h?F(`div`,{className:`vm-tenant-input`,children:[F(Q,{title:`Define Tenant ID if you need request to another storage`,children:F(`div`,{ref:l,children:n?F(`div`,{className:`vm-mobile-option`,onClick:f,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Kn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Tenant ID`}),F(`span`,{className:`vm-mobile-option-text__value`,children:r})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,fullWidth:!0,startIcon:F(Kn,{}),endIcon:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":d}),children:F(G,{})}),onClick:f,children:r})})}),F(Zr,{open:d,placement:`bottom-right`,onClose:p,buttonRef:l,title:n?`Define Tenant ID`:void 0,children:F(`div`,{className:(0,K.default)({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n}),children:[F(`div`,{className:`vm-tenant-input-list__search`,children:F($,{autofocus:!0,label:`Search`,value:s,onChange:c,type:`search`})}),m.map(e=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":n,"vm-list-item_active":e===r}),onClick:g(e),children:e},e))]})})]}):null};a();function Oi(e){let t=O();return c(()=>{t.current=e},[e]),t.current}var ki=({text:e,href:t,children:n,colored:r=!0,underlined:i=!1,withIcon:a=!1})=>F(`a`,{href:t,className:(0,K.default)({"vm-link":!0,"vm-link_colored":r,"vm-link_underlined":i,"vm-link_with-icon":a}),target:`_blank`,rel:`noreferrer`,children:e||n});a();var Ai=()=>{let e=fe(),{isMobile:t}=J(),{customStep:n,isHistogram:r}=Dr(),{period:{step:i,end:a,start:o}}=W(),s=Or(),{displayType:l}=xr(),d=Oi(a-o),f=D(()=>vt(a-o,r,l),[a,o,r,l]),p=Oi(f),[m,h]=u(n||f),[g,_]=u(``),v=n===f,{value:y,toggle:b,setFalse:x}=Z(!1),S=O(null),C=e=>{let t=e||m||f||`1s`,n=(t.match(/[a-zA-Z]+/g)||[]).length?t:`${t}s`;s({type:`SET_CUSTOM_STEP`,payload:n}),h(n),_(``)},w=()=>{C(),x()},T=()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},E=()=>{C(),w()},k=e=>{let t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every(e=>parseFloat(e)>0),i=n.every(e=>ut.find(t=>t.short===e)),a=r&&i;h(e),_(a?``:V.validStep)};return c(()=>{n&&C(n)},[n]),c(()=>{!n&&f&&C(f)},[f]),c(()=>{a-o===d||!d||n!==p||f&&C(f)},[d,f]),c(()=>{(i===n||i===f)&&C(f)},[r,l]),F(`div`,{className:`vm-step-control`,ref:S,children:[t?F(`div`,{className:`vm-mobile-option`,onClick:b,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Hn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Step`}),F(`span`,{className:`vm-mobile-option-text__value`,children:m})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(X,{className:e?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Hn,{}),onClick:b,children:[`Step: `,v?`auto (${m})`:m]}),F(Zr,{open:y,placement:`bottom-right`,onClose:w,buttonRef:S,title:t?`Query resolution step width`:void 0,children:F(`div`,{className:(0,K.default)({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[F($,{autofocus:!0,label:`Step value`,value:m,error:g,onChange:k,onEnter:E,onFocus:T,onBlur:C,endIcon:F(Q,{title:`Reset to auto step (${f})`,children:F(X,{size:`small`,variant:`text`,color:`primary`,startIcon:F(gn,{}),onClick:()=>{let e=f||`1s`;k(e),C(e)},ariaLabel:`reset step`})})}),F(`div`,{className:`vm-step-control-popper-info`,children:[F(`p`,{children:[F(`code`,{children:`step`}),` - the `,F(ki,{href:`https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations`,text:`interval`}),` between datapoints, which must be returned from the range query. The `,F(`code`,{children:`query`}),` is executed at `,F(`code`,{children:`start`}),`, `,F(`code`,{children:`start+step`}),`, `,F(`code`,{children:`start+2*step`}),`, …, `,F(`code`,{children:`end`}),` timestamps.`]}),F(`p`,{children:[`Read more about `,F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#range-query`,text:`Range`}),` and `,F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#instant-query`,text:`Instant`}),` queries.`]})]})]})})]})},ji=({relativeTime:e,setDuration:t})=>{let{isMobile:n}=J(),r=e=>()=>{t(e)};return F(`div`,{className:(0,K.default)({"vm-time-duration":!0,"vm-time-duration_mobile":n}),children:Dt.map(({id:t,duration:i,until:a,title:o})=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":n,"vm-list-item_active":t===e}),onClick:r({duration:i,until:a(),id:t}),children:o||i},t))})},Mi=({hasPrev:e,hasNext:t,viewDate:n,showArrowNav:r,onChangeViewDate:i,toggleDisplayYears:a})=>F(`div`,{className:`vm-calendar-header`,children:[F(`div`,{className:`vm-calendar-header-left`,onClick:a,children:[F(`span`,{className:`vm-calendar-header-left__date`,children:n.format(`MMMM YYYY`)}),F(`div`,{className:`vm-calendar-header-left__select-year`,children:F(Cn,{})})]}),r&&F(`div`,{className:`vm-calendar-header-right`,children:[F(`div`,{className:(0,K.default)({"vm-calendar-header-right__prev":!0,"vm-calendar-header-right_disabled":!e}),onClick:e?()=>{i(n.subtract(1,`month`))}:void 0,children:F(G,{})}),F(`div`,{className:(0,K.default)({"vm-calendar-header-right__next":!0,"vm-calendar-header-right_disabled":!t}),onClick:t?()=>{i(n.add(1,`month`))}:void 0,children:F(G,{})})]})]});a();var Ni=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],Pi=({minDate:e,maxDate:t,viewDate:n,selectDate:r,onChangeSelectDate:i})=>{let a=`YYYY-MM-DD`,o=L.default.tz(),s=(0,L.default)(n.format(a)),c=D(()=>{let e=Array(42).fill(null),t=s.startOf(`month`),n=s.endOf(`month`).diff(t,`day`)+1,r=Array(n).fill(t).map((e,t)=>e.add(t,`day`)),i=t.day();return e.splice(i,n,...r),e},[s]),l=e=>()=>{e&&i(e)};return F(`div`,{className:`vm-calendar-body`,children:[Ni.map(e=>F(Q,{title:e,children:F(`div`,{className:`vm-calendar-body-cell vm-calendar-body-cell_weekday`,children:e[0]})},e)),c.map((n,i)=>{let s=n&&(e&&n.isBefore(e)||t&&n.isAfter(t));return F(`div`,{className:(0,K.default)({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!n,"vm-calendar-body-cell_day_active":(n&&n.format(a))===r.format(a),"vm-calendar-body-cell_day_today":(n&&n.format(a))===o.format(a),"vm-calendar-body-cell_day_disabled":s}),onClick:s?void 0:l(n),children:n&&n.format(`D`)},n?n.format(a):i)})]})};a();var Fi=({minDate:e,maxDate:t,viewDate:n,onChangeViewDate:r})=>{let i=(0,L.default)().format(`YYYY`),a=D(()=>n.format(`YYYY`),[n]),o=D(()=>{let e=(0,L.default)().subtract(18/2,`year`);return Array(18).fill(e).map((e,t)=>e.add(t,`year`))},[n]);c(()=>{let e=document.getElementById(`vm-calendar-year-${a}`);e&&e.scrollIntoView({block:`center`})},[]);let s=e=>()=>{r(e)};return F(`div`,{className:`vm-calendar-years`,children:o.map(n=>{let r=n&&e&&n.isBefore(e)||t&&n.isAfter(t);return F(`div`,{className:(0,K.default)({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":n.format(`YYYY`)===a,"vm-calendar-years__year_today":n.format(`YYYY`)===i,"vm-calendar-years__year_disabled":r}),id:`vm-calendar-year-${n.format(`YYYY`)}`,onClick:r?void 0:s(n),children:n.format(`YYYY`)},n.format(`YYYY`))})})};a();var Ii=({minDate:e,maxDate:t,viewDate:n,selectDate:r,onChangeViewDate:i})=>{let a=(0,L.default)().format(`MM`),o=D(()=>r.format(`MM`),[r]),s=D(()=>Array(12).fill(``).map((e,t)=>(0,L.default)(n).month(t)),[n]);c(()=>{let e=document.getElementById(`vm-calendar-year-${o}`);e&&e.scrollIntoView({block:`center`})},[]);let l=e=>()=>{i(e)};return F(`div`,{className:`vm-calendar-years`,children:s.map(n=>{let r=n&&(e&&n.isBefore(e)||t&&n.isAfter(t));return F(`div`,{className:(0,K.default)({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":n.format(`MM`)===o,"vm-calendar-years__year_today":n.format(`MM`)===a,"vm-calendar-years__year_disabled":r}),id:`vm-calendar-year-${n.format(`MM`)}`,onClick:r?void 0:l(n),children:n.format(`MMMM`)},n.format(`MM`))})})};a();var Li=function(e){return e[e.days=0]=`days`,e[e.months=1]=`months`,e[e.years=2]=`years`,e}(Li||{}),Ri=({date:e,minDate:t,maxDate:n,format:r=Je,onChange:i})=>{let[a,o]=u(Li.days),[s,l]=u(L.default.tz(e)),[d,f]=u(L.default.tz(e)),p=L.default.tz(),m=p.format(qe)===s.format(qe),{isMobile:h}=J(),g=t?(0,L.default)(t):void 0,_=n?(0,L.default)(n):void 0,v=()=>{o(e=>e===Li.years?Li.days:Li.years)},y=e=>{l(e),o(e=>e===Li.years?Li.months:Li.days)};return c(()=>{d.format()!==L.default.tz(e).format()&&i(d.format(r))},[d]),c(()=>{let t=L.default.tz(e);l(t),f(t)},[e]),F(`div`,{className:(0,K.default)({"vm-calendar":!0,"vm-calendar_mobile":h}),children:[F(Mi,{viewDate:s,onChangeViewDate:y,toggleDisplayYears:v,showArrowNav:a===Li.days,hasPrev:a===Li.days&&(!g||s.startOf(`month`).isAfter(g)),hasNext:a===Li.days&&(!_||s.endOf(`month`).isBefore(_))}),a===Li.days&&F(Pi,{minDate:g,maxDate:_,viewDate:s,selectDate:d,onChangeSelectDate:e=>{f(e)}}),a===Li.years&&F(Fi,{minDate:g,maxDate:_,viewDate:s,onChangeViewDate:y}),a===Li.months&&F(Ii,{minDate:g,maxDate:_,selectDate:d,viewDate:s,onChangeViewDate:y}),!m&&a===Li.days&&F(`div`,{className:`vm-calendar-footer`,children:F(X,{variant:`text`,size:`small`,onClick:()=>{l(p)},children:`show today`})})]})};a();var zi=g(({date:e,targetRef:t,format:n=Je,onChange:r,label:i,minDate:a,maxDate:o},s)=>{let c=D(()=>(0,L.default)(e).isValid()?L.default.tz(e):(0,L.default)().tz(),[e]),{isMobile:l}=J(),{value:u,toggle:d,setFalse:f}=Z(!1);return q(`click`,d,t),q(`keyup`,e=>{(e.key===`Escape`||e.key===`Enter`)&&f()}),F(m,{children:F(Zr,{open:u,buttonRef:t,placement:`bottom-right`,onClose:f,title:l?i:void 0,children:F(`div`,{ref:s,children:F(Ri,{date:c,format:n,onChange:e=>{r(e),f()},minDate:a,maxDate:o})})})})}),Bi=e(y(),1);a();var Vi=(e,t)=>(0,L.default)(e).isValid()?L.default.tz(e).format(t):e,Hi={[Xe]:`9999-99-99T99:99:99`,[qe]:`9999-99-99`,[Je]:`9999-99-99 99:99:99`},Ui=({value:e=``,format:t=Je,minDate:n,maxDate:r,label:i,pickerLabel:a,pickerRef:o,onChange:s,onEnter:l,disabled:d})=>{let f=O(null),[p,m]=u(null),h=Hi[t],[g,_]=u(Vi(e,t)),[v,y]=u(!1),[b,x]=u(!1),S=(0,L.default)(g).isValid()?``:`Invalid date format`;return c(()=>{let n=Vi(e,t);n!==g&&_(n),b&&(l(),x(!1))},[e]),c(()=>{v&&p&&(p.focus(),p.setSelectionRange(11,11),y(!1))},[v]),F(`div`,{className:(0,K.default)({"vm-date-time-input":!0,"vm-date-time-input_error":S,"vm-date-time-input_disabled":d}),children:[F(`label`,{children:i}),F(Bi.default,{tabIndex:1,inputRef:m,mask:h,placeholder:t,value:g,autoCapitalize:`none`,inputMode:`numeric`,maskChar:null,onChange:e=>{_(e.currentTarget.value)},onBlur:()=>{s(g)},onKeyUp:e=>{e.key===`Enter`&&(s(g),x(!0))},disabled:d}),S&&F(`span`,{className:`vm-date-time-input__error-text`,children:S}),F(`div`,{className:`vm-date-time-input__icon`,ref:f,children:F(X,{variant:`text`,color:`gray`,size:`small`,startIcon:F(Tn,{}),ariaLabel:`calendar`,disabled:d})}),F(zi,{label:a,ref:o,date:g,onChange:e=>{_(e),y(!0)},targetRef:f,minDate:n,maxDate:r,format:t})]})};a();var Wi=()=>{let{isMobile:e}=J(),{isDarkTheme:t}=U(),n=O(null),r=fr(),i=D(()=>r.width>1120,[r]),[a,o]=u(),[s,l]=u(),{period:{end:d,start:f},relativeTime:p,timezone:h,duration:g}=W(),_=Bt(),v=fe(),y=Oi(h),{value:b,toggle:x,setFalse:S}=Z(!1),C=D(()=>({region:h,utc:kt(h)}),[h]);c(()=>{o(St(Et(d)))},[h,d]),c(()=>{l(St(Et(f)))},[h,f]);let w=({duration:e,until:t,id:n})=>{_({type:`SET_RELATIVE_TIME`,payload:{duration:e,until:t,id:n}}),S()},T=D(()=>({start:L.default.tz(Et(f)).format(Je),end:L.default.tz(Et(d)).format(Je)}),[f,d,h]),E=D(()=>p&&p!==`none`?p.replace(/_/g,` `):`${T.start} - ${T.end}`,[p,T]),k=O(null),A=O(null),j=O(null),M=()=>{s&&a&&_({type:`SET_PERIOD`,payload:{from:L.default.tz(s).toDate(),to:L.default.tz(a).toDate()}}),S()};return c(()=>{let e=Ot({relativeTimeId:p,defaultDuration:g,defaultEndInput:Et(d)});y&&h!==y&&w({id:e.relativeTimeId,duration:e.duration,until:e.endInput})},[h,y]),Xr(n,t=>{if(e)return;let n=t.target,r=k?.current&&k?.current?.contains(n),i=A?.current&&A?.current?.contains(n);r||i||S()}),F(m,{children:[F(`div`,{ref:j,children:e?F(`div`,{className:`vm-mobile-option`,onClick:x,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(wn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Time range`}),F(`span`,{className:`vm-mobile-option-text__value`,children:E})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:i?`Time range controls`:E,children:F(X,{className:v?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(wn,{}),onClick:x,ariaLabel:`time range controls`,children:i&&F(`span`,{children:E})})})}),F(Zr,{open:b,buttonRef:j,placement:`bottom-right`,onClose:S,clickOutside:!1,title:e?`Time range controls`:``,children:F(`div`,{className:(0,K.default)({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[F(`div`,{className:`vm-time-selector-left`,children:[F(`div`,{className:(0,K.default)({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[F(Ui,{value:s,label:`From:`,pickerLabel:`Date From`,pickerRef:k,onChange:l,onEnter:M}),F(Ui,{value:a,label:`To:`,pickerLabel:`Date To`,pickerRef:A,onChange:o,onEnter:M})]}),F(`div`,{className:`vm-time-selector-left-timezone`,children:[F(`div`,{className:`vm-time-selector-left-timezone__title`,children:C.region}),F(`div`,{className:`vm-time-selector-left-timezone__utc`,children:C.utc})]}),F(X,{variant:`text`,startIcon:F(En,{}),onClick:()=>_({type:`RUN_QUERY_TO_NOW`}),children:`switch to now`}),F(`div`,{className:`vm-time-selector-left__controls`,children:[F(X,{color:`error`,variant:`outlined`,onClick:()=>{o(St(Et(d))),l(St(Et(f))),S()},children:`Cancel`}),F(X,{color:`primary`,onClick:M,children:`Apply`})]})]}),F(ji,{relativeTime:p||``,setDuration:w})]})})]})};a();var Gi=()=>{let[e,t]=v();return{setSearchParamsFromKeys:p(n=>{let r=!!e.size,i=new URLSearchParams(e),a=e.toString();for(let[e,t]of Object.entries(n)){if(t==null||t===``){i.delete(e);continue}let n=String(t);i.get(e)!==n&&i.set(e,n)}a!==i.toString()&&t(i,{replace:!r})},[e,t])}};a();var Ki=()=>{let{isMobile:e}=J(),t=fe(),n=O(null),[r]=v(),{setSearchParamsFromKeys:i}=Gi(),a=r.get(`date`)||(0,L.default)().tz().format(`YYYY-MM-DD`),o=D(()=>L.default.tz(a).format(qe),[a]),s=e=>{i({date:e})};return c(()=>{s(a)},[]),F(`div`,{children:[F(`div`,{ref:n,children:e?F(`div`,{className:`vm-mobile-option`,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(Tn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Date control`}),F(`span`,{className:`vm-mobile-option-text__value`,children:o})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:`Date control`,children:F(X,{className:t?``:`vm-header-button`,variant:`contained`,color:`primary`,startIcon:F(Tn,{}),children:o})})}),F(zi,{label:`Date control`,date:a||``,format:qe,onChange:s,targetRef:n})]})};a();var qi=[{seconds:0,title:`Off`},{seconds:1,title:`1s`},{seconds:2,title:`2s`},{seconds:5,title:`5s`},{seconds:10,title:`10s`},{seconds:30,title:`30s`},{seconds:60,title:`1m`},{seconds:300,title:`5m`},{seconds:900,title:`15m`},{seconds:1800,title:`30m`},{seconds:3600,title:`1h`},{seconds:7200,title:`2h`}],Ji=({tooltip:e,useAutorefresh:t,closeModal:n})=>{let{isMobile:r}=J(),i=Bt(),a=fe(),[o,s]=u(!1),[l,d]=u(qi[0]),{value:f,toggle:p,setFalse:h}=Z(!1),g=O(null),_=e=>{(o&&!e.seconds||!o&&e.seconds)&&s(e=>!e),d(e),h()},v=()=>{i({type:`RUN_QUERY`}),!t&&r&&n()};c(()=>{let e=l.seconds,t;return o?t=setInterval(()=>{i({type:`RUN_QUERY`})},e*1e3):d(qi[0]),()=>{t&&clearInterval(t)}},[l,o]);let y=e=>()=>{_(e)};return F(m,{children:[F(`div`,{className:`vm-execution-controls`,children:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":r,"vm-header-button":!a,"vm-autorefresh":t}),children:t?r?F(`div`,{className:`vm-mobile-option`,onClick:p,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(gn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:[F(`span`,{className:`vm-mobile-option-text__label`,children:`Auto-refresh`}),F(`span`,{className:`vm-mobile-option-text__value`,children:l.title})]}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(m,{children:[F(Q,{title:e,children:F(X,{variant:`contained`,color:`primary`,onClick:v,startIcon:F(Sn,{}),ariaLabel:e})}),F(Q,{title:`Auto-refresh control`,children:F(`div`,{ref:g,children:F(X,{variant:`contained`,color:`primary`,fullWidth:!0,endIcon:F(`div`,{className:(0,K.default)({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":f}),children:F(G,{})}),onClick:p,children:l.title})})})]}):r?F(`div`,{className:`vm-mobile-option`,onClick:v,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(gn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:F(`span`,{className:`vm-mobile-option-text__label`,children:`Refresh`})})]}):F(X,{variant:`contained`,color:`primary`,onClick:v,startIcon:F(Sn,{}),ariaLabel:e})})}),t&&F(Zr,{open:f,placement:`bottom-right`,onClose:h,buttonRef:g,title:r?`Auto-refresh duration`:void 0,children:F(`div`,{className:(0,K.default)({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":r}),children:qi.map(e=>F(`div`,{className:(0,K.default)({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":e.seconds===l.seconds}),onClick:y(e),children:e.title},e.seconds))})})]})};a();var Yi={enable:`Enable to save the modified server URL to local storage, preventing reset upon page refresh.`,disable:`Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.`},Xi=g(({onClose:e},t)=>{let{serverUrl:r}=U(),i=We(),{value:a,toggle:o}=Z(!!z(`SERVER_URL`)),[s,l]=u(r),[d,f]=u(``),m=e=>{l(e||``),f(``)},h=p(()=>{i({type:`SET_SERVER`,payload:s}),e()},[s]);return c(()=>{r||f(V.emptyServer),De(r)||f(V.validServer)},[r]),c(()=>{a?ge(`SERVER_URL`,s):_e([`SERVER_URL`])},[a]),c(()=>{r!==s&&l(r)},[r]),n(t,()=>({handleApply:h}),[h]),F(`div`,{children:[F(`div`,{className:`vm-server-configurator__title`,children:`Server URL`}),F(`div`,{className:`vm-server-configurator-url`,children:[F($,{autofocus:!0,value:s,error:d,onChange:m,onEnter:h,inputmode:`url`}),F(Q,{title:a?Yi.disable:Yi.enable,children:F(X,{className:`vm-server-configurator-url__button`,variant:`text`,color:a?`primary`:`gray`,onClick:o,startIcon:F(Kn,{})})})]})]})}),Zi=({value:e=!1,disabled:t=!1,label:n,color:r=`secondary`,fullWidth:i,onChange:a})=>{let o=()=>{t||a(!e)};return F(`div`,{className:(0,K.default)({"vm-switch":!0,"vm-switch_full-width":i,"vm-switch_disabled":t,"vm-switch_active":e,[`vm-switch_${r}_active`]:e,[`vm-switch_${r}`]:r}),onClick:o,children:[F(`div`,{className:`vm-switch-track`,children:F(`div`,{className:`vm-switch-track__thumb`})}),n&&F(`span`,{className:`vm-switch__label`,children:n})]})};a();var Qi=[{label:`Graph`,type:B.chart},{label:`JSON`,type:B.code},{label:`Table`,type:B.table}],$i=g(({onClose:e},t)=>{let{isMobile:r}=J(),{seriesLimits:i}=xr(),a=Sr(),o=z(`LEGEND_AUTO_COLLAPSE`),[s,l]=u(o?o===`true`:!0),[d,f]=u(i),[m,h]=u({table:``,chart:``,code:``}),g=()=>{f(ze)},_=e=>t=>{let n=t||``;h(t=>({...t,[e]:+n<0?V.positiveNumber:``})),f({...d,[e]:n||1/0})},v=p(()=>{a({type:`SET_SERIES_LIMITS`,payload:d}),e()},[d]);return c(()=>{ge(`LEGEND_AUTO_COLLAPSE`,`${s}`)},[s]),n(t,()=>({handleApply:v}),[v]),F(`div`,{className:`vm-limits-configurator`,children:[F(`div`,{className:`vm-server-configurator__title`,children:[`Series limits by tabs`,F(Q,{title:`Set to 0 to disable the limit`,children:F(X,{variant:`text`,color:`primary`,size:`small`,startIcon:F(_n,{})})}),F(`div`,{className:`vm-limits-configurator-title__reset`,children:F(X,{variant:`text`,color:`primary`,size:`small`,startIcon:F(gn,{}),onClick:g,children:`Reset limits`})})]}),F(`div`,{className:(0,K.default)({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":r}),children:Qi.map(e=>F(`div`,{children:F($,{label:e.label,value:d[e.type],error:m[e.type],onChange:_(e.type),onEnter:v,type:`number`})},e.type))}),F(`div`,{className:`vm-graph-settings-row`,children:[F(`span`,{className:`vm-graph-settings-row__label`,children:`Auto-collapse legend`}),F(Zi,{value:s,onChange:l,label:s?`Enabled`:`Disabled`,fullWidth:r}),F(`span`,{className:`vm-legend-configs-item__info`,children:[`Collapses the legend when series count exceeds `,100,` to reduce UI load.`]})]})]})});a();var ea=({defaultExpanded:e=!1,onChange:t,title:n,children:r,id:i})=>{let[a,o]=u(e);return c(()=>{o(e)},[e]),F(m,{children:[F(`header`,{className:(0,K.default)({"vm-accordion-header":!0,"vm-accordion-header_open":a}),onClick:e=>{let n=window.getSelection();if(e.target.closest(`button`)){e.preventDefault();return}if(n&&n.toString()){e.preventDefault();return}o(e=>{let n=!e;return t&&t(n),n})},id:i,children:[n,F(`div`,{className:(0,K.default)({"vm-accordion-header__arrow":!0,"vm-accordion-header__arrow_open":a}),children:F(G,{})})]}),a&&F(`section`,{className:`vm-accordion-section`,children:r},`content`)]})},ta=`Browser timezone is not recognized, supported, or could not be determined.`,na=()=>F(Q,{title:ta,children:F(yn,{})});a();var ra=Nt(),ia=g((e,t)=>{let{isMobile:r}=J(),i=At(),{timezone:a,defaultTimezone:o}=W(),s=Bt(),[l,d]=u(a),[f,p]=u(``),m=O(null),{value:h,toggle:g,setFalse:_}=Z(!1),v=D(()=>[{title:`Default time (${o})`,region:o,utc:o?kt(o):`UTC`},{title:ra.title,region:ra.region,utc:kt(ra.region),isInvalid:!ra.isValid},{title:`UTC (Coordinated Universal Time)`,region:`UTC`,utc:`UTC`}].filter(e=>e.region),[o]),y=D(()=>{if(!f)return i;try{return At(f)}catch{return{}}},[f,i]),b=D(()=>Object.keys(y),[y]),x=D(()=>({region:l,utc:kt(l)}),[l]),S=e=>{p(e)},C=e=>{d(e.region),p(``),_()},w=e=>()=>{C(e)};return c(()=>{d(a)},[a]),n(t,()=>({handleApply:()=>{s({type:`SET_TIMEZONE`,payload:l})}}),[l]),F(`div`,{className:`vm-timezones`,children:[F(`div`,{className:`vm-server-configurator__title`,children:`Time zone`}),F(`div`,{className:`vm-timezones-item vm-timezones-item_selected`,onClick:g,ref:m,children:[F(`div`,{className:`vm-timezones-item__title`,children:x.region}),F(`div`,{className:`vm-timezones-item__utc`,children:x.utc}),F(`div`,{className:(0,K.default)({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":h}),children:F(Cn,{})})]}),F(Zr,{open:h,buttonRef:m,placement:`bottom-left`,onClose:_,fullWidth:!0,title:r?`Time zone`:void 0,children:F(`div`,{className:(0,K.default)({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[F(`div`,{className:`vm-timezones-list-header`,children:[F(`div`,{className:`vm-timezones-list-header__search`,children:F($,{autofocus:!0,label:`Search`,value:f,onChange:S})}),v.map((e,t)=>e&&F(`div`,{className:`vm-timezones-item vm-timezones-list-group-options__item`,onClick:w(e),children:[F(`div`,{className:`vm-timezones-item__title`,children:[e.title,e.isInvalid&&F(na,{})]}),F(`div`,{className:`vm-timezones-item__utc`,children:e.utc})]},`${t}_${e.region}`))]}),b.map(e=>F(`div`,{className:`vm-timezones-list-group`,children:F(ea,{defaultExpanded:!0,title:F(`div`,{className:`vm-timezones-list-group__title`,children:e}),children:F(`div`,{className:`vm-timezones-list-group-options`,children:y[e]&&y[e].map(e=>F(`div`,{className:`vm-timezones-item vm-timezones-list-group-options__item`,onClick:w(e),children:[F(`div`,{className:`vm-timezones-item__title`,children:e.region}),F(`div`,{className:`vm-timezones-item__utc`,children:e.utc})]},e.search))})})},e))]})})]})});a();var aa=({options:e,value:t,label:n,onChange:r})=>{let i=O(null),[a,o]=u({width:`0px`,left:`0px`,borderRadius:`0px`}),s=e=>()=>{r(e)};return c(()=>{if(!i.current){o({width:`0px`,left:`0px`,borderRadius:`0px`});return}let n=e.findIndex(e=>e.value===t),{width:r}=i.current.getBoundingClientRect(),a=r,s=n*a,c=`0`;n===0&&(c=`16px 0 0 16px`),n===e.length-1&&(c=`10px`,--s,c=`0 16px 16px 0`),n!==0&&n!==e.length-1&&(a+=1,--s),o({width:`${a}px`,left:`${s}px`,borderRadius:c})},[i,t,e]),F(`div`,{className:`vm-toggles`,children:[n&&F(`label`,{className:`vm-toggles__label`,children:n}),F(`div`,{className:`vm-toggles-group`,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`},children:[a.borderRadius&&F(`div`,{className:`vm-toggles-group__highlight`,style:a}),e.map((e,n)=>F(`div`,{className:(0,K.default)({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":n===0,"vm-toggles-group-item_active":e.value===t,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:s(e.value),ref:e.value===t?i:null,children:[e.icon,e.title]},e.value))]})]})},oa=Object.values(xe).map(e=>({title:e,value:e})),sa=()=>{let{isMobile:e}=J(),t=We(),{theme:n}=U();return F(`div`,{className:(0,K.default)({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[F(`div`,{className:`vm-server-configurator__title`,children:`Theme preferences`}),F(`div`,{className:`vm-theme-control__toggle`,children:F(aa,{options:oa,value:n,onChange:e=>{t({type:`SET_THEME`,payload:e})}})},`${e}`)]})};a();var ca=`Settings`,la=()=>{let{isMobile:e}=J(),t=fe(),n=O(null),r=O(null),i=O(null),{value:a,setTrue:o,setFalse:s}=Z(!1),c=()=>{n.current&&n.current.handleApply(),r.current&&r.current.handleApply(),i.current&&i.current.handleApply(),s()},l=[{show:!t,component:F(Xi,{ref:n,onClose:s})},{show:!0,component:F($i,{ref:r,onClose:s})},{show:!0,component:F(ia,{ref:i})},{show:!t,component:F(sa,{})}].filter(e=>e.show);return F(m,{children:[e?F(`div`,{className:`vm-mobile-option`,onClick:o,children:[F(`span`,{className:`vm-mobile-option__icon`,children:F(mn,{})}),F(`div`,{className:`vm-mobile-option-text`,children:F(`span`,{className:`vm-mobile-option-text__label`,children:ca})}),F(`span`,{className:`vm-mobile-option__arrow`,children:F(G,{})})]}):F(Q,{title:ca,children:F(X,{className:(0,K.default)({"vm-header-button":!t}),variant:`contained`,color:`primary`,startIcon:F(mn,{}),onClick:o,ariaLabel:`settings`})}),a&&F(ri,{title:ca,onClose:s,children:F(`div`,{className:(0,K.default)({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[l.map((e,t)=>F(`div`,{className:`vm-server-configurator__input`,children:e.component},t)),F(`div`,{className:`vm-server-configurator-footer`,children:[F(X,{color:`error`,variant:`outlined`,onClick:s,children:`Cancel`}),F(X,{color:`primary`,variant:`contained`,onClick:c,children:`Apply`})]})]})})]})},ua=({displaySidebar:e,isMobile:t,headerSetup:n,accountIds:r,closeModal:i})=>F(`div`,{className:(0,K.default)({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[n?.tenant&&F(Di,{accountIds:r||[]}),n?.stepControl&&F(Ai,{}),n?.timeSelector&&F(Wi,{}),n?.cardinalityDatePicker&&F(Ki,{}),n?.executionControls&&F(Ji,{tooltip:n?.executionControls?.tooltip,useAutorefresh:n?.executionControls?.useAutorefresh,closeModal:i}),F(la,{}),!e&&F(hi,{})]});a();var da=!!z(`DISABLED_DEFAULT_TIMEZONE`),fa=()=>{let{serverUrl:e}=U(),t=Bt(),[n,r]=u(!1),[i,a]=u(``),o=e=>{let n=e.toLowerCase()===`local`?Nt().region:e;try{if((0,L.default)().tz(n).isValid(),t({type:`SET_DEFAULT_TIMEZONE`,payload:n}),da)return;t({type:`SET_TIMEZONE`,payload:n})}catch(e){e instanceof Error&&a(`${e.name}: ${e.message}`)}},s=async()=>{if(e){a(``),r(!0);try{let t=await fetch(`${e}/vmui/timezone`),n=await t.json();t.ok?(o(n.timezone),r(!1)):(a(n.error),r(!1))}catch(e){r(!1),e instanceof Error&&a(`${e.name}: ${e.message}`)}}};return c(()=>{s()},[e]),{isLoading:n,error:i}};a();var pa=()=>{let{serverUrl:e}=U(),t=We(),[n,r]=u(!1),[i,a]=u(``);return c(()=>{(async()=>{a(``),r(!0);try{t({type:`SET_APP_CONFIG`,payload:await(await fetch(`${e}/vmui/config.json`)).json()||{}})}catch(e){r(!1),e instanceof Error&&a(`${e.name}: ${e.message}`)}})()},[e]),{isLoading:n,error:i}},ma=function(e){return e.NO_STORAGE=`NO_STORAGE`,e.SECURITY_ERROR=`SECURITY_ERROR`,e.QUOTA_EXCEEDED=`QUOTA_EXCEEDED`,e.UNKNOWN=`UNKNOWN`,e}({}),ha={[ma.NO_STORAGE]:{title:`Storage unavailable`,description:`Browser storage is not available for this website.`,fix:[`Disable Private/Incognito mode and reload the page.`,`Disable privacy or ad-blocking extensions for this site and reload.`,`Open the site in another browser.`]},[ma.SECURITY_ERROR]:{title:`Storage access blocked`,description:`Browser settings or an extension are blocking access to browser storage.`,fix:[`Disable Private/Incognito mode and reload the page.`,`Disable privacy or ad-blocking extensions for this site and reload.`,`Open the site in a regular browser tab (not embedded).`]},[ma.QUOTA_EXCEEDED]:{title:`Storage quota exceeded`,description:`The storage limit for this website has been reached.`,fix:[`Clear this website’s stored data and reload the page.`,`Close other tabs for this website and try again.`,`Use another browser or browser profile.`]},[ma.UNKNOWN]:{title:`Storage error`,description:`An unexpected error occurred while accessing browser storage.`,fix:[`Reload the page.`,`Update the browser and try again.`,`Disable browser extensions and reload.`]}};a();var ga=e=>{if(!(e instanceof DOMException))return ma.UNKNOWN;switch(e.name){case`QuotaExceededError`:return ma.QUOTA_EXCEEDED;case`SecurityError`:return ma.SECURITY_ERROR;default:return ma.UNKNOWN}},_a=e=>{if(!e)return ma.NO_STORAGE;try{let t=`__vmui_test__`;return e.setItem(t,`1`),e.removeItem(t),null}catch(e){return ga(e)}},va=()=>{let{showInfoMessage:e}=Hr();return c(()=>{let t=_a(window.localStorage);if(t){let{title:n,description:r,fix:i}=ha[t];e({text:F(`div`,{className:`vm-storage-check`,children:[F(`h3`,{children:n}),F(`p`,{children:r}),!!i?.length&&F(`div`,{className:`vm-storage-check__fix`,children:[F(`div`,{children:`Try this:`}),F(`ul`,{children:i.map((e,t)=>F(`li`,{children:e},`${t}-${e}`))})]})]}),type:`error`,timeout:6e5})}},[]),null};a();var ya=()=>{let e=fe(),{isMobile:t}=J(),{pathname:n}=T(),[r,i]=v();return Ti(),fa(),pa(),c(()=>{let e=`vmui`,t=ue[n]?.title;document.title=t?`${t} - ${e}`:e},[n]),c(()=>{let{search:e,href:t}=window.location;if(e){let t=Re.default.parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach(([e,t])=>r.set(e,t)),i(r),window.location.search=``}let n=t.replace(/\/\?#\//,`/#/`);n!==t&&window.location.replace(n)},[]),c(()=>{let e=ve();(e.removed.length||e.migrated.length)&&console.info(e)},[]),F(`section`,{className:`vm-container`,children:[F(xi,{controlsComponent:ua}),F(`div`,{className:(0,K.default)({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:F(C,{})}),!e&&F(Ci,{}),F(va,{})]})},ba=`No match! This query hasn't selected any time series from database. Either the requested metrics are missing in the database, or there is a typo in series selector.`,xa=`The shown results are marked as PARTIAL. @@ -194,4 +194,4 @@ up{env="dev"} up{env="prod"}`},td=()=>{let[e]=v(),{data:t,loading:n,error:r,metricsError:i,flagsError:a,applyFilters:o}=$u(),[s,l]=u(e.get(`metrics`)||``),[d,f]=u(e.get(`flags`)||``),m=p(e=>{l(e)},[l]),h=p(e=>{f(e)},[f]),g=p(()=>{o(d,s)},[o,d,s]),_=p(()=>{let{flags:t,metrics:n}=ed;f(t),l(n),o(t,n),e.set(`flags`,t),e.set(`metrics`,n)},[ed,f,l,e]);c(()=>{d&&s&&g()},[]);let y=[];for(let[e,n]of t)y.push(F(`tr`,{className:`vm-table__row`,children:[F(`td`,{className:`vm-table-cell`,children:e}),F(`td`,{className:`vm-table-cell`,children:n})]}));return F(`section`,{className:`vm-retention-filters`,children:[n&&F(il,{}),F(`div`,{className:`vm-retention-filters-body vm-block`,children:[F(`div`,{className:`vm-retention-filters-body__expr`,children:[F(`div`,{className:`vm-retention-filters-body__title`,children:F(`p`,{children:[`Provide a list of flags for retention configuration. Note that only `,F(`code`,{children:`-retentionPeriod`}),` and `,F(`code`,{children:`-retentionFilter`}),` flags are supported.`]})}),F($,{type:`textarea`,label:`Flags`,value:d,error:r||a,autofocus:!0,onEnter:g,onChange:h,placeholder:`-retentionPeriod=4w -retentionFilter=up{env="dev"}:2w`})]}),F(`div`,{className:`vm-retention-filters-body__expr`,children:[F(`div`,{className:`vm-retention-filters-body__title`,children:F(`p`,{children:`Provide a list of metrics to check retention configuration.`})}),F($,{type:`textarea`,label:`Metrics`,value:s,error:r||i,onEnter:g,onChange:m,placeholder:`up{env="dev"} up{env="prod"} `})]}),F(`div`,{className:`vm-retention-filters-body__result`,children:F(`table`,{className:`vm-table`,children:[F(`thead`,{className:`vm-table-header`,children:F(`tr`,{children:[F(`th`,{className:`vm-table-cell vm-table-cell_header`,children:`Metric`}),F(`th`,{className:`vm-table-cell vm-table-cell_header`,children:`Applied retention`})]})}),F(`tbody`,{className:`vm-table-body`,children:y})]})}),F(`div`,{className:`vm-retention-filters-body-top`,children:[F(`a`,{target:`_blank`,href:`https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention-filters`,rel:`help noreferrer`,children:F(X,{variant:`text`,color:`gray`,startIcon:F(Un,{}),children:`Documentation`})}),F(X,{variant:`outlined`,onClick:_,children:`Try example`}),F(X,{variant:`contained`,onClick:g,startIcon:F(On,{}),children:`Preview`})]})]})]})},nd=async(e,t,n,r,i=fetch)=>{let a=await i(bo(e,t,n));if(!a.ok)throw Error(await a.text());let{data:o=[]}=await a.json(),s=await i(xo(e,t,n,r,$c(o).join(`,`)));if(!s.ok)throw Error(await s.text());return await s.text()};a();var rd=({hideQuery:e,showAllSeries:t})=>{let{query:n}=tn(),{period:r}=W(),{displayType:i,reduceMemUsage:a,seriesLimits:o}=xr(),{serverUrl:s}=U(),{showInfoMessage:l}=Hr(),[d,f]=u(!1),[m,h]=u(),[g,_]=u(),[v,y]=u([]),[b,x]=u(),S=O(new AbortController),C=D(()=>{if(_(``),y([]),r)if(!s)_(V.emptyServer);else if(n.every(e=>!e.trim()))y(n.map(()=>V.validQuery));else if(De(s)){let e={...r};return n.map(t=>vo(s,t,e,a))}else _(V.validServer)},[s,r,e,a]),w=D(()=>{let e=e=>`vmui_export_${n.join(`_`)}_${r.start}_${r.end}.${e}`;return{csv:async()=>{try{Fo(await nd(s,n,r,a),e(`csv`))}catch(e){console.error(e),l({text:`Couldn't fetch data for CSV export. Please try again`,type:`error`})}},json:async()=>{let t=So(s,n,r,a);try{Io(await(await fetch(t)).text(),e(`json`))}catch(e){console.error(e),l({text:`Couldn't fetch data for JSON export. Please try again`,type:`error`})}}}},[n,r,s,a]),T=p(async({fetchUrl:t,stateSeriesLimits:n,showAllSeries:r})=>{S.current.abort(),S.current=new AbortController;let{signal:a}=S.current;f(!0);try{let o=Math.floor(window.innerWidth/4),s=[],c=r?1/0:+n[i]||1/0,l=1,u=0;for await(let n of t){if(e?.includes(l-1)){y(e=>[...e,``]),l++;continue}let t=await fetch(n,{signal:a}),r=await t.text();if(new TextEncoder().encode(r).length>31457280){let e=`Response too large to display (over 30 MiB). Please narrow your query.`;_(e),y(t=>[...t,e]);continue}if(!t.ok||!t.body)s.push({metric:{},values:[],group:l}),_(r),y(e=>[...e,`${r}`]);else{y(e=>[...e,``]);let e=c-s.length,t=r.split(` -`).filter(e=>e),n=t.slice(0,e).sort();for(let e of n){let t=Uc(e);if(!t)continue;let{values:n,timestamps:r}=t,i=n.length,a=i>o,c=a?o:i,u=a?i/o:1,d=Array.from({length:c},(e,t)=>{let i=a?Math.floor(t*u):t;return[r[i]/1e3,n[i]]});s.push({group:l,metric:t.metric,values:d})}u+=t.length}l++}let d=`Showing ${s.length} series out of ${u} series due to performance reasons. Please narrow down the query, so it returns fewer series`;x(u>c?d:``),h(s),f(!1)}catch(e){f(!1),e instanceof Error&&e.name!==`AbortError`&&(_(String(e)),console.error(e))}},[i,e]),E=p(e=>{if(g)return;let t={...r};w[e](s,n,t,a)},[s,n,r,a,g,w]),k=p(()=>{S.current.abort(),h([])},[S]);return c(()=>{if(!C?.length)return;let e=setTimeout(T,400,{fetchUrl:C,stateSeriesLimits:o,showAllSeries:t});return()=>{S.current?.abort(),clearTimeout(e)}},[C,o,t]),{fetchUrl:C,isLoading:d,data:m,error:g,queryErrors:v,setQueryErrors:y,warning:b,abortFetch:k,exportData:E}};a();var id=()=>F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#raw-samples`,underlined:!0,children:`raw samples`}),ad=()=>F(ki,{underlined:!0,href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#query-data`,children:`Query API`}),od=()=>F(ki,{underlined:!0,href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#filtering`,children:`time series selector`}),sd=()=>{Do();let{isMobile:e}=J(),{displayType:t}=xr(),{query:n}=tn(),[r,i]=u([]),[a,o]=u(!n[0]),[s,c]=u(!1),[l,d]=u(!0),{data:f,error:m,isLoading:h,warning:g,queryErrors:_,setQueryErrors:v,abortFetch:y,exportData:b}=rd({hideQuery:r,showAllSeries:s}),x=O(null),S=!a&&m,C=e=>{i(e)},w=()=>{o(!1)},T=()=>{d(!1)},E=p(async e=>{e&&b(e)},[b]);return F(`div`,{className:(0,K.default)({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[F(ho,{label:`Time series selector`,queryErrors:a?[]:_,setQueryErrors:v,setHideError:o,stats:[],isLoading:h,onHideQuery:C,onRunQuery:w,abortFetch:y,hideButtons:{traceQuery:!0,disableCache:!0},includeFunctions:!1}),l&&F(Y,{variant:`info`,children:F(`div`,{className:`vm-explore-metrics-header-description`,children:[F(`ul`,{children:[F(`li`,{children:[`This page provides a dedicated view for querying and displaying `,F(id,{}),` from VictoriaMetrics.`]}),F(`li`,{children:[`It expects only `,F(od,{}),` as a query argument.`]}),F(`li`,{children:[`Deduplication can only be disabled if it was previously enabled on the server (`,F(`code`,{children:`-dedup.minScrapeInterval`}),`).`]}),F(`li`,{children:[`Users often assume that the `,F(ad,{}),` returns data exactly as stored, but data samples and timestamps may be modified by the API.`]})]}),F(X,{variant:`text`,size:`small`,startIcon:F(hn,{}),onClick:T,ariaLabel:`close tips`})]})}),S&&F(Y,{variant:`error`,children:m}),g&&F(zo,{warning:g,query:n,onChange:c}),F(`div`,{className:(0,K.default)({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[h&&F(Eo,{}),F(`div`,{className:`vm-custom-panel-body-header`,ref:x,children:[F(`div`,{className:`vm-custom-panel-body-header__tabs`,children:F(hr,{tabFilter:e=>e.value!==B.table})}),f&&F(Zc,{title:`Export query`,downloadFormatOptions:[`json`,`csv`],onDownload:E})]}),F(Vc,{graphData:f,liveData:f,isHistogram:!1,displayType:t,controlsRef:x})]})]})};a();var cd=({type:e,states:t,search:n,rule_id:r,alert_id:i,group_id:a})=>{let{setSearchParamsFromKeys:o}=Gi();c(()=>{o(ic({type:e,states:t,search:n,alert_id:i,rule_id:r,group_id:a}))},[e,t,n,r,a,i])},ld=({kinds:e,search:t})=>{let{setSearchParamsFromKeys:n}=Gi();c(()=>{n(ic({kinds:e,search:t}))},[e,t])},ud=(e,t,n,r,i)=>`${e}/vmalert/api/v1/rules?datasource_type=prometheus&search=${encodeURIComponent(t)}&type=${encodeURIComponent(n)}&state=${r.map(encodeURIComponent).join(`,`)}&group_limit=${i}&extended_states=true`,dd=(e,t,n,r)=>`${e}/vmalert/api/v1/${r}?group_id=${t}&${r}_id=${n}`,fd=(e,t)=>`${e}/vmalert/api/v1/group?group_id=${t}`,pd=e=>`${e}/vmalert/api/v1/notifiers`;a();var md=100,hd=({blockFetch:e,pageNum:t,search:n,ruleType:r,states:i,onPageChange:a})=>{let{serverUrl:o}=U(),{period:s}=W(),[l,d]=u([]),[f,p]=u(!1),[m,h]=u({page:t,total_pages:1,total_groups:0,total_rules:0}),[g,_]=u(),v=D(()=>ud(o,n,r,i,md),[o,n,r,i]);return c(()=>{e||(async()=>{p(!0);try{let e=`${v}&page_num=${t}`,n=await fetch(e),r=await n.json();n.ok?(d(r.data.groups||[]),h({page:r.page||1,total_pages:r.total_pages||1,total_groups:r.total_groups||0,total_rules:r.total_rules||0}),_(void 0)):(n.status===400&&r?.error?.includes(`exceeds total amount of pages`)&&a(1)(),_(`${r.errorType}\r\n${r?.error}`))}catch(e){e instanceof Error&&_(`${e.name}: ${e.message}`)}p(!1)})().catch(console.error)},[v,s,!!l.length||!e,t]),{groups:l,isLoading:f,error:g,pageInfo:m}};a();var gd=({types:e,allRuleTypes:t,allStates:n,states:r,search:i,onChangeRuleType:a,onChangeStates:o,onChangeSearch:s})=>{let c=D(()=>e.length?``:`No states. Please select rule states`,[e]),{isMobile:l}=J();return F(m,{children:F(`div`,{className:(0,K.default)({"vm-explore-alerts-header":!0,"vm-explore-alerts-header_mobile":l,"vm-block":!0,"vm-block_mobile":l}),children:[F(`div`,{className:`vm-explore-alerts-header__rule_type`,children:F(_c,{value:e,list:t,label:`Rule type`,placeholder:`Please select rule type`,onChange:a,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header__state`,children:F(_c,{itemClassName:`vm-badge-menu-item`,value:r,list:n,label:`State`,placeholder:`Please select rule state`,onChange:o,noOptionsText:c,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header-search`,children:F($,{label:`Search`,value:i,placeholder:`Filter by rule, name or labels`,startIcon:F(or,{}),onChange:s})})]})})},_d=(e,t)=>{let n=[];return t<2?n:(n.push(1),e>3&&n.push(0),e>2&&n.push(e-1),e>1&&e0&&e2&&n.push(0),n.push(t),n)},vd=({page:e,totalPages:t,onPageChange:n,totalGroups:r,totalRules:i,pageGroups:a,pageRules:o})=>{let s=_d(e,t);return F(m,{children:F(`div`,{className:`vm-pagination`,children:[F(`span`,{className:`vm-pagination-stats`,children:[F(`span`,{children:`Page rules/groups:`}),` `,F(`b`,{children:o}),` / `,F(`b`,{children:a})]}),!!s.length&&F(`div`,{className:`vm-pagination-buttons`,children:[F(X,{className:`vm-button-borderless vm-pagination-prev`,size:`small`,color:`gray`,disabled:e==1,variant:`outlined`,startIcon:F(G,{}),onClick:n(e-1)}),s.map((t,r)=>t?F(X,{className:(0,K.default)({"vm-button-borderless":e!==t}),size:`small`,color:`gray`,variant:`outlined`,onClick:n(t),children:t},r):F(`span`,{className:`vm-pagination-more`,children:`...`})),F(X,{className:`vm-button-borderless vm-pagination-next`,size:`small`,color:`gray`,disabled:e==t,variant:`outlined`,startIcon:F(G,{}),onClick:n(e+1)})]}),F(`span`,{className:`vm-pagination-stats`,children:[F(`span`,{children:`Total rules/groups:`}),` `,F(`b`,{children:i}),` / `,F(`b`,{children:r})]})]})})},yd=({items:e,children:t,align:n=`start`})=>F(`div`,{className:`vm-badges`,style:{"justify-content":n},children:[Object.entries(e).map(([e,t])=>F(`span`,{className:`vm-badge ${t.color}`,children:t.value?`${e}: ${t.value}`:e},e)),t]}),bd=({group:e})=>{let{isMobile:t}=J(),n=w();return F(`div`,{className:(0,K.default)({"vm-explore-alerts-group-header":!0,"vm-explore-alerts-group-header_mobile":t}),children:[F(`div`,{className:`vm-explore-alerts-group-header__desc`,children:[F(`div`,{className:`vm-explore-alerts-group-header__name`,children:e.name}),!t&&F(`div`,{className:`vm-explore-alerts-group-header__file`,children:e.file})]}),F(`div`,{className:`vm-explore-alerts-controls`,children:[F(yd,{align:`end`,items:Object.fromEntries(Object.entries(e.states||{}).map(([e,t])=>[e.toLowerCase(),{color:e.toLowerCase().replace(` `,`-`),value:t}]))}),F(X,{className:`vm-button-borderless`,size:`small`,color:`gray`,variant:`outlined`,startIcon:F(cn,{}),onClick:async()=>{n({pathname:`/rules`,search:`group_id=${e.id}`})}})]})]})};a();var xd=({name:e,id:t,groupId:n,entity:r,type:i,states:a,onClose:o,classes:s})=>{let{isMobile:c}=J(),{serverUrl:l}=U(),u=w(),d=Oa(),f=()=>{u({pathname:`/rules`,search:`group_id=${n}`})},p=()=>{u({pathname:`/rules`,search:`group_id=${n}&${r}_id=${t}`})},h=async()=>{let e=`${l}/vmui/#/rules?group_id=${n}`;i&&(e=`${e}&${r}_id=${t}`),await d(e,`Link to ${r} has been copied`)},g=(0,K.default)({"vm-explore-alerts-item-header":!0,"vm-explore-alerts-item-header_mobile":c},s),_=()=>{switch(r){case`alert`:return F(Q,{title:`Alert`,children:F(ln,{})});case`group`:return F(Q,{title:`Group`,children:F(sn,{})});default:switch(i){case`alerting`:return F(Q,{title:`Alerting rule`,children:F(un,{})});default:return F(Q,{title:`Recording rule`,children:F(dn,{})})}}},v=D(()=>Object.fromEntries(Object.entries(a||{}).map(([e,t])=>[e,{color:e.toLowerCase().replace(` `,`-`),value:t==1?0:t}])),[a]);return F(`div`,{className:g,id:`rule-${t}`,children:[F(`div`,{className:`vm-explore-alerts-item-header__title`,children:[_(),F(`div`,{className:`vm-explore-alerts-item-header__name`,children:e})]}),F(`div`,{className:`vm-explore-alerts-controls`,children:[F(yd,{align:`end`,items:v}),o?F(m,{children:[t&&F(X,{className:`vm-back-button`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(sn,{}),onClick:f,children:F(`span`,{className:`vm-button-text`,children:`Open Group`})}),F(X,{className:`vm-back-button`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(on,{}),onClick:h,children:F(`span`,{className:`vm-button-text`,children:`Copy Link`})})]}):F(X,{className:`vm-button-borderless`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(cn,{}),onClick:p})]})]})},Sd=e=>{let t=L.default.duration(Math.round(e*1e3)),n=[];return t.get(`day`)&&n.push(`D[d]`),t.get(`hour`)&&n.push(`H[h]`),t.get(`minute`)&&n.push(`m[m]`),t.get(`millisecond`)?n.push(`s.SSS[s]`):(!n.length||t.get(`second`))&&n.push(`s[s]`),t.format(n.join(` `))},Cd=e=>{let t=(0,L.default)(e);return t.year()<=1?`Never`:t.tz().format(`DD MMM YYYY HH:mm:ss`)},wd=e=>e.alerts?.length?e.alerts.reduce((e,t)=>(e[t.state]=(e[t.state]??0)+1,e),{}):{[e.state]:1};a();var Td=({item:e,group:t})=>{let n=e?.query,r=w(),i=t=>()=>{r({pathname:`/rules`,search:`group_id=${e.group_id}&alert_id=${t}`})},a=e?.labels||{},o=D(()=>Object.fromEntries(Object.entries(a).map(([e,t])=>[e,{color:`passive`,value:t}])),[a]),s=D(()=>{if(!t?.interval)return;let r=new URLSearchParams({"g0.expr":n,"g0.end_time":e.lastEvaluation,"g0.step_input":`${t.interval}s`,"g0.relative_time":`none`});return`${R.home}?${r.toString()}`},[n,e.lastEvaluation,t?.interval]);return F(`div`,{className:`vm-explore-alerts-rule-item`,children:[F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:[F(`tr`,{children:F(`td`,{style:{"text-align":`end`},colSpan:2,children:s&&F(I,{to:s,target:`_blank`,rel:`noreferrer`,children:F(X,{size:`small`,variant:`outlined`,color:`gray`,startIcon:F(or,{}),children:F(`span`,{className:`vm-button-text`,children:`Run query`})})})})}),F(`tr`,{children:[F(`td`,{children:`Query`}),F(`td`,{children:F(Ou,{code:n})})]}),!!e.duration&&F(`tr`,{children:[F(`td`,{children:`For`}),F(`td`,{children:Sd(e.duration)})]}),F(`tr`,{children:[F(`td`,{children:`Last evaluation`}),F(`td`,{children:Cd(e.lastEvaluation)})]}),!!e.lastError&&e.health!==`ok`&&F(`tr`,{children:[F(`td`,{children:`Last error`}),F(`td`,{children:F(Y,{variant:`error`,children:e.lastError})})]}),!!Object.keys(o).length&&F(`tr`,{children:[F(`td`,{children:`Labels`}),F(`td`,{children:F(yd,{items:o})})]})]})]}),!!Object.keys(e?.annotations||{}).length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Annotations`}),F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:Object.entries(e.annotations||{}).map(([e,t])=>F(`tr`,{children:[F(`td`,{children:e}),F(`td`,{children:t})]},e))})]})]}),!!e?.updates?.length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Last updates ${e.updates.length}/${e.max_updates_entries}`}),F(`table`,{children:[F(`thead`,{children:F(`tr`,{children:[F(`th`,{children:`Updated at`}),F(`th`,{children:`Series returned`}),F(`th`,{children:`Series fetched`}),F(`th`,{children:`Duration`}),F(`th`,{children:`Execution timestamp`})]})}),F(`tbody`,{children:e.updates.map(e=>F(`tr`,{children:[F(`td`,{children:Cd(e.time)}),F(`td`,{children:e.samples}),F(`td`,{children:e.series_fetched}),F(`td`,{children:Sd(e.duration/1e9)}),F(`td`,{children:Cd(e.at)})]},e.at))})]})]}),!!e?.alerts?.length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Alerts`}),F(`table`,{className:`vm-alerts-table`,children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-sm`}),F(`col`,{className:`vm-col-sm`}),F(`col`,{className:`vm-col-sm`}),F(`col`,{}),F(`col`,{className:`vm-col-hidden`})]}),F(`thead`,{children:F(`tr`,{children:[F(`th`,{children:`Active since`}),F(`th`,{children:`State`}),F(`th`,{children:`Value`}),F(`th`,{className:`vm-alerts-title`,children:`Labels`}),F(`th`,{})]})}),F(`tbody`,{children:e.alerts.map(e=>F(`tr`,{id:`alert-${e.id}`,children:[F(`td`,{children:Cd(e.activeAt)}),F(`td`,{children:F(yd,{items:{[e.state]:{color:e.state}}})}),F(`td`,{children:F(yd,{items:{[e.value]:{color:`passive`}}})}),F(`td`,{children:F(yd,{align:`start`,items:Object.fromEntries(Object.entries(e.labels||{}).map(([e,t])=>[e,{color:`passive`,value:t}]))})}),F(`td`,{children:F(X,{className:`vm-button-borderless`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(cn,{}),onClick:i(e.id)})})]},e.id))})]})]})]})},Ed=({states:e,rule:t,group:n})=>F(`div`,{className:`vm-explore-alerts-rule vm-badge-item ${(Object.keys(e).length>0?Object.keys(e)[0]:`ok`).replace(` `,`-`)}`,children:F(ea,{title:F(xd,{entity:`rule`,type:t.type,groupId:t.group_id,states:e,id:t.id,name:t.name}),children:F(Td,{item:t,group:n})},`rule-${t.id}`)});a();var Dd=({groupId:e,id:t,mode:n})=>{let{serverUrl:r}=U(),{period:i}=W(),[a,o]=u(),[s,l]=u(!1),[d,f]=u(),p=D(()=>dd(r,e,t,n),[r,e,t,n]);return c(()=>{(async()=>{l(!0);try{let e=await fetch(p),t=await e.json();e.ok?(o(t),f(void 0)):f(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&f(`${e.name}: ${e.message}`)}l(!1)})().catch(console.error)},[p,i]),{item:a,isLoading:s,error:d}};a();var Od=({id:e})=>{let{serverUrl:t}=U(),{period:n}=W(),[r,i]=u(),[a,o]=u(!1),[s,l]=u(),d=D(()=>fd(t,e),[t,e]);return c(()=>{(async()=>{o(!0);try{let e=await fetch(d);switch(e.headers.get(`Content-Type`)){case`application/json`:{let t=await e.json();e.ok?(i(t),l(void 0)):l(`${t.errorType}\r\n${t?.error}`);break}default:{let t=await e.text();t=t.startsWith(`unsupported path requested`)?`Failed to show group details. Request to ${d} failed with error: ${t.trim()}.\nMake sure that vmalert is reachable at ${d} and is of the same or higher version than vmselect`:`${e.statusText}\r\n${t}`,l(t);break}}}catch(e){e instanceof Error&&l(`${e.name}: ${e.message}`)}o(!1)})().catch(console.error)},[d,n]),{group:r,isLoading:a,error:s}},kd=({groupId:e,id:t,mode:n,onClose:r})=>{let{item:i,isLoading:a,error:o}=Dd({groupId:e,id:t,mode:n}),{group:s,isLoading:c,error:l}=Od({id:e}),u=o||l;if(a||c)return F(il,{});if(u)return F(Y,{variant:`error`,children:u});let d=`No rule with group ID=${e}, rule ID=${t} found!`;return F(ri,{className:`vm-explore-alerts`,title:i?F(xd,{entity:`rule`,type:i.type,groupId:i.group_id,states:wd(i),id:i.id,name:i.name,onClose:r}):`Rule not found`,onClose:r,children:F(`div`,{className:`vm-explore-alerts`,children:i?F(Td,{item:i,group:s}):F(Y,{variant:`info`,children:d})})})};a();var Ad=({item:e,group:t})=>{let n=e?.expression,r=e?.labels||{},i=D(()=>Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{color:`passive`,value:t}])),[r]),a=D(()=>{if(!t?.interval)return;let r=new URLSearchParams({"g0.expr":n,"g0.end_time":e.activeAt,"g0.step_input":`${t.interval}s`,"g0.relative_time":`none`});return`${R.home}?${r.toString()}`},[n,e.activeAt,t?.interval]);return F(`div`,{className:`vm-explore-alerts-alert-item`,children:[F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:[F(`tr`,{children:F(`td`,{style:{"text-align":`end`},colSpan:2,children:a&&F(I,{to:a,target:`_blank`,rel:`noreferrer`,children:F(X,{size:`small`,variant:`outlined`,color:`gray`,startIcon:F(or,{}),children:F(`span`,{className:`vm-button-text`,children:`Run query`})})})})}),F(`tr`,{children:[F(`td`,{children:`Query`}),F(`td`,{children:F(Ou,{code:n})})]}),F(`tr`,{children:[F(`td`,{children:`Active at`}),F(`td`,{children:Cd(e.activeAt)})]}),!!Object.keys(r).length&&F(`tr`,{children:[F(`td`,{children:`Labels`}),F(`td`,{children:F(yd,{items:i})})]})]})]}),!!Object.keys(e.annotations||{}).length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Annotations`}),F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:Object.entries(e.annotations||{}).map(([e,t])=>F(`tr`,{children:[F(`td`,{children:e}),F(`td`,{children:t})]},e))})]})]})]})},jd=({groupId:e,id:t,mode:n,onClose:r})=>{let{item:i,isLoading:a,error:o}=Dd({groupId:e,id:t,mode:n}),{group:s,isLoading:c,error:l}=Od({id:e}),u=o||l;if(a||c)return F(il,{});if(u)return F(Y,{variant:`error`,children:u});let d=`No alert with group ID=${e}, alert ID=${t} found!`;return F(ri,{className:`vm-explore-alerts`,title:i?F(xd,{entity:`alert`,type:`alerting`,groupId:i.group_id,id:i.id,name:i.name,states:{firing:1},onClose:r}):`Alert not found`,onClose:r,children:F(`div`,{className:`vm-explore-alerts`,children:i?F(Ad,{item:i,group:s}):F(Y,{variant:`info`,children:d})})})};a();var Md=({group:e})=>{let t=e?.labels||{},n=D(()=>Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{color:`passive`,value:t}])),[t]),r=e?.params||[],i=D(()=>Object.fromEntries(r.map(e=>[e,{color:`passive`}])),[r]),a=e?.headers||[],o=D(()=>Object.fromEntries(a.map(e=>[e,{color:`passive`}])),[a]),s=e?.notifier_headers||[],c=D(()=>Object.fromEntries(s.map(e=>[e,{color:`passive`}])),[s]);return F(`div`,{className:`vm-explore-alerts-group`,children:[F(`table`,{children:F(`tbody`,{children:[!!e.interval&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Interval`}),F(`td`,{children:Sd(e.interval)})]}),F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Last evaluation`}),F(`td`,{children:Cd(e.lastEvaluation)})]}),!!e.eval_offset&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Eval offset`}),F(`td`,{children:Sd(e.eval_offset)})]}),!!e.eval_delay&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Eval delay`}),F(`td`,{children:Sd(e.eval_delay)})]}),!!e.file&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`File`}),F(`td`,{children:e.file})]}),!!e.concurrency&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Concurrency`}),F(`td`,{children:e.concurrency})]}),!!Object.keys(t).length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Labels`}),F(`td`,{children:F(yd,{items:n})})]}),!!r.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Params`}),F(`td`,{children:F(yd,{items:i})})]}),!!a.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Headers`}),F(`td`,{children:F(yd,{items:o})})]}),!!s.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Notifier headers`}),F(`td`,{children:F(yd,{items:c})})]})]})}),F(`div`,{className:`vm-explore-alerts-rule-item`,children:[F(`span`,{className:`vm-alerts-title`,children:`Rules`}),e.rules.map(e=>F(xd,{classes:[`vm-badge-item`,e.state],entity:`rule`,type:e.type,groupId:e.group_id,states:wd(e),id:e.id,name:e.name},e.id))]})]})},Nd=({id:e,onClose:t})=>{let{group:n,isLoading:r,error:i}=Od({id:e});if(r)return F(il,{});if(i)return F(Y,{variant:`error`,children:i});let a=`No group ID=${e} found!`;return F(ri,{className:`vm-explore-alerts`,title:n?F(xd,{entity:`group`,groupId:e,name:n.name,states:n.states,onClose:t}):`Rule not found`,onClose:t,children:F(`div`,{className:`vm-explore-alerts`,children:n&&F(Md,{group:n})||F(Y,{variant:`info`,children:a})})})},Pd=(e,t)=>{if(e===`All`)return[];let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),Array.from(n)};a();var Fd=H(`type`,``),Id=H(`states`,``).split(`&`).filter(e=>e),Ld=H(`search`,``),Rd={alert:[`inactive`,`firing`,`nomatch`,`pending`,`unhealthy`],record:[`unhealthy`,`nomatch`,`ok`]},zd=()=>{let e=H(`page_num`,`1`),t=H(`group_id`,``),n=H(`rule_id`,``),r=H(`alert_id`,``),[i,a]=u(Ld),[o,s]=u(Fd),[l,d]=u(Id),[f,h]=u(!1),[g,_]=v();c(()=>{h(!!t)},[t]),cd({type:o,states:l.join(`&`),search:i,group_id:t,alert_id:r,rule_id:n});let y=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t),a(e||``)},[i,g]),b=()=>{if(n)return F(kd,{groupId:t,id:n,mode:n?`rule`:`alert`,onClose:x});if(r)return F(jd,{groupId:t,id:r,mode:n?`rule`:`alert`,onClose:x});if(t)return F(Nd,{id:t,onClose:x})},x=()=>{let e=new URLSearchParams(g);e.delete(`group_id`),e.delete(`rule_id`),e.delete(`alert_id`),_(e),h(!1)},S=e=>()=>{let t=new URLSearchParams(g);t.set(`page_num`,e.toString()),_(t)},C=Object.keys(Rd),w=D(()=>Array.from(o===``?new Set(Object.values(Rd).flat()):Rd[o]||[]),[o]),T=[o].filter(Boolean);c(()=>{l.every(e=>w.includes(e))||d([])},[l,w]);let{groups:E,isLoading:O,error:k,pageInfo:A}=hd({blockFetch:f,search:i,ruleType:o,states:l,pageNum:Math.max(1,parseInt(e,10)||1),onPageChange:S}),j=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t);let n=Pd(e,l);d(n.length===w.length?[]:n)},[l,g]),M=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t);let n=Pd(e,T);s(n.length&&n.length!==C.length?n[0]:``)},[o,g]);return F(m,{children:[f&&b(),(!f||!!w?.length)&&F(`div`,{className:`vm-explore-alerts`,children:[F(gd,{types:T,allRuleTypes:C,states:l,allStates:w,search:i,onChangeRuleType:M,onChangeStates:j,onChangeSearch:(0,Sa.default)(y,500)}),F(vd,{page:A.page,totalPages:A.total_pages,pageRules:E.reduce((e,t)=>e+t?.rules.length,0),pageGroups:E.length,totalRules:A.total_rules,totalGroups:A.total_groups,onPageChange:S}),O&&F(il,{})||k&&F(Y,{variant:`error`,children:k})||!E.length&&F(Y,{variant:`info`,children:`No rules found!`})||F(`div`,{className:`vm-explore-alerts-body`,children:E.map(e=>F(`div`,{className:`vm-explore-alert-group vm-block vm-block_empty-padding`,children:F(ea,{id:`group-${e.id}`,title:F(bd,{group:e}),children:F(`div`,{className:`vm-explore-alerts-items`,children:e.rules.map(t=>F(Ed,{rule:t,group:e,states:wd(t)},`rule-${t.id}`))})},`group-${e.id}`)},e.id))})]})]})};a();var Bd=()=>{let{serverUrl:e}=U(),{period:t}=W(),[n,r]=u([]),[i,a]=u(!1),[o,s]=u(),l=D(()=>pd(e),[e]);return c(()=>{(async()=>{a(!0);try{let e=await fetch(l),t=await e.json();e.ok?(r((t.data.notifiers||[]).sort((e,t)=>e.kind.localeCompare(t.kind))),s(void 0)):s(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&s(`${e.name}: ${e.message}`)}a(!1)})().catch(console.error)},[l,t]),{notifiers:n,isLoading:i,error:o}},Vd=({kinds:e,allKinds:t,search:n,onChangeKinds:r,onChangeSearch:i})=>{let{isMobile:a}=J();return F(m,{children:F(`div`,{className:(0,K.default)({"vm-explore-alerts-header":!0,"vm-explore-alerts-header_mobile":a,"vm-block":!0,"vm-block_mobile":a}),children:[F(`div`,{className:`vm-explore-alerts-header__rule_type`,children:F(_c,{value:e,list:t,label:`Notifier type`,placeholder:`Please select notifier type`,onChange:r,autofocus:!!e.length&&!a,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header-search`,children:F($,{label:`Search`,value:n,placeholder:`Filter by kind, address or labels`,startIcon:F(or,{}),onChange:i})})]})})},Hd=({notifier:e})=>{let{isMobile:t}=J();return F(`div`,{className:(0,K.default)({"vm-explore-alerts-notifier-header":!0,"vm-explore-alerts-notifier-header_mobile":t}),children:F(`div`,{className:`vm-explore-alerts-notifier-header__name`,children:e.kind})})};a();var Ud=({target:e})=>{let t=e?.lastError?`unhealthy`:`ok`,n=e?.labels||{},r=D(()=>Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{value:t,color:`passive`}])),[n]);return F(`div`,{className:`vm-explore-alerts-target vm-badge-item ${t.replace(` `,`-`)}`,children:e?.labels?.length||e?.lastError?F(ea,{title:F(`div`,{className:`vm-explore-alerts-target-header__name`,children:e.address}),children:F(`div`,{className:`vm-explore-alerts-target-item`,children:F(`table`,{children:F(`tbody`,{children:[!!Object.keys(n).length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Labels`}),F(`td`,{children:F(yd,{items:r})})]}),!!e.lastError&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Last error`}),F(`td`,{children:F(Y,{variant:`error`,children:e.lastError})})]})]})})})},`target-${e.address}`):F(`span`,{children:e.address})})};a();var Wd=H(`kinds`,``).split(`&`).filter(e=>e),Gd=H(`search`,``),Kd=()=>{let{notifiers:e,isLoading:t,error:n}=Bd(),[r,i]=u(Gd),[a,o]=u(Wd);ld({kinds:a.join(`&`),search:r});let s=e=>{i(e||``)},c=new Set,l=[];return e.forEach(e=>{let t=[];if((e.targets||[]).forEach(n=>{c.add(e.kind),!(a?.length&&!a.includes(e.kind))&&(r&&!n.address.toLowerCase().includes(r.toLowerCase())&&!e.kind.toLowerCase().includes(r.toLowerCase())||t.push(n))}),t.length){let n=Object.assign({},e);n.targets=t,l.push(n)}}),F(`div`,{className:`vm-explore-alerts`,children:[F(Vd,{kinds:a,allKinds:Array.from(c),search:r,onChangeKinds:e=>{o(Pd(e,a))},onChangeSearch:(0,Sa.default)(s,500)}),t&&F(il,{})||n&&F(Y,{variant:`error`,children:n})||!l.length&&F(Y,{variant:`info`,children:`No notifiers found!`})||F(`div`,{className:`vm-explore-alerts-body`,children:l.map(e=>F(`div`,{className:`vm-explore-alert-group vm-block vm-block_empty-padding`,children:F(ea,{id:`notifier-${e.kind}`,title:F(Hd,{notifier:e}),children:F(`div`,{className:`vm-explore-alerts-items`,children:e.targets.map(e=>F(Ud,{target:e},`target-${e.address}`))})},`notifier-${e.kind}`)},e.kind))})]})};a();var qd=()=>{let[e,t]=u(!1);return F(m,{children:F(k,{children:F(Ur,{children:F(m,{children:[F(iu,{onLoaded:t}),e&&F(A,{children:F(N,{path:`/`,element:F(ya,{}),children:[F(N,{path:R.home,element:F(rl,{})}),F(N,{path:R.rawQuery,element:F(sd,{})}),F(N,{path:R.metrics,element:F(Tu,{})}),F(N,{path:R.cardinality,element:F(Wl,{})}),F(N,{path:R.topQueries,element:F($l,{})}),F(N,{path:R.trace,element:F(su,{})}),F(N,{path:R.queryAnalyzer,element:F(qu,{})}),F(N,{path:R.dashboards,element:F(cl,{})}),F(N,{path:R.withTemplate,element:F(Pu,{})}),F(N,{path:R.relabel,element:F(Ru,{})}),F(N,{path:R.activeQueries,element:F(Hu,{})}),F(N,{path:R.icons,element:F(Eu,{})}),F(N,{path:R.downsamplingDebug,element:F(Zu,{})}),F(N,{path:R.retentionDebug,element:F(td,{})}),F(N,{path:R.rules,element:F(zd,{})}),F(N,{path:R.notifiers,element:F(Kd,{})})]})})]})})})})},Jd=e=>{e&&ee(async()=>{let{onCLS:e,onINP:t,onFCP:n,onLCP:r,onTTFB:i}=await import(`./vendor-BF3F25aG.js`).then(e=>e.t);return{onCLS:e,onINP:t,onFCP:n,onLCP:r,onTTFB:i}},__vite__mapDeps([0,1,2]),import.meta.url).then(({onCLS:t,onINP:n,onFCP:r,onLCP:i,onTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})};a();var Yd=document.getElementById(`root`);Yd&&f(F(qd,{}),Yd),Jd(); \ No newline at end of file +`).filter(e=>e),n=t.slice(0,e).sort();for(let e of n){let t=Uc(e);if(!t)continue;let{values:n,timestamps:r}=t,i=n.length,a=i>o,c=a?o:i,u=a?i/o:1,d=Array.from({length:c},(e,t)=>{let i=a?Math.floor(t*u):t;return[r[i]/1e3,n[i]]});s.push({group:l,metric:t.metric,values:d})}u+=t.length}l++}let d=`Showing ${s.length} series out of ${u} series due to performance reasons. Please narrow down the query, so it returns fewer series`;x(u>c?d:``),h(s),f(!1)}catch(e){f(!1),e instanceof Error&&e.name!==`AbortError`&&(_(String(e)),console.error(e))}},[i,e]),E=p(e=>{if(g)return;let t={...r};w[e](s,n,t,a)},[s,n,r,a,g,w]),k=p(()=>{S.current.abort(),h([])},[S]);return c(()=>{if(!C?.length)return;let e=setTimeout(T,400,{fetchUrl:C,stateSeriesLimits:o,showAllSeries:t});return()=>{S.current?.abort(),clearTimeout(e)}},[C,o,t]),{fetchUrl:C,isLoading:d,data:m,error:g,queryErrors:v,setQueryErrors:y,warning:b,abortFetch:k,exportData:E}};a();var id=()=>F(ki,{href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#raw-samples`,underlined:!0,children:`raw samples`}),ad=()=>F(ki,{underlined:!0,href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#query-data`,children:`Query API`}),od=()=>F(ki,{underlined:!0,href:`https://docs.victoriametrics.com/victoriametrics/keyconcepts/#filtering`,children:`time series selector`}),sd=()=>{Do();let{isMobile:e}=J(),{displayType:t}=xr(),{query:n}=tn(),[r,i]=u([]),[a,o]=u(!n[0]),[s,c]=u(!1),[l,d]=u(!0),{data:f,error:m,isLoading:h,warning:g,queryErrors:_,setQueryErrors:v,abortFetch:y,exportData:b}=rd({hideQuery:r,showAllSeries:s}),x=O(null),S=!a&&m,C=e=>{i(e)},w=()=>{o(!1)},T=()=>{d(!1)},E=p(async e=>{e&&b(e)},[b]);return F(`div`,{className:(0,K.default)({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[F(ho,{label:`Time series selector`,queryErrors:a?[]:_,setQueryErrors:v,setHideError:o,stats:[],isLoading:h,onHideQuery:C,onRunQuery:w,abortFetch:y,hideButtons:{traceQuery:!0,disableCache:!0},includeFunctions:!1}),l&&F(Y,{variant:`info`,children:F(`div`,{className:`vm-explore-metrics-header-description`,children:[F(`ul`,{children:[F(`li`,{children:[`This page provides a dedicated view for querying and displaying `,F(id,{}),` from VictoriaMetrics.`]}),F(`li`,{children:[`It expects only `,F(od,{}),` as a query argument.`]}),F(`li`,{children:[`Deduplication can only be disabled if it was previously enabled on the server (`,F(`code`,{children:`-dedup.minScrapeInterval`}),`).`]}),F(`li`,{children:[`Users often assume that the `,F(ad,{}),` returns data exactly as stored, but data samples and timestamps may be modified by the API.`]})]}),F(X,{variant:`text`,size:`small`,startIcon:F(hn,{}),onClick:T,ariaLabel:`close tips`})]})}),S&&F(Y,{variant:`error`,children:m}),g&&F(zo,{warning:g,query:n,onChange:c}),F(`div`,{className:(0,K.default)({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[h&&F(Eo,{}),F(`div`,{className:`vm-custom-panel-body-header`,ref:x,children:[F(`div`,{className:`vm-custom-panel-body-header__tabs`,children:F(hr,{tabFilter:e=>e.value!==B.table})}),f&&F(Zc,{title:`Export query`,downloadFormatOptions:[`json`,`csv`],onDownload:E})]}),F(Vc,{graphData:f,liveData:f,isHistogram:!1,displayType:t,controlsRef:x})]})]})};a();var cd=({type:e,states:t,search:n,rule_id:r,alert_id:i,group_id:a})=>{let{setSearchParamsFromKeys:o}=Gi();c(()=>{o(ic({type:e,states:t,search:n,alert_id:i,rule_id:r,group_id:a}))},[e,t,n,r,a,i])},ld=({kinds:e,search:t})=>{let{setSearchParamsFromKeys:n}=Gi();c(()=>{n(ic({kinds:e,search:t}))},[e,t])},ud=(e,t,n,r,i)=>`${e}/vmalert/api/v1/rules?datasource_type=prometheus&search=${encodeURIComponent(t)}&type=${encodeURIComponent(n)}&state=${r.map(encodeURIComponent).join(`,`)}&group_limit=${i}&extended_states=true`,dd=(e,t,n,r)=>`${e}/vmalert/api/v1/${r}?group_id=${t}&${r}_id=${n}`,fd=(e,t)=>`${e}/vmalert/api/v1/group?group_id=${t}`,pd=e=>`${e}/vmalert/api/v1/notifiers`;a();var md=100,hd=({blockFetch:e,pageNum:t,search:n,ruleType:r,states:i,onPageChange:a})=>{let{serverUrl:o}=U(),{period:s}=W(),[l,d]=u([]),[f,p]=u(!1),[m,h]=u({page:t,total_pages:1,total_groups:0,total_rules:0}),[g,_]=u(),v=D(()=>ud(o,n,r,i,md),[o,n,r,i]);return c(()=>{e||(async()=>{p(!0);try{let e=`${v}&page_num=${t}`,n=await fetch(e),r=await n.json();n.ok?(d(r.data.groups||[]),h({page:r.page||1,total_pages:r.total_pages||1,total_groups:r.total_groups||0,total_rules:r.total_rules||0}),_(void 0)):(n.status===400&&r?.error?.includes(`exceeds total amount of pages`)&&a(1)(),_(`${r.errorType}\r\n${r?.error}`))}catch(e){e instanceof Error&&_(`${e.name}: ${e.message}`)}p(!1)})().catch(console.error)},[v,s,!!l.length||!e,t]),{groups:l,isLoading:f,error:g,pageInfo:m}};a();var gd=({types:e,allRuleTypes:t,allStates:n,states:r,search:i,onChangeRuleType:a,onChangeStates:o,onChangeSearch:s})=>{let c=D(()=>e.length?``:`No states. Please select rule states`,[e]),{isMobile:l}=J();return F(m,{children:F(`div`,{className:(0,K.default)({"vm-explore-alerts-header":!0,"vm-explore-alerts-header_mobile":l,"vm-block":!0,"vm-block_mobile":l}),children:[F(`div`,{className:`vm-explore-alerts-header__rule_type`,children:F(_c,{value:e,list:t,label:`Rule type`,placeholder:`Please select rule type`,onChange:a,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header__state`,children:F(_c,{itemClassName:`vm-badge-menu-item`,value:r,list:n,label:`State`,placeholder:`Please select rule state`,onChange:o,noOptionsText:c,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header-search`,children:F($,{label:`Search`,value:i,placeholder:`Filter by rule, name or labels`,startIcon:F(or,{}),onChange:s})})]})})},_d=(e,t)=>{let n=[];return t<2?n:(n.push(1),e>3&&n.push(0),e>2&&n.push(e-1),e>1&&e0&&e2&&n.push(0),n.push(t),n)},vd=({page:e,totalPages:t,onPageChange:n,totalGroups:r,totalRules:i,pageGroups:a,pageRules:o})=>{let s=_d(e,t);return F(m,{children:F(`div`,{className:`vm-pagination`,children:[F(`span`,{className:`vm-pagination-stats`,children:[F(`span`,{children:`Page rules/groups:`}),` `,F(`b`,{children:o}),` / `,F(`b`,{children:a})]}),!!s.length&&F(`div`,{className:`vm-pagination-buttons`,children:[F(X,{className:`vm-button-borderless vm-pagination-prev`,size:`small`,color:`gray`,disabled:e==1,variant:`outlined`,startIcon:F(G,{}),onClick:n(e-1)}),s.map((t,r)=>t?F(X,{className:(0,K.default)({"vm-button-borderless":e!==t}),size:`small`,color:`gray`,variant:`outlined`,onClick:n(t),children:t},r):F(`span`,{className:`vm-pagination-more`,children:`...`})),F(X,{className:`vm-button-borderless vm-pagination-next`,size:`small`,color:`gray`,disabled:e==t,variant:`outlined`,startIcon:F(G,{}),onClick:n(e+1)})]}),F(`span`,{className:`vm-pagination-stats`,children:[F(`span`,{children:`Total rules/groups:`}),` `,F(`b`,{children:i}),` / `,F(`b`,{children:r})]})]})})},yd=({items:e,children:t,align:n=`start`})=>F(`div`,{className:`vm-badges`,style:{"justify-content":n},children:[Object.entries(e).map(([e,t])=>F(`span`,{className:`vm-badge ${t.color}`,children:t.value?`${e}: ${t.value}`:e},e)),t]}),bd=({group:e})=>{let{isMobile:t}=J(),n=w();return F(`div`,{className:(0,K.default)({"vm-explore-alerts-group-header":!0,"vm-explore-alerts-group-header_mobile":t}),children:[F(`div`,{className:`vm-explore-alerts-group-header__desc`,children:[F(`div`,{className:`vm-explore-alerts-group-header__name`,children:e.name}),!t&&F(`div`,{className:`vm-explore-alerts-group-header__file`,children:e.file})]}),F(`div`,{className:`vm-explore-alerts-controls`,children:[F(yd,{align:`end`,items:Object.fromEntries(Object.entries(e.states||{}).map(([e,t])=>[e.toLowerCase(),{color:e.toLowerCase().replace(` `,`-`),value:t}]))}),F(X,{className:`vm-button-borderless`,size:`small`,color:`gray`,variant:`outlined`,startIcon:F(cn,{}),onClick:async()=>{n({pathname:`/rules`,search:`group_id=${e.id}`})}})]})]})};a();var xd=({name:e,id:t,groupId:n,entity:r,type:i,states:a,onClose:o,classes:s})=>{let{isMobile:c}=J(),{serverUrl:l}=U(),u=w(),d=Oa(),f=()=>{u({pathname:`/rules`,search:`group_id=${n}`})},p=()=>{u({pathname:`/rules`,search:`group_id=${n}&${r}_id=${t}`})},h=async()=>{let e=`${l}/vmui/#/rules?group_id=${n}`;i&&(e=`${e}&${r}_id=${t}`),await d(e,`Link to ${r} has been copied`)},g=(0,K.default)({"vm-explore-alerts-item-header":!0,"vm-explore-alerts-item-header_mobile":c},s),_=()=>{switch(r){case`alert`:return F(Q,{title:`Alert`,children:F(ln,{})});case`group`:return F(Q,{title:`Group`,children:F(sn,{})});default:switch(i){case`alerting`:return F(Q,{title:`Alerting rule`,children:F(un,{})});default:return F(Q,{title:`Recording rule`,children:F(dn,{})})}}},v=D(()=>Object.fromEntries(Object.entries(a||{}).map(([e,t])=>[e,{color:e.toLowerCase().replace(` `,`-`),value:t==1?0:t}])),[a]);return F(`div`,{className:g,id:`rule-${t}`,children:[F(`div`,{className:`vm-explore-alerts-item-header__title`,children:[_(),F(`div`,{className:`vm-explore-alerts-item-header__name`,children:e})]}),F(`div`,{className:`vm-explore-alerts-controls`,children:[F(yd,{align:`end`,items:v}),o?F(m,{children:[t&&F(X,{className:`vm-back-button`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(sn,{}),onClick:f,children:F(`span`,{className:`vm-button-text`,children:`Open Group`})}),F(X,{className:`vm-back-button`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(on,{}),onClick:h,children:F(`span`,{className:`vm-button-text`,children:`Copy Link`})})]}):F(X,{className:`vm-button-borderless`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(cn,{}),onClick:p})]})]})},Sd=e=>{let t=L.default.duration(Math.round(e*1e3)),n=[];return t.get(`day`)&&n.push(`D[d]`),t.get(`hour`)&&n.push(`H[h]`),t.get(`minute`)&&n.push(`m[m]`),t.get(`millisecond`)?n.push(`s.SSS[s]`):(!n.length||t.get(`second`))&&n.push(`s[s]`),t.format(n.join(` `))},Cd=e=>{let t=(0,L.default)(e);return t.year()<=1?`Never`:t.tz().format(`DD MMM YYYY HH:mm:ss`)},wd=e=>e.alerts?.length?e.alerts.reduce((e,t)=>(e[t.state]=(e[t.state]??0)+1,e),{}):{[e.state]:1};a();var Td=({item:e,group:t})=>{let n=e?.query,r=w(),i=t=>()=>{r({pathname:`/rules`,search:`group_id=${e.group_id}&alert_id=${t}`})},a=e?.labels||{},o=D(()=>Object.fromEntries(Object.entries(a).map(([e,t])=>[e,{color:`passive`,value:t}])),[a]),s=D(()=>{if(!t?.interval)return;let r=new URLSearchParams({"g0.expr":n,"g0.end_time":e.lastEvaluation,"g0.step_input":`${t.interval}s`,"g0.relative_time":`none`});return`${R.home}?${r.toString()}`},[n,e.lastEvaluation,t?.interval]);return F(`div`,{className:`vm-explore-alerts-rule-item`,children:[F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:[F(`tr`,{children:F(`td`,{style:{"text-align":`end`},colSpan:2,children:s&&F(I,{to:s,target:`_blank`,rel:`noreferrer`,children:F(X,{size:`small`,variant:`outlined`,color:`gray`,startIcon:F(or,{}),children:F(`span`,{className:`vm-button-text`,children:`Run query`})})})})}),F(`tr`,{children:[F(`td`,{children:`Query`}),F(`td`,{children:F(Ou,{code:n})})]}),!!e.duration&&F(`tr`,{children:[F(`td`,{children:`For`}),F(`td`,{children:Sd(e.duration)})]}),F(`tr`,{children:[F(`td`,{children:`Last evaluation`}),F(`td`,{children:Cd(e.lastEvaluation)})]}),!!e.lastError&&e.health!==`ok`&&F(`tr`,{children:[F(`td`,{children:`Last error`}),F(`td`,{children:F(Y,{variant:`error`,children:e.lastError})})]}),!!Object.keys(o).length&&F(`tr`,{children:[F(`td`,{children:`Labels`}),F(`td`,{children:F(yd,{items:o})})]})]})]}),!!Object.keys(e?.annotations||{}).length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Annotations`}),F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:Object.entries(e.annotations||{}).map(([e,t])=>F(`tr`,{children:[F(`td`,{children:e}),F(`td`,{children:t})]},e))})]})]}),!!e?.updates?.length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Last updates ${e.updates.length}/${e.max_updates_entries}`}),F(`table`,{children:[F(`thead`,{children:F(`tr`,{children:[F(`th`,{children:`Updated at`}),F(`th`,{children:`Series returned`}),F(`th`,{children:`Series fetched`}),F(`th`,{children:`Duration`}),F(`th`,{children:`Execution timestamp`})]})}),F(`tbody`,{children:e.updates.map(e=>F(`tr`,{children:[F(`td`,{children:Cd(e.time)}),F(`td`,{children:e.samples}),F(`td`,{children:e.series_fetched}),F(`td`,{children:Sd(e.duration/1e9)}),F(`td`,{children:Cd(e.at)})]},e.at))})]})]}),!!e?.alerts?.length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Alerts`}),F(`table`,{className:`vm-alerts-table`,children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-sm`}),F(`col`,{className:`vm-col-sm`}),F(`col`,{className:`vm-col-sm`}),F(`col`,{}),F(`col`,{className:`vm-col-hidden`})]}),F(`thead`,{children:F(`tr`,{children:[F(`th`,{children:`Active since`}),F(`th`,{children:`State`}),F(`th`,{children:`Value`}),F(`th`,{className:`vm-alerts-title`,children:`Labels`}),F(`th`,{})]})}),F(`tbody`,{children:e.alerts.map(e=>F(`tr`,{id:`alert-${e.id}`,children:[F(`td`,{children:Cd(e.activeAt)}),F(`td`,{children:F(yd,{items:{[e.state]:{color:e.state}}})}),F(`td`,{children:F(yd,{items:{[e.value]:{color:`passive`}}})}),F(`td`,{children:F(yd,{align:`start`,items:Object.fromEntries(Object.entries(e.labels||{}).map(([e,t])=>[e,{color:`passive`,value:t}]))})}),F(`td`,{children:F(X,{className:`vm-button-borderless`,size:`small`,variant:`outlined`,color:`gray`,startIcon:F(cn,{}),onClick:i(e.id)})})]},e.id))})]})]})]})},Ed=({states:e,rule:t,group:n})=>F(`div`,{className:`vm-explore-alerts-rule vm-badge-item ${(Object.keys(e).length>0?Object.keys(e)[0]:`ok`).replace(` `,`-`)}`,children:F(ea,{title:F(xd,{entity:`rule`,type:t.type,groupId:t.group_id,states:e,id:t.id,name:t.name}),children:F(Td,{item:t,group:n})},`rule-${t.id}`)});a();var Dd=({groupId:e,id:t,mode:n})=>{let{serverUrl:r}=U(),{period:i}=W(),[a,o]=u(),[s,l]=u(!1),[d,f]=u(),p=D(()=>dd(r,e,t,n),[r,e,t,n]);return c(()=>{(async()=>{l(!0);try{let e=await fetch(p),t=await e.json();e.ok?(o(t),f(void 0)):f(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&f(`${e.name}: ${e.message}`)}l(!1)})().catch(console.error)},[p,i]),{item:a,isLoading:s,error:d}};a();var Od=({id:e})=>{let{serverUrl:t}=U(),{period:n}=W(),[r,i]=u(),[a,o]=u(!1),[s,l]=u(),d=D(()=>fd(t,e),[t,e]);return c(()=>{(async()=>{o(!0);try{let e=await fetch(d);switch(e.headers.get(`Content-Type`)){case`application/json`:{let t=await e.json();e.ok?(i(t),l(void 0)):l(`${t.errorType}\r\n${t?.error}`);break}default:{let t=await e.text();t=t.startsWith(`unsupported path requested`)?`Failed to show group details. Request to ${d} failed with error: ${t.trim()}.\nMake sure that vmalert is reachable at ${d} and is of the same or higher version than vmselect`:`${e.statusText}\r\n${t}`,l(t);break}}}catch(e){e instanceof Error&&l(`${e.name}: ${e.message}`)}o(!1)})().catch(console.error)},[d,n]),{group:r,isLoading:a,error:s}},kd=({groupId:e,id:t,mode:n,onClose:r})=>{let{item:i,isLoading:a,error:o}=Dd({groupId:e,id:t,mode:n}),{group:s,isLoading:c,error:l}=Od({id:e}),u=o||l;if(a||c)return F(il,{});if(u)return F(Y,{variant:`error`,children:u});let d=`No rule with group ID=${e}, rule ID=${t} found!`;return F(ri,{className:`vm-explore-alerts`,title:i?F(xd,{entity:`rule`,type:i.type,groupId:i.group_id,states:wd(i),id:i.id,name:i.name,onClose:r}):`Rule not found`,onClose:r,children:F(`div`,{className:`vm-explore-alerts`,children:i?F(Td,{item:i,group:s}):F(Y,{variant:`info`,children:d})})})};a();var Ad=({item:e,group:t})=>{let n=e?.expression,r=e?.labels||{},i=D(()=>Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{color:`passive`,value:t}])),[r]),a=D(()=>{if(!t?.interval)return;let r=new URLSearchParams({"g0.expr":n,"g0.end_time":e.activeAt,"g0.step_input":`${t.interval}s`,"g0.relative_time":`none`});return`${R.home}?${r.toString()}`},[n,e.activeAt,t?.interval]);return F(`div`,{className:`vm-explore-alerts-alert-item`,children:[F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:[F(`tr`,{children:F(`td`,{style:{"text-align":`end`},colSpan:2,children:a&&F(I,{to:a,target:`_blank`,rel:`noreferrer`,children:F(X,{size:`small`,variant:`outlined`,color:`gray`,startIcon:F(or,{}),children:F(`span`,{className:`vm-button-text`,children:`Run query`})})})})}),F(`tr`,{children:[F(`td`,{children:`Query`}),F(`td`,{children:F(Ou,{code:n})})]}),F(`tr`,{children:[F(`td`,{children:`Active at`}),F(`td`,{children:Cd(e.activeAt)})]}),!!Object.keys(r).length&&F(`tr`,{children:[F(`td`,{children:`Labels`}),F(`td`,{children:F(yd,{items:i})})]})]})]}),!!Object.keys(e.annotations||{}).length&&F(m,{children:[F(`span`,{className:`vm-alerts-title`,children:`Annotations`}),F(`table`,{children:[F(`colgroup`,{children:[F(`col`,{className:`vm-col-md`}),F(`col`,{})]}),F(`tbody`,{children:Object.entries(e.annotations||{}).map(([e,t])=>F(`tr`,{children:[F(`td`,{children:e}),F(`td`,{children:t})]},e))})]})]})]})},jd=({groupId:e,id:t,mode:n,onClose:r})=>{let{item:i,isLoading:a,error:o}=Dd({groupId:e,id:t,mode:n}),{group:s,isLoading:c,error:l}=Od({id:e}),u=o||l;if(a||c)return F(il,{});if(u)return F(Y,{variant:`error`,children:u});let d=`No alert with group ID=${e}, alert ID=${t} found!`;return F(ri,{className:`vm-explore-alerts`,title:i?F(xd,{entity:`alert`,type:`alerting`,groupId:i.group_id,id:i.id,name:i.name,states:{firing:1},onClose:r}):`Alert not found`,onClose:r,children:F(`div`,{className:`vm-explore-alerts`,children:i?F(Ad,{item:i,group:s}):F(Y,{variant:`info`,children:d})})})};a();var Md=({group:e})=>{let t=e?.labels||{},n=D(()=>Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{color:`passive`,value:t}])),[t]),r=e?.params||[],i=D(()=>Object.fromEntries(r.map(e=>[e,{color:`passive`}])),[r]),a=e?.headers||[],o=D(()=>Object.fromEntries(a.map(e=>[e,{color:`passive`}])),[a]),s=e?.notifier_headers||[],c=D(()=>Object.fromEntries(s.map(e=>[e,{color:`passive`}])),[s]);return F(`div`,{className:`vm-explore-alerts-group`,children:[F(`table`,{children:F(`tbody`,{children:[!!e.interval&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Interval`}),F(`td`,{children:Sd(e.interval)})]}),F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Last evaluation`}),F(`td`,{children:Cd(e.lastEvaluation)})]}),!!e.eval_offset&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Eval offset`}),F(`td`,{children:Sd(e.eval_offset)})]}),!!e.eval_delay&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Eval delay`}),F(`td`,{children:Sd(e.eval_delay)})]}),!!e.file&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`File`}),F(`td`,{children:e.file})]}),!!e.concurrency&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Concurrency`}),F(`td`,{children:e.concurrency})]}),!!Object.keys(t).length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Labels`}),F(`td`,{children:F(yd,{items:n})})]}),!!r.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Params`}),F(`td`,{children:F(yd,{items:i})})]}),!!a.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Headers`}),F(`td`,{children:F(yd,{items:o})})]}),!!s.length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Notifier headers`}),F(`td`,{children:F(yd,{items:c})})]})]})}),F(`div`,{className:`vm-explore-alerts-rule-item`,children:[F(`span`,{className:`vm-alerts-title`,children:`Rules`}),e.rules.map(e=>F(xd,{classes:[`vm-badge-item`,e.state],entity:`rule`,type:e.type,groupId:e.group_id,states:wd(e),id:e.id,name:e.name},e.id))]})]})},Nd=({id:e,onClose:t})=>{let{group:n,isLoading:r,error:i}=Od({id:e});if(r)return F(il,{});if(i)return F(Y,{variant:`error`,children:i});let a=`No group ID=${e} found!`;return F(ri,{className:`vm-explore-alerts`,title:n?F(xd,{entity:`group`,groupId:e,name:n.name,states:n.states,onClose:t}):`Rule not found`,onClose:t,children:F(`div`,{className:`vm-explore-alerts`,children:n&&F(Md,{group:n})||F(Y,{variant:`info`,children:a})})})},Pd=(e,t)=>{if(e===`All`)return[];let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),Array.from(n)};a();var Fd=H(`type`,``),Id=H(`states`,``).split(`&`).filter(e=>e),Ld=H(`search`,``),Rd={alert:[`inactive`,`firing`,`nomatch`,`pending`,`unhealthy`],record:[`unhealthy`,`nomatch`,`ok`]},zd=()=>{let e=H(`page_num`,`1`),t=H(`group_id`,``),n=H(`rule_id`,``),r=H(`alert_id`,``),[i,a]=u(Ld),[o,s]=u(Fd),[l,d]=u(Id),[f,h]=u(!1),[g,_]=v();c(()=>{h(!!t)},[t]),cd({type:o,states:l.join(`&`),search:i,group_id:t,alert_id:r,rule_id:n});let y=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t),a(e||``)},[i,g]),b=()=>{if(n)return F(kd,{groupId:t,id:n,mode:n?`rule`:`alert`,onClose:x});if(r)return F(jd,{groupId:t,id:r,mode:n?`rule`:`alert`,onClose:x});if(t)return F(Nd,{id:t,onClose:x})},x=()=>{let e=new URLSearchParams(g);e.delete(`group_id`),e.delete(`rule_id`),e.delete(`alert_id`),_(e),h(!1)},S=e=>()=>{let t=new URLSearchParams(g);t.set(`page_num`,e.toString()),_(t)},C=Object.keys(Rd),w=D(()=>Array.from(o===``?new Set(Object.values(Rd).flat()):Rd[o]||[]),[o]),T=[o].filter(Boolean);c(()=>{l.every(e=>w.includes(e))||d([])},[l,w]);let{groups:E,isLoading:O,error:k,pageInfo:A}=hd({blockFetch:f,search:i,ruleType:o,states:l,pageNum:Math.max(1,parseInt(e,10)||1),onPageChange:S}),j=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t);let n=Pd(e,l);d(n.length===w.length?[]:n)},[l,g]),M=p(e=>{let t=new URLSearchParams(g);t.set(`page_num`,`1`),_(t);let n=Pd(e,T);s(n.length&&n.length!==C.length?n[0]:``)},[o,g]);return F(m,{children:[f&&b(),(!f||!!w?.length)&&F(`div`,{className:`vm-explore-alerts`,children:[F(gd,{types:T,allRuleTypes:C,states:l,allStates:w,search:i,onChangeRuleType:M,onChangeStates:j,onChangeSearch:(0,Sa.default)(y,500)}),F(vd,{page:A.page,totalPages:A.total_pages,pageRules:E.reduce((e,t)=>e+t?.rules.length,0),pageGroups:E.length,totalRules:A.total_rules,totalGroups:A.total_groups,onPageChange:S}),O&&F(il,{})||k&&F(Y,{variant:`error`,children:k})||!E.length&&F(Y,{variant:`info`,children:`No rules found!`})||F(`div`,{className:`vm-explore-alerts-body`,children:E.map(e=>F(`div`,{className:`vm-explore-alert-group vm-block vm-block_empty-padding`,children:F(ea,{id:`group-${e.id}`,title:F(bd,{group:e}),children:F(`div`,{className:`vm-explore-alerts-items`,children:e.rules.map(t=>F(Ed,{rule:t,group:e,states:wd(t)},`rule-${t.id}`))})},`group-${e.id}`)},e.id))})]})]})};a();var Bd=()=>{let{serverUrl:e}=U(),{period:t}=W(),[n,r]=u([]),[i,a]=u(!1),[o,s]=u(),l=D(()=>pd(e),[e]);return c(()=>{(async()=>{a(!0);try{let e=await fetch(l),t=await e.json();e.ok?(r((t.data.notifiers||[]).sort((e,t)=>e.kind.localeCompare(t.kind))),s(void 0)):s(`${t.errorType}\r\n${t?.error}`)}catch(e){e instanceof Error&&s(`${e.name}: ${e.message}`)}a(!1)})().catch(console.error)},[l,t]),{notifiers:n,isLoading:i,error:o}},Vd=({kinds:e,allKinds:t,search:n,onChangeKinds:r,onChangeSearch:i})=>{let{isMobile:a}=J();return F(m,{children:F(`div`,{className:(0,K.default)({"vm-explore-alerts-header":!0,"vm-explore-alerts-header_mobile":a,"vm-block":!0,"vm-block_mobile":a}),children:[F(`div`,{className:`vm-explore-alerts-header__rule_type`,children:F(_c,{value:e,list:t,label:`Notifier type`,placeholder:`Please select notifier type`,onChange:r,autofocus:!!e.length&&!a,includeAll:!0,searchable:!0})}),F(`div`,{className:`vm-explore-alerts-header-search`,children:F($,{label:`Search`,value:n,placeholder:`Filter by kind, address or labels`,startIcon:F(or,{}),onChange:i})})]})})},Hd=({notifier:e})=>{let{isMobile:t}=J();return F(`div`,{className:(0,K.default)({"vm-explore-alerts-notifier-header":!0,"vm-explore-alerts-notifier-header_mobile":t}),children:F(`div`,{className:`vm-explore-alerts-notifier-header__name`,children:e.kind})})};a();var Ud=({target:e})=>{let t=e?.lastError?`unhealthy`:`ok`,n=e?.labels||{},r=D(()=>Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{value:t,color:`passive`}])),[n]);return F(`div`,{className:`vm-explore-alerts-target vm-badge-item ${t.replace(` `,`-`)}`,children:e?.labels?.length||e?.lastError?F(ea,{title:F(`div`,{className:`vm-explore-alerts-target-header__name`,children:e.address}),children:F(`div`,{className:`vm-explore-alerts-target-item`,children:F(`table`,{children:F(`tbody`,{children:[!!Object.keys(n).length&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Labels`}),F(`td`,{children:F(yd,{items:r})})]}),!!e.lastError&&F(`tr`,{children:[F(`td`,{className:`vm-col-md`,children:`Last error`}),F(`td`,{children:F(Y,{variant:`error`,children:e.lastError})})]})]})})})},`target-${e.address}`):F(`span`,{children:e.address})})};a();var Wd=H(`kinds`,``).split(`&`).filter(e=>e),Gd=H(`search`,``),Kd=()=>{let{notifiers:e,isLoading:t,error:n}=Bd(),[r,i]=u(Gd),[a,o]=u(Wd);ld({kinds:a.join(`&`),search:r});let s=e=>{i(e||``)},c=new Set,l=[];return e.forEach(e=>{let t=[];if((e.targets||[]).forEach(n=>{c.add(e.kind),!(a?.length&&!a.includes(e.kind))&&(r&&!n.address.toLowerCase().includes(r.toLowerCase())&&!e.kind.toLowerCase().includes(r.toLowerCase())||t.push(n))}),t.length){let n=Object.assign({},e);n.targets=t,l.push(n)}}),F(`div`,{className:`vm-explore-alerts`,children:[F(Vd,{kinds:a,allKinds:Array.from(c),search:r,onChangeKinds:e=>{o(Pd(e,a))},onChangeSearch:(0,Sa.default)(s,500)}),t&&F(il,{})||n&&F(Y,{variant:`error`,children:n})||!l.length&&F(Y,{variant:`info`,children:`No notifiers found!`})||F(`div`,{className:`vm-explore-alerts-body`,children:l.map(e=>F(`div`,{className:`vm-explore-alert-group vm-block vm-block_empty-padding`,children:F(ea,{id:`notifier-${e.kind}`,title:F(Hd,{notifier:e}),children:F(`div`,{className:`vm-explore-alerts-items`,children:e.targets.map(e=>F(Ud,{target:e},`target-${e.address}`))})},`notifier-${e.kind}`)},e.kind))})]})};a();var qd=()=>{let[e,t]=u(!1);return F(m,{children:F(k,{children:F(Ur,{children:F(m,{children:[F(iu,{onLoaded:t}),e&&F(A,{children:F(N,{path:`/`,element:F(ya,{}),children:[F(N,{path:R.home,element:F(rl,{})}),F(N,{path:R.rawQuery,element:F(sd,{})}),F(N,{path:R.metrics,element:F(Tu,{})}),F(N,{path:R.cardinality,element:F(Wl,{})}),F(N,{path:R.topQueries,element:F($l,{})}),F(N,{path:R.trace,element:F(su,{})}),F(N,{path:R.queryAnalyzer,element:F(qu,{})}),F(N,{path:R.dashboards,element:F(cl,{})}),F(N,{path:R.withTemplate,element:F(Pu,{})}),F(N,{path:R.relabel,element:F(Ru,{})}),F(N,{path:R.activeQueries,element:F(Hu,{})}),F(N,{path:R.icons,element:F(Eu,{})}),F(N,{path:R.downsamplingDebug,element:F(Zu,{})}),F(N,{path:R.retentionDebug,element:F(td,{})}),F(N,{path:R.rules,element:F(zd,{})}),F(N,{path:R.notifiers,element:F(Kd,{})})]})})]})})})})},Jd=e=>{e&&ee(async()=>{let{onCLS:e,onINP:t,onFCP:n,onLCP:r,onTTFB:i}=await import(`./vendor-C8Kwp93_.js`).then(e=>e.t);return{onCLS:e,onINP:t,onFCP:n,onLCP:r,onTTFB:i}},__vite__mapDeps([0,1,2]),import.meta.url).then(({onCLS:t,onINP:n,onFCP:r,onLCP:i,onTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})};a();var Yd=document.getElementById(`root`);Yd&&f(F(qd,{}),Yd),Jd(); \ No newline at end of file diff --git a/app/vmselect/vmui/assets/vendor-BF3F25aG.js b/app/vmselect/vmui/assets/vendor-C8Kwp93_.js similarity index 95% rename from app/vmselect/vmui/assets/vendor-BF3F25aG.js rename to app/vmselect/vmui/assets/vendor-C8Kwp93_.js index 2238198dc9..91b3192932 100644 --- a/app/vmselect/vmui/assets/vendor-BF3F25aG.js +++ b/app/vmselect/vmui/assets/vendor-C8Kwp93_.js @@ -3,9 +3,9 @@ import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-COnpUsM8.js";function Please change the parent to .`)}let d=hr(),f;if(t){let e=typeof t==`string`?cn(t):t;q(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=dn(e,{pathname:m});rn(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),rn(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=jr(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:zn([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:zn([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?o(ar.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...f},navigationType:`POP`}},g):g}function Tr(){let e=Br(),t=Gn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o(l,null,o(`p`,null,`💿 Hey developer 👋`),o(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o(`code`,{style:a},`ErrorBoundary`),` or`,` `,o(`code`,{style:a},`errorElement`),` prop on your route.`)),o(l,null,o(`h2`,null,`Unexpected Application Error!`),o(`h3`,{style:{fontStyle:`italic`}},t),n?o(`pre`,{style:i},n):null,s)}var Er=o(Tr,null),Dr=class extends u{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=fr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o(or.Provider,{value:this.props.routeContext},o(sr.Provider,{value:e,children:this.props.component}));return this.context?o(kr,{error:e},t):t}};Dr.contextType=$n;var Or=new WeakMap;function kr({children:e,error:t}){let{basename:n}=G(ir);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=dr(t.digest);if(e){let r=Or.get(t);if(r)throw r;let i=Jn(e.location,n);if(qn&&!Or.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Or.set(t,n),n}return o(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ar({routeContext:e,match:t,children:n}){let r=G(Zn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o(or.Provider,{value:e},n)}function jr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);q(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Kn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Er,s&&(c<0&&l===0?(Ur(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?o(n.route.Component,null):n.route.element?n.route.element:e,o(Ar,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o(Dr,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Mr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nr(e){let t=G(Zn);return q(t,Mr(e)),t}function Pr(e){let t=G(Qn);return q(t,Mr(e)),t}function Fr(e){let t=G(or);return q(t,Mr(e)),t}function Ir(e){let t=Fr(e),n=t.matches[t.matches.length-1];return q(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Lr(){return Ir(`useRouteId`)}function Rr(){return Pr(`useNavigation`).navigation}function zr(){let{matches:e,loaderData:t}=Pr(`useMatches`);return W(()=>e.map(e=>pn(e,t)),[e,t])}function Br(){let e=G(sr),t=Pr(`useRouteError`),n=Ir(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Vr(){let{router:e}=Nr(`useNavigate`),t=Ir(`useNavigate`),n=U(!1);return _r(()=>{n.current=!0}),ye(async(r,i={})=>{rn(n.current,gr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Hr={};function Ur(e,t,n){!t&&!Hr[e]&&(Hr[e]=!0,rn(!1,n))}Qe(Wr);function Wr({routes:e,future:t,state:n,isStatic:r,onError:i}){return wr(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Gr(e){return xr(e.context)}function Kr(e){q(!1,`A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .`)}function qr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:s}){q(!mr(),`You cannot render a inside another . You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=W(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=cn(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,unstable_mask:h}=n,g=W(()=>{let e=An(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,unstable_mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return rn(g!=null,` is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the won't render anything.`),g==null?null:o(ir.Provider,{value:l},o(ar.Provider,{children:t,value:g}))}function Jr({children:e,location:t}){return Cr(Yr(e),t)}function Yr(e,t=[]){let n=[];return St.forEach(e,(e,r)=>{if(!ft(e))return;let i=[...t,r];if(e.type===l){n.push.apply(n,Yr(e.props.children,i));return}q(e.type===Kr,`[${typeof e.type==`string`?e.type:e.type.name}] is not a component. All component children of must be a or `),q(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Yr(e.props.children,i)),n.push(a)}),n}var Xr=`get`,Zr=`application/x-www-form-urlencoded`;function Qr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function $r(e){return Qr(e)&&e.tagName.toLowerCase()===`button`}function ei(e){return Qr(e)&&e.tagName.toLowerCase()===`form`}function ti(e){return Qr(e)&&e.tagName.toLowerCase()===`input`}function ni(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ri(e,t){return e.button===0&&(!t||t===`_self`)&&!ni(e)}function ii(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ai(e,t){let n=ii(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var oi=null;function si(){if(oi===null)try{new FormData(document.createElement(`form`),0),oi=!1}catch{oi=!0}return oi}var ci=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function li(e){return e!=null&&!ci.has(e)?(rn(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Zr}"`),null):e}function ui(e,t){let n,r,i,a,o;if(ei(e)){let o=e.getAttribute(`action`);r=o?An(o,t):null,n=e.getAttribute(`method`)||Xr,i=li(e.getAttribute(`enctype`))||Zr,a=new FormData(e)}else if($r(e)||ti(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a