@kong-ui-public/analytics-utilities 12.40.2 → 12.41.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.
@@ -9,7 +9,7 @@ export interface AiExploreInFilterV2 extends Omit<BasicExploreInFilterV2, 'field
9
9
  export interface AiExploreEmptyFilterV2 extends Omit<BasicExploreEmptyFilterV2, 'field'> {
10
10
  field: FilterableAiExploreDimensions;
11
11
  }
12
- export declare const aiExploreAggregations: readonly ["total_tokens", "total_tokens_per_minute", "prompt_tokens", "completion_tokens", "cached_tokens", "ai_request_count", "error_rate", "cost", "cost_per_request_average", "llm_cache_embeddings_latency_average", "llm_cache_fetch_latency_average", "llm_latency_average", "llm_embeddings_tokens", "llm_embeddings_cost", "time_to_first_token_average", "time_to_first_token_p99", "time_to_first_token_p95", "time_to_first_token_p50", "time_per_token_average", "time_per_token_p99", "time_per_token_p95", "time_per_token_p50"];
12
+ export declare const aiExploreAggregations: readonly ["ai_request_count", "active_agents", "cached_tokens", "completion_tokens", "cost", "cost_per_request_average", "error_rate", "llm_cache_embeddings_latency_average", "llm_cache_fetch_latency_average", "llm_embeddings_cost", "llm_embeddings_tokens", "llm_latency_average", "prompt_tokens", "time_per_token_average", "time_per_token_p50", "time_per_token_p95", "time_per_token_p99", "time_to_first_token_average", "time_to_first_token_p50", "time_to_first_token_p95", "time_to_first_token_p99", "total_tokens", "total_tokens_per_minute"];
13
13
  export type AiExploreAggregations = typeof aiExploreAggregations[number];
14
14
  export type AiExploreFilterAll = AiExploreInFilterV2 | AiExploreEmptyFilterV2;
