@kong-ui-public/analytics-utilities 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,8 @@ export interface DisplayBlob {
12
12
  export interface QueryResponseMeta {
13
13
  start_ms: number;
14
14
  end_ms: number;
15
+ start: string;
16
+ end: string;
15
17
  display: DisplayBlob;
16
18
  metric_names?: AllAggregations[];
17
19
  metric_units?: MetricUnit;
@@ -1 +1 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../src/types/explore/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAE5C,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,EAAE,MAAM,GAAG;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,cAAc,CAAC,EAAE,OAAO,CAAA;KACzB,CAAA;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,WAAW,CAAA;IACpB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAA;IAChC,YAAY,CAAC,EAAE,UAAU,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,UAAU,GAAG;KACtB,UAAU,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM;CACzC,CAAA"}
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../src/types/explore/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAE5C,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,EAAE,MAAM,GAAG;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,cAAc,CAAC,EAAE,OAAO,CAAA;KACzB,CAAA;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,WAAW,CAAA;IACpB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAA;IAChC,YAAY,CAAC,EAAE,UAAU,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,IAAI,EAAE,iBAAiB,CAAA;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,UAAU,GAAG;KACtB,UAAU,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM;CACzC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"chartDataGenerator.d.ts","sourceRoot":"","sources":["../../../src/utils/chartDataGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAMZ,eAAe,EAChB,MAAM,UAAU,CAAA;AAIjB,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,kCAAkC,WAAY,MAAM,iBAAiB,YAAY,KA0EvF,eACN,CAAA;AAED,eAAO,MAAM,oCAAoC,YAAa,MAAM,EAAE,KA6C/D,eACN,CAAA;AAED,eAAO,MAAM,0BAA0B,YAAa,MAAM,EAAE,gBAAgB,YAAY,KAkFjF,eACN,CAAA"}
1
+ {"version":3,"file":"chartDataGenerator.d.ts","sourceRoot":"","sources":["../../../src/utils/chartDataGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAMZ,eAAe,EAChB,MAAM,UAAU,CAAA;AAIjB,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,kCAAkC,WAAY,MAAM,iBAAiB,YAAY,KA4EvF,eACN,CAAA;AAED,eAAO,MAAM,oCAAoC,YAAa,MAAM,EAAE,KA+C/D,eACN,CAAA;AAED,eAAO,MAAM,0BAA0B,YAAa,MAAM,EAAE,gBAAgB,YAAY,KAoFjF,eACN,CAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";var wa=Object.defineProperty;var _a=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>_a(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ba=30*1e3;var h=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(h||{});const Ta=["horizontal_bar","vertical_bar","timeseries_line","choropleth_map","timeseries_bar","doughnut"],Le=["in","not_in","selector"],Da=["=","!="],Ma=["=","!=","<",">","<=",">="],ur=["empty","not_empty"],Oa=["starts_with","ends_with"],Sa=["absolute","relative"],cr=["15m","1h","6h","12h","24h","7d","current_week","previous_week","30d","current_month","previous_month"],$e=["secondly","tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly","twoHourly","twelveHourly","daily","weekly","trend"],se=e=>e.filter(t=>t!=="time"),Me=["api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","portal","route","status_code","status_code_grouped","time"],Xe=se(Me),Qe=["active_services","request_count","request_per_minute","response_latency_average"],Ze=[...Me,"application","consumer","country_code","iso_code","upstream_status_code","upstream_status_code_grouped","response_source","data_plane_node_version"],Be=se(Ze),lr=[...Qe,"response_latency_p99","response_latency_p95","response_latency_p50","upstream_latency_p99","upstream_latency_p95","upstream_latency_p50","upstream_latency_average","kong_latency_p99","kong_latency_p95","kong_latency_p50","kong_latency_average","response_size_p99","response_size_p95","response_size_p50","response_size_average","response_size_sum","request_size_p99","request_size_p95","request_size_p50","request_size_average","request_size_sum"],Ke=["control_plane","control_plane_group","gateway_service","consumer","application","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time"],Je=se(Ke),dr=["total_tokens","prompt_tokens","completion_tokens","ai_request_count","cost","llm_cache_embeddings_latency_average","llm_cache_fetch_latency_average","llm_latency_average","llm_embeddings_tokens","llm_embeddings_cost"],fr=["api_product","api_product_version","application","auth_type","client_ip","consumer","consumer_group","control_plane","control_plane_group","country_code","data_plane_node","data_plane_node_version","gateway_service","header_host","header_user_agent","http_method","iso_code","request_id","request_uri","response_header_content_type","response_source","route","service_port","service_protocol","sse","status_code_grouped","time","trace_id","upstream_uri","upstream_status_code_grouped","websocket"],va=se(fr),mr=["auth_type","client_ip","country_code","data_plane_node_version","header_host","header_user_agent","http_method","request_id","request_uri","response_header_content_type","response_source","service_port","service_protocol","trace_id","upstream_uri"],xa=mr,hr=["ai_count","latencies_response_ms","latencies_upstream_ms","latencies_kong_gateway_ms","request_body_size","response_body_size","response_header_content_length","status_code","upstream_status_code"],Ea=se(hr),Pa=["15M","1H","6H","12H","24H","7D"],Na=["basic","advanced","ai"],Ue={basic:new Set(Xe),advanced:new Set(Be),ai:new Set(Je)},ka=(e,t)=>t.filter(r=>"dimension"in r?Ue[e].has(r.dimension):Ue[e].has(r.field)),Ca=["horizontal_bar","vertical_bar","gauge","doughnut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable"],oe={type:"string"},J={type:"string"},yr={type:"boolean"},gr={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},pr={type:"object",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string"}},required:["type","id"],additionalProperties:!1},wr={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},chartDatasetColors:gr,syntheticsDataKey:oe,chartTitle:J,allowCsvExport:yr},required:["type"],additionalProperties:!1},_r={type:"object",properties:{type:{type:"string",enum:["timeseries_line","timeseries_bar"]},stacked:{type:"boolean"},threshold:{type:"object",additionalProperties:{type:"number"}},chartDatasetColors:gr,syntheticsDataKey:oe,chartTitle:J,allowCsvExport:yr},required:["type"],additionalProperties:!1},br={type:"object",properties:{type:{type:"string",enum:["gauge"]},metricDisplay:{type:"string",enum:["hidden","single","full"]},reverseDataset:{type:"boolean"},numerator:{type:"number"},syntheticsDataKey:oe,chartTitle:J},required:["type"],additionalProperties:!1},Tr={type:"object",properties:{type:{type:"string",enum:["doughnut"]},syntheticsDataKey:oe,chartTitle:J},required:["type"],additionalProperties:!1},Dr={type:"object",properties:{chartTitle:J,syntheticsDataKey:oe,type:{type:"string",enum:["top_n"]},description:{type:"string"},entityLink:{type:"string"}},required:["type"],additionalProperties:!1},Mr={type:"object",properties:{chartTitle:J,type:{type:"string",enum:["golden_signals"]},longCardTitles:{type:"boolean"},description:{type:"string"},percentileLatency:{type:"boolean"}},required:["type"],additionalProperties:!1},Ra={type:"object",properties:{tz:{type:"string",default:"Etc/UTC"},type:{type:"string",enum:["relative"]},time_range:{type:"string",enum:cr,default:"1h"}},required:["type","time_range"],additionalProperties:!1},Ia={type:"object",description:"A duration representing an exact start and end time.",properties:{tz:{type:"string"},type:{type:"string",enum:["absolute"]},start:{type:"string"},end:{type:"string"}},required:["type","start","end"],additionalProperties:!1},et={granularity:{type:"string",description:'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',enum:$e},time_range:{type:"object",description:"The time range to query.",anyOf:[Ra,Ia],default:{type:"relative",time_range:"1h"}},limit:{type:"number"},meta:{type:"object"}},tt=e=>({type:"array",description:"List of aggregated metrics to collect across the requested time span.",items:{type:"string",enum:e}}),rt=e=>({type:"array",description:"List of attributes or entity types to group by.",minItems:0,maxItems:2,items:{type:"string",enum:e}}),nt=e=>({type:"array",description:"A list of filters to apply to the query",items:{oneOf:[{type:"object",description:"A filter that specifies which data to include in the query",properties:{dimension:{type:"string",enum:e},type:{type:"string",enum:Le},values:{type:"array",items:{type:["string","number","null"]}}},required:["dimension","type","values"],additionalProperties:!1},{type:"object",description:"In filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:Le},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:ur}},required:["field","operator"],additionalProperties:!1}]}}),Or={type:"object",description:"A query to launch at the advanced explore API",properties:{datasource:{type:"string",enum:["advanced"]},metrics:tt(lr),dimensions:rt(Ze),filters:nt(Be),...et},required:["datasource"],additionalProperties:!1},Sr={type:"object",description:"A query to launch at the basic explore API",properties:{datasource:{type:"string",enum:["basic"]},metrics:tt(Qe),dimensions:rt(Me),filters:nt(Xe),...et},required:["datasource"],additionalProperties:!1},vr={type:"object",description:"A query to launch at the AI explore API",properties:{datasource:{type:"string",enum:["ai"]},metrics:tt(dr),dimensions:rt(Ke),filters:nt(Je),...et},required:["datasource"],additionalProperties:!1},xr={anyOf:[Or,Sr,vr]},Er={type:"object",properties:{query:xr,chart:{anyOf:[wr,br,Tr,_r,Mr,Dr,pr]}},required:["query","chart"],additionalProperties:!1},Pr={type:"object",properties:{position:{type:"object",properties:{col:{type:"number"},row:{type:"number"}},description:"Position of the tile in the grid.",required:["col","row"],additionalProperties:!1},size:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"},fitToContent:{type:"boolean"}},description:"Number of columns and rows the tile occupies. If fitToContent is true for every tile in a row, and each tile only occupies 1 row, then the row will auto-fit to its content.",required:["cols","rows"],additionalProperties:!1}},required:["position","size"],additionalProperties:!1},Nr={type:"object",properties:{definition:Er,layout:Pr,id:{type:"string",description:"Unique identifier for the tile. If not provided, one will be generated."}},required:["definition","layout"],additionalProperties:!1},Ya={type:"object",properties:{tiles:{type:"array",items:Nr},tileHeight:{type:"number",description:"Height of each tile in pixels."},gridSize:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows in the grid.",required:["cols","rows"],additionalProperties:!1}},required:["tiles","gridSize"],additionalProperties:!1},kr=6048e5,Ha=864e5,qa=60,Ga=3600,jt=Symbol.for("constructDateFrom");function k(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&jt in e?e[jt](t):e instanceof Date?new e.constructor(t):new Date(t)}function D(e,t){return k(t||e,e)}function Lt(e,t,r){const n=D(e,r==null?void 0:r.in);return isNaN(t)?k(e,NaN):(n.setDate(n.getDate()+t),n)}function Aa(e,t,r){const n=D(e,r==null?void 0:r.in);if(isNaN(t))return k(e,NaN);const i=n.getDate(),o=k(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const c=o.getDate();return i>=c?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}let Fa={};function ue(){return Fa}function H(e,t){var d,f,y,m;const r=ue(),n=(t==null?void 0:t.weekStartsOn)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((m=(y=r.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??0,i=D(e,t==null?void 0:t.in),o=i.getDay(),c=(o<n?7:0)+o-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function we(e,t){return H(e,{...t,weekStartsOn:1})}function Cr(e,t){const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=k(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const o=we(i),c=k(r,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=we(c);return r.getTime()>=o.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Ut(e){const t=D(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Wa(e,...t){const r=k.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function _e(e,t){const r=D(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function ja(e,t,r){const[n,i]=Wa(r==null?void 0:r.in,e,t),o=_e(n),c=_e(i),d=+o-Ut(o),f=+c-Ut(c);return Math.round((d-f)/Ha)}function La(e,t){const r=Cr(e,t),n=k(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),we(n)}function Ua(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function za(e){return!(!Ua(e)&&typeof e!="number"||isNaN(+D(e)))}function B(e,t){const r=D(e,t==null?void 0:t.in);return r.setDate(1),r.setHours(0,0,0,0),r}function Va(e,t){const r=D(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const $a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xa=(e,t,r)=>{let n;const i=$a[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function qe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Qa={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Za={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ba={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ka={date:qe({formats:Qa,defaultWidth:"full"}),time:qe({formats:Za,defaultWidth:"full"}),dateTime:qe({formats:Ba,defaultWidth:"full"})},Ja={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ei=(e,t,r,n)=>Ja[e];function ne(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,d=r!=null&&r.width?String(r.width):c;i=e.formattingValues[d]||e.formattingValues[c]}else{const c=e.defaultWidth,d=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[d]||e.values[c]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const ti={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ri={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ni={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ai={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ii={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},si={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oi=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ui={ordinalNumber:oi,era:ne({values:ti,defaultWidth:"wide"}),quarter:ne({values:ri,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ne({values:ni,defaultWidth:"wide"}),day:ne({values:ai,defaultWidth:"wide"}),dayPeriod:ne({values:ii,defaultWidth:"wide",formattingValues:si,defaultFormattingWidth:"wide"})};function ae(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const c=o[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?li(d,g=>g.test(c)):ci(d,g=>g.test(c));let y;y=e.valueCallback?e.valueCallback(f):f,y=r.valueCallback?r.valueCallback(y):y;const m=t.slice(c.length);return{value:y,rest:m}}}function ci(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function li(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function di(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let c=e.valueCallback?e.valueCallback(o[0]):o[0];c=r.valueCallback?r.valueCallback(c):c;const d=t.slice(i.length);return{value:c,rest:d}}}const fi=/^(\d+)(th|st|nd|rd)?/i,mi=/\d+/i,hi={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yi={any:[/^b/i,/^(a|c)/i]},gi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pi={any:[/1/i,/2/i,/3/i,/4/i]},wi={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_i={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bi={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ti={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Di={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Mi={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Oi={ordinalNumber:di({matchPattern:fi,parsePattern:mi,valueCallback:e=>parseInt(e,10)}),era:ae({matchPatterns:hi,defaultMatchWidth:"wide",parsePatterns:yi,defaultParseWidth:"any"}),quarter:ae({matchPatterns:gi,defaultMatchWidth:"wide",parsePatterns:pi,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:wi,defaultMatchWidth:"wide",parsePatterns:_i,defaultParseWidth:"any"}),day:ae({matchPatterns:bi,defaultMatchWidth:"wide",parsePatterns:Ti,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:Di,defaultMatchWidth:"any",parsePatterns:Mi,defaultParseWidth:"any"})},Si={code:"en-US",formatDistance:Xa,formatLong:Ka,formatRelative:ei,localize:ui,match:Oi,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vi(e,t){const r=D(e,t==null?void 0:t.in);return ja(r,Va(r))+1}function xi(e,t){const r=D(e,t==null?void 0:t.in),n=+we(r)-+La(r);return Math.round(n/kr)+1}function Rr(e,t){var m,g,O,v;const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=ue(),o=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(O=i.locale)==null?void 0:O.options)==null?void 0:v.firstWeekContainsDate)??1,c=k((t==null?void 0:t.in)||e,0);c.setFullYear(n+1,0,o),c.setHours(0,0,0,0);const d=H(c,t),f=k((t==null?void 0:t.in)||e,0);f.setFullYear(n,0,o),f.setHours(0,0,0,0);const y=H(f,t);return+r>=+d?n+1:+r>=+y?n:n-1}function Ei(e,t){var d,f,y,m;const r=ue(),n=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(y=r.locale)==null?void 0:y.options)==null?void 0:m.firstWeekContainsDate)??1,i=Rr(e,t),o=k((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),H(o,t)}function Pi(e,t){const r=D(e,t==null?void 0:t.in),n=+H(r,t)-+Ei(r,t);return Math.round(n/kr)+1}function p(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const G={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return p(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):p(r+1,2)},d(e,t){return p(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return p(e.getHours()%12||12,t.length)},H(e,t){return p(e.getHours(),t.length)},m(e,t){return p(e.getMinutes(),t.length)},s(e,t){return p(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return p(i,t.length)}},Q={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zt={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return G.y(e,t)},Y:function(e,t,r,n){const i=Rr(e,n),o=i>0?i:1-i;if(t==="YY"){const c=o%100;return p(c,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):p(o,t.length)},R:function(e,t){const r=Cr(e);return p(r,t.length)},u:function(e,t){const r=e.getFullYear();return p(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return p(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return G.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=Pi(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):p(i,t.length)},I:function(e,t,r){const n=xi(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):p(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):G.d(e,t)},D:function(e,t,r){const n=vi(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):p(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return p(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return p(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return p(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Q.noon:n===0?i=Q.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Q.evening:n>=12?i=Q.afternoon:n>=4?i=Q.morning:i=Q.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return G.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):G.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):G.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):G.s(e,t)},S:function(e,t){return G.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return $t(n);case"XXXX":case"XX":return U(n);case"XXXXX":case"XXX":default:return U(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return $t(n);case"xxxx":case"xx":return U(n);case"xxxxx":case"xxx":default:return U(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vt(n,":");case"OOOO":default:return"GMT"+U(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vt(n,":");case"zzzz":default:return"GMT"+U(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return p(n,t.length)},T:function(e,t,r){return p(+e,t.length)}};function Vt(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+p(o,2)}function $t(e,t){return e%60===0?(e>0?"-":"+")+p(Math.abs(e)/60,2):U(e,t)}function U(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=p(Math.trunc(n/60),2),o=p(n%60,2);return r+i+t+o}const Xt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ir=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ni=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return Xt(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Xt(n,t)).replace("{{time}}",Ir(i,t))},ki={p:Ir,P:Ni},Ci=/^D+$/,Ri=/^Y+$/,Ii=["D","DD","YY","YYYY"];function Yi(e){return Ci.test(e)}function Hi(e){return Ri.test(e)}function qi(e,t,r){const n=Gi(e,t,r);if(console.warn(n),Ii.includes(e))throw new RangeError(n)}function Gi(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ai=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wi=/^'([^]*?)'?$/,ji=/''/g,Li=/[a-zA-Z]/;function Yr(e,t,r){var m,g,O,v,P,C,ee,A;const n=ue(),i=(r==null?void 0:r.locale)??n.locale??Si,o=(r==null?void 0:r.firstWeekContainsDate)??((g=(m=r==null?void 0:r.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((v=(O=n.locale)==null?void 0:O.options)==null?void 0:v.firstWeekContainsDate)??1,c=(r==null?void 0:r.weekStartsOn)??((C=(P=r==null?void 0:r.locale)==null?void 0:P.options)==null?void 0:C.weekStartsOn)??n.weekStartsOn??((A=(ee=n.locale)==null?void 0:ee.options)==null?void 0:A.weekStartsOn)??0,d=D(e,r==null?void 0:r.in);if(!za(d))throw new RangeError("Invalid time value");let f=t.match(Fi).map(M=>{const b=M[0];if(b==="p"||b==="P"){const F=ki[b];return F(M,i.formatLong)}return M}).join("").match(Ai).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const b=M[0];if(b==="'")return{isToken:!1,value:Ui(M)};if(zt[b])return{isToken:!0,value:M};if(b.match(Li))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:M}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const y={firstWeekContainsDate:o,weekStartsOn:c,locale:i};return f.map(M=>{if(!M.isToken)return M.value;const b=M.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Hi(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&Yi(b))&&qi(b,t,String(e));const F=zt[b[0]];return F(d,b,i.localize,y)}).join("")}function Ui(e){const t=e.match(Wi);return t?t[1].replace(ji,"'"):e}function zi(e,t){const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=r.getMonth(),o=k(r,0);return o.setFullYear(n,i+1,0),o.setHours(0,0,0,0),o.getDate()}function Vi(){return Object.assign({},ue())}function Qt(e){return+D(e)}function Zt(e){return Math.trunc(+D(e)/1e3)}function $i(e){return Math.trunc(e*Ga)}function Xi(e){const t=e/qa;return Math.trunc(t)}function Hr(e,t,r){return Aa(e,-t,r)}function Bt(e,t,r){const n=Vi(),i=Bi(e,r.timeZone,r.locale??n.locale);return"formatToParts"in i?Qi(i,t):Zi(i,t)}function Qi(e,t){const r=e.formatToParts(t);for(let n=r.length-1;n>=0;--n)if(r[n].type==="timeZoneName")return r[n].value}function Zi(e,t){const r=e.format(t).replace(/\u200E/g,""),n=/ [\w-+ ]+$/.exec(r);return n?n[0].substr(1):""}function Bi(e,t,r){return new Intl.DateTimeFormat(r?[r.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Ki(e,t){const r=ns(t);return"formatToParts"in r?es(r,e):ts(r,e)}const Ji={year:0,month:1,day:2,hour:3,minute:4,second:5};function es(e,t){try{const r=e.formatToParts(t),n=[];for(let i=0;i<r.length;i++){const o=Ji[r[i].type];o!==void 0&&(n[o]=parseInt(r[i].value,10))}return n}catch(r){if(r instanceof RangeError)return[NaN];throw r}}function ts(e,t){const r=e.format(t),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);return[parseInt(n[3],10),parseInt(n[1],10),parseInt(n[2],10),parseInt(n[4],10),parseInt(n[5],10),parseInt(n[6],10)]}const Ge={},Kt=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),rs=Kt==="06/25/2014, 00:00:00"||Kt==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function ns(e){return Ge[e]||(Ge[e]=rs?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Ge[e]}function at(e,t,r,n,i,o,c){const d=new Date(0);return d.setUTCFullYear(e,t,r),d.setUTCHours(n,i,o,c),d}const Jt=36e5,as=6e4,Ae={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ce(e,t,r){if(!e)return 0;let n=Ae.timezoneZ.exec(e);if(n)return 0;let i,o;if(n=Ae.timezoneHH.exec(e),n)return i=parseInt(n[1],10),er(i)?-(i*Jt):NaN;if(n=Ae.timezoneHHMM.exec(e),n){i=parseInt(n[2],10);const c=parseInt(n[3],10);return er(i,c)?(o=Math.abs(i)*Jt+c*as,n[1]==="+"?-o:o):NaN}if(os(e)){t=new Date(t||Date.now());const c=r?t:is(t),d=ze(c,e);return-(r?d:ss(t,d,e))}return NaN}function is(e){return at(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function ze(e,t){const r=Ki(e,t),n=at(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime();let i=e.getTime();const o=i%1e3;return i-=o>=0?o:1e3+o,n-i}function ss(e,t,r){let i=e.getTime()-t;const o=ze(new Date(i),r);if(t===o)return t;i-=o-t;const c=ze(new Date(i),r);return o===c?o:Math.max(o,c)}function er(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const tr={};function os(e){if(tr[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),tr[e]=!0,!0}catch{return!1}}const us=60*1e3,cs={X:function(e,t,r){const n=Fe(r.timeZone,e);if(n===0)return"Z";switch(t){case"X":return rr(n);case"XXXX":case"XX":return Z(n);case"XXXXX":case"XXX":default:return Z(n,":")}},x:function(e,t,r){const n=Fe(r.timeZone,e);switch(t){case"x":return rr(n);case"xxxx":case"xx":return Z(n);case"xxxxx":case"xxx":default:return Z(n,":")}},O:function(e,t,r){const n=Fe(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+ls(n,":");case"OOOO":default:return"GMT"+Z(n,":")}},z:function(e,t,r){switch(t){case"z":case"zz":case"zzz":return Bt("short",e,r);case"zzzz":default:return Bt("long",e,r)}}};function Fe(e,t){const r=e?ce(e,t,!0)/us:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(r))throw new RangeError("Invalid time zone specified: "+e);return r}function be(e,t){const r=e<0?"-":"";let n=Math.abs(e).toString();for(;n.length<t;)n="0"+n;return r+n}function Z(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=be(Math.floor(n/60),2),o=be(Math.floor(n%60),2);return r+i+t+o}function rr(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Z(e,t)}function ls(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+be(o,2)}function nr(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const qr=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,We=36e5,ar=6e4,ds=2,S={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:qr};function Te(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const r=t.additionalDigits==null?ds:Number(t.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const n=fs(e),{year:i,restDateString:o}=ms(n.date,r),c=hs(o,i);if(c===null||isNaN(c.getTime()))return new Date(NaN);if(c){const d=c.getTime();let f=0,y;if(n.time&&(f=ys(n.time),f===null||isNaN(f)))return new Date(NaN);if(n.timeZone||t.timeZone){if(y=ce(n.timeZone||t.timeZone,new Date(d+f)),isNaN(y))return new Date(NaN)}else y=nr(new Date(d+f)),y=nr(new Date(d+f+y));return new Date(d+f+y)}else return new Date(NaN)}function fs(e){const t={};let r=S.dateTimePattern.exec(e),n;if(r?(t.date=r[1],n=r[3]):(r=S.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const i=S.timeZone.exec(n);i?(t.time=n.replace(i[1],""),t.timeZone=i[1].trim()):t.time=n}return t}function ms(e,t){if(e){const r=S.YYY[t],n=S.YYYYY[t];let i=S.YYYY.exec(e)||n.exec(e);if(i){const o=i[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(i=S.YY.exec(e)||r.exec(e),i){const o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function hs(e,t){if(t===null)return null;let r,n,i;if(!e||!e.length)return r=new Date(0),r.setUTCFullYear(t),r;let o=S.MM.exec(e);if(o)return r=new Date(0),n=parseInt(o[1],10)-1,sr(t,n)?(r.setUTCFullYear(t,n),r):new Date(NaN);if(o=S.DDD.exec(e),o){r=new Date(0);const c=parseInt(o[1],10);return ws(t,c)?(r.setUTCFullYear(t,0,c),r):new Date(NaN)}if(o=S.MMDD.exec(e),o){r=new Date(0),n=parseInt(o[1],10)-1;const c=parseInt(o[2],10);return sr(t,n,c)?(r.setUTCFullYear(t,n,c),r):new Date(NaN)}if(o=S.Www.exec(e),o)return i=parseInt(o[1],10)-1,or(i)?ir(t,i):new Date(NaN);if(o=S.WwwD.exec(e),o){i=parseInt(o[1],10)-1;const c=parseInt(o[2],10)-1;return or(i,c)?ir(t,i,c):new Date(NaN)}return null}function ys(e){let t,r,n=S.HH.exec(e);if(n)return t=parseFloat(n[1].replace(",",".")),je(t)?t%24*We:NaN;if(n=S.HHMM.exec(e),n)return t=parseInt(n[1],10),r=parseFloat(n[2].replace(",",".")),je(t,r)?t%24*We+r*ar:NaN;if(n=S.HHMMSS.exec(e),n){t=parseInt(n[1],10),r=parseInt(n[2],10);const i=parseFloat(n[3].replace(",","."));return je(t,r,i)?t%24*We+r*ar+i*1e3:NaN}return null}function ir(e,t,r){t=t||0,r=r||0;const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,o=t*7+r+1-i;return n.setUTCDate(n.getUTCDate()+o),n}const gs=[31,28,31,30,31,30,31,31,30,31,30,31],ps=[31,29,31,30,31,30,31,31,30,31,30,31];function Gr(e){return e%400===0||e%4===0&&e%100!==0}function sr(e,t,r){if(t<0||t>11)return!1;if(r!=null){if(r<1)return!1;const n=Gr(e);if(n&&r>ps[t]||!n&&r>gs[t])return!1}return!0}function ws(e,t){if(t<1)return!1;const r=Gr(e);return!(r&&t>366||!r&&t>365)}function or(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function je(e,t,r){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||r!=null&&(r<0||r>=60))}const _s=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function bs(e,t,r={}){t=String(t);const n=t.match(_s);if(n){const i=Te(r.originalDate||e,r);t=n.reduce(function(o,c){if(c[0]==="'")return o;const d=o.indexOf(c),f=o[d-1]==="'",y=o.replace(c,"'"+cs[c[0]](i,c,r)+"'");return f?y.substring(0,d-1)+y.substring(d+1):y},t)}return Yr(e,t,r)}function Ar(e,t,r){e=Te(e,r);const n=ce(t,e,!0),i=new Date(e.getTime()-n),o=new Date(0);return o.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),o.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),o}function Ts(e,t,r,n){return n={...n,timeZone:t,originalDate:e},bs(Ar(e,t,{timeZone:n.timeZone}),r,n)}function Ds(e,t,r){if(typeof e=="string"&&!e.match(qr))return Te(e,{...r,timeZone:t});e=Te(e,r);const n=at(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=ce(t,new Date(n));return new Date(n+i)}function Fr(e,t){return-ce(e,t)}function Ms(e){return Yr(e,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}function Ve(e,t={}){if(!e)return e;const r=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let n="MMM dd, yyy hh:mm a";t.short&&(n="MMM dd, yyy"),t.includeTZ&&(n+=" (z)");const i=new Date(e);return Ts(i,r,n)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function Os(e,t){return`${Ve(e.getTime())} - ${Ve(t.getTime(),{includeTZ:!0})}`}const ie={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:5*60*1e3,tenMinutely:10*60*1e3,thirtyMinutely:30*60*1e3,hourly:60*60*1e3,twoHourly:2*60*60*1e3,twelveHourly:12*60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function Ss(e,t){return e.map(r=>({value:r,label:t.t(`configuration.vitals.reports.granularity.${r}`)}))}function Wr(e,t){return{duration:e,type:"duration",origin:t}}function vs(e){return e&&$e.find(r=>e<=ie[r])||null}function jr(e,t,r,n){const i=ie[r];let o=0;return i>=ie.daily&&(n?o=-Fr(n,t):o=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-o)/i)*i+o)}function Lr(e,t,r){return jr(Math.floor,e,t,r)}function it(e,t,r){return jr(Math.ceil,e,t,r)}class Oe{constructor(t,r,n){_(this,"timeframe");_(this,"tz");_(this,"dataGranularity");if(this.constructor===Oe)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=r,this.dataGranularity=n??t.dataGranularity}calculateStartDate(t,r,n=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*n);{const i=this.endDate(),o=this.timeframe.rawStart(this.tz),c=Lr(o,r,this.tz),f=(i.getTime()-c.getTime())*(n-1);return new Date(c.getTime()-f)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return Wr(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return Zt(this.startDate())}endSeconds(){return Zt(this.endDate())}startMs(){return Qt(this.startDate())}endMs(){return Qt(this.endDate())}}class xs extends Oe{constructor(r,n,i,o,c){super(r,i,o);_(this,"granularity");n&&r.allowedGranularities(c).has(n)?this.granularity=n:c?this.granularity=r.fineGrainedDefaultGranularity??r.defaultResponseGranularity:this.granularity=r.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return it(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return ie[this.granularity]}}class Ur extends Oe{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return it(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class Es extends Ur{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}};De.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",c="[object Array]",d="[object Boolean]",f="[object Date]",y="[object Error]",m="[object Function]",g="[object GeneratorFunction]",O="[object Map]",v="[object Number]",P="[object Object]",C="[object Promise]",ee="[object RegExp]",A="[object Set]",M="[object String]",b="[object Symbol]",F="[object WeakMap]",ot="[object ArrayBuffer]",le="[object DataView]",ut="[object Float32Array]",ct="[object Float64Array]",lt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",ht="[object Uint8ClampedArray]",yt="[object Uint16Array]",gt="[object Uint32Array]",$r=/[\\^$.*+?()[\]{}|]/g,Xr=/\w*$/,Qr=/^\[object .+?Constructor\]$/,Zr=/^(?:0|[1-9]\d*)$/,w={};w[o]=w[c]=w[ot]=w[le]=w[d]=w[f]=w[ut]=w[ct]=w[lt]=w[dt]=w[ft]=w[O]=w[v]=w[P]=w[ee]=w[A]=w[M]=w[b]=w[mt]=w[ht]=w[yt]=w[gt]=!0,w[y]=w[m]=w[F]=!1;var Br=typeof pe=="object"&&pe&&pe.Object===Object&&pe,Kr=typeof self=="object"&&self&&self.Object===Object&&self,R=Br||Kr||Function("return this")(),pt=t&&!t.nodeType&&t,wt=pt&&!0&&e&&!e.nodeType&&e,Jr=wt&&wt.exports===pt;function en(a,s){return a.set(s[0],s[1]),a}function tn(a,s){return a.add(s),a}function rn(a,s){for(var u=-1,l=a?a.length:0;++u<l&&s(a[u],u,a)!==!1;);return a}function nn(a,s){for(var u=-1,l=s.length,T=a.length;++u<l;)a[T+u]=s[u];return a}function _t(a,s,u,l){for(var T=-1,x=a?a.length:0;++T<x;)u=s(u,a[T],T,a);return u}function an(a,s){for(var u=-1,l=Array(a);++u<a;)l[u]=s(u);return l}function sn(a,s){return a==null?void 0:a[s]}function bt(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Tt(a){var s=-1,u=Array(a.size);return a.forEach(function(l,T){u[++s]=[T,l]}),u}function ve(a,s){return function(u){return a(s(u))}}function Dt(a){var s=-1,u=Array(a.size);return a.forEach(function(l){u[++s]=l}),u}var on=Array.prototype,un=Function.prototype,de=Object.prototype,xe=R["__core-js_shared__"],Mt=function(){var a=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),Ot=un.toString,q=de.hasOwnProperty,fe=de.toString,cn=RegExp("^"+Ot.call(q).replace($r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=Jr?R.Buffer:void 0,vt=R.Symbol,xt=R.Uint8Array,ln=ve(Object.getPrototypeOf,Object),dn=Object.create,fn=de.propertyIsEnumerable,mn=on.splice,Et=Object.getOwnPropertySymbols,hn=St?St.isBuffer:void 0,yn=ve(Object.keys,Object),Ee=$(R,"DataView"),te=$(R,"Map"),Pe=$(R,"Promise"),Ne=$(R,"Set"),ke=$(R,"WeakMap"),re=$(Object,"create"),gn=L(Ee),pn=L(te),wn=L(Pe),_n=L(Ne),bn=L(ke),Pt=vt?vt.prototype:void 0,Nt=Pt?Pt.valueOf:void 0;function W(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function Tn(){this.__data__=re?re(null):{}}function Dn(a){return this.has(a)&&delete this.__data__[a]}function Mn(a){var s=this.__data__;if(re){var u=s[a];return u===n?void 0:u}return q.call(s,a)?s[a]:void 0}function On(a){var s=this.__data__;return re?s[a]!==void 0:q.call(s,a)}function Sn(a,s){var u=this.__data__;return u[a]=re&&s===void 0?n:s,this}W.prototype.clear=Tn,W.prototype.delete=Dn,W.prototype.get=Mn,W.prototype.has=On,W.prototype.set=Sn;function I(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function vn(){this.__data__=[]}function xn(a){var s=this.__data__,u=me(s,a);if(u<0)return!1;var l=s.length-1;return u==l?s.pop():mn.call(s,u,1),!0}function En(a){var s=this.__data__,u=me(s,a);return u<0?void 0:s[u][1]}function Pn(a){return me(this.__data__,a)>-1}function Nn(a,s){var u=this.__data__,l=me(u,a);return l<0?u.push([a,s]):u[l][1]=s,this}I.prototype.clear=vn,I.prototype.delete=xn,I.prototype.get=En,I.prototype.has=Pn,I.prototype.set=Nn;function z(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function kn(){this.__data__={hash:new W,map:new(te||I),string:new W}}function Cn(a){return he(this,a).delete(a)}function Rn(a){return he(this,a).get(a)}function In(a){return he(this,a).has(a)}function Yn(a,s){return he(this,a).set(a,s),this}z.prototype.clear=kn,z.prototype.delete=Cn,z.prototype.get=Rn,z.prototype.has=In,z.prototype.set=Yn;function V(a){this.__data__=new I(a)}function Hn(){this.__data__=new I}function qn(a){return this.__data__.delete(a)}function Gn(a){return this.__data__.get(a)}function An(a){return this.__data__.has(a)}function Fn(a,s){var u=this.__data__;if(u instanceof I){var l=u.__data__;if(!te||l.length<r-1)return l.push([a,s]),this;u=this.__data__=new z(l)}return u.set(a,s),this}V.prototype.clear=Hn,V.prototype.delete=qn,V.prototype.get=Gn,V.prototype.has=An,V.prototype.set=Fn;function Wn(a,s){var u=Ie(a)||da(a)?an(a.length,String):[],l=u.length,T=!!l;for(var x in a)q.call(a,x)&&!(T&&(x=="length"||oa(x,l)))&&u.push(x);return u}function kt(a,s,u){var l=a[s];(!(q.call(a,s)&&Yt(l,u))||u===void 0&&!(s in a))&&(a[s]=u)}function me(a,s){for(var u=a.length;u--;)if(Yt(a[u][0],s))return u;return-1}function jn(a,s){return a&&Ct(s,Ye(s),a)}function Ce(a,s,u,l,T,x,Y){var E;if(l&&(E=x?l(a,T,x,Y):l(a)),E!==void 0)return E;if(!ye(a))return a;var Gt=Ie(a);if(Gt){if(E=aa(a),!s)return ta(a,E)}else{var X=j(a),At=X==m||X==g;if(ma(a))return Xn(a,s);if(X==P||X==o||At&&!x){if(bt(a))return x?a:{};if(E=ia(At?{}:a),!s)return ra(a,jn(E,a))}else{if(!w[X])return x?a:{};E=sa(a,X,Ce,s)}}Y||(Y=new V);var Ft=Y.get(a);if(Ft)return Ft;if(Y.set(a,E),!Gt)var Wt=u?na(a):Ye(a);return rn(Wt||a,function(He,ge){Wt&&(ge=He,He=a[ge]),kt(E,ge,Ce(He,s,u,l,ge,a,Y))}),E}function Ln(a){return ye(a)?dn(a):{}}function Un(a,s,u){var l=s(a);return Ie(a)?l:nn(l,u(a))}function zn(a){return fe.call(a)}function Vn(a){if(!ye(a)||ca(a))return!1;var s=qt(a)||bt(a)?cn:Qr;return s.test(L(a))}function $n(a){if(!It(a))return yn(a);var s=[];for(var u in Object(a))q.call(a,u)&&u!="constructor"&&s.push(u);return s}function Xn(a,s){if(s)return a.slice();var u=new a.constructor(a.length);return a.copy(u),u}function Re(a){var s=new a.constructor(a.byteLength);return new xt(s).set(new xt(a)),s}function Qn(a,s){var u=s?Re(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.byteLength)}function Zn(a,s,u){var l=s?u(Tt(a),!0):Tt(a);return _t(l,en,new a.constructor)}function Bn(a){var s=new a.constructor(a.source,Xr.exec(a));return s.lastIndex=a.lastIndex,s}function Kn(a,s,u){var l=s?u(Dt(a),!0):Dt(a);return _t(l,tn,new a.constructor)}function Jn(a){return Nt?Object(Nt.call(a)):{}}function ea(a,s){var u=s?Re(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.length)}function ta(a,s){var u=-1,l=a.length;for(s||(s=Array(l));++u<l;)s[u]=a[u];return s}function Ct(a,s,u,l){u||(u={});for(var T=-1,x=s.length;++T<x;){var Y=s[T],E=void 0;kt(u,Y,E===void 0?a[Y]:E)}return u}function ra(a,s){return Ct(a,Rt(a),s)}function na(a){return Un(a,Ye,Rt)}function he(a,s){var u=a.__data__;return ua(s)?u[typeof s=="string"?"string":"hash"]:u.map}function $(a,s){var u=sn(a,s);return Vn(u)?u:void 0}var Rt=Et?ve(Et,Object):ga,j=zn;(Ee&&j(new Ee(new ArrayBuffer(1)))!=le||te&&j(new te)!=O||Pe&&j(Pe.resolve())!=C||Ne&&j(new Ne)!=A||ke&&j(new ke)!=F)&&(j=function(a){var s=fe.call(a),u=s==P?a.constructor:void 0,l=u?L(u):void 0;if(l)switch(l){case gn:return le;case pn:return O;case wn:return C;case _n:return A;case bn:return F}return s});function aa(a){var s=a.length,u=a.constructor(s);return s&&typeof a[0]=="string"&&q.call(a,"index")&&(u.index=a.index,u.input=a.input),u}function ia(a){return typeof a.constructor=="function"&&!It(a)?Ln(ln(a)):{}}function sa(a,s,u,l){var T=a.constructor;switch(s){case ot:return Re(a);case d:case f:return new T(+a);case le:return Qn(a,l);case ut:case ct:case lt:case dt:case ft:case mt:case ht:case yt:case gt:return ea(a,l);case O:return Zn(a,l,u);case v:case M:return new T(a);case ee:return Bn(a);case A:return Kn(a,l,u);case b:return Jn(a)}}function oa(a,s){return s=s??i,!!s&&(typeof a=="number"||Zr.test(a))&&a>-1&&a%1==0&&a<s}function ua(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function ca(a){return!!Mt&&Mt in a}function It(a){var s=a&&a.constructor,u=typeof s=="function"&&s.prototype||de;return a===u}function L(a){if(a!=null){try{return Ot.call(a)}catch{}try{return a+""}catch{}}return""}function la(a){return Ce(a,!0,!0)}function Yt(a,s){return a===s||a!==a&&s!==s}function da(a){return fa(a)&&q.call(a,"callee")&&(!fn.call(a,"callee")||fe.call(a)==o)}var Ie=Array.isArray;function Ht(a){return a!=null&&ha(a.length)&&!qt(a)}function fa(a){return ya(a)&&Ht(a)}var ma=hn||pa;function qt(a){var s=ye(a)?fe.call(a):"";return s==m||s==g}function ha(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}function ye(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function ya(a){return!!a&&typeof a=="object"}function Ye(a){return Ht(a)?Wn(a):$n(a)}function ga(){return[]}function pa(){return!1}e.exports=la})(De,De.exports);var Ns=De.exports;const ks=Ps(Ns),K=(e,t)=>new Date(e.getTime()-Fr(t,e));class N{constructor(t){_(this,"timeframeText");_(this,"key");_(this,"display");_(this,"timeframeLength");_(this,"allowedTiers");_(this,"defaultResponseGranularity");_(this,"dataGranularity");_(this,"isRelative");_(this,"fineGrainedDefaultGranularity");_(this,"_startCustom");_(this,"_endCustom");_(this,"_allowedGranularitiesOverride");this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom,this._allowedGranularitiesOverride=t.allowedGranularitiesOverride,this.fineGrainedDefaultGranularity=t.fineGrainedDefaultGranularity}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(t){if(this._allowedGranularitiesOverride&&t)return new Set(this._allowedGranularitiesOverride);const r=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&r.add("minutely"),n>=2&&n<=7*24&&r.add("hourly"),n>=2*24&&r.add("daily"),n>=2*24*14&&r.add("weekly"),r}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const r=Ds(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return Ar(r,t)}}class Cs extends N{rawStart(t){let r=H(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(r=K(r,t)),r}maximumTimeframeLength(){return 60*60*24*7}}class Rs extends N{rawStart(t){let r=B(this.tzAdjustedDate(t));return t&&(r=K(r,t)),r}maximumTimeframeLength(){return 60*60*24*31}}class Is extends N{rawEnd(t){let r=H(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(r=K(r,t)),r}rawStart(t){const r=this.tzAdjustedDate(t);let n=H(r.setDate(r.getDate()-7),{weekStartsOn:1});return t&&(n=K(n,t)),n}}class Ys extends N{rawEnd(t){let r=B(this.tzAdjustedDate(t));return t&&(r=K(r,t)),r}rawStart(t){let r=B(Hr(this.tzAdjustedDate(t),1));return t&&(r=K(r,t)),r}}const zr=new Map([[h.FIFTEEN_MIN,new N({key:h.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[h.ONE_HOUR,new N({key:h.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[h.SIX_HOUR,new N({key:h.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.TWELVE_HOUR,new N({key:h.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.ONE_DAY,new N({key:h.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.SEVEN_DAY,new N({key:h.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.THIRTY_DAY,new N({key:h.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[h.CURRENT_WEEK,new Cs({key:h.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=H(new Date,{weekStartsOn:1});return(_e(Lt(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.CURRENT_MONTH,new Rs({key:h.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=B(new Date);return(_e(Lt(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[h.PREVIOUS_WEEK,new Is({key:h.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.PREVIOUS_MONTH,new Ys({key:h.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=B(new Date),r=B(Hr(new Date,1));return t.getTimezoneOffset()!==r.getTimezoneOffset()&&(e=Vr(t,r)),60*60*24*zi(new Date().setMonth(new Date().getMonth()-1))+$i(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function Hs(e){const t=new Date(e.start),r=new Date(e.end),n=(r.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&ks(zr.get(e.timePeriodsKey))||new N({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:r,timeframeLength:()=>n,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function qs(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function Gs(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function Vr(e,t){return Xi(e.getTimezoneOffset()-t.getTimezoneOffset())}const As={"15M":h.FIFTEEN_MIN,"1H":h.ONE_HOUR,"6H":h.SIX_HOUR,"12H":h.TWELVE_HOUR,"24H":h.ONE_DAY,"7D":h.SEVEN_DAY,"15m":h.FIFTEEN_MIN,"1h":h.ONE_HOUR,"6h":h.SIX_HOUR,"12h":h.TWELVE_HOUR,"24h":h.ONE_DAY,"7d":h.SEVEN_DAY,"30d":h.THIRTY_DAY,current_week:h.CURRENT_WEEK,current_month:h.CURRENT_MONTH,previous_week:h.PREVIOUS_WEEK,previous_month:h.PREVIOUS_MONTH};class Se{constructor(t){_(this,"_seed");this._seed=t}next(t,r){const n=Math.sin(this._seed++)*1e4,i=n-Math.floor(n);return Math.floor(i*(r-t+1))+t}}const Fs=(e,t)=>{const r=st(10,1e4),n=new Se(r),i=Date.now()-6*60*60*1e3,o=Date.now(),c=[];let d=0;for(let m=i;m<=o;m+=60*60*1e3)if(t)for(const g in t)t[g].forEach(O=>{d+=n.next(50,500);const v={[g]:O,[e.name]:d},P={version:"1.0",timestamp:new Date(m).toISOString(),event:v};c.push(P)});else{d+=n.next(50,500);const g={version:"1.0",timestamp:new Date(m).toISOString(),event:{[e.name]:d}};c.push(g)}const f={};if(t)for(const m in t)f[m]={},t[m].forEach(g=>{f[m][g]={name:g,deleted:!1}});const y={start_ms:i,end_ms:o,query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:60*60*1e3,display:f};return{data:c,meta:y}},Ws=e=>{const t=st(10,1e4),r=new Se(t),n=Date.now()-6*60*60*1e3,i=Date.now(),o=[],c={};e.forEach(f=>{c[f.name]=0});for(let f=n;f<=i;f+=60*60*1e3){const y={};e.forEach(g=>{c[g.name]+=r.next(50,500),y[g.name]=c[g.name]});const m={version:"1.0",timestamp:new Date(f).toISOString(),event:y};o.push(m)}const d={start_ms:n,end_ms:i,query_id:"12345",metric_names:e.map(f=>f.name),metric_units:e.reduce((f,y)=>(f[y.name]=y.unit,f),{}),granularity_ms:60*60*1e3,display:{}};return{data:o,meta:d}},js=(e,t)=>{const r=Math.floor(Math.random()*9991)+10,n=new Se(r),i=Date.now()-6*60*60*1e3,o=Date.now(),c=new Date((i+o)/2).toISOString(),d=[];if(t){const m=Object.keys(t),g=Object.values(t),O=(v,P)=>{if(P===m.length){e.forEach(C=>{v[C.name]=n.next(50,500)}),d.push({version:"1.0",timestamp:new Date().toISOString(),event:{...v}});return}g[P].forEach(C=>{O({...v,[m[P]]:C},P+1)})};O({},0)}else{const m={};e.forEach(g=>{m[g.name]=n.next(50,500)}),d.push({version:"1.0",timestamp:c,event:m})}const f={};if(t)for(const m in t)f[m]={},t[m].forEach(g=>{f[m][g]={name:g,deleted:!1}});const y={start_ms:i,end_ms:o,query_id:"12345",metric_names:e.map(m=>m.name),metric_units:e.reduce((m,g)=>(m[g.name]=g.unit,m),{}),truncated:!1,limit:50,display:f,granularity_ms:o-i};return{data:d,meta:y}};function st(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}exports.DeltaQueryTime=Es;exports.Granularities=ie;exports.REFRESH_INTERVAL_MS=ba;exports.SeededRandom=Se;exports.TIMEFRAME_LOOKUP=As;exports.TimePeriods=zr;exports.Timeframe=N;exports.TimeframeKeys=h;exports.TimeseriesQueryTime=xs;exports.UnaryQueryTime=Ur;exports.aiExploreAggregations=dr;exports.aiQuerySchema=vr;exports.barChartSchema=wr;exports.basicExploreAggregations=Qe;exports.basicQuerySchema=Sr;exports.ceilToNearestTimeGrain=it;exports.dashboardConfigSchema=Ya;exports.dashboardTileTypes=Ca;exports.datasourceToFilterableDimensions=Ue;exports.datePickerSelectionToTimeframe=Hs;exports.doughnutChartSchema=Tr;exports.dstOffsetHours=Vr;exports.exploreAggregations=lr;exports.exploreFilterTypesV2=Le;exports.exploreV4QuerySchema=Or;exports.filterableAiExploreDimensions=Je;exports.filterableBasicExploreDimensions=Xe;exports.filterableExploreDimensions=Be;exports.filterableRequestDimensions=va;exports.filterableRequestMetrics=Ea;exports.filterableRequestWildcardDimensions=xa;exports.floorToNearestTimeGrain=Lr;exports.formatISOTimeWithTZ=Ms;exports.formatTime=Ve;exports.formatTimeRange=Os;exports.gaugeChartSchema=br;exports.generateCrossSectionalData=js;exports.generateMultipleMetricTimeSeriesData=Ws;exports.generateSingleMetricTimeSeriesData=Fs;exports.granularitiesToOptions=Ss;exports.granularityMsToQuery=Wr;exports.granularityValues=$e;exports.metricCardSchema=Mr;exports.msToGranularity=vs;exports.queryDatasources=Na;exports.queryableAiExploreDimensions=Ke;exports.queryableBasicExploreDimensions=Me;exports.queryableExploreDimensions=Ze;exports.queryableRequestDimensions=fr;exports.queryableRequestMetrics=hr;exports.queryableRequestWildcardDimensions=mr;exports.rand=st;exports.relativeTimeRangeValuesRequestV2=Pa;exports.relativeTimeRangeValuesV4=cr;exports.reportChartTypes=Ta;exports.requestFilterTypeEmptyV2=ur;exports.requestFilterTypeEqualsV2=Da;exports.requestFilterTypeMetricV2=Ma;exports.requestFilterTypeWildcardV2=Oa;exports.slottableSchema=pr;exports.stripUnknownFilters=ka;exports.tileConfigSchema=Nr;exports.tileDefinitionSchema=Er;exports.tileLayoutSchema=Pr;exports.timeRangeTypeV2=Sa;exports.timeframeToDatepickerSelection=qs;exports.timeframeToDatepickerTimeperiod=Gs;exports.timeseriesChartSchema=_r;exports.topNTableSchema=Dr;exports.validDashboardQuery=xr;
1
+ "use strict";var wa=Object.defineProperty;var _a=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>_a(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ba=30*1e3;var h=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(h||{});const Ta=["horizontal_bar","vertical_bar","timeseries_line","choropleth_map","timeseries_bar","doughnut"],Le=["in","not_in","selector"],Da=["=","!="],Oa=["=","!=","<",">","<=",">="],ur=["empty","not_empty"],Ma=["starts_with","ends_with"],Sa=["absolute","relative"],cr=["15m","1h","6h","12h","24h","7d","current_week","previous_week","30d","current_month","previous_month"],$e=["secondly","tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly","twoHourly","twelveHourly","daily","weekly","trend"],se=e=>e.filter(t=>t!=="time"),Oe=["api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","portal","route","status_code","status_code_grouped","time"],Xe=se(Oe),Qe=["active_services","request_count","request_per_minute","response_latency_average"],Ze=[...Oe,"application","consumer","country_code","iso_code","upstream_status_code","upstream_status_code_grouped","response_source","data_plane_node_version"],Be=se(Ze),lr=[...Qe,"response_latency_p99","response_latency_p95","response_latency_p50","upstream_latency_p99","upstream_latency_p95","upstream_latency_p50","upstream_latency_average","kong_latency_p99","kong_latency_p95","kong_latency_p50","kong_latency_average","response_size_p99","response_size_p95","response_size_p50","response_size_average","response_size_sum","request_size_p99","request_size_p95","request_size_p50","request_size_average","request_size_sum"],Ke=["control_plane","control_plane_group","gateway_service","consumer","application","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time"],Je=se(Ke),dr=["total_tokens","prompt_tokens","completion_tokens","ai_request_count","cost","llm_cache_embeddings_latency_average","llm_cache_fetch_latency_average","llm_latency_average","llm_embeddings_tokens","llm_embeddings_cost"],fr=["api_product","api_product_version","application","auth_type","client_ip","consumer","consumer_group","control_plane","control_plane_group","country_code","data_plane_node","data_plane_node_version","gateway_service","header_host","header_user_agent","http_method","iso_code","request_id","request_uri","response_header_content_type","response_source","route","service_port","service_protocol","sse","status_code_grouped","time","trace_id","upstream_uri","upstream_status_code_grouped","websocket"],va=se(fr),mr=["auth_type","client_ip","country_code","data_plane_node_version","header_host","header_user_agent","http_method","request_id","request_uri","response_header_content_type","response_source","service_port","service_protocol","trace_id","upstream_uri"],xa=mr,hr=["ai_count","latencies_response_ms","latencies_upstream_ms","latencies_kong_gateway_ms","request_body_size","response_body_size","response_header_content_length","status_code","upstream_status_code"],Ea=se(hr),Pa=["15M","1H","6H","12H","24H","7D"],Na=["basic","advanced","ai"],Ue={basic:new Set(Xe),advanced:new Set(Be),ai:new Set(Je)},Ia=(e,t)=>t.filter(r=>"dimension"in r?Ue[e].has(r.dimension):Ue[e].has(r.field)),ka=["horizontal_bar","vertical_bar","gauge","doughnut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable"],oe={type:"string"},J={type:"string"},yr={type:"boolean"},gr={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},pr={type:"object",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string"}},required:["type","id"],additionalProperties:!1},wr={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},chartDatasetColors:gr,syntheticsDataKey:oe,chartTitle:J,allowCsvExport:yr},required:["type"],additionalProperties:!1},_r={type:"object",properties:{type:{type:"string",enum:["timeseries_line","timeseries_bar"]},stacked:{type:"boolean"},threshold:{type:"object",additionalProperties:{type:"number"}},chartDatasetColors:gr,syntheticsDataKey:oe,chartTitle:J,allowCsvExport:yr},required:["type"],additionalProperties:!1},br={type:"object",properties:{type:{type:"string",enum:["gauge"]},metricDisplay:{type:"string",enum:["hidden","single","full"]},reverseDataset:{type:"boolean"},numerator:{type:"number"},syntheticsDataKey:oe,chartTitle:J},required:["type"],additionalProperties:!1},Tr={type:"object",properties:{type:{type:"string",enum:["doughnut"]},syntheticsDataKey:oe,chartTitle:J},required:["type"],additionalProperties:!1},Dr={type:"object",properties:{chartTitle:J,syntheticsDataKey:oe,type:{type:"string",enum:["top_n"]},description:{type:"string"},entityLink:{type:"string"}},required:["type"],additionalProperties:!1},Or={type:"object",properties:{chartTitle:J,type:{type:"string",enum:["golden_signals"]},longCardTitles:{type:"boolean"},description:{type:"string"},percentileLatency:{type:"boolean"}},required:["type"],additionalProperties:!1},Ca={type:"object",properties:{tz:{type:"string",default:"Etc/UTC"},type:{type:"string",enum:["relative"]},time_range:{type:"string",enum:cr,default:"1h"}},required:["type","time_range"],additionalProperties:!1},Ra={type:"object",description:"A duration representing an exact start and end time.",properties:{tz:{type:"string"},type:{type:"string",enum:["absolute"]},start:{type:"string"},end:{type:"string"}},required:["type","start","end"],additionalProperties:!1},et={granularity:{type:"string",description:'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',enum:$e},time_range:{type:"object",description:"The time range to query.",anyOf:[Ca,Ra],default:{type:"relative",time_range:"1h"}},limit:{type:"number"},meta:{type:"object"}},tt=e=>({type:"array",description:"List of aggregated metrics to collect across the requested time span.",items:{type:"string",enum:e}}),rt=e=>({type:"array",description:"List of attributes or entity types to group by.",minItems:0,maxItems:2,items:{type:"string",enum:e}}),nt=e=>({type:"array",description:"A list of filters to apply to the query",items:{oneOf:[{type:"object",description:"A filter that specifies which data to include in the query",properties:{dimension:{type:"string",enum:e},type:{type:"string",enum:Le},values:{type:"array",items:{type:["string","number","null"]}}},required:["dimension","type","values"],additionalProperties:!1},{type:"object",description:"In filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:Le},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:ur}},required:["field","operator"],additionalProperties:!1}]}}),Mr={type:"object",description:"A query to launch at the advanced explore API",properties:{datasource:{type:"string",enum:["advanced"]},metrics:tt(lr),dimensions:rt(Ze),filters:nt(Be),...et},required:["datasource"],additionalProperties:!1},Sr={type:"object",description:"A query to launch at the basic explore API",properties:{datasource:{type:"string",enum:["basic"]},metrics:tt(Qe),dimensions:rt(Oe),filters:nt(Xe),...et},required:["datasource"],additionalProperties:!1},vr={type:"object",description:"A query to launch at the AI explore API",properties:{datasource:{type:"string",enum:["ai"]},metrics:tt(dr),dimensions:rt(Ke),filters:nt(Je),...et},required:["datasource"],additionalProperties:!1},xr={anyOf:[Mr,Sr,vr]},Er={type:"object",properties:{query:xr,chart:{anyOf:[wr,br,Tr,_r,Or,Dr,pr]}},required:["query","chart"],additionalProperties:!1},Pr={type:"object",properties:{position:{type:"object",properties:{col:{type:"number"},row:{type:"number"}},description:"Position of the tile in the grid.",required:["col","row"],additionalProperties:!1},size:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"},fitToContent:{type:"boolean"}},description:"Number of columns and rows the tile occupies. If fitToContent is true for every tile in a row, and each tile only occupies 1 row, then the row will auto-fit to its content.",required:["cols","rows"],additionalProperties:!1}},required:["position","size"],additionalProperties:!1},Nr={type:"object",properties:{definition:Er,layout:Pr,id:{type:"string",description:"Unique identifier for the tile. If not provided, one will be generated."}},required:["definition","layout"],additionalProperties:!1},Ya={type:"object",properties:{tiles:{type:"array",items:Nr},tileHeight:{type:"number",description:"Height of each tile in pixels."},gridSize:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows in the grid.",required:["cols","rows"],additionalProperties:!1}},required:["tiles","gridSize"],additionalProperties:!1},Ir=6048e5,Ha=864e5,qa=60,Ga=3600,jt=Symbol.for("constructDateFrom");function I(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&jt in e?e[jt](t):e instanceof Date?new e.constructor(t):new Date(t)}function D(e,t){return I(t||e,e)}function Lt(e,t,r){const n=D(e,r==null?void 0:r.in);return isNaN(t)?I(e,NaN):(n.setDate(n.getDate()+t),n)}function Aa(e,t,r){const n=D(e,r==null?void 0:r.in);if(isNaN(t))return I(e,NaN);const i=n.getDate(),o=I(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const c=o.getDate();return i>=c?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}let Fa={};function ue(){return Fa}function H(e,t){var d,f,y,m;const r=ue(),n=(t==null?void 0:t.weekStartsOn)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((m=(y=r.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??0,i=D(e,t==null?void 0:t.in),o=i.getDay(),c=(o<n?7:0)+o-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function we(e,t){return H(e,{...t,weekStartsOn:1})}function kr(e,t){const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=I(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const o=we(i),c=I(r,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=we(c);return r.getTime()>=o.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Ut(e){const t=D(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Wa(e,...t){const r=I.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function _e(e,t){const r=D(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function ja(e,t,r){const[n,i]=Wa(r==null?void 0:r.in,e,t),o=_e(n),c=_e(i),d=+o-Ut(o),f=+c-Ut(c);return Math.round((d-f)/Ha)}function La(e,t){const r=kr(e,t),n=I(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),we(n)}function Ua(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function za(e){return!(!Ua(e)&&typeof e!="number"||isNaN(+D(e)))}function B(e,t){const r=D(e,t==null?void 0:t.in);return r.setDate(1),r.setHours(0,0,0,0),r}function Va(e,t){const r=D(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const $a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xa=(e,t,r)=>{let n;const i=$a[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function qe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Qa={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Za={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ba={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ka={date:qe({formats:Qa,defaultWidth:"full"}),time:qe({formats:Za,defaultWidth:"full"}),dateTime:qe({formats:Ba,defaultWidth:"full"})},Ja={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ei=(e,t,r,n)=>Ja[e];function ne(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,d=r!=null&&r.width?String(r.width):c;i=e.formattingValues[d]||e.formattingValues[c]}else{const c=e.defaultWidth,d=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[d]||e.values[c]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const ti={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ri={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ni={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ai={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ii={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},si={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oi=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ui={ordinalNumber:oi,era:ne({values:ti,defaultWidth:"wide"}),quarter:ne({values:ri,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ne({values:ni,defaultWidth:"wide"}),day:ne({values:ai,defaultWidth:"wide"}),dayPeriod:ne({values:ii,defaultWidth:"wide",formattingValues:si,defaultFormattingWidth:"wide"})};function ae(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const c=o[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?li(d,g=>g.test(c)):ci(d,g=>g.test(c));let y;y=e.valueCallback?e.valueCallback(f):f,y=r.valueCallback?r.valueCallback(y):y;const m=t.slice(c.length);return{value:y,rest:m}}}function ci(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function li(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function di(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let c=e.valueCallback?e.valueCallback(o[0]):o[0];c=r.valueCallback?r.valueCallback(c):c;const d=t.slice(i.length);return{value:c,rest:d}}}const fi=/^(\d+)(th|st|nd|rd)?/i,mi=/\d+/i,hi={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yi={any:[/^b/i,/^(a|c)/i]},gi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pi={any:[/1/i,/2/i,/3/i,/4/i]},wi={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_i={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bi={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ti={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Di={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Oi={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Mi={ordinalNumber:di({matchPattern:fi,parsePattern:mi,valueCallback:e=>parseInt(e,10)}),era:ae({matchPatterns:hi,defaultMatchWidth:"wide",parsePatterns:yi,defaultParseWidth:"any"}),quarter:ae({matchPatterns:gi,defaultMatchWidth:"wide",parsePatterns:pi,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:wi,defaultMatchWidth:"wide",parsePatterns:_i,defaultParseWidth:"any"}),day:ae({matchPatterns:bi,defaultMatchWidth:"wide",parsePatterns:Ti,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:Di,defaultMatchWidth:"any",parsePatterns:Oi,defaultParseWidth:"any"})},Si={code:"en-US",formatDistance:Xa,formatLong:Ka,formatRelative:ei,localize:ui,match:Mi,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vi(e,t){const r=D(e,t==null?void 0:t.in);return ja(r,Va(r))+1}function xi(e,t){const r=D(e,t==null?void 0:t.in),n=+we(r)-+La(r);return Math.round(n/Ir)+1}function Cr(e,t){var m,g,M,v;const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=ue(),o=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(M=i.locale)==null?void 0:M.options)==null?void 0:v.firstWeekContainsDate)??1,c=I((t==null?void 0:t.in)||e,0);c.setFullYear(n+1,0,o),c.setHours(0,0,0,0);const d=H(c,t),f=I((t==null?void 0:t.in)||e,0);f.setFullYear(n,0,o),f.setHours(0,0,0,0);const y=H(f,t);return+r>=+d?n+1:+r>=+y?n:n-1}function Ei(e,t){var d,f,y,m;const r=ue(),n=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(y=r.locale)==null?void 0:y.options)==null?void 0:m.firstWeekContainsDate)??1,i=Cr(e,t),o=I((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,n),o.setHours(0,0,0,0),H(o,t)}function Pi(e,t){const r=D(e,t==null?void 0:t.in),n=+H(r,t)-+Ei(r,t);return Math.round(n/Ir)+1}function p(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const G={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return p(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):p(r+1,2)},d(e,t){return p(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return p(e.getHours()%12||12,t.length)},H(e,t){return p(e.getHours(),t.length)},m(e,t){return p(e.getMinutes(),t.length)},s(e,t){return p(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return p(i,t.length)}},Q={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zt={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return G.y(e,t)},Y:function(e,t,r,n){const i=Cr(e,n),o=i>0?i:1-i;if(t==="YY"){const c=o%100;return p(c,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):p(o,t.length)},R:function(e,t){const r=kr(e);return p(r,t.length)},u:function(e,t){const r=e.getFullYear();return p(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return p(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return G.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=Pi(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):p(i,t.length)},I:function(e,t,r){const n=xi(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):p(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):G.d(e,t)},D:function(e,t,r){const n=vi(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):p(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return p(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return p(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return p(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Q.noon:n===0?i=Q.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Q.evening:n>=12?i=Q.afternoon:n>=4?i=Q.morning:i=Q.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return G.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):G.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):G.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):G.s(e,t)},S:function(e,t){return G.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return $t(n);case"XXXX":case"XX":return U(n);case"XXXXX":case"XXX":default:return U(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return $t(n);case"xxxx":case"xx":return U(n);case"xxxxx":case"xxx":default:return U(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vt(n,":");case"OOOO":default:return"GMT"+U(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vt(n,":");case"zzzz":default:return"GMT"+U(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return p(n,t.length)},T:function(e,t,r){return p(+e,t.length)}};function Vt(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+p(o,2)}function $t(e,t){return e%60===0?(e>0?"-":"+")+p(Math.abs(e)/60,2):U(e,t)}function U(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=p(Math.trunc(n/60),2),o=p(n%60,2);return r+i+t+o}const Xt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Rr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ni=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return Xt(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Xt(n,t)).replace("{{time}}",Rr(i,t))},Ii={p:Rr,P:Ni},ki=/^D+$/,Ci=/^Y+$/,Ri=["D","DD","YY","YYYY"];function Yi(e){return ki.test(e)}function Hi(e){return Ci.test(e)}function qi(e,t,r){const n=Gi(e,t,r);if(console.warn(n),Ri.includes(e))throw new RangeError(n)}function Gi(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ai=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wi=/^'([^]*?)'?$/,ji=/''/g,Li=/[a-zA-Z]/;function Yr(e,t,r){var m,g,M,v,P,k,ee,A;const n=ue(),i=(r==null?void 0:r.locale)??n.locale??Si,o=(r==null?void 0:r.firstWeekContainsDate)??((g=(m=r==null?void 0:r.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((v=(M=n.locale)==null?void 0:M.options)==null?void 0:v.firstWeekContainsDate)??1,c=(r==null?void 0:r.weekStartsOn)??((k=(P=r==null?void 0:r.locale)==null?void 0:P.options)==null?void 0:k.weekStartsOn)??n.weekStartsOn??((A=(ee=n.locale)==null?void 0:ee.options)==null?void 0:A.weekStartsOn)??0,d=D(e,r==null?void 0:r.in);if(!za(d))throw new RangeError("Invalid time value");let f=t.match(Fi).map(O=>{const b=O[0];if(b==="p"||b==="P"){const F=Ii[b];return F(O,i.formatLong)}return O}).join("").match(Ai).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const b=O[0];if(b==="'")return{isToken:!1,value:Ui(O)};if(zt[b])return{isToken:!0,value:O};if(b.match(Li))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:O}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const y={firstWeekContainsDate:o,weekStartsOn:c,locale:i};return f.map(O=>{if(!O.isToken)return O.value;const b=O.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Hi(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&Yi(b))&&qi(b,t,String(e));const F=zt[b[0]];return F(d,b,i.localize,y)}).join("")}function Ui(e){const t=e.match(Wi);return t?t[1].replace(ji,"'"):e}function zi(e,t){const r=D(e,t==null?void 0:t.in),n=r.getFullYear(),i=r.getMonth(),o=I(r,0);return o.setFullYear(n,i+1,0),o.setHours(0,0,0,0),o.getDate()}function Vi(){return Object.assign({},ue())}function Qt(e){return+D(e)}function Zt(e){return Math.trunc(+D(e)/1e3)}function $i(e){return Math.trunc(e*Ga)}function Xi(e){const t=e/qa;return Math.trunc(t)}function Hr(e,t,r){return Aa(e,-t,r)}function Bt(e,t,r){const n=Vi(),i=Bi(e,r.timeZone,r.locale??n.locale);return"formatToParts"in i?Qi(i,t):Zi(i,t)}function Qi(e,t){const r=e.formatToParts(t);for(let n=r.length-1;n>=0;--n)if(r[n].type==="timeZoneName")return r[n].value}function Zi(e,t){const r=e.format(t).replace(/\u200E/g,""),n=/ [\w-+ ]+$/.exec(r);return n?n[0].substr(1):""}function Bi(e,t,r){return new Intl.DateTimeFormat(r?[r.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Ki(e,t){const r=ns(t);return"formatToParts"in r?es(r,e):ts(r,e)}const Ji={year:0,month:1,day:2,hour:3,minute:4,second:5};function es(e,t){try{const r=e.formatToParts(t),n=[];for(let i=0;i<r.length;i++){const o=Ji[r[i].type];o!==void 0&&(n[o]=parseInt(r[i].value,10))}return n}catch(r){if(r instanceof RangeError)return[NaN];throw r}}function ts(e,t){const r=e.format(t),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);return[parseInt(n[3],10),parseInt(n[1],10),parseInt(n[2],10),parseInt(n[4],10),parseInt(n[5],10),parseInt(n[6],10)]}const Ge={},Kt=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),rs=Kt==="06/25/2014, 00:00:00"||Kt==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function ns(e){return Ge[e]||(Ge[e]=rs?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Ge[e]}function at(e,t,r,n,i,o,c){const d=new Date(0);return d.setUTCFullYear(e,t,r),d.setUTCHours(n,i,o,c),d}const Jt=36e5,as=6e4,Ae={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ce(e,t,r){if(!e)return 0;let n=Ae.timezoneZ.exec(e);if(n)return 0;let i,o;if(n=Ae.timezoneHH.exec(e),n)return i=parseInt(n[1],10),er(i)?-(i*Jt):NaN;if(n=Ae.timezoneHHMM.exec(e),n){i=parseInt(n[2],10);const c=parseInt(n[3],10);return er(i,c)?(o=Math.abs(i)*Jt+c*as,n[1]==="+"?-o:o):NaN}if(os(e)){t=new Date(t||Date.now());const c=r?t:is(t),d=ze(c,e);return-(r?d:ss(t,d,e))}return NaN}function is(e){return at(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function ze(e,t){const r=Ki(e,t),n=at(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime();let i=e.getTime();const o=i%1e3;return i-=o>=0?o:1e3+o,n-i}function ss(e,t,r){let i=e.getTime()-t;const o=ze(new Date(i),r);if(t===o)return t;i-=o-t;const c=ze(new Date(i),r);return o===c?o:Math.max(o,c)}function er(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const tr={};function os(e){if(tr[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),tr[e]=!0,!0}catch{return!1}}const us=60*1e3,cs={X:function(e,t,r){const n=Fe(r.timeZone,e);if(n===0)return"Z";switch(t){case"X":return rr(n);case"XXXX":case"XX":return Z(n);case"XXXXX":case"XXX":default:return Z(n,":")}},x:function(e,t,r){const n=Fe(r.timeZone,e);switch(t){case"x":return rr(n);case"xxxx":case"xx":return Z(n);case"xxxxx":case"xxx":default:return Z(n,":")}},O:function(e,t,r){const n=Fe(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+ls(n,":");case"OOOO":default:return"GMT"+Z(n,":")}},z:function(e,t,r){switch(t){case"z":case"zz":case"zzz":return Bt("short",e,r);case"zzzz":default:return Bt("long",e,r)}}};function Fe(e,t){const r=e?ce(e,t,!0)/us:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(r))throw new RangeError("Invalid time zone specified: "+e);return r}function be(e,t){const r=e<0?"-":"";let n=Math.abs(e).toString();for(;n.length<t;)n="0"+n;return r+n}function Z(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=be(Math.floor(n/60),2),o=be(Math.floor(n%60),2);return r+i+t+o}function rr(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Z(e,t)}function ls(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;return o===0?r+String(i):r+String(i)+t+be(o,2)}function nr(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const qr=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,We=36e5,ar=6e4,ds=2,S={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:qr};function Te(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const r=t.additionalDigits==null?ds:Number(t.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const n=fs(e),{year:i,restDateString:o}=ms(n.date,r),c=hs(o,i);if(c===null||isNaN(c.getTime()))return new Date(NaN);if(c){const d=c.getTime();let f=0,y;if(n.time&&(f=ys(n.time),f===null||isNaN(f)))return new Date(NaN);if(n.timeZone||t.timeZone){if(y=ce(n.timeZone||t.timeZone,new Date(d+f)),isNaN(y))return new Date(NaN)}else y=nr(new Date(d+f)),y=nr(new Date(d+f+y));return new Date(d+f+y)}else return new Date(NaN)}function fs(e){const t={};let r=S.dateTimePattern.exec(e),n;if(r?(t.date=r[1],n=r[3]):(r=S.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const i=S.timeZone.exec(n);i?(t.time=n.replace(i[1],""),t.timeZone=i[1].trim()):t.time=n}return t}function ms(e,t){if(e){const r=S.YYY[t],n=S.YYYYY[t];let i=S.YYYY.exec(e)||n.exec(e);if(i){const o=i[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(i=S.YY.exec(e)||r.exec(e),i){const o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function hs(e,t){if(t===null)return null;let r,n,i;if(!e||!e.length)return r=new Date(0),r.setUTCFullYear(t),r;let o=S.MM.exec(e);if(o)return r=new Date(0),n=parseInt(o[1],10)-1,sr(t,n)?(r.setUTCFullYear(t,n),r):new Date(NaN);if(o=S.DDD.exec(e),o){r=new Date(0);const c=parseInt(o[1],10);return ws(t,c)?(r.setUTCFullYear(t,0,c),r):new Date(NaN)}if(o=S.MMDD.exec(e),o){r=new Date(0),n=parseInt(o[1],10)-1;const c=parseInt(o[2],10);return sr(t,n,c)?(r.setUTCFullYear(t,n,c),r):new Date(NaN)}if(o=S.Www.exec(e),o)return i=parseInt(o[1],10)-1,or(i)?ir(t,i):new Date(NaN);if(o=S.WwwD.exec(e),o){i=parseInt(o[1],10)-1;const c=parseInt(o[2],10)-1;return or(i,c)?ir(t,i,c):new Date(NaN)}return null}function ys(e){let t,r,n=S.HH.exec(e);if(n)return t=parseFloat(n[1].replace(",",".")),je(t)?t%24*We:NaN;if(n=S.HHMM.exec(e),n)return t=parseInt(n[1],10),r=parseFloat(n[2].replace(",",".")),je(t,r)?t%24*We+r*ar:NaN;if(n=S.HHMMSS.exec(e),n){t=parseInt(n[1],10),r=parseInt(n[2],10);const i=parseFloat(n[3].replace(",","."));return je(t,r,i)?t%24*We+r*ar+i*1e3:NaN}return null}function ir(e,t,r){t=t||0,r=r||0;const n=new Date(0);n.setUTCFullYear(e,0,4);const i=n.getUTCDay()||7,o=t*7+r+1-i;return n.setUTCDate(n.getUTCDate()+o),n}const gs=[31,28,31,30,31,30,31,31,30,31,30,31],ps=[31,29,31,30,31,30,31,31,30,31,30,31];function Gr(e){return e%400===0||e%4===0&&e%100!==0}function sr(e,t,r){if(t<0||t>11)return!1;if(r!=null){if(r<1)return!1;const n=Gr(e);if(n&&r>ps[t]||!n&&r>gs[t])return!1}return!0}function ws(e,t){if(t<1)return!1;const r=Gr(e);return!(r&&t>366||!r&&t>365)}function or(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function je(e,t,r){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||r!=null&&(r<0||r>=60))}const _s=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function bs(e,t,r={}){t=String(t);const n=t.match(_s);if(n){const i=Te(r.originalDate||e,r);t=n.reduce(function(o,c){if(c[0]==="'")return o;const d=o.indexOf(c),f=o[d-1]==="'",y=o.replace(c,"'"+cs[c[0]](i,c,r)+"'");return f?y.substring(0,d-1)+y.substring(d+1):y},t)}return Yr(e,t,r)}function Ar(e,t,r){e=Te(e,r);const n=ce(t,e,!0),i=new Date(e.getTime()-n),o=new Date(0);return o.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),o.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),o}function Ts(e,t,r,n){return n={...n,timeZone:t,originalDate:e},bs(Ar(e,t,{timeZone:n.timeZone}),r,n)}function Ds(e,t,r){if(typeof e=="string"&&!e.match(qr))return Te(e,{...r,timeZone:t});e=Te(e,r);const n=at(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=ce(t,new Date(n));return new Date(n+i)}function Fr(e,t){return-ce(e,t)}function Os(e){return Yr(e,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}function Ve(e,t={}){if(!e)return e;const r=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let n="MMM dd, yyy hh:mm a";t.short&&(n="MMM dd, yyy"),t.includeTZ&&(n+=" (z)");const i=new Date(e);return Ts(i,r,n)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function Ms(e,t){return`${Ve(e.getTime())} - ${Ve(t.getTime(),{includeTZ:!0})}`}const ie={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:5*60*1e3,tenMinutely:10*60*1e3,thirtyMinutely:30*60*1e3,hourly:60*60*1e3,twoHourly:2*60*60*1e3,twelveHourly:12*60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function Ss(e,t){return e.map(r=>({value:r,label:t.t(`configuration.vitals.reports.granularity.${r}`)}))}function Wr(e,t){return{duration:e,type:"duration",origin:t}}function vs(e){return e&&$e.find(r=>e<=ie[r])||null}function jr(e,t,r,n){const i=ie[r];let o=0;return i>=ie.daily&&(n?o=-Fr(n,t):o=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-o)/i)*i+o)}function Lr(e,t,r){return jr(Math.floor,e,t,r)}function it(e,t,r){return jr(Math.ceil,e,t,r)}class Me{constructor(t,r,n){_(this,"timeframe");_(this,"tz");_(this,"dataGranularity");if(this.constructor===Me)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=r,this.dataGranularity=n??t.dataGranularity}calculateStartDate(t,r,n=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*n);{const i=this.endDate(),o=this.timeframe.rawStart(this.tz),c=Lr(o,r,this.tz),f=(i.getTime()-c.getTime())*(n-1);return new Date(c.getTime()-f)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return Wr(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return Zt(this.startDate())}endSeconds(){return Zt(this.endDate())}startMs(){return Qt(this.startDate())}endMs(){return Qt(this.endDate())}}class xs extends Me{constructor(r,n,i,o,c){super(r,i,o);_(this,"granularity");n&&r.allowedGranularities(c).has(n)?this.granularity=n:c?this.granularity=r.fineGrainedDefaultGranularity??r.defaultResponseGranularity:this.granularity=r.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return it(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return ie[this.granularity]}}class Ur extends Me{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return it(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class Es extends Ur{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}};De.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",c="[object Array]",d="[object Boolean]",f="[object Date]",y="[object Error]",m="[object Function]",g="[object GeneratorFunction]",M="[object Map]",v="[object Number]",P="[object Object]",k="[object Promise]",ee="[object RegExp]",A="[object Set]",O="[object String]",b="[object Symbol]",F="[object WeakMap]",ot="[object ArrayBuffer]",le="[object DataView]",ut="[object Float32Array]",ct="[object Float64Array]",lt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",ht="[object Uint8ClampedArray]",yt="[object Uint16Array]",gt="[object Uint32Array]",$r=/[\\^$.*+?()[\]{}|]/g,Xr=/\w*$/,Qr=/^\[object .+?Constructor\]$/,Zr=/^(?:0|[1-9]\d*)$/,w={};w[o]=w[c]=w[ot]=w[le]=w[d]=w[f]=w[ut]=w[ct]=w[lt]=w[dt]=w[ft]=w[M]=w[v]=w[P]=w[ee]=w[A]=w[O]=w[b]=w[mt]=w[ht]=w[yt]=w[gt]=!0,w[y]=w[m]=w[F]=!1;var Br=typeof pe=="object"&&pe&&pe.Object===Object&&pe,Kr=typeof self=="object"&&self&&self.Object===Object&&self,C=Br||Kr||Function("return this")(),pt=t&&!t.nodeType&&t,wt=pt&&!0&&e&&!e.nodeType&&e,Jr=wt&&wt.exports===pt;function en(a,s){return a.set(s[0],s[1]),a}function tn(a,s){return a.add(s),a}function rn(a,s){for(var u=-1,l=a?a.length:0;++u<l&&s(a[u],u,a)!==!1;);return a}function nn(a,s){for(var u=-1,l=s.length,T=a.length;++u<l;)a[T+u]=s[u];return a}function _t(a,s,u,l){for(var T=-1,x=a?a.length:0;++T<x;)u=s(u,a[T],T,a);return u}function an(a,s){for(var u=-1,l=Array(a);++u<a;)l[u]=s(u);return l}function sn(a,s){return a==null?void 0:a[s]}function bt(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Tt(a){var s=-1,u=Array(a.size);return a.forEach(function(l,T){u[++s]=[T,l]}),u}function ve(a,s){return function(u){return a(s(u))}}function Dt(a){var s=-1,u=Array(a.size);return a.forEach(function(l){u[++s]=l}),u}var on=Array.prototype,un=Function.prototype,de=Object.prototype,xe=C["__core-js_shared__"],Ot=function(){var a=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),Mt=un.toString,q=de.hasOwnProperty,fe=de.toString,cn=RegExp("^"+Mt.call(q).replace($r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=Jr?C.Buffer:void 0,vt=C.Symbol,xt=C.Uint8Array,ln=ve(Object.getPrototypeOf,Object),dn=Object.create,fn=de.propertyIsEnumerable,mn=on.splice,Et=Object.getOwnPropertySymbols,hn=St?St.isBuffer:void 0,yn=ve(Object.keys,Object),Ee=$(C,"DataView"),te=$(C,"Map"),Pe=$(C,"Promise"),Ne=$(C,"Set"),Ie=$(C,"WeakMap"),re=$(Object,"create"),gn=L(Ee),pn=L(te),wn=L(Pe),_n=L(Ne),bn=L(Ie),Pt=vt?vt.prototype:void 0,Nt=Pt?Pt.valueOf:void 0;function W(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function Tn(){this.__data__=re?re(null):{}}function Dn(a){return this.has(a)&&delete this.__data__[a]}function On(a){var s=this.__data__;if(re){var u=s[a];return u===n?void 0:u}return q.call(s,a)?s[a]:void 0}function Mn(a){var s=this.__data__;return re?s[a]!==void 0:q.call(s,a)}function Sn(a,s){var u=this.__data__;return u[a]=re&&s===void 0?n:s,this}W.prototype.clear=Tn,W.prototype.delete=Dn,W.prototype.get=On,W.prototype.has=Mn,W.prototype.set=Sn;function R(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function vn(){this.__data__=[]}function xn(a){var s=this.__data__,u=me(s,a);if(u<0)return!1;var l=s.length-1;return u==l?s.pop():mn.call(s,u,1),!0}function En(a){var s=this.__data__,u=me(s,a);return u<0?void 0:s[u][1]}function Pn(a){return me(this.__data__,a)>-1}function Nn(a,s){var u=this.__data__,l=me(u,a);return l<0?u.push([a,s]):u[l][1]=s,this}R.prototype.clear=vn,R.prototype.delete=xn,R.prototype.get=En,R.prototype.has=Pn,R.prototype.set=Nn;function z(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var l=a[s];this.set(l[0],l[1])}}function In(){this.__data__={hash:new W,map:new(te||R),string:new W}}function kn(a){return he(this,a).delete(a)}function Cn(a){return he(this,a).get(a)}function Rn(a){return he(this,a).has(a)}function Yn(a,s){return he(this,a).set(a,s),this}z.prototype.clear=In,z.prototype.delete=kn,z.prototype.get=Cn,z.prototype.has=Rn,z.prototype.set=Yn;function V(a){this.__data__=new R(a)}function Hn(){this.__data__=new R}function qn(a){return this.__data__.delete(a)}function Gn(a){return this.__data__.get(a)}function An(a){return this.__data__.has(a)}function Fn(a,s){var u=this.__data__;if(u instanceof R){var l=u.__data__;if(!te||l.length<r-1)return l.push([a,s]),this;u=this.__data__=new z(l)}return u.set(a,s),this}V.prototype.clear=Hn,V.prototype.delete=qn,V.prototype.get=Gn,V.prototype.has=An,V.prototype.set=Fn;function Wn(a,s){var u=Re(a)||da(a)?an(a.length,String):[],l=u.length,T=!!l;for(var x in a)q.call(a,x)&&!(T&&(x=="length"||oa(x,l)))&&u.push(x);return u}function It(a,s,u){var l=a[s];(!(q.call(a,s)&&Yt(l,u))||u===void 0&&!(s in a))&&(a[s]=u)}function me(a,s){for(var u=a.length;u--;)if(Yt(a[u][0],s))return u;return-1}function jn(a,s){return a&&kt(s,Ye(s),a)}function ke(a,s,u,l,T,x,Y){var E;if(l&&(E=x?l(a,T,x,Y):l(a)),E!==void 0)return E;if(!ye(a))return a;var Gt=Re(a);if(Gt){if(E=aa(a),!s)return ta(a,E)}else{var X=j(a),At=X==m||X==g;if(ma(a))return Xn(a,s);if(X==P||X==o||At&&!x){if(bt(a))return x?a:{};if(E=ia(At?{}:a),!s)return ra(a,jn(E,a))}else{if(!w[X])return x?a:{};E=sa(a,X,ke,s)}}Y||(Y=new V);var Ft=Y.get(a);if(Ft)return Ft;if(Y.set(a,E),!Gt)var Wt=u?na(a):Ye(a);return rn(Wt||a,function(He,ge){Wt&&(ge=He,He=a[ge]),It(E,ge,ke(He,s,u,l,ge,a,Y))}),E}function Ln(a){return ye(a)?dn(a):{}}function Un(a,s,u){var l=s(a);return Re(a)?l:nn(l,u(a))}function zn(a){return fe.call(a)}function Vn(a){if(!ye(a)||ca(a))return!1;var s=qt(a)||bt(a)?cn:Qr;return s.test(L(a))}function $n(a){if(!Rt(a))return yn(a);var s=[];for(var u in Object(a))q.call(a,u)&&u!="constructor"&&s.push(u);return s}function Xn(a,s){if(s)return a.slice();var u=new a.constructor(a.length);return a.copy(u),u}function Ce(a){var s=new a.constructor(a.byteLength);return new xt(s).set(new xt(a)),s}function Qn(a,s){var u=s?Ce(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.byteLength)}function Zn(a,s,u){var l=s?u(Tt(a),!0):Tt(a);return _t(l,en,new a.constructor)}function Bn(a){var s=new a.constructor(a.source,Xr.exec(a));return s.lastIndex=a.lastIndex,s}function Kn(a,s,u){var l=s?u(Dt(a),!0):Dt(a);return _t(l,tn,new a.constructor)}function Jn(a){return Nt?Object(Nt.call(a)):{}}function ea(a,s){var u=s?Ce(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.length)}function ta(a,s){var u=-1,l=a.length;for(s||(s=Array(l));++u<l;)s[u]=a[u];return s}function kt(a,s,u,l){u||(u={});for(var T=-1,x=s.length;++T<x;){var Y=s[T],E=void 0;It(u,Y,E===void 0?a[Y]:E)}return u}function ra(a,s){return kt(a,Ct(a),s)}function na(a){return Un(a,Ye,Ct)}function he(a,s){var u=a.__data__;return ua(s)?u[typeof s=="string"?"string":"hash"]:u.map}function $(a,s){var u=sn(a,s);return Vn(u)?u:void 0}var Ct=Et?ve(Et,Object):ga,j=zn;(Ee&&j(new Ee(new ArrayBuffer(1)))!=le||te&&j(new te)!=M||Pe&&j(Pe.resolve())!=k||Ne&&j(new Ne)!=A||Ie&&j(new Ie)!=F)&&(j=function(a){var s=fe.call(a),u=s==P?a.constructor:void 0,l=u?L(u):void 0;if(l)switch(l){case gn:return le;case pn:return M;case wn:return k;case _n:return A;case bn:return F}return s});function aa(a){var s=a.length,u=a.constructor(s);return s&&typeof a[0]=="string"&&q.call(a,"index")&&(u.index=a.index,u.input=a.input),u}function ia(a){return typeof a.constructor=="function"&&!Rt(a)?Ln(ln(a)):{}}function sa(a,s,u,l){var T=a.constructor;switch(s){case ot:return Ce(a);case d:case f:return new T(+a);case le:return Qn(a,l);case ut:case ct:case lt:case dt:case ft:case mt:case ht:case yt:case gt:return ea(a,l);case M:return Zn(a,l,u);case v:case O:return new T(a);case ee:return Bn(a);case A:return Kn(a,l,u);case b:return Jn(a)}}function oa(a,s){return s=s??i,!!s&&(typeof a=="number"||Zr.test(a))&&a>-1&&a%1==0&&a<s}function ua(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function ca(a){return!!Ot&&Ot in a}function Rt(a){var s=a&&a.constructor,u=typeof s=="function"&&s.prototype||de;return a===u}function L(a){if(a!=null){try{return Mt.call(a)}catch{}try{return a+""}catch{}}return""}function la(a){return ke(a,!0,!0)}function Yt(a,s){return a===s||a!==a&&s!==s}function da(a){return fa(a)&&q.call(a,"callee")&&(!fn.call(a,"callee")||fe.call(a)==o)}var Re=Array.isArray;function Ht(a){return a!=null&&ha(a.length)&&!qt(a)}function fa(a){return ya(a)&&Ht(a)}var ma=hn||pa;function qt(a){var s=ye(a)?fe.call(a):"";return s==m||s==g}function ha(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}function ye(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function ya(a){return!!a&&typeof a=="object"}function Ye(a){return Ht(a)?Wn(a):$n(a)}function ga(){return[]}function pa(){return!1}e.exports=la})(De,De.exports);var Ns=De.exports;const Is=Ps(Ns),K=(e,t)=>new Date(e.getTime()-Fr(t,e));class N{constructor(t){_(this,"timeframeText");_(this,"key");_(this,"display");_(this,"timeframeLength");_(this,"allowedTiers");_(this,"defaultResponseGranularity");_(this,"dataGranularity");_(this,"isRelative");_(this,"fineGrainedDefaultGranularity");_(this,"_startCustom");_(this,"_endCustom");_(this,"_allowedGranularitiesOverride");this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom,this._allowedGranularitiesOverride=t.allowedGranularitiesOverride,this.fineGrainedDefaultGranularity=t.fineGrainedDefaultGranularity}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(t){if(this._allowedGranularitiesOverride&&t)return new Set(this._allowedGranularitiesOverride);const r=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&r.add("minutely"),n>=2&&n<=7*24&&r.add("hourly"),n>=2*24&&r.add("daily"),n>=2*24*14&&r.add("weekly"),r}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const r=Ds(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return Ar(r,t)}}class ks extends N{rawStart(t){let r=H(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(r=K(r,t)),r}maximumTimeframeLength(){return 60*60*24*7}}class Cs extends N{rawStart(t){let r=B(this.tzAdjustedDate(t));return t&&(r=K(r,t)),r}maximumTimeframeLength(){return 60*60*24*31}}class Rs extends N{rawEnd(t){let r=H(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(r=K(r,t)),r}rawStart(t){const r=this.tzAdjustedDate(t);let n=H(r.setDate(r.getDate()-7),{weekStartsOn:1});return t&&(n=K(n,t)),n}}class Ys extends N{rawEnd(t){let r=B(this.tzAdjustedDate(t));return t&&(r=K(r,t)),r}rawStart(t){let r=B(Hr(this.tzAdjustedDate(t),1));return t&&(r=K(r,t)),r}}const zr=new Map([[h.FIFTEEN_MIN,new N({key:h.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[h.ONE_HOUR,new N({key:h.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[h.SIX_HOUR,new N({key:h.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.TWELVE_HOUR,new N({key:h.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.ONE_DAY,new N({key:h.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[h.SEVEN_DAY,new N({key:h.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.THIRTY_DAY,new N({key:h.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[h.CURRENT_WEEK,new ks({key:h.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=H(new Date,{weekStartsOn:1});return(_e(Lt(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.CURRENT_MONTH,new Cs({key:h.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=B(new Date);return(_e(Lt(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[h.PREVIOUS_WEEK,new Rs({key:h.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[h.PREVIOUS_MONTH,new Ys({key:h.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=B(new Date),r=B(Hr(new Date,1));return t.getTimezoneOffset()!==r.getTimezoneOffset()&&(e=Vr(t,r)),60*60*24*zi(new Date().setMonth(new Date().getMonth()-1))+$i(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function Hs(e){const t=new Date(e.start),r=new Date(e.end),n=(r.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&Is(zr.get(e.timePeriodsKey))||new N({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:r,timeframeLength:()=>n,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function qs(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function Gs(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function Vr(e,t){return Xi(e.getTimezoneOffset()-t.getTimezoneOffset())}const As={"15M":h.FIFTEEN_MIN,"1H":h.ONE_HOUR,"6H":h.SIX_HOUR,"12H":h.TWELVE_HOUR,"24H":h.ONE_DAY,"7D":h.SEVEN_DAY,"15m":h.FIFTEEN_MIN,"1h":h.ONE_HOUR,"6h":h.SIX_HOUR,"12h":h.TWELVE_HOUR,"24h":h.ONE_DAY,"7d":h.SEVEN_DAY,"30d":h.THIRTY_DAY,current_week:h.CURRENT_WEEK,current_month:h.CURRENT_MONTH,previous_week:h.PREVIOUS_WEEK,previous_month:h.PREVIOUS_MONTH};class Se{constructor(t){_(this,"_seed");this._seed=t}next(t,r){const n=Math.sin(this._seed++)*1e4,i=n-Math.floor(n);return Math.floor(i*(r-t+1))+t}}const Fs=(e,t)=>{const r=st(10,1e4),n=new Se(r),i=Date.now()-6*60*60*1e3,o=Date.now(),c=[];let d=0;for(let m=i;m<=o;m+=60*60*1e3)if(t)for(const g in t)t[g].forEach(M=>{d+=n.next(50,500);const v={[g]:M,[e.name]:d},P={version:"1.0",timestamp:new Date(m).toISOString(),event:v};c.push(P)});else{d+=n.next(50,500);const g={version:"1.0",timestamp:new Date(m).toISOString(),event:{[e.name]:d}};c.push(g)}const f={};if(t)for(const m in t)f[m]={},t[m].forEach(g=>{f[m][g]={name:g,deleted:!1}});const y={start_ms:i,end_ms:o,start:new Date(i).toISOString(),end:new Date(o).toISOString(),query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:60*60*1e3,display:f};return{data:c,meta:y}},Ws=e=>{const t=st(10,1e4),r=new Se(t),n=Date.now()-6*60*60*1e3,i=Date.now(),o=[],c={};e.forEach(f=>{c[f.name]=0});for(let f=n;f<=i;f+=60*60*1e3){const y={};e.forEach(g=>{c[g.name]+=r.next(50,500),y[g.name]=c[g.name]});const m={version:"1.0",timestamp:new Date(f).toISOString(),event:y};o.push(m)}const d={start_ms:n,end_ms:i,start:new Date(n).toISOString(),end:new Date(i).toISOString(),query_id:"12345",metric_names:e.map(f=>f.name),metric_units:e.reduce((f,y)=>(f[y.name]=y.unit,f),{}),granularity_ms:60*60*1e3,display:{}};return{data:o,meta:d}},js=(e,t)=>{const r=Math.floor(Math.random()*9991)+10,n=new Se(r),i=Date.now()-6*60*60*1e3,o=Date.now(),c=new Date((i+o)/2).toISOString(),d=[];if(t){const m=Object.keys(t),g=Object.values(t),M=(v,P)=>{if(P===m.length){e.forEach(k=>{v[k.name]=n.next(50,500)}),d.push({version:"1.0",timestamp:new Date().toISOString(),event:{...v}});return}g[P].forEach(k=>{M({...v,[m[P]]:k},P+1)})};M({},0)}else{const m={};e.forEach(g=>{m[g.name]=n.next(50,500)}),d.push({version:"1.0",timestamp:c,event:m})}const f={};if(t)for(const m in t)f[m]={},t[m].forEach(g=>{f[m][g]={name:g,deleted:!1}});const y={start_ms:i,end_ms:o,start:new Date(i).toISOString(),end:new Date(o).toISOString(),query_id:"12345",metric_names:e.map(m=>m.name),metric_units:e.reduce((m,g)=>(m[g.name]=g.unit,m),{}),truncated:!1,limit:50,display:f,granularity_ms:o-i};return{data:d,meta:y}};function st(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}exports.DeltaQueryTime=Es;exports.Granularities=ie;exports.REFRESH_INTERVAL_MS=ba;exports.SeededRandom=Se;exports.TIMEFRAME_LOOKUP=As;exports.TimePeriods=zr;exports.Timeframe=N;exports.TimeframeKeys=h;exports.TimeseriesQueryTime=xs;exports.UnaryQueryTime=Ur;exports.aiExploreAggregations=dr;exports.aiQuerySchema=vr;exports.barChartSchema=wr;exports.basicExploreAggregations=Qe;exports.basicQuerySchema=Sr;exports.ceilToNearestTimeGrain=it;exports.dashboardConfigSchema=Ya;exports.dashboardTileTypes=ka;exports.datasourceToFilterableDimensions=Ue;exports.datePickerSelectionToTimeframe=Hs;exports.doughnutChartSchema=Tr;exports.dstOffsetHours=Vr;exports.exploreAggregations=lr;exports.exploreFilterTypesV2=Le;exports.exploreV4QuerySchema=Mr;exports.filterableAiExploreDimensions=Je;exports.filterableBasicExploreDimensions=Xe;exports.filterableExploreDimensions=Be;exports.filterableRequestDimensions=va;exports.filterableRequestMetrics=Ea;exports.filterableRequestWildcardDimensions=xa;exports.floorToNearestTimeGrain=Lr;exports.formatISOTimeWithTZ=Os;exports.formatTime=Ve;exports.formatTimeRange=Ms;exports.gaugeChartSchema=br;exports.generateCrossSectionalData=js;exports.generateMultipleMetricTimeSeriesData=Ws;exports.generateSingleMetricTimeSeriesData=Fs;exports.granularitiesToOptions=Ss;exports.granularityMsToQuery=Wr;exports.granularityValues=$e;exports.metricCardSchema=Or;exports.msToGranularity=vs;exports.queryDatasources=Na;exports.queryableAiExploreDimensions=Ke;exports.queryableBasicExploreDimensions=Oe;exports.queryableExploreDimensions=Ze;exports.queryableRequestDimensions=fr;exports.queryableRequestMetrics=hr;exports.queryableRequestWildcardDimensions=mr;exports.rand=st;exports.relativeTimeRangeValuesRequestV2=Pa;exports.relativeTimeRangeValuesV4=cr;exports.reportChartTypes=Ta;exports.requestFilterTypeEmptyV2=ur;exports.requestFilterTypeEqualsV2=Da;exports.requestFilterTypeMetricV2=Oa;exports.requestFilterTypeWildcardV2=Ma;exports.slottableSchema=pr;exports.stripUnknownFilters=Ia;exports.tileConfigSchema=Nr;exports.tileDefinitionSchema=Er;exports.tileLayoutSchema=Pr;exports.timeRangeTypeV2=Sa;exports.timeframeToDatepickerSelection=qs;exports.timeframeToDatepickerTimeperiod=Gs;exports.timeseriesChartSchema=_r;exports.topNTableSchema=Dr;exports.validDashboardQuery=xr;
2
2
  //# sourceMappingURL=vitals-utilities.cjs.map