15
15
  export interface AiExploreQuery extends Omit<BasicExploreQuery, 'metrics' | 'dimensions' | 'filters'> {
@@ -1 +1 @@
1
- {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../../src/types/explore/ai.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEnG,eAAO,MAAM,4BAA4B,8fA4B/B,CAAA;AAEV,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAA;AAEtF,eAAO,MAAM,6BAA6B,wgBAA+C,CAAA;AAEzF,MAAM,MAAM,6BAA6B,GAAG,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAA;AAEvF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAChF,KAAK,EAAE,6BAA6B,CAAA;CACrC;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC;IACtF,KAAK,EAAE,6BAA6B,CAAA;CACrC;AAED,eAAO,MAAM,qBAAqB,ihBAuBxB,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,sBAAsB,CAAA;AAE7E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACnG,OAAO,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAA;IAC3C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B"}
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../../src/types/explore/ai.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEnG,eAAO,MAAM,4BAA4B,8fA4B/B,CAAA;AAEV,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAA;AAEtF,eAAO,MAAM,6BAA6B,wgBAA+C,CAAA;AAEzF,MAAM,MAAM,6BAA6B,GAAG,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAA;AAEvF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAChF,KAAK,EAAE,6BAA6B,CAAA;CACrC;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC;IACtF,KAAK,EAAE,6BAA6B,CAAA;CACrC;AAED,eAAO,MAAM,qBAAqB,kiBAwBxB,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,sBAAsB,CAAA;AAE7E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;IACnG,OAAO,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAA;IAC3C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce="kapture:prepare",Ie="kapture:restore";async function yi(){const e=[];window.dispatchEvent(new CustomEvent(Ce,{detail:{waitUntil:t=>e.push(t)}})),await Promise.allSettled(e)}function gi(){window.dispatchEvent(new CustomEvent(Ie))}function An(e){let t;const n=()=>{t?.(),t=void 0},r=i=>{i.detail?.waitUntil((async()=>{t=await e()})())};return window.addEventListener(Ce,r),window.addEventListener(Ie,n),()=>{window.removeEventListener(Ce,r),window.removeEventListener(Ie,n),n()}}function _i(e,t={}){return An(async()=>{const n=e();if(!n)return;t.redraw?.();const r=new Image;return r.src=n.toDataURL("image/png"),await r.decode(),r.style.cssText=`position:absolute;top:0;left:0;width:${n.clientWidth}px;height:${n.clientHeight}px;`,n.parentElement?.appendChild(r),n.style.visibility="hidden",()=>{r.remove(),n.style.visibility=""}})}const wi=30*1e3,bi=1e3,Ti="analytics-query-provider";var d=(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.NINETY_DAY="90d",e.ONE_HUNDRED_EIGHTY_DAY="180d",e.ONE_YEAR="365d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.CURRENT_YEAR="current_year",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e.PREVIOUS_YEAR="previous_year",e))(d||{});const Di=["90d","180d","365d","current_quarter","previous_quarter","current_year","previous_year"],Si=["horizontal_bar","vertical_bar","timeseries_line","choropleth_map","timeseries_bar","donut","single_value","top_n","table","scatter"],kn=["in","not_in","selector"],Mi=["=","!="],Ei=["=","!=","<",">","<=",">="],Gn=["empty","not_empty"],Oi=["starts_with","ends_with"],vi=["absolute","relative"],Ri=["15m","1h","6h","12h","24h","7d","current_week","previous_week","30d","current_month","previous_month"],lt=["secondly","tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly","twoHourly","twelveHourly","daily","weekly","trend"],$=e=>e.filter(t=>t!=="time"),Ye=["api","api_package","api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","portal","route","status_code","status_code_grouped","time"],pe=$(Ye),dt=["active_services","error_rate","request_count","request_per_minute","response_latency_average"],Fe=[...Ye,"ai_gateway","ai_gateway_consumer","ai_gateway_consumer_group","ai_gateway_data_plane_node","application","bot_info_action","bot_info_detection_reason","bot_info_ban_type","cache_status","consumer","consumer_group","country_code","oidc_credential","upstream_status_code","upstream_status_code_grouped","response_source","data_plane_node_version","realm","portal_api","principal"],ye=$(Fe),mt=[...dt,"cache_hit_rate","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","kong_internal_latency_p99","kong_internal_latency_p95","kong_internal_latency_p50","kong_internal_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"],ft=["control_plane","control_plane_group","ai_gateway","gateway_service","consumer","ai_gateway_consumer","ai_gateway_consumer_group","application","oidc_credential","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time","realm","status_code","status_code_grouped","ai_plugin","principal","cache_status","ai_gateway_mcp_server","ai_gateway_model","ai_gateway_agent","ai_gateway_data_plane_node"],ge=$(ft),Yn=["total_tokens","total_tokens_per_minute","prompt_tokens","completion_tokens","cached_tokens","ai_request_count","error_rate","cost","cost_per_request_average","llm_cache_embeddings_latency_average","llm_cache_fetch_latency_average","llm_latency_average","llm_embeddings_tokens","llm_embeddings_cost","time_to_first_token_average","time_to_first_token_p99","time_to_first_token_p95","time_to_first_token_p50","time_per_token_average","time_per_token_p99","time_per_token_p95","time_per_token_p50"],Fn=["a2a_context_id","a2a_error","a2a_method","a2a_task_id","api","api_package","api_product","api_product_version","application","auth_type","bot_info_action","bot_info_detection_reason","bot_info_ja4_fingerprint","bot_info_ban_type","bot_info_header_names","cache_status","client_ip","consumer","ai_gateway_consumer","consumer_group","ai_gateway_consumer_group","control_plane","control_plane_group","ai_gateway","country_code","data_plane_node","data_plane_node_version","ai_gateway_data_plane_node","gateway_service","header_host","header_user_agent","http_method","mcp_error","mcp_method","mcp_session_id","mcp_tool_name","oidc_credential","portal","principal","realm","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"],ht=$(Fn),qn=["auth_type","cache_status","client_ip","data_plane_node_version","header_host","header_user_agent","http_method","oidc_credential","request_id","request_uri","response_header_content_type","response_source","service_port","service_protocol","trace_id","upstream_uri"],Un=qn,Hn=["ai_count","latencies_response_ms","latencies_upstream_ms","latencies_kong_gateway_ms","latencies_kong_internal_ms","request_body_size","response_body_size","response_header_content_length","status_code","upstream_status_code"],pt=$(Hn),Ni=["15M","1H","6H","12H","24H","7D"],ot=1e3,Ln=["platform","platform_usage"],xi=e=>Ln.includes(e),yt=[...Fe.filter(e=>e!=="consumer_group"),"a2a_context_id","a2a_error","a2a_method","a2a_task_id","a2a_task_state","ai_gateway_agent","ai_gateway_mcp_server","mcp_error","mcp_method","mcp_session_id","mcp_tool_name"],_e=$(yt),Wn=[...mt,"a2a_latency_average","a2a_response_size_sum","active_agents","mcp_latency_average","mcp_latency_p99","mcp_latency_p95","mcp_latency_p50","mcp_response_size_sum"],gt=["control_plane","data_plane_group","managed_cache","network","provider","provider_region","time"],qe=$(gt),jn=["cache_eviction_rate","cache_expiration_rate","cache_items_average","cache_memory_utilization_max"],Pi=["basic","api_usage","llm_usage","agentic_usage","platform","platform_usage","managed_cache_usage"],Vn={basic:new Set(pe),api_usage:new Set(ye),llm_usage:new Set(ge),agentic_usage:new Set(_e),platform:new Set,platform_usage:new Set,managed_cache_usage:new Set(qe)},Ci=(e,t)=>e.startsWith("goap")||e==="platform"||e==="platform_usage"?t:t.filter(n=>Vn[e].has(n.field)),_t=[{code:"AF",name:"Afghanistan"},{code:"AX",name:"Aland Islands"},{code:"AL",name:"Albania"},{code:"DZ",name:"Algeria"},{code:"AS",name:"American Samoa"},{code:"AD",name:"Andorra"},{code:"AO",name:"Angola"},{code:"AI",name:"Anguilla"},{code:"AQ",name:"Antarctica"},{code:"AG",name:"Antigua and Barbuda"},{code:"AR",name:"Argentina"},{code:"AM",name:"Armenia"},{code:"AW",name:"Aruba"},{code:"AU",name:"Australia"},{code:"AT",name:"Austria"},{code:"AZ",name:"Azerbaijan"},{code:"BS",name:"Bahamas"},{code:"BH",name:"Bahrain"},{code:"BD",name:"Bangladesh"},{code:"BB",name:"Barbados"},{code:"BY",name:"Belarus"},{code:"BE",name:"Belgium"},{code:"BZ",name:"Belize"},{code:"BJ",name:"Benin"},{code:"BM",name:"Bermuda"},{code:"BT",name:"Bhutan"},{code:"BO",name:"Bolivia"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BW",name:"Botswana"},{code:"BV",name:"Bouvet Island"},{code:"BR",name:"Brazil"},{code:"IO",name:"British Indian Ocean Territory"},{code:"BN",name:"Brunei Darussalam"},{code:"BG",name:"Bulgaria"},{code:"BF",name:"Burkina Faso"},{code:"BI",name:"Burundi"},{code:"KH",name:"Cambodia"},{code:"CM",name:"Cameroon"},{code:"CA",name:"Canada"},{code:"CV",name:"Cape Verde"},{code:"KY",name:"Cayman Islands"},{code:"CF",name:"Central African Republic"},{code:"TD",name:"Chad"},{code:"CL",name:"Chile"},{code:"CN",name:"China"},{code:"CX",name:"Christmas Island"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CO",name:"Colombia"},{code:"KM",name:"Comoros"},{code:"CG",name:"Congo"},{code:"CD",name:"Democratic Republic of the Congo"},{code:"CK",name:"Cook Islands"},{code:"CR",name:"Costa Rica"},{code:"CI",name:"Cote d'Ivoire"},{code:"HR",name:"Croatia"},{code:"CU",name:"Cuba"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czech Republic"},{code:"DK",name:"Denmark"},{code:"DJ",name:"Djibouti"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"EC",name:"Ecuador"},{code:"EG",name:"Egypt"},{code:"SV",name:"El Salvador"},{code:"GQ",name:"Equatorial Guinea"},{code:"ER",name:"Eritrea"},{code:"EE",name:"Estonia"},{code:"ET",name:"Ethiopia"},{code:"FK",name:"Falkland Islands (Malvinas)"},{code:"FO",name:"Faroe Islands"},{code:"FJ",name:"Fiji"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"GF",name:"French Guiana"},{code:"PF",name:"French Polynesia"},{code:"TF",name:"French Southern Territories"},{code:"GA",name:"Gabon"},{code:"GM",name:"Gambia"},{code:"GE",name:"Georgia"},{code:"DE",name:"Germany"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GR",name:"Greece"},{code:"GL",name:"Greenland"},{code:"GD",name:"Grenada"},{code:"GP",name:"Guadeloupe"},{code:"GU",name:"Guam"},{code:"GT",name:"Guatemala"},{code:"GG",name:"Guernsey"},{code:"GN",name:"Guinea"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HT",name:"Haiti"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"VA",name:"The Vatican"},{code:"HN",name:"Honduras"},{code:"HK",name:"Hong Kong"},{code:"HU",name:"Hungary"},{code:"IS",name:"Iceland"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IR",name:"Iran"},{code:"IQ",name:"Iraq"},{code:"IE",name:"Ireland"},{code:"IM",name:"Isle of Man"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JM",name:"Jamaica"},{code:"JP",name:"Japan"},{code:"JE",name:"Jersey"},{code:"JO",name:"Jordan"},{code:"KZ",name:"Kazakhstan"},{code:"KE",name:"Kenya"},{code:"KI",name:"Kiribati"},{code:"KP",name:"North Korea"},{code:"KR",name:"South Korea"},{code:"KW",name:"Kuwait"},{code:"KG",name:"Kyrgyzstan"},{code:"LA",name:"Laos"},{code:"LV",name:"Latvia"},{code:"LB",name:"Lebanon"},{code:"LS",name:"Lesotho"},{code:"LR",name:"Liberia"},{code:"LY",name:"Libya"},{code:"LI",name:"Liechtenstein"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MO",name:"Macao"},{code:"MK",name:"Macedonia"},{code:"MG",name:"Madagascar"},{code:"MW",name:"Malawi"},{code:"MY",name:"Malaysia"},{code:"MV",name:"Maldives"},{code:"ML",name:"Mali"},{code:"MT",name:"Malta"},{code:"MH",name:"Marshall Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MU",name:"Mauritius"},{code:"YT",name:"Mayotte"},{code:"MX",name:"Mexico"},{code:"FM",name:"Micronesia, "},{code:"MD",name:"Moldova,"},{code:"MC",name:"Monaco"},{code:"MN",name:"Mongolia"},{code:"ME",name:"Montenegro"},{code:"MS",name:"Montserrat"},{code:"MA",name:"Morocco"},{code:"MZ",name:"Mozambique"},{code:"MM",name:"Myanmar"},{code:"NA",name:"Namibia"},{code:"NR",name:"Nauru"},{code:"NP",name:"Nepal"},{code:"NL",name:"Netherlands"},{code:"NC",name:"New Caledonia"},{code:"NZ",name:"New Zealand"},{code:"NI",name:"Nicaragua"},{code:"NE",name:"Niger"},{code:"NG",name:"Nigeria"},{code:"NU",name:"Niue"},{code:"NF",name:"Norfolk Island"},{code:"MP",name:"Northern Mariana Islands"},{code:"NO",name:"Norway"},{code:"OM",name:"Oman"},{code:"PK",name:"Pakistan"},{code:"PW",name:"Palau"},{code:"PA",name:"Panama"},{code:"PG",name:"Papua New Guinea"},{code:"PY",name:"Paraguay"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippines"},{code:"PN",name:"Pitcairn"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"PR",name:"Puerto Rico"},{code:"QA",name:"Qatar"},{code:"RE",name:"Reunion"},{code:"RO",name:"Romania"},{code:"RU",name:"Russia"},{code:"RW",name:"Rwanda"},{code:"BL",name:"Saint Barthelemy"},{code:"SH",name:"Saint Helena"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"LC",name:"Saint Lucia"},{code:"MF",name:"Saint Martin"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"WS",name:"Samoa"},{code:"SM",name:"San Marino"},{code:"ST",name:"Sao Tome and Principe"},{code:"SA",name:"Saudi Arabia"},{code:"SN",name:"Senegal"},{code:"RS",name:"Serbia"},{code:"SC",name:"Seychelles"},{code:"SL",name:"Sierra Leone"},{code:"SG",name:"Singapore"},{code:"SX",name:"Sint Maarten"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"SB",name:"Solomon Islands"},{code:"SO",name:"Somalia"},{code:"ZA",name:"South Africa"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"SS",name:"South Sudan"},{code:"ES",name:"Spain"},{code:"LK",name:"Sri Lanka"},{code:"SD",name:"Sudan"},{code:"SR",name:"Suriname"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SZ",name:"Swaziland"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"SY",name:"Syria"},{code:"TW",name:"Taiwan"},{code:"TJ",name:"Tajikistan"},{code:"TZ",name:"Tanzania"},{code:"TH",name:"Thailand"},{code:"TL",name:"Timor-Leste"},{code:"TG",name:"Togo"},{code:"TK",name:"Tokelau"},{code:"TO",name:"Tonga"},{code:"TT",name:"Trinidad and Tobago"},{code:"TN",name:"Tunisia"},{code:"TR",name:"Turkey"},{code:"TM",name:"Turkmenistan"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TV",name:"Tuvalu"},{code:"UG",name:"Uganda"},{code:"UA",name:"Ukraine"},{code:"AE",name:"United Arab Emirates"},{code:"GB",name:"United Kingdom"},{code:"US",name:"United States"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VU",name:"Vanuatu"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Vietnam"},{code:"VG",name:"British Virgin Islands"},{code:"VI",name:"U.S. Virgin Islands"},{code:"WF",name:"Wallis and Futuna"},{code:"EH",name:"Western Sahara"},{code:"YE",name:"Yemen"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],Ii=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","scatter","golden_signals","top_n","table","slottable","single_value","choropleth_map"],ie={type:"string"},k={type:"string"},wt={type:"boolean"},bt={type:"string",description:"Text rendered in the tile header. Supports the {timeframe} token, "},Ai={type:"object",additionalProperties:{type:"string"}},Tt={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},$n={type:"object",deprecated:!0,description:"Deprecated: use the top-level tile shape { type: 'slottable', id, layout } instead of a chart-level 'slottable' definition.",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string"}},required:["type","id"],additionalProperties:!1},zn={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Qn={type:"object",properties:{type:{type:"string",enum:["warning","error","neutral"]},value:{type:"number"},label:{type:"string"},highlightIntersections:{type:"boolean",default:!1}},required:["type","value"],additionalProperties:!1},Bn={type:"object",properties:{type:{type:"string",enum:["timeseries_line","timeseries_bar"]},stacked:{type:"boolean"},threshold:{type:"object",additionalProperties:{type:"array",items:Qn}},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Xn={type:"object",properties:{percentile:{type:"number",minimum:0,maximum:100},label:{type:"string",description:"Overrides the default label."},border_dash:{type:"array",description:"Dash pattern for the line.",items:{type:"number"}},color:{type:"string"}},required:["percentile"],additionalProperties:!1},Dt={type:"object",description:"Plots one point per record, percentiles are computed from the records returned.",properties:{type:{type:"string",enum:["scatter"]},percentile_lines:{type:"array",description:"Reference lines derived from the plotted values.",items:Xn},outlier_percentile:{type:"number",description:"Percentile above which points are colored in the outlier color, in place.",minimum:0,maximum:100},shade_outlier_region:{type:"boolean",default:!1},jitter_ms:{type:"number",description:"Maximum horizontal jitter so records sharing a timestamp do not stack into one column.",minimum:0},point_radius:{type:"number",minimum:0},point_opacity:{type:"number",description:"Opacity of plotted points.",minimum:0,maximum:1},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Zn={type:"object",properties:{type:{type:"string",enum:["gauge"]},metric_display:{type:"string",enum:["hidden","single","full"]},reverse_dataset:{type:"boolean"},numerator:{type:"number"},synthetics_data_key:ie,chart_title:k},required:["type"],additionalProperties:!1},Kn={type:"object",properties:{type:{type:"string",enum:["donut"]},synthetics_data_key:ie,chart_title:k},required:["type"],additionalProperties:!1},Jn={type:"object",properties:{chart_title:k,synthetics_data_key:ie,type:{type:"string",enum:["top_n"]},description:{type:"string",deprecated:!0,description:"Deprecated: use `header_description` on the tile definition."},entity_link:{type:"string"},entity_links:Ai},required:["type"],additionalProperties:!1},er={type:"object",properties:{type:{type:"string",enum:["table"]},chart_title:k},required:["type"],additionalProperties:!1},tr={type:"object",properties:{chart_title:k,type:{type:"string",enum:["golden_signals"]},long_card_titles:{type:"boolean"},percentile_latency:{type:"boolean"}},required:["type"],additionalProperties:!1},nr={type:"object",properties:{type:{type:"string",enum:["single_value"]},decimal_points:{type:"number"},align_x:{type:"string",enum:["left","center","right"]},chart_title:k},required:["type"],additionalProperties:!1},rr={type:"object",properties:{type:{type:"string",enum:["choropleth_map"]},chart_title:k,fit_to_country:{type:"string",enum:_t.map(e=>e.code)},legend:{type:"boolean",default:!1},bounds:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:2,maxItems:2,items:[{type:"number",minimum:-180,maximum:180},{type:"number",minimum:-90,maximum:90}]}}},required:["type"],additionalProperties:!1},ki={type:"object",properties:{tz:{type:"string",default:"Etc/UTC"},type:{type:"string",enum:["relative"]},time_range:{type:"string"}},required:["type","time_range"],additionalProperties:!1},Gi={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},z={granularity:{type:"string",description:'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',enum:lt},time_range:{type:"object",description:"The time range to query.",anyOf:[ki,Gi],default:{type:"relative",time_range:"1h"}},limit:{type:"number"},meta:{type:"object"}},oe=e=>({type:"array",description:"List of aggregated metrics to collect across the requested time span.",items:{type:"string",...e?{enum:e}:{}}}),se=e=>({type:"array",description:"List of attributes or entity types to group by.",minItems:0,maxItems:3,items:{type:"string",...e?{enum:e}:{}}}),Q=e=>({type:"array",description:"A list of filters to apply to the query",items:{oneOf:[{type:"object",description:"In filter",properties:{field:{type:"string",...e?{enum:e}:{}},operator:{type:"string",enum:kn},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string",...e?{enum:e}:{}},operator:{type:"string",enum:Gn}},required:["field","operator"],additionalProperties:!1}]}}),ar=["control_plane","gateway_service","realm","route","plugin","plugin_name","plugin_scope","data_plane_node_version","env","team","region","hostname"],ir=()=>({type:"array",description:"A list of filters to apply to the platform query",items:{oneOf:[{type:"object",description:"In filter",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string"},operator:{type:"string"}},required:["field","operator"],additionalProperties:!1}]}}),or={type:"object",description:"A query to launch at the advanced explore API",properties:{datasource:{type:"string",enum:["api_usage"]},metrics:oe(mt),dimensions:se(Fe),filters:Q(ye),...z},required:["datasource"],additionalProperties:!1},sr={type:"object",description:"A query to launch at the basic explore API",properties:{datasource:{type:"string",enum:["basic"]},metrics:oe(dt),dimensions:se(Ye),filters:Q(pe),...z},required:["datasource"],additionalProperties:!1},cr={type:"object",description:"A query to launch at the AI explore API",properties:{datasource:{type:"string",enum:["llm_usage"]},metrics:oe(Yn),dimensions:se(ft),filters:Q(ge),...z},required:["datasource"],additionalProperties:!1},ur={type:"object",description:"A query to launch at the Agentic explore API",properties:{datasource:{type:"string",enum:["agentic_usage"]},metrics:oe(Wn),dimensions:se(yt),filters:Q(_e),...z},required:["datasource"],additionalProperties:!1},lr={type:"object",description:"A query to launch at the Managed Cache explore API",properties:{datasource:{type:"string",enum:["managed_cache_usage"]},metrics:oe(jn),dimensions:se(gt),filters:Q(qe),...z},required:["datasource"],additionalProperties:!1},dr={oneOf:[{const:"platform_usage"},{const:"platform",deprecated:!0,description:"Deprecated: use 'platform_usage'."}]},mr={type:"object",description:"A query to launch at the platform dashboard API. Use datasource 'platform_usage'; 'platform' is accepted for backward compatibility but deprecated.",properties:{datasource:dr,metrics:oe(),dimensions:se(),filters:ir(),...z},required:["datasource"],additionalProperties:!1},fr={type:"object",description:"A query to launch at the platform tabular explore API. Use datasource 'platform_usage'; 'platform' is accepted for backward compatibility but deprecated.",properties:{datasource:dr,entity:{type:"string"},columns:{type:"array",minItems:1,items:{type:"string"}},filters:ir(),cursor:{type:"string"},page_size:{type:"number"}},required:["datasource"],additionalProperties:!1},hr={type:"object",properties:{field:{type:"string",description:"Field to read, dotted for a nested one."},label:{type:"string",description:"Tooltip label, defaults to the field name."},unit:{type:"string",description:"Unit to format the value with, e.g. `ms` or `token count`."}},required:["field"],additionalProperties:!1},pr={type:"object",description:"A query for the api-requests endpoint.",properties:{datasource:{type:"string",enum:["requests"]},metric:{type:"string",description:"Field plotted on the y axis."},dimension:{type:"string",description:"Field used to split points into series."},filters:Q(Array.from(new Set([...ht,...Un,...pt]))),time_range:z.time_range,max_records:{type:"number",description:"Ceiling on records gathered across pages. The endpoint serves at most 1000 per page. Defaults to 10000.",minimum:1},unroll:{type:"string",description:"A nested collection on a request record (`ai`, `mcp_info.rpc`) to expand into one point per entry rather than one per request."},extra_fields:{type:"array",description:"Values to annotate each point with in the tooltip. Read from the unrolled entry first, then the request record.",items:hr}},required:["datasource","metric"],additionalProperties:!1},yr=[or,sr,cr,ur,lr,mr],gr={anyOf:yr},_r=[fr],wr={anyOf:_r},Yi={anyOf:[...yr,..._r]},Fi={anyOf:[zn,Zn,Kn,Bn,Dt,tr,Jn,$n,nr,rr]},qi={type:"object",properties:{query:gr,chart:Fi,header_description:bt},required:["query","chart"],additionalProperties:!1},Ui={type:"object",properties:{query:wr,chart:er,header_description:bt},required:["query","chart"],additionalProperties:!1},Hi={type:"object",properties:{query:pr,chart:Dt,header_description:bt},required:["query","chart"],additionalProperties:!1},br={anyOf:[qi,Ui,Hi]},St={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"},fit_to_content:{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},Tr={type:"object",properties:{type:{type:"string",enum:["chart"]},definition:br,layout:St,id:{type:"string",description:"Unique identifier for the tile. If not provided, one will be generated."}},required:["type","definition","layout"],additionalProperties:!1},Dr={type:"object",description:"A tile that renders arbitrary content into a named slot instead of a chart. The slot name is the tile `id`.",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string",description:"Unique identifier for the tile, and the name of the slot the host application should supply."},layout:St},required:["type","id","layout"],additionalProperties:!1},Sr={anyOf:[Tr,Dr]},Li={type:"object",properties:{tiles:{type:"array",items:Sr},tile_height:{type:"number",description:"Height of each tile in pixels."},columns:{type:"number",description:"Number of columns in the dashboard grid."},preset_filters:Q([...new Set([...ye,...pe,...ge,..._e,...ar,...qe])]),template_id:{type:["string","null"],description:"Template id which was used to instantiate this dashboard."}},required:["tiles"],additionalProperties:!1},Wi=e=>{const t=[];return pe.includes(e)&&t.push("basic"),ye.includes(e)&&t.push("api_usage"),ge.includes(e)&&t.push("llm_usage"),_e.includes(e)&&t.push("agentic_usage"),(ht.includes(e)||pt.includes(e))&&t.push("requests"),t},ji={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"}},Vi=(e,t,n)=>{let r;const i=ji[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function et(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zi={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qi={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bi={date:et({formats:$i,defaultWidth:"full"}),time:et({formats:zi,defaultWidth:"full"}),dateTime:et({formats:Qi,defaultWidth:"full"})},Xi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Zi=(e,t,n,r)=>Xi[e];function le(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,l=n?.width?String(n.width):c;i=e.formattingValues[l]||e.formattingValues[c]}else{const c=e.defaultWidth,l=n?.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[c]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Ki={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ji={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eo={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"]},to={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"]},no={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"}},ro={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"}},ao=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},io={ordinalNumber:ao,era:le({values:Ki,defaultWidth:"wide"}),quarter:le({values:Ji,defaultWidth:"wide",argumentCallback:e=>e-1}),month:le({values:eo,defaultWidth:"wide"}),day:le({values:to,defaultWidth:"wide"}),dayPeriod:le({values:no,defaultWidth:"wide",formattingValues:ro,defaultFormattingWidth:"wide"})};function de(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const c=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(l)?so(l,h=>h.test(c)):oo(l,h=>h.test(c));let y;y=e.valueCallback?e.valueCallback(f):f,y=n.valueCallback?n.valueCallback(y):y;const g=t.slice(c.length);return{value:y,rest:g}}}function oo(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function so(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function co(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;const l=t.slice(i.length);return{value:c,rest:l}}}const uo=/^(\d+)(th|st|nd|rd)?/i,lo=/\d+/i,mo={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},fo={any:[/^b/i,/^(a|c)/i]},ho={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},po={any:[/1/i,/2/i,/3/i,/4/i]},yo={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},go={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]},_o={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},wo={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]},bo={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},To={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}},Do={ordinalNumber:co({matchPattern:uo,parsePattern:lo,valueCallback:e=>parseInt(e,10)}),era:de({matchPatterns:mo,defaultMatchWidth:"wide",parsePatterns:fo,defaultParseWidth:"any"}),quarter:de({matchPatterns:ho,defaultMatchWidth:"wide",parsePatterns:po,defaultParseWidth:"any",valueCallback:e=>e+1}),month:de({matchPatterns:yo,defaultMatchWidth:"wide",parsePatterns:go,defaultParseWidth:"any"}),day:de({matchPatterns:_o,defaultMatchWidth:"wide",parsePatterns:wo,defaultParseWidth:"any"}),dayPeriod:de({matchPatterns:bo,defaultMatchWidth:"any",parsePatterns:To,defaultParseWidth:"any"})},So={code:"en-US",formatDistance:Vi,formatLong:Bi,formatRelative:Zi,localize:io,match:Do,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Mo={};function we(){return Mo}const Mr=6048e5,Eo=864e5,Oo=60,vo=3600,un=Symbol.for("constructDateFrom");function P(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&un in e?e[un](t):e instanceof Date?new e.constructor(t):new Date(t)}function S(e,t){return P(t||e,e)}function ln(e){const t=S(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ro(e,...t){const n=P.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ne(e,t){const n=S(e,t?.in);return n.setHours(0,0,0,0),n}function No(e,t,n){const[r,i]=Ro(n?.in,e,t),o=ne(r),c=ne(i),l=+o-ln(o),f=+c-ln(c);return Math.round((l-f)/Eo)}function xo(e,t){const n=S(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Po(e,t){const n=S(e,t?.in);return No(n,xo(n))+1}function q(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=S(e,t?.in),o=i.getDay(),c=(o<r?7:0)+o-r;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function Ae(e,t){return q(e,{...t,weekStartsOn:1})}function Er(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=P(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Ae(i),c=P(n,0);c.setFullYear(r,0,4),c.setHours(0,0,0,0);const l=Ae(c);return n.getTime()>=o.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Co(e,t){const n=Er(e,t),r=P(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ae(r)}function Io(e,t){const n=S(e,t?.in),r=+Ae(n)-+Co(n);return Math.round(r/Mr)+1}function Or(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=we(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=P(t?.in||e,0);c.setFullYear(r+1,0,o),c.setHours(0,0,0,0);const l=q(c,t),f=P(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const y=q(f,t);return+n>=+l?r+1:+n>=+y?r:r-1}function Ao(e,t){const n=we(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Or(e,t),o=P(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),q(o,t)}function ko(e,t){const n=S(e,t?.in),r=+q(n,t)-+Ao(n,t);return Math.round(r/Mr)+1}function b(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const H={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return b(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):b(n+1,2)},d(e,t){return b(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return b(e.getHours()%12||12,t.length)},H(e,t){return b(e.getHours(),t.length)},m(e,t){return b(e.getMinutes(),t.length)},s(e,t){return b(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return b(i,t.length)}},J={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dn={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return H.y(e,t)},Y:function(e,t,n,r){const i=Or(e,r),o=i>0?i:1-i;if(t==="YY"){const c=o%100;return b(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):b(o,t.length)},R:function(e,t){const n=Er(e);return b(n,t.length)},u:function(e,t){const n=e.getFullYear();return b(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return b(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return b(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return H.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return b(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=ko(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):b(i,t.length)},I:function(e,t,n){const r=Io(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):b(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):H.d(e,t)},D:function(e,t,n){const r=Po(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):b(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return b(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return b(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return b(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=J.noon:r===0?i=J.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=J.evening:r>=12?i=J.afternoon:r>=4?i=J.morning:i=J.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return H.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):H.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):b(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):b(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):H.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):H.s(e,t)},S:function(e,t){return H.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return fn(r);case"XXXX":case"XX":return V(r);default:return V(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return fn(r);case"xxxx":case"xx":return V(r);default:return V(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mn(r,":");default:return"GMT"+V(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mn(r,":");default:return"GMT"+V(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return b(r,t.length)},T:function(e,t,n){return b(+e,t.length)}};function mn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+b(o,2)}function fn(e,t){return e%60===0?(e>0?"-":"+")+b(Math.abs(e)/60,2):V(e,t)}function V(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=b(Math.trunc(r/60),2),o=b(r%60,2);return n+i+t+o}const hn=(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"});default:return t.date({width:"full"})}},vr=(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"});default:return t.time({width:"full"})}},Go=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hn(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",hn(r,t)).replace("{{time}}",vr(i,t))},Yo={p:vr,P:Go},Fo=/^D+$/,qo=/^Y+$/,Uo=["D","DD","YY","YYYY"];function Ho(e){return Fo.test(e)}function Lo(e){return qo.test(e)}function Wo(e,t,n){const r=jo(e,t,n);if(console.warn(r),Uo.includes(e))throw new RangeError(r)}function jo(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Vo(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $o(e){return!(!Vo(e)&&typeof e!="number"||isNaN(+S(e)))}const zo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bo=/^'([^]*?)'?$/,Xo=/''/g,Zo=/[a-zA-Z]/;function Ko(e,t,n){const r=we(),i=n?.locale??r.locale??So,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=S(e,n?.in);if(!$o(l))throw new RangeError("Invalid time value");let f=t.match(Qo).map(g=>{const h=g[0];if(h==="p"||h==="P"){const _=Yo[h];return _(g,i.formatLong)}return g}).join("").match(zo).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:Jo(g)};if(dn[h])return{isToken:!0,value:g};if(h.match(Zo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(f=i.localize.preprocessor(l,f));const y={firstWeekContainsDate:o,weekStartsOn:c,locale:i};return f.map(g=>{if(!g.isToken)return g.value;const h=g.value;(!n?.useAdditionalWeekYearTokens&&Lo(h)||!n?.useAdditionalDayOfYearTokens&&Ho(h))&&Wo(h,t,String(e));const _=dn[h[0]];return _(l,h,i.localize,y)}).join("")}function Jo(e){const t=e.match(Bo);return t?t[1].replace(Xo,"'"):e}function Re(e,t,n){const r=S(e,n?.in);return isNaN(t)?P(e,NaN):(r.setDate(r.getDate()+t),r)}function Rr(e,t,n){const r=S(e,n?.in);if(isNaN(t))return P(e,NaN);if(!t)return r;const i=r.getDate(),o=P(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const c=o.getDate();return i>=c?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function es(e,t,n){return Rr(e,t*3,n)}function re(e,t){const n=S(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function ae(e,t){const n=S(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function ts(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=P(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function ns(){return Object.assign({},we())}function pn(e){return+S(e)}function yn(e){return Math.trunc(+S(e)/1e3)}function gn(e){return Math.trunc(e*vo)}function rs(e){const t=e/Oo;return Math.trunc(t)}function Nr(e,t,n){return Rr(e,-1,n)}function xr(e,t,n){return es(e,-1,n)}function _n(e,t,n){const r=ns(),i=os(e,n.timeZone,n.locale??r.locale);return"formatToParts"in i?as(i,t):is(i,t)}function as(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function is(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function os(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function ss(e,t){const n=ms(t);return"formatToParts"in n?us(n,e):ls(n,e)}const cs={year:0,month:1,day:2,hour:3,minute:4,second:5};function us(e,t){try{const n=e.formatToParts(t),r=[];for(let i=0;i<n.length;i++){const o=cs[n[i].type];o!==void 0&&(r[o]=parseInt(n[i].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function ls(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const tt={},wn=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")),ds=wn==="06/25/2014, 00:00:00"||wn==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function ms(e){return tt[e]||(tt[e]=ds?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"})),tt[e]}function Mt(e,t,n,r,i,o,c){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,i,o,c),l}const bn=36e5,fs=6e4,nt={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function be(e,t,n){if(!e)return 0;let r=nt.timezoneZ.exec(e);if(r)return 0;let i,o;if(r=nt.timezoneHH.exec(e),r)return i=parseInt(r[1],10),Tn(i)?-(i*bn):NaN;if(r=nt.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);const c=parseInt(r[3],10);return Tn(i,c)?(o=Math.abs(i)*bn+c*fs,r[1]==="+"?-o:o):NaN}if(ys(e)){t=new Date(t||Date.now());const c=n?t:hs(t),l=st(c,e);return-(n?l:ps(t,l,e))}return NaN}function hs(e){return Mt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function st(e,t){const n=ss(e,t),r=Mt(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const o=i%1e3;return i-=o>=0?o:1e3+o,r-i}function ps(e,t,n){let i=e.getTime()-t;const o=st(new Date(i),n);if(t===o)return t;i-=o-t;const c=st(new Date(i),n);return o===c?o:Math.max(o,c)}function Tn(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Dn={};function ys(e){if(Dn[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Dn[e]=!0,!0}catch{return!1}}const gs=60*1e3,_s={X:function(e,t,n){const r=rt(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return Sn(r);case"XXXX":case"XX":return te(r);default:return te(r,":")}},x:function(e,t,n){const r=rt(n.timeZone,e);switch(t){case"x":return Sn(r);case"xxxx":case"xx":return te(r);default:return te(r,":")}},O:function(e,t,n){const r=rt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+ws(r,":");default:return"GMT"+te(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return _n("short",e,n);default:return _n("long",e,n)}}};function rt(e,t){const n=e?be(e,t,!0)/gs:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ke(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function te(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ke(Math.floor(r/60),2),o=ke(Math.floor(r%60),2);return n+i+t+o}function Sn(e,t){return e%60===0?(e>0?"-":"+")+ke(Math.abs(e)/60,2):te(e,t)}function ws(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+ke(o,2)}function Mn(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 Pr=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,at=36e5,En=6e4,bs=2,E={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,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:Pr};function Ge(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 n=t.additionalDigits==null?bs:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==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 r=Ts(e),{year:i,restDateString:o}=Ds(r.date,n),c=Ss(o,i);if(c===null||isNaN(c.getTime()))return new Date(NaN);if(c){const l=c.getTime();let f=0,y;if(r.time&&(f=Ms(r.time),f===null||isNaN(f)))return new Date(NaN);if(r.timeZone||t.timeZone){if(y=be(r.timeZone||t.timeZone,new Date(l+f)),isNaN(y))return new Date(NaN)}else y=Mn(new Date(l+f)),y=Mn(new Date(l+f+y));return new Date(l+f+y)}else return new Date(NaN)}function Ts(e){const t={};let n=E.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=E.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const i=E.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function Ds(e,t){if(e){const n=E.YYY[t],r=E.YYYYY[t];let i=E.YYYY.exec(e)||r.exec(e);if(i){const o=i[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(i=E.YY.exec(e)||n.exec(e),i){const o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function Ss(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let o=E.MM.exec(e);if(o)return n=new Date(0),r=parseInt(o[1],10)-1,vn(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(o=E.DDD.exec(e),o){n=new Date(0);const c=parseInt(o[1],10);return vs(t,c)?(n.setUTCFullYear(t,0,c),n):new Date(NaN)}if(o=E.MMDD.exec(e),o){n=new Date(0),r=parseInt(o[1],10)-1;const c=parseInt(o[2],10);return vn(t,r,c)?(n.setUTCFullYear(t,r,c),n):new Date(NaN)}if(o=E.Www.exec(e),o)return i=parseInt(o[1],10)-1,Rn(i)?On(t,i):new Date(NaN);if(o=E.WwwD.exec(e),o){i=parseInt(o[1],10)-1;const c=parseInt(o[2],10)-1;return Rn(i,c)?On(t,i,c):new Date(NaN)}return null}function Ms(e){let t,n,r=E.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),it(t)?t%24*at:NaN;if(r=E.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),it(t,n)?t%24*at+n*En:NaN;if(r=E.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const i=parseFloat(r[3].replace(",","."));return it(t,n,i)?t%24*at+n*En+i*1e3:NaN}return null}function On(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const Es=[31,28,31,30,31,30,31,31,30,31,30,31],Os=[31,29,31,30,31,30,31,31,30,31,30,31];function Cr(e){return e%400===0||e%4===0&&e%100!==0}function vn(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Cr(e);if(r&&n>Os[t]||!r&&n>Es[t])return!1}return!0}function vs(e,t){if(t<1)return!1;const n=Cr(e);return!(n&&t>366||!n&&t>365)}function Rn(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function it(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}const Rs=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Ns(e,t,n={}){t=String(t);const r=t.match(Rs);if(r){const i=Ge(n.originalDate||e,n);t=r.reduce(function(o,c){if(c[0]==="'")return o;const l=o.indexOf(c),f=o[l-1]==="'",y=o.replace(c,"'"+_s[c[0]](i,c,n)+"'");return f?y.substring(0,l-1)+y.substring(l+1):y},t)}return Ko(e,t,n)}function Ir(e,t,n){e=Ge(e,n);const r=be(t,e,!0),i=new Date(e.getTime()-r),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 Ar(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Ns(Ir(e,t,{timeZone:r.timeZone}),n,r)}function xs(e,t,n){if(typeof e=="string"&&!e.match(Pr))return Ge(e,{...n,timeZone:t});e=Ge(e,n);const r=Mt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=be(t,new Date(r));return new Date(r+i)}function kr(e,t){return-be(e,t)}function Ps(e,t={}){const n=t?.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;let r="MMM dd, yyy hh:mm a";switch(t.format){case"short":r="MMM dd, yyyy";break;case"default":r="MMM dd, yyyy hh:mm a";break;case"full":r="MMM dd, yyyy hh:mm:ss.SSS a";break}return t.includeTZ&&(r+=" (z)"),Ar(e,n,r)}function ct(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, yyy hh:mm a";t.short&&(r="MMM dd, yyy"),t.includeTZ&&(r+=" (z)");const i=new Date(e);return Ar(i,n,r)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function Cs(e,t){return`${ct(e.getTime())} - ${ct(t.getTime(),{includeTZ:!0})}`}const he={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:300*1e3,tenMinutely:600*1e3,thirtyMinutely:1800*1e3,hourly:3600*1e3,twoHourly:7200*1e3,twelveHourly:720*60*1e3,daily:3600*24*1e3,weekly:3600*24*7*1e3,trend:0};function Is(e,t){return e.map(n=>({value:n,label:t.t(`configuration.vitals.reports.granularity.${n}`)}))}function Gr(e,t){return{duration:e,type:"duration",origin:t}}function As(e){return e&&lt.find(n=>e<=he[n])||null}function Yr(e,t,n,r){const i=he[n];let o=0;return i>=he.daily&&(r?o=-kr(r,t):o=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-o)/i)*i+o)}function Fr(e,t,n){return Yr(Math.floor,e,t,n)}function Et(e,t,n){return Yr(Math.ceil,e,t,n)}class Ue{timeframe;tz;dataGranularity;constructor(t,n,r){if(this.constructor===Ue)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=n,this.dataGranularity=r??t.dataGranularity}calculateStartDate(t,n,r=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*r);{const i=this.endDate(),o=this.timeframe.rawStart(this.tz),c=Fr(o,n,this.tz),f=(i.getTime()-c.getTime())*(r-1);return new Date(c.getTime()-f)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return Gr(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return yn(this.startDate())}endSeconds(){return yn(this.endDate())}startMs(){return pn(this.startDate())}endMs(){return pn(this.endDate())}}class ks extends Ue{granularity;constructor(t,n,r,i,o){super(t,r,i),n&&t.allowedGranularities(o).has(n)?this.granularity=n:o?this.granularity=t.fineGrainedDefaultGranularity??t.defaultResponseGranularity:this.granularity=t.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return Et(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return he[this.granularity]}}class qr extends Ue{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return Et(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class Gs extends qr{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var me={exports:{}};me.exports;var Nn;function Fs(){return Nn||(Nn=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",y="[object Error]",g="[object Function]",h="[object GeneratorFunction]",_="[object Map]",I="[object Number]",p="[object Object]",w="[object Promise]",O="[object RegExp]",N="[object Set]",x="[object String]",A="[object Symbol]",Le="[object WeakMap]",vt="[object ArrayBuffer]",Te="[object DataView]",Rt="[object Float32Array]",Nt="[object Float64Array]",xt="[object Int8Array]",Pt="[object Int16Array]",Ct="[object Int32Array]",It="[object Uint8Array]",At="[object Uint8ClampedArray]",kt="[object Uint16Array]",Gt="[object Uint32Array]",$r=/[\\^$.*+?()[\]{}|]/g,zr=/\w*$/,Qr=/^\[object .+?Constructor\]$/,Br=/^(?:0|[1-9]\d*)$/,T={};T[o]=T[c]=T[vt]=T[Te]=T[l]=T[f]=T[Rt]=T[Nt]=T[xt]=T[Pt]=T[Ct]=T[_]=T[I]=T[p]=T[O]=T[N]=T[x]=T[A]=T[It]=T[At]=T[kt]=T[Gt]=!0,T[y]=T[g]=T[Le]=!1;var Xr=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne,Zr=typeof self=="object"&&self&&self.Object===Object&&self,G=Xr||Zr||Function("return this")(),Yt=t&&!t.nodeType&&t,Ft=Yt&&!0&&e&&!e.nodeType&&e,Kr=Ft&&Ft.exports===Yt;function Jr(a,s){return a.set(s[0],s[1]),a}function ea(a,s){return a.add(s),a}function ta(a,s){for(var u=-1,m=a?a.length:0;++u<m&&s(a[u],u,a)!==!1;);return a}function na(a,s){for(var u=-1,m=s.length,M=a.length;++u<m;)a[M+u]=s[u];return a}function qt(a,s,u,m){for(var M=-1,v=a?a.length:0;++M<v;)u=s(u,a[M],M,a);return u}function ra(a,s){for(var u=-1,m=Array(a);++u<a;)m[u]=s(u);return m}function aa(a,s){return a?.[s]}function Ut(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Ht(a){var s=-1,u=Array(a.size);return a.forEach(function(m,M){u[++s]=[M,m]}),u}function We(a,s){return function(u){return a(s(u))}}function Lt(a){var s=-1,u=Array(a.size);return a.forEach(function(m){u[++s]=m}),u}var ia=Array.prototype,oa=Function.prototype,De=Object.prototype,je=G["__core-js_shared__"],Wt=(function(){var a=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),jt=oa.toString,U=De.hasOwnProperty,Se=De.toString,sa=RegExp("^"+jt.call(U).replace($r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=Kr?G.Buffer:void 0,$t=G.Symbol,zt=G.Uint8Array,ca=We(Object.getPrototypeOf,Object),ua=Object.create,la=De.propertyIsEnumerable,da=ia.splice,Qt=Object.getOwnPropertySymbols,ma=Vt?Vt.isBuffer:void 0,fa=We(Object.keys,Object),Ve=Z(G,"DataView"),ce=Z(G,"Map"),$e=Z(G,"Promise"),ze=Z(G,"Set"),Qe=Z(G,"WeakMap"),ue=Z(Object,"create"),ha=j(Ve),pa=j(ce),ya=j($e),ga=j(ze),_a=j(Qe),Bt=$t?$t.prototype:void 0,Xt=Bt?Bt.valueOf:void 0;function L(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function wa(){this.__data__=ue?ue(null):{}}function ba(a){return this.has(a)&&delete this.__data__[a]}function Ta(a){var s=this.__data__;if(ue){var u=s[a];return u===r?void 0:u}return U.call(s,a)?s[a]:void 0}function Da(a){var s=this.__data__;return ue?s[a]!==void 0:U.call(s,a)}function Sa(a,s){var u=this.__data__;return u[a]=ue&&s===void 0?r:s,this}L.prototype.clear=wa,L.prototype.delete=ba,L.prototype.get=Ta,L.prototype.has=Da,L.prototype.set=Sa;function Y(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function Ma(){this.__data__=[]}function Ea(a){var s=this.__data__,u=Me(s,a);if(u<0)return!1;var m=s.length-1;return u==m?s.pop():da.call(s,u,1),!0}function Oa(a){var s=this.__data__,u=Me(s,a);return u<0?void 0:s[u][1]}function va(a){return Me(this.__data__,a)>-1}function Ra(a,s){var u=this.__data__,m=Me(u,a);return m<0?u.push([a,s]):u[m][1]=s,this}Y.prototype.clear=Ma,Y.prototype.delete=Ea,Y.prototype.get=Oa,Y.prototype.has=va,Y.prototype.set=Ra;function B(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function Na(){this.__data__={hash:new L,map:new(ce||Y),string:new L}}function xa(a){return Ee(this,a).delete(a)}function Pa(a){return Ee(this,a).get(a)}function Ca(a){return Ee(this,a).has(a)}function Ia(a,s){return Ee(this,a).set(a,s),this}B.prototype.clear=Na,B.prototype.delete=xa,B.prototype.get=Pa,B.prototype.has=Ca,B.prototype.set=Ia;function X(a){this.__data__=new Y(a)}function Aa(){this.__data__=new Y}function ka(a){return this.__data__.delete(a)}function Ga(a){return this.__data__.get(a)}function Ya(a){return this.__data__.has(a)}function Fa(a,s){var u=this.__data__;if(u instanceof Y){var m=u.__data__;if(!ce||m.length<n-1)return m.push([a,s]),this;u=this.__data__=new B(m)}return u.set(a,s),this}X.prototype.clear=Aa,X.prototype.delete=ka,X.prototype.get=Ga,X.prototype.has=Ya,X.prototype.set=Fa;function qa(a,s){var u=Ze(a)||ui(a)?ra(a.length,String):[],m=u.length,M=!!m;for(var v in a)U.call(a,v)&&!(M&&(v=="length"||ii(v,m)))&&u.push(v);return u}function Zt(a,s,u){var m=a[s];(!(U.call(a,s)&&tn(m,u))||u===void 0&&!(s in a))&&(a[s]=u)}function Me(a,s){for(var u=a.length;u--;)if(tn(a[u][0],s))return u;return-1}function Ua(a,s){return a&&Kt(s,Ke(s),a)}function Be(a,s,u,m,M,v,F){var R;if(m&&(R=v?m(a,M,v,F):m(a)),R!==void 0)return R;if(!Oe(a))return a;var an=Ze(a);if(an){if(R=ni(a),!s)return Ja(a,R)}else{var K=W(a),on=K==g||K==h;if(di(a))return $a(a,s);if(K==p||K==o||on&&!v){if(Ut(a))return v?a:{};if(R=ri(on?{}:a),!s)return ei(a,Ua(R,a))}else{if(!T[K])return v?a:{};R=ai(a,K,Be,s)}}F||(F=new X);var sn=F.get(a);if(sn)return sn;if(F.set(a,R),!an)var cn=u?ti(a):Ke(a);return ta(cn||a,function(Je,ve){cn&&(ve=Je,Je=a[ve]),Zt(R,ve,Be(Je,s,u,m,ve,a,F))}),R}function Ha(a){return Oe(a)?ua(a):{}}function La(a,s,u){var m=s(a);return Ze(a)?m:na(m,u(a))}function Wa(a){return Se.call(a)}function ja(a){if(!Oe(a)||si(a))return!1;var s=rn(a)||Ut(a)?sa:Qr;return s.test(j(a))}function Va(a){if(!en(a))return fa(a);var s=[];for(var u in Object(a))U.call(a,u)&&u!="constructor"&&s.push(u);return s}function $a(a,s){if(s)return a.slice();var u=new a.constructor(a.length);return a.copy(u),u}function Xe(a){var s=new a.constructor(a.byteLength);return new zt(s).set(new zt(a)),s}function za(a,s){var u=s?Xe(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.byteLength)}function Qa(a,s,u){var m=s?u(Ht(a),!0):Ht(a);return qt(m,Jr,new a.constructor)}function Ba(a){var s=new a.constructor(a.source,zr.exec(a));return s.lastIndex=a.lastIndex,s}function Xa(a,s,u){var m=s?u(Lt(a),!0):Lt(a);return qt(m,ea,new a.constructor)}function Za(a){return Xt?Object(Xt.call(a)):{}}function Ka(a,s){var u=s?Xe(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.length)}function Ja(a,s){var u=-1,m=a.length;for(s||(s=Array(m));++u<m;)s[u]=a[u];return s}function Kt(a,s,u,m){u||(u={});for(var M=-1,v=s.length;++M<v;){var F=s[M],R=void 0;Zt(u,F,R===void 0?a[F]:R)}return u}function ei(a,s){return Kt(a,Jt(a),s)}function ti(a){return La(a,Ke,Jt)}function Ee(a,s){var u=a.__data__;return oi(s)?u[typeof s=="string"?"string":"hash"]:u.map}function Z(a,s){var u=aa(a,s);return ja(u)?u:void 0}var Jt=Qt?We(Qt,Object):hi,W=Wa;(Ve&&W(new Ve(new ArrayBuffer(1)))!=Te||ce&&W(new ce)!=_||$e&&W($e.resolve())!=w||ze&&W(new ze)!=N||Qe&&W(new Qe)!=Le)&&(W=function(a){var s=Se.call(a),u=s==p?a.constructor:void 0,m=u?j(u):void 0;if(m)switch(m){case ha:return Te;case pa:return _;case ya:return w;case ga:return N;case _a:return Le}return s});function ni(a){var s=a.length,u=a.constructor(s);return s&&typeof a[0]=="string"&&U.call(a,"index")&&(u.index=a.index,u.input=a.input),u}function ri(a){return typeof a.constructor=="function"&&!en(a)?Ha(ca(a)):{}}function ai(a,s,u,m){var M=a.constructor;switch(s){case vt:return Xe(a);case l:case f:return new M(+a);case Te:return za(a,m);case Rt:case Nt:case xt:case Pt:case Ct:case It:case At:case kt:case Gt:return Ka(a,m);case _:return Qa(a,m,u);case I:case x:return new M(a);case O:return Ba(a);case N:return Xa(a,m,u);case A:return Za(a)}}function ii(a,s){return s=s??i,!!s&&(typeof a=="number"||Br.test(a))&&a>-1&&a%1==0&&a<s}function oi(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function si(a){return!!Wt&&Wt in a}function en(a){var s=a&&a.constructor,u=typeof s=="function"&&s.prototype||De;return a===u}function j(a){if(a!=null){try{return jt.call(a)}catch{}try{return a+""}catch{}}return""}function ci(a){return Be(a,!0,!0)}function tn(a,s){return a===s||a!==a&&s!==s}function ui(a){return li(a)&&U.call(a,"callee")&&(!la.call(a,"callee")||Se.call(a)==o)}var Ze=Array.isArray;function nn(a){return a!=null&&mi(a.length)&&!rn(a)}function li(a){return fi(a)&&nn(a)}var di=ma||pi;function rn(a){var s=Oe(a)?Se.call(a):"";return s==g||s==h}function mi(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}function Oe(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function fi(a){return!!a&&typeof a=="object"}function Ke(a){return nn(a)?qa(a):Va(a)}function hi(){return[]}function pi(){return!1}e.exports=ci})(me,me.exports)),me.exports}var qs=Fs();const Us=Ys(qs),C=(e,t)=>new Date(e.getTime()-kr(t,e));class D{timeframeText;key;display;timeframeLength;allowedTiers;defaultResponseGranularity;dataGranularity;isRelative;fineGrainedDefaultGranularity;_startCustom;_endCustom;_allowedGranularitiesOverride;constructor(t){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 n=new Set,r=this.maximumTimeframeLength()/3600;return r<=6&&n.add("minutely"),r>=2&&r<=168&&n.add("hourly"),r>=48&&n.add("daily"),r>=672&&n.add("weekly"),n}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 n=xs(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return Ir(n,t)}}class Hs extends D{rawStart(t){let n=q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*7}}class Ls extends D{rawStart(t){let n=ae(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*31}}class Ws extends D{rawStart(t){let n=re(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*92}}class js extends D{rawStart(t){let n=new Date(this.tzAdjustedDate(t).getFullYear(),0,1);return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*366}}class Vs extends D{rawEnd(t){let n=q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=C(n,t)),n}rawStart(t){const n=this.tzAdjustedDate(t);let r=q(n.setDate(n.getDate()-7),{weekStartsOn:1});return t&&(r=C(r,t)),r}}class $s extends D{rawEnd(t){let n=re(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}rawStart(t){let n=re(xr(this.tzAdjustedDate(t)));return t&&(n=C(n,t)),n}}class zs extends D{rawEnd(t){let n=ae(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}rawStart(t){let n=ae(Nr(this.tzAdjustedDate(t)));return t&&(n=C(n,t)),n}}class Qs extends D{rawEnd(t){let n=new Date(this.tzAdjustedDate(t).getFullYear(),0,1);return t&&(n=C(n,t)),n}rawStart(t){let n=new Date(this.tzAdjustedDate(t).getFullYear()-1,0,1);return t&&(n=C(n,t)),n}}const Ur=new Map([[d.FIFTEEN_MIN,new D({key:d.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>900,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[d.ONE_HOUR,new D({key:d.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>3600*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[d.SIX_HOUR,new D({key:d.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>3600*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.TWELVE_HOUR,new D({key:d.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>3600*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.ONE_DAY,new D({key:d.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>3600*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.SEVEN_DAY,new D({key:d.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>3600*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.THIRTY_DAY,new D({key:d.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>3600*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.NINETY_DAY,new D({key:d.NINETY_DAY,display:"Last 90 days",timeframeText:"90 days",timeframeLength:()=>3600*24*90,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.ONE_HUNDRED_EIGHTY_DAY,new D({key:d.ONE_HUNDRED_EIGHTY_DAY,display:"Last 180 days",timeframeText:"180 days",timeframeLength:()=>3600*24*180,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.ONE_YEAR,new D({key:d.ONE_YEAR,display:"Last 365 days",timeframeText:"365 days",timeframeLength:()=>3600*24*365,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.CURRENT_WEEK,new Hs({key:d.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=q(new Date,{weekStartsOn:1});return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.CURRENT_MONTH,new Ls({key:d.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=ae(new Date);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.CURRENT_QUARTER,new Ws({key:d.CURRENT_QUARTER,display:"This quarter",timeframeText:"Quarter",timeframeLength:()=>{const e=re(new Date);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.CURRENT_YEAR,new js({key:d.CURRENT_YEAR,display:"This year",timeframeText:"Year",timeframeLength:()=>{const e=new Date(new Date().getFullYear(),0,1);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_WEEK,new Vs({key:d.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>3600*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.PREVIOUS_MONTH,new zs({key:d.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=ae(new Date),n=ae(Nr(new Date));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=ut(t,n)),3600*24*ts(new Date().setMonth(new Date().getMonth()-1))+gn(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_QUARTER,new $s({key:d.PREVIOUS_QUARTER,display:"Previous quarter",timeframeText:"Quarter",timeframeLength:()=>{const e=re(new Date),t=re(xr(new Date));return(e.getTime()-t.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_YEAR,new Qs({key:d.PREVIOUS_YEAR,display:"Previous year",timeframeText:"Year",timeframeLength:()=>{const e=new Date(new Date().getFullYear(),0,1),t=new Date(new Date().getFullYear()-1,0,1);let n=0;return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(n=ut(e,t)),3600*24*(365+(t.getFullYear()%4===0?1:0))+gn(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function Bs(e){const t=new Date(e.start),n=new Date(e.end),r=(n.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&Us(Ur.get(e.timePeriodsKey))||new D({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:n,timeframeLength:()=>r,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function Xs(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function Zs(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function ut(e,t){return rs(e.getTimezoneOffset()-t.getTimezoneOffset())}const Ks={"15M":d.FIFTEEN_MIN,"1H":d.ONE_HOUR,"6H":d.SIX_HOUR,"12H":d.TWELVE_HOUR,"24H":d.ONE_DAY,"7D":d.SEVEN_DAY,"15m":d.FIFTEEN_MIN,"1h":d.ONE_HOUR,"6h":d.SIX_HOUR,"12h":d.TWELVE_HOUR,"24h":d.ONE_DAY,"7d":d.SEVEN_DAY,"30d":d.THIRTY_DAY,"90d":d.NINETY_DAY,"180d":d.ONE_HUNDRED_EIGHTY_DAY,"365d":d.ONE_YEAR,current_week:d.CURRENT_WEEK,current_month:d.CURRENT_MONTH,current_quarter:d.CURRENT_QUARTER,current_year:d.CURRENT_YEAR,previous_week:d.PREVIOUS_WEEK,previous_month:d.PREVIOUS_MONTH,previous_quarter:d.PREVIOUS_QUARTER,previous_year:d.PREVIOUS_YEAR};class He{_seed;constructor(t){this._seed=t}next(t,n){const r=Math.sin(this._seed++)*1e4,i=r-Math.floor(r);return Math.floor(i*(n-t+1))+t}}const Js=({metrics:e,dimensionMap:t,metaOverrides:n,valueRange:r=[50,500],timeSeries:i=!1})=>i?e.length===1?Hr(e[0],t,n,r):Lr(e,t,n,r):Wr(e,t,n,r),Hr=(e,t,n,r)=>{const i=Ot(10,1e4),o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=[];let h=0;for(let p=f;p<=y;p+=3600*1e3)if(t)for(const w in t)t[w].forEach(O=>{h+=o.next(c,l);const N={[w]:O,[e.name]:h},x={version:"1.0",timestamp:new Date(p).toISOString(),event:N};g.push(x)});else{h+=o.next(c,l);const w={version:"1.0",timestamp:new Date(p).toISOString(),event:{[e.name]:h}};g.push(w)}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:3600*1e3,display:_,...n??{}};return{data:g,meta:I}},ec=(e,t,n)=>Lr(e,void 0,t,n),Lr=(e,t,n,r)=>{const i=Ot(10,1e4),o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=[],h={};e.forEach(p=>{h[p.name]=0});for(let p=f;p<=y;p+=3600*1e3)if(t)for(const w in t)t[w].forEach(O=>{const N={[w]:O};e.forEach(x=>{const A=`${w}:${O}:${x.name}`;h[A]=(h[A]||0)+o.next(c,l),N[x.name]=h[A]}),g.push({version:"1.0",timestamp:new Date(p).toISOString(),event:N})});else{const w={};e.forEach(O=>{h[O.name]+=o.next(c,l),w[O.name]=h[O.name]}),g.push({version:"1.0",timestamp:new Date(p).toISOString(),event:w})}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,w)=>(p[w.name]=w.unit,p),{}),granularity_ms:3600*1e3,display:_,...n??{}};return{data:g,meta:I}},Wr=(e,t,n,r)=>{const i=Math.floor(Math.random()*9991)+10,o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=new Date((f+y)/2).toISOString(),h=[];if(t){const p=Object.keys(t),w=Object.values(t),O=(N,x)=>{if(x===p.length){e.forEach(A=>{N[A.name]=o.next(c,l)}),h.push({version:"1.0",timestamp:new Date().toISOString(),event:{...N}});return}w[x].forEach(A=>{O({...N,[p[x]]:A},x+1)})};O({},0)}else{const p={};e.forEach(w=>{p[w.name]=o.next(c,l)}),h.push({version:"1.0",timestamp:g,event:p})}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,w)=>(p[w.name]=w.unit,p),{}),truncated:!1,limit:50,display:_,granularity_ms:y-f,...n??{}};return{data:h,meta:I}};function Ot(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}const jr=new Map(_t.map(e=>[e.code,{code:e.code,name:e.name}])),tc=e=>jr.get(e)?.name||e,xn=1e3,nc=1e4,Pn=1e6,Cn=1e9,In=1e12,fe=(e,t)=>{if(t.separator===!1||e<1e3)return e.toString();const n=typeof t.separator=="string"?t.separator:",",r=[];return Math.round(e).toString().split("").reverse().forEach((o,c)=>{c&&c%3===0&&r.push(n),r.push(o)}),r.reverse().join("")},ee=(e,t,n)=>{const r=e/t,i=n.round?"round":"floor";if(n.decimal===!1)return Math[i](r).toString();let o;n.precision?o=r:o=r<10?Math[i](r*10)/10:Math[i](r);let c=o.toString();return typeof n.decimal=="string"&&(c=c.replace(".",n.decimal)),c};function xe(e,t={}){let n;const r=e<0;r&&(e=Math.abs(e)),t.precision&&(e=parseFloat(e.toPrecision(t.precision)));const i=t.min10k?nc:xn;return e<i||t.precision&&t.precision>Math.log10(e)?n=fe(ee(e,1,t),t):e<Pn?n=`${ee(e,xn,t)}k`:e<Cn?n=`${ee(e,Pn,t)}m`:e<In?n=`${fe(ee(e,Cn,t),t)}b`:n=`${fe(ee(e,In,t),t)}t`,r&&(n=`-${n}`),t.capital&&(n=n.toUpperCase()),t.prefix&&(n=`${t.prefix}${n}`),t.suffix&&(n=`${n}${t.suffix}`),n}xe.addCommas=fe;const rc=typeof document<"u"&&document.documentElement?.lang||"en-US",Pe=new Intl.NumberFormat(rc);function ac({i18n:e}){const t=(o,c)=>{if(isNaN(o))return"0 B";const l=c?Math.pow(2,50):1e15,f=c?Math.pow(2,40):1e12,y=c?Math.pow(2,30):1e9,g=c?Math.pow(2,20):1e6,h=c?Math.pow(2,10):1e3;let _;return o>=l?_=e.formatNumber(Number.parseFloat((o/l).toPrecision(3)),{style:"unit",unit:"petabyte",unitDisplay:"narrow"}):o>=f?_=e.formatNumber(Number.parseFloat((o/f).toPrecision(3)),{style:"unit",unit:"terabyte",unitDisplay:"narrow"}):o>=y?_=e.formatNumber(Number.parseFloat((o/y).toPrecision(3)),{style:"unit",unit:"gigabyte",unitDisplay:"narrow"}):o>=g?_=e.formatNumber(Number.parseFloat((o/g).toPrecision(3)),{style:"unit",unit:"megabyte",unitDisplay:"narrow"}):o>=h?_=e.formatNumber(Number.parseFloat((o/h).toPrecision(3)),{style:"unit",unit:"kilobyte",unitDisplay:"narrow"}):_=e.formatNumber(Number.parseFloat(o.toPrecision(3)),{style:"unit",unit:"byte",unitDisplay:"narrow"}),_.replace(/([a-zA-Z]*)$/," $1")},n=(o,c="USD")=>isNaN(o)?c==="USD"?"$0.00":`${o}`:o>=.01||c!=="USD"?e.formatNumber(o,{style:"currency",currency:c}):o<1e-4?"< $0.0001":`$${Number.parseFloat(o.toPrecision(4))}`;return{formatUnit:(o,c,{isBytes1024:l=!1,currency:f="USD",approximate:y=!1,translateUnit:g=h=>h}={})=>{const h=g(c,o);switch(c){case"bytes":return t(o,l);case"usd":return n(o,f);default:return isNaN(o)?`${o}`:y?`${xe(o,{capital:!0})} ${h}`:o>=.01?`${Pe.format(Number.parseFloat(o.toFixed(2)))} ${h}`:`${Number.parseFloat(o.toPrecision(4))} ${h}`}},formatBytes:t,formatCost:n,formatRange:(o,c,l,{isBytes1024:f=!1,currency:y="USD",approximate:g=!1,translateUnit:h=_=>_}={})=>{const _=h(l,c);switch(l){case"bytes":return`${t(o,f)} - ${t(c,f)}`;case"usd":return`${n(o,y)} - ${n(c,y)}`;default:if(isNaN(o)||isNaN(c))return`${o} - ${c}`;if(g)return`${xe(o,{capital:!0})} - ${xe(c,{capital:!0})} ${_}`}const I=o>=.01?`${Pe.format(Number.parseFloat(o.toFixed(2)))}`:`${Number.parseFloat(o.toPrecision(4))}`,p=c>=.01?`${Pe.format(Number.parseFloat(c.toFixed(2)))}`:`${Number.parseFloat(c.toPrecision(4))}`;return`${I} - ${p} ${_}`}}}const Vr=1e4,ic=async(e,t,n,r={})=>{const i=Math.max(0,r.maxRecords??Vr),o=Math.min(ot,Math.max(1,r.pageSize??ot)),c=[];let l=t.query.cursor,f;for(;c.length<i;){const y=Math.min(o,i-c.length),g=await e({datasource:t.datasource,query:{...t.query,size:y,...l?{cursor:l}:{}}},n);if(f=g,c.push(...g.results??[]),r.onPage?.(c.length,g),l=g.meta?.cursor,!l||!g.results?.length||g.results.length<y)break}return{results:c,meta:{...f?.meta??{query_id:"",time_range:{start:"",end:""},size:0},size:c.length},truncated:!!l&&c.length>=i,limit:i}};exports.API_REQUESTS_MAX_PAGE_SIZE=ot;exports.CAPTURE_PREPARE_EVENT=Ce;exports.CAPTURE_RESTORE_EVENT=Ie;exports.COUNTRIES=_t;exports.DEFAULT_MAX_REQUEST_RECORDS=Vr;exports.DeltaQueryTime=Gs;exports.EXPORT_RECORD_LIMIT=bi;exports.Granularities=he;exports.INJECT_QUERY_PROVIDER=Ti;exports.PLATFORM_DATASOURCES=Ln;exports.REFRESH_INTERVAL_MS=wi;exports.SeededRandom=He;exports.TIMEFRAME_LOOKUP=Ks;exports.TimePeriods=Ur;exports.Timeframe=D;exports.TimeframeKeys=d;exports.TimeseriesQueryTime=ks;exports.UnaryQueryTime=qr;exports.agenticExploreAggregations=Wn;exports.agenticUsageSchema=ur;exports.aiExploreAggregations=Yn;exports.apiRequestsExtraFieldSchema=hr;exports.apiRequestsQuerySchema=pr;exports.apiUsageQuerySchema=or;exports.barChartSchema=zn;exports.basicExploreAggregations=dt;exports.basicQuerySchema=sr;exports.ceilToNearestTimeGrain=Et;exports.chartTileConfigSchema=Tr;exports.choroplethMapSchema=rr;exports.countries=jr;exports.dashboardConfigSchema=Li;exports.dashboardTileTypes=Ii;exports.datasourceToFilterableDimensions=Vn;exports.datePickerSelectionToTimeframe=Bs;exports.donutChartSchema=Kn;exports.dstOffsetHours=ut;exports.exploreAggregations=mt;exports.exploreFilterTypesV2=kn;exports.extendedRelativeTimeRangeValues=Di;exports.fetchAllRequests=ic;exports.filterableAgenticExploreDimensions=_e;exports.filterableAiExploreDimensions=ge;exports.filterableBasicExploreDimensions=pe;exports.filterableExploreDimensions=ye;exports.filterableManagedCacheExploreDimensions=qe;exports.filterablePlatformPresetFilterDimensions=ar;exports.filterableRequestDimensions=ht;exports.filterableRequestMetrics=pt;exports.filterableRequestWildcardDimensions=Un;exports.floorToNearestTimeGrain=Fr;exports.formatTime=ct;exports.formatTimeRange=Cs;exports.formatTimestamp=Ps;exports.gaugeChartSchema=Zn;exports.generateCrossSectionalData=Wr;exports.generateData=Js;exports.generateMultipleMetricTimeSeriesData=ec;exports.generateSingleMetricTimeSeriesData=Hr;exports.getCountryName=tc;exports.getFieldDataSources=Wi;exports.granularitiesToOptions=Is;exports.granularityMsToQuery=Gr;exports.granularityValues=lt;exports.isPlatformDatasource=xi;exports.llmUsageSchema=cr;exports.managedCacheExploreAggregations=jn;exports.managedCacheUsageQuerySchema=lr;exports.metricCardSchema=tr;exports.msToGranularity=As;exports.numberFormatter=Pe;exports.platformQuerySchema=mr;exports.platformTabularQuerySchema=fr;exports.prepareForCapture=yi;exports.queryDatasources=Pi;exports.queryableAgenticExploreDimensions=yt;exports.queryableAiExploreDimensions=ft;exports.queryableBasicExploreDimensions=Ye;exports.queryableExploreDimensions=Fe;exports.queryableManagedCacheExploreDimensions=gt;exports.queryableRequestDimensions=Fn;exports.queryableRequestMetrics=Hn;exports.queryableRequestWildcardDimensions=qn;exports.rand=Ot;exports.registerCapture=An;exports.registerWebglCapture=_i;exports.relativeTimeRangeValuesRequestV2=Ni;exports.relativeTimeRangeValuesV4=Ri;exports.reportChartTypes=Si;exports.requestFilterTypeEmptyV2=Gn;exports.requestFilterTypeEqualsV2=Mi;exports.requestFilterTypeMetricV2=Ei;exports.requestFilterTypeWildcardV2=Oi;exports.restoreAfterCapture=gi;exports.scatterChartSchema=Dt;exports.scatterPercentileLineSchema=Xn;exports.singleValueSchema=nr;exports.slottableSchema=$n;exports.slottableTileConfigSchema=Dr;exports.stripUnknownFilters=Ci;exports.tableChartSchema=er;exports.thresholdSchema=Qn;exports.tileConfigSchema=Sr;exports.tileDefinitionSchema=br;exports.tileLayoutSchema=St;exports.timeRangeTypeV2=vi;exports.timeframeToDatepickerSelection=Xs;exports.timeframeToDatepickerTimeperiod=Zs;exports.timeseriesChartSchema=Bn;exports.topNTableSchema=Jn;exports.unitFormatter=ac;exports.validDashboardChartQuery=gr;exports.validDashboardQuery=Yi;exports.validDashboardTableQuery=wr;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce="kapture:prepare",Ie="kapture:restore";async function yi(){const e=[];window.dispatchEvent(new CustomEvent(Ce,{detail:{waitUntil:t=>e.push(t)}})),await Promise.allSettled(e)}function gi(){window.dispatchEvent(new CustomEvent(Ie))}function An(e){let t;const n=()=>{t?.(),t=void 0},r=i=>{i.detail?.waitUntil((async()=>{t=await e()})())};return window.addEventListener(Ce,r),window.addEventListener(Ie,n),()=>{window.removeEventListener(Ce,r),window.removeEventListener(Ie,n),n()}}function _i(e,t={}){return An(async()=>{const n=e();if(!n)return;t.redraw?.();const r=new Image;return r.src=n.toDataURL("image/png"),await r.decode(),r.style.cssText=`position:absolute;top:0;left:0;width:${n.clientWidth}px;height:${n.clientHeight}px;`,n.parentElement?.appendChild(r),n.style.visibility="hidden",()=>{r.remove(),n.style.visibility=""}})}const wi=30*1e3,bi=1e3,Ti="analytics-query-provider";var d=(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.NINETY_DAY="90d",e.ONE_HUNDRED_EIGHTY_DAY="180d",e.ONE_YEAR="365d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.CURRENT_YEAR="current_year",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e.PREVIOUS_YEAR="previous_year",e))(d||{});const Di=["90d","180d","365d","current_quarter","previous_quarter","current_year","previous_year"],Si=["horizontal_bar","vertical_bar","timeseries_line","choropleth_map","timeseries_bar","donut","single_value","top_n","table","scatter"],kn=["in","not_in","selector"],Mi=["=","!="],Ei=["=","!=","<",">","<=",">="],Gn=["empty","not_empty"],Oi=["starts_with","ends_with"],vi=["absolute","relative"],Ri=["15m","1h","6h","12h","24h","7d","current_week","previous_week","30d","current_month","previous_month"],lt=["secondly","tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly","twoHourly","twelveHourly","daily","weekly","trend"],$=e=>e.filter(t=>t!=="time"),Ye=["api","api_package","api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","portal","route","status_code","status_code_grouped","time"],pe=$(Ye),dt=["active_services","error_rate","request_count","request_per_minute","response_latency_average"],Fe=[...Ye,"ai_gateway","ai_gateway_consumer","ai_gateway_consumer_group","ai_gateway_data_plane_node","application","bot_info_action","bot_info_detection_reason","bot_info_ban_type","cache_status","consumer","consumer_group","country_code","oidc_credential","upstream_status_code","upstream_status_code_grouped","response_source","data_plane_node_version","realm","portal_api","principal"],ye=$(Fe),mt=[...dt,"cache_hit_rate","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","kong_internal_latency_p99","kong_internal_latency_p95","kong_internal_latency_p50","kong_internal_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"],ft=["control_plane","control_plane_group","ai_gateway","gateway_service","consumer","ai_gateway_consumer","ai_gateway_consumer_group","application","oidc_credential","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time","realm","status_code","status_code_grouped","ai_plugin","principal","cache_status","ai_gateway_mcp_server","ai_gateway_model","ai_gateway_agent","ai_gateway_data_plane_node"],ge=$(ft),Yn=["ai_request_count","active_agents","cached_tokens","completion_tokens","cost","cost_per_request_average","error_rate","llm_cache_embeddings_latency_average","llm_cache_fetch_latency_average","llm_embeddings_cost","llm_embeddings_tokens","llm_latency_average","prompt_tokens","time_per_token_average","time_per_token_p50","time_per_token_p95","time_per_token_p99","time_to_first_token_average","time_to_first_token_p50","time_to_first_token_p95","time_to_first_token_p99","total_tokens","total_tokens_per_minute"],Fn=["a2a_context_id","a2a_error","a2a_method","a2a_task_id","api","api_package","api_product","api_product_version","application","auth_type","bot_info_action","bot_info_detection_reason","bot_info_ja4_fingerprint","bot_info_ban_type","bot_info_header_names","cache_status","client_ip","consumer","ai_gateway_consumer","consumer_group","ai_gateway_consumer_group","control_plane","control_plane_group","ai_gateway","country_code","data_plane_node","data_plane_node_version","ai_gateway_data_plane_node","gateway_service","header_host","header_user_agent","http_method","mcp_error","mcp_method","mcp_session_id","mcp_tool_name","oidc_credential","portal","principal","realm","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"],ht=$(Fn),qn=["auth_type","cache_status","client_ip","data_plane_node_version","header_host","header_user_agent","http_method","oidc_credential","request_id","request_uri","response_header_content_type","response_source","service_port","service_protocol","trace_id","upstream_uri"],Un=qn,Hn=["ai_count","latencies_response_ms","latencies_upstream_ms","latencies_kong_gateway_ms","latencies_kong_internal_ms","request_body_size","response_body_size","response_header_content_length","status_code","upstream_status_code"],pt=$(Hn),Ni=["15M","1H","6H","12H","24H","7D"],ot=1e3,Ln=["platform","platform_usage"],xi=e=>Ln.includes(e),yt=[...Fe.filter(e=>e!=="consumer_group"),"a2a_context_id","a2a_error","a2a_method","a2a_task_id","a2a_task_state","ai_gateway_agent","ai_gateway_mcp_server","mcp_error","mcp_method","mcp_session_id","mcp_tool_name"],_e=$(yt),Wn=[...mt,"a2a_latency_average","a2a_response_size_sum","active_agents","mcp_latency_average","mcp_latency_p99","mcp_latency_p95","mcp_latency_p50","mcp_response_size_sum"],gt=["control_plane","data_plane_group","managed_cache","network","provider","provider_region","time"],qe=$(gt),jn=["cache_eviction_rate","cache_expiration_rate","cache_items_average","cache_memory_utilization_max"],Pi=["basic","api_usage","llm_usage","agentic_usage","platform","platform_usage","managed_cache_usage"],Vn={basic:new Set(pe),api_usage:new Set(ye),llm_usage:new Set(ge),agentic_usage:new Set(_e),platform:new Set,platform_usage:new Set,managed_cache_usage:new Set(qe)},Ci=(e,t)=>e.startsWith("goap")||e==="platform"||e==="platform_usage"?t:t.filter(n=>Vn[e].has(n.field)),_t=[{code:"AF",name:"Afghanistan"},{code:"AX",name:"Aland Islands"},{code:"AL",name:"Albania"},{code:"DZ",name:"Algeria"},{code:"AS",name:"American Samoa"},{code:"AD",name:"Andorra"},{code:"AO",name:"Angola"},{code:"AI",name:"Anguilla"},{code:"AQ",name:"Antarctica"},{code:"AG",name:"Antigua and Barbuda"},{code:"AR",name:"Argentina"},{code:"AM",name:"Armenia"},{code:"AW",name:"Aruba"},{code:"AU",name:"Australia"},{code:"AT",name:"Austria"},{code:"AZ",name:"Azerbaijan"},{code:"BS",name:"Bahamas"},{code:"BH",name:"Bahrain"},{code:"BD",name:"Bangladesh"},{code:"BB",name:"Barbados"},{code:"BY",name:"Belarus"},{code:"BE",name:"Belgium"},{code:"BZ",name:"Belize"},{code:"BJ",name:"Benin"},{code:"BM",name:"Bermuda"},{code:"BT",name:"Bhutan"},{code:"BO",name:"Bolivia"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BW",name:"Botswana"},{code:"BV",name:"Bouvet Island"},{code:"BR",name:"Brazil"},{code:"IO",name:"British Indian Ocean Territory"},{code:"BN",name:"Brunei Darussalam"},{code:"BG",name:"Bulgaria"},{code:"BF",name:"Burkina Faso"},{code:"BI",name:"Burundi"},{code:"KH",name:"Cambodia"},{code:"CM",name:"Cameroon"},{code:"CA",name:"Canada"},{code:"CV",name:"Cape Verde"},{code:"KY",name:"Cayman Islands"},{code:"CF",name:"Central African Republic"},{code:"TD",name:"Chad"},{code:"CL",name:"Chile"},{code:"CN",name:"China"},{code:"CX",name:"Christmas Island"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CO",name:"Colombia"},{code:"KM",name:"Comoros"},{code:"CG",name:"Congo"},{code:"CD",name:"Democratic Republic of the Congo"},{code:"CK",name:"Cook Islands"},{code:"CR",name:"Costa Rica"},{code:"CI",name:"Cote d'Ivoire"},{code:"HR",name:"Croatia"},{code:"CU",name:"Cuba"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czech Republic"},{code:"DK",name:"Denmark"},{code:"DJ",name:"Djibouti"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"EC",name:"Ecuador"},{code:"EG",name:"Egypt"},{code:"SV",name:"El Salvador"},{code:"GQ",name:"Equatorial Guinea"},{code:"ER",name:"Eritrea"},{code:"EE",name:"Estonia"},{code:"ET",name:"Ethiopia"},{code:"FK",name:"Falkland Islands (Malvinas)"},{code:"FO",name:"Faroe Islands"},{code:"FJ",name:"Fiji"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"GF",name:"French Guiana"},{code:"PF",name:"French Polynesia"},{code:"TF",name:"French Southern Territories"},{code:"GA",name:"Gabon"},{code:"GM",name:"Gambia"},{code:"GE",name:"Georgia"},{code:"DE",name:"Germany"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GR",name:"Greece"},{code:"GL",name:"Greenland"},{code:"GD",name:"Grenada"},{code:"GP",name:"Guadeloupe"},{code:"GU",name:"Guam"},{code:"GT",name:"Guatemala"},{code:"GG",name:"Guernsey"},{code:"GN",name:"Guinea"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HT",name:"Haiti"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"VA",name:"The Vatican"},{code:"HN",name:"Honduras"},{code:"HK",name:"Hong Kong"},{code:"HU",name:"Hungary"},{code:"IS",name:"Iceland"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IR",name:"Iran"},{code:"IQ",name:"Iraq"},{code:"IE",name:"Ireland"},{code:"IM",name:"Isle of Man"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JM",name:"Jamaica"},{code:"JP",name:"Japan"},{code:"JE",name:"Jersey"},{code:"JO",name:"Jordan"},{code:"KZ",name:"Kazakhstan"},{code:"KE",name:"Kenya"},{code:"KI",name:"Kiribati"},{code:"KP",name:"North Korea"},{code:"KR",name:"South Korea"},{code:"KW",name:"Kuwait"},{code:"KG",name:"Kyrgyzstan"},{code:"LA",name:"Laos"},{code:"LV",name:"Latvia"},{code:"LB",name:"Lebanon"},{code:"LS",name:"Lesotho"},{code:"LR",name:"Liberia"},{code:"LY",name:"Libya"},{code:"LI",name:"Liechtenstein"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MO",name:"Macao"},{code:"MK",name:"Macedonia"},{code:"MG",name:"Madagascar"},{code:"MW",name:"Malawi"},{code:"MY",name:"Malaysia"},{code:"MV",name:"Maldives"},{code:"ML",name:"Mali"},{code:"MT",name:"Malta"},{code:"MH",name:"Marshall Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MU",name:"Mauritius"},{code:"YT",name:"Mayotte"},{code:"MX",name:"Mexico"},{code:"FM",name:"Micronesia, "},{code:"MD",name:"Moldova,"},{code:"MC",name:"Monaco"},{code:"MN",name:"Mongolia"},{code:"ME",name:"Montenegro"},{code:"MS",name:"Montserrat"},{code:"MA",name:"Morocco"},{code:"MZ",name:"Mozambique"},{code:"MM",name:"Myanmar"},{code:"NA",name:"Namibia"},{code:"NR",name:"Nauru"},{code:"NP",name:"Nepal"},{code:"NL",name:"Netherlands"},{code:"NC",name:"New Caledonia"},{code:"NZ",name:"New Zealand"},{code:"NI",name:"Nicaragua"},{code:"NE",name:"Niger"},{code:"NG",name:"Nigeria"},{code:"NU",name:"Niue"},{code:"NF",name:"Norfolk Island"},{code:"MP",name:"Northern Mariana Islands"},{code:"NO",name:"Norway"},{code:"OM",name:"Oman"},{code:"PK",name:"Pakistan"},{code:"PW",name:"Palau"},{code:"PA",name:"Panama"},{code:"PG",name:"Papua New Guinea"},{code:"PY",name:"Paraguay"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippines"},{code:"PN",name:"Pitcairn"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"PR",name:"Puerto Rico"},{code:"QA",name:"Qatar"},{code:"RE",name:"Reunion"},{code:"RO",name:"Romania"},{code:"RU",name:"Russia"},{code:"RW",name:"Rwanda"},{code:"BL",name:"Saint Barthelemy"},{code:"SH",name:"Saint Helena"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"LC",name:"Saint Lucia"},{code:"MF",name:"Saint Martin"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"WS",name:"Samoa"},{code:"SM",name:"San Marino"},{code:"ST",name:"Sao Tome and Principe"},{code:"SA",name:"Saudi Arabia"},{code:"SN",name:"Senegal"},{code:"RS",name:"Serbia"},{code:"SC",name:"Seychelles"},{code:"SL",name:"Sierra Leone"},{code:"SG",name:"Singapore"},{code:"SX",name:"Sint Maarten"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"SB",name:"Solomon Islands"},{code:"SO",name:"Somalia"},{code:"ZA",name:"South Africa"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"SS",name:"South Sudan"},{code:"ES",name:"Spain"},{code:"LK",name:"Sri Lanka"},{code:"SD",name:"Sudan"},{code:"SR",name:"Suriname"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SZ",name:"Swaziland"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"SY",name:"Syria"},{code:"TW",name:"Taiwan"},{code:"TJ",name:"Tajikistan"},{code:"TZ",name:"Tanzania"},{code:"TH",name:"Thailand"},{code:"TL",name:"Timor-Leste"},{code:"TG",name:"Togo"},{code:"TK",name:"Tokelau"},{code:"TO",name:"Tonga"},{code:"TT",name:"Trinidad and Tobago"},{code:"TN",name:"Tunisia"},{code:"TR",name:"Turkey"},{code:"TM",name:"Turkmenistan"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TV",name:"Tuvalu"},{code:"UG",name:"Uganda"},{code:"UA",name:"Ukraine"},{code:"AE",name:"United Arab Emirates"},{code:"GB",name:"United Kingdom"},{code:"US",name:"United States"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VU",name:"Vanuatu"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Vietnam"},{code:"VG",name:"British Virgin Islands"},{code:"VI",name:"U.S. Virgin Islands"},{code:"WF",name:"Wallis and Futuna"},{code:"EH",name:"Western Sahara"},{code:"YE",name:"Yemen"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],Ii=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","scatter","golden_signals","top_n","table","slottable","single_value","choropleth_map"],ie={type:"string"},k={type:"string"},wt={type:"boolean"},bt={type:"string",description:"Text rendered in the tile header. Supports the {timeframe} token, "},Ai={type:"object",additionalProperties:{type:"string"}},Tt={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},$n={type:"object",deprecated:!0,description:"Deprecated: use the top-level tile shape { type: 'slottable', id, layout } instead of a chart-level 'slottable' definition.",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string"}},required:["type","id"],additionalProperties:!1},zn={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Qn={type:"object",properties:{type:{type:"string",enum:["warning","error","neutral"]},value:{type:"number"},label:{type:"string"},highlightIntersections:{type:"boolean",default:!1}},required:["type","value"],additionalProperties:!1},Bn={type:"object",properties:{type:{type:"string",enum:["timeseries_line","timeseries_bar"]},stacked:{type:"boolean"},threshold:{type:"object",additionalProperties:{type:"array",items:Qn}},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Xn={type:"object",properties:{percentile:{type:"number",minimum:0,maximum:100},label:{type:"string",description:"Overrides the default label."},border_dash:{type:"array",description:"Dash pattern for the line.",items:{type:"number"}},color:{type:"string"}},required:["percentile"],additionalProperties:!1},Dt={type:"object",description:"Plots one point per record, percentiles are computed from the records returned.",properties:{type:{type:"string",enum:["scatter"]},percentile_lines:{type:"array",description:"Reference lines derived from the plotted values.",items:Xn},outlier_percentile:{type:"number",description:"Percentile above which points are colored in the outlier color, in place.",minimum:0,maximum:100},shade_outlier_region:{type:"boolean",default:!1},jitter_ms:{type:"number",description:"Maximum horizontal jitter so records sharing a timestamp do not stack into one column.",minimum:0},point_radius:{type:"number",minimum:0},point_opacity:{type:"number",description:"Opacity of plotted points.",minimum:0,maximum:1},chart_dataset_colors:Tt,synthetics_data_key:ie,chart_title:k,allow_csv_export:wt},required:["type"],additionalProperties:!1},Zn={type:"object",properties:{type:{type:"string",enum:["gauge"]},metric_display:{type:"string",enum:["hidden","single","full"]},reverse_dataset:{type:"boolean"},numerator:{type:"number"},synthetics_data_key:ie,chart_title:k},required:["type"],additionalProperties:!1},Kn={type:"object",properties:{type:{type:"string",enum:["donut"]},synthetics_data_key:ie,chart_title:k},required:["type"],additionalProperties:!1},Jn={type:"object",properties:{chart_title:k,synthetics_data_key:ie,type:{type:"string",enum:["top_n"]},description:{type:"string",deprecated:!0,description:"Deprecated: use `header_description` on the tile definition."},entity_link:{type:"string"},entity_links:Ai},required:["type"],additionalProperties:!1},er={type:"object",properties:{type:{type:"string",enum:["table"]},chart_title:k},required:["type"],additionalProperties:!1},tr={type:"object",properties:{chart_title:k,type:{type:"string",enum:["golden_signals"]},long_card_titles:{type:"boolean"},percentile_latency:{type:"boolean"}},required:["type"],additionalProperties:!1},nr={type:"object",properties:{type:{type:"string",enum:["single_value"]},decimal_points:{type:"number"},align_x:{type:"string",enum:["left","center","right"]},chart_title:k},required:["type"],additionalProperties:!1},rr={type:"object",properties:{type:{type:"string",enum:["choropleth_map"]},chart_title:k,fit_to_country:{type:"string",enum:_t.map(e=>e.code)},legend:{type:"boolean",default:!1},bounds:{type:"array",minItems:2,maxItems:2,items:{type:"array",minItems:2,maxItems:2,items:[{type:"number",minimum:-180,maximum:180},{type:"number",minimum:-90,maximum:90}]}}},required:["type"],additionalProperties:!1},ki={type:"object",properties:{tz:{type:"string",default:"Etc/UTC"},type:{type:"string",enum:["relative"]},time_range:{type:"string"}},required:["type","time_range"],additionalProperties:!1},Gi={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},z={granularity:{type:"string",description:'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',enum:lt},time_range:{type:"object",description:"The time range to query.",anyOf:[ki,Gi],default:{type:"relative",time_range:"1h"}},limit:{type:"number"},meta:{type:"object"}},oe=e=>({type:"array",description:"List of aggregated metrics to collect across the requested time span.",items:{type:"string",...e?{enum:e}:{}}}),se=e=>({type:"array",description:"List of attributes or entity types to group by.",minItems:0,maxItems:3,items:{type:"string",...e?{enum:e}:{}}}),Q=e=>({type:"array",description:"A list of filters to apply to the query",items:{oneOf:[{type:"object",description:"In filter",properties:{field:{type:"string",...e?{enum:e}:{}},operator:{type:"string",enum:kn},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string",...e?{enum:e}:{}},operator:{type:"string",enum:Gn}},required:["field","operator"],additionalProperties:!1}]}}),ar=["control_plane","gateway_service","realm","route","plugin","plugin_name","plugin_scope","data_plane_node_version","env","team","region","hostname"],ir=()=>({type:"array",description:"A list of filters to apply to the platform query",items:{oneOf:[{type:"object",description:"In filter",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string"},operator:{type:"string"}},required:["field","operator"],additionalProperties:!1}]}}),or={type:"object",description:"A query to launch at the advanced explore API",properties:{datasource:{type:"string",enum:["api_usage"]},metrics:oe(mt),dimensions:se(Fe),filters:Q(ye),...z},required:["datasource"],additionalProperties:!1},sr={type:"object",description:"A query to launch at the basic explore API",properties:{datasource:{type:"string",enum:["basic"]},metrics:oe(dt),dimensions:se(Ye),filters:Q(pe),...z},required:["datasource"],additionalProperties:!1},cr={type:"object",description:"A query to launch at the AI explore API",properties:{datasource:{type:"string",enum:["llm_usage"]},metrics:oe(Yn),dimensions:se(ft),filters:Q(ge),...z},required:["datasource"],additionalProperties:!1},ur={type:"object",description:"A query to launch at the Agentic explore API",properties:{datasource:{type:"string",enum:["agentic_usage"]},metrics:oe(Wn),dimensions:se(yt),filters:Q(_e),...z},required:["datasource"],additionalProperties:!1},lr={type:"object",description:"A query to launch at the Managed Cache explore API",properties:{datasource:{type:"string",enum:["managed_cache_usage"]},metrics:oe(jn),dimensions:se(gt),filters:Q(qe),...z},required:["datasource"],additionalProperties:!1},dr={oneOf:[{const:"platform_usage"},{const:"platform",deprecated:!0,description:"Deprecated: use 'platform_usage'."}]},mr={type:"object",description:"A query to launch at the platform dashboard API. Use datasource 'platform_usage'; 'platform' is accepted for backward compatibility but deprecated.",properties:{datasource:dr,metrics:oe(),dimensions:se(),filters:ir(),...z},required:["datasource"],additionalProperties:!1},fr={type:"object",description:"A query to launch at the platform tabular explore API. Use datasource 'platform_usage'; 'platform' is accepted for backward compatibility but deprecated.",properties:{datasource:dr,entity:{type:"string"},columns:{type:"array",minItems:1,items:{type:"string"}},filters:ir(),cursor:{type:"string"},page_size:{type:"number"}},required:["datasource"],additionalProperties:!1},hr={type:"object",properties:{field:{type:"string",description:"Field to read, dotted for a nested one."},label:{type:"string",description:"Tooltip label, defaults to the field name."},unit:{type:"string",description:"Unit to format the value with, e.g. `ms` or `token count`."}},required:["field"],additionalProperties:!1},pr={type:"object",description:"A query for the api-requests endpoint.",properties:{datasource:{type:"string",enum:["requests"]},metric:{type:"string",description:"Field plotted on the y axis."},dimension:{type:"string",description:"Field used to split points into series."},filters:Q(Array.from(new Set([...ht,...Un,...pt]))),time_range:z.time_range,max_records:{type:"number",description:"Ceiling on records gathered across pages. The endpoint serves at most 1000 per page. Defaults to 10000.",minimum:1},unroll:{type:"string",description:"A nested collection on a request record (`ai`, `mcp_info.rpc`) to expand into one point per entry rather than one per request."},extra_fields:{type:"array",description:"Values to annotate each point with in the tooltip. Read from the unrolled entry first, then the request record.",items:hr}},required:["datasource","metric"],additionalProperties:!1},yr=[or,sr,cr,ur,lr,mr],gr={anyOf:yr},_r=[fr],wr={anyOf:_r},Yi={anyOf:[...yr,..._r]},Fi={anyOf:[zn,Zn,Kn,Bn,Dt,tr,Jn,$n,nr,rr]},qi={type:"object",properties:{query:gr,chart:Fi,header_description:bt},required:["query","chart"],additionalProperties:!1},Ui={type:"object",properties:{query:wr,chart:er,header_description:bt},required:["query","chart"],additionalProperties:!1},Hi={type:"object",properties:{query:pr,chart:Dt,header_description:bt},required:["query","chart"],additionalProperties:!1},br={anyOf:[qi,Ui,Hi]},St={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"},fit_to_content:{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},Tr={type:"object",properties:{type:{type:"string",enum:["chart"]},definition:br,layout:St,id:{type:"string",description:"Unique identifier for the tile. If not provided, one will be generated."}},required:["type","definition","layout"],additionalProperties:!1},Dr={type:"object",description:"A tile that renders arbitrary content into a named slot instead of a chart. The slot name is the tile `id`.",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string",description:"Unique identifier for the tile, and the name of the slot the host application should supply."},layout:St},required:["type","id","layout"],additionalProperties:!1},Sr={anyOf:[Tr,Dr]},Li={type:"object",properties:{tiles:{type:"array",items:Sr},tile_height:{type:"number",description:"Height of each tile in pixels."},columns:{type:"number",description:"Number of columns in the dashboard grid."},preset_filters:Q([...new Set([...ye,...pe,...ge,..._e,...ar,...qe])]),template_id:{type:["string","null"],description:"Template id which was used to instantiate this dashboard."}},required:["tiles"],additionalProperties:!1},Wi=e=>{const t=[];return pe.includes(e)&&t.push("basic"),ye.includes(e)&&t.push("api_usage"),ge.includes(e)&&t.push("llm_usage"),_e.includes(e)&&t.push("agentic_usage"),(ht.includes(e)||pt.includes(e))&&t.push("requests"),t},ji={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"}},Vi=(e,t,n)=>{let r;const i=ji[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function et(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zi={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qi={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bi={date:et({formats:$i,defaultWidth:"full"}),time:et({formats:zi,defaultWidth:"full"}),dateTime:et({formats:Qi,defaultWidth:"full"})},Xi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Zi=(e,t,n,r)=>Xi[e];function le(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,l=n?.width?String(n.width):c;i=e.formattingValues[l]||e.formattingValues[c]}else{const c=e.defaultWidth,l=n?.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[c]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Ki={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ji={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eo={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"]},to={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"]},no={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"}},ro={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"}},ao=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},io={ordinalNumber:ao,era:le({values:Ki,defaultWidth:"wide"}),quarter:le({values:Ji,defaultWidth:"wide",argumentCallback:e=>e-1}),month:le({values:eo,defaultWidth:"wide"}),day:le({values:to,defaultWidth:"wide"}),dayPeriod:le({values:no,defaultWidth:"wide",formattingValues:ro,defaultFormattingWidth:"wide"})};function de(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const c=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(l)?so(l,h=>h.test(c)):oo(l,h=>h.test(c));let y;y=e.valueCallback?e.valueCallback(f):f,y=n.valueCallback?n.valueCallback(y):y;const g=t.slice(c.length);return{value:y,rest:g}}}function oo(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function so(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function co(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;const l=t.slice(i.length);return{value:c,rest:l}}}const uo=/^(\d+)(th|st|nd|rd)?/i,lo=/\d+/i,mo={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},fo={any:[/^b/i,/^(a|c)/i]},ho={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},po={any:[/1/i,/2/i,/3/i,/4/i]},yo={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},go={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]},_o={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},wo={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]},bo={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},To={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}},Do={ordinalNumber:co({matchPattern:uo,parsePattern:lo,valueCallback:e=>parseInt(e,10)}),era:de({matchPatterns:mo,defaultMatchWidth:"wide",parsePatterns:fo,defaultParseWidth:"any"}),quarter:de({matchPatterns:ho,defaultMatchWidth:"wide",parsePatterns:po,defaultParseWidth:"any",valueCallback:e=>e+1}),month:de({matchPatterns:yo,defaultMatchWidth:"wide",parsePatterns:go,defaultParseWidth:"any"}),day:de({matchPatterns:_o,defaultMatchWidth:"wide",parsePatterns:wo,defaultParseWidth:"any"}),dayPeriod:de({matchPatterns:bo,defaultMatchWidth:"any",parsePatterns:To,defaultParseWidth:"any"})},So={code:"en-US",formatDistance:Vi,formatLong:Bi,formatRelative:Zi,localize:io,match:Do,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Mo={};function we(){return Mo}const Mr=6048e5,Eo=864e5,Oo=60,vo=3600,un=Symbol.for("constructDateFrom");function P(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&un in e?e[un](t):e instanceof Date?new e.constructor(t):new Date(t)}function S(e,t){return P(t||e,e)}function ln(e){const t=S(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ro(e,...t){const n=P.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ne(e,t){const n=S(e,t?.in);return n.setHours(0,0,0,0),n}function No(e,t,n){const[r,i]=Ro(n?.in,e,t),o=ne(r),c=ne(i),l=+o-ln(o),f=+c-ln(c);return Math.round((l-f)/Eo)}function xo(e,t){const n=S(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Po(e,t){const n=S(e,t?.in);return No(n,xo(n))+1}function q(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=S(e,t?.in),o=i.getDay(),c=(o<r?7:0)+o-r;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function Ae(e,t){return q(e,{...t,weekStartsOn:1})}function Er(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=P(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Ae(i),c=P(n,0);c.setFullYear(r,0,4),c.setHours(0,0,0,0);const l=Ae(c);return n.getTime()>=o.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Co(e,t){const n=Er(e,t),r=P(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ae(r)}function Io(e,t){const n=S(e,t?.in),r=+Ae(n)-+Co(n);return Math.round(r/Mr)+1}function Or(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=we(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=P(t?.in||e,0);c.setFullYear(r+1,0,o),c.setHours(0,0,0,0);const l=q(c,t),f=P(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const y=q(f,t);return+n>=+l?r+1:+n>=+y?r:r-1}function Ao(e,t){const n=we(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Or(e,t),o=P(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),q(o,t)}function ko(e,t){const n=S(e,t?.in),r=+q(n,t)-+Ao(n,t);return Math.round(r/Mr)+1}function b(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const H={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return b(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):b(n+1,2)},d(e,t){return b(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return b(e.getHours()%12||12,t.length)},H(e,t){return b(e.getHours(),t.length)},m(e,t){return b(e.getMinutes(),t.length)},s(e,t){return b(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return b(i,t.length)}},J={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dn={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return H.y(e,t)},Y:function(e,t,n,r){const i=Or(e,r),o=i>0?i:1-i;if(t==="YY"){const c=o%100;return b(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):b(o,t.length)},R:function(e,t){const n=Er(e);return b(n,t.length)},u:function(e,t){const n=e.getFullYear();return b(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return b(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return b(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return H.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return b(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=ko(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):b(i,t.length)},I:function(e,t,n){const r=Io(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):b(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):H.d(e,t)},D:function(e,t,n){const r=Po(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):b(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return b(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return b(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return b(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=J.noon:r===0?i=J.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=J.evening:r>=12?i=J.afternoon:r>=4?i=J.morning:i=J.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return H.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):H.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):b(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):b(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):H.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):H.s(e,t)},S:function(e,t){return H.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return fn(r);case"XXXX":case"XX":return V(r);default:return V(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return fn(r);case"xxxx":case"xx":return V(r);default:return V(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mn(r,":");default:return"GMT"+V(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mn(r,":");default:return"GMT"+V(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return b(r,t.length)},T:function(e,t,n){return b(+e,t.length)}};function mn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+b(o,2)}function fn(e,t){return e%60===0?(e>0?"-":"+")+b(Math.abs(e)/60,2):V(e,t)}function V(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=b(Math.trunc(r/60),2),o=b(r%60,2);return n+i+t+o}const hn=(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"});default:return t.date({width:"full"})}},vr=(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"});default:return t.time({width:"full"})}},Go=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hn(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",hn(r,t)).replace("{{time}}",vr(i,t))},Yo={p:vr,P:Go},Fo=/^D+$/,qo=/^Y+$/,Uo=["D","DD","YY","YYYY"];function Ho(e){return Fo.test(e)}function Lo(e){return qo.test(e)}function Wo(e,t,n){const r=jo(e,t,n);if(console.warn(r),Uo.includes(e))throw new RangeError(r)}function jo(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Vo(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $o(e){return!(!Vo(e)&&typeof e!="number"||isNaN(+S(e)))}const zo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bo=/^'([^]*?)'?$/,Xo=/''/g,Zo=/[a-zA-Z]/;function Ko(e,t,n){const r=we(),i=n?.locale??r.locale??So,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=S(e,n?.in);if(!$o(l))throw new RangeError("Invalid time value");let f=t.match(Qo).map(g=>{const h=g[0];if(h==="p"||h==="P"){const _=Yo[h];return _(g,i.formatLong)}return g}).join("").match(zo).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:Jo(g)};if(dn[h])return{isToken:!0,value:g};if(h.match(Zo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(f=i.localize.preprocessor(l,f));const y={firstWeekContainsDate:o,weekStartsOn:c,locale:i};return f.map(g=>{if(!g.isToken)return g.value;const h=g.value;(!n?.useAdditionalWeekYearTokens&&Lo(h)||!n?.useAdditionalDayOfYearTokens&&Ho(h))&&Wo(h,t,String(e));const _=dn[h[0]];return _(l,h,i.localize,y)}).join("")}function Jo(e){const t=e.match(Bo);return t?t[1].replace(Xo,"'"):e}function Re(e,t,n){const r=S(e,n?.in);return isNaN(t)?P(e,NaN):(r.setDate(r.getDate()+t),r)}function Rr(e,t,n){const r=S(e,n?.in);if(isNaN(t))return P(e,NaN);if(!t)return r;const i=r.getDate(),o=P(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const c=o.getDate();return i>=c?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function es(e,t,n){return Rr(e,t*3,n)}function re(e,t){const n=S(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function ae(e,t){const n=S(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function ts(e,t){const n=S(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=P(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function ns(){return Object.assign({},we())}function pn(e){return+S(e)}function yn(e){return Math.trunc(+S(e)/1e3)}function gn(e){return Math.trunc(e*vo)}function rs(e){const t=e/Oo;return Math.trunc(t)}function Nr(e,t,n){return Rr(e,-1,n)}function xr(e,t,n){return es(e,-1,n)}function _n(e,t,n){const r=ns(),i=os(e,n.timeZone,n.locale??r.locale);return"formatToParts"in i?as(i,t):is(i,t)}function as(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function is(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function os(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function ss(e,t){const n=ms(t);return"formatToParts"in n?us(n,e):ls(n,e)}const cs={year:0,month:1,day:2,hour:3,minute:4,second:5};function us(e,t){try{const n=e.formatToParts(t),r=[];for(let i=0;i<n.length;i++){const o=cs[n[i].type];o!==void 0&&(r[o]=parseInt(n[i].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function ls(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const tt={},wn=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")),ds=wn==="06/25/2014, 00:00:00"||wn==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function ms(e){return tt[e]||(tt[e]=ds?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"})),tt[e]}function Mt(e,t,n,r,i,o,c){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,i,o,c),l}const bn=36e5,fs=6e4,nt={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function be(e,t,n){if(!e)return 0;let r=nt.timezoneZ.exec(e);if(r)return 0;let i,o;if(r=nt.timezoneHH.exec(e),r)return i=parseInt(r[1],10),Tn(i)?-(i*bn):NaN;if(r=nt.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);const c=parseInt(r[3],10);return Tn(i,c)?(o=Math.abs(i)*bn+c*fs,r[1]==="+"?-o:o):NaN}if(ys(e)){t=new Date(t||Date.now());const c=n?t:hs(t),l=st(c,e);return-(n?l:ps(t,l,e))}return NaN}function hs(e){return Mt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function st(e,t){const n=ss(e,t),r=Mt(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const o=i%1e3;return i-=o>=0?o:1e3+o,r-i}function ps(e,t,n){let i=e.getTime()-t;const o=st(new Date(i),n);if(t===o)return t;i-=o-t;const c=st(new Date(i),n);return o===c?o:Math.max(o,c)}function Tn(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Dn={};function ys(e){if(Dn[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Dn[e]=!0,!0}catch{return!1}}const gs=60*1e3,_s={X:function(e,t,n){const r=rt(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return Sn(r);case"XXXX":case"XX":return te(r);default:return te(r,":")}},x:function(e,t,n){const r=rt(n.timeZone,e);switch(t){case"x":return Sn(r);case"xxxx":case"xx":return te(r);default:return te(r,":")}},O:function(e,t,n){const r=rt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+ws(r,":");default:return"GMT"+te(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return _n("short",e,n);default:return _n("long",e,n)}}};function rt(e,t){const n=e?be(e,t,!0)/gs:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ke(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function te(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ke(Math.floor(r/60),2),o=ke(Math.floor(r%60),2);return n+i+t+o}function Sn(e,t){return e%60===0?(e>0?"-":"+")+ke(Math.abs(e)/60,2):te(e,t)}function ws(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+ke(o,2)}function Mn(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 Pr=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,at=36e5,En=6e4,bs=2,E={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,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:Pr};function Ge(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 n=t.additionalDigits==null?bs:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==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 r=Ts(e),{year:i,restDateString:o}=Ds(r.date,n),c=Ss(o,i);if(c===null||isNaN(c.getTime()))return new Date(NaN);if(c){const l=c.getTime();let f=0,y;if(r.time&&(f=Ms(r.time),f===null||isNaN(f)))return new Date(NaN);if(r.timeZone||t.timeZone){if(y=be(r.timeZone||t.timeZone,new Date(l+f)),isNaN(y))return new Date(NaN)}else y=Mn(new Date(l+f)),y=Mn(new Date(l+f+y));return new Date(l+f+y)}else return new Date(NaN)}function Ts(e){const t={};let n=E.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=E.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const i=E.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function Ds(e,t){if(e){const n=E.YYY[t],r=E.YYYYY[t];let i=E.YYYY.exec(e)||r.exec(e);if(i){const o=i[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(i=E.YY.exec(e)||n.exec(e),i){const o=i[1];return{year:parseInt(o,10)*100,restDateString:e.slice(o.length)}}}return{year:null}}function Ss(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let o=E.MM.exec(e);if(o)return n=new Date(0),r=parseInt(o[1],10)-1,vn(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(o=E.DDD.exec(e),o){n=new Date(0);const c=parseInt(o[1],10);return vs(t,c)?(n.setUTCFullYear(t,0,c),n):new Date(NaN)}if(o=E.MMDD.exec(e),o){n=new Date(0),r=parseInt(o[1],10)-1;const c=parseInt(o[2],10);return vn(t,r,c)?(n.setUTCFullYear(t,r,c),n):new Date(NaN)}if(o=E.Www.exec(e),o)return i=parseInt(o[1],10)-1,Rn(i)?On(t,i):new Date(NaN);if(o=E.WwwD.exec(e),o){i=parseInt(o[1],10)-1;const c=parseInt(o[2],10)-1;return Rn(i,c)?On(t,i,c):new Date(NaN)}return null}function Ms(e){let t,n,r=E.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),it(t)?t%24*at:NaN;if(r=E.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),it(t,n)?t%24*at+n*En:NaN;if(r=E.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const i=parseFloat(r[3].replace(",","."));return it(t,n,i)?t%24*at+n*En+i*1e3:NaN}return null}function On(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const Es=[31,28,31,30,31,30,31,31,30,31,30,31],Os=[31,29,31,30,31,30,31,31,30,31,30,31];function Cr(e){return e%400===0||e%4===0&&e%100!==0}function vn(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Cr(e);if(r&&n>Os[t]||!r&&n>Es[t])return!1}return!0}function vs(e,t){if(t<1)return!1;const n=Cr(e);return!(n&&t>366||!n&&t>365)}function Rn(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function it(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}const Rs=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Ns(e,t,n={}){t=String(t);const r=t.match(Rs);if(r){const i=Ge(n.originalDate||e,n);t=r.reduce(function(o,c){if(c[0]==="'")return o;const l=o.indexOf(c),f=o[l-1]==="'",y=o.replace(c,"'"+_s[c[0]](i,c,n)+"'");return f?y.substring(0,l-1)+y.substring(l+1):y},t)}return Ko(e,t,n)}function Ir(e,t,n){e=Ge(e,n);const r=be(t,e,!0),i=new Date(e.getTime()-r),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 Ar(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Ns(Ir(e,t,{timeZone:r.timeZone}),n,r)}function xs(e,t,n){if(typeof e=="string"&&!e.match(Pr))return Ge(e,{...n,timeZone:t});e=Ge(e,n);const r=Mt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=be(t,new Date(r));return new Date(r+i)}function kr(e,t){return-be(e,t)}function Ps(e,t={}){const n=t?.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;let r="MMM dd, yyy hh:mm a";switch(t.format){case"short":r="MMM dd, yyyy";break;case"default":r="MMM dd, yyyy hh:mm a";break;case"full":r="MMM dd, yyyy hh:mm:ss.SSS a";break}return t.includeTZ&&(r+=" (z)"),Ar(e,n,r)}function ct(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, yyy hh:mm a";t.short&&(r="MMM dd, yyy"),t.includeTZ&&(r+=" (z)");const i=new Date(e);return Ar(i,n,r)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function Cs(e,t){return`${ct(e.getTime())} - ${ct(t.getTime(),{includeTZ:!0})}`}const he={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:300*1e3,tenMinutely:600*1e3,thirtyMinutely:1800*1e3,hourly:3600*1e3,twoHourly:7200*1e3,twelveHourly:720*60*1e3,daily:3600*24*1e3,weekly:3600*24*7*1e3,trend:0};function Is(e,t){return e.map(n=>({value:n,label:t.t(`configuration.vitals.reports.granularity.${n}`)}))}function Gr(e,t){return{duration:e,type:"duration",origin:t}}function As(e){return e&&lt.find(n=>e<=he[n])||null}function Yr(e,t,n,r){const i=he[n];let o=0;return i>=he.daily&&(r?o=-kr(r,t):o=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-o)/i)*i+o)}function Fr(e,t,n){return Yr(Math.floor,e,t,n)}function Et(e,t,n){return Yr(Math.ceil,e,t,n)}class Ue{timeframe;tz;dataGranularity;constructor(t,n,r){if(this.constructor===Ue)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=n,this.dataGranularity=r??t.dataGranularity}calculateStartDate(t,n,r=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*r);{const i=this.endDate(),o=this.timeframe.rawStart(this.tz),c=Fr(o,n,this.tz),f=(i.getTime()-c.getTime())*(r-1);return new Date(c.getTime()-f)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return Gr(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return yn(this.startDate())}endSeconds(){return yn(this.endDate())}startMs(){return pn(this.startDate())}endMs(){return pn(this.endDate())}}class ks extends Ue{granularity;constructor(t,n,r,i,o){super(t,r,i),n&&t.allowedGranularities(o).has(n)?this.granularity=n:o?this.granularity=t.fineGrainedDefaultGranularity??t.defaultResponseGranularity:this.granularity=t.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return Et(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return he[this.granularity]}}class qr extends Ue{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return Et(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class Gs extends qr{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var me={exports:{}};me.exports;var Nn;function Fs(){return Nn||(Nn=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",y="[object Error]",g="[object Function]",h="[object GeneratorFunction]",_="[object Map]",I="[object Number]",p="[object Object]",w="[object Promise]",O="[object RegExp]",N="[object Set]",x="[object String]",A="[object Symbol]",Le="[object WeakMap]",vt="[object ArrayBuffer]",Te="[object DataView]",Rt="[object Float32Array]",Nt="[object Float64Array]",xt="[object Int8Array]",Pt="[object Int16Array]",Ct="[object Int32Array]",It="[object Uint8Array]",At="[object Uint8ClampedArray]",kt="[object Uint16Array]",Gt="[object Uint32Array]",$r=/[\\^$.*+?()[\]{}|]/g,zr=/\w*$/,Qr=/^\[object .+?Constructor\]$/,Br=/^(?:0|[1-9]\d*)$/,T={};T[o]=T[c]=T[vt]=T[Te]=T[l]=T[f]=T[Rt]=T[Nt]=T[xt]=T[Pt]=T[Ct]=T[_]=T[I]=T[p]=T[O]=T[N]=T[x]=T[A]=T[It]=T[At]=T[kt]=T[Gt]=!0,T[y]=T[g]=T[Le]=!1;var Xr=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne,Zr=typeof self=="object"&&self&&self.Object===Object&&self,G=Xr||Zr||Function("return this")(),Yt=t&&!t.nodeType&&t,Ft=Yt&&!0&&e&&!e.nodeType&&e,Kr=Ft&&Ft.exports===Yt;function Jr(a,s){return a.set(s[0],s[1]),a}function ea(a,s){return a.add(s),a}function ta(a,s){for(var u=-1,m=a?a.length:0;++u<m&&s(a[u],u,a)!==!1;);return a}function na(a,s){for(var u=-1,m=s.length,M=a.length;++u<m;)a[M+u]=s[u];return a}function qt(a,s,u,m){for(var M=-1,v=a?a.length:0;++M<v;)u=s(u,a[M],M,a);return u}function ra(a,s){for(var u=-1,m=Array(a);++u<a;)m[u]=s(u);return m}function aa(a,s){return a?.[s]}function Ut(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Ht(a){var s=-1,u=Array(a.size);return a.forEach(function(m,M){u[++s]=[M,m]}),u}function We(a,s){return function(u){return a(s(u))}}function Lt(a){var s=-1,u=Array(a.size);return a.forEach(function(m){u[++s]=m}),u}var ia=Array.prototype,oa=Function.prototype,De=Object.prototype,je=G["__core-js_shared__"],Wt=(function(){var a=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})(),jt=oa.toString,U=De.hasOwnProperty,Se=De.toString,sa=RegExp("^"+jt.call(U).replace($r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=Kr?G.Buffer:void 0,$t=G.Symbol,zt=G.Uint8Array,ca=We(Object.getPrototypeOf,Object),ua=Object.create,la=De.propertyIsEnumerable,da=ia.splice,Qt=Object.getOwnPropertySymbols,ma=Vt?Vt.isBuffer:void 0,fa=We(Object.keys,Object),Ve=Z(G,"DataView"),ce=Z(G,"Map"),$e=Z(G,"Promise"),ze=Z(G,"Set"),Qe=Z(G,"WeakMap"),ue=Z(Object,"create"),ha=j(Ve),pa=j(ce),ya=j($e),ga=j(ze),_a=j(Qe),Bt=$t?$t.prototype:void 0,Xt=Bt?Bt.valueOf:void 0;function L(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function wa(){this.__data__=ue?ue(null):{}}function ba(a){return this.has(a)&&delete this.__data__[a]}function Ta(a){var s=this.__data__;if(ue){var u=s[a];return u===r?void 0:u}return U.call(s,a)?s[a]:void 0}function Da(a){var s=this.__data__;return ue?s[a]!==void 0:U.call(s,a)}function Sa(a,s){var u=this.__data__;return u[a]=ue&&s===void 0?r:s,this}L.prototype.clear=wa,L.prototype.delete=ba,L.prototype.get=Ta,L.prototype.has=Da,L.prototype.set=Sa;function Y(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function Ma(){this.__data__=[]}function Ea(a){var s=this.__data__,u=Me(s,a);if(u<0)return!1;var m=s.length-1;return u==m?s.pop():da.call(s,u,1),!0}function Oa(a){var s=this.__data__,u=Me(s,a);return u<0?void 0:s[u][1]}function va(a){return Me(this.__data__,a)>-1}function Ra(a,s){var u=this.__data__,m=Me(u,a);return m<0?u.push([a,s]):u[m][1]=s,this}Y.prototype.clear=Ma,Y.prototype.delete=Ea,Y.prototype.get=Oa,Y.prototype.has=va,Y.prototype.set=Ra;function B(a){var s=-1,u=a?a.length:0;for(this.clear();++s<u;){var m=a[s];this.set(m[0],m[1])}}function Na(){this.__data__={hash:new L,map:new(ce||Y),string:new L}}function xa(a){return Ee(this,a).delete(a)}function Pa(a){return Ee(this,a).get(a)}function Ca(a){return Ee(this,a).has(a)}function Ia(a,s){return Ee(this,a).set(a,s),this}B.prototype.clear=Na,B.prototype.delete=xa,B.prototype.get=Pa,B.prototype.has=Ca,B.prototype.set=Ia;function X(a){this.__data__=new Y(a)}function Aa(){this.__data__=new Y}function ka(a){return this.__data__.delete(a)}function Ga(a){return this.__data__.get(a)}function Ya(a){return this.__data__.has(a)}function Fa(a,s){var u=this.__data__;if(u instanceof Y){var m=u.__data__;if(!ce||m.length<n-1)return m.push([a,s]),this;u=this.__data__=new B(m)}return u.set(a,s),this}X.prototype.clear=Aa,X.prototype.delete=ka,X.prototype.get=Ga,X.prototype.has=Ya,X.prototype.set=Fa;function qa(a,s){var u=Ze(a)||ui(a)?ra(a.length,String):[],m=u.length,M=!!m;for(var v in a)U.call(a,v)&&!(M&&(v=="length"||ii(v,m)))&&u.push(v);return u}function Zt(a,s,u){var m=a[s];(!(U.call(a,s)&&tn(m,u))||u===void 0&&!(s in a))&&(a[s]=u)}function Me(a,s){for(var u=a.length;u--;)if(tn(a[u][0],s))return u;return-1}function Ua(a,s){return a&&Kt(s,Ke(s),a)}function Be(a,s,u,m,M,v,F){var R;if(m&&(R=v?m(a,M,v,F):m(a)),R!==void 0)return R;if(!Oe(a))return a;var an=Ze(a);if(an){if(R=ni(a),!s)return Ja(a,R)}else{var K=W(a),on=K==g||K==h;if(di(a))return $a(a,s);if(K==p||K==o||on&&!v){if(Ut(a))return v?a:{};if(R=ri(on?{}:a),!s)return ei(a,Ua(R,a))}else{if(!T[K])return v?a:{};R=ai(a,K,Be,s)}}F||(F=new X);var sn=F.get(a);if(sn)return sn;if(F.set(a,R),!an)var cn=u?ti(a):Ke(a);return ta(cn||a,function(Je,ve){cn&&(ve=Je,Je=a[ve]),Zt(R,ve,Be(Je,s,u,m,ve,a,F))}),R}function Ha(a){return Oe(a)?ua(a):{}}function La(a,s,u){var m=s(a);return Ze(a)?m:na(m,u(a))}function Wa(a){return Se.call(a)}function ja(a){if(!Oe(a)||si(a))return!1;var s=rn(a)||Ut(a)?sa:Qr;return s.test(j(a))}function Va(a){if(!en(a))return fa(a);var s=[];for(var u in Object(a))U.call(a,u)&&u!="constructor"&&s.push(u);return s}function $a(a,s){if(s)return a.slice();var u=new a.constructor(a.length);return a.copy(u),u}function Xe(a){var s=new a.constructor(a.byteLength);return new zt(s).set(new zt(a)),s}function za(a,s){var u=s?Xe(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.byteLength)}function Qa(a,s,u){var m=s?u(Ht(a),!0):Ht(a);return qt(m,Jr,new a.constructor)}function Ba(a){var s=new a.constructor(a.source,zr.exec(a));return s.lastIndex=a.lastIndex,s}function Xa(a,s,u){var m=s?u(Lt(a),!0):Lt(a);return qt(m,ea,new a.constructor)}function Za(a){return Xt?Object(Xt.call(a)):{}}function Ka(a,s){var u=s?Xe(a.buffer):a.buffer;return new a.constructor(u,a.byteOffset,a.length)}function Ja(a,s){var u=-1,m=a.length;for(s||(s=Array(m));++u<m;)s[u]=a[u];return s}function Kt(a,s,u,m){u||(u={});for(var M=-1,v=s.length;++M<v;){var F=s[M],R=void 0;Zt(u,F,R===void 0?a[F]:R)}return u}function ei(a,s){return Kt(a,Jt(a),s)}function ti(a){return La(a,Ke,Jt)}function Ee(a,s){var u=a.__data__;return oi(s)?u[typeof s=="string"?"string":"hash"]:u.map}function Z(a,s){var u=aa(a,s);return ja(u)?u:void 0}var Jt=Qt?We(Qt,Object):hi,W=Wa;(Ve&&W(new Ve(new ArrayBuffer(1)))!=Te||ce&&W(new ce)!=_||$e&&W($e.resolve())!=w||ze&&W(new ze)!=N||Qe&&W(new Qe)!=Le)&&(W=function(a){var s=Se.call(a),u=s==p?a.constructor:void 0,m=u?j(u):void 0;if(m)switch(m){case ha:return Te;case pa:return _;case ya:return w;case ga:return N;case _a:return Le}return s});function ni(a){var s=a.length,u=a.constructor(s);return s&&typeof a[0]=="string"&&U.call(a,"index")&&(u.index=a.index,u.input=a.input),u}function ri(a){return typeof a.constructor=="function"&&!en(a)?Ha(ca(a)):{}}function ai(a,s,u,m){var M=a.constructor;switch(s){case vt:return Xe(a);case l:case f:return new M(+a);case Te:return za(a,m);case Rt:case Nt:case xt:case Pt:case Ct:case It:case At:case kt:case Gt:return Ka(a,m);case _:return Qa(a,m,u);case I:case x:return new M(a);case O:return Ba(a);case N:return Xa(a,m,u);case A:return Za(a)}}function ii(a,s){return s=s??i,!!s&&(typeof a=="number"||Br.test(a))&&a>-1&&a%1==0&&a<s}function oi(a){var s=typeof a;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?a!=="__proto__":a===null}function si(a){return!!Wt&&Wt in a}function en(a){var s=a&&a.constructor,u=typeof s=="function"&&s.prototype||De;return a===u}function j(a){if(a!=null){try{return jt.call(a)}catch{}try{return a+""}catch{}}return""}function ci(a){return Be(a,!0,!0)}function tn(a,s){return a===s||a!==a&&s!==s}function ui(a){return li(a)&&U.call(a,"callee")&&(!la.call(a,"callee")||Se.call(a)==o)}var Ze=Array.isArray;function nn(a){return a!=null&&mi(a.length)&&!rn(a)}function li(a){return fi(a)&&nn(a)}var di=ma||pi;function rn(a){var s=Oe(a)?Se.call(a):"";return s==g||s==h}function mi(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}function Oe(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function fi(a){return!!a&&typeof a=="object"}function Ke(a){return nn(a)?qa(a):Va(a)}function hi(){return[]}function pi(){return!1}e.exports=ci})(me,me.exports)),me.exports}var qs=Fs();const Us=Ys(qs),C=(e,t)=>new Date(e.getTime()-kr(t,e));class D{timeframeText;key;display;timeframeLength;allowedTiers;defaultResponseGranularity;dataGranularity;isRelative;fineGrainedDefaultGranularity;_startCustom;_endCustom;_allowedGranularitiesOverride;constructor(t){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 n=new Set,r=this.maximumTimeframeLength()/3600;return r<=6&&n.add("minutely"),r>=2&&r<=168&&n.add("hourly"),r>=48&&n.add("daily"),r>=672&&n.add("weekly"),n}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 n=xs(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return Ir(n,t)}}class Hs extends D{rawStart(t){let n=q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*7}}class Ls extends D{rawStart(t){let n=ae(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*31}}class Ws extends D{rawStart(t){let n=re(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*92}}class js extends D{rawStart(t){let n=new Date(this.tzAdjustedDate(t).getFullYear(),0,1);return t&&(n=C(n,t)),n}maximumTimeframeLength(){return 3600*24*366}}class Vs extends D{rawEnd(t){let n=q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=C(n,t)),n}rawStart(t){const n=this.tzAdjustedDate(t);let r=q(n.setDate(n.getDate()-7),{weekStartsOn:1});return t&&(r=C(r,t)),r}}class $s extends D{rawEnd(t){let n=re(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}rawStart(t){let n=re(xr(this.tzAdjustedDate(t)));return t&&(n=C(n,t)),n}}class zs extends D{rawEnd(t){let n=ae(this.tzAdjustedDate(t));return t&&(n=C(n,t)),n}rawStart(t){let n=ae(Nr(this.tzAdjustedDate(t)));return t&&(n=C(n,t)),n}}class Qs extends D{rawEnd(t){let n=new Date(this.tzAdjustedDate(t).getFullYear(),0,1);return t&&(n=C(n,t)),n}rawStart(t){let n=new Date(this.tzAdjustedDate(t).getFullYear()-1,0,1);return t&&(n=C(n,t)),n}}const Ur=new Map([[d.FIFTEEN_MIN,new D({key:d.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>900,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[d.ONE_HOUR,new D({key:d.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>3600*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[d.SIX_HOUR,new D({key:d.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>3600*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.TWELVE_HOUR,new D({key:d.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>3600*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.ONE_DAY,new D({key:d.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>3600*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[d.SEVEN_DAY,new D({key:d.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>3600*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.THIRTY_DAY,new D({key:d.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>3600*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.NINETY_DAY,new D({key:d.NINETY_DAY,display:"Last 90 days",timeframeText:"90 days",timeframeLength:()=>3600*24*90,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.ONE_HUNDRED_EIGHTY_DAY,new D({key:d.ONE_HUNDRED_EIGHTY_DAY,display:"Last 180 days",timeframeText:"180 days",timeframeLength:()=>3600*24*180,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.ONE_YEAR,new D({key:d.ONE_YEAR,display:"Last 365 days",timeframeText:"365 days",timeframeLength:()=>3600*24*365,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"daily",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[d.CURRENT_WEEK,new Hs({key:d.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=q(new Date,{weekStartsOn:1});return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.CURRENT_MONTH,new Ls({key:d.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=ae(new Date);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.CURRENT_QUARTER,new Ws({key:d.CURRENT_QUARTER,display:"This quarter",timeframeText:"Quarter",timeframeLength:()=>{const e=re(new Date);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.CURRENT_YEAR,new js({key:d.CURRENT_YEAR,display:"This year",timeframeText:"Year",timeframeLength:()=>{const e=new Date(new Date().getFullYear(),0,1);return(ne(Re(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_WEEK,new Vs({key:d.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>3600*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[d.PREVIOUS_MONTH,new zs({key:d.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=ae(new Date),n=ae(Nr(new Date));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=ut(t,n)),3600*24*ts(new Date().setMonth(new Date().getMonth()-1))+gn(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_QUARTER,new $s({key:d.PREVIOUS_QUARTER,display:"Previous quarter",timeframeText:"Quarter",timeframeLength:()=>{const e=re(new Date),t=re(xr(new Date));return(e.getTime()-t.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[d.PREVIOUS_YEAR,new Qs({key:d.PREVIOUS_YEAR,display:"Previous year",timeframeText:"Year",timeframeLength:()=>{const e=new Date(new Date().getFullYear(),0,1),t=new Date(new Date().getFullYear()-1,0,1);let n=0;return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(n=ut(e,t)),3600*24*(365+(t.getFullYear()%4===0?1:0))+gn(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function Bs(e){const t=new Date(e.start),n=new Date(e.end),r=(n.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&Us(Ur.get(e.timePeriodsKey))||new D({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:n,timeframeLength:()=>r,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function Xs(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function Zs(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function ut(e,t){return rs(e.getTimezoneOffset()-t.getTimezoneOffset())}const Ks={"15M":d.FIFTEEN_MIN,"1H":d.ONE_HOUR,"6H":d.SIX_HOUR,"12H":d.TWELVE_HOUR,"24H":d.ONE_DAY,"7D":d.SEVEN_DAY,"15m":d.FIFTEEN_MIN,"1h":d.ONE_HOUR,"6h":d.SIX_HOUR,"12h":d.TWELVE_HOUR,"24h":d.ONE_DAY,"7d":d.SEVEN_DAY,"30d":d.THIRTY_DAY,"90d":d.NINETY_DAY,"180d":d.ONE_HUNDRED_EIGHTY_DAY,"365d":d.ONE_YEAR,current_week:d.CURRENT_WEEK,current_month:d.CURRENT_MONTH,current_quarter:d.CURRENT_QUARTER,current_year:d.CURRENT_YEAR,previous_week:d.PREVIOUS_WEEK,previous_month:d.PREVIOUS_MONTH,previous_quarter:d.PREVIOUS_QUARTER,previous_year:d.PREVIOUS_YEAR};class He{_seed;constructor(t){this._seed=t}next(t,n){const r=Math.sin(this._seed++)*1e4,i=r-Math.floor(r);return Math.floor(i*(n-t+1))+t}}const Js=({metrics:e,dimensionMap:t,metaOverrides:n,valueRange:r=[50,500],timeSeries:i=!1})=>i?e.length===1?Hr(e[0],t,n,r):Lr(e,t,n,r):Wr(e,t,n,r),Hr=(e,t,n,r)=>{const i=Ot(10,1e4),o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=[];let h=0;for(let p=f;p<=y;p+=3600*1e3)if(t)for(const w in t)t[w].forEach(O=>{h+=o.next(c,l);const N={[w]:O,[e.name]:h},x={version:"1.0",timestamp:new Date(p).toISOString(),event:N};g.push(x)});else{h+=o.next(c,l);const w={version:"1.0",timestamp:new Date(p).toISOString(),event:{[e.name]:h}};g.push(w)}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:3600*1e3,display:_,...n??{}};return{data:g,meta:I}},ec=(e,t,n)=>Lr(e,void 0,t,n),Lr=(e,t,n,r)=>{const i=Ot(10,1e4),o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=[],h={};e.forEach(p=>{h[p.name]=0});for(let p=f;p<=y;p+=3600*1e3)if(t)for(const w in t)t[w].forEach(O=>{const N={[w]:O};e.forEach(x=>{const A=`${w}:${O}:${x.name}`;h[A]=(h[A]||0)+o.next(c,l),N[x.name]=h[A]}),g.push({version:"1.0",timestamp:new Date(p).toISOString(),event:N})});else{const w={};e.forEach(O=>{h[O.name]+=o.next(c,l),w[O.name]=h[O.name]}),g.push({version:"1.0",timestamp:new Date(p).toISOString(),event:w})}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,w)=>(p[w.name]=w.unit,p),{}),granularity_ms:3600*1e3,display:_,...n??{}};return{data:g,meta:I}},Wr=(e,t,n,r)=>{const i=Math.floor(Math.random()*9991)+10,o=new He(i),[c,l]=r||[50,500],f=Date.now()-360*60*1e3,y=Date.now(),g=new Date((f+y)/2).toISOString(),h=[];if(t){const p=Object.keys(t),w=Object.values(t),O=(N,x)=>{if(x===p.length){e.forEach(A=>{N[A.name]=o.next(c,l)}),h.push({version:"1.0",timestamp:new Date().toISOString(),event:{...N}});return}w[x].forEach(A=>{O({...N,[p[x]]:A},x+1)})};O({},0)}else{const p={};e.forEach(w=>{p[w.name]=o.next(c,l)}),h.push({version:"1.0",timestamp:g,event:p})}const _={};if(t)for(const p in t)_[p]={},t[p].forEach(w=>{_[p][w]={name:w,deleted:!1}});const I={start:new Date(f).toISOString(),end:new Date(y).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,w)=>(p[w.name]=w.unit,p),{}),truncated:!1,limit:50,display:_,granularity_ms:y-f,...n??{}};return{data:h,meta:I}};function Ot(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}const jr=new Map(_t.map(e=>[e.code,{code:e.code,name:e.name}])),tc=e=>jr.get(e)?.name||e,xn=1e3,nc=1e4,Pn=1e6,Cn=1e9,In=1e12,fe=(e,t)=>{if(t.separator===!1||e<1e3)return e.toString();const n=typeof t.separator=="string"?t.separator:",",r=[];return Math.round(e).toString().split("").reverse().forEach((o,c)=>{c&&c%3===0&&r.push(n),r.push(o)}),r.reverse().join("")},ee=(e,t,n)=>{const r=e/t,i=n.round?"round":"floor";if(n.decimal===!1)return Math[i](r).toString();let o;n.precision?o=r:o=r<10?Math[i](r*10)/10:Math[i](r);let c=o.toString();return typeof n.decimal=="string"&&(c=c.replace(".",n.decimal)),c};function xe(e,t={}){let n;const r=e<0;r&&(e=Math.abs(e)),t.precision&&(e=parseFloat(e.toPrecision(t.precision)));const i=t.min10k?nc:xn;return e<i||t.precision&&t.precision>Math.log10(e)?n=fe(ee(e,1,t),t):e<Pn?n=`${ee(e,xn,t)}k`:e<Cn?n=`${ee(e,Pn,t)}m`:e<In?n=`${fe(ee(e,Cn,t),t)}b`:n=`${fe(ee(e,In,t),t)}t`,r&&(n=`-${n}`),t.capital&&(n=n.toUpperCase()),t.prefix&&(n=`${t.prefix}${n}`),t.suffix&&(n=`${n}${t.suffix}`),n}xe.addCommas=fe;const rc=typeof document<"u"&&document.documentElement?.lang||"en-US",Pe=new Intl.NumberFormat(rc);function ac({i18n:e}){const t=(o,c)=>{if(isNaN(o))return"0 B";const l=c?Math.pow(2,50):1e15,f=c?Math.pow(2,40):1e12,y=c?Math.pow(2,30):1e9,g=c?Math.pow(2,20):1e6,h=c?Math.pow(2,10):1e3;let _;return o>=l?_=e.formatNumber(Number.parseFloat((o/l).toPrecision(3)),{style:"unit",unit:"petabyte",unitDisplay:"narrow"}):o>=f?_=e.formatNumber(Number.parseFloat((o/f).toPrecision(3)),{style:"unit",unit:"terabyte",unitDisplay:"narrow"}):o>=y?_=e.formatNumber(Number.parseFloat((o/y).toPrecision(3)),{style:"unit",unit:"gigabyte",unitDisplay:"narrow"}):o>=g?_=e.formatNumber(Number.parseFloat((o/g).toPrecision(3)),{style:"unit",unit:"megabyte",unitDisplay:"narrow"}):o>=h?_=e.formatNumber(Number.parseFloat((o/h).toPrecision(3)),{style:"unit",unit:"kilobyte",unitDisplay:"narrow"}):_=e.formatNumber(Number.parseFloat(o.toPrecision(3)),{style:"unit",unit:"byte",unitDisplay:"narrow"}),_.replace(/([a-zA-Z]*)$/," $1")},n=(o,c="USD")=>isNaN(o)?c==="USD"?"$0.00":`${o}`:o>=.01||c!=="USD"?e.formatNumber(o,{style:"currency",currency:c}):o<1e-4?"< $0.0001":`$${Number.parseFloat(o.toPrecision(4))}`;return{formatUnit:(o,c,{isBytes1024:l=!1,currency:f="USD",approximate:y=!1,translateUnit:g=h=>h}={})=>{const h=g(c,o);switch(c){case"bytes":return t(o,l);case"usd":return n(o,f);default:return isNaN(o)?`${o}`:y?`${xe(o,{capital:!0})} ${h}`:o>=.01?`${Pe.format(Number.parseFloat(o.toFixed(2)))} ${h}`:`${Number.parseFloat(o.toPrecision(4))} ${h}`}},formatBytes:t,formatCost:n,formatRange:(o,c,l,{isBytes1024:f=!1,currency:y="USD",approximate:g=!1,translateUnit:h=_=>_}={})=>{const _=h(l,c);switch(l){case"bytes":return`${t(o,f)} - ${t(c,f)}`;case"usd":return`${n(o,y)} - ${n(c,y)}`;default:if(isNaN(o)||isNaN(c))return`${o} - ${c}`;if(g)return`${xe(o,{capital:!0})} - ${xe(c,{capital:!0})} ${_}`}const I=o>=.01?`${Pe.format(Number.parseFloat(o.toFixed(2)))}`:`${Number.parseFloat(o.toPrecision(4))}`,p=c>=.01?`${Pe.format(Number.parseFloat(c.toFixed(2)))}`:`${Number.parseFloat(c.toPrecision(4))}`;return`${I} - ${p} ${_}`}}}const Vr=1e4,ic=async(e,t,n,r={})=>{const i=Math.max(0,r.maxRecords??Vr),o=Math.min(ot,Math.max(1,r.pageSize??ot)),c=[];let l=t.query.cursor,f;for(;c.length<i;){const y=Math.min(o,i-c.length),g=await e({datasource:t.datasource,query:{...t.query,size:y,...l?{cursor:l}:{}}},n);if(f=g,c.push(...g.results??[]),r.onPage?.(c.length,g),l=g.meta?.cursor,!l||!g.results?.length||g.results.length<y)break}return{results:c,meta:{...f?.meta??{query_id:"",time_range:{start:"",end:""},size:0},size:c.length},truncated:!!l&&c.length>=i,limit:i}};exports.API_REQUESTS_MAX_PAGE_SIZE=ot;exports.CAPTURE_PREPARE_EVENT=Ce;exports.CAPTURE_RESTORE_EVENT=Ie;exports.COUNTRIES=_t;exports.DEFAULT_MAX_REQUEST_RECORDS=Vr;exports.DeltaQueryTime=Gs;exports.EXPORT_RECORD_LIMIT=bi;exports.Granularities=he;exports.INJECT_QUERY_PROVIDER=Ti;exports.PLATFORM_DATASOURCES=Ln;exports.REFRESH_INTERVAL_MS=wi;exports.SeededRandom=He;exports.TIMEFRAME_LOOKUP=Ks;exports.TimePeriods=Ur;exports.Timeframe=D;exports.TimeframeKeys=d;exports.TimeseriesQueryTime=ks;exports.UnaryQueryTime=qr;exports.agenticExploreAggregations=Wn;exports.agenticUsageSchema=ur;exports.aiExploreAggregations=Yn;exports.apiRequestsExtraFieldSchema=hr;exports.apiRequestsQuerySchema=pr;exports.apiUsageQuerySchema=or;exports.barChartSchema=zn;exports.basicExploreAggregations=dt;exports.basicQuerySchema=sr;exports.ceilToNearestTimeGrain=Et;exports.chartTileConfigSchema=Tr;exports.choroplethMapSchema=rr;exports.countries=jr;exports.dashboardConfigSchema=Li;exports.dashboardTileTypes=Ii;exports.datasourceToFilterableDimensions=Vn;exports.datePickerSelectionToTimeframe=Bs;exports.donutChartSchema=Kn;exports.dstOffsetHours=ut;exports.exploreAggregations=mt;exports.exploreFilterTypesV2=kn;exports.extendedRelativeTimeRangeValues=Di;exports.fetchAllRequests=ic;exports.filterableAgenticExploreDimensions=_e;exports.filterableAiExploreDimensions=ge;exports.filterableBasicExploreDimensions=pe;exports.filterableExploreDimensions=ye;exports.filterableManagedCacheExploreDimensions=qe;exports.filterablePlatformPresetFilterDimensions=ar;exports.filterableRequestDimensions=ht;exports.filterableRequestMetrics=pt;exports.filterableRequestWildcardDimensions=Un;exports.floorToNearestTimeGrain=Fr;exports.formatTime=ct;exports.formatTimeRange=Cs;exports.formatTimestamp=Ps;exports.gaugeChartSchema=Zn;exports.generateCrossSectionalData=Wr;exports.generateData=Js;exports.generateMultipleMetricTimeSeriesData=ec;exports.generateSingleMetricTimeSeriesData=Hr;exports.getCountryName=tc;exports.getFieldDataSources=Wi;exports.granularitiesToOptions=Is;exports.granularityMsToQuery=Gr;exports.granularityValues=lt;exports.isPlatformDatasource=xi;exports.llmUsageSchema=cr;exports.managedCacheExploreAggregations=jn;exports.managedCacheUsageQuerySchema=lr;exports.metricCardSchema=tr;exports.msToGranularity=As;exports.numberFormatter=Pe;exports.platformQuerySchema=mr;exports.platformTabularQuerySchema=fr;exports.prepareForCapture=yi;exports.queryDatasources=Pi;exports.queryableAgenticExploreDimensions=yt;exports.queryableAiExploreDimensions=ft;exports.queryableBasicExploreDimensions=Ye;exports.queryableExploreDimensions=Fe;exports.queryableManagedCacheExploreDimensions=gt;exports.queryableRequestDimensions=Fn;exports.queryableRequestMetrics=Hn;exports.queryableRequestWildcardDimensions=qn;exports.rand=Ot;exports.registerCapture=An;exports.registerWebglCapture=_i;exports.relativeTimeRangeValuesRequestV2=Ni;exports.relativeTimeRangeValuesV4=Ri;exports.reportChartTypes=Si;exports.requestFilterTypeEmptyV2=Gn;exports.requestFilterTypeEqualsV2=Mi;exports.requestFilterTypeMetricV2=Ei;exports.requestFilterTypeWildcardV2=Oi;exports.restoreAfterCapture=gi;exports.scatterChartSchema=Dt;exports.scatterPercentileLineSchema=Xn;exports.singleValueSchema=nr;exports.slottableSchema=$n;exports.slottableTileConfigSchema=Dr;exports.stripUnknownFilters=Ci;exports.tableChartSchema=er;exports.thresholdSchema=Qn;exports.tileConfigSchema=Sr;exports.tileDefinitionSchema=br;exports.tileLayoutSchema=St;exports.timeRangeTypeV2=vi;exports.timeframeToDatepickerSelection=Xs;exports.timeframeToDatepickerTimeperiod=Zs;exports.timeseriesChartSchema=Bn;exports.topNTableSchema=Jn;exports.unitFormatter=ac;exports.validDashboardChartQuery=gr;exports.validDashboardQuery=Yi;exports.validDashboardTableQuery=wr;
2
2
  //# sourceMappingURL=vitals-utilities.cjs.